Skip to content

Instantly share code, notes, and snippets.

@jiffyclub
jiffyclub / meanclip.py
Created October 25, 2011 00:34
Computes an iteratively sigma-clipped mean on a data set. Clipping is done about median, but mean is returned.
import numpy
def meanclip(indata, clipsig=3.0, maxiter=5, converge_num=0.02, verbose=0):
"""
Computes an iteratively sigma-clipped mean on a
data set. Clipping is done about median, but mean
is returned.
.. note:: MYMEANCLIP routine from ACS library.
@jiffyclub
jiffyclub / DAG-Import-Profile.ipynb
Created November 18, 2016 23:26
How to profile the import of an Airflow DAG definition file
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jiffyclub
jiffyclub / scipy_gender_stats.md
Last active July 29, 2016 17:59
SciPy Gender Diversity Stats
@jiffyclub
jiffyclub / pandas_date_conversion.ipynb
Last active June 10, 2016 18:51
Example of doing Pandas date conversion using a converter function
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jiffyclub
jiffyclub / dataframe_concatenation.ipynb
Created June 8, 2016 22:01
Examples of concatenating two dataframes. They must have the same column names.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jiffyclub
jiffyclub / runtests-magic.ipynb
Created November 3, 2012 02:06
A proof of concept idea for a test runner magic in IPython.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jiffyclub
jiffyclub / runtests.py
Created November 4, 2012 20:28
An IPython %runtests magic that does some very basic test function discovery, running, and reporting within IPython.
from IPython.core.magic import register_line_magic
@register_line_magic
def runtests(line):
"""
The %runtests magic searches your IPython namespace for functions
with names that begin with 'test'. It will attempt to run these
functions (calling them with no arguments), and report whether they
pass, fail (raise an AssertionError), or error (raise any other
@jiffyclub
jiffyclub / devthings.md
Last active January 29, 2016 00:48
Things I find useful as a developer
@jiffyclub
jiffyclub / drunkards_walk_ipb.ipynb
Created May 1, 2014 15:57
A drunkard's walk with ipythonblocks.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.