Skip to content

Instantly share code, notes, and snippets.

View jakevdp's full-sized avatar

Jake Vanderplas jakevdp

View GitHub Profile
@jakevdp
jakevdp / Makefile
Created January 18, 2012 17:19
Example of sphinx image copy
SPHINXBUILD = sphinx-build
BUILDDIR = _build
SPHINXOPTS = -d $(BUILDDIR)/doctrees .
all: html
html:
$(SPHINXBUILD) -b html $(SPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
@jakevdp
jakevdp / generative.py
Last active September 23, 2021 15:24
General Generative Classification for scikit-learn
"""
Bayesian Generative Classifier
------------------------------
"""
# Author: Jake Vanderplas <jakevdp@cs.washington.edu>
import numpy as np
from sklearn.neighbors.kde import KernelDensity
from sklearn.mixture import GMM
from sklearn.base import BaseEstimator, clone
@jakevdp
jakevdp / .block
Last active July 29, 2020 20:03
Example of an interactive time-series plot
license: MIT
@jakevdp
jakevdp / .block
Last active July 29, 2020 20:03
Interactive Exploration of Seattle Weather
license: MIT
@jakevdp
jakevdp / .block
Last active July 29, 2020 20:03
Vega-Lite Bike Counts with Dynamic Scale
license: MIT
@jakevdp
jakevdp / empty-py2.ipynb
Created April 22, 2020 16:22
Empty Python 2 notebook
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jakevdp
jakevdp / random_seeds.csv
Created April 8, 2020 17:07
Counts of "seed(x)" in github (source http://grep.app)
seed count
0 8094
1 6700
2 1232
3 575
4 474
5 450
6 128
7 464
8 132
@jakevdp
jakevdp / kmeans.ipynb
Created May 11, 2018 14:13
Performance Python: 7 Strategies for Optimizing Your Numerical Code (PyCon 2018)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jakevdp
jakevdp / PEP8LineLengths.ipynb
Created November 10, 2017 14:52
Further exploration of line lengths and PEP8
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jakevdp
jakevdp / README.md
Last active February 20, 2020 22:25
A generator of random Bible-ish verses

Bibleish.py

This is a simple NLTK Python script which uses N-grams to construct phrases from a generative language model trained on the King James Bible.