This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# py2exe setup program | |
from distutils.core import setup | |
import py2exe | |
import sys | |
import os | |
import glob, shutil | |
sys.argv.append("py2exe") | |
VERSION = '1.0' | |
AUTHOR_NAME = 'Your Name' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" https://github.com/blei-lab/edward/blob/master/examples/bayesian_logistic_regression.py | |
Bayesian logistic regression using Hamiltonian Monte Carlo. | |
We visualize the fit. | |
""" | |
from __future__ import absolute_import | |
from __future__ import division | |
from __future__ import print_function | |
import edward as ed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class HistoryHelperMixin(object): | |
""" Adds a version property to models implementing django-simple-history | |
https://github.com/treyhunner/django-simple-history | |
""" | |
@property | |
def version(self): | |
return self.__class__._get_history_id(self.id) | |
@classmethod | |
def _get_history_id(cls, id): |