text
stringlengths
25
2.19k
embedding
listlengths
768
768
def test _ get _ content _ alias ( self ) : pass
[ 0.23841865360736847, -0.37698665261268616, 0.31244754791259766, 0.9416694045066833, 0.2717842161655426, 0.511941134929657, 1.0363953113555908, -0.17690852284431458, -0.960327684879303, -1.153583288192749, -0.8423055410385132, 0.3509763479232788, -0.5159879326820374, 0.006999703589826822, ...
def is _ suspicious ( transaction : dict ) - > bool : # todo add better rules and / or ai superpowers return transaction ['amount'] > = 900
[ 0.9422838091850281, 1.1198915243148804, 0.4371189773082733, 0.4576764404773712, -0.5605499148368835, -0.42629674077033997, -1.1544181108474731, -0.37783631682395935, 0.6885630488395691, 0.7465723156929016, -0.7594871520996094, 0.23969514667987823, 0.8675484657287598, -0.5478968620300293, ...
def test _ create _ new _ raster _ from _ base _ shape ( self ) - > none : extract _ archive ( src = " tests / data / spacenet. zip " ) data = read _ csv ( " tests / tiling / tiling _ segmentation _ binary - multiband _ ci. csv " ) ref _ raster = path ( data [ 0 ] ['tif'] ) out _ raster = ref _ raster. parent / f " { r...
[ 0.9150538444519043, -0.43075424432754517, 0.4499853253364563, 0.179511159658432, 0.5392774343490601, 0.5321009755134583, 0.784202516078949, -0.4824356734752655, -0.20353849232196808, 0.03790639340877533, 0.004980238154530525, -0.2215191274881363, 0.32437852025032043, 0.5640242099761963, ...
def host _ file ( self, container _ file : str, inputs _ only : bool = false ) - > str : if os. path. isabs ( container _ file ) : # handle output of std { out, err }. txt if container _ file in [ os. path. join ( self. container _ dir, pipe _ file ) for pipe _ file in [ " stdout. txt ", " stderr. txt " ] ] : return os...
[ 0.1460937112569809, -0.4914460778236389, 0.9931106567382812, 0.5247758626937866, -0.659931480884552, 0.4252152144908905, 1.4135677814483643, -0.20114700496196747, -1.308688998222351, 0.18222804367542267, 1.6132786273956299, -0.3770917057991028, -0.08973277360200882, 0.06661781668663025, ...
def load _ territory _ with _ logs ( t _ id ) : print ( " loading territory { } ". format ( t _ id ) ) print ( " added { } locations for { }.! ". format ( load _ territory ( t _ id ), t _ id ) )
[ 0.28192275762557983, -0.6303298473358154, 0.5695640444755554, -1.0998777151107788, -0.10598888993263245, 0.09479406476020813, -1.0870654582977295, 0.1047845333814621, 0.417126327753067, -0.09579679369926453, 0.06466040760278702, 0.6190584301948547, 0.8512358069419861, 0.6044686436653137, ...
def _ _ new _ _ ( * args, * * kwargs ) : # real signature unknown pass
[ 0.14615869522094727, -1.185396671295166, 0.5555419921875, 0.9505133628845215, -0.10231773555278778, -0.2529163658618927, 0.4622744619846344, -0.42200320959091187, -0.053417038172483444, -0.6009341478347778, -1.4501960277557373, -0.6748144626617432, 0.6451907753944397, 0.6213041543960571, ...
def _ _ init _ _ ( self, event _ callback ) : platformdriver. _ _ init _ _ ( self, event _ callback ) # ciomsclient instance created by connect ( ) and destroyed by disconnect ( ) : self. _ rsn _ oms = none # url for the event listener registration / unregistration ( based on # web server launched by servicegatewayserv...
[ 0.6566058397293091, -0.3864172101020813, 0.5737991333007812, 0.3305571377277374, 0.0856785997748375, -0.8768352270126343, 0.3533700108528137, 0.7096553444862366, -0.09782661497592926, -0.1712377369403839, -0.1623118370771408, -0.5684223771095276, -0.2526710331439972, 0.920416533946991, 0...
def story _ dict ( self ) : global screenplay _ dir screenplay _ dir = screenplay _ dir + self. currentgame. get ( ) [ : - 4 ] path _ dict = { } for splay _ name in os. listdir ( screenplay _ dir ) : splay _ path = os. path. join ( screenplay _ dir, splay _ name ) if os. path. isfile ( splay _ path ) and splay _ name. ...
[ 0.5479769706726074, -0.725248396396637, 0.7021015882492065, 0.21488599479198456, -1.1644089221954346, 0.35647889971733093, 1.4691194295883179, 0.23557740449905396, -0.39492902159690857, 0.7008090615272522, -0.42116579413414, -0.49594253301620483, 0.2654012143611908, 0.5977420806884766, 0...
def get ( self, * args, * * kwargs ) : # real signature unknown pass
[ -0.22274519503116608, -0.41807883977890015, 0.37243545055389404, 0.7202750444412231, 1.0315176248550415, -0.481701523065567, -0.2717197835445404, -0.7309315800666809, -0.40779903531074524, -0.7451921105384827, -0.7350060343742371, 0.5209641456604004, -0.24181358516216278, -0.13036362826824...
def get _ df _ from _ sampled _ trips ( step _ trip _ list, show _ service _ data = false, earliest _ datetime = none ) : d = defaultdict ( list ) for step, trips in enumerate ( step _ trip _ list ) : for t in trips : d [ " placement _ datetime " ]. append ( t. placement ) d [ " step " ]. append ( step + 1 ) d [ " pk _...
[ -0.3270428776741028, 0.1213081032037735, 0.5986892580986023, -1.2789158821105957, -0.8301586508750916, 0.14358466863632202, 0.028347931802272797, 0.694464921951294, -0.6141279339790344, -0.12459465861320496, -0.1566464900970459, -0.1898246556520462, 0.9006370306015015, 0.36565184593200684,...
def lessfunc ( self, data ) : return self. field. sortvalue ( data ) < \ self. field. adjustedcomparevalue ( self. value )
[ 0.6789777874946594, -0.605253279209137, 0.3660619258880615, -1.0999010801315308, -0.6414380073547363, 0.42346516251564026, 0.4511583149433136, -1.3786635398864746, -0.008876794017851353, -1.3497470617294312, -0.296784907579422, -0.05538073927164078, -0.6232349276542664, 0.630659282207489, ...
def contactupdated ( self, contactview ) : self. contacts [ contactview. uid ] = contactview self. _ main. send ( " contactupdated ", [ contactview. uid, str ( contactview. name ) ] ) pass
[ -0.0861303061246872, -1.3179404735565186, 0.20161011815071106, 0.18068918585777283, -1.2772188186645508, -0.2179865539073944, -0.0822894498705864, -0.4492882490158081, 1.0280240774154663, -0.38474592566490173, -0.09420526027679443, -0.0008795951725915074, -0.1518574059009552, -0.3070919513...
def _ _ iter _ _ ( self ) : data _ files, node _ list = self. _ node _ io _ loop _ prepare ( self. trees ) for data _ file, nodes in zip ( data _ files, node _ list ) : self. _ node _ io _ loop _ start ( data _ file ) for node in nodes : yield node self. _ node _ io _ loop _ finish ( data _ file )
[ -0.5394913554191589, -0.35578256845474243, 0.3643439710140228, -0.4291756749153137, 0.8507747054100037, 0.40879595279693604, 0.34434741735458374, -0.24960502982139587, -1.6367332935333252, 0.2998121380805969, 0.471141517162323, 0.010454577393829823, 0.42716822028160095, 0.3947085738182068,...
def average ( x, axis = none, weights = none, keepdims = false ) : if weights is none : return _ mean ( x, axis, keepdims ) if axis is none : pass elif isinstance ( axis, tuple ) : axis = [ a + x. ndim if a < 0 else a for a in axis ] axis. sort ( ) for a, b in six. moves. zip ( axis, axis [ 1 : ] ) : if a = = b : raise...
[ 0.1079348772764206, 0.9824177026748657, 0.7425094842910767, 0.5270808935165405, -0.7149688005447388, 0.3210884630680084, 0.46662673354148865, -0.3972330689430237, -0.22848543524742126, 0.8453622460365295, 0.1831871122121811, 0.5182788968086243, 0.09525194764137268, -0.24127358198165894, ...
def fit ( self, x, y ) : if len ( x. shape ) = = 1 : x = x. reshape ( 1, - 1 ) self. x _ train = x self. y _ train = y self. kernel _ matrix = self. kernel _ function ( x, x ) self. kernel _ matrix _ inv = inv _ stable ( self. kernel _ matrix ) self. alpha = self. kernel _ matrix _ inv @ self. y _ train
[ -0.2049047201871872, 0.171884685754776, 0.5883251428604126, 0.9628903269767761, 0.129560187458992, -0.22488361597061157, -0.6070272326469421, 0.6899586915969849, -0.8033764958381653, -0.39858725666999817, -0.2399330586194992, 0.17729796469211578, -0.020898370072245598, 0.287540465593338, ...
def get _ devices _ by _ domain ( self, domain : str ) - > list [ dict ] : types = _ leap _ device _ types. get ( domain, none ) # return immediately if not a supported domain if types is none : return [ ] return self. get _ devices _ by _ types ( types )
[ -0.9182915687561035, 1.3664823770523071, 0.5108328461647034, 0.20832549035549164, 0.34309500455856323, -0.7113877534866333, -0.4901512861251831, -0.21322913467884064, 0.19550856947898865, -0.041872624307870865, -0.13528677821159363, 0.6778467893600464, -0.10770874470472336, 1.3564786911010...
def fetch ( self, grouped : virtualdatasetbox, * * load _ settings : dict [ str, any ] ) - > xarray. dataset : raise notimplementederror
[ -0.8591457009315491, 0.04361085966229439, 0.2843615412712097, -0.14689619839191437, -0.5280900001525879, -0.05811170116066933, -0.4276944100856781, -1.3093571662902832, -0.28842493891716003, -0.20152603089809418, 0.7505903244018555, 1.128490686416626, -0.2951284646987915, -0.27631962299346...
def clean _ text ( text ) : return text. replace ( " & ", " " )
[ 0.3385252058506012, -1.1053214073181152, 0.4111141562461853, -0.5203668475151062, -1.4836018085479736, 0.8356887698173523, -0.7439631223678589, 0.8892641067504883, 0.6420947313308716, 0.8023271560668945, 0.1816990077495575, 0.7510716319084167, -0.9936003684997559, -0.030285198241472244, ...
def protest _ delete _ handler ( sender, instance, * * kwargs ) : media = instance. media # re - sum protest count if media. protest _ count : media. protest _ count = f ('protest _ count') - 1 media. save ( )
[ 1.1442010402679443, -0.40366408228874207, 0.40364763140678406, 0.09577134996652603, 0.8349942564964294, -0.08773244917392731, 1.3590397834777832, 0.5815780162811279, 0.8094726800918579, 0.511677622795105, -0.7971562147140503, -1.0361838340759277, 0.5003083348274231, 0.13762204349040985, ...
def process ( ) : parser = argparse. argumentparser ( " - h for help " ) parser. add _ argument ('- v ','- - verbose ', action = " store _ true ", help = " verbose output " ) parser. add _ argument ('- i ','- - interactive ', action = " store _ true ", help = " interactive mode confirms changes to each file " ) parser....
[ 0.3426070809364319, -0.712854266166687, 1.114298701286316, 0.3560349643230438, 0.42676523327827454, 0.04221150279045105, 0.6415694952011108, 1.2957819700241089, -0.41721293330192566, -0.22087882459163666, 0.2627619206905365, 0.7710352540016174, -0.21090899407863617, 0.7867582440376282, 0...
def _ get _ vars _ needing _ cts _ in ( jaxpr : jaxpr ) - > set [ var ] : need _ cts : set [ var ] = set ( ) def visit ( vs : set [ var ] ) : if len ( vs ) = = 0 : return next _ visit = set ( ) for e in jaxpr. eqns : if any ( v in e. invars for v in vs ) : for o in e. outvars : if o not in need _ cts : need _ cts. add ...
[ -0.7218585014343262, 0.05260568484663963, 0.7327585220336914, -0.6206226944923401, -0.7149851322174072, 0.28807488083839417, 0.7315555810928345, -0.7125353217124939, -1.2456225156784058, -0.16764985024929047, -0.0034407777711749077, 0.23733824491500854, -0.431921124458313, 0.07794798165559...
def trafficload ( self ) : if self. force _ auto _ sync : self. get ('trafficload') return self. _ trafficload
[ -0.48943614959716797, 0.90362948179245, 0.3531678020954132, -0.5369229316711426, -0.11065468937158585, 0.5303596258163452, 0.8393301367759705, -1.1884571313858032, 0.21895860135555267, 0.40525928139686584, -0.8483677506446838, 0.20828166604042053, -0.6507003903388977, -1.1931415796279907, ...
def forward ( self, images, nhwc _ input = false ) : if nhwc _ input : images = images. permute ( 0, 3, 1, 2 ) out = self. conv _ h ( self. conv _ w ( images ) ) if nhwc _ input : out = out. permute ( 0, 2, 3, 1 ) return out
[ -0.3833496570587158, 0.74802166223526, 0.46178483963012695, 0.7190549969673157, -0.06372290104627609, 0.03572975844144821, 0.42932549118995667, 0.008923402056097984, -0.3687957227230072, -0.2172408252954483, 0.4096069931983948, -0.6456553936004639, -0.6109676957130432, 0.8732919692993164, ...
def serializetostring ( self, * args, * * kwargs ) : # real signature unknown pass
[ -0.5990201234817505, -0.7162622809410095, 0.3801784813404083, 0.43005606532096863, 0.5159501433372498, -0.10491752624511719, 0.3263470530509949, -0.9610136151313782, 0.36126938462257385, -0.3300071060657501, -0.9399993419647217, 0.17562443017959595, -0.6932036876678467, 0.1575944572687149,...
def test _ random _ sampler ( self ) : sampler = sampler ( session = self. session, table = user, profile _ sample _ config = profilesampleconfig ( profile _ sample = 50. 0 ), ) random _ sample = sampler. random _ sample ( ) res = self. session. query ( func. count ( ) ). select _ from ( random _ sample ). first ( ) as...
[ 0.12624438107013702, 0.1387891173362732, 0.27162718772888184, 0.278532475233078, 0.198638916015625, 0.37338656187057495, 0.11203975975513458, -0.5324735045433044, 0.3846322000026703, -0.6571741700172424, -0.12556031346321106, -0.7857092618942261, -0.2200659215450287, 1.0534332990646362, ...
def runtests ( config ) : suite = unittest. testsuite ( ) for test in config. tests : suite. addtest ( installertest ( test, config ) ) unittest. texttestrunner ( verbosity = 2 ). run ( suite )
[ -0.02894122712314129, 0.2817283868789673, 0.35616937279701233, 0.08065800368785858, 0.9578285217285156, 0.16882333159446716, 0.5042334794998169, 1.3758801221847534, -0.09805548936128616, 0.6290299296379089, -0.14363016188144684, -0.7285824418067932, -0.8032402396202087, 0.9333633780479431,...
def cancion _ siguiente ( self ) : if len ( self. lista _ canciones ) < 1 : return none try : cancion = self. lista _ canciones. get _ elemento ( self. actual + 1 ) self. actual + = 1 except indexerror : return return cancion
[ -0.38483473658561707, -0.47465991973876953, 0.6060833930969238, 1.190625786781311, -0.035781487822532654, -0.1933530569076538, 0.4701475203037262, 0.3165404796600342, -0.02544427663087845, -0.07116342335939407, -0.18632318079471588, -0.32009968161582947, -0.7911875247955322, -0.48118692636...
def read _ cmt _ file ( filename ) : with open ( filename, " rt " ) as f : line = f. readline ( ) origin _ time = line [ 4 : ]. strip ( ). split ( ) [ : 6 ] values = list ( map ( int, origin _ time [ : - 1 ] ) ) + [ float ( origin _ time [ - 1 ] ) ] try : origin _ time = obspy. utcdatetime ( * values ) print origin _ t...
[ 0.4558427333831787, -1.7819019556045532, 1.1423981189727783, -1.1393308639526367, -0.6156629323959351, 0.8098036050796509, 0.30333957076072693, 1.352634310722351, -1.1234327554702759, 0.9711819291114807, -0.03520146757364273, 0.04941285774111748, -0.35947954654693604, 0.4978359341621399, ...
def bt _ devclass ( major, minor ) : majorlkp = { 0 : " miscellaneous ", 1 : " computer ", 2 : " phone ", 3 : " lan access ", 4 : " audio / video ", 5 : " peripheral ", 6 : " imaging ", 7 : " wearable ", 8 : " toy ", 9 : " medical ", 31 : " uncategorized " } majorminorlkp = { ( 0, 0 ) : " uncategorized ", ( 0, 63 ) : "...
[ -0.36994698643684387, -0.08540734648704529, 0.8893799781799316, -0.5886902809143066, -0.6888307929039001, 0.08204827457666397, 0.22305196523666382, -0.8347248435020447, 0.43921658396720886, -0.15296047925949097, -0.2502882182598114, 0.42622214555740356, 0.4383881092071533, 0.33348309993743...
def test _ check _ config _ params _ missing _ csv _ output _ folder _ path ( gitdelver _ config _ params _ fixture : callable [ [ none ], dict [ str, str ] ] ) : config _ params = gitdelver _ config _ params _ fixture. pop ( " csv _ output _ folder _ path ", none ) with pytest. raises ( systemexit ) : gitdelver. _ che...
[ 0.16703172028064728, -0.004523951094597578, 0.37661367654800415, 0.7555462718009949, -0.16955868899822235, 0.2810644805431366, 0.4936275780200958, 0.3471471667289734, -0.9999892115592957, 0.4227239787578583, -0.34544387459754944, -0.4459936022758484, -0.27211618423461914, 0.947013616561889...
def path ( * args, * * kwargs ) : if len ( args ) > 0 and isinstance ( args [ 0 ], string _ types ) : exparg = expanduser ( args [ 0 ] ) return pl _ path ( exparg, * args [ 1 : ], * * kwargs ) return pl _ path ( * args, * * kwargs )
[ 0.2722736895084381, 0.15092603862285614, 0.7569596171379089, 0.7476580142974854, -0.9415358901023865, 0.6788958311080933, 0.38901814818382263, -0.17375044524669647, 0.2044314444065094, -0.09494807571172714, 0.717658281326294, 0.1466832309961319, -0.9341717958450317, -0.30906638503074646, ...
def step ( self ) : self. update _ h ( ) for bc in self. boundaries : bc. update _ h ( ) self. update _ e ( ) for bc in self. boundaries : bc. update _ e ( ) for det in self. detectors : det. update ( ) self. current _ time _ step + = 1
[ -0.21645644307136536, -0.49485093355178833, 0.4488278925418854, 0.7351838946342468, 0.9017201066017151, 0.757537841796875, 0.17206090688705444, 0.028730405494570732, -1.1747336387634277, -0.6914530992507935, -0.568568766117096, -0.4990486204624176, -0.24790818989276886, 1.6883026361465454,...
def fetch ( cls, queue _ or _ queues, deadline = 10 ) : _ validatedeadline ( deadline ) if not queue _ or _ queues : return [ ] rpc = create _ rpc ( deadline ) cls. fetch _ async ( queue _ or _ queues, rpc ) return rpc. get _ result ( )
[ -0.06696820259094238, -0.20207726955413818, 0.5762108564376831, 0.6047031879425049, -0.022801732644438744, 0.3273952007293701, -1.8228780031204224, -0.36589065194129944, 0.45520973205566406, 0.10389261692762375, 0.05584516003727913, -0.1544470191001892, 0.0743340477347374, 0.46575707197189...
def executors ( * args ) : def executor _ decorator ( fn ) : " " " create a wrapped function with custom execution contexts. " " " def wrapped _ fn ( self, executor ) : " " " install a particular execution context before running ` fn `. " " " # executors inheriting from ` executor _ base. executor ` will need to be # w...
[ -0.5302050113677979, 0.6346871256828308, 0.6184098720550537, 0.12215056270360947, 0.7218730449676514, -1.0547873973846436, -0.09098829329013824, -0.0863892138004303, 0.5203197598457336, 0.17631526291370392, 0.20078150928020477, 0.6879652142524719, 0.5230830907821655, 0.5850275754928589, ...
async def test _ minimal ( ) : # note : at a minimum, [ cc ] onfig key must exist with non - null value image _ config = imageconfig ( b'{ " config " : { } }') config _ digest _ canonical = image _ config. get _ digest _ canonical ( ) signer = fakesigner ( ) assert await image _ config. sign ( signer ) = = signer. sign...
[ -0.3936483860015869, -0.2734602987766266, 0.4044126570224762, -0.05595382675528526, -0.07868485897779465, -0.23415005207061768, -0.020737791433930397, 0.23737990856170654, 0.1957380622625351, -0.10822094231843948, -0.9095941781997681, -0.6377161145210266, -0.2682081460952759, 1.23126804828...
def get _ entity _ by _ id ( self, entity _ id : int, get _ groups : bool = false ) : return self. _ db _ inst. get _ entity _ by _ id ( entity _ id, get _ groups = get _ groups )
[ -0.18565522134304047, -0.0014092879137024283, 0.3574884533882141, 0.07454843819141388, 1.432257056236267, -0.5597380995750427, 0.5014652013778687, -0.46412593126296997, -0.26497045159339905, 0.35024145245552063, 0.6626080870628357, 0.5196242928504944, -0.03403327241539955, 0.40974506735801...
def get _ devices _ by _ types ( self, types : list [ str ] ) - > list [ dict ] : return [ device for device in self. devices. values ( ) if device [ " type " ] in types ]
[ -0.848623514175415, 0.4236699342727661, 0.3262007534503937, 0.9464138150215149, 0.3738827109336853, -0.3622567355632782, -0.5406901240348816, -0.6411808729171753, -0.47978103160858154, 0.8017564415931702, 0.2903880178928375, 0.11886320263147354, -0.9055653214454651, 0.8777869939804077, -...
def test _ check _ input _ invalid _ chmap ( ) : with pytest. raises ( typeerror ) : mob. check _ inputs ('invalid ', basevalues _ idx = [ 0 ], window _ idx = 1, landmap = landmask )
[ 0.15577532351016998, -0.15443755686283112, 0.4352148175239563, 1.1151782274246216, 0.4656209647655487, 1.1844418048858643, -0.04852715879678726, -0.23451562225818634, 0.031919412314891815, -0.6679565906524658, 0.31453433632850647, 0.34234535694122314, -0.9054945707321167, 0.601674616336822...
def cartesian _ to _ spherical ( x, y, z ) : phi2 = np. arctan2 ( y, x ) * 180 / np. pi theta = np. arccos ( z ) * 180 / np. pi spherical = np. stack ( [ phi2, theta ], axis = - 1 ) return spherical
[ -0.34262344241142273, -0.654611349105835, 0.41477784514427185, -0.6620206832885742, -0.4737156331539154, -0.6550560593605042, -1.41002357006073, -0.8311038017272949, -0.0633968710899353, 0.764432430267334, -1.1280573606491089, 1.037178635597229, 0.47384172677993774, -0.7240636348724365, ...
def get _ metric ( self, reset : bool = false ) : if self. tp = = 0 : f1 = 0. else : precision = self. tp / ( self. tp + self. fp ) recall = self. tp / ( self. tp + self. fn ) f1 = 2. 0 / ( ( 1 / recall ) + ( 1 / precision ) ) return { " tagging _ f1 " : f1 }
[ 0.4136877954006195, 0.6889812350273132, 0.3969951570034027, -0.38499197363853455, 0.1376488357782364, -0.030090803280472755, 0.5765376091003418, -0.10556670278310776, -1.1410311460494995, 0.6710253357887268, 0.530210018157959, -0.0906568169593811, -0.0025675806682556868, 0.0131469294428825...
def datetime _ to _ discord ( time : datetime, format : str = " f " ) - > str : return f " < t : { int ( time. timestamp ( ) ) } : { format } > "
[ -0.5680665373802185, 0.0984610766172409, 0.5116775035858154, -0.8532107472419739, -0.2903488874435425, -0.49546700716018677, -1.963095784187317, -0.7003916501998901, 0.05676722526550293, 0.7953872680664062, -0.05078817903995514, 0.036839719861745834, 0.7927119731903076, 0.49572592973709106...
def random _ dag ( n _ nodes, edge _ threshold = 0. 5 ) : dag = directedgraph ( ) edges = [ ] for u in range ( n _ nodes ) : for v in range ( u + 1, n _ nodes ) : if random ( ) > edge _ threshold : dag. add _ edge ( u, v ) return dag
[ -0.76970374584198, 0.764339029788971, 0.24835747480392456, -0.1494501829147339, -0.8778914213180542, 0.05290062353014946, -0.30967262387275696, 0.30804121494293213, 0.6760128140449524, -0.04390658810734749, 0.09163891524076462, 0.10439227521419525, 0.34684908390045166, -0.07787266373634338...
def jacobi ( n, a, b, x, nopt = 1 ) : m = len ( x ) p = np. zeros ( ( m, n + 1 ) ) apb = a + b a1 = a - 1 b1 = b - 1 c = apb * ( a - b ) p [ :, 0 ] = 1 if n > 0 : p [ :, 1 ] = 0. 5 * ( a - b + ( apb + 2 ) * x ) if n > 1 : for k in xrange ( 2, n + 1 ) : k2 = 2 * k g = k2 + apb g1 = g - 1 g2 = g - 2 d = 2. 0 * ( k + a1 )...
[ 0.46826526522636414, -0.11997845023870468, 0.7174049019813538, 0.195499449968338, -0.9242131114006042, -0.04766913130879402, 0.20658355951309204, -0.5985819101333618, -0.08215952664613724, 0.7934834957122803, 0.31853988766670227, -0.14952023327350616, -0.40642061829566956, -0.1718245893716...
def parse _ runs ( run _ info, parse _ links = true ) : message _ info = {'message':'' } message _ emotes = { } runs = run _ info. get ('runs') or [ ] for run in runs : if'text'in run : if parse _ links and'navigationendpoint'in run : # is a link and must parse # if something fails, use default text message _ info ['me...
[ -0.4838254153728485, -0.33387330174446106, 0.7739593386650085, -0.3849433362483978, -0.2769843637943268, -0.18582548201084137, -0.3892481029033661, -0.523307740688324, -0.23352709412574768, 0.35555145144462585, -0.5388274192810059, 0.29559949040412903, -0.5402534008026123, 1.00589311122894...
def generate _ entity _ schema ( entity, context, declaring _ type, meta ) : properties = get _ properties ( entity ) type _ weights = murano _ type. weigh _ type _ hierarchy ( declaring _ type ) schema = {'$ schema':'http : / / json - schema. org / draft - 04 / schema # ','type':'object ','properties': { name : genera...
[ -0.5860140919685364, -0.1727847009897232, 0.6611481308937073, -0.2496386170387268, 0.13288800418376923, 0.25691062211990356, -0.4285599887371063, 0.15943895280361176, -0.3750084340572357, 0.23220613598823547, 0.08980540186166763, -0.14089788496494293, 0.8513474464416504, 0.5826744437217712...
def num _ layers ( self ) : return self. depth + 1
[ -0.6804017424583435, 0.6944512724876404, 0.43368446826934814, 0.7112599611282349, 0.17524801194667816, 0.45066797733306885, 1.058335781097412, -0.4742233455181122, 0.7215071320533752, -1.334218144416809, -0.9868093132972717, 0.5495275855064392, -0.043779727071523666, 0.37036558985710144, ...
def prob _ no _ error ( pop, errprob, npts ) : def choose ( n, k ) : n, k = int ( n ), int ( k ) v = 0. if k > n / 2 : v + = sum ( map ( math. log, xrange ( k, n + 1 ) ) ) v - = sum ( map ( math. log, xrange ( 1, n - k + 1 ) ) ) else : v + = sum ( map ( math. log, xrange ( n - k, n + 1 ) ) ) v - = sum ( map ( math. log...
[ 0.6501947641372681, 0.07976965606212616, 0.5846921801567078, 0.27784889936447144, -0.9290880560874939, 0.6607071161270142, 0.6878889799118042, -0.1306067705154419, 0.30081304907798767, 0.746383786201477, -0.39243650436401367, -0.25521621108055115, -0.6893817782402039, -0.40101730823516846,...
def select _ samples ( fm, rg, nbins = 110, pdf _ zh _ max = 20000, pdf _ relh _ max = 10000, sigma _ zh = 0. 75, sigma _ relh = 1. 5, randomize = true, platykurtic _ dbz = true, platykurtic _ h _ iso0 = true ) : nsamples = fm. shape [ 0 ] if randomize : print ('randomizing data') nfeatures = fm. shape [ 1 ] for i in r...
[ -0.2602820098400116, -0.25106504559516907, 0.7091600298881531, 0.14409111440181732, -0.08315730839967728, -0.2859901487827301, 0.5423510670661926, -0.226581409573555, 0.04926320165395737, -0.1634817272424698, 0.7748076915740967, 0.4841458201408386, -0.582523763179779, 0.005851407535374165,...
def marklines ( self, lines ) : if lines is none : return self. _ image for l in lines : a = self. _ reversecoordinates ( l. a [ 0 ], l. a [ 1 ] ) b = self. _ reversecoordinates ( l. b [ 0 ], l. b [ 1 ] ) cv2. line ( self. _ image, a, b, red _ bgr, 3 ) return self. _ image
[ -0.23729968070983887, -0.14778012037277222, 0.6222418546676636, 0.10322467982769012, 1.28399658203125, -0.02102772891521454, -0.4025469422340393, -0.09481360018253326, 0.6023735404014587, -0.1986701786518097, 0.3270500600337982, -0.17326323688030243, 0.05816775560379028, 0.4579611718654632...
def code ( self, name ) : return self. _ _ temple _ codes. get ( name, _ ( " unknown " ) )
[ -0.8052196502685547, 0.22592009603977203, 0.23353810608386993, -0.38816991448402405, -0.3952111601829529, 0.2061879187822342, 0.35268014669418335, -0.4892246425151825, 1.0821396112442017, 0.38279980421066284, -0.5442027449607849, -0.0558968260884285, 0.08625798672437668, -0.024280531331896...
def read _ config ( config _ file ) : cfg = configparser. configparser ( ) try : cur _ dir = os. path. dirname ( os. path. abspath ( _ _ file _ _ ) ) if os. sep not in config _ file : config _ file = cur _ dir + os. sep + config _ file config _ ini _ info = { " ip " : " ", " user " : " ", " passwd " : " ", " auth " : "...
[ 0.2757084369659424, -1.017447829246521, 1.0218548774719238, 0.6133313775062561, 0.18995390832424164, 0.5802896022796631, 0.16020023822784424, 0.4563573896884918, -1.388505458831787, 0.8618380427360535, -0.2294730693101883, -0.9500417709350586, -0.8672027587890625, 0.013119776733219624, 1...
def create _ entry ( self, sql, entry ) : conn = self. conn # sql ='''insert into crqram ( valid, creqid, addr, addr _ full, afuid, virtualafu, ial _ attr, mdata, needreissue, bbsopcode, op _ type, rdbufaddr, target, waitdfc, waitextcmp, waitgo, wrbufi ) # values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,? )'''# with conn : cur...
[ 1.1566989421844482, -0.2549254894256592, 0.8640454411506653, 0.3599603772163391, 0.5065715909004211, -0.005861940793693066, 0.38140562176704407, 0.06320841610431671, 0.07358131557703018, 0.17898252606391907, 0.04378967732191086, -0.22358517348766327, -1.625033974647522, 0.16193725168704987...
def _ verify _ oakland _ sheet ( sheet : xlrd. sheet. sheet ) : keys = dict ( ) reasons = [ ] _ cols = ('a ','b ','c ','d ','e ','f ','g ','h') # row index, column index, expected contents, whether this column is a column name for the dataframe checks = [ ( 2, 0,'year ', false ), ( 2, 1,'month ', false ), ( 2, 2,'impor...
[ -0.047493696212768555, -0.021235186606645584, 0.6815126538276672, -0.3104524612426758, -0.4287276566028595, -0.24478663504123688, -0.07180404663085938, -0.5654545426368713, 0.06767848879098892, 0.46730515360832214, -0.0684322863817215, 0.33023181557655334, 0.5170770287513733, 0.59903246164...
def _ find _ vios ( vios _ list, lpar _ id ) : for vio _ server in vios _ list : if vio _ server. lpar _ id = = lpar _ id : return vio _ server return none
[ 0.8291999101638794, -1.6590440273284912, 0.3411983847618103, 0.2254120111465454, 0.5012186765670776, 0.1900651752948761, -0.8220505714416504, -0.4649254381656647, 1.0394093990325928, 0.593329906463623, -0.12501636147499084, 0.27492570877075195, -0.5481072664260864, 0.2880078852176666, -0...
def predict _ from _ df ( self, start _ date _ str : str, end _ date _ str : str, npis _ df : pd. dataframe, verbose = false ) - > pd. dataframe : start _ date = pd. to _ datetime ( start _ date _ str, format ='% y - % m - % d') end _ date = pd. to _ datetime ( end _ date _ str, format ='% y - % m - % d') nb _ days = (...
[ 0.09020784497261047, -0.3580320477485657, 0.6039763689041138, -0.25411638617515564, -0.2869231700897217, 0.26281285285949707, 0.3860832452774048, 0.24288615584373474, -0.8150075674057007, -0.14425542950630188, 0.8650212287902832, 0.3587411642074585, 0.7723831534385681, -0.01029249746352434...
def accuracy ( output, target, topk = ( 1, ) ) : with torch. no _ grad ( ) : maxk = max ( topk ) batch _ size = target. size ( 0 ) _, pred = output. topk ( maxk, 1, true, true ) pred = pred. t ( ) correct = pred. eq ( target. view ( 1, - 1 ). expand _ as ( pred ) ) res = [ ] for k in topk : correct _ k = correct [ : k ...
[ -0.7888464331626892, -0.5859820246696472, 0.6807271838188171, 0.7689267992973328, -0.5349292755126953, -0.4578985273838043, 1.1418228149414062, 0.7968666553497314, -0.3669600784778595, 0.6510764956474304, 0.169838547706604, 0.34088608622550964, 1.326282024383545, 0.31283384561538696, -0....
def _ collate ( seqs ) : feats, inseqs, targets = zip ( * seqs ) seqlens = [ len ( ff ) for ff in feats ] _, feats, inseqs = zip ( * sorted ( zip ( seqlens, feats, inseqs ), key = lambda x : x [ 0 ], reverse = true ) ) feats = pack _ sequence ( [ from _ numpy ( f ). float ( ) for f in feats ] ) if inseqs : inseqs = [ f...
[ 0.06031978875398636, -0.28983840346336365, 0.6780003905296326, 0.06455474346876144, -0.01819673925638199, -0.7991709113121033, -0.07080507278442383, -0.009517384693026543, 0.3979394733905792, 0.26491838693618774, 0.14308610558509827, -0.028127240017056465, 0.16295412182807922, 0.5287796258...
def test _ setup _ policy _ name ( self ) : self. render _ config ( ) exit _ code = self. run _ beat ( logging _ args = [ " - v ", " - d ", " * " ], extra _ args = [ " setup ", self. cmd, " - e ", " setup. ilm. policy _ name = " + self. custom _ policy ] ) assert exit _ code = = 0 self. idxmgmt. assert _ ilm _ template...
[ 0.17201124131679535, -0.3426028788089752, 0.6287229657173157, -0.9545235633850098, 0.3530000150203705, 1.1529114246368408, 0.06945299357175827, 0.588431179523468, 0.33874672651290894, 0.573350727558136, -0.46708935499191284, 0.23454876244068146, -0.1380586177110672, -0.24922922253608704, ...
def pk ( self ) : return self. pk _
[ 0.320213258266449, -0.3560721278190613, 0.32078349590301514, 0.4956355094909668, 0.8357369899749756, 1.5048478841781616, 1.7161635160446167, 0.49036943912506104, 0.3158717751502991, -0.921173095703125, 0.8788926601409912, 0.11073958873748779, 0.09530501812696457, -0.9320075511932373, -0....
def baseimage ( self, value ) : self. _ modify _ instruction ('from ', value )
[ -0.36330798268318176, -0.14458432793617249, 0.2858172655105591, 0.6148167848587036, -0.20829825103282928, 0.8716235160827637, 1.3605252504348755, 0.06290390342473984, -0.25680577754974365, 0.1893325299024582, 0.061047833412885666, 0.7215877771377563, -0.12086868286132812, 0.843672394752502...
def load _ task _ settings ( self ) : self. _ task _ settings = nwbio. load _ settings ( self. fpath,'/ tasksettings /')
[ -0.2782478928565979, 0.8721317648887634, 0.24316219985485077, 0.35695257782936096, -0.3650641143321991, 0.3153957724571228, 1.2629315853118896, -0.638145923614502, -1.2396652698516846, 1.0338002443313599, -0.8801558613777161, -0.5256660580635071, -0.4572436809539795, 0.04963938519358635, ...
def test _ onhandshake ( self ) : authd = [ ] def authenticated ( xs ) : authd. append ( xs ) xs = self. xmlstream xs. addonetimeobserver ( xmlstream. stream _ authd _ event, authenticated ) xs. sid ='1234'thehash ='32532c0f7dbf1253c095b18b18e36d38d94c1256'xs. authenticator. onhandshake ( thehash ) self. assertequal ('...
[ 0.6794873476028442, 0.24424149096012115, 0.49838051199913025, 0.40427422523498535, 0.20313221216201782, -0.04289008677005768, -0.600415825843811, 0.16335423290729523, 0.8743053078651428, -1.2170425653457642, -0.45378684997558594, -0.3649924695491791, -0.36400946974754333, 0.799585998058319...
def sslyze ( hostname, port = 443, timeout = 5, starttls _ smtp = false, scan _ tlsv10 = false, scan _ tlsv11 = false, scan _ tlsv12 = false, scan _ tlsv13 = false, scan _ sslv20 = false, scan _ sslv30 = false, scan _ cert _ info = false ) : # boto3 client for lambda lambda _ client = boto3 _ client ('lambda ', region ...
[ -0.05972481146454811, 0.3766525387763977, 0.9741880893707275, -0.24129660427570343, -1.0824010372161865, -0.26885437965393066, -0.16265182197093964, -0.3824796974658966, 0.11593927443027496, 0.8646896481513977, -1.2029874324798584, 0.4172617197036743, -0.222420334815979, -0.186569467186927...
def check _ modem ( ser, timeout = 0. 5 ) : ser. write ('at \ r') res = wait _ for _ strs ( ser, ['ok'], timeout = timeout ) if'error'in res : return false return true
[ -0.6593309044837952, -0.3368366062641144, 0.6436781287193298, -0.011227174662053585, -0.7105149030685425, 0.40957435965538025, -0.6928972601890564, -0.8505634069442749, -0.24649189412593842, 0.43078210949897766, -0.40404853224754333, 0.5271159410476685, -0.37848377227783203, -0.14185445010...
def test _ set _ parameter _ value _ long ( self ) : pass
[ -0.8879210352897644, 1.018042802810669, 0.5977145433425903, 0.49075454473495483, 0.4458800256252289, 0.3865658938884735, 0.4138786494731903, 0.26291516423225403, -0.5164105296134949, -0.1299968659877777, -1.1812578439712524, 0.744638204574585, 0.1309126913547516, 0.8732112646102905, -1.0...
def route ( cls, route _ str ) : def decorator ( f ) : cls. _ routes [ route _ str ] = f return f return decorator
[ -0.800771176815033, -0.3913915455341339, 0.13211941719055176, -0.6558603644371033, -0.02101910673081875, -0.3828248083591461, -0.1043282225728035, 0.5749015212059021, 0.3579491078853607, -0.48843446373939514, -0.0857970267534256, 0.39570361375808716, 0.6102569103240967, -0.1515223383903503...
def send ( self, buffer ) : try : self. connection. sendall ( self. codec. encode ( buffer ) ) except exception as e : raise udsexception ( str ( e ) )
[ -0.6426165699958801, 0.6065794229507446, 0.42542868852615356, 0.3954794704914093, 0.07002831250429153, 0.6437035202980042, -0.8264853358268738, -0.7114424705505371, 0.10629604011774063, -1.024549961090088, -0.9101487994194031, 0.549456775188446, -0.8632850050926208, 0.32065895199775696, ...
def get _ gpu _ count ( self ) : return int ( query _ target _ count ( self, gpu ( ) ) )
[ -0.5506944060325623, 0.5274657011032104, 0.6385575532913208, 0.7997959852218628, 1.2283025979995728, -0.13087646663188934, -0.10263538360595703, -0.039680033922195435, -0.13512976467609406, -0.5205433964729309, 0.5728532671928406, 0.26869997382164, -0.08496817201375961, -0.2964194715023041...
def calc _ bandsel _ reg ( self, model ) : if ( model. vars. lodiv _ actual. value = = 1 ) : self. _ reg _ write ( model. vars. rac _ ifpgactrl _ bandsel, 0 ) else : self. _ reg _ write ( model. vars. rac _ ifpgactrl _ bandsel, 1 )
[ -0.6545801758766174, 0.03511853516101837, 0.35594266653060913, 0.17885571718215942, 1.0004585981369019, 0.7097153663635254, 1.0352485179901123, -0.6183236837387085, -0.6424307227134705, -0.2613101601600647, -0.7213512659072876, 0.17336639761924744, -0.8421873450279236, 0.7527815699577332, ...
def execute _ many _ query ( connection, query, tuples ) : cursor = connection. cursor ( ) try : # noqa : wps229 cursor. executemany ( query, tuples ) connection. commit ( ) except error as err : raise dberror ('query { 0 } failed '. format ( query ) ) from err
[ -0.6621741652488708, 0.6653676629066467, 0.49111273884773254, 0.12797167897224426, 0.8599162101745605, 0.08765194565057755, -0.8914570808410645, -0.014429104514420033, -0.6632612347602844, 0.616757333278656, 0.4971395432949066, -1.4081313610076904, 0.2102564126253128, 0.20274300873279572, ...
def target _ id ( self ) : return self. _ target _ id
[ 0.6081410646438599, -0.6981193423271179, 0.16540862619876862, 0.16011400520801544, 1.4563555717468262, 0.9639638066291809, 0.3611980378627777, 0.9503504633903503, 0.8294798135757446, -0.325569212436676, 0.9330992102622986, 1.1037373542785645, -0.2906317412853241, -0.5308007597923279, -0....
async def get _ device ( self, request : smart _ device _ management _ service. getdevicerequest = none, *, retry : retries. retry = gapic _ v1. method. default, timeout : float = none, metadata : sequence [ tuple [ str, str ] ] = ( ), ) - > device. device : # create or coerce a protobuf request object. request = smart...
[ -1.0170549154281616, 0.9201928973197937, 0.6918277740478516, 0.5546143054962158, 0.5143102407455444, -0.1257457137107849, -0.23732370138168335, -1.1275440454483032, 0.14253009855747223, -0.3936641216278076, 0.7354761362075806, 1.5830302238464355, -0.4666593372821808, -0.46858569979667664, ...
async def test _ wait _ for _ travis ( mocker, statuses, result ) : get _ status _ mock = mocker. async _ patch ('wait _ for _ travis. get _ status _ of _ pr') get _ status _ mock. side _ effect = statuses sleep _ sync _ mock = mocker. async _ patch ('asyncio. sleep') token ='token'org ='org'repo ='repo'branch ='branch...
[ 0.3863694369792938, 1.076035737991333, 0.4756130576133728, 0.373197466135025, 1.0583397150039673, 0.8371440172195435, -0.2786421477794647, 0.5471522808074951, -0.625863790512085, -0.3567088544368744, -0.29050520062446594, -0.7975738048553467, 0.4513784348964691, -0.3894154131412506, 0.54...
def test _ get _ list _ received _ on ( self ) : start _ date = datetime ( 1969, 6, 14 ) end _ date = datetime ( 2011, 1, 2 ) expected = [ {'term': {'domain. exact':'qwerty'} }, {'term': {'doc _ type':'xforminstance'} }, {'range': {'received _ on': {'gte': start _ date. isoformat ( ),'lte': end _ date. isoformat ( ) } ...
[ -0.12484288960695267, -0.08182108402252197, 0.6439440846443176, -0.6242048740386963, 0.5482040643692017, -0.0785243958234787, -1.1119123697280884, 0.7085569500923157, -0.24596856534481049, -0.2270280420780182, -0.909905195236206, 0.24124744534492493, 0.6982241272926331, 0.42437034845352173...
def check _ node ( self, * path, * * kwargs ) : return self. check _ uncheck _ node ( true, * path, * * kwargs )
[ -1.156004548072815, 0.17588891088962555, 0.3271366059780121, 0.6136303544044495, 0.3682412803173065, -0.2795983850955963, 0.1725233942270279, 0.37362244725227356, -0.7234811782836914, 0.45800507068634033, 0.18170657753944397, 0.4563892185688019, -0.5286601185798645, -0.17186826467514038, ...
def user _ email ( self ) - > pulumi. output [ str ] : return pulumi. get ( self, " user _ email " )
[ 1.042041301727295, 0.0748029351234436, 0.32386451959609985, 0.8966735601425171, -0.164754256606102, 0.8884354829788208, 0.577816903591156, 0.45581933856010437, -0.23642882704734802, -0.158394455909729, 0.39864102005958557, 1.056060791015625, 0.6417899131774902, -1.9052202701568604, -0.67...
def _ get _ network _ type ( self ) : return collections. namedtuple ('c51 _ network ', ['q _ values ','logits ','probabilities'] )
[ -0.5918930172920227, 0.5853164792060852, 0.16987578570842743, -0.34341317415237427, 0.6584686040878296, 0.6689328551292419, -0.5189855098724365, -0.9708610773086548, 0.17080193758010864, -0.6298214197158813, -0.8981708884239197, -0.4801006317138672, -0.29222142696380615, 0.3861887156963348...
def loss _ ( self, x, z ) : return self. apply _ minibatches _ function ( super ( cnn, self ). loss, x, z )
[ 0.5231912136077881, -0.6001994609832764, 0.11457180231809616, 1.0591140985488892, -0.8453263640403748, -0.32359275221824646, 0.03782806545495987, 0.15868160128593445, 0.6214113235473633, -0.8072976469993591, -0.9195409417152405, 0.06758216768503189, -0.41434285044670105, -0.387310445308685...
def getuserids ( url, seleniumon = false ) : soup = urltosoup ( url, selenium = seleniumon ) allurls = soupparser. getalllinks ( soup ) pattern = " / user / ( [ 0 - 9 ] { 3, 6 } ) / " userids = parse _ bs4urls ( allurls, key ='href ', pattern = pattern, groupnum = 1 ) return userids
[ -0.8271030187606812, -0.0760980173945427, 0.548737645149231, 1.2109299898147583, -0.26841428875923157, 0.18394184112548828, 0.605197012424469, 0.8387002944946289, 0.8871710896492004, 0.3025643229484558, -0.9692773222923279, 0.009572927840054035, -0.4677371382713318, 0.2860282063484192, 0...
def convertdollarseuros ( us _ dollars ) : euros = us _ dollars / euro _ conversion _ rate return euros
[ -0.8353499174118042, 0.9747698307037354, 0.18883898854255676, 0.4490894079208374, -0.42431607842445374, -0.3990563750267029, -0.11842135339975357, 0.46136167645454407, 0.5921742916107178, 0.53852379322052, -0.09828826040029526, -0.5240035653114319, 0.6171477437019348, 0.17792025208473206, ...
def rename _ project ( ) : if'uid'in session : user _ id = session ['uid'] project _ id = request. form [ " pid " ] ptitle = request. form [ " ptitle " ] project _ config _ path = get _ project _ config _ path ( user _ id, project _ id ) project = project ( project _ config _ path ) project. update _ project _ title ( ...
[ -0.40684160590171814, -0.5591858625411987, 0.45527541637420654, 0.41824790835380554, -0.565238893032074, 0.2702009975910187, -0.7141473293304443, -0.33761709928512573, -0.24547894299030304, 0.8623777031898499, 0.0029926409479230642, 0.5020169615745544, -0.12271548062562943, -0.246425077319...
def _ disconnect ( self, recursion = none ) : self. _ stop _ event _ dispatch ( ) # self. event _ subscriber. stop ( ) # self. event _ subscriber = none ciomsclientfactory. destroy _ instance ( self. _ rsn _ oms ) self. _ rsn _ oms = none log. debug ( " % r : ciomsclient instance destroyed ", self. _ platform _ id ) se...
[ 0.2085520476102829, -0.4964752793312073, 0.3697779178619385, -0.16256816685199738, -0.11427770555019379, -0.5903652310371399, 0.6585366129875183, 0.8757953643798828, -0.09162382036447525, -0.49957188963890076, -0.1382293999195099, 0.2031860053539276, -0.4580395519733429, 0.1490454971790313...
def euclidean _ distance ( row1, row2 ) : return np. sqrt ( ( row1. x - row2. x ) * * 2 + ( row1. y - row2. y ) * * 2 )
[ 0.15376664698123932, -0.508333146572113, 0.6423665881156921, -0.22039727866649628, 0.03103744052350521, 0.1341472864151001, -0.5713555216789246, 0.1774909943342209, 0.006447210907936096, 1.081633448600769, 0.20844943821430206, 0.6237160563468933, 0.2390909641981125, -0.1925688236951828, ...
def run _ subprocess ( base, * args, * * kwargs ) : f = [ base ] # add positional arguments for a in args : f. append ( a ) # add keyword arguments for kw in kwargs : if len ( kw ) > 1 : f. append ( " - - " + kw ) else : f. append ( " - " + kw ) f. append ( kwargs [ kw ] ) # run command using args. run = subprocess. po...
[ 0.204422727227211, -0.8789505362510681, 1.039768934249878, 0.37241330742836, -0.06263281404972076, 0.40642598271369934, -0.1327587217092514, -0.3080756664276123, -0.49550336599349976, -0.3837604522705078, 0.229864239692688, 0.2653610110282898, -0.27879446744918823, 0.12872697412967682, -...
def test _ check _ config _ params _ nb _ processes _ wrong _ type ( gitdelver _ config _ params _ fixture : callable [ [ none ], dict [ str, str ] ] ) : config _ params = gitdelver _ config _ params _ fixture config _ params [ " nb _ processes " ] = " test " with pytest. raises ( systemexit ) : gitdelver. _ check _ co...
[ 0.2519385814666748, 0.6238154768943787, 0.4472302794456482, 0.07372859865427017, 0.8239178657531738, 0.465526819229126, -0.26082277297973633, -0.27244627475738525, -0.6006067991256714, 0.8356475830078125, -0.6184733510017395, 0.11388330906629562, -0.6236154437065125, 1.5173429250717163, ...
def get _ deskew _ function ( input _ shape : iterable [ int ], dz _ stage : float, xypixelsize : float, angle : float, interp _ order : int = 1 ) - > callable : # todo : also read up on toolz and a function currying here # https : / / toolz. readthedocs. io / en / latest / curry. html # https : / / github. com / elega...
[ -0.37947067618370056, -0.042641714215278625, 0.5643240809440613, -0.17831489443778992, -0.6832684278488159, -1.2699884176254272, 0.5160471200942993, -0.22357341647148132, 0.12573637068271637, -0.2658577561378479, 0.07793036103248596, -0.04180731996893883, 0.7143378853797913, 0.076690964400...
def get _ ref ( self, doc _ id ) - > documentreference : eventref = self. eventcollectionref. document ( doc _ id ) return eventref
[ 0.7844240069389343, -0.3467920124530792, 0.4209597110748291, -0.41753435134887695, -0.1566219925880432, -0.5576162338256836, 0.23183532059192657, -0.2627943456172943, 0.4720684885978699, 0.1483040302991867, 0.5952566266059875, 0.9671395421028137, -0.12538166344165802, 0.5382347106933594, ...
def is _ optional _ type ( tp : type ) - > bool : # all optional type hints satisfy : # * being an instance of the typing. _ genericalias class # * having an _ _ origin _ _ that is typing. union # * there is exactly one item in _ _ args _ _ that is not nonetype # except for literals ( sigh ), which are just regular lit...
[ -0.7995981574058533, -0.6927214860916138, 0.6114487648010254, -0.18044094741344452, 0.44534891843795776, 0.522530198097229, 0.2003895789384842, -0.636582612991333, 0.25582990050315857, 0.9521436095237732, -0.062314748764038086, -0.029200909659266472, -0.3734681010246277, 0.6809326410293579...
def grid ( self, x, y, z, p = 0. 5 ) : xvalues = { } for m in self. models : xvalues [ m. params [ x ] ] = true xvalues = sorted ( xvalues. keys ( ) ) yvalues = { } for m in self. models : yvalues [ m. params [ y ] ] = true yvalues = sorted ( yvalues. keys ( ) ) zvalues = zeros ( ( len ( yvalues ), len ( xvalues ) ) ) ...
[ -0.21127267181873322, 0.12163065373897552, 0.42793476581573486, -0.11406882852315903, 0.4201752841472626, 0.4601406157016754, -0.04123819246888161, 0.15314416587352753, -1.2629106044769287, 0.41567128896713257, -0.1957644820213318, -0.018635287880897522, -0.6262964010238647, 1.104984879493...
async def game _ invitations ( self, ctx : ctx ) : games = ctx. session. get _ invites ( ) await paginator ( ctx, games, format _ open _ game, f'{ ctx. session. user. username } \'s invitations'). display _ page ( )
[ -0.1645691990852356, 0.3791651725769043, 0.5892423391342163, 0.2693289816379547, 0.23331457376480103, 0.04550664499402046, -0.4439990222454071, 0.20866650342941284, -0.26860305666923523, 0.6526214480400085, 0.255687952041626, 0.9677952527999878, -0.32338207960128784, -0.07247882336378098, ...
def model _ type ( self ) : return self. _ model _ type
[ -0.3842029571533203, 0.27013343572616577, 0.08233124762773514, 0.8126364350318909, 2.17822003364563, 1.4729270935058594, 1.0308095216751099, -0.2771090269088745, 0.7080764770507812, 0.11464443057775497, -0.5981470346450806, 0.5684791803359985, -0.3429686725139618, -0.0749170333147049, 0....
def calcprob ( self, th = 2. 0 ) : return sum ( self. twalk. output [ :, 1 ] < = th ) / float ( self. twalk. t )
[ 0.48607900738716125, 0.5339154005050659, 0.44452011585235596, -0.16950249671936035, -0.1599925309419632, 0.30464237928390503, 0.647649884223938, -1.0949227809906006, -0.30525195598602295, 0.4460298418998718, 0.06198776513338089, -0.70738685131073, -0.5155448317527771, 0.2381921112537384, ...
def make _ message ( cls, obj ) : if not obj. get ( " @ type " ) : raise messageparseerror ( " message does not contain'@ type'parameter " ) # connection messages if obj [ " @ type " ] = = messagetypes. connection _ invitation. value : return connectioninvitation. deserialize ( obj ) elif obj [ " @ type " ] = = message...
[ -0.31063809990882874, -0.28902292251586914, 0.9254670143127441, -0.25473645329475403, -0.5180113911628723, 0.515059769153595, -0.20954273641109467, -1.365738034248352, 0.2391705960035324, -0.3235834836959839, 0.0979490578174591, 0.020960163325071335, -0.5803773999214172, 0.3060725629329681...
def extract _ crisp _ parameters ( self ) : eoq _ token = " ~ ~ ~ end _ token ~ ~ ~ " if self. fuzzy _ query = = " " : raise syntaxexception ( " empty query " ) tokens = list ( filter ( lambda x : len ( x ) > 0, self. fuzzy _ query. split ('' ) ) ) tokens. append ( eoq _ token ) modifiers _ synonyms = get _ modifiers _...
[ -0.8762120008468628, -0.8023487329483032, 0.752991795539856, -0.1667497754096985, 0.11758416146039963, -1.3342634439468384, 0.055493470281362534, 1.060749888420105, -0.20175039768218994, 0.3095645606517792, -0.24466237425804138, 0.49823883175849915, -0.0728701800107956, 0.8443190455436707,...
def dims ( self ) : return self. pile. dims + self. geobox. dimensions
[ 0.28346115350723267, 0.5596380829811096, 0.23854142427444458, -0.2500937879085541, 0.5073357820510864, 0.9561092853546143, 0.047858454287052155, 0.11020124703645706, 0.47543656826019287, -0.11808554083108902, -0.35346701741218567, -0.26686227321624756, -0.1102074533700943, 0.30737331509590...
def mv _ index _ and _ ivfdata ( self, index _ path : union [ str, path ], ivfdata _ path : union [ str, path ], to _ dir : union [ str, path ], mkdir : bool = false, only _ cp : bool = false ) - > int : index _ path, ivfdata _ path = p. abspath ( index _ path ), p. abspath ( ivfdata _ path ) assert p. isfile ( index _...
[ -0.7290776968002319, 0.014391188509762287, 0.953542172908783, 0.4408031404018402, 0.022596124559640884, 0.5786289572715759, 0.9610068202018738, 0.36862823367118835, 0.4278005063533783, 0.42958301305770874, 0.2674611508846283, 0.713672935962677, 0.025403689593076706, -0.806807279586792, 0...
def stop ( self ) : # print ( " stop " ) self. pause ( ) # now we purge and save duplicates : # browser. duplicates. purgeandsave ( ) # deprecated # here we can display all url which failed : # if len ( self. failedurls ) > 0 : # logwarning ( " these urls failed : \ n " + listtostr ( self. failedurls ), self ) # and we...
[ -0.33867916464805603, -0.32782065868377686, 0.46372100710868835, -0.0656890943646431, 0.6740012764930725, 0.16840845346450806, 0.040314000099897385, 0.574715793132782, 0.9686570167541504, -0.096290223300457, -0.6858639717102051, -0.08298079669475555, -0.21826793253421783, 0.313059002161026...
def _ process _ status ( self, status ) : self. screen _ id = status. get ( attr _ screen _ id )
[ -0.40062305331230164, -0.7465332746505737, 0.15768633782863617, -0.16103330254554749, 0.01106270682066679, 0.16152140498161316, -0.27825191617012024, 0.2996844947338104, 0.9006274342536926, 0.46004658937454224, -0.34174033999443054, -0.10631583631038666, 0.6627065539360046, 1.5166953802108...
def get _ filtered _ wikidata ( wikidata _ file, category, rating, min _ num _ of _ movies = 5, num _ of _ influencers = 50, year = none ) : " " " get the notable points ( cast members, directors, genres ) of a movie and the score in question ( money return or rotten tomatoes score ) : param wikidata _ file : string, n...
[ -0.41382330656051636, -0.485084593296051, 0.555170476436615, -0.14659835398197174, -0.41060686111450195, 0.064414381980896, -0.9494010806083679, 0.9099332690238953, -0.9468657374382019, 0.6645439267158508, 0.30710989236831665, 1.104289174079895, -0.03383573144674301, -0.0767076388001442, ...
def do _ insert ( self, * * kwargs ) : _ nswc = ramstknswc ( ) _ nswc. hardware _ id = kwargs ['hardware _ id'] _ error _ code, _ msg = ramstkdatamodel. do _ insert ( self, entities = [ _ nswc, ] ) if _ error _ code = = 0 : self. tree. create _ node ( _ nswc. hardware _ id, _ nswc. hardware _ id, parent = 0, data = _ n...
[ 0.14678855240345, 1.3655059337615967, 0.7553478479385376, -0.13885989785194397, 0.8309964537620544, -0.14518487453460693, 0.3843543529510498, -0.5134565234184265, -0.7231341004371643, 0.12226758152246475, -0.8256058096885681, 0.05152258276939392, -0.732876181602478, 0.7703618407249451, -...