Django with IPython Notebook (Jupyter)

I've used the IPython notebook (now Jupyter) for many years now.  It's a great way for prototyping algorithms or playing around with data using pandas/numpy. And I find it's a great way to learn how to use a new module since the introspection abilities are second to none.  

Now that I have been using Django I've been wanting to get back to using the notebook.  So today I finally took the time to get things up and running with Django.  This tutorial assumes Django 1.8+ and IPython 4.0 but should work with earlier versions of both. If you do run into issues with earlier versions check out this tutorial. Before you start, I would recommend doing everything inside a virtualenv but it should still work if you run with your system python.

First install IPython with notebook dependencies by running:

    $ pip install "ipython[all]"

Now from within your project folder run:

    $ DJANGO_SETTINGS_MODULE=project_name.settings ipython notebook

This assumes that you have a 'settings.py' file in your main project folder.  If you have a different directory structure just make sure you put the proper path in. 

You should now have the IPython notebook up and running.  If you get any errors about your apps not being loaded yet try running the following before import your models:

    import django
    django.setup()

Now you should be able to import all your models and play around with your data.  If you haven't used pandas before I definitely suggest installing it if you would like to plot your data or do any analytics.  The easiest way is to use pip.

    $ pip install pandas

If you have any questions or problems just leave a comment and I will help you out.  Cheers!

Swiftwater Rescue Training

Last summer I went through Swiftwater Rescue Training with my colleagues since we were working primarily on rivers.  The video below shows a few of the fun drills we got to do on our first day out.  Thanks to Jordan for putting together the video. Enjoy!


HydroRun Testing Highlights

The last two years I have been working at HydroRun Technologies.  We have been building underwater robotic kites to generate base-load power from rivers without damning or diverting the flow (see website). 

We recently put together a testing highlight video since we have been lucky enough to work in a very beautiful part of the world and work frequently on lakes and rivers to test our prototypes.  Check it out here:


First Post

This is my first post.  I will be posting interesting literature, code, ideas etc.