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 hashlib import sha1 | |
from itertools import islice, imap | |
from operator import xor, eq | |
DROP_N = 1536 | |
# drop 1536 bytes is adviced in RFC 4345 | |
# http://tools.ietf.org/html/rfc4345 | |
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
import glob | |
import os | |
import re | |
MAIN_PATTERN = re.compile(r'\\begin{document}') | |
def is_main(tex_file): | |
with open(tex_file) as fobj: | |
for line in fobj: |
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
import socket | |
import struct | |
import sys | |
from httplib import HTTPResponse | |
from BaseHTTPServer import BaseHTTPRequestHandler | |
from StringIO import StringIO | |
import gtk | |
import gobject |
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
import os | |
import sys | |
import traceback | |
from functools import wraps | |
from multiprocessing import Process, Queue | |
def processify(func): | |
'''Decorator to run a function as a process. | |
Be sure that every argument and the return value |
NewerOlder