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 multiprocessing import Pool as MPool | |
| from time import sleep | |
| import datetime | |
| import multiprocessing | |
| import random | |
| def time_request(): | |
| from gevent import monkey; monkey.patch_socket | |
| from jsonrequester import JsonRequester |
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
| #!/usr/bin/python | |
| ''' Not my script, found on the Internet, and rediscovered on my hard drive | |
| ''' | |
| import sys | |
| def cidr_to_regex(cidr): | |
| ip, prefix = cidr.split('/') | |
| base = 0 | |
| for val in map(int, ip.split('.')): |
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
| import errno | |
| import socket | |
| from threading import Thread | |
| from tornado import ioloop | |
| class IOLoopThread(Thread): | |
| def __init__(self): | |
| Thread.__init__(self) | |
| self.running = True |