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 webdriver_manager.chrome import ChromeDriverManager | |
# Dynamically install a Chrome web driver and instantiate it | |
driver = webdriver.Chrome(ChromeDriverManager().install()) | |
# Make the driver wait 7 seconds for the page to load | |
driver.implicitly_wait(7) | |
# Go the Phantom's character page | |
driver.get("https://gamepress.gg/arknights/operator/phantom") | |
# Element to scroll to |
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 | |
# Working data | |
data = [ | |
{ | |
"Symbol": "KLAC", | |
"Company": "KLA Corporation", | |
"Sector": "Information Technology", | |
"Date": "2018-02-02", | |
"Price": 99.11979699999999, |
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 azure.cognitiveservices.speech as speechsdk | |
import time | |
import pickle | |
subscription_key = "your_key" | |
speech_region = "your_region" | |
file_name = "your_audio.wav" | |
# Authenticate | |
speech_config = speechsdk.SpeechConfig(subscription_key, speech_region) | |
# Set up the file as the audio source |
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 azure.cognitiveservices.speech as speechsdk | |
subscription_key = "your_key" | |
speech_region = "your_region" | |
speech_config = speechsdk.SpeechConfig(subscription_key, speech_region) |
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 moviepy.editor import VideoFileClip | |
video = VideoFileClip("your_video.mp4") | |
audio = video.audio | |
audio.write_audiofile("audio_only.wav") |
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 os import getcwd, path | |
import plotly.express as px | |
import plotly.offline as pyo | |
pyo.init_notebook_mode() | |
path_to_data = path.join(getcwd(), "data", "survey_results_public.csv") | |
data = pd.read_csv(path_to_data) | |
data = data[["LanguageWorkedWith"]] |
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 os import getcwd, path | |
import plotly.express as px | |
import plotly.offline as pyo | |
pyo.init_notebook_mode() | |
path_to_data = path.join(getcwd(), "data", "survey_results_public.csv") | |
data = pd.read_csv(path_to_data) | |
data = data[["EdLevel"]] |
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 os import getcwd, path | |
import plotly.express as px | |
import plotly.offline as pyo | |
pyo.init_notebook_mode() | |
path_to_data = path.join(getcwd(), "data", "survey_results_public.csv") | |
data = pd.read_csv(path_to_data) | |
data = data[["ConvertedComp"]] |
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 os import getcwd, path | |
import plotly.express as px | |
import plotly.offline as pyo | |
pyo.init_notebook_mode() | |
path_to_data = path.join(getcwd(), "data", "survey_results_public.csv") | |
data = pd.read_csv(path_to_data) | |
data = data[["Age"]] |
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 PIL import Image | |
# Create a blank grey image | |
wip_img = Image.new("RGBA", (550, 450), "#f2f2f2") | |
# Load the santa hat | |
santa_hat = Image.open("santa_hat.png") | |
# At first this is just a black rectangle of the same size as the hat | |
shadow = Image.new("RGBA", santa_hat.size, color="black") | |
# Coordinates at which to draw the hat and shadow |