Skip to content

Instantly share code, notes, and snippets.

@wmoreland
wmoreland / petition_time.csv
Last active March 21, 2019 14:23
Python Matplotlib plot of RevokeArticle50 petition data
Date Value
2019-03-20 21:19 122306
2019-03-20 21:22 124525
2019-03-20 21:26 127012
2019-03-20 21:32 130412
2019-03-20 21:34 131431
2019-03-20 21:36 133435
2019-03-20 21:38 135150
2019-03-20 21:40 137503
2019-03-20 21:42 140531
@wmoreland
wmoreland / matchcolors.py
Last active August 22, 2019 11:27 — forked from astanin/matchcolors.py
Match colors of the second image to the colors of the first image.
"""Usage: python matchcolors.py good.jpg bad.jpg save-corrected-as.jpg"""
from scipy.misc import imread, imsave
from scipy import mean, interp, ravel, array
import sys
def mkcurve(chan1,chan2):
"Calculate channel curve by averaging target values."
fst = lambda p: p[0]
snd = lambda p: p[1]