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 | |
# -*- coding: utf-8 -*- | |
import os | |
import csv | |
import tempfile | |
import time | |
import logging | |
import optparse | |
import itertools |
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
// based on the implementation found at: | |
// https://stackoverflow.com/questions/10727174/damerau-levenshtein-distance-edit-distance-with-transposition-c-implementation | |
// | |
// still deciphering the alogrithm from the cryptic vairable names, hopefully thie implementation below | |
// is easier to read and understand. | |
#include <assert.h> | |
#include <stdlib.h> | |
#include <string.h> |
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
#!/bin/sh | |
# usage ./create-psql-database DATABASE | |
# | |
DB_NAME=$1 | |
FOLDER_NAME="nhgis0004" | |
# Drop and recreate database | |
dropdb --interactive "${DB_NAME}" | |
createdb --encoding UTF8 $DB_NAME |