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/python | |
import re | |
import signal | |
import sys | |
import time | |
from requests.exceptions import ConnectionError | |
from kol.Session import Session |
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/python3 | |
import sys | |
DICT = '/usr/share/dict/words' | |
def subs(s): | |
for i in range(len(s)): | |
for s2 in subs(s[i + 1:]): | |
yield s[i] + s2 |
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 python3 | |
# coding=utf8 | |
import heapq | |
class Node(object): | |
def __init__(self, path, state, h, g): | |
self.path = path | |
self.state = state |
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 | |
# Initial permutation | |
IP = ( | |
58, 50, 42, 34, 26, 18, 10, 2, | |
60, 52, 44, 36, 28, 20, 12, 4, | |
62, 54, 46, 38, 30, 22, 14, 6, | |
64, 56, 48, 40, 32, 24, 16, 8, | |
57, 49, 41, 33, 25, 17, 9, 1, | |
59, 51, 43, 35, 27, 19, 11, 3, |
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 bz2 | |
import datetime | |
import os | |
import sys | |
import time | |
import urllib2 | |
import warnings |
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/python | |
import argparse | |
import hashlib | |
import itertools | |
import struct | |
import sys | |
import zlib | |
from PIL import Image |
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/python2.5 | |
# coding=utf8 | |
""" | |
Copyright © 2010 Codan Working Group | |
Permission is hereby granted, free of charge, to any person obtaining a | |
copy of this software and associated documentation files (the "Software"), | |
to deal in the Software without restriction, including without limitation | |
the rights to use, copy, modify, merge, publish, distribute, sublicense, |
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/python | |
import argparse | |
import cgi | |
import math | |
import os | |
import sys | |
from PIL import Image | |
import pybloomfilter # https://github.com/axiak/pybloomfiltermmap |
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
MW = `MagickWand-config --cflags --ldflags --libs` | |
WARNS = -Wall -Wextra -pedantic -std=c99 | |
.PHONY: all | |
all: imgcat | |
imgcat: imgcat.c | |
$(CC) -o $@ $(MW) $(WARNS) $(CFLAGS) $^ | |
.PHONY: clean |
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
MW = `MagickWand-config --cflags --ldflags --libs` | |
WARNS = -Wall -Wextra -pedantic -std=c99 | |
.PHONY: all | |
all: imgcat | |
imgcat: imgcat.c | |
$(CC) -o $@ $(MW) $(WARNS) $(CFLAGS) $^ | |
.PHONY: clean |
NewerOlder