Skip to content

Instantly share code, notes, and snippets.

@markhamilton
markhamilton / compilejournal.py
Last active December 16, 2015 17:19
Compiles a directory tree of single file journal entries in this structure: ./2013/04/23 ./2013/04/24 ./2013/04/26 ... etc.
#!/usr/bin/python
import glob
# uncomment for FTP support -- requires ftplib
#from ftplib import FTP
output = open("index.html", "w")
html_escape_table = {
@markhamilton
markhamilton / assert.py
Last active December 20, 2015 18:59
Make assertions between two ConceptNet concepts using python at the command line.
#!/bin/env python
"""
Usage:
chmod +x assert.py
./assert.py <concept1> <concept2>
You will need to tweak the parameters indices if you are in Windows.
Original code by MIT, modifications by Mark Hamilton.