<s> """<STR_LIT>""" <EOL> import sys <EOL> try : <EOL> import threading <EOL> except ImportError : <EOL> import dummy_threading as threading <EOL> py33 = sys . version_info >= ( <NUM_LIT:3> , <NUM_LIT:3> ) <EOL> py32 = sys . version_info >= ( <NUM_LIT:3> , <NUM_LIT:2> ) <EOL> py3k = sys . version_info >= ( <NUM_LIT:3> , <NUM_LIT:0> ) <EOL> py2k = sys . version_info < ( <NUM_LIT:3> , <NUM_LIT:0> ) <EOL> py265 = sys . version_info >= ( <NUM_LIT:2> , <NUM_LIT:6> , <NUM_LIT:5> ) <EOL> jython = sys . platform . startswith ( '<STR_LIT>' ) <EOL> pypy = hasattr ( sys , '<STR_LIT>' ) <EOL> win32 = sys . platform . startswith ( '<STR_LIT>' ) <EOL> cpython = not pypy and not jython <EOL> import collections <EOL> next = next <EOL> if py3k : <EOL> import pickle <EOL> else : <EOL> try : <EOL> import cPickle as pickle <EOL> except ImportError : <EOL> import pickle <EOL> if py265 : <EOL> safe_kwarg = lambda arg : arg <EOL> else : <EOL> safe_kwarg = str <EOL> ArgSpec = collections . namedtuple ( "<STR_LIT>" , <EOL> [ "<STR_LIT:args>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ] ) <EOL> if py3k : <EOL> import builtins <EOL> from inspect import getfullargspec as inspect_getfullargspec <EOL> from urllib . parse import ( quote_plus , unquote_plus , <EOL> parse_qsl , quote , unquote ) <EOL> import configparser <EOL> from io import StringIO <EOL> from io import BytesIO as byte_buffer <EOL> def inspect_getargspec ( func ) : <EOL> return ArgSpec ( <EOL> * inspect_getfullargspec ( func ) [ <NUM_LIT:0> : <NUM_LIT:4> ] <EOL> ) <EOL> string_types = str , <EOL> binary_type = bytes <EOL> text_type = str <EOL> int_types = int , <EOL> iterbytes = iter <EOL> def u ( s ) : <EOL> return s <EOL> def ue ( s ) : <EOL> return s <EOL> def b ( s ) : <EOL> return s . encode ( "<STR_LIT>" ) <EOL> if py32 : <EOL> callable = callable <EOL> else : <EOL> def callable ( fn ) : <EOL> return hasattr ( fn , '<STR_LIT>' ) <EOL> def cmp ( a , b ) : <EOL> return ( a > b ) - ( a < b ) <EOL> from functools import reduce <EOL> print_ = getattr ( builtins , "<STR_LIT>" ) <EOL> import_ = getattr ( builtins , '<STR_LIT>' ) <EOL> import itertools <EOL> itertools_filterfalse = itertools . filterfalse <EOL> itertools_filter = filter <EOL> itertools_imap = map <EOL> from itertools import zip_longest <EOL> import base64 <EOL> def b64encode ( x ) : <EOL> return base64 . b64encode ( x ) . decode ( '<STR_LIT:ascii>' ) <EOL> def b64decode ( x ) : <EOL> return base64 . b64decode ( x . encode ( '<STR_LIT:ascii>' ) ) <EOL> else : <EOL> from inspect import getargspec as inspect_getfullargspec <EOL> inspect_getargspec = inspect_getfullargspec <EOL> from urllib import quote_plus , unquote_plus , quote , unquote <EOL> from urlparse import parse_qsl <EOL> import ConfigParser as configparser <EOL> from StringIO import StringIO <EOL> from cStringIO import StringIO as byte_buffer <EOL> string_types = basestring , <EOL> binary_type = str <EOL> text_type = unicode <EOL> int_types = int , long <EOL> def iterbytes ( buf ) : <EOL> return ( ord ( byte ) for byte in buf ) <EOL> def u ( s ) : <EOL> return unicode ( s , "<STR_LIT:utf-8>" ) <EOL> def ue ( s ) : <EOL> return unicode ( s , "<STR_LIT>" ) <EOL> def b ( s ) : <EOL> return s <EOL> def import_ ( * args ) : <EOL> if len ( args ) == <NUM_LIT:4> : <EOL> args = args [ <NUM_LIT:0> : <NUM_LIT:3> ] + ( [ str ( arg ) for arg in args [ <NUM_LIT:3> ] ] , ) <EOL> return __import__ ( * args ) <EOL> callable = callable <EOL> cmp = cmp <EOL> reduce = reduce <EOL> import base64 <EOL> b64encode = base64 . b64encode <EOL> b64decode = base64 . b64decode <EOL> def print_ ( * args , ** kwargs ) : <EOL> fp = kwargs . pop ( "<STR_LIT:file>" , sys . stdout ) <EOL> if fp is None : <EOL> return <EOL> for arg in enumerate ( args ) : <EOL> if not isinstance ( arg , basestring ) : <EOL> arg = str ( arg ) <EOL> fp . write ( arg ) <EOL> import itertools <EOL> itertools_filterfalse = itertools . ifilterfalse <EOL> itertools_filter = itertools . ifilter <EOL> itertools_imap = itertools . imap <EOL> from itertools import izip_longest as zip_longest <EOL> import time <EOL> if win32 or jython : <EOL> time_func = time . clock <EOL> else : <EOL> time_func = time . time <EOL> from collections import namedtuple <EOL> from operator import attrgetter as dottedgetter <EOL> if py3k : <EOL> def reraise ( tp , value , tb = None , cause = None ) : <EOL> if cause is not None : <EOL> value . __cause__ = cause <EOL> if value . __traceback__ is not tb : <EOL> raise value . with_traceback ( tb ) <EOL> raise value <EOL> def raise_from_cause ( exception , exc_info = None ) : <EOL> if exc_info is None : <EOL> exc_info = sys . exc_info ( ) <EOL> exc_type , exc_value , exc_tb = exc_info <EOL> reraise ( type ( exception ) , exception , tb = exc_tb , cause = exc_value ) <EOL> else : <EOL> exec ( "<STR_LIT>" <EOL> "<STR_LIT>" ) <EOL> def raise_from_cause ( exception , exc_info = None ) : <EOL> if exc_info is None : <EOL> exc_info = sys . exc_info ( ) <EOL> exc_type , exc_value , exc_tb = exc_info <EOL> reraise ( type ( exception ) , exception , tb = exc_tb ) <EOL> if py3k : <EOL> exec_ = getattr ( builtins , '<STR_LIT>' ) <EOL> else : <EOL> def exec_ ( func_text , globals_ , lcl = None ) : <EOL> if lcl is None : <EOL> exec ( '<STR_LIT>' ) <EOL> else : <EOL> exec ( '<STR_LIT>' ) <EOL> def with_metaclass ( meta , * bases ) : <EOL> """<STR_LIT>""" <EOL> class metaclass ( meta ) : <EOL> __call__ = type . __call__ <EOL> __init__ = type . __init__ <EOL> def __new__ ( cls , name , this_bases , d ) : <EOL> if this_bases is None : <EOL> return type . __new__ ( cls , name , ( ) , d ) <EOL> return meta ( name , bases , d ) <EOL> return metaclass ( '<STR_LIT>' , None , { } ) <EOL> from contextlib import contextmanager <EOL> try : <EOL> from contextlib import nested <EOL> except ImportError : <EOL> @ contextmanager <EOL> def nested ( * managers ) : <EOL> exits = [ ] <EOL> vars = [ ] <EOL> exc = ( None , None , None ) <EOL> try : <EOL> for mgr in managers : <EOL> exit = mgr . __exit__ <EOL> enter = mgr . __enter__ <EOL> vars . append ( enter ( ) ) <EOL> exits . append ( exit ) <EOL> yield vars <EOL> except : <EOL> exc = sys . exc_info ( ) <EOL> finally : <EOL> while exits : <EOL> exit = exits . pop ( ) <EOL> try : <EOL> if exit ( * exc ) : <EOL> exc = ( None , None , None ) <EOL> except : <EOL> exc = sys . exc_info ( ) <EOL> if exc != ( None , None , None ) : <EOL> reraise ( exc [ <NUM_LIT:0> ] , exc [ <NUM_LIT:1> ] , exc [ <NUM_LIT:2> ] ) </s>
