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
apt-get update | |
apt-get install -y git | |
apt-get install -y tmux | |
apt-get install -y python-pip | |
apt-get install -y python-numpy python-scipy | |
apt-get install -y python-matplotlib | |
apt-get install -y python-pandas | |
pip install scikit-learn | |
apt-get install -y ipython | |
pip install -e git+https://github.com/Theano/Theano.git@15c90dd3#egg=Theano==0.8.git |
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
# your polar functions dr/dt and d\[Theta]/dt here: | |
field = {r (1 - r^2) (4 - r^2), 2 - r^2}; | |
# Creates the stream plot | |
StreamPlot[ | |
Evaluate@TransformedField["Polar" -> "Cartesian", | |
field, {r, \[Theta]} -> {x, y}], {x, -3, 3}, {y, -3, 3}] |
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
# Load the data streamer: | |
ds = IOutils.data_streamer(num_sets='all') | |
# obtains the unique rows in a dataset | |
def unique_rows(data): | |
uniq = np.unique(data.view(data.dtype.descr * data.shape[1])) | |
return uniq.view(data.dtype).reshape(-1, data.shape[1]) | |
X, Y = ds.next() | |
Y = np.array(Y) |
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
Show hidden characters
[ | |
//makes go to lines easier | |
{ "keys": ["super+;"], "command": "show_overlay", "args": {"overlay": "goto", "text": ":"} }, | |
// makes bookmarking easier | |
{ "keys": ["f5"], "command": "toggle_bookmark" }, | |
{ "keys": ["f6"], "command": "next_bookmark" }, | |
{ "keys": ["super+f6"], "command": "prev_bookmark" } | |
] |
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 matplotlib.pyplot as plt | |
def plot_polygon(vertices): | |
plt.figure() | |
for i in range(len(vertices)-1): | |
vertex_set = [ vertices[i] ] + [ vertices[i+1] ] | |
x, y = zip(*vertex_set) | |
plt.plot(x,y) | |
vertex_set = [ vertices[0] ] + [ vertices[-1] ] |
NewerOlder