This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# wagnerfischer.py: Dynamic programming Levensthein distance function | |
# Kyle Gorman <gormanky@ohsu.edu> | |
# | |
# Based on: | |
# | |
# Robert A. Wagner and Michael J. Fischer (1974). The string-to-string | |
# correction problem. Journal of the ACM 21(1):168-173. | |
# | |
# The thresholding function was inspired by BSD-licensed code from |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import datetime | |
import csv | |
import sys | |
START_DATE = 'start_date' | |
END_DATE = 'end_date' | |
TOLERANCE = 31 # days | |
PRIMARY_KEYS = ['frame_id', 'person_id'] | |
def mold_date(any_date): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
A really stupid python template language inspired by coffeekup, markaby. | |
Do not use this code, it will ruin your day. A byproduct of insomnia. | |
TL;DR | |
----- | |
This module defines a template language that allows us to do: | |
d = Doc() |