pybcn-nov



pybcn-nov

0 0


pybcn-nov

My PyBCN November talk slides "Conda and other fun Continuum projects"

On Github chdoig / pybcn-nov

Conda and some fun @ContinuumIO projects

Christine Doig, Data Scientist

@ch_doig

PyBCN, November 2014

Conda

conda.pydata.org

A cross-platform Python-agnostic binary package manager: Linux, OSX, Windows.

~ homebrew + pip + virtualenv -> conda

Available: Anaconda: https://store.continuum.io/cshop/anaconda/

Miniconda (conda + python): http://conda.pydata.org/miniconda.html

Create an environment

conda create -n pybcn python=2.7 numpy=1.9

Activate environment

source activate pybcn

What packages are in the enviroment?

conda list

Store the file

conda list -e > myenv.txt

Deactivate environment

source deactivate

Recreate the environment

conda create --name newpybcn --file myenv.txt

Activate new enviroment

source activate newpybcn

Installing other packages

conda install bokeh mongodb mongod --dbpath ~/data/db/

Switching Python interpreters

source activate test conda install python=3.4 conda update --all

Back to my newpybcn

source activate newpybcn

Install more weird things

conda install scala conda install spark

anaconda/envs/pybcn2/./bin/pyspark

Show all my environments

conda info -e

Binstar

http://docs.binstar.org/

Package management service which allows you to host software packages of all kinds.

Binstar is a social website that allows you to test, create or distribute software packages.

~Github for binaries/Multi-software PyPI + TravisCI

In [4]:
from IPython.display import HTML
HTML('<iframe src=http://binstar.org width=900 height=350></iframe>')
Out[4]:
In [7]:
from IPython.display import HTML
HTML('<iframe src=http://docs.binstar.org/examples.html width=900 height=350></iframe>')
Out[7]:

Bokeh

http://bokeh.pydata.org/

A Python interactive visualization library that targets modern web browsers.

~D3.js without having to write JS :)

http://nbviewer.ipython.org/

http://nbviewer.ipython.org/github/bokeh/bokeh-notebooks/blob/master/index.ipynb

Bokeh Examples (I)

Interactivity - Sliders app

cd /Users/cdoig/anaconda/envs/pybcn2/Examples/bokeh/app/sliders_applet

To view this applet directly from a bokeh server, you simply need to run a bokeh-server and point it at the stock example script:

bokeh-server --script sliders_app.py

Now navigate to the following URL in a browser:

http://localhost:5006/bokeh/sliders

Interactivity

cd /Users/cdoig/anaconda/envs/pybcn2/Examples/bokeh/glyphs

  • Taylor approximation !Remember bokeh-server
python taylor_server.py

python population_server.py

Bokeh Examples (II)

Charts

cd /Users/cdoig/anaconda/envs/pybcn2/Examples/bokeh/charts

ipython notebook

Bokeh Examples(III)

  • Matplotlib compatibility

ipython notebook

test.ipynb

  • Plotting (file, server, notebook)

Blaze

http://blaze.pydata.org/docs/latest/index.html

Blaze provides a familiar interface to various computational resources.

Blaze extends the usability of NumPy and Pandas to distributed and out-of-core computing.

Thanks!