Saturday, April 4, 2015

How to create your ipython datascience notebook server fast?

ipython [notebook] is a powerful tool to share notes.

Here is how to start an ipython private notebook server:

  1. Install anaconda python distribution
  2. ipython notebook --pylab inline (works directly with anaconda python distribution)
  3. localhost:9000 (*open your favorite browser)

*If need to run it on a restricted server: set port forwarding localhost:9000 -> 8888 (so you can use a normal browser)

Here is how to start a public ipython notebook on the grid:
  • ipython profile create nbserver
  • cd /home/$USER/.ipython/profile_nbserver/
  • gen password: ipython;from IPython.lib import passwd; passwd()
  • openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout mycert.pem -out mycert.pem
  • edit ~/.ipython/profile_nbserver/
    • c = get_config()
    • c.NotebookApp.password = u'sha1:XXXXXXXXXXXXXX'
    • c.IPKernelApp.pylab = 'inline'  # if you want plotting support always
    • Notebook config
    • c.NotebookApp.certfile = u'mycert.pem'
    • c.NotebookApp.ip = '*'
    • c.NotebookApp.open_browser = False
    • # It is a good idea to put it on a known, fixed port
    • c.NotebookApp.port = 8888
  • ipython notebook --profile=nbserver

How can you share notebooks?

  1. Create a public notebook (B)
  2. Leverate with github. Your ipynb files will be rendered on if you commit on github like this:
  3. use (Sense is a collaborative platform to accelerate data science from exploration to production.)
Résultats de recherche d'images pour « »


How to deploy a python datascience python app on Heroku? numpy+scipy+pandas+sklearn+matplotlib

Résultats de recherche d'images pour « datascience »Résultats de recherche d'images pour « heroku » +Résultats de recherche d'images pour « python »

If you are looking for a way to deploy a datascience python app on heroku, you might have some troubles like:

  • time out
  • numpy and scipy incompatibilities
After several interation, here is a script to do it:

Here is what you will get:

Btw, I am currently experimenting my datascience stuff on sense,io ( is a collaborative platform to accelerate data science from exploration to production.)
Résultats de recherche d'images pour « »