text
stringlengths
25
2.19k
embedding
listlengths
768
768
def test _ s3 _ timestamp ( self ) : ts1 ='wed, 12 oct 2009 17 : 50 : 00 gmt'self. assertequal ( s3time _ as _ datetime ( ts1 ), datetime. datetime ( 2009, 10, 12, 17, 50 ) ) ts2 ='2015 - 07 - 08t14 : 50 : 48. 000z'self. assertequal ( s3time _ as _ datetime ( ts2 ), datetime. datetime ( 2015, 7, 8, 14, 50, 48 ) ) retur...
[ 0.15299715101718903, -0.34101638197898865, 0.5240565538406372, -0.2207147777080536, 0.2476244568824768, 0.7470920085906982, -0.7431929707527161, 0.13834832608699799, 1.0871754884719849, 0.5998040437698364, -0.42306309938430786, -0.05750991776585579, 0.5138384699821472, -1.0265172719955444,...
def rect ( x, a = 1. 0, sharp _ transition = true ) : y = _ np. zeros ( _ np. shape ( x ) ) y [ _ np. abs ( x ) < = 0. 5 * a ] = 1. 0 # todo!!! what should be the correct boundary conditions if not sharp _ transition : y [ _ np. abs ( x ) = = 0. 5 * a ] = 0. 5 return y
[ 0.6946415305137634, -0.1210751011967659, 0.6677935719490051, -0.08095528185367584, -0.2411760538816452, 0.2416810840368271, 0.33606478571891785, -0.5052736401557922, 0.6356198191642761, 0.0030949553474783897, -0.07410123199224472, 0.8154231309890747, 0.4661003351211548, 0.08675175905227661...
def _ _ linked _ static _ lib _ targets ( app _ main _ obj _ target, static _ lib _ targets ) : assert isinstance ( static _ lib _ targets, g _ node _ list _ type ) app _ main _ obj _ path = str ( app _ main _ obj _ target ) # { lib path : target node } lib _ path _ node _ map = dict ( map ( lambda n : ( str ( n ), n )...
[ -0.4048881530761719, -1.3912222385406494, 0.4521465301513672, 0.5042740106582642, 0.7175548076629639, 0.7792019248008728, 0.16057778894901276, 0.03218630701303482, -0.20676426589488983, 0.27036812901496887, 0.4975433051586151, 0.4233379662036896, 0.5017921924591064, 0.04928749054670334, ...
def test _ _ array _ swap ( self ) : arr = array ( 10 ) arr [ 0 ] = 10 arr [ 1 ] = 20 arr [ 2 ] = 30 arr [ 3 ] = 40 # print ( arr ) # swap ( arr, 1, 2 ) # print ( arr ) # res = arr [ 2 ] # print ( res ) # self. assertequal ( res, 20 )
[ -0.9132662415504456, -0.7171429395675659, 0.5798507928848267, -0.013710962608456612, -0.14034320414066315, 0.5872582793235779, 0.27282601594924927, 0.7160108685493469, 0.6733052134513855, -0.49531999230384827, -0.5537770390510559, 0.3141682744026184, -0.2434803694486618, -0.079330861568450...
def test _ onerror ( self ) : self. xmlstream. dispatch ( self. xmlstream, xmlstream. stream _ connected _ event ) class testerror ( exception ) : pass reason = failure. failure ( testerror ( ) ) self. xmlstream. dispatch ( reason, xmlstream. stream _ error _ event ) self. assertequal ( 1, len ( self. flushloggederrors...
[ 0.060550834983587265, 0.5083737373352051, 0.46838924288749695, 0.4762578010559082, 0.480691522359848, 0.16250211000442505, -0.0408392958343029, -0.11025015264749527, 1.2107744216918945, -0.6595986485481262, -0.5871760845184326, -0.2790648341178894, 0.04863637685775757, -0.05037512630224228...
def extract _ double _ object _ actions ( self, entity1, entity2 ) : raise notimplementederror ( )
[ -1.02081298828125, -0.7045528292655945, 0.8903220295906067, 1.464935064315796, 0.49298784136772156, 0.1496438980102539, 0.98572838306427, -1.1191818714141846, -0.14058706164360046, 1.1029142141342163, -0.5548586249351501, 0.655049741268158, 1.1413626670837402, 0.678525984287262, 0.092403...
def test _ mac _ vendor _ lookup _ unknown ( self ) : mac ='b8 : 27 : eb : 00 : 00 : 00'device = device _ tracker. device ( self. hass, timedelta ( seconds = 180 ), true,'test ', mac,'test name') with mock _ aiohttp _ client ( ) as aioclient _ mock : aioclient _ mock. get ('http : / / api. macvendors. com / b8 : 27 : e...
[ -0.8464285731315613, 0.3884919285774231, 0.4685381054878235, -0.2014196515083313, 0.44542282819747925, 0.3329852223396301, 0.18131066858768463, 0.137579545378685, -0.35726580023765564, -0.36728933453559875, -0.23068784177303314, 0.2323434203863144, 0.2820358872413635, 0.43551477789878845, ...
def get _ calib _ dict ( self, run _ no = - 1 ) : calib _ dir = os. environ. get ('ps _ calib _ dir') calib = none if calib _ dir : gain _ mask = none pedestals = none if os. path. exists ( os. path. join ( calib _ dir,'gain _ mask. pickle') ) : gain _ mask = pickle. load ( open ( os. path. join ( calib _ dir,'gain _ m...
[ -0.30386117100715637, -0.8727984428405762, 0.9349791407585144, -0.1588105410337448, -0.7347260117530823, 0.28778812289237976, 0.5037711262702942, -1.10222589969635, -0.8388080596923828, 0.37361231446266174, -0.19812795519828796, 0.8205944895744324, 0.29852747917175293, 1.145185112953186, ...
def is _ admin ( request ) : if request. session [ " user _ id " ] = = none : return false return logged _ user ( request ). level = = 9
[ -0.1387498527765274, 0.26641854643821716, 0.43526625633239746, 1.1779178380966187, 0.3287324011325836, 0.14440356194972992, -0.5089796185493469, -1.070683479309082, 1.0972293615341187, -0.05125187709927559, 0.2431565374135971, 0.4183036983013153, -0.2595362961292267, 0.3299073278903961, ...
def instance _ name ( self ) - > pulumi. input [ str ] : return pulumi. get ( self, " instance _ name " )
[ -0.14679642021656036, -0.07015881687402725, 0.49754682183265686, -0.5177947878837585, -0.342510849237442, 1.6202468872070312, 0.20863062143325806, 0.7176148891448975, -0.05799883231520653, 0.873089075088501, 0.5032659769058228, 0.8638653755187988, -0.24546197056770325, -0.9730323553085327,...
def _ does _ quack ( cls, explanation ) : if not super ( ). _ does _ quack ( explanation ) : return false if not hasattr ( explanation, explainparams. local _ importance _ values ) : return false is _ list = isinstance ( explanation. local _ importance _ values, list ) is _ sparse = issparse ( explanation. local _ impo...
[ -0.003102576592937112, 0.41560617089271545, 0.472954124212265, 0.09331991523504257, -0.3200254738330841, 0.15949799120426178, 0.9303181171417236, 1.0647202730178833, 1.0593184232711792, 0.12491782009601593, 0.19596414268016815, -0.14041602611541748, -0.03687915951013565, 1.0999702215194702...
def check _ status ( call _ return ) : if not call _ return in _ sc. keys ( ) : raise keyerror ('unknown error call, may be fatal ( lol, just kidding )') if'drv _ success'in _ sc [ call _ return ] : return'drv _ success'elif'drv _ idle'in _ sc [ call _ return ] : return'drv _ idle'elif'drv _ no _ new _ data'in _ sc [ c...
[ -1.1493662595748901, -0.4518343210220337, 0.7693166136741638, -0.14951692521572113, -1.0426675081253052, 0.03442198410630226, -0.5354056358337402, -0.14946606755256653, 0.6054697632789612, 0.235064297914505, 0.3480501174926758, -0.06683795899152756, -0.04213392734527588, 0.3559705913066864...
def basket _ option ( basket, paths, pack ) : if basket = ='min': fn = np. maximum elif basket = ='max': fn = np. minimum elif basket in ('atlas ','everest ','himalayan') : raise valueerror ('in development.') else : raise valueerror ('method does not exist.') based, option, * strikes, times = pack if based = ='europea...
[ -0.4450293779373169, 0.7349106669425964, 0.5177083611488342, 0.25228288769721985, 0.8210916519165039, -0.08526898920536041, 0.7710427641868591, -0.409086674451828, 0.33287250995635986, 0.9678444862365723, 0.11014159768819809, 0.04805386811494827, -0.04033161699771881, -0.10017769783735275,...
def session _ middleware ( request, response ) : browser _ cookies = request [ " header " ]. get ( " cookie ", false ) if browser _ cookies : sid = request [ " header " ] [ " cookie " ]. get ( " sid ", false ) if sid : return request, response sid = str ( uuid4 ( ) ) response [ " header " ] [ " set - cookie " ] = " sid...
[ -0.48887044191360474, -1.0149258375167847, 0.7561336159706116, 0.6838647723197937, -0.30314767360687256, -0.8887238502502441, 0.03058846853673458, -0.4653429388999939, 1.4688924551010132, 1.0757544040679932, -0.2288730889558792, 0.2645116150379181, 0.0499957911670208, -0.042738545686006546...
def target _ design ( self ) : return self. _ target _ design
[ -0.029295403510332108, -0.06433712691068649, 0.09873785823583603, 0.6648929119110107, 0.5711652040481567, 0.5781955718994141, -0.09521433711051941, 0.3869788348674774, 0.1322035789489746, -1.0492582321166992, 0.8527814745903015, 1.0384732484817505, 0.593993604183197, -1.060986876487732, ...
def mnist _ data _ generator ( dset, batch _ size ) : assert 0 < batch _ size < = len ( dset ) random. shuffle ( dset ) index = 0 while true : yield dset [ index : index + batch _ size ] index + = batch _ size if index + batch _ size > len ( dset ) : random. shuffle ( dset ) index = 0
[ -0.49951907992362976, 0.4738341271877289, 0.4241282343864441, -0.5990059971809387, -1.3455301523208618, 0.33133673667907715, 0.06729122996330261, 0.07148756831884384, 1.0169647932052612, -1.1374934911727905, 0.11569710075855255, 0.640181839466095, 0.7034743428230286, -0.07944045215845108, ...
def pdf _ similar ( a, b, * * kw ) : return len ( pdfdiff _ pages ( a, b, * * kw ) ) = = 0
[ -0.038328319787979126, -0.5564553141593933, 0.5817474126815796, 0.14405441284179688, -0.12007535994052887, 0.2492300570011139, -0.9225461483001709, 0.10326449573040009, 0.2955774962902069, -0.249674990773201, 0.5435567498207092, 0.08934496343135834, -0.5269659757614136, -0.370484858751297,...
def is _ np ( im : union [ image. image, np. ndarray ] ) - > bool : return type ( im ) = = np. ndarray
[ -0.7758600115776062, 0.1286344975233078, 0.448456734418869, 0.8652352094650269, -0.21281014382839203, 0.11264066398143768, -0.3302515745162964, -1.339098572731018, 1.5593441724777222, 0.7995734214782715, 0.3482685089111328, 0.7202932834625244, -0.3437042832374573, 0.7992457747459412, -0....
def test _ event _ as _ js _ onclick ( self ) : js = " document. getelementbyid ('button'). onclick = function ( ) { " + self. event _ code + " } ; " html _ code = f " " " < html > < head > < / head > < body > < button id = " button " { reachable _ att _ name } = " true " > < / button > < script > { js } < / script > <...
[ 0.10471001267433167, 0.14071811735630035, 0.7338193655014038, -0.18363983929157257, -0.24910996854305267, -0.3521037697792053, 0.20910188555717468, 0.1847243309020996, 1.0910470485687256, 0.09385836869478226, -0.33843928575515747, 0.4694959819316864, 0.93912672996521, 0.8569926023483276, ...
def convert _ image ( self, context, file _ id ) : self. send _ message ( context, " converting _ image " ) file _ path = self. image _ converter. find _ file _ by _ id ( file _ id ) old _ format = file _ path. split ( ". " ) [ - 1 ] if old _ format in self. image _ converter. available _ formats : new _ file _ path = ...
[ -0.27729299664497375, -0.8337686061859131, 0.5725151896476746, 0.28007522225379944, 0.5611683130264282, -0.4304170310497284, -0.29831743240356445, -0.3368831276893616, 0.1956627070903778, 0.9170594215393066, 0.3375501036643982, 0.5828590393066406, 0.043670471757650375, 0.9576694369316101, ...
def factory ( fileref : file ) : mimetype = fileref. mimetype if'pdf'in mimetype : return pdfcontentreader ( fileref ) elif'csv'in mimetype : return csvcontentreader ( fileref ) elif'text'in mimetype : return textcontentreader ( fileref ) else : return contentreader ( fileref )
[ 0.10582106560468674, -1.445375680923462, 0.4329148828983307, -0.7116289734840393, -0.4780583381652832, 0.2800218164920807, -0.888831377029419, -0.6592234969139099, -0.4039398431777954, -0.5192816853523254, 1.2552820444107056, 0.1412426233291626, -0.6055352091789246, -0.21176637709140778, ...
def training _ step ( sess, train _ dict, config, feed _ dict = false ) : start _ time = time. time ( ) if feed _ dict : it _ train _ dict = sess. run ( train _ dict, feed _ dict = feed _ dict ) else : it _ train _ dict = sess. run ( train _ dict ) train _ score = it _ train _ dict ['train _ score'] # patch for accurac...
[ -0.6594839096069336, 0.5154563784599304, 0.573948085308075, -0.5395290851593018, 0.25830814242362976, -0.6715172529220581, -0.18159109354019165, 0.024644095450639725, -0.7603331208229065, 0.6378031373023987, -0.43597516417503357, -0.1776539385318756, 0.8043732047080994, 0.36027994751930237...
def _ load _ data ( ) : _ fp = r " % s \ prj. json " % os. path. dirname ( _ _ file _ _ ) global _ lutbl if _ lutbl is none : with open ( _ fp, " r " ) as reader : _ lutbl = pd. dataframe ( json. loads ( reader. read ( ) ) ) _ lutbl. columns = [ " wkid ", " name ", " wkt " ] del reader return _ lutbl
[ -0.046159595251083374, -0.3239717185497284, 0.41161128878593445, -1.1535413265228271, -0.6033874750137329, 0.30161479115486145, -0.7328044176101685, 0.036756958812475204, -0.9172778725624084, -0.3369235396385193, 0.16813130676746368, -0.0805395171046257, -0.5329873561859131, -0.79044789075...
def addjobresourceargs ( parser ) : arg _ specs = [ presentation _ specs. resourcepresentationspec ('job ', getjobresourcespec ( ), ('the batch job resource. if - - location not specified,'' the current batch / location is used.'), required = true, ), ] concept _ parsers. conceptparser ( arg _ specs ). addtoparser ( pa...
[ 0.10700365900993347, -0.39460811018943787, 0.5193915963172913, -0.5017991065979004, 0.6463309526443481, 0.3692164123058319, -0.09945105016231537, 1.3894494771957397, -0.3916802406311035, -0.13059544563293457, -0.004272640682756901, 0.011993682943284512, 0.12571251392364502, 0.8791777491569...
def showemoticonlist ( self ) : print " guess what? no emoticons. but i'll put in a random one for you " self. appendimageatcursor ( " throbber. gif " )
[ -0.3758212625980377, 0.7510777711868286, 0.22279642522335052, -0.570732831954956, 0.1906229853630066, 0.7502227425575256, 0.4780620336532593, 0.7855435609817505, 0.7986035943031311, 1.3102405071258545, -1.2138612270355225, -0.11395515501499176, 0.0571446493268013, 0.6593285799026489, -0....
def plot _ sightline _ depletion _ vs _ prop ( elems, prop, sightline _ data _ files, bin _ data = true, bin _ nums = 20, labels = none, foutname ='sightline _ depl _ vs _ prop. png ', \ std _ bars = true, style ='color - linestyle ', include _ obs = true, outside _ legend = false ) : # get plot stylization linewidths,...
[ 0.03475651517510414, 0.28593534231185913, 0.8322315216064453, 0.33057746291160583, 0.019121017307043076, 1.0058057308197021, 0.544034481048584, -0.21308663487434387, -0.12057376652956009, 0.0940452367067337, 0.12494304776191711, 0.8703227639198303, 0.6173002123832703, 0.40448400378227234, ...
def v _ third ( window, key ) : third _ height = resolution. height / / 3 top = 0 middle = third _ height bottom = 2 * third _ height if window. width! = third _ height : # make window width of monitor and one third height window. resizeto ( resolution. width, third _ height ) pos = window. top if pos = = top : # windo...
[ -0.17546606063842773, -0.3883013427257538, 0.9403272867202759, 0.16981013119220734, -0.4230117201805115, 0.184750035405159, 0.27005836367607117, -0.2406856268644333, 0.3224882483482361, 1.357795238494873, -0.08727184683084488, 0.01649678871035576, -1.1325033903121948, -0.34575122594833374,...
def _ render _ item ( self, item ) : list _ item = xbmcgui. listitem ( ) if backend. thumb in item : thumb = item [ backend. thumb ] list _ item. setart ( {'thumb': thumb,'icon': thumb,'fanart': thumb } ) if backend. url in item : list _ item. setlabel ( item [ backend. track _ title ] ) list _ item. setlabel2 ('% s - ...
[ -0.38626042008399963, -0.03173379600048065, 0.5268532037734985, -0.78163743019104, 0.5094754099845886, -0.28890806436538696, -0.482993483543396, 0.6449645757675171, 0.08970288932323456, 0.3316018283367157, -0.3297409117221832, 0.27713146805763245, -0.14826920628547668, 0.040984246879816055...
def select ( self ) - > list [ " node " ] : if self. is _ leaf : return [ self ] if len ( self. state. commands ) = = 0 : # this is a terminal state return [ self ] highest _ scoring _ child = max ( self. children. values ( ), key = lambda node : node. uct _ score ( self. playouts ) ) return [ self ] + highest _ scorin...
[ -0.1802026778459549, -0.4659554660320282, 0.714255154132843, 1.0777171850204468, 1.1145766973495483, -0.2788016200065613, 0.0012739859521389008, -0.526955783367157, 0.7706248164176941, 0.17614245414733887, 0.6237344145774841, 0.11918357759714127, 0.19186730682849884, -0.09452545642852783, ...
def contains ( self, mouseevent ) : for c in self. area. get _ children ( ) : a, b = c. contains ( mouseevent ) if a : if callable ( c ) : c ( ) return a, b return false, { }
[ 0.20528946816921234, -0.723944902420044, 0.5542078614234924, 0.17029862105846405, -0.8092193603515625, -0.8226596713066101, 0.3529543876647949, -0.4736199378967285, -0.23369118571281433, -0.1872093230485916, -0.82819002866745, -0.5864726901054382, 0.19361114501953125, 1.134032130241394, ...
def _ _ init _ _ ( self, dao ) : ramstkdatamodel. _ _ init _ _ ( self, dao ) # initialize private dictionary attributes. # initialize private list attributes. # initialize private scalar attributes. # initialize public dictionary attributes. # initialize public list attributes. # initialize public scalar attributes. se...
[ 0.2546207308769226, 1.1305370330810547, 0.49017074704170227, 0.3455575406551361, -0.10512351989746094, 0.23349742591381073, 0.3871634900569916, 0.16088984906673431, -0.21438591182231903, -0.43000203371047974, -1.0733394622802734, -0.16234013438224792, 1.120172142982483, 0.4817625880241394,...
def output ( self ) : return remotetarget ( " / experiment / output1. txt ", host, username = user, password = pwd )
[ 0.2870021164417267, -0.6171510219573975, 0.29361748695373535, 0.3815668225288391, -1.0709843635559082, 0.13959632813930511, 0.5024095177650452, 0.5895771384239197, -1.1351079940795898, -0.28119316697120667, 0.7812128663063049, 0.8332071900367737, -1.012282371520996, -1.032700538635254, -...
def matrixmulti ( a, b ) : redo = 6 rowsa, colsa = len ( a ), len ( a [ 0 ] ) rowsb, colsb = len ( b ), len ( b [ 0 ] ) if colsa! = rowsb : exit ('dimensiones incorrectas') c = [ [ 0 for row in range ( colsb ) ] for col in range ( rowsa ) ] for i in range ( rowsa ) : for j in range ( colsb ) : for k in range ( colsa ) ...
[ 0.10543786734342575, -0.02273433282971382, 0.9819120168685913, 0.5923836827278137, 0.3364630937576294, -0.601554274559021, -0.15355877578258514, 0.08690807968378067, 0.1240437924861908, 1.0255464315414429, -0.048936761915683746, -0.7937960028648376, 0.15923763811588287, 0.31963637471199036...
def bundletype ( self ) : return none
[ 0.3744855225086212, -0.03487715497612953, 0.32135704159736633, 0.6114487648010254, 0.5365894436836243, 0.6054002642631531, 0.6837929487228394, -0.19171684980392456, 0.4681834578514099, -0.7837268114089966, 0.007566941902041435, 0.3865833878517151, -1.217877984046936, 0.6777042746543884, ...
def showmenu ( rest _ id ) : restobj = session. query ( restaurant ). filter _ by ( id = rest _ id ). one ( ) menuitems = session. query ( menuitem ). filter _ by ( restaurant _ id = rest _ id ). all ( ) for i in menuitems : i. price = sub ('\ $ ','', i. price ) if'user _ id'in login _ session and restobj. user _ id = ...
[ -0.187542125582695, -0.38442206382751465, 0.5055025219917297, 1.2872951030731201, -0.46020761132240295, 0.08814720064401627, -0.582984209060669, 0.7738787531852722, 0.286471426486969, -0.19384139776229858, 0.16208608448505402, -0.15169811248779297, -0.0007401416660286486, 0.635761618614196...
def test _ import _ cont _ empty ( self ) : file _ path = os. path. join ( tests _ dir,'contingencies _ empty. xlsx') with self. assertraises ( valueerror ) : testmodule. importcontingencies ( pth = file _ path )
[ 1.1062819957733154, -0.031981877982616425, 0.39293405413627625, -0.3307635486125946, 1.0898935794830322, 0.8924208283424377, 0.6412367820739746, 0.32283321022987366, -0.033650487661361694, 0.0270038153976202, -0.7096958756446838, -0.016620099544525146, -0.34517747163772583, -0.383880823850...
def do _ part _ upload ( args ) : # multiprocessing args lameness bucket _ name, mpu _ id, fname, i, start, size, secure, max _ tries, current _ tries = args logger. debug ( " do _ part _ upload got args : % s " % ( args, ) ) # connect to s3, get the multipartupload s3 = boto. connect _ s3 ( calling _ format = ordinary...
[ 0.023085689172148705, -0.12994343042373657, 1.041852355003357, 0.21353359520435333, 0.3326278030872345, -0.25948894023895264, -0.2948661148548126, -0.39372798800468445, -0.8344268202781677, 0.029473328962922096, -0.04167677089571953, -0.0860191062092781, -1.0960277318954468, -0.58319783210...
def test _ write _ file ( attempt _ file _ write : magicmock, sleep : magicmock ) : attempt _ file _ write. return _ value = none success, error = writer. write _ file ('fake ','fake') assert success assert error is none assert 1 = = attempt _ file _ write. call _ count assert 0 = = sleep. call _ count
[ -0.8660035133361816, 0.452539324760437, 0.3594154119491577, 0.30382364988327026, 1.5687148571014404, 0.21784064173698425, 0.6304649710655212, 0.11875767260789871, -0.7952285408973694, -0.5126259922981262, 0.050441641360521317, -1.078837275505066, -0.16638894379138947, 0.34378892183303833, ...
def scrape _ teamgamelogs ( period, season ='2017 - 18 ', season _ type ='regular season ', sleep _ for = none ) : if sleep _ for : sleep ( sleep _ for ) # be nice to server by sleeping if we are scraping inside a loop nba _ params = {'period': period,'season': season,'seasontype': season _ type, } r = requests. get ( ...
[ -0.9010339379310608, 0.36290013790130615, 0.7014036774635315, 0.10504907369613647, 0.16104654967784882, 0.062264103442430496, -0.41139867901802063, -1.2562402486801147, -0.32413479685783386, 0.21393589675426483, 0.9907034635543823, 0.942625105381012, -0.01500499527901411, -0.78373074531555...
def _ _ eq _ _ ( self, other ) : return self. name = = other. name
[ -0.2816157042980194, -1.1441932916641235, 0.6164020895957947, -0.20728851854801178, -0.013385563157498837, 0.651803195476532, -0.3588770627975464, -1.2040566205978394, 0.4644858241081238, 0.1413341611623764, -1.234687089920044, 0.1801282912492752, 0.05880114063620567, -0.33610379695892334,...
def test _ track _ with _ duplicate _ mac _ dev _ id ( self, mock _ warning ) : devices = [ device _ tracker. device ( self. hass, true, true,'my _ device ','ab : 01 ','my device ', none, none, false ), device _ tracker. device ( self. hass, true, true,'your _ device ','ab : 01 ','your device ', none, none, false ) ] d...
[ -0.46456289291381836, 0.7296373844146729, 0.6206409335136414, 0.4734377861022949, 0.6547530293464661, -0.0763104259967804, 0.44579556584358215, -0.650129497051239, 0.2763952612876892, -0.013852519914507866, -0.4183219075202942, 0.2854718863964081, 0.19903239607810974, 0.9147522449493408, ...
def in _ subtree ( self, puzzle _ state ) : for subtree in self. _ subtrees : if str ( subtree. _ puzzle ) = = str ( puzzle _ state ) : return subtree return none
[ 0.9358223080635071, -0.2839847803115845, 0.49770230054855347, -0.36655402183532715, -1.5901707410812378, 0.13445547223091125, -0.33220383524894714, -0.14996814727783203, 0.47541117668151855, 0.30443036556243896, -0.29225459694862366, 0.8852890729904175, -0.6269599199295044, -0.128751844167...
def _ create _ config _ dict ( ) : # add fpis state - abbreviation information to configuration files df = pd. merge ( _ df _ cfg, _ df _ ids, how ='inner ', on = ['state'] ) # clean and normalize the configuration data df. columns = df. columns. to _ series ( ). apply ( lower _ and _ underscore ) df. set _ index ('abb...
[ -1.579554796218872, 0.7364271283149719, 0.4436464309692383, -0.8782027363777161, -0.6358028054237366, -0.3631482422351837, 0.21964985132217407, 0.07255470007658005, -1.1031620502471924, 0.2588244080543518, 0.04903741180896759, -1.1405223608016968, 0.9055717587471008, 0.358532577753067, 0...
def swap _ rows _ small ( self ) : area = random. randrange ( 0, self. n, 1 ) line1 = random. randrange ( 0, self. n, 1 ) # получение случаиного раиона и случаинои строки n1 = area * self. n + line1 # номер 1 строки для обмена line2 = random. randrange ( 0, self. n, 1 ) # случаиная строка, но не та же самая while ( lin...
[ -0.8626648187637329, 0.18456034362316132, 0.978128969669342, -0.35225242376327515, -0.43665802478790283, 0.3866623342037201, 0.8293697834014893, -0.29322946071624756, 0.3348156213760376, -0.04350873827934265, 0.10850059241056442, -0.06176096573472023, 0.4850892722606659, 0.8904005885124207...
def statistics ( intake, output, interval, block ) : df = pandas. read _ csv ('{ }. csv '. format ( intake ), header = none, names = ['time ','1 ','2 ','3 ','4 ','5 ','6 ','7 ','8'] ) # if blocklog file is specified, then separate stats into blocks if len ( block ) > 0 : # for each chamber, will iterate through datafra...
[ 0.18881288170814514, 0.09448093920946121, 0.8363665342330933, 0.5868611931800842, -0.48922887444496155, -0.27506229281425476, 0.8405880331993103, -0.6236757636070251, -0.28341153264045715, 1.0716410875320435, -0.5274109244346619, 0.232713982462883, -0.021897342056035995, 0.5949703454971313...
def wcount ( urls, topn = 10 ) : infile = urlopen ( urls ) aline = infile. readline ( ). lower ( ) dict _ 1 = { 97 :'a ', 98 :'b ', 99 :'c ', 100 :'d ', 101 :'e ', 102 :'f ', 103 :'g ', 104 :'h ', 105 :'i ', 106 :'j ', 107 :'k ', 108 :'l ', 109 :'m ', 110 :'n ', 111 :'o ', 112 :'p ', 113 :'q ', 114 :'r ', 115 :'s ', 11...
[ 0.37535569071769714, 0.010783654637634754, 1.025619626045227, -1.2414435148239136, -0.4851416349411011, 0.43225571513175964, 0.6623381972312927, -0.103441521525383, -0.6977518796920776, 0.25492793321609497, -0.007065179757773876, -0.14192068576812744, 0.2936854064464569, 0.4768877029418945...
def fits ( tiles, location, tilestr ) : x, y = location # look up up = tiles. get ( ( x, y - 1 ) ) if up : up _ last _ row = up. split ( " \ n " ) [ - 1 ]. strip ( ) tile _ first _ row = tilestr. split ( " \ n " ) [ 0 ]. strip ( ) if up _ last _ row! = tile _ first _ row : return false # look down down = tiles. get ( (...
[ -0.14684118330478668, -0.959179162979126, 0.7695043683052063, -0.6265395879745483, -0.950364887714386, 0.11489978432655334, -0.08343826234340668, -0.4161927103996277, -0.28956249356269836, 0.1721615493297577, -0.2813436985015869, -0.08763593435287476, -0.7325413227081299, -0.18615208566188...
def simplesample ( self, num ) : samp = [ ] ; sampcount = 0 ; for i in range ( 0, num ) : irand _ 1 = randrange ( 0, self. mworld. mwidth ) ; irang _ 2 = randrange ( 0, self. mworld. mheight ) ; if not self. mobstmgr. isconfiginobstacle ( ( irand _ 1, irang _ 2 ) ) : self. mfreesamples + = [ ( irand _ 1, irang _ 2 ) ] ...
[ -0.8450749516487122, 0.3754335641860962, 0.47535911202430725, -0.0892600491642952, -0.11723373085260391, 0.18937908113002777, 0.4132242500782013, -0.8851507902145386, 0.4404677450656891, -0.10766725242137909, -0.4148969352245331, -0.37106382846832275, -0.6400231122970581, 0.744608581066131...
def status _ reblog ( self, id : union [ status, idtype ], visibility : optional [ str ] = none ) - > status : params = self. _ _ generate _ params ( locals ( ), ['id'] ) valid _ visibilities = ['private ','public ','unlisted ','direct'] if'visibility'in params : params ['visibility'] = params ['visibility']. lower ( )...
[ -0.6131904125213623, 0.20083889365196228, 0.4101928174495697, 0.5248878598213196, -0.1446516215801239, -0.39953938126564026, -0.2960752248764038, 0.43912333250045776, 0.719706654548645, 0.7695239186286926, -1.215968132019043, 1.31740140914917, -0.567693829536438, -0.00278022070415318, 0....
def add _ predictions _ ji ( self, prediction, j, i ) : # verifies the shape of prediction if prediction. ndim! = 3 : prediction = prediction [ numpy. newaxis,... ] # crops image if necessary slc = ( slice ( none, none ), slice ( 0 if j - self. size / / 2 > = 0 else - 1 * ( j - self. size / / 2 ), prediction. shape [ -...
[ -0.3419323265552521, -0.1045304462313652, 1.0641672611236572, 0.28342440724372864, -0.8428242802619934, 0.3310166597366333, 1.227541208267212, -0.4274229407310486, 0.01933436095714569, 0.5538502931594849, -0.17120489478111267, 0.026686780154705048, -0.1225416287779808, 0.23884820938110352,...
def showinfodialog ( self ) : # print ('info button clicked') qmessagebox. information ( self,'available mime types ', str ( self. availablemimetypes ) )
[ 0.8970856666564941, -0.861366331577301, 0.24853456020355225, -1.2907861471176147, -0.29040658473968506, 0.26954448223114014, 0.7010135650634766, 0.7393619418144226, -0.047807127237319946, 0.3223739266395569, -0.8181007504463196, 1.275915503501892, -0.7655019760131836, 0.8811197280883789, ...
def create _ sub _ html ( ) : # # - - - get today's date in fractional year # sec1998 = ecf. find _ current _ stime ( ) ytime = ecf. stime _ to _ frac _ year ( sec1998 ) # # - - - create dictionary of unit and dictionary of descriptions for msid # [ udict, ddict ] = ecf. read _ unit _ list ( ) # # - - - create category...
[ 0.4243588149547577, 0.1504807025194168, 0.5242441296577454, -0.13321007788181305, -0.5174310207366943, 0.800823450088501, 0.5170962810516357, 0.522229015827179, -0.1408739686012268, -0.724922239780426, -0.018349576741456985, 0.14243115484714508, 0.31804895401000977, 1.199857234954834, -0...
def test _ 01 _ content _ image _ resize _ placeholder ( self ) : # case : resize placeholder, given size but original ratio is always kept response = self. url _ open ('/ web / image / 0 / 200x150') image = image. open ( io. bytesio ( response. content ) ) self. assertequal ( image. size, ( 150, 150 ) ) # case : resiz...
[ -0.56490558385849, 0.23309698700904846, 0.5964710116386414, -0.6253684759140015, -0.5202051997184753, -0.1765567660331726, 0.6421276926994324, -0.0888020321726799, -0.012776050716638565, -0.29065051674842834, 0.26183536648750305, -0.7898144125938416, -0.1953653246164322, -0.111408933997154...
def _ init _ corpus ( self, corpus : str, gutenbergf : str, train : bool, endchar : int ) - > none : print ('loading corpus from nltk') if corpus : corpusnltk = self. _ nltk _ prep _ corpus ( corpus ) print ('loading all relevant data') if hasattr ( corpusnltk,'sents') : allsent = list ( corpusnltk. sents ( ) ) else : ...
[ -0.32168322801589966, 0.20370638370513916, 0.7100849151611328, 0.0829743891954422, 0.0002473592758178711, -0.6196516752243042, -0.037331342697143555, 0.4250367283821106, -1.066091775894165, -0.45965808629989624, -0.276714563369751, -0.34196996688842773, 0.24759089946746826, 1.0297083854675...
def getddgiocnumberrequested ( ) : andor _ solis. getddgiocnumberrequested. restype = ctypes. c _ uint pulses = at _ 32 ( ) result = andor _ solis. getddgiocnumberrequested ( ctypes. byref ( pulses ) ) check _ status ( result ) return int ( pulses. value )
[ -1.6459686756134033, 1.3693805932998657, 0.7499556541442871, 0.5482769012451172, -0.01762067712843418, -0.8311632871627808, 0.8097240924835205, -0.626517653465271, -0.0078269736841321, -1.6069544553756714, -0.11068207770586014, 0.567298948764801, 0.11029588431119919, -0.10911016911268234, ...
def generate _ matrix ( self, n ) : matrix = [ ] for group in range ( 0, n - 1 ) : matrix. append ( [ ] ) lunch = int ( self. comboboxlunches [ group ]. currenttext ( ) [ - 1 ] ) swim = int ( self. comboboxswim [ group ]. currenttext ( ) [ - 1 ] ) for row in range ( 6 ) : matrix [ group ]. append ( [ ] ) for i in range...
[ -1.4930672645568848, 0.1809486746788025, 0.6475616693496704, -0.9207128882408142, 0.2952263653278351, -0.07811179012060165, 1.0691965818405151, -0.8368887305259705, 0.02732955850660801, 0.4103502631187439, -0.3251691162586212, -0.6674898266792297, -0.38249075412750244, 0.548255205154419, ...
def debug _ info ( ) : info = [ ( name, value ) for name, value in globals ( ). items ( ) if not name. startswith ( " _ " ) and name not in { " pybehavior ", " debug _ info " } and not isinstance ( value, type ( os ) ) ] info + = [ ( name, value ) for name, value in pybehavior. _ _ dict _ _. items ( ) if not name. star...
[ -0.7078510522842407, -0.2754262089729309, 0.6086950302124023, -0.011895223520696163, 0.034324001520872116, 0.6535311341285706, 0.03410487249493599, -1.6220675706863403, -0.5264994502067566, 0.13373324275016785, -1.0070334672927856, 0.05899446830153465, -0.18698015809059143, 1.4954334497451...
def test _ t _ update _ args ( self ) : r = rectangle ( 1, 1, 0, 0, 1 ) self. assertequal ( str ( r ), " [ rectangle ] ( 1 ) 0 / 0 - 1 / 1 " ) r. update ( 89 ) self. assertequal ( str ( r ), " [ rectangle ] ( 89 ) 0 / 0 - 1 / 1 " ) r. update ( 89, 2 ) self. assertequal ( str ( r ), " [ rectangle ] ( 89 ) 0 / 0 - 2 / 1 ...
[ -0.6590307950973511, -0.8227489590644836, 0.7471331357955933, -0.7417548298835754, -0.16852250695228577, 0.035276297479867935, 0.4745791256427765, -0.7603418231010437, -0.28361013531684875, 0.8807998895645142, -0.12660543620586395, -1.2906055450439453, -0.331072598695755, -0.42025810480117...
def odps _ set ( self ) - > pulumi. output [ bool ] : return pulumi. get ( self, " odps _ set " )
[ -0.5047234892845154, 0.3115874230861664, 0.6266129016876221, -0.845574140548706, 0.45543238520622253, 0.839352548122406, -0.6034417152404785, -0.6988210082054138, 0.760206401348114, 0.3467457890510559, 0.28287380933761597, 0.20942965149879456, -0.3982015550136566, -1.3827741146087646, -1...
def _ _ sendmessage ( self ) : # todo : switch to this when implemented msg = qstring. fromutf8 ( self. ui. inputwidget. toplaintext ( ) ) self. ui. inputwidget. clear ( ) strv = stringview ( ) strv. appendtext ( str ( msg ) ) # # as we send our msg to the conversation : self. _ amsn _ conversation. sendmessage ( strv ...
[ 0.0698607787489891, 0.13876062631607056, 0.5013800263404846, -0.5504172444343567, -0.27495431900024414, 0.15309017896652222, -0.4853799641132355, -0.6228327751159668, 0.38396331667900085, -0.5055395364761353, 0.037051402032375336, 0.26108789443969727, -0.3359015882015228, 0.659055948257446...
def render _ url _ page ( self, page ) : request = current. request rq _ vars = self. request _ vars. copy ( ) rq _ vars ['page'] = page return url ( self. controller _ name,'comments ', vars = rq _ vars )
[ -0.12471678853034973, -0.5610044598579407, 0.4601382613182068, -0.9057155847549438, 0.4733985662460327, 0.8587265014648438, -0.05090915411710739, 0.5426682233810425, -0.3919420540332794, 0.28536975383758545, 0.7854451537132263, -0.5748003125190735, -1.0486809015274048, 0.7494019269943237, ...
def iter _ opinions ( document ) : document _ id = document. attrib. get ( " id " ) document _ text = document. find ( " text " ). text document _ relevance = document. find ( " relevance " ). text document _ sentiment = document. find ( " sentiment " ). text document _ attr = { " id " : document _ id, " text " : docum...
[ -0.6107510924339294, -0.2878396213054657, 0.9339873194694519, -0.8574835658073425, -0.5400997996330261, 0.36222410202026367, -0.24605239927768707, 0.039926182478666306, -0.6491490602493286, 1.2066361904144287, 0.556982696056366, -0.4933675229549408, -0.1705600470304489, 0.02513591945171356...
def is _ id ( text ) : return id _ rp. fullmatch ( text ) is not none
[ 0.6625246405601501, -0.9748891592025757, 0.3164014518260956, 0.6609584093093872, 0.33582478761672974, 0.8160133361816406, -0.6982430219650269, 0.5034633278846741, 1.4769227504730225, 0.7002232670783997, -0.6461276412010193, -0.6742013692855835, -2.0098750591278076, -0.9321131706237793, -...
def scaled _ dot _ product _ attention ( query, keys, values, mask = none ) : # in the case of self attention, the sequence _ length and values _ count # will be the same. # (..., sequence _ length, values _ count ) raw _ attention _ logits = tf. matmul ( query, keys, transpose _ b = true ) key _ dimension = tf. cast (...
[ -0.6289945244789124, -0.41392984986305237, 0.6628035306930542, -0.14294183254241943, -0.8873896598815918, -0.25585320591926575, 0.00910299550741911, -0.43219566345214844, 0.2386162281036377, 0.6775864362716675, 0.2516474723815918, 0.744450032711029, 0.805077850818634, -0.20987141132354736,...
def build _ wb _ callback _ plotfunc ( plot _ func, filename ='posterior _ predictive ', interval = 100, * * kwargs ) : assert'samples'not in kwargs, " no need to provide ` samples `, as they will be extracted from current hmc state. " def callback ( sampler, iteration ) : if iteration % interval! = 0 : return filepath...
[ 0.2799415588378906, -0.2623283863067627, 0.6616661548614502, 0.3817526400089264, -0.572553813457489, -0.25781336426734924, 1.1669554710388184, -0.1325833648443222, -0.09858263283967972, 0.2493482381105423, 0.3553135395050049, 0.33247631788253784, 0.21332024037837982, 0.13590911030769348, ...
def _ make _ layer _ name ( self ) : return'layer _ % s'% ( str ( time ( ) ). replace ( '. ','' ), )
[ -0.1272640973329544, -0.3156123161315918, 0.5839419960975647, -0.741515040397644, -0.8929312229156494, 0.44863593578338623, -0.5606436133384705, -0.7874047160148621, -0.6908571124076843, 0.5903482437133789, -0.41383126378059387, 0.2573295533657074, 0.9720394611358643, 0.407398521900177, ...
def _ parse _ sonobat _ metadata ( md ) : sb _ md = dict ( ) sb _ md ['samplerate'] = int ( re. search ( sb _ freq _ regex, md ). groups ( ) [ 0 ] ) sb _ md ['te'] = int ( re. search ( sb _ te _ regex, md ). groups ( ) [ 0 ] ) sb _ md ['dfreq'] = re. search ( sb _ dfreq _ regex, md ). groups ( ) [ 0 ] note = md. split ...
[ -0.41968151926994324, 0.21228817105293274, 0.9068738222122192, -0.17445750534534454, -0.2582310736179352, -0.44682615995407104, -0.1403883695602417, -0.5716665387153625, -0.47368761897087097, -0.055694371461868286, 0.08237548172473907, -0.2878577709197998, 0.5655144453048706, -0.0321834571...
def execute ( self, dues : list [ optional [ datetime ] ] ) : # we enqueue the due tasks for due in dues : logger. debug ( f " { self } is due at { due } " ) dt _ kwarg = { } if self. datetime _ kwarg : dt _ kwarg = { self. datetime _ kwarg : due } tasks _ registry [ self. name ]. enqueue ( * self. args, due = due, * *...
[ -0.4425063729286194, 0.8125571608543396, 0.6705302000045776, 0.13620953261852264, 1.1277047395706177, 0.25634902715682983, -0.5398955345153809, -0.12907421588897705, -0.2562257945537567, 0.19157277047634125, -0.4365208148956299, 0.02720028907060623, 0.16049563884735107, 0.6969344019889832,...
def getcountconvertwavelengthrange ( min _ wave, max _ wave ) : andor _ solis. getcountconvertwavelengthrange. restype = ctypes. c _ uint min _ wave = ctypes. c _ float ( ) max _ wave = ctypes. c _ float ( ) result = andor _ solis. getcountconvertwavelengthrange ( ctypes. byref ( min _ wave ), ctypes. byref ( max _ wav...
[ 0.2153455913066864, -0.6127424240112305, 0.4252970516681671, -0.5726342797279358, -0.16519948840141296, 0.17320942878723145, -0.3469032049179077, 0.015383669175207615, -0.214093878865242, -0.12569893896579742, -0.8932029008865356, 0.7784911394119263, -0.9999169111251831, 0.6178719401359558...
def _ add _ replace ( plugins : plugins, function : genericpluginfunc, hook _ name : str ) - > none : for func in plugins [ hook _ name ] : if func. _ _ name _ _ = = function. _ _ name _ _ : plugins [ hook _ name ]. remove ( func ) plugins [ hook _ name ]. append ( function ) elif function not in plugins [ hook _ name ...
[ 0.15760289132595062, -0.7373164892196655, 0.5855365991592407, -0.11855509877204895, 1.2217861413955688, -1.126115083694458, -0.4743652939796448, 0.6218289732933044, 0.3182998597621918, 0.5832756757736206, -0.4801498353481293, 1.166043758392334, -0.0394330732524395, -0.14057965576648712, ...
def handle _ time _ exceeded ( sys _ args, start _ time ) : err _ str = render _ time _ exceeded _ template ( " cronwrap detected a time window has been exceeded on following command : ", sys _ args, start _ time ) if sys _ args. emails : send _ email ( sys _ args, sys _ args. emails,'host % s : cronwrap detected a tim...
[ 0.45611539483070374, -0.12249422818422318, 0.6307150721549988, 0.10183299332857132, -0.00906068179756403, -0.005983070470392704, -0.5932587385177612, -0.07103293389081955, -0.3210742473602295, 0.43635883927345276, 0.2509911060333252, 1.443650484085083, -0.4680926501750946, 0.95430237054824...
def user ( self, snowflake : int ) - > typing. dict : data = fetch ( base _ url + fetch _ user. format ( snowflake ), headers = { " authorization " : f " { self. token _ type } { self. token } " }, ) return data
[ -0.5023180842399597, 0.7545565962791443, 0.38718661665916443, 0.4379035532474518, -1.0020328760147095, -0.6243873238563538, -0.8605513572692871, -0.8593481779098511, -0.06320620328187943, -0.15214915573596954, -0.7817034721374512, 0.7869324088096619, 0.8668934106826782, 0.36212053894996643...
def readdata ( filename ) : print ( " loading data : " + filename ) samples = [ ] with open ( filename,'r') as testfile : csv _ reader = csv. reader ( testfile ) skip = true for line in csv _ reader : if ( skip ) : skip = false continue samples. append ( [ float ( line [ 1 ] ), float ( line [ 2 ] ), float ( line [ 3 ] ...
[ 0.05885650962591171, -0.22181691229343414, 0.5535697937011719, -0.08350885659456253, 0.1928994208574295, 0.9859094619750977, 0.5700353384017944, -0.06467568129301071, -0.3773813843727112, 0.13044194877147675, 0.038323767483234406, -0.006455407943576574, -0.17925778031349182, 0.272634714841...
def array _ add ( first, second ) : first _ array = bytearray ( first ) second _ array = bytearray ( second ) first _ array. extend ( second _ array ) return len ( first _ array )
[ 0.46916183829307556, -0.5223521590232849, 0.8242595791816711, -0.40536734461784363, 0.6264712810516357, -0.22128476202487946, -1.191142201423645, -0.18094782531261444, -0.3945710062980652, 0.25940001010894775, -1.407801866531372, 1.1288797855377197, -0.3124360740184784, 0.8191525340080261,...
def necessary _ config ( node _ config ) : return sklearnmodel. necessary _ config ( node _ config )
[ -0.38946104049682617, -0.08977004140615463, 0.27208849787712097, -0.23091347515583038, -0.12039350718259811, 0.4549322724342346, 0.09585671126842499, 0.5983530879020691, -0.15181615948677063, 1.2304738759994507, 0.10908682644367218, 0.3642657697200775, 1.0113284587860107, 0.977514088153839...
def _ sign _ transaction _ generic ( account, sanitized _ transaction, parent _ serializer ) : # obtain the serializers if sanitized _ transaction. get ( " chainid ", 0 ) = = 0 : unsigned _ serializer, signed _ serializer = ( parent _ serializer. unsigned ( ), parent _ serializer. signed ( ), ) # unsigned, signed else ...
[ -0.2476610690355301, -0.20978231728076935, 0.7188015580177307, -0.49619540572166443, 0.3563694953918457, -0.4661441743373871, -0.8528823256492615, 0.25982192158699036, 0.11612195521593094, 0.17544469237327576, -0.46827223896980286, -0.29127705097198486, 0.25938308238983154, -0.590718090534...
def _ _ call _ _ ( self, x ) : return self. t + self. m. dot ( x. reshape ( ( 3, - 1 ) ) )
[ -0.3822135031223297, 0.3688031733036041, 0.3539567291736603, -0.38816455006599426, -0.4542662501335144, 0.43762996792793274, -0.7512220740318298, -0.21027937531471252, 0.5111460089683533, 0.8897325396537781, -0.619819700717926, -0.13054756820201874, 0.17593884468078613, -1.2775365114212036...
def browse _ button ( self, open _ item, ui _ function ) : if open _ item is'file': self. file _ addr = ui _ function ( ). name if open _ item is'directory': self. rel _ dir _ addr = ui _ function ( )
[ -0.06948612630367279, -0.8288557529449463, 0.347970187664032, 0.5685406923294067, 0.4750332236289978, -0.11344258487224579, 0.9619089365005493, 0.6093809008598328, 0.6167263984680176, -0.9523479342460632, -0.5999495983123779, 1.0240181684494019, 0.2626132369041443, -0.5785943269729614, 0...
def _ _ process _ filename ( self, filename : str ) : for r in self. filename _ regex : res = r. search ( filename ) # strip filename if res : break stripped _ filename = filename. split ( res. group ( 0 ) ) [ 0 ] out = { " name " : self. dotremove _ regex. sub ( " ", stripped _ filename ) } try : year = self. year _ r...
[ -0.6480681300163269, -0.7937089204788208, 0.9452013373374939, -1.0376968383789062, -0.6746185421943665, -0.2046353816986084, -0.1938781440258026, 0.8313693404197693, -0.4212011396884918, 0.5704778432846069, -0.2859746515750885, 0.06445351988077164, 0.33501479029655457, 0.42413172125816345,...
def _ _ handlecomplete ( self ) : self. invitebutton [ " state " ] = directguiglobals. disabled self. prevbutton ['state'] = directguiglobals. disabled endtime = self. partytime + self. partyduration hostid = base. localavatar. doid # this is a list of lists. each item in the higher list represents one # activity. each...
[ -0.46616289019584656, -0.7243297696113586, 0.7501018047332764, 0.06540296226739883, 0.32802528142929077, 0.2609485685825348, 0.2889425456523895, 0.5363708734512329, -0.28894221782684326, 0.5320941209793091, -0.286751389503479, -0.07827982306480408, -0.8211849331855774, 0.4924483299255371, ...
def getann ( argname ) : if argname not in spec. annotations : return none else : ann = spec. annotations. get ( argname ) if ann is none : return type ( none ) else : return ann
[ -0.2413063943386078, -0.7345868349075317, 0.4608641564846039, -0.4215874671936035, 0.5329524278640747, -0.9519000053405762, 0.14136645197868347, -0.21434590220451355, 0.5852113962173462, -0.010923590511083603, -0.11632316559553146, 0.9987150430679321, 0.1041865274310112, 0.5905094146728516...
def membranep ( x, y, n, m, ninc, dt ) : w = np. zeros ( ninc, dtype = float ) t = 0 for i in range ( ninc ) : t = i * dt w [ 0 ] = 0. 0 for n in range ( 1, n, 2 ) : for m in range ( 1, m, 2 ) : fmn = 1. 0 / ( ( m * * 3 ) * ( n * * 3 ) ) omn = 20 * np. pi * np. sqrt ( ( m * * 2 ) + ( 4 * n * * 2 ) ) wtemp = fmn * np. s...
[ 0.3754335343837738, 0.11075384169816971, 0.8371784090995789, -0.3957131803035736, -0.35496798157691956, 0.0741647481918335, -0.2379077970981598, -0.1622472107410431, -0.2729720175266266, 0.8752320408821106, 0.6182799935340881, -0.7382028102874756, -0.5748023390769958, 0.11311211436986923, ...
def _ waitfortestmanagerconnectivity ( self, csectimeout ) : csecelapsed = 0 ; secstart = utils. timestampsecond ( ) ; while reporter. checktestmanagerconnection ( ) is false : csecelapsed = utils. timestampsecond ( ) - secstart ; if csecelapsed > = csectimeout : reporter. log ('_ waitfortestmanagerconnectivity : givin...
[ 0.002709954744204879, -0.40944617986679077, 0.39843323826789856, -0.3026408553123474, -0.5208364725112915, 0.038481876254081726, -0.4617917835712433, -0.4104648232460022, -0.45903894305229187, -0.2067601978778839, 0.04581695422530174, -1.126741886138916, 0.24853891134262085, 0.176987349987...
def getguestbookindex ( self ) : message = dict ( ) index _ select = " " " select id from guestbook order by recorded _ date desc " " " index _ query = guestbook. raw ( index _ select ) index = [ ] for entry in index _ query : index. append ( entry. id ) message [ " index " ] = index message [ " success " ] = true retu...
[ -1.4468735456466675, 0.26906681060791016, 0.40220221877098083, 0.5090487599372864, 0.3028325140476227, 0.305189311504364, 0.4127035439014435, -0.189452663064003, -0.9142947793006897, 0.7220845818519592, -0.8290016651153564, 0.47938790917396545, -0.8855888247489929, -0.33587145805358887, ...
def smoothen _ fit ( self ) : # build list of x and y vals collected from past frames leftx _ list = [ ] left _ yvals _ list = [ ] rightx _ list = [ ] right _ yvals _ list = [ ] for f in self. past _ frames : leftx _ list. append ( f. left _ lane. x ) left _ yvals _ list. append ( f. left _ lane. yvals ) rightx _ list....
[ -0.25874093174934387, -0.6779659390449524, 0.7791323661804199, -0.8948054313659668, -0.12973542511463165, 0.2880389988422394, 0.14061644673347473, 0.2621227204799652, 0.0038974995259195566, 0.3583371937274933, 0.10149956494569778, 0.9028712511062622, -0.4202437102794647, 0.2852996289730072...
def add _ user _ meta ( self, count ) : self. stats [ " user _ meta " ] + = count self. stats [ " total " ] + = count
[ -0.040821075439453125, 0.25877851247787476, 0.6276134848594666, 0.18628156185150146, 0.5786414742469788, 0.7756755352020264, -0.028498642146587372, -0.40892869234085083, -0.22169215977191925, 0.012890494428575039, -0.6247799396514893, 0.44225433468818665, 1.2455065250396729, -0.27553510665...
def close ( self ) : if self. fp : self. fp. close ( )
[ 1.5106351375579834, -1.0507705211639404, 0.31676363945007324, -0.0024931132793426514, -0.030333787202835083, 1.1579782962799072, 1.0615460872650146, -0.1994715929031372, -0.6225442290306091, -0.8532999753952026, 1.3414170742034912, -0.4009989798069, -1.039534568786621, 0.8790842294692993, ...
def writesdif ( self, outfile, rbep = true, fadetime = 0 ) : from. import io return io. tosdif ( self, outfile, rbep = rbep, fadetime = fadetime )
[ -0.6518730521202087, 0.3143303096294403, 0.5608664155006409, 1.1314386129379272, 0.28236767649650574, 0.6240032315254211, 0.6688233017921448, -0.29248496890068054, 0.1124471127986908, -0.422802209854126, -0.6684796214103699, -0.5321084856987, -1.0914111137390137, 0.7599203586578369, -0.2...
def intdecode ( data, scalefactor, dtype = np. float64, invalid = none, masked = false ) : if not ( issubclass ( dtype, np. floating ) or issubclass ( dtype, float ) ) : raise valueerror ('dtype must be a floating data type') # remove invalid values if invalid is none : # no invalid values if masked : filtered = np. ma...
[ -0.17962391674518585, -0.03605813533067703, 0.7781464457511902, -0.000023958011297509074, -1.0861696004867554, -0.37668779492378235, -0.41289812326431274, 0.18220636248588562, -0.06282460689544678, 0.23254583775997162, 0.1548573225736618, 0.636391818523407, -0.7809025645256042, -0.43691572...
def exclude _ for _ set ( self, object, flag ) : flags _ removed = [ ] content _ flag _ sets = [ x. set for x in contentflagsetmember. objects. filter ( flag = flag ) ] for set in content _ flag _ sets : if set. exclusive : current _ flags = self. flags _ for _ object ( object ) for current _ flag in current _ flags : ...
[ 0.1365121304988861, 0.11989199370145798, 0.6017599701881409, 0.5277948975563049, -0.7610912919044495, 0.3275766372680664, 0.420137494802475, -0.6590659618377686, -0.39369261264801025, 0.3370055556297302, -0.7478007674217224, 0.22310033440589905, -1.0249677896499634, 0.33823099732398987, ...
def _ retrieve _ results _ map ( msm _ ids ) : results _ map = { } if not msm _ ids : return results _ map status _ map = get _ traceroute _ status _ map ( msm _ ids ) if not status _ map : return { } for msm _ id in msm _ ids : " " " status ( integer ) : 0 : specified, 1 : scheduled, 2 : ongoing, 4 : stopped, 5 : forc...
[ 0.04008277878165245, -0.4990297257900238, 0.47871020436286926, -0.7866028547286987, 0.42698803544044495, -0.5036980509757996, -0.015548018738627434, -0.18976546823978424, 0.09393659979104996, -0.07655127346515656, -0.5006272196769714, -0.3546461760997772, 0.1814630925655365, 0.449383139610...
def type _ keys ( string, element ) : for char in string : element. type _ keys ( char )
[ -0.8274005651473999, -0.4536025822162628, 0.10535518079996109, 0.2740068733692169, 0.22971996665000916, -0.7823665738105774, 0.09853290766477585, -0.29743093252182007, -1.1088675260543823, 1.2966699600219727, -0.7912309169769287, 1.2859084606170654, -0.8286067843437195, -0.3939962685108185...
def _ log _ request ( self, request ) : msg = [ ] for d in self. log _ data : val = getattr ( request, d ) if val : msg. append ( d +':'+ repr ( val ) ) for d in self. log _ headers : if d in request. headers and request. headers [ d ] : msg. append ( d +':'+ repr ( request. headers [ d ] ) ) logger. info ( " request i...
[ -1.142147183418274, -0.5812311172485352, 0.8607822060585022, -0.9476773738861084, 0.07369338721036911, 0.16764190793037415, -1.2578988075256348, -0.3304290175437927, -0.4205698072910309, -0.6839823126792908, 0.3155078887939453, 0.37467482686042786, 1.0201966762542725, 0.8779125809669495, ...
def noise _ profiles ( self ) : noise _ models = [ noisedata. noisemodel for noisedata in self. _ data. values ( ) ] self. noisedataframe = noisedataframe ( noise _ models, self. spam ) return self. noisedataframe
[ 0.13400964438915253, 0.5070125460624695, 0.31852325797080994, 0.04612060636281967, 0.9722968339920044, 0.6002027988433838, -0.7647073268890381, -0.20119673013687134, 0.23629753291606903, 0.21307317912578583, -1.097647786140442, 0.38028213381767273, -0.7907480597496033, -0.37421268224716187...
def _ act _ move ( self, action ) : self. _ puzzle = self. _ puzzle. move ( action ) if self. _ current _ tree. in _ subtree ( self. _ puzzle ) : self. _ current _ tree = self. _ current _ tree. in _ subtree ( self. _ puzzle ) else : new _ subtree = _ controllertree ( self. _ puzzle, action ) self. _ current _ tree. ad...
[ -0.6290647387504578, -0.2766517996788025, 0.6080608367919922, 0.30380111932754517, -0.09387554228305817, -0.04674825444817543, 0.7011461853981018, -0.1590539515018463, 0.49362897872924805, 0.7867123484611511, -0.7843760251998901, 0.31361445784568787, -0.1987035870552063, -0.645398020744323...
def log _ time _ converter ( value ) : if isinstance ( value, int ) : return value if isinstance ( value, discordentity ) : return value. id if type ( value ) is datetime : return time _ to _ id ( value ) raise typeerror ( f'expected ` int `, ` { discordentity. _ _ name _ _ } ` instance, or a ` datetime ` object, got'f...
[ -0.7575019001960754, 0.15210217237472534, 0.7822487354278564, -0.3534424304962158, -0.12383446097373962, 0.13048923015594482, -0.9037749767303467, -1.0424120426177979, 0.4657192826271057, 0.8788132667541504, -0.03816727176308632, 0.1909274309873581, -0.05665773153305054, 0.9102365374565125...
def sign ( signature, cls ) : static = ( value. _ _ func _ _ for ( key, value ) in cls. _ _ dict _ _. iteritems ( ) if isinstance ( value, ( staticmethod, classmethod ) ) ) methods = ( value for ( key, value ) in cls. _ _ dict _ _. iteritems ( ) if isinstance ( value, types. functiontype ) ) multimethods = ( value. mul...
[ -1.0875718593597412, -0.1688781976699829, 0.7088525891304016, 0.5453272461891174, -0.4412037134170532, -0.4473297595977783, 0.2051296830177307, 0.37382709980010986, 0.39959049224853516, 0.03069751337170601, -0.8480224609375, -0.589853048324585, 0.2946968674659729, 1.1670608520507812, 0.2...
def setmipislaveid ( self ) : self. mipi _ ch = int ( self. qcbmipich. currenttext ( ) ) self. mipi _ slave _ id = self. qlemipislaveid. text ( ) self. qlemipislaveid. settext ( unicode ( self. mipi _ slave _ id. upper ( ) ) ) self. readicq ( )
[ -0.32083892822265625, -1.5101162195205688, 0.5040437579154968, -0.3576292395591736, -0.5626930594444275, -0.03510046377778053, 0.02609981782734394, 0.226607546210289, 0.45869436860084534, 0.4284208118915558, -0.9301429986953735, 0.8906223773956299, -1.0447624921798706, -0.18911193311214447...
def get _ chain ( ) : response = {'chain': blockchain. chain,'length': len ( blockchain. chain ) } return jsonify ( response ), 200
[ -0.6140680909156799, -0.19705769419670105, 0.4482441842556, 0.023166628554463387, 0.6952223777770996, -0.774689793586731, -0.9785841703414917, -0.17597801983356476, -0.3967958986759186, 0.18385076522827148, -1.4688336849212646, 0.9740442633628845, -0.6752488017082214, 0.2618285119533539, ...
def capture _ page _ screenshot ( self ) : self. seleniumlib. capture _ page _ screenshot ( )
[ 0.31088489294052124, -0.5322183966636658, 0.3951384127140045, 1.707779049873352, 0.7361649870872498, 0.7005660533905029, -0.45459219813346863, -0.36389440298080444, 1.0522297620773315, 0.466458797454834, 0.5805922746658325, 0.4394136965274811, 0.5546693801879883, 0.42827826738357544, 0.7...