Skip to content

Instantly share code, notes, and snippets.

View drussellmrichie's full-sized avatar

Russell Richie drussellmrichie

View GitHub Profile
@hsharrison
hsharrison / gradeEmailer.py
Last active October 4, 2016 23:32 — forked from drussellmrichie/gradeEmailer.py
Script to extract HW grades from a table, and send separate emails to students with their grades. Potentially useful for a TA of large classes.
"""Usage:
gradeEmailer.py [--name=NAME] [--password=PASSWORD] [--dry-run] <sender-email> <grades-path>
Options:
--name=NAME The name of the grader.
Used in the signature and From field of the email.
If not given, <sender-email> will be used.
--password=PASSWORD The password to the sender's email account.
If not given, it will be prompted for.
--dry-run To test, send emails to yourself instead of to the students.
@larsmans
larsmans / hellinger.py
Created July 15, 2012 13:25
Hellinger distance for discrete probability distributions in Python
"""
Three ways of computing the Hellinger distance between two discrete
probability distributions using NumPy and SciPy.
"""
import numpy as np
from scipy.linalg import norm
from scipy.spatial.distance import euclidean