Skip to content

Instantly share code, notes, and snippets.

View timster's full-sized avatar

Tim Shaffer timster

  • Recharge Payments
  • Chattanooga, TN
View GitHub Profile
@methane
methane / mylite.py
Created June 22, 2012 12:27
Copy table from mysql to sqlite
#! /usr/bin/python
# coding: utf-8
"""Copy table from mysql to sqlite.
Require:
* SQLAlchemy
* MySQLdb or PyMySQL
Usage:
@kohlmeier
kohlmeier / ka_bnet_numpy.py
Created March 26, 2012 21:59
Bayes net example in Python with Khan Academy data
#!/usr/bin/env python
from numpy import asmatrix, asarray, ones, zeros, mean, sum, arange, prod, dot, loadtxt
from numpy.random import random, randint
import pickle
MISSING_VALUE = -1 # a constant I will use to denote missing integer values
def impute_hidden_node(E, I, theta, sample_hidden):