Skip to content

Instantly share code, notes, and snippets.

View phobson's full-sized avatar
⛏️

Paul Hobson phobson

⛏️
View GitHub Profile
@phobson
phobson / WQ_Data.ipynb
Last active August 29, 2015 14:09
Water quality data and pandas
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
def __init__(self, data, dist=stats.norm, fit=False,
distargs=(), a=0, loc=0, scale=1):
self.data = data
self.a = a
self.nobs = data.shape[0]
da = list(distargs)
da.extend([loc, scale])
self.__all_distargs = tuple(da)
@phobson
phobson / metar.ipynb
Last active August 29, 2015 14:07
METAR Demo
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@phobson
phobson / chain.py
Created October 16, 2014 22:20
pandas chaining
(
flights.groupby(['year', 'month', 'day'])
[['arr_delay', 'dep_delay']]
.mean()
.query('arr_delay > 30 | dep_delay > 30')
)
@phobson
phobson / getprobs.py
Last active August 29, 2015 14:07
getprobs
import numpy as np
import matplotlib
from matplotlib.transforms import Transform
from matplotlib.scale import ScaleBase
from matplotlib.ticker import (
FixedLocator,
NullLocator,
Formatter,
NullFormatter,
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@phobson
phobson / pptest.ipynb
Created September 29, 2014 04:18
prob plots
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@phobson
phobson / seabornfly.ipynb
Created September 24, 2014 03:37
gadfly-ish seaborn
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@phobson
phobson / tidy_scratch.py
Created August 23, 2014 01:58
tidy_scratch.py
%matplotlib inline
import numpy as np
import pandas
import matplotlib.pyplot as plt
import seaborn
seaborn.set(style='ticks', palette='deep', rc={'text.usetex': False})
import bmp
import utils