Skip to content

Instantly share code, notes, and snippets.

View wlinds's full-sized avatar
🍍

Akilles William Lindstedt wlinds

🍍
View GitHub Profile
@wlinds
wlinds / gd.py
Last active April 15, 2024 17:09
Batch Gradient Descent example with synthetic data
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
@wlinds
wlinds / find_soundcloud_names.py
Created March 18, 2024 21:51
Find available Soundcloud names
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):
@wlinds
wlinds / latex.md
Created November 30, 2023 13:42
LaTeX Lathund 🐶

$\LaTeX$

Greek Letters

LaTex Symbol LaTex Symbol