Skip to content

Instantly share code, notes, and snippets.

Avatar

Hugo Heyman HeyHugo

  • Uppsala
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am heyhugo on github.
  • I am heyhugo (https://keybase.io/heyhugo) on keybase.
  • I have a public key ASABmGVjYDQH23AqvdGPrOaWjxjZxj832sDTWtdB2SX8CAo

To claim this, I am signing this object:

@HeyHugo
HeyHugo / celery_extension.py
Created Nov 16, 2016
Celery extension for flask
View celery_extension.py
import flask
from celery import Celery
class FlaskCelery(Celery):
def __init__(self, *args, **kwargs):
self.app = None
super(FlaskCelery, self).__init__(*args, **kwargs)
self.patch_task()
View G - Test in Python.py
import numpy as np
from scipy.stats import chisqprob, chisquare
def gtest(f_obs, f_exp=None, ddof=0):
"""
http://en.wikipedia.org/wiki/G-test
The G test can test for goodness of fit to a distribution
Parameters