jupyter_utils

A set of Python utility methods to ease usage of Jupyter notebook


License
MIT
Install
pip install jupyter_utils==1.2.6

Documentation

Jupyter Notebook Utils

https://travis-ci.org/Stibbons/jupyter_utils.svg?branch=master Pypi package

A set of Python utility methods to ease usage of Jupyter notebook

Installation

Install jupyter_utils in Anaconda:

$ source activate my_conda_env
$ pip install jupyter_utils

Note: only dependencies described in requirements.txt will be installed when using pip install. The development dependencies (pylint,...) and not installed on deployment.

Usage

From now, on every Jupyter notebook that use this conda environment, you can install any missing anaconda package directly from the cell.

Install Anaconda package

An anaconda package can be installed directly from the notebook using ! conda install ..., but you need to specify the name of the kernel. To simply this, Jupyter Utils provides:

from jupyter_utils import conda
conda.install("numpy")

Grid Search CV on Apache Spark 1.6

Easily distribute Scikit-learn Cross Validation on a Spark Cluster. Only for Spark 1.6.x. For Spark 2, use Sparkit-Learn or Spark-SKLearn.

from jupyter_utils.spark import SparkGridSearchCV
SparkGridSearchCV(sc, model, params)

Contributing

Create a virtualenv:

$ virtualenv venv
$ source venv/bin/activate
$ pip install --upgrade pip  # Force upgrade to latest version of pip

Setup for production:

$ pip install -r requirements.txt .

Setup for development and unit tests:

$ pip install --upgrade -r requirements.txt -r requirements-dev.txt -e .
$ python setup.py develop

Execute unit tests:

$ python setup.py test

Code Style:

$ python setup.py flake8
$ yapf -r -i jupyter_utils

Build:

$ # Source package
$ python setup.py sdist
$ # Binary package:
$ python setup.py bdist bdist_wheel