All posts by Ian McDowell

Upload a gist to github directly from della


# First, install gist gem locally at della
gem install –user-install gist
echo ‘export PATH=$PATH:/PATH/TO/HOME/.gem/ruby/1.8/bin/’ >> ~/.bashrc
source ~/.bashrc

# Boot up connection
gist –login
[Enter Github username and password]

# Upload gist, e.g.
gist my_notebook.ipynb -u [secret_gist_string]

# secret_gist_string is the string already associated with a particular file on Github
# To obtain it, the first time you upload a file to Github (e.g. my_notebook.ipynb) go to
# | Gist | Add file [upload file] | Create secret Gist, which will
# return a secret_gist_string on the panel at right (labeled “HTTPS”)

Installing IPython notebook on della computing cluster

# Create local python site-packages folders

mkdir /home/
mkdir /home/
mkdir /home/
mkdir /home/

# tell python where to find these packages

echo 'export PYTHONPATH=$HOME/local/lib/python2.7/site-packages' >> ~/.bashrc
source ~/.bashrc

#python 2.7 is not default at della

module load python

# install packages needed for running the notebook

python -measy_install --prefix /home/ tornado
python -measy_install --prefix /home/ pyzmq
python -measy_install --prefix /home/ jinja2

echo 'export PATH=$HOME/local/lib/python2.6/site-packages:$PATH' >> ~/.bashrc
source ~/.bashrc

#create mycert.pem using the following openssl cmd:

openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout mycert.pem -out mycert.pem

# my mycert.pem wherever you’d like

mv mycert.pem ~/local/lib/

# create an ipython profilename

ipython profile create profilename

# generate a password using the following ipython utility:

from IPython.lib import passwd
Enter password:
Verify password:

#copy this hashed pass

vi /home/

# edit:

c.NotebookApp.port = 1999 # change this port number to something not in use, I used 2999
c.NotebookApp.password = 'sha1:…' #use generated pass here
c.NotebookApp.certfile = u'/home/'
c.NotebookApp.open_browser = False
c.NotebookApp.ip = ''



# sign off and sign back on to della

ssh -A -L<Your Port #>:<Your Port #>
module load python

# boot up notebook

ipython notebook --ip= --pylab=inline  --profile=profilename --port <Your Port #>
# note that if you are trying to access Della
# from outside the Princeton CS department, you
# may have to forward the same port from your home computer
# to some princeton server, then again to Della

# In your browser go to<Your Port #>