Code Monkey home page Code Monkey logo

pycon2016's Introduction

Repo for Pycon 2016 Tutorial The Fellowship of The Data

Update 5/28/16 - Ready for prime time!

Please get the latest version of the tutorial files from the repo for tomorrow:
$ git clone https://github.com/gizm00/pycon2016.git
$ cd pycon2016/notebooks

From here you can follow the instructions under "start the tutorial container" below  

UPDATE 5/27/16 - Hey folks. Glad to see some of you are working on getting up and running. Some errors you might see and how to troubleshoot:

URLError: <urlopen error [Errno 111] Connection refused>

Usually this means the apache server needs to be restarted. To do so, execute the following in the LAMP container shell:
$ /etc/init.d/apache2 restart

(pymysql.err.OperationalError) (2013, 'Lost connection to MySQL server during query')

Usually this means the mysql server needs to be restarted (and often occurs after you have encountered the above error and restarted apache). To fix, restart mysql in the LAMP container shell:
$ /etc/init.d/mysql restart

5/25/16 - Hi everyone! Please verify you can run the test_notbook. Notebooks for the tutorial are still in progress, I'll email the class when the material is finalized in the next few days

Setup Using Docker

Should you run into problems setting up with Docker please ping me at the address in the class email!

  1. Start docker, note the docker IP as YOUR_DOCKER_IP

  2. Get the LAMP stack for hosting tutorial files from Docker:
    $ docker run -t -i -p 3306:3306 --net=bridge --name=pycon2016_lamp gizm00/pycon2016_lamp /bin/bash

  3. In the pycon2016_lamp container you just created, note the IP address by running:
    $ ifconfig | grep 'inet addr'
    the first line will give you the IP for the container. This is the LAMP_IP

  4. Execute the startup script in the pycon2016_lamp container to setup the mysql database
    $ lamp_startup.sh

Your LAMP container should now be ready to serve files for the tutorial.

In a new window clone the tutorial files from Github
git clone https://github.com/gizm00/pycon2016.git
cd pycon2016/notebooks

In the pycon2016/notebooks directory, start the tutorial container

  1. Get the tutorial image from Docker. This will take some time to download, good time for second breakfast:
    $ docker run --rm -it --net=bridge -p 8888:8888 --name=pycon2016_notebooks -v "$(pwd):/home/notebooks" gizm00/pycon2016

  2. In the pycon2016_notebooks container execute the startup script to install the pymysql driver and start the notebook server:
    $ start-notebook.sh

  3. Navigate to http://YOUR_DOCKER_IP:8888/ to see the notebook tree

At this point youre ready to run the test notebook to verify your setup

  1. At http://YOUR_DOCKER_IP:8888/ find the config.py file

  2. Update config.py with the values you noted above: LAMP_IP = your LAMP_IP
    HOST_IP = YOUR_DOCKER_IP

  3. Save the updated config.py

  4. Open the test_notebook in the Jupyter tree and run the notebook. The resulting plot should be a map of Oregon, hover over points to see campground name and telephone (where available). You can check the notebook outputs against notebooks/test_notebook_output.pdf

Setup locally

I strongly suggest using the Docker containers for the tutorial, but here are some notes if you want to run the materials locally. Given the diversity of local machine setups its unlikely I will have time to devote to helping you debug your personal machine should you run into problems, FYI

  1. For a list of required pip packages see 'pycon2016/docker/requirements.txt'

  2. In addition to the above packages you will need

    firefox (we will be using the firefox driver for Selenium)
    python 3.4.3
    jupyter 4.2.0 mysql-connector-python

  3. To forgo using the pycon2016_lamp container you will need to have a local LAMP stack

    Refer to the pycon2016_lamp repo: https://github.com/gizm00/pycon2016_lamp

    mysql: setup users and database using the mysql_setup.sql

    apache: copy the contents of webfiles/ to your apache directory

  4. Get the course materials : git clone https://github.com/gizm00/pycon2016.git and run the test_notebook as above

pycon2016's People

Contributors

gizm00 avatar

Watchers

James Cloos avatar Matt Land avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.