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
# %(mysite)s - run %(mysite)s instances (default is the main production instance) | |
# | |
# This runs gunicorn-django for %(mysite)s; to install: | |
# * sudo ln -s <this file> /etc/init/%(mysite)s | |
# * sudo initctl reload-configuration | |
# | |
# it expects the following directory layout: | |
# | |
# /home/%(mysite)s/public_html | |
# \-env -> virtualenv |
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 gevent | |
from gevent import socket, queue | |
from gevent.ssl import wrap_socket | |
import logging | |
logger = logging.getLogger('irc') | |
logger.setLevel(logging.DEBUG) | |
ch = logging.StreamHandler() |
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(ks, vs, rr) { | |
// values are discarded by reduce | |
// todo: configurable key function, for complex queries | |
var fk, lk; | |
function uniqCount(keys) { | |
var count = 0, obj = {}; | |
for (var i=0; i < keys.length; i++) { | |
if (!obj[keys[i]]) { | |
count++; | |
obj[keys[i]] = 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
# Based on http://blogs.fluidinfo.com/terry/2009/06/24/python-code-for-retrieving-all-your-tweets/ | |
# Patched to retry upon failure until *all* tweets are downloaded. | |
import sys, twitter, operator | |
from dateutil.parser import parse | |
import time | |
twitterURL = 'http://twitter.com' | |
def fetch(user): | |
data = {} | |
api = twitter.Api() |
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
The venerable master Qc Na was walking with his student, Anton. Hoping to | |
prompt the master into a discussion, Anton said "Master, I have heard that | |
objects are a very good thing - is this true?" Qc Na looked pityingly at | |
his student and replied, "Foolish pupil - objects are merely a poor man's | |
closures." | |
Chastised, Anton took his leave from his master and returned to his cell, | |
intent on studying closures. He carefully read the entire "Lambda: The | |
Ultimate..." series of papers and its cousins, and implemented a small | |
Scheme interpreter with a closure-based object system. He learned much, and |
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 | |
"""Store messages in a Maildir into a couchdb database.""" | |
import couchdb | |
from mailbox import Maildir | |
from optparse import OptionParser | |
import os | |
from pprint import pprint | |
import sys | |
from uuid import uuid4 |
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
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 Jed Schmidt <http://jed.is> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
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
#include <stdlib.h> | |
#include <stdio.h> | |
#include <math.h> | |
const double qpsk[] = {-1.0, 1.0}; | |
const double qam16[] = {-3.0, -1.0, 3.0, 1.0}; | |
const double qam64[] = {-7.0, -5.0, -1.0, -3.0, 7.0, 5.0, 1.0, 3.0}; | |
/* Generic function for converting short integers to bit string | |
* representation. |
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
0-mail.com | |
0815.ru | |
0clickemail.com | |
0wnd.net | |
0wnd.org | |
10minutemail.com | |
20minutemail.com | |
2prong.com | |
30minutemail.com | |
3d-painting.com |
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
#!/opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/python | |
import urllib,json | |
import argparse | |
parser = argparse.ArgumentParser() | |
parser.add_argument( 'subreddit', nargs=1,help="Subreddit to browse, f.e. programming") | |
args= parser.parse_args() | |
subreddit = args.subreddit[0] | |
a = urllib.urlopen('http://www.reddit.com/r/'+str(subreddit)+'/.json') | |
try: |
OlderNewer