Skip to content

Instantly share code, notes, and snippets.

Avatar

Jake Vanderplas jakevdp

View GitHub Profile
@jakevdp
jakevdp / README.md
Last active Aug 29, 2015
Supernovae Fitting
View README.md

Supernova Fitting

See the attached notebook in nbviewer

View gist:9476950
import jinja2
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
from sklearn.datasets import load_iris
import mpld3
from mpld3 import plugins, utils
@jakevdp
jakevdp / JSClass1.js
Last active Aug 29, 2015
A simple Javascript inheritance pattern
View JSClass1.js
/**********************************************************************
I've been working with javascript for a bit, and I miss my
Python-style namespaces and class inheritance. Here's a little
pattern I came up with that allows me to do things (kind of)
the way I wish I could within javascript. I'd be curious if any
experienced JS users have comments or critiques. Thanks!
Edit - also see the second version (which I think is more clean)
below.
**********************************************************************/
@jakevdp
jakevdp / README.md
Last active Aug 29, 2015
D3/IPython widget example
View README.md

D3 IPython Widget Example

A simple example of two-way communication between IPython notebook and javascript, using a D3 widget.

View this notebook on nbviewer, but be aware that it won't work without being connected to an IPython kernel!

It's better to download the notebook itself and open it with IPython notebook.

@jakevdp
jakevdp / broken_notebook.ipynb
Created Jun 3, 2014
A notebook which contains HTML comments and breaks IPython 2.x
View broken_notebook.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jakevdp
jakevdp / script.py
Created Jul 11, 2014
Simple mpld3 embedding
View script.py
import mpld3
import matplotlib.pyplot as plt
plt.plot(range(10))
mpld3.show(template_type='simple', local=False)
@jakevdp
jakevdp / BlockDiagonal.ipynb
Created Jul 22, 2014
Block Diagonal Stuff
View BlockDiagonal.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jakevdp
jakevdp / LombScargle.ipynb
Created Aug 14, 2014
Lomb-Scargle quick scaling test
View LombScargle.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jakevdp
jakevdp / AsteroidVis.ipynb
Last active Aug 29, 2015
Asteroid Visualization Post
View AsteroidVis.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.