Skip to content

Instantly share code, notes, and snippets.

@asford
Last active August 29, 2015 14:05
Show Gist options
  • Save asford/eac9261eb302fb510eab to your computer and use it in GitHub Desktop.
Save asford/eac9261eb302fb510eab to your computer and use it in GitHub Desktop.
140819_for_arives

Development Environment

Setup a virtualenv in the /work filesystem to manage installed packages. You will install development dependencies into this environment, including updated versions of packages we've pre-installed onto the dig machine images.

mkdir ~/virtualenvs
pushd ~/virtualenvs
virtualenv dev --system-site-packages
popd

Install updated versions the core development tools numpy/pip/wheel/tables/etc...

source ~/virtualenvs/dev/bin/activate

# First update pip support modules
pip install --upgrade -r /work/fordas/virtualenvs/requirements/setup.txt

# Install core development modules, installing from precompiled binaries if available
pip install -f /work/fordas/virtualenvs/wheelhouse -r /work/fordas/virtualenvs/requirements/core.txt

# Install additional development tools
pip install --upgrade ipython

Setup notebook server for access from remote hosts by adding the following to ~/.ipython/profile_default/ipython_notebook_config.py:

import socket
c.NotebookApp.ip = socket.gethostname()
c.NotebookApp.open_browser = False
c.NotebookApp.port = 8888

Test Script

Navigate to directory containing database_and_distance_calculation.ipynb, launch notebook server.

cd <dir>
ipython notebook

Open URL provided (eg. http://dig5:8890/) to view notebook.

Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment