Skip to content

Instantly share code, notes, and snippets.

View acoster's full-sized avatar

Alex Coster acoster

View GitHub Profile
@acoster
acoster / totp.py
Created November 20, 2012 22:45
TOTP module for Python.
#!/usr/bin/env python
"""Implementation of RFC 4226: HMAC-Based One-Time Password Algorithm (HTOP),
and RFC 6238: Time-Based One-Time Password Algorithm (TOTP).
"""
__author__ = 'acoster'
__copyright__ = 'Copyright 2012, Alexandre Coster'
import hmac
@acoster
acoster / solver.py
Created July 13, 2012 21:54
Crappy python solver for a Set game (e.g., http://www.nytimes.com/ref/crosswords/setpuzzle.html/ )
class Colour:
red = 'r'
green = 'g'
purple = 'p'
class Style:
solid = 'sl'
striped = 'st'
open = 'o'