Skip to content

Instantly share code, notes, and snippets.

View lukaszbinden's full-sized avatar
🎯
Focusing

Lukas Zbinden lukaszbinden

🎯
Focusing
  • University of Bern
View GitHub Profile
@aricooperdavis
aricooperdavis / 3d_regression_example.py
Last active February 2, 2024 13:13
Example of 3D plots illustrating Linear Regression with 2 features and 1 target
import matplotlib.pyplot as plt
import numpy as np
import sklearn.linear_model
from mpl_toolkits.mplot3d import Axes3D
X_train = np.random.rand(2000).reshape(1000,2)*60
y_train = (X_train[:, 0]**2)+(X_train[:, 1]**2)
X_test = np.random.rand(200).reshape(100,2)*60
y_test = (X_test[:, 0]**2)+(X_test[:, 1]**2)
@joechrysler
joechrysler / who_is_my_mummy.sh
Last active May 14, 2024 12:26
Find the nearest parent branch of the current git branch
#!/usr/bin/env zsh
git show-branch -a \
| grep '\*' \
| grep -v `git rev-parse --abbrev-ref HEAD` \
| head -n1 \
| sed 's/.*\[\(.*\)\].*/\1/' \
| sed 's/[\^~].*//'
# How it works: