Skip to content

Instantly share code, notes, and snippets.

👨‍🌾
Bountiful harvests on the code farm

Chris Kuhl ckuhl

👨‍🌾
Bountiful harvests on the code farm
Block or report user

Report or block ckuhl

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ckuhl
ckuhl / import_db.py
Created Jun 15, 2018
Loading python code into, and then running it from, a sqlite database
View import_db.py
import sqlite3
import sys
import imp
from peewee import SqliteDatabase, Model, TextField
db = SqliteDatabase('code.sqlite3')
class Module(Model):
@ckuhl
ckuhl / punchcard.py
Last active Jan 31, 2018
Generate an ASCII punchcard from a series of timestamps
View punchcard.py
#!/usr/bin/env python3
'''
punchcard - generate a punchcard from a series of timestamps
Example:
$ git --no-pager log | punchcard
╔═════╦════════════════════════════════════════════════════════════════════════╗
║ Sun ║ ║
║ Mon ║ o . ║
║ Tue ║ . . .║
You can’t perform that action at this time.