Default template for iPython notebook (using Jupyter)

I know it may not be what you’re looking for (this example is not good for working on notebooks that need to be run in multiple environments, e.g. shared), but I put the following in a file called ipython_config.py in my .ipython folder. c.InteractiveShellApp.exec_lines = [‘%matplotlib inline’, ‘import numpy as np’, ‘import scipy.constants as scc’, …

Read more

Plot Interactive Decision Tree in Jupyter Notebook

Updated Answer with collapsible graph using d3js in Jupyter Notebook Start of 1st cell in notebook %%html <div id=”d3-example”></div> <style> .node circle { cursor: pointer; stroke: #3182bd; stroke-width: 1.5px; } .node text { font: 10px sans-serif; pointer-events: none; text-anchor: middle; } line.link { fill: none; stroke: #9ecae1; stroke-width: 1.5px; } </style> End of 1st cell …

Read more

Jupyter (IPython) notebook: Convert an HTML notebook to ipynb

I recently used BeautifulSoup and JSON to convert html notebook to ipynb. the trick is to look at the JSON schema of a notebook and emulate that. The code selects only input code cells and markdown cells here is my code from bs4 import BeautifulSoup import json import urllib.request url=”http://nbviewer.jupyter.org/url/jakevdp.github.com/downloads/notebooks/XKCD_plots.ipynb” response = urllib.request.urlopen(url) # for …

Read more

ImportError: IProgress not found. Please update jupyter and ipywidgets although it is installed

I tried everything you mentioned in a new environment using conda and I had another issue related to the version of ipywidgets (a bug found in Github with comments saying that got solved after using last version). I solved the problem I had installing last version of ipywidgets. Here is my process: Create a new …

Read more

what is the relation and difference between ipython and jupyter console

Architecture Guides — Jupyter Documentation has the authoritative info on how IPython and Jupyter are connected and related. Specifically, as per Migrating from IPython Notebook — Jupyter Documentation: The Big Split moved IPython’s various language-agnostic components under the Jupyter umbrella. Going forward, Jupyter will contain the language-agnostic projects that serve many languages. IPython will continue …

Read more