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 | |
# name this .git/hooks/pre-commit | |
# chmod +x .git/hooks/pre-commit | |
# enjoy | |
# so it will work on empty repos | |
if git-rev-parse --verify HEAD >/dev/null 2>&1; then | |
against=HEAD | |
else | |
against=4b825dc642cb6eb9a060e54bf8d69288fbee4904 |
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
# Jack Diederich wrote the advance function | |
# original code from http://pyvideo.org/video/880/stop-writing-classes | |
import collections | |
import curses | |
import gettext | |
import random | |
import signal | |
import sys | |
import time |
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 heapq import heapify, heappop | |
from binascii import a2b_hex | |
from collections import defaultdict | |
from struct import unpack | |
from sys import argv, exit | |
def parse_byte(bstring): | |
return unpack('>B', a2b_hex(bstring))[0] | |
def dijkstra(graph, source): |
NewerOlder