tylerjereddy / pycon-2016

PyCon 2016 Computational Geometry Tutorial
MIT License
41 stars 14 forks source link

Build Status

Build history

pycon-2016

PyCon 2016 Computational Geometry Tutorial

This tutorial is available as a github repository that you may clone and run locally / interactively on your machine with the prerequisite Jupyter / IPython kernel installed. I have used Python 2.7.11 in this tutorial and have not tested with Python 3.x. I encourage you to git clone and run ipython notebook, and execute all the cells in the computational_geometry_tutorial.ipynb before the tutorial as it will help us get through more material if we can minimize technical issues (please do feel free to contact me ahead of the tutorial for assistance with the installation, etc.).

It may be a good idea to use something like conda to manage your python libraries if you have difficulties with installation. Here is a summary of the python libraries (beyond the standard library) and versions imported in the notebook at present, along with some notes:

library name version used notes
circumcircle N/A a small library included in the git repo
triangle 20160203 PyPI page
numpy 1.11.0 http://www.numpy.org
scipy 0.18.0.dev0+339c771 https://www.scipy.org ; I built from master branch for use of scipy.spatial.SphericalVoronoi -- can use an older version if you don't mind skipping that example in tutorial
matplotlib 1.5.1 http://matplotlib.org
ipywidgets 4.1.1 https://github.com/ipython/ipywidgets
pyshp 1.2.3 PyPI page ; use import shapefile

Options for Following Along

  1. Install the above dependencies manually / with a package manager and run the ipython notebook on your machine so that you may execute all the cells as I go through them (please check that this works in advance if possible).
  2. Similar to #1 except that you simply use the Jupyter notebook to follow along statically (without executing any cells). This is not ideal, but if you really can't get the prerequisite libraries installed, you could at least have a copy of the static notebook on your screen.
  3. You could follow along using the automatically-rendered html version of the notebook on the github page. This has the advantage that you don't need to install anything other than a modern web browser, but the drawback of depending on an internet connection (and again, only providing static content).
  4. I've made a docker image that you may be able to use. Note that, at present, the javascript widgets won't work, but you should otherwise be able to follow along, execute the code interactively, and even save your work if needed (i.e., using docker cp or mounting a local path). Here are the basic steps after installing docker (but you should definitely test this yourself before the tutorial, especially for mac and windows):
    1. docker pull tylerreddy/pycon-2016
    2. docker run -d -p 8888:8888 tylerreddy/pycon-2016
    3. open http://localhost:8888 in browser
    4. click on computational_geometry_tutorial.ipynb and follow along