To add a conda environment to the list of environments:
$ source activate thisenv
(thisenv) $ pip install ipykernel
(thisenv) $ python -m ipykernel install --user --name thisenv
# This is code written by Nathaniel Virgo, for the sake of replying to a Twitter thread. | |
# | |
# The code is in the public domain and you can do what you want with it. | |
# | |
# It simulates N masses moving in 2D with Newtonian gravity, with symmetric initial | |
# conditions, and outputs an animated gif. | |
# | |
# This code makes no attempt to be accurate, because the whole point was to show | |
# the system breaking down as a result of numerical inaccuracies. In particular, it | |
# doesn't use a conservative ODE solver, so even before it breaks down a little bit of |
[alias] | |
co = checkout | |
cob = checkout -b | |
coo = !git fetch && git checkout | |
br = branch | |
brd = branch -d | |
brD = branch -D | |
merged = branch --merged | |
st = status | |
aa = add -A . |
Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.
In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.
Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j
{ | |
"cmd": ["C:\\Program Files\\MATLAB\\R2012b\\bin\\matlab", "-nosplash", "-nodesktop", "-r", "run('$file_name')"], | |
"selector": "source.m" | |
} |
from __future__ import division | |
from numpy.fft import rfft | |
from numpy import argmax, mean, diff, log, nonzero | |
from scipy.signal import blackmanharris, correlate | |
from time import time | |
import sys | |
try: | |
import soundfile as sf | |
except ImportError: | |
from scikits.audiolab import flacread |