Skip to content

Instantly share code, notes, and snippets.

@jiffyclub
jiffyclub / BatteryParkTideData.csv
Created November 10, 2012 02:11
Cleaned and reorganized version of this NOAA data of Battery Park tide levels during Hurricane Sandy: http://is.gd/FP6C3l
TimeOffsetHours Pred6 Backup Acoustc
0.0 1.5900000000000001 4.6799999999999997 4.6500000000000004
0.10000000000000001 1.5 4.5499999999999998 4.54
0.20000000000000001 1.3999999999999999 4.46 4.4400000000000004
0.29999999999999999 1.3100000000000001 4.3600000000000003 4.3300000000000001
0.40000000000000002 1.22 4.2800000000000002 4.2599999999999998
0.5 1.1299999999999999 4.21 4.1799999999999997
0.59999999999999998 1.04 4.1500000000000004 4.1200000000000001
0.69999999999999996 0.94999999999999996 4.0800000000000001 4.0599999999999996
0.80000000000000004 0.87 3.9900000000000002 3.9700000000000002
@jiffyclub
jiffyclub / HurricaneHistoryData.csv
Created November 10, 2012 04:32
Reformatted, machine readable form of the Atlantic hurricane data from http://www.wunderground.com/hurricane/hurrarchive.asp
Year Storms Hurricanes Deaths Damage (millions USD) Number of Retired Names Retired Names
2011 20 7 100 21000 1 Irene
2010 21 12 287 12356 2 Igor, Tomas
2009 11 3 6 77 0
2008 16 8 761 24945 3 Gustav, Ike, Paloma
2007 15 6 341 50 3 Dean, Felix, Noel
2006 10 5 5 500 0
2005 28 15 3483 115520 5 Dennis, Katrina, Rita, Stan, Wilma
2004 15 9 3126 45235 4 Charley, Frances, Ivan, Jeanne
2003 16 7 50 3580 3 Fabian, Isabel, Juan
@jiffyclub
jiffyclub / ipythonblocks Demo.ipynb
Last active September 5, 2022 03:46
ipythonblocks.BlockGrid is a class that displays a colored grid in the IPython Notebook. The colors can be manipulated, making it useful for practicing control flow stuctures and quickly seeing the results.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jiffyclub
jiffyclub / Firework.ipynb
Created February 21, 2013 21:49
A simple firework animation with ipythonblocks.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jiffyclub
jiffyclub / markdown_doc
Last active August 1, 2023 11:16
This script turns Markdown into HTML using the Python markdown library and wraps the result in a complete HTML document with default Bootstrap styling so that it's immediately printable. Requires the python libraries jinja2, markdown, and mdx_smartypants.
#!/usr/bin/env python
import argparse
import sys
import jinja2
import markdown
TEMPLATE = """<!DOCTYPE html>
<html>
@jiffyclub
jiffyclub / jiffyclub_pycon_talk_2013.ipynb
Last active December 14, 2015 23:28
The annotated edition of my PyCon 2013 talk on Teaching with the IPython Notebook.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jiffyclub
jiffyclub / lightning_talk1.ipynb
Last active December 14, 2015 23:29
My lightning talk from the PyCon 2013 Education Summit.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jiffyclub
jiffyclub / tmpnb
Created March 18, 2013 17:41
bash script for starting a notebook session in /tmp
#!/usr/bin/env bash
cd /tmp
ipython notebook
@jiffyclub
jiffyclub / snakeviz_magic.py
Last active February 8, 2021 14:16
Magics for starting Snakeviz from IPython. Use %snakeviz and %%snakeviz in place of %prun and %%prun to profile a block of code and launch a Snakeviz view of the profile.
import subprocess
import tempfile
import time
from IPython.core.magic import register_line_cell_magic
def snakeviz(line, cell=None):
"""
Profile code and display the profile in Snakeviz.
@jiffyclub
jiffyclub / pygments.ipynb
Created April 14, 2013 15:12
An example of using Pygments to display a code file with syntax highlighting in the IPython Notebook.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.