The Ten Commandments of Scientific Coding
Thou shall use version control.
Thou shall comment thy code.
Thou shall use existing libraries whenever possible.
Thou shall try to unit test.
|* Hide comments on Losse Veter (losseveter.nl)|
|* Most of the user comments on Losse Veter are either racist or zealot|
|* epistels about doping. With this Firefox setting, you can enjoy just|
|* the track and field news.|
|* Edit this file and copy it as userContent.css into your Firefox|
This describes how I installed and configured my Raspberry Pi model B (512MB).
The Pi is mainly used as SSH jump host, IRC client, Git server, backup fileserver, etc. It doesn't need stellar performance, it just has to be cheap, low in power usage, and secure.
|# This hook is run after a new virtualenv is activated.|
|libs=( PyQt4 sip.so )|
|python_version=python$(python -c "import sys; print (str(sys.version_info)+'.'+str(sys.version_info))")|
|var=( $(which -a $python_version) )|
|get_python_lib_cmd="from distutils.sysconfig import get_python_lib; print (get_python_lib())"|
GitLab is open source software to collaborate on code (a GitHub clone to run on your own server). Clicking a blob (a file in a repository) in GitLab shows a nice rendering if GitLab supports the file type (e.g., images, Markdown documents), or its content as plain text otherwise. The patch described here adds support to GitLab for rendering IPython notebooks (.ipynb files).
Copy nbflatten.py to somewhere on $PATH. Then, in the root of a git repository, run these commands:
echo "*.ipynb diff=ipynb" >> .gitattributes git config diff.ipynb.textconv nbflatten.py
When you change a notebook and run
git diff, you'll see the diff of flattened, simplified notebooks, rather than the full JSON. This does lose some information (metadata, non-text output), but it makes it easier to see simple changes in the notebook.
This doesn't help with merging conflicting changes in notebooks. For that, see nbdiff.org.
This guide documents how we set up an easy workflow for using the IPython Notebook on our compute cluster managed with Sun Grid Engine (SGE).
Summary: We provide a script to the cluster users that runs
qrsh to schedule an
ipython notebook job using SSL and password protection.