This file contains hidden or 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
# uwsgi completion | |
_uwsgi_help() { | |
reply=(`uwsgi --help|tail -n +2|awk '{print $1}'|awk -F '|' '{print $1; if ($2) {print $2}}'`) | |
} | |
compctl -K _uwsgi_help -f uwsgi |
This file contains hidden or 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
$ python setup.py build_ext --inplace | |
running build_ext | |
Traceback (most recent call last): | |
File "app_main.py", line 53, in run_toplevel | |
File "setup.py", line 486, in <module> | |
version=VERSION, | |
File "/usr/local/Cellar/pypy/1.5.0/lib-python/modified-2.7/distutils/core.py", line 152, in setup | |
dist.run_commands() | |
File "/usr/local/Cellar/pypy/1.5.0/lib-python/modified-2.7/distutils/dist.py", line 953, in run_commands | |
self.run_command(cmd) |
This file contains hidden or 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
$.easydate.locales.it = { | |
"future_format": "%s %t", | |
"past_format": "%t %s", | |
"second": "secondo", | |
"seconds": "secondi", | |
"minute": "minuto", | |
"minutes": "minuti", | |
"hour": "ora", | |
"hours": "ore", | |
"day": "giorno", |
This file contains hidden or 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 fabric.api import * | |
class RunAggregator(object): | |
def __init__(self): | |
self.commands = [] | |
def __enter__(self): | |
return self.commands.append | |
def __exit__(self, exc_type, exc_value, traceback): | |
run(' && '.join(self.commands)) |
This file contains hidden or 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 gevent import monkey | |
monkey.patch_all() | |
from gevent.pool import Group | |
from urllib import urlopen | |
l = ["http://www.google.com",]*20 | |
def get(url): | |
content = urlopen(url).read() |
This file contains hidden or 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
$ jython | |
Jython 2.5.1 (Release_2_5_1:6813, Sep 26 2009, 13:47:54) | |
[Java HotSpot(TM) 64-Bit Server VM (Apple Inc.)] on java1.6.0_22 | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> from redis import Redis | |
>>> c = Redis() | |
>>> c.get('a') | |
Traceback (most recent call last): | |
File "<stdin>", line 1, in <module> | |
File "/Users/vad/Source/Envs/jython/Lib/site-packages/redis/client.py", line 587, in get |
This file contains hidden or 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
Creating test database 'default'... | |
Processing auth.Permission model | |
Creating table auth_permission | |
Processing auth.Group_permissions model | |
Creating table auth_group_permissions | |
Processing auth.Group model | |
Creating table auth_group | |
Processing auth.User_user_permissions model | |
Creating table auth_user_user_permissions | |
Processing auth.User_groups model |
This file contains hidden or 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 http://code.google.com/p/soxred93tools/source/browse/trunk/web/rfap/rfalib3.php | |
/* | |
RfA Analysis Library 2.05 | |
This version breaks compatibility with the 1.x series | |
Copyright (C) 2006 Tangotango (tangotango.wp _at_ gmail _dot_ com) | |
This program is free software; you can redistribute it and/or | |
modify it under the terms of the GNU General Public License | |
as published by the Free Software Foundation; either version 2 | |
of the License, or (at your option) any later version. |
This file contains hidden or 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 | |
# find the path of this script | |
ABSPATH="$(cd "${0%/*}" 2>/dev/null; echo "$PWD"/"${0##*/}")" | |
SCRIPT_PATH=`dirname "$ABSPATH" | |
export DEST_DIR=/hardmnt/bowie0/sra/sonet/backup/ | |
export AUTH_FILE=....... | |
source $SCRIPT_PATH/backup-lib.sh |
This file contains hidden or 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 AnalyseTask(Task): | |
def run(self, lang, date): | |
from subprocess import * | |
import os | |
logger = self.get_logger() | |
logger.info("Running: %s-%s" % (lang, date)) | |
p = Popen("/sra0/sra/setti/Source/wiki-network/analysis.py --as-table --group --reciprocity --density $HHOME/datasets/wikipedia/%swiki-%s_rich.pickle" % (lang, date), | |
shell=True, stderr=PIPE) |