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 / 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):