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 TestBasecamp(Basecamp): | |
"""Subclass of Basecamp which records network transactions. | |
Transactions are serialized to JSON on disk and used in lieu | |
of network usage on second and subsequent requests. | |
Basecamp class found here: http://pypi.python.org/pypi/BasecampWrapper/0.1 | |
""" | |
def __init__(self, baseURL, username, password): | |
self.__test_responses = { 'GET': {}, 'POST': {} } | |
super(TestBasecamp, self).__init__(baseURL, username, password) | |
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
""" | |
Copyright (c) 2008-2009, Nathan Borror | |
All rights reserved. | |
Redistribution and use in source and binary forms, with or without modification, | |
are permitted provided that the following conditions are met: | |
Redistributions of source code must retain the above copyright notice, this list | |
of conditions and the following disclaimer. | |
Redistributions in binary form must reproduce the above copyright notice, this |
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 yourapp.settings.common import * | |
ROOT_URLCONF = 'yourapp.settings.test.urls' | |
DATABASE_ENGINE = 'sqlite3' | |
DATABASE_NAME = ':memory:' | |
INSTALLED_APPS += ('django_nose', ) | |
TEST_RUNNER = 'django_nose.run_tests' |
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
coverage==3.2b3 | |
nose | |
git+git://github.com/cmheisel/nose-xcover.git#egg=nosexcover | |
git+git://github.com/jbalogh/django-nose.git#egg=django-nose | |
pylint |
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
cd $WORKSPACE | |
virtualenv -q ve | |
source ./ve/bin/activate | |
pip install -q -E ./ve -r requirements.pip | |
pip install -q -E ./ve -r requirements-test.pip | |
python setup.py --quiet develop | |
django-admin.py test --settings=yourapp.settings.test --with-coverage --cover-package=yourapp --with-xunit --with-xcoverage |
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 json, urllib, os, textwrap | |
user = 'natbat' | |
url = "http://twitter.com/statuses/user_timeline/%s.json" | |
pipe = os.popen("cowthink -n", 'w') | |
pipe.write('\n'.join(textwrap.wrap( | |
json.load(urllib.urlopen(url % user))[0]['text']) | |
)) |
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
.DS_Store | |
lib | |
bin | |
include | |
.Python | |
*.pyc | |
.coverage | |
man | |
pip-log.txt | |
src |
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
# This is the one stop prank script for unattended Unix-like workstations. | |
# Use it with the simple one-liner: | |
# curl -L j.mp/__lys | bash | |
linux_specific(){ | |
true | |
} | |
mac_specific(){ | |
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
function parse_git_dirty { | |
git diff --quiet HEAD &>/dev/null | |
[[ $? == 1 ]] && echo "⚡" | |
} | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/" | |
} | |
function proml { |
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
brew install git | |
brew update | |
brew install readline | |
brew link readline | |
brew install python | |
brew install postgres | |
brew install postgis | |
brew install gdal | |
brew install geos | |
brew install git |
OlderNewer