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
# -*- coding: utf-8 -*- | |
GRID = { | |
1: 1, | |
2: 2, | |
3: 3, | |
4: 4, | |
5: 5, | |
6: 6, | |
7: 7, |
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 | |
import httplib | |
import StringIO | |
import hashlib | |
import uuid | |
import random | |
import string | |
import sys | |
import os | |
import subprocess |
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 fabric.api import task, local, sudo, run, prefix, env, cd | |
from fabric.contrib.files import exists, first | |
from contextlib import contextmanager, nested | |
def once(s): | |
"""Command_prefixes is a list of prefixes""" | |
if s not in env.command_prefixes: | |
return s | |
return 'true' |
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 | |
import unittest | |
from union_find import UnionFind | |
class TestUnionFind(unittest.TestCase): | |
def test_init(self): | |
u = UnionFind(5) | |
self.assertEquals([0, 1, 2, 3, 4], u.id) |
NewerOlder