This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Python Code Goes Here ... | |
| import matplotlib.pyplot as plt | |
| fig, ax = plt.subplots() | |
| year_1 = [2016, 2017, 2018, 2019, 2020, 2021] | |
| population_1 = [42, 43, 45, 47, 48, 50] | |
| year_2 = [2016, 2017, 2018, 2019, 2020, 2021] | |
| population_2 = [43, 43, 44, 44, 45, 45] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" | |
| content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> | |
| <meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
| <title>Document</title> | |
| <link rel="stylesheet" href="https://pyscript.net/alpha/pyscript.css" /> | |
| <script defer src="https://pyscript.net/alpha/pyscript.js"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" | |
| content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> | |
| <meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
| <title>Document</title> | |
| </head> | |
| <body> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from selenium import webdriver | |
| from selenium.webdriver.chrome.service import Service | |
| import time | |
| path = # path of your chromedriver file | |
| website = "https://web.whatsapp.com/" | |
| phone_number = # Write a phone number here | |
| photo_path = # paste the path of the photo you want to send here | |
| service = Service(executable_path=path) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| search_phone = driver.find_element(by='xpath', value='//div[@title="Search input textbox"]') | |
| search_phone.send_keys(phone_number) | |
| time.sleep(2) | |
| contacts = driver.find_elements(by='xpath', value='//div[@aria-label="Search results."]//div[@data-testid="cell-frame-container"]') | |
| contacts[-1].click() # picks last element in the list (this one represents first in the whatsapp search list) | |
| time.sleep(2) | |
| attach_button = driver.find_element(by='xpath', value='//span[@data-testid="clip"]') | |
| attach_button.click() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| search_phone = driver.find_element(by='xpath', value='//div[@title="Search input textbox"]') | |
| search_phone.send_keys(phone_number) # write contact number here | |
| time.sleep(2) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from selenium import webdriver | |
| from selenium.webdriver.chrome.options import Options | |
| from selenium.webdriver.chrome.service import Service | |
| import time | |
| path = # path of your chromedriver file | |
| website = "https://web.whatsapp.com/" | |
| phone_number = # Write a phone number here | |
| photo_path = # paste the path of the photo you want to send here |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from mitosheet import *; register_analysis('UUID-2c83756f-c360-403c-be50-951b26c54ac1') | |
| # Imported StudentsPerformance_id.csv | |
| import pandas as pd | |
| StudentsPerformance_id_csv = pd.read_csv(r'StudentsPerformance_id.csv') | |
| # Import plotly and create a figure | |
| import plotly.graph_objects as go | |
| fig = go.Figure() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| names = ['L. Messi', 'Cristiano Ronaldo', 'Neymar Jr', 'J. Oblak', 'E. Hazard'] | |
| age = [32, 34, 27, 26, 28] | |
| height_cm = [170, 187, 175, 188, 175] | |
| nationality = ['Argentina', 'Portugal', 'Brazil', 'Slovenia', 'Belgium'] | |
| club = ['Paris Saint-Germain', 'Manchester United', 'Paris Saint-Germain', 'Atlético Madrid', 'Real Madrid'] | |
| df = pd.DataFrame(index=names, data={'age':age, 'height_cm':height_cm, 'nationality':nationality, 'club':club}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # STEP 3: SAVE THE TRANSCRIPT AND SUMMARY | |
| import os | |
| import sys | |
| import time | |
| import json | |
| polling_endpoint = os.path.join(transcript_endpoint, transcript_id) | |
| status = '' | |
| while status != 'completed': |