Skip to content

Instantly share code, notes, and snippets.

@ckuhl
ckuhl / punchcard.py
Last active January 31, 2018 03:07
Generate an ASCII punchcard from a series of timestamps
#!/usr/bin/env python3
'''
punchcard - generate a punchcard from a series of timestamps
Example:
$ git --no-pager log | punchcard
╔═════╦════════════════════════════════════════════════════════════════════════╗
Sun ║ ║
Mono . ║
Tue ║ . . .║
@ckuhl
ckuhl / import_db.py
Created June 15, 2018 14:21
Loading python code into, and then running it from, a sqlite database
import sqlite3
import sys
import imp
from peewee import SqliteDatabase, Model, TextField
db = SqliteDatabase('code.sqlite3')
class Module(Model):