LaTex | Symbol | LaTex | Symbol |
---|
This file contains 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 os | |
from pyftpdlib.authorizers import DummyAuthorizer | |
from pyftpdlib.handlers import FTPHandler | |
from pyftpdlib.servers import FTPServer | |
USERNAME = "admin" | |
PASSWORD = "foobar" | |
PERMISSION = 'elradfmwMT' |
This file contains 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 os | |
import soundfile as sf # https://github.com/bastibe/python-soundfile | |
def get_wav_sample_rate(file_path): | |
try: | |
with sf.SoundFile(file_path) as wav_file: | |
return wav_file.samplerate | |
except: print(f"Error processing file: {file_path}") | |
def count_sample_rates_in_dir(root_dir): |
This file contains 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 numpy as np | |
from sklearn.model_selection import train_test_split | |
import matplotlib.pyplot as plt | |
np.random.seed(42) | |
samples = 1000 | |
X = 2 * np.random.rand(samples,1) # Features with uniform distribution | |
epsilon = np.random.normal(0,1, size=(samples,1)) # Random disturbance | |
y = 2 + 9 * X + epsilon # Simple linear regression model |
This file contains 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 os, requests, time, csv | |
from bs4 import BeautifulSoup | |
delay_seconds = 0.2 | |
url_to_check = "https://soundcloud.com" | |
error_title_to_check = "Something went wrong on SoundCloud" | |
csv_filename = "results.csv" | |
start_sequence = "/wla" | |
def get_names(delay, base_url, error_title, csv_filename, start_sequence): |