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
| import pandas as pd | |
| from string import ascii_uppercase as alphabet | |
| all_tables = pd.read_html("https://en.wikipedia.org/wiki/2022_FIFA_World_Cup") | |
| dict_tables = {} | |
| for letter, i in zip(alphabet, range(11, 67, 7)): | |
| df = all_tables[i] | |
| df.rename(columns={df.columns[1]: 'Team'}, inplace=True) | |
| df.pop('Qualification') |
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
| def hello_world(year): | |
| print(f"Hello World {year}") |
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
| import gspread | |
| from oauth2client.service_account import ServiceAccountCredentials | |
| import pandas as pd | |
| # Connect to Google Sheets | |
| scope = ['https://www.googleapis.com/auth/spreadsheets', | |
| "https://www.googleapis.com/auth/drive"] | |
| credentials = ServiceAccountCredentials.from_json_keyfile_name("gs_credentials.json", scope) | |
| client = gspread.authorize(credentials) |
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
| .env |
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 decouple import config | |
| username = config('username', default='') | |
| password = config('password', default='') | |
| print(username, password) |
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
| username = "python-lover" | |
| password = "zenofpython123" |
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
| send_image_button = driver.find_element(by='xpath', value='//div[@data-testid="drawer-middle"]//span[@data-testid="send"]') | |
| send_image_button.click() | |
| time.sleep(5) # wait till the message is delivered | |
| driver.quit() |
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> | |
| </head> |
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
| <body> | |
| <h1>Bokeh</h1> | |
| <div id="myplot"></div> | |
| <py-script id="main"> | |
| # Python code | |
| import json | |
| import pyodide | |
| from js import Bokeh, console, JSON |
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="icon" type="image/x-icon" href="./favicon.png"> | |
| <script type="text/javascript" src="https://cdn.bokeh.org/bokeh/release/bokeh-2.4.2.min.js"></script> | |
| <script type="text/javascript" src="https://cdn.bokeh.org/bokeh/release/bokeh-gl-2.4.2.min.js"></script> |
NewerOlder