<s> """<STR_LIT>""" <EOL> from __future__ import absolute_import <EOL> import sys <EOL> PY3 = sys . version_info [ <NUM_LIT:0> ] == <NUM_LIT:3> <EOL> try : <EOL> reload = reload <EOL> except NameError : <EOL> from imp import reload <EOL> try : <EOL> from collections import UserList <EOL> except ImportError : <EOL> from UserList import UserList <EOL> try : <EOL> from collections import UserDict <EOL> except ImportError : <EOL> from UserDict import UserDict <EOL> try : <EOL> bytes_t = bytes <EOL> except NameError : <EOL> bytes_t = str <EOL> if sys . version_info < ( <NUM_LIT:3> , <NUM_LIT:3> ) : <EOL> import platform <EOL> SYSTEM = platform . system ( ) <EOL> if SYSTEM == '<STR_LIT>' : <EOL> import ctypes <EOL> from ctypes . util import find_library <EOL> libSystem = ctypes . CDLL ( '<STR_LIT>' ) <EOL> CoreServices = ctypes . CDLL ( find_library ( '<STR_LIT>' ) , <EOL> use_errno = True ) <EOL> mach_absolute_time = libSystem . mach_absolute_time <EOL> mach_absolute_time . restype = ctypes . c_uint64 <EOL> absolute_to_nanoseconds = CoreServices . AbsoluteToNanoseconds <EOL> absolute_to_nanoseconds . restype = ctypes . c_uint64 <EOL> absolute_to_nanoseconds . argtypes = [ ctypes . c_uint64 ] <EOL> def _monotonic ( ) : <EOL> return absolute_to_nanoseconds ( mach_absolute_time ( ) ) * <NUM_LIT> <EOL> elif SYSTEM == '<STR_LIT>' : <EOL> import ctypes <EOL> import os <EOL> CLOCK_MONOTONIC = <NUM_LIT:1> <EOL> class timespec ( ctypes . Structure ) : <EOL> _fields_ = [ <EOL> ( '<STR_LIT>' , ctypes . c_long ) , <EOL> ( '<STR_LIT>' , ctypes . c_long ) , <EOL> ] <EOL> librt = ctypes . CDLL ( '<STR_LIT>' , use_errno = True ) <EOL> clock_gettime = librt . clock_gettime <EOL> clock_gettime . argtypes = [ <EOL> ctypes . c_int , ctypes . POINTER ( timespec ) , <EOL> ] <EOL> def _monotonic ( ) : <EOL> t = timespec ( ) <EOL> if clock_gettime ( CLOCK_MONOTONIC , ctypes . pointer ( t ) ) != <NUM_LIT:0> : <EOL> errno_ = ctypes . get_errno ( ) <EOL> raise OSError ( errno_ , os . strerror ( errno_ ) ) <EOL> return t . tv_sec + t . tv_nsec * <NUM_LIT> <EOL> else : <EOL> from time import time as _monotonic <EOL> try : <EOL> from time import monotonic <EOL> except ImportError : <EOL> monotonic = _monotonic <EOL> if PY3 : <EOL> import builtins <EOL> from queue import Queue , Empty , Full , LifoQueue <EOL> from itertools import zip_longest <EOL> from io import StringIO , BytesIO <EOL> map = map <EOL> zip = zip <EOL> string = str <EOL> string_t = str <EOL> long_t = int <EOL> text_t = str <EOL> range = range <EOL> int_types = ( int , ) <EOL> module_name_t = str <EOL> open_fqdn = '<STR_LIT>' <EOL> def items ( d ) : <EOL> return d . items ( ) <EOL> def keys ( d ) : <EOL> return d . keys ( ) <EOL> def values ( d ) : <EOL> return d . values ( ) <EOL> def nextfun ( it ) : <EOL> return it . __next__ <EOL> exec_ = getattr ( builtins , '<STR_LIT>' ) <EOL> def reraise ( tp , value , tb = None ) : <EOL> if value . __traceback__ is not tb : <EOL> raise value . with_traceback ( tb ) <EOL> raise value <EOL> class WhateverIO ( StringIO ) : <EOL> def write ( self , data ) : <EOL> if isinstance ( data , bytes ) : <EOL> data = data . encode ( ) <EOL> StringIO . write ( self , data ) <EOL> else : <EOL> import __builtin__ as builtins <EOL> from Queue import Queue , Empty , Full , LifoQueue <EOL> from itertools import ( <EOL> imap as map , <EOL> izip as zip , <EOL> izip_longest as zip_longest , <EOL> ) <EOL> try : <EOL> from cStringIO import StringIO <EOL> except ImportError : <EOL> from StringIO import StringIO <EOL> string = unicode <EOL> string_t = basestring <EOL> text_t = unicode <EOL> long_t = long <EOL> range = xrange <EOL> int_types = ( int , long ) <EOL> module_name_t = str <EOL> open_fqdn = '<STR_LIT>' <EOL> def items ( d ) : <EOL> return d . iteritems ( ) <EOL> def keys ( d ) : <EOL> return d . iterkeys ( ) <EOL> def values ( d ) : <EOL> return d . itervalues ( ) <EOL> def nextfun ( it ) : <EOL> return it . next <EOL> def exec_ ( code , globs = None , locs = None ) : <EOL> """<STR_LIT>""" <EOL> if globs is None : <EOL> frame = sys . _getframe ( <NUM_LIT:1> ) <EOL> globs = frame . f_globals <EOL> if locs is None : <EOL> locs = frame . f_locals <EOL> del frame <EOL> elif locs is None : <EOL> locs = globs <EOL> exec ( """<STR_LIT>""" ) <EOL> exec_ ( """<STR_LIT>""" ) <EOL> BytesIO = WhateverIO = StringIO <EOL> def with_metaclass ( Type , skip_attrs = set ( [ '<STR_LIT>' , '<STR_LIT>' ] ) ) : <EOL> """<STR_LIT>""" <EOL> def _clone_with_metaclass ( Class ) : <EOL> attrs = dict ( ( key , value ) for key , value in items ( vars ( Class ) ) <EOL> if key not in skip_attrs ) <EOL> return Type ( Class . __name__ , Class . __bases__ , attrs ) <EOL> return _clone_with_metaclass </s>
