setup.py
yakuza:src kw$ cat testapp/setup.py
#!/usr/bin/env python
from distutils.core import setup
#!/usr/bin/env python | |
import sys, time, select, signal | |
try: window = int(sys.argv[1]) | |
except: print 'usage: %s <window>' % sys.argv[0]; sys.exit(1) | |
a_time, b_time = long( time.time() ), 0 | |
count = 0 | |
def ctrlc(signum, frame): sys.exit(0) |
#!/usr/bin/env python | |
from collections import deque | |
class TaskGraph(object): | |
''' simple acyclic, directed property graph with iteration | |
use case: | |
1) model nodes as dicts and dependencies as directed edges (name=occ -> name=twist) | |
2) start with all nodes colored down (_st=0) |
PYTHON := python2.6 | |
BUILD_DIR := buildtmp | |
AURORA_CLUSTER := test | |
AURORA_ROLE := $(shell whoami) | |
UWSGI_VER = 2.0.4 | |
UWSGI_DIR = uwsgi-$(UWSGI_VER) | |
UWSGI_FILE = $(UWSGI_DIR).tar.gz | |
UWSGI_URL = http://projects.unbit.it/downloads/$(UWSGI_FILE) |
## configs | |
config defaultToCurrentScreen true | |
config nudgePercentOf screenSize | |
config resizePercentOf screenSize | |
config checkDefaultsOnLoad true | |
config focusCheckWidthMax 3000 | |
config windowHintsShowIcons true | |
config windowHintsIgnoreHiddenWindows false | |
config windowHintsSpread true |
import atexit, yappi | |
def init_yappi(): | |
print('[YAPPI START]') | |
yappi.set_clock_type('wall') | |
yappi.start() | |
@atexit.register | |
def finish_yappi(): | |
print('[YAPPI STOP]') |
pex is a library for generating .pex (Python EXecutable) files which are
executable Python environments in the spirit of virtualenvs.
pex is an expansion upon the ideas outlined in
PEP 441
and makes the deployment of Python applications as simple as cp
. pex files may even
cold `./pants list ::` | |
pre gc, post-execution object count deltas | |
------------------------------------------ | |
tuple 10409897 +10400188 | |
set 7851229 +7845649 | |
list 5010959 +4998632 | |
StepRequest 3989446 +3989446 | |
Entry 2572224 +2572224 | |
dict 2305074 +2290623 |
#!/usr/bin/env python2.7 | |
import itertools | |
def datatype(type_name, params): | |
"""A faster/more efficient namedtuple replacement with better subclassing properties. | |
>>> RustLibrary = datatype('RustLibrary', ['sources', 'dependencies']) | |
>>> rl = RustLibrary([1,2,3], [4,5,6]) |
#!/usr/bin/env python2.7 | |
import ast | |
import itertools | |
import fnmatch | |
import os | |
import sys | |
class DocstringScanner(object): |