- https://gist.github.com/HonzaKral/35451c6322a78d4de8f5 to load stack overflow data. Clone into load_stack subdirectory within this repo.
- Programmers StackExchange dump from
This script will load any stackoverflow site from the XML dump (retrievable at https://archive.org/details/stackexchange via torrent) into Elasticsearch.
To use just call:
python load_stack.py PATH
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
#!/bin/bash | |
curl -O https://raw.github.com/pypa/virtualenv/master/virtualenv.py | |
python virtualenv.py testing_in_python | |
. testing_in_python/bin/activate | |
pip install django mock | |
python testable_templatetag.py |
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
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: hookbox | |
# Required-Start: | |
# Required-Stop: | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 1 | |
# Short-Description: hookbox server | |
### END INIT INFO |
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
#!/bin/bash | |
set -e | |
## | |
# Script for paralel execution of django's test suite. | |
# | |
# Usage: place it in the same directory as your django checkout (not inside) | |
# and run it | |
# | |
# Params: you can optionally supply number of processes to spawn |
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 PageParserAndThumbnailer(object): | |
def __init__(self, url, http_response): | |
self.url = url | |
self.headers, self.body = self.parse(http_response) | |
@property | |
def thumbnail(self): | |
"create expensive thumbnail" | |
def parse(self, http_response): |
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
''' | |
VERY HACKY, DO NOT USE OR DO NOT COMPLAIN. | |
It was written to deal with forms.fields tests and those tests only. | |
''' | |
f = open('forms.py', 'r') | |
out = open('out.py', 'w') | |
res_words = ['def', 'from', 'try', 'import'] | |
NewerOlder