Skip to content

Instantly share code, notes, and snippets.

View tobeycarman's full-sized avatar

tobey tobeycarman

  • anchorage, ak
View GitHub Profile
@tobeycarman
tobeycarman / gist:d29c69f03398c3369c57
Last active August 29, 2015 14:06
tempodb_dump.py
#!/usr/bin/env python
# Tobey Carman 2014
# Experiments with Tempo DB Python API
# to extract data for Cultivar
import datetime
import os
import re
import json
@tobeycarman
tobeycarman / simple_detrend.py
Created May 12, 2014 16:27
detrend example with plot
# from scipy.signal.detrend docs
from scipy import signal
randgen = np.random.RandomState(9)
npoints = 1e3
noise = randgen.randn(npoints)
trended_noise = 3 + 2*np.linspace(0, 1, npoints) + noise
print "detrended signal minus noise, max difference from original signal: ",
print (signal.detrend(trended_noise) - noise).max()
@tobeycarman
tobeycarman / gist:9966483
Last active August 29, 2015 13:58
simple matplotlib bar plot
import matplotlib.pyplot as plt
import numpy as np
PAR = [
99.85782790688292,
0.00029915877415765486,
0.00010509505480959243,
0.12320735471319781,
1.8037705277837454e-05,
1.634040105529734e-05,