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 | |
from __future__ import print_function | |
import json | |
from pip.operations.freeze import freeze | |
import urllib | |
URL_TEMPLATE = "https://pypi.python.org/pypi/{pkg}/{version}/json" |
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 urllib | |
import json | |
def geocode(address): | |
return json.loads(urllib.urlopen( | |
"http://maps.googleapis.com/maps/api/geocode/json?address=%s" % ( | |
urllib.quote(address.encode('utf-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
#!/usr/bin/env python | |
import rabbitpy | |
import time | |
MSG_COUNT = 100 | |
conn = rabbitpy.Connection('amqp://guest:guest@localhost/%2F?locale=en_US.UTF-8') | |
chan = conn.channel() |
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
# Example of multiple threads sharing an AMQP connection | |
import time | |
import threading | |
import random | |
import argparse | |
import rabbitpy | |
INSULTS = [ | |
'imbecile', |