#!/usr/bin/env python # coding: utf-8 # # Jupyter # # This notebook [on nbviewer](https://nbviewer.jupyter.org/gist/minrk/8ec83e6cb7a55be361e4) # # - Started as part of IPython # - IPython since 2001 # - Document Format: [nbformat](https://nbformat.readthedocs.org/en/latest/) # - Interactive Computing Protocol: [jupyter-client](https://jupyter-client.readthedocs.org) # - Interactive Environment: [notebook](https://jupyter-notebook.readthedocs.org/en/latest/) # - Language-agnostic (> 50 language kernels) # - Multi-user notebook server: [JupyterHub](https://github.com/juptyer/jupyterhub) # - https://jupyter.org # # Notebook with code and prose # Here is an example that uses [SymPy](http://sympy.org/en/index.html) to factor polynomials. # In[12]: from ipywidgets import interact from sympy import Symbol, Eq, factor from sympy.interactive import init_printing init_printing(use_latex='mathjax') # In[13]: x = Symbol('x') x # In[14]: @interact def factorit(n=12): return Eq(x**n-1, factor(x**n-1)) # ## Plotting # # Inline plotting with matplotlib # In[15]: get_ipython().run_line_magic('matplotlib', 'inline') import numpy as np import matplotlib.pyplot as plt import seaborn as sns # We want to plot: # # \begin{equation} # y = sin(\omega t) # \end{equation} # In[16]: def plot_sinωt(ω=3, T=5): t = np.linspace(0, T, 1000) y = np.sin(ω * t) plt.plot(t, y) plt.title(r"$\omega = %s$" % ω) plot_sinωt(5, 5) # interact(plot_sinωt) # ### Interactive graphics with Bokeh # In[17]: import time from bokeh.io import output_notebook, show from bokeh.charts import Scatter from bokeh.sampledata.iris import flowers output_notebook() # In[18]: # fill a data frame with the data of interest and create a groupby object df = flowers[["petal_length", "petal_width", "species"]] xyvalues = df.groupby("species") TOOLS="resize,crosshair,pan,wheel_zoom,box_zoom,reset,previewsave" scatter = Scatter(xyvalues, tools=TOOLS, ylabel='petal_width') show(scatter) # # Contributing to Jupyter & IPython # # - Several repos # - [jupyter/notebook](https://github.com/jupyter/notebook) # - [ipython/ipython](https://github.com/ipython/ipython) # - [jupyter/nbconvert](https://github.com/jupyter/nbconvert) # - [...](https://github.com/jupyter) # - All BSD licensed # - Mostly Python (some JavaScript) # - All on GitHub via Pull Requests # - [Jupyter Mailing List](https://groups.google.com/forum/#!forum/jupyter) # - ~5 full-time funded core developers, hiring more in USA # - ~10 industry-provides contributors (Rackspace, Continuum, Bloomberg, Google, IBM) # - Weekly short report meetings [online](https://www.youtube.com/user/ipythondev)