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/env python | |
# | |
# Import posts from Posterous backup to Blogger account. | |
# | |
# Requirements | |
# ============ | |
# | |
# * `Python <http://www.python.org/>` 2.6 or 2.7 | |
# * `GData <http://pypi.python.org/pypi/gdata>`_ 2.0.17 or higher | |
# |
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/env python | |
import copy | |
import sys | |
import time | |
from argparse import ArgumentParser | |
from random import choice | |
from string import digits, letters |
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/env python | |
# | |
# Rates calculator. | |
# | |
# Requirements | |
# ============ | |
# | |
# * `Python <http://www.python.org/>`_ 2.7 | |
# | |
# Installation |
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
$ DRIVER=couchbase THREADS=10 make benchmark | |
env/bin/python ./benchmark.py | |
324 operations completed in 2.1607 s | |
2256 operations completed in 10.7558 s | |
1068 operations completed in 5.7570 s | |
2037 operations completed in 9.5393 s | |
2493 operations completed in 11.0871 s | |
2910 operations completed in 12.1000 s | |
2961 operations completed in 12.1318 s | |
2193 operations completed in 10.3703 s |
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 flask import Flask | |
from flask.ext.sqlalchemy import SQLAlchemy | |
class App(Flask): | |
""" | |
Custom ``Flask`` class. | |
""" | |
def register_blueprint(self, mixed, **kwargs): | |
""" |
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/env python | |
# | |
# Run X processes in background and wait before each of this processes will | |
# end. | |
# | |
import sys | |
import time | |
from argparse import ArgumentParser |
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/env python | |
# | |
# Redirect outputs from pbs command result to file. | |
# | |
import os | |
import pbs | |
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
Checking env_base virtual environment... | |
ordereddict exists | |
minimock exists | |
0.9 | |
Checking env_child virtual environment... | |
ordereddict exists | |
minimock exists | |
0.8 |
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 | |
# | |
# Simple script to archive git repository. | |
# | |
branch=HEAD | |
dest=`echo ~/Projects` | |
format=zip | |
prefix=`basename $(pwd)` |
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 logging | |
import os | |
DEBUG = False | |
TESTING = 'TESTING' in os.environ or 'nosetests' in os.environ.get('_', '') | |
try: | |
from settings_local import * |