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
all: py25dj13 py25dj14 py26dj13 py26dj14 py26djtrunk py27dj13 py27dj14 py27djtrunk | |
py25dj13: PYTHON=2.5 | |
py25dj13: DJANGO=1.3 | |
py25dj13: ENV_LOCATION = env-$(PYTHON)-$(DJANGO) | |
py25dj13: | |
virtualenv-$(PYTHON) $(ENV_LOCATION) | |
$(ENV_LOCATION)/bin/pip install -r test_requirements/django-$(DJANGO).txt | |
$(ENV_LOCATION)/bin/python runtests.py $(TFLAGS) |
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 random import choice | |
import sys | |
SYLLABLES = [ | |
'a', 'e', 'i', 'o', 'u', | |
'ka', 'ke', 'ki', 'ko', 'ku', | |
'ga', 'ge', 'gi', 'go', 'gu', | |
'sa', 'se', 'shi', 'so', 'su', | |
'ja', 'je' ,'ji', 'jo', 'ju', | |
'za', 'ze', 'chi', 'zo', 'zu', |
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 -*- | |
import re | |
import distutils.sysconfig as sysconfig | |
import os | |
__doc__ = '''set-me-up. | |
Usage: | |
set-me-up <projectdir> | |
''' |
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 -*- | |
from twisted.internet import reactor, ssl | |
from twisted.internet.protocol import ClientFactory | |
from twisted.words.protocols.irc import IRCClient | |
import random, string | |
ATTACK, STANDBY = 0,1 | |
QUIT_CHANCE = 10#% | |
JOIN_CHANCE = 80#% |
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
class MyTag(Tag): | |
options = Options( | |
Argument('color'), | |
'with', | |
'opacity', | |
Argument('opacity', required=False, default=1), | |
) |
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
pipe = pegasus.run('manage.py syncdb --noinput', stdout=sys.stdout, stderr=sys.stderr) | |
pipe.communicate() | |
if pipe.return_code != 0: | |
raise Exception() | |
else: | |
print 'yippie' |
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
#TODO: write! |
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
# modified version of http://tomforb.es/using-python-metaclasses-to-make-awesome-django-model-field-choices | |
# that preserves order of definition | |
import itertools | |
class Option(object): | |
_counter = itertools.count() | |
def __init__(self, value, verbose_name=None): | |
self._count = Option._counter.next() | |
self.value = value |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>QUnit Example</title> | |
<link rel="stylesheet" href="/qunit.css"> | |
</head> | |
<body> | |
<div id="qunit"></div> | |
<script src="/qunit.js"></script> |