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 re | |
import tulip | |
import tulipiostream | |
loop = tulip.get_event_loop() | |
LENGTH_PATTERN = re.compile(b'Content-Length: (\d*)\\r\\n') |
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 sys | |
from sqlalchemy import create_engine, event | |
from sqlalchemy.orm import sessionmaker | |
import model | |
if sys.version_info >= (2, 7): | |
import unittest as unittest2 |
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
DEBUG:tulip:Using selector: SelectSelector | |
DEBUG:tulip:poll0.000 took 0.000 seconds | |
DEBUG:tulip:poll0.010 took 0.016 seconds | |
DEBUG:tulip:poll0.000 took 0.000 seconds | |
DEBUG:tulip:poll0.010 took 0.015 seconds | |
DEBUG:tulip:poll0.000 took 0.000 seconds | |
DEBUG:tulip:poll0.010 took 0.000 seconds | |
DEBUG:tulip:poll0.010 took 0.016 seconds | |
DEBUG:tulip:poll0.000 took 0.000 seconds | |
DEBUG:tulip:poll0.010 took 0.015 seconds |
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 sqlalchemy import create_engine, event, Column, Integer | |
from sqlalchemy.orm import sessionmaker | |
from sqlalchemy.ext.declarative import declarative_base | |
from sqlalchemy.sql import func, select | |
Base = declarative_base() | |
class Job(Base): | |
__tablename__ = 'job' |
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 webbrowser | |
from dropbox import client | |
APP_KEY = '' | |
APP_SECRET = '' | |
def authorize(): |
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 errno | |
import multiprocessing | |
import socket | |
import time | |
import ctypes | |
from ctypes import windll | |
from ctypes import POINTER, WINFUNCTYPE, c_char_p, c_char, c_int, c_ushort | |
from ctypes.wintypes import DWORD, UINT, INT, ULONG |
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 ctypes import WINFUNCTYPE, windll | |
from ctypes.wintypes import BOOL, DWORD | |
import zmq | |
kernel32 = windll.LoadLibrary('kernel32') | |
PHANDLER_ROUTINE = WINFUNCTYPE(BOOL, DWORD) | |
SetConsoleCtrlHandler = kernel32.SetConsoleCtrlHandler |
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 httplib | |
import urllib2 | |
import ssl | |
import certifi | |
from backports.ssl_match_hostname import match_hostname | |
class CertValidatingHTTPSConnection(httplib.HTTPConnection): | |
default_port = httplib.HTTPS_PORT |
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
""" | |
remconsole.py | |
A Python console you can embed in a program and attach to remotely. | |
To spawn a Python console in a script do the following in any scope | |
of any module: | |
import remconsole | |
remconsole.spawn_server() |
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
System | |
====== | |
Windows 7 | |
Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)] | |
Small data | |
========== |