text
stringlengths
25
2.19k
embedding
listlengths
768
768
def test _ atomic _ boolean _ white _ space _ 3 _ nistxml _ sv _ iv _ atomic _ boolean _ white _ space _ 4 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / boolean / schema + instance / nistschema - sv - iv - atomic - boolean - whitespace - 4. xsd ", instance = " nistdat...
[ -0.50123530626297, 0.21182478964328766, 0.4391954243183136, 0.6156134605407715, 0.003267888445407152, 0.4987592101097107, 0.21415673196315765, -0.38391733169555664, 0.17719469964504242, 1.0137701034545898, 0.03672684356570244, 0.07161596417427063, -0.245701402425766, 0.011303945444524288, ...
def generate _ twi _ blobs ( nside, nexp = 2, exptime = 30., filter1s = ['r ','i ','z ','y'], filter2s = ['i ','z ','y ','y'], pair _ time = 15., camera _ rot _ limits = [ - 80., 80. ], n _ obs _ template = 3, season = 300., season _ start _ hour = - 4., season _ end _ hour = 2., shadow _ minutes = 60., max _ alt = 76....
[ -0.1507357656955719, 0.4153524935245514, 0.9870594143867493, 0.4857316017150879, -0.25965389609336853, 0.6650611758232117, 0.18551291525363922, -0.5205379724502563, 0.07567502558231354, 0.4699821174144745, -0.5629874467849731, 0.26106247305870056, -0.3612527549266815, 0.9933775067329407, ...
def _ prepare _ field ( self, f : npt. ndarray [ np. complex _ | np. float _ ], ) - > npt. ndarray [ np. float _ ] : boosted _ field = sleplet. plot _ methods. _ boost _ field ( f, self. l, self. resolution, reality = self. reality, spin = self. spin, upsample = self. upsample, ) field _ space = sleplet. plot _ methods...
[ 0.6594359874725342, 0.9195511341094971, 0.3153703808784485, -0.05604849383234978, -0.40847256779670715, -0.08771802484989166, 0.35157692432403564, -0.24736766517162323, 0.7221814393997192, -0.37668389081954956, -0.02419147454202175, 0.3043098449707031, 0.4611532390117645, 0.091895855963230...
def evolve ( pop, target, retain = 0. 2, random _ select = 0. 05, mutate = 0. 01 ) : graded = [ ( fitness ( x, target ), x ) for x in pop ] graded = [ x [ 1 ] for x in sorted ( graded ) ] # choose top 20 % individuals from the population as possible parents retain _ length = int ( len ( graded ) * retain ) parents = gr...
[ -0.739434540271759, 0.5733156800270081, 0.9373722076416016, -0.13538937270641327, 0.25144314765930176, 0.37069326639175415, 0.3493553698062897, -0.623822808265686, 0.40918344259262085, 0.6425761580467224, -0.4762318432331085, 0.45568937063217163, -0.08950892835855484, -0.18991106748580933,...
def getteam ( self ) : return self. team
[ 0.45455849170684814, -0.48124170303344727, 0.17645762860774994, 0.663763701915741, 0.8815469145774841, 0.6311571002006531, -0.07157666981220245, -0.5283823609352112, -0.37037840485572815, -1.6892975568771362, 0.2512073516845703, 0.9038817286491394, -0.5689019560813904, -1.069300651550293, ...
def test _ finsih _ github _ signup ( self ) : pass
[ -0.5474430322647095, 0.34964755177497864, 0.36581072211265564, 0.6503154635429382, 0.6533803343772888, -0.1578545868396759, 1.373436689376831, 0.7021923661231995, -0.2995181381702423, -0.06817498058080673, -0.3007129430770874, -0.6870818734169006, -0.3076346516609192, 0.37113210558891296, ...
def make _ collision ( self, train _ 1 : train, train _ 2 : train ) : log ( log. info, " trains collision happened, trains : [ { }, { } ] ". format ( train _ 1, train _ 2 ) ) self. put _ train _ into _ town ( train _ 1, with _ unload = true ) self. put _ train _ into _ town ( train _ 2, with _ unload = true ) train _ 1...
[ -0.2915283441543579, 0.2655203342437744, 0.7899564504623413, -0.5730217695236206, 0.7891265153884888, 0.3101893663406372, 0.024636181071400642, -0.09294446557760239, -2.1326217651367188, 0.6234176158905029, -0.7278690338134766, -0.12357769161462784, 0.7612627744674683, -0.884277880191803, ...
def describebillsummarybyregion ( self, request ) : try : params = request. _ serialize ( ) headers = request. headers body = self. call ( " describebillsummarybyregion ", params, headers = headers ) response = json. loads ( body ) model = models. describebillsummarybyregionresponse ( ) model. _ deserialize ( response ...
[ -0.3263925611972809, 1.0953172445297241, 0.6372553706169128, -0.37722620368003845, -0.27079495787620544, 0.2831609547138214, 0.17388606071472168, -0.903194010257721, -0.08124380558729172, 0.16511116921901703, -0.43600112199783325, 0.8066596984863281, -0.45183271169662476, 0.632458209991455...
def test _ atomic _ language _ enumeration _ 1 _ nistxml _ sv _ iv _ atomic _ language _ enumeration _ 2 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / language / schema + instance / nistschema - sv - iv - atomic - language - enumeration - 2. xsd ", instance = " nistda...
[ -0.2570556104183197, -1.1880817413330078, 0.4696212708950043, 0.6295284032821655, -0.28459158539772034, -0.27167773246765137, 0.15936513245105743, -0.23161211609840393, -0.3753115236759186, 0.4514000713825226, -0.30803126096725464, -0.11501462012529373, 0.283634752035141, 0.323226660490036...
def test _ atomic _ qname _ length _ 2 _ nistxml _ sv _ iv _ atomic _ qname _ length _ 3 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / qname / schema + instance / nistschema - sv - iv - atomic - qname - length - 3. xsd ", instance = " nistdata / atomic / qname / schem...
[ 0.07456082850694656, -0.06511946767568588, 0.4617466926574707, 0.1779896318912506, -0.3636324405670166, 0.8067011833190918, -0.7135143876075745, -0.1851957142353058, 0.5675734877586365, 0.9172744154930115, -0.5458332896232605, 0.06615003943443298, 0.3101929724216461, -0.5887457132339478, ...
def get _ version _ object _ by _ id _ or _ none ( self ) - > optional [ version ] : try : version _ id = int ( self. _ version _ id ) except valueerror : return try : version = version. objects. get ( pk = version _ id ) except version. doesnotexist : return return version
[ 0.45142969489097595, -0.9155793786048889, 0.3461660146713257, 0.548232913017273, 0.8979074954986572, -0.15940506756305695, -0.2757266163825989, -0.8395025730133057, 0.5037537813186646, 0.7672814130783081, 0.04733915999531746, -0.39680030941963196, -0.4634237289428711, 0.021564310416579247,...
def save ( filename, dataframe : pd. dataframe = none, vocab : data = none, model = none ) : is _ dir ( filename ) if dataframe is not none : dataframe. to _ json ( filename, orient ='records') if model is not none : torch. save ( model. state _ dict ( ), filename ) if vocab is not none : import pickle output = open ( ...
[ -0.285317599773407, 0.19426549971103668, 0.41109535098075867, 0.48981907963752747, 0.8115642666816711, -1.162956714630127, 0.11515196412801743, 0.7020576000213623, -0.4253443777561188, 0.5239000916481018, -0.9501993656158447, -0.11626160889863968, 0.4717443287372589, -0.12668806314468384, ...
def l1 _ distance ( vector _ 1, vector _ 2 ) : return numpy. linalg. norm ( vector _ 1 - vector _ 2, ord = 1 )
[ 0.17110110819339752, -1.3447844982147217, 0.40627121925354004, -0.055955324321985245, -0.17174610495567322, 0.8917428851127625, -0.5309730768203735, 0.5731624960899353, -0.17472709715366364, 0.7978464365005493, 0.26663848757743835, 1.1870256662368774, 0.03078962303698063, 0.096322812139987...
def test _ notifier ( self ) : self. assertequal ( self. root. find ('notifier / name'). text,'txairbrake') self. assertnotidentical ( self. root. find ('notifier / url'), none ) self. assertnotidentical ( self. root. find ('notifier / version'), none )
[ 0.30352556705474854, 0.014578631147742271, 0.16161683201789856, -0.14332328736782074, 1.006967306137085, 0.9392616748809814, 0.2347162663936615, 0.07483313232660294, -0.4256109595298767, -0.05732753872871399, -1.0360461473464966, -1.0734184980392456, -0.3906385004520416, 0.9663452506065369...
def get _ triangles ( self, allow _ primitive _ restarts : bool, include _ degenerate _ faces = false ) - > tp. list [ tp. tuple [ int, int, int ] ] : tri = self. triangulate ( allow _ primitive _ restarts, include _ degenerate _ faces ) return [ ( tri [ i ], tri [ i + 1 ], tri [ i + 2 ] ) for i in range ( 0, len ( tri...
[ -1.0583771467208862, 1.3174798488616943, 0.3635669946670532, 0.556374728679657, 0.12214569002389908, 0.42316901683807373, 0.07008037716150284, 0.023818572983145714, -0.035040710121393204, 0.2937082350254059, -0.6814501285552979, 0.047909364104270935, -0.32078292965888977, -0.88752311468124...
def predict ( self ) : # update current state self. estimate = self. a * self. previousestimate # update error prediction state self. errorprediction = self. a * self. previouserrorprediction * np. transpose ( self. a )
[ -0.07916421443223953, -1.055359125137329, 0.3869372010231018, -0.24755734205245972, -0.2797565758228302, -0.32045918703079224, 0.17064078152179718, 1.0375040769577026, 0.043000951409339905, 0.23137852549552917, 0.709104061126709, 1.0498541593551636, 0.222011998295784, 0.18501223623752594, ...
def type ( self ) - > servertype : return servertype ( " ". join ( [ i for i in self. _ name if not i. isdigit ( ) ] ) )
[ -0.6552435159683228, -0.3690611720085144, 0.5858075022697449, -0.29076284170150757, 0.40035542845726013, 0.8216978311538696, -0.29819315671920776, -1.0316052436828613, 0.7934657335281372, 0.17197710275650024, -0.9739757776260376, 0.7832428812980652, -1.6073662042617798, 0.3153546452522278,...
def make _ pooled _ snv _ info _ table ( self ) : self. pmdb = generate _ pooled _ snv _ summary _ table ( self. dstdb, self. name2snptable, self. name2scaffs )
[ -0.45908665657043457, 0.06933986395597458, 0.38320401310920715, -0.3470780551433563, -0.6083632707595825, 1.4157915115356445, 0.07060306519269943, 0.015783021226525307, -0.06306173652410507, 0.09354690462350845, -0.21189959347248077, 0.8099842667579651, 0.3373214900493622, -0.0419800244271...
def get ( self, request ) : users = user. objects. all ( ) serialized _ data = userserializer ( users, many = true ). data data = { } data ['ok'] = true data ['members'] = serialized _ data return response ( data )
[ -0.5785696506500244, -0.5381004214286804, 0.5367385149002075, -0.331019788980484, -0.2538672685623169, 0.045477867126464844, -0.9118396639823914, -0.0072533488273620605, -0.29190510511398315, -0.3607221245765686, -0.46810272336006165, 0.80873703956604, -0.4435935616493225, -0.6132040619850...
def set _ backlight _ green ( self ) : self. set _ backlight _ rgb ( 0, 0xff, 0 )
[ 0.47012558579444885, 0.925197184085846, 0.6552992463111877, 0.32528218626976013, 0.9731315970420837, 1.0105841159820557, -0.40861254930496216, -0.001719089923426509, -0.29414045810699463, 0.22123722732067108, -0.007663703989237547, 1.0065163373947144, -0.8583188056945801, 0.341959655284881...
def get _ by _ version _ id ( version _ id ) : return templateversionmanager. get _ by _ version _ id ( version _ id )
[ 0.9132875204086304, -1.3248445987701416, 0.1284964680671692, 0.10528667271137238, -0.20284269750118256, -1.013730764389038, -0.38969212770462036, -0.1758151650428772, 0.4252055883407593, 0.7529226541519165, -0.5898330807685852, 0.33823615312576294, -0.33674347400665283, 0.42870137095451355...
def test _ visualizations _ process _ events ( self ) : visualizations = visualizations. objects. get ( process _ events = 5 ) self. assertequal ( visualizations. get _ process _ events ( ), 5 )
[ 0.44369569420814514, 0.5782962441444397, 0.43865370750427246, -0.33417508006095886, 0.7033824920654297, -0.09345471113920212, 0.4829012155532837, -0.24790334701538086, 0.5603553056716919, -0.2778392434120178, -0.20237822830677032, -0.11809905618429184, 0.0831664577126503, -0.83162188529968...
def read _ and _ call _ while ( uhandle, method, * * keywds ) : nlines = 0 while 1 : line = safe _ readline ( uhandle ) # if i've failed the condition, then stop reading the line. if _ fails _ conditions ( * ( line, ), * * keywds ) : uhandle. saveline ( line ) break method ( line ) nlines = nlines + 1 return nlines
[ -0.4347795844078064, 0.4929399788379669, 0.3846249580383301, 0.5554056763648987, -0.3702685236930847, -0.06564236432313919, -0.5047491192817688, -0.6091611385345459, -0.19110432267189026, -0.41856929659843445, 0.5674047470092773, -0.601550817489624, -0.5037776827812195, -0.0039243651553988...
def stark _ assert ( expr : bool, code : starkmsg, message : optional [ str ] = none ) : if not expr : raise starkexception ( code, message )
[ 0.6506198048591614, 0.21898773312568665, 0.4440689980983734, 0.5981541872024536, 0.19050152599811554, 0.13542254269123077, -0.5018365979194641, 1.2907458543777466, 0.2118740975856781, -0.2519945800304413, 0.6209403276443481, 1.0654691457748413, -0.897596001625061, 1.1561181545257568, -0....
def check _ long _ description ( ) : setup _ py = subprocess. popen ( [ sys. executable,'setup. py ','- - long - description'], stdout = subprocess. pipe ) stdout, _ = setup _ py. communicate ( ) if setup _ py. returncode = = 0 : try : rst2html = subprocess. popen ( ['rst2html. py ','- - halt = 2'], stdout = subprocess...
[ 0.09319472312927246, 0.1533670276403427, 1.0339080095291138, 0.43321168422698975, 0.10633399337530136, 0.17541071772575378, 0.053990405052900314, 0.012815723195672035, -0.6083776354789734, 0.14599934220314026, 0.5075699090957642, 0.4169328510761261, 0.3267555832862854, 0.7965207695960999, ...
def scale ( self ) : return self. _ scale
[ -0.059865593910217285, -0.25707846879959106, 0.3523213565349579, -0.07868795841932297, 0.3169281780719757, 1.0520497560501099, -0.27278387546539307, -0.8495569229125977, -0.18565598130226135, 0.1704254001379013, 0.33158910274505615, -0.4835513234138489, -0.9162176251411438, -0.201444089412...
def run _ now ( self ) : request _ json = { " tmmsg _ taskoperationreq " : { " optype " : 5, " subtaskentity " : [ { " _ type _ " : 68, " subtaskid " : self. subtask _ id, " taskname " : " ", " subtaskname " : self. schedule _ name, " taskid " : self. task _ id } ], " taskids " : [ self. task _ id ] } } flag, response ...
[ -0.3555920124053955, 0.22599852085113525, 0.8375394344329834, 0.23900990188121796, -0.24953095614910126, -0.23776060342788696, 0.210501566529274, 0.27871042490005493, -0.3503252863883972, 0.19544635713100433, -0.1274430900812149, 0.2995108962059021, -0.6290431022644043, 0.3745482861995697,...
def stem ( string ) : ps = nltk. porter. porterstemmer ( ) stems = [ ps. stem ( word ) for word in string. split ( ) ] return " ". join ( stems )
[ 0.22529427707195282, -0.07679063826799393, 0.06179416552186012, -0.0853373110294342, -1.1917134523391724, 0.6008465886116028, -0.286898672580719, 0.21515899896621704, -0.21273842453956604, 0.3851448893547058, -0.6720682382583618, -0.10729719698429108, -0.8011474013328552, -0.74423396587371...
def _ makejointchains ( self, chain, joint _ dict ) : prev _ jnt = none joint _ ls = [ ] if not joint _ dict : joint _ dict = { } for i in self. guides. items ( ) : mc. select ( cl = 1 ) jnt = mc. joint ( n = i [ 1 ] [ 0 ]. replace ( " _ guide ", chain + " _ jnt " ) ) mc. xform ( jnt, ws = 1, t = i [ 1 ] [ 1 ] ) split ...
[ -0.7078198194503784, 0.3128972053527832, 0.8158994913101196, -0.6403937935829163, -0.8098618388175964, -0.13034673035144806, 0.7203118801116943, -0.02702004462480545, -0.5896748900413513, -0.2108122557401657, -0.346629798412323, 0.13894067704677582, -0.2300359159708023, 0.42654407024383545...
def binary _ img ( self ) : return self. _ bimg
[ 0.14324340224266052, -0.7451817989349365, 0.4573688209056854, 0.5829195380210876, 0.7118762135505676, 0.33814728260040283, 0.6383964419364929, -0.16963952779769897, -0.6251440048217773, -0.26413413882255554, -0.2810382544994354, 1.1002591848373413, -0.3094947040081024, 0.3958447575569153, ...
def addnewapplication ( self ) : name = " application " idx = 1 existing = [ a. getname ( ) for a in self. _ applications ] while name in existing : idx + = 1 name = f " application _ { idx } " application ( name, self ) return name
[ -0.9108619689941406, -0.3616015911102295, 0.7015710473060608, -0.23528428375720978, -0.4707728922367096, 0.49451586604118347, 0.07730716466903687, -0.8058127164840698, 0.4657505452632904, 0.45883092284202576, -0.38379213213920593, -0.6490429639816284, 0.2812066078186035, 0.5264511108398438...
def transformer ( model : str ='xlnet ', * * kwargs ) : model = model. lower ( ) if model not in _ availability : raise exception ('model not supported, please check supported models from malaya. dependency. available _ transformer ( )') check _ file ( path _ dependency [ model ], s3 _ path _ dependency [ model ], * * ...
[ -0.4360447824001312, -0.23743155598640442, 0.7881808280944824, -0.31046950817108154, -1.038352370262146, 0.35588574409484863, 0.1971905380487442, -0.3826298117637634, 0.04656295105814934, 0.38201233744621277, -0.6106586456298828, -0.021807745099067688, 0.04375773295760155, -0.7049893736839...
def test _ pass _ compatible _ types ( self ) : request = {'addresses': [ address ( self. trytes1 ), bytearray ( self. trytes2. encode ('ascii') ), ],'threshold': 80, } filter _ = self. _ filter ( request ) print _ var _ type _ n _ val ( var001 = request, pointer = " # edfesdfr345 " ) # edfesdfr345 # value : # # {'addr...
[ -0.5077658891677856, 0.4183094799518585, 0.8827187418937683, 0.13843375444412231, -0.11670158058404922, 0.4508126974105835, -0.044026680290699005, -0.8346007466316223, -0.10141579061746597, -0.4118804335594177, -0.31392788887023926, 0.5985971689224243, 0.23341910541057587, -0.0921227037906...
def capturerate ( dbname, querystring ) : return caprate ( query1col ( dbname, querystring ) )
[ -0.31053751707077026, 0.2707080543041229, 0.27466025948524475, 0.3516208529472351, -0.7793785929679871, 0.1594647616147995, -1.165043592453003, -0.8469168543815613, -0.3551333546638489, 0.4460124373435974, 0.29620784521102905, -0.14730951189994812, -0.38906770944595337, -0.4795577228069305...
def test _ atomic _ language _ enumeration _ nistxml _ sv _ iv _ atomic _ language _ enumeration _ 1 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / language / schema + instance / nistschema - sv - iv - atomic - language - enumeration - 1. xsd ", instance = " nistdata /...
[ -0.3247518241405487, -0.8990131616592407, 0.4120950996875763, 0.47170567512512207, -0.42390885949134827, -0.02728002332150936, 0.7941307425498962, 0.007750720717012882, 0.11045625805854797, 1.0755692720413208, -0.4571472704410553, -0.21304184198379517, 0.05916338041424751, 0.24265995621681...
def arcsec _ to _ pixel ( azimuthal _ offset, pixel _ size, focal _ length ) : return azimuthal _ offset / rad _ to _ arcsec ( pixel _ size / focal _ length )
[ 0.8289430737495422, -0.11408922076225281, -0.03915797173976898, -0.845069169998169, -0.7752841114997864, 0.18736325204372406, -0.7255813479423523, -0.1947527527809143, 1.2571072578430176, 1.1346365213394165, 0.7433867454528809, 0.9478181004524231, 1.0971721410751343, -0.7655391693115234, ...
def get _ all _ experiments ( self ) : lgr. debug ( " requesting full list of experiments " ) fields _ to _ check = default _ result _ fields. union ( {'title'} ) experiments = self ('data / experiments ', fields _ to _ check = fields _ to _ check ) self. _ experiment _ labels = { e ['id'] : e ['label'] for e in experi...
[ -0.5428742170333862, 1.0436536073684692, 0.3163161277770996, 0.22936514019966125, 1.1427916288375854, 0.06840290129184723, -1.1492283344268799, 0.05518089979887009, -0.04254468157887459, -0.47602730989456177, 0.001853457884863019, 0.17723165452480316, -0.731989324092865, 0.3193266987800598...
def checkclick ( self, surface ) : return self. checker. checkclick ( surface )
[ 0.048763807862997055, 0.12272877991199493, 0.3325481116771698, 1.2417399883270264, -0.2276485115289688, 0.4580267071723938, 1.5299946069717407, -0.8071556091308594, -0.026516538113355637, -0.2656840980052948, 0.7012295126914978, -0.050175465643405914, -0.9767575860023499, 1.148354887962341...
def test _ example _ input _ one _ default _ value _ index ( self, ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) : input _ page = inputpage ( ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) default _ index = " default " input _ page. create _ new _ input. select ( " example input one...
[ -0.3632974922657013, 0.7668291330337524, 0.35973161458969116, 0.8703708052635193, 1.656113862991333, 0.6775023937225342, 0.39112046360969543, -0.1798986941576004, 0.42450037598609924, -0.36043301224708557, -0.32998958230018616, -0.27602478861808777, -0.06849285960197449, 0.1324389278888702...
def ideal _ battery _ range ( self ) - > float : return self. _ vehicle _ data. get ( " charge _ state ", { } ). get ( " ideal _ battery _ range " )
[ -0.6036105751991272, 0.04198300093412399, 0.2398977279663086, 0.7800762057304382, 0.7786262035369873, 1.0958348512649536, -0.6671246290206909, 0.3576025068759918, -0.9465892910957336, 0.2618243098258972, -0.5241962671279907, 0.8789042830467224, -0.6508174538612366, 0.31626322865486145, -...
def get _ paths _ through _ all _ edges ( edges, th _ module = none, language = none, shortest _ set = none ) : th _ paths = get _ paths _ from _ test _ header ( th _ module ) # print ( th _ paths ) data = [ ] if th _ paths : for th _ path in th _ paths : for edge in edges : path = routing _ path _ to _ edge ( edge, sh...
[ -0.5896576642990112, -0.1705433875322342, 0.907416582107544, -0.2797286808490753, 0.20381003618240356, 0.6055808067321777, 0.6124863624572754, 0.056750159710645676, -0.06062285602092743, 0.682464599609375, 0.3877704441547394, 0.1382339745759964, 0.00297920941375196, 0.5367291569709778, 0...
def process _ event _ ref ( self, event _ ref ) : self. process _ notes ( event _ ref ) self. process _ attributes ( event _ ref ) event = self. db. get _ event _ from _ handle ( event _ ref. ref ) if event : self. process _ event ( event )
[ 0.19702529907226562, -0.20807161927223206, 0.5517756342887878, -0.42671969532966614, 0.558148205280304, -0.18585510551929474, 0.6324318647384644, -0.23479032516479492, 0.4405992925167084, 0.28758490085601807, 0.26563724875450134, 0.19874201714992523, 0.12283191084861755, 1.3013256788253784...
def _ attempt _ sample ( self ) : # print " inside attempt sample " for sample _ location in self. sample _ todo : distance = np. sqrt ( ( self. robot. x - sample _ location [ 0 ] ) * * 2 + ( self. robot. y - sample _ location [ 1 ] ) * * 2 ) # print " distance between sample location and todo ", distance if distance <...
[ -0.47239160537719727, -0.21268343925476074, 0.48934757709503174, -0.2585551142692566, -0.4056006669998169, 0.06434877216815948, 0.30404460430145264, -0.6927556395530701, -0.12197230756282806, 0.5520805716514587, 0.45693767070770264, 0.3163185119628906, -0.10669104009866714, -0.372069835662...
def move ( self ) : moves = { } # dictionary to record all movements. can not make the movements while in the for loop, # because it will mess up the iteration. dictionary is used after for loop is completed move = 1 # keep track of how many movements are made for p in self. populations : # loop through all populations...
[ -1.1115522384643555, 0.23234644532203674, 0.8166502118110657, 0.29099756479263306, -0.35479220747947693, 0.04024983197450638, 0.28327858448028564, 0.016616396605968475, -0.6056655049324036, 0.6451311707496643, -0.28443431854248047, -0.1378614455461502, 0.21283239126205444, 0.02812572196125...
def getcpuprofile ( self, profiledurationinsec ) : pass
[ 0.20416896045207977, 0.15101248025894165, 0.33487293124198914, 1.5863453149795532, -0.2735053598880768, -0.03202870860695839, 0.23165082931518555, -0.7919586300849915, -1.208598256111145, 0.6458973288536072, -0.5700845718383789, 0.01887095719575882, -1.32206392288208, -0.6274903416633606, ...
def _ _ extract _ hashtag _ data ( self, config _ file ) : try : insta _ hashtag = instagramhashtag ( ) # read list of hashtag with open ( config _ file [ " hashtag _ list " ], \'r ', encoding = " utf - 8 " ) as file : self. content = file. readlines ( ) self. content = [ x. strip ( ). replace ('\ ufeff ','' ) \ for x ...
[ -0.011025444604456425, -0.4085403084754944, 0.3171895444393158, 0.5383496880531311, 0.7854477763175964, 0.037969931960105896, 0.18378198146820068, 0.9641673564910889, -1.4958064556121826, 0.23930060863494873, -0.5909632444381714, -0.008625130169093609, 0.12181099504232407, 0.65007227659225...
def rolling ( mtx, datecol, astcol, bmkcol, risk _ free _ rate, rolling _ period _ cls = utl. date. year, sample _ period _ cls = utl. date. month, interp _ func = none ) : try : # split matrix by specified period pmtx = utl. math. matrix. split ( mtx, rolling _ period _ cls, datecol ) # compute rolling period beta res...
[ -0.4212046265602112, 0.9603874683380127, 0.5783194303512573, -0.5373018383979797, -0.4165387749671936, -0.28023970127105713, 0.17261871695518494, 0.11718420684337616, -0.777206301689148, 0.7319068908691406, -0.34636253118515015, -0.0394204743206501, 0.21028754115104675, -0.6516171097755432...
def test _ add _ exe _ args _ space _ delimited _ string ( ) : settings = runsettings ( " python " ) expected = [ " 1 ", " 2 ", " 3 " ] settings. add _ exe _ args ( " 1 2 3 " ) assert settings. exe _ args = = expected
[ 0.3977057933807373, 0.3772011399269104, 0.595371425151825, 0.5654460787773132, 0.6462817192077637, 0.8255753517150879, -0.5993494391441345, 0.23081055283546448, 0.001231702626682818, 0.4815896153450012, -0.8301907181739807, -0.19198785722255707, -0.7626944780349731, 0.2818620204925537, 0...
def get _ term _ scores ( self, tweet _ lists ) : term _ lists = [ ] feature _ names = self. tfidf. get _ feature _ names ( ) for tweets in tweet _ lists : resp = self. tfidf. transform ( [''. join ( tweets ) ] ) indices = sorted ( list ( resp. nonzero ( ) [ 1 ] ), key = lambda feature _ index : - 1 * resp [ 0, feature...
[ -0.21585194766521454, -0.5669536590576172, 0.3960588276386261, -0.21258114278316498, 0.7419047355651855, 0.1282084733247757, -0.02930096536874771, 0.4544185698032379, -0.20028647780418396, 0.8533312678337097, -0.5857383608818054, -0.8628660440444946, -0.10514601320028305, 0.654012620449066...
def hcluster ( matrix, centers, *, prior = 0., msr = 2, weights = none, eps = 1e - 10, maxiter = 1000, mbsize = - 1, ncheckins = - 1, with _ rep = false, cs = false ) : if isinstance ( matrix, sp. csr _ matrix ) or isinstance ( matrix, csr _ tuple ) : matrix = csparsematrix ( matrix ) argmat = matrix from pyminicore im...
[ 0.5737533569335938, 0.06183163449168205, 0.5628455877304077, 0.4095391035079956, -0.9044440984725952, 0.4365357756614685, -0.49043282866477966, 0.5617063045501709, 0.917025089263916, -0.06283550709486008, 0.5611122846603394, -0.027696922421455383, -0.8944023251533508, -0.3945528268814087, ...
def getpossibleactions ( self, state ) : if self. isterminal ( state ) : return [ ] state = decodestate ( state ) fromlist = [ i for i in range ( self. stacknum ) if state [ i ]! = [ ] ] tolist = range ( self. stacknum ) # we don't allow one block moves from a stack to itself - it's legal but doesn't make sense return ...
[ -1.2923716306686401, -0.21267490088939667, 0.7304497361183167, 0.7502998113632202, -0.09126155823469162, -0.5922511219978333, 0.09187048673629761, 0.04999244958162308, 0.7492074966430664, 0.29119762778282166, -0.8436964750289917, 0.4677005708217621, -0.48975250124931335, 0.7689961791038513...
def error _ embed ( title : str, description : str, ctx : context, author : bool = true ) - > embed : return make _ embed ( title = f'error : { title } ', description = f'* * { description } * * ', ctx = ctx, color ='dark _ red ', author = author )
[ 0.22901473939418793, 0.20602849125862122, 0.6902117133140564, 0.7924829125404358, -0.1614375114440918, 0.8632509112358093, -1.2152431011199951, 0.2102649211883545, 0.1012052595615387, 0.1299992948770523, 0.3090546429157257, 1.1957719326019287, -0.27365508675575256, -0.6132855415344238, 0...
def _ _ init _ _ ( self, validwords ='wordlist. txt ', lettervalues ='lettervalues. txt') : self. leaderboard = [ ] # initialise an empty leaderboard with open ( validwords ) as f : self. valid _ words = f. read ( ). splitlines ( ) with open ( lettervalues ) as f : for line in f : ( key, val ) = line. split (':') self....
[ 0.4048755168914795, -0.13677631318569183, 0.33419036865234375, -0.3141833245754242, -0.718517541885376, 1.0120811462402344, -0.317149817943573, 0.9312280416488647, -0.5098227262496948, 0.07650748640298843, -0.547344446182251, 0.38180139660835266, -0.6088000535964966, 0.7812000513076782, ...
def prepare _ capture ( workflow ) : if app. config ['mode'] not in ('scanner ','full') : abort ( 404 ) # check if any other workflow is active and finish, if neccessary logger. debug ( " finishing previous workflows " ) for wfid, wf in persistence. get _ all _ workflows ( ). iteritems ( ) : if wf. active : if wfid = =...
[ -0.9342814087867737, -0.6890185475349426, 0.491726279258728, 0.7612378597259521, 0.29172757267951965, -0.4286324679851532, 0.6133327484130859, -0.8353685736656189, 0.7533785104751587, 0.611565887928009, -0.11855096369981766, -0.868873655796051, -0.5759662389755249, 1.0235751867294312, -0...
def command _ siebel ( self, brain, ticketnum ) : if not ticketnum : return s _ url = " http : / / yoc. yahoo. com / cgi - bin / siebel - ticket. cgi? ticket = " url = s _ url + ticketnum [ 0 ] soup = soup ( self. fetchurl ( url ) ) td = soup. findall ('td') if len ( td ) < 10 : return title = td [ 9 ]. string return "...
[ 0.003968366887420416, 0.20438744127750397, 0.674312949180603, 0.002160832518711686, 0.4689646065235138, -0.24984757602214813, 0.2223013937473297, -0.15396077930927277, 0.28452005982398987, 0.2556246519088745, -0.48836374282836914, 0.00536825368180871, -0.39175012707710266, 0.22604124248027...
def build _ decoder _ bi ( tparams, options ) : # word embedding ( source ) text _ embedding = tensor. tensor3 ('text _ embedding ', dtype ='float32') text _ embeddingr = text _ embedding [ : : - 1 ] text _ mask = tensor. matrix ('text _ mask ', dtype ='float32') textr _ mask = text _ mask [ : : - 1 ] hypothesis _ embe...
[ 0.25446128845214844, -0.23482246696949005, 0.9185262322425842, 0.48291251063346863, 0.43054893612861633, 0.12036636471748352, 0.8735268712043762, 0.305792897939682, -0.8029335141181946, 0.08336314558982849, -0.11866223067045212, 0.6673847436904907, -0.08136309683322906, 0.08623284101486206...
def tpms _ pressure _ fl ( self ) - > float : return self. _ vehicle _ data. get ( " vehicle _ state ", { } ). get ( " tpms _ pressure _ fl " )
[ 0.1978255808353424, -0.28469839692115784, 0.2822116017341614, -0.9896934032440186, 0.40675434470176697, 0.04443240538239479, -0.7072744369506836, -0.5228575468063354, -0.14233343303203583, 0.05758649855852127, -0.18984244763851166, -1.1560410261154175, -0.8163194060325623, -0.4803318381309...
def _ _ repr _ _ ( self ) : return self. to _ str ( )
[ -0.5736950635910034, -1.5629445314407349, 0.4195917248725891, -1.3908827304840088, -0.17763900756835938, 0.7235296368598938, -0.19694273173809052, -0.22184345126152039, 0.5806519985198975, 0.27171874046325684, 0.410837322473526, 0.8436735272407532, 0.33078640699386597, -0.9162222743034363,...
def test _ _ applicationexecutable _ _ from _ data ( ) : launcher = true name ='warning'os = operationsystem. linux parameters ='run'data = {'is _ launcher': launcher,'name': name,'os': os. value,'parameters': parameters, } application _ executable = applicationexecutable. from _ data ( data ) _ assert _ is _ every _ a...
[ 0.8955186605453491, -0.6537078022956848, 0.49791574478149414, 0.9205319881439209, -0.2214714139699936, 0.9112190008163452, -0.705204427242279, -0.4632422626018524, -0.2390250563621521, -0.1372034251689911, -0.0855153277516365, -0.1917065978050232, 0.8537019491195679, 0.3398871421813965, ...
def test _ atomic _ language _ pattern _ 2 _ nistxml _ sv _ iv _ atomic _ language _ pattern _ 3 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / language / schema + instance / nistschema - sv - iv - atomic - language - pattern - 3. xsd ", instance = " nistdata / atomic ...
[ 0.18918335437774658, 0.10655689984560013, 0.5887374877929688, 0.5319438576698303, -0.2917022407054901, 0.7127253413200378, -0.6452866792678833, 0.2969549000263214, 0.6513303518295288, 1.0284950733184814, -0.17810817062854767, -0.17140859365463257, -0.08298201113939285, -0.6115399599075317,...
def getnewbrailleregion ( string, cursoroffset = 0, expandoncursor = false ) : return braille. region ( string, cursoroffset, expandoncursor )
[ 1.0033156871795654, -0.6670924425125122, 0.40468260645866394, -0.1941123753786087, -1.671098232269287, 0.23218929767608643, 0.02737230435013771, 0.0003895658010151237, 0.0911869928240776, -0.5678123831748962, -0.13718169927597046, 1.055446743965149, -0.8409224152565002, -0.1802847683429718...
def _ expansion ( self, input _ df : pd. dataframe ) : group _ value = input _ df [ self. _ input _ col _ name ]. iloc [ 0 ] # check for invalid input assert group _ value in self. _ mapping. keys ( ), f " { group _ value } not in mapping " assert len ( self. _ output _ col _ names ) = = len ( self. _ mapping [ group _...
[ -1.2356048822402954, 0.5379607677459717, 0.5157604813575745, -0.1171574518084526, -1.2632007598876953, -0.46662190556526184, 1.191069483757019, 0.236217200756073, -0.09269241243600845, -0.281093031167984, 1.3205260038375854, -0.10364415496587753, 0.24484167993068695, -0.7495083808898926, ...
def test _ atomic _ hex _ binary _ pattern _ nistxml _ sv _ iv _ atomic _ hex _ binary _ pattern _ 1 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / hexbinary / schema + instance / nistschema - sv - iv - atomic - hexbinary - pattern - 1. xsd ", instance = " nistdata / a...
[ -0.2365850955247879, 0.05859409272670746, 0.599006712436676, 0.8313144445419312, 0.1292862892150879, 0.7448750138282776, -0.22005309164524078, 0.3684104084968567, 0.3994530141353607, 0.48417964577674866, -0.37898489832878113, -0.6835606694221497, -0.3230961561203003, 0.16762952506542206, ...
def delete _ algo _ folder ( algo _ name, environ = none ) : folder = get _ algo _ folder ( algo _ name, environ ) shutil. rmtree ( folder )
[ 0.15829794108867645, 0.08771908283233643, 0.5178751945495605, -0.1291792392730713, -0.26096224784851074, 0.6651878952980042, 0.9372743368148804, 0.4994862377643585, -0.5716593861579895, 0.9321308732032776, 0.09909167140722275, 0.9747105240821838, 0.34869399666786194, 1.2055790424346924, ...
def register _ loader ( cls, loader : loader ) - > none : cls. loaders. append ( loader )
[ -0.5599698424339294, 0.12060301750898361, 0.23697778582572937, 0.3266291916370392, 0.4923587441444397, 0.6761054396629333, -1.8540223836898804, -0.4706414043903351, -0.3846094012260437, -0.9096439480781555, -1.3079984188079834, 0.5755153894424438, 0.011592622846364975, 1.5218112468719482, ...
def test _ list _ decimal _ enumeration _ nistxml _ sv _ iv _ list _ decimal _ enumeration _ 1 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / decimal / schema + instance / nistschema - sv - iv - list - decimal - enumeration - 1. xsd ", instance = " nistdata / list / deci...
[ -0.6700140833854675, -0.7807396054267883, 0.6046878099441528, 0.7015729546546936, 0.32197675108909607, -0.36262422800064087, 0.27724191546440125, 0.2761862576007843, 0.9917926788330078, -0.009516189806163311, -0.760525643825531, -0.7223231196403503, -0.22464029490947723, 0.5951856970787048...
def adjust _ addr ( sections, addr ) : bn _ section _ start = none section _ name = none for name, section in sections. items ( ) : if addr > = int ( section ['start'] ) and addr < = int ( section ['end'] ) : bn _ section _ start = int ( section ['start'] ) section _ name = name break # make sure the section was found ...
[ 0.15333783626556396, -1.0903229713439941, 0.9313213229179382, -1.0365855693817139, -0.22941076755523682, -0.07202757149934769, 0.41026175022125244, -0.5431627631187439, 0.22165130078792572, 0.24400800466537476, 1.262715220451355, 0.6883166432380676, -0.08021032065153122, 0.5405830144882202...
def take _ tag ( line ) : try : l = re. match ( r'< \ w + ', line ) return l. group ( 0 ) [ 1 : ] except : pass
[ 1.0321794748306274, 0.1944616585969925, 0.6671604514122009, 0.6419622302055359, 0.103663370013237, 0.4460967183113098, 0.21587657928466797, -0.036011844873428345, -0.17307166755199432, -0.44971686601638794, -0.03807694464921951, -0.26685887575149536, -0.5962206125259399, 0.2170360535383224...
def download ( self, save _ dir = default _ directory ) : # create convenient file name title _ split = self. title. split ( ) title _ contracted ='_ '. join ( title _ split [ : 15 ] ) # more intelligent " cut - off "? file _ name = self. authors _ contracted +'-'+ title _ contracted +'-'+ self. year file _ path ='{ } ...
[ 0.4307602643966675, -1.0838408470153809, 0.7284058332443237, 0.6845589280128479, 0.3963332772254944, -0.17829526960849762, 0.1691550761461258, 0.218532532453537, -0.5842551589012146, -0.5073559880256653, 0.6017168760299683, 0.1986362189054489, -0.19988460838794708, -1.1738104820251465, 0...
def renamecomposite ( self, oldname, newname ) : if oldname! = newname : self. _ checkuniquename ( self. _ compositefilters, newname ) self. compositefilterbyname ( oldname ). setname ( newname ) self. setdirty ( true )
[ -0.9990262389183044, -0.9532539248466492, 0.729045033454895, -0.20473220944404602, -0.07698621600866318, 0.2416786402463913, 0.3617198169231415, -0.15837830305099487, -0.2564590275287628, 1.0454645156860352, -0.7006316781044006, 0.5356377363204956, -0.5353681445121765, -0.04118860140442848...
def _ _ init _ _ ( self, resp, ibmc _ client = none ) : # type : ( dict, ibmc. ibmcclient ) - > none self. _ ibmc _ client = ibmc _ client self. _ connector = self. _ ibmc _ client. connector if ibmc _ client else none self. refresh ( resp )
[ 0.6607347726821899, -0.6942856311798096, 0.4497779905796051, -0.11784274876117706, -0.993836522102356, -0.8418377637863159, 0.40533247590065, -0.4219287037849426, 1.0586540699005127, -0.6455341577529907, -0.4540538787841797, -0.13707923889160156, -0.9637754559516907, -0.00471780588850379, ...
async def get _ storage _ client ( self, session : clientsession ) - > storage : with await self. service _ file _ as _ context ( ) as file : return storage ( service _ file = file, session = cast ( session, session ) )
[ 0.4753727912902832, -0.7187430262565613, 0.25215527415275574, -0.024991873651742935, 0.11923883855342865, -0.26240283250808716, 0.5664973855018616, -1.3139199018478394, -0.17614591121673584, -0.8019838333129883, 0.2656053900718689, 0.5216125249862671, 0.4328387677669525, -0.524937748908996...
def mkdirs ( self, path ) : raise notimplementederror
[ -1.0438066720962524, 0.12380567938089371, 0.37841862440109253, 0.11392659693956375, -0.0435592383146286, 1.4296045303344727, 1.1362310647964478, -0.7170907855033875, 0.6869568228721619, -0.8270022869110107, -0.5268853306770325, -0.5880396366119385, 0.40692365169525146, -0.28718626499176025...
def filename ( path ) : return os. path. splitext ( os. path. basename ( path ) ) [ 0 ]
[ 0.7430135607719421, -0.48560360074043274, 0.6112607717514038, -0.12505802512168884, -0.8605396747589111, 0.06568893790245056, 0.3957255780696869, 0.2551857829093933, -0.4052375853061676, 0.42631494998931885, 0.691260039806366, -0.09088761359453201, 0.10505480319261551, -1.1278557777404785,...
def ad _ muon _ physical _ quantities ( self, rng ) : physical _ energy = self. admuon _ energy _ spectrum ( rng ) pe _ per _ mev = 170 charge = physical _ energy * pe _ per _ mev nhit = 192 x = 0 y = 0 z = 0 fmax = 0. 1 fquad = 0. 1 fpsd _ t1 = 0. 99 fpsd _ t2 = 0. 99 f2inch _ maxq = 0 return ( physical _ energy, nhit...
[ -1.173179268836975, -0.4284372627735138, 0.5608232617378235, -0.8125840425491333, -0.5666754245758057, 0.3045317232608795, -0.7968757152557373, -0.06509918719530106, -0.5222256779670715, -0.5533865690231323, -0.16545474529266357, 0.06313110888004303, 0.28051483631134033, 0.6108372211456299...
def pad _ sequence ( sequences : list [ torch. tensor ], batch _ first : bool = false, padding _ value : union [ float, int ] = 0. 0, max _ length : int = - 1, ) : # assuming trailing dimensions and type of all the tensors # in sequences are same and fetching those from sequences [ 0 ] max _ size = sequences [ 0 ]. siz...
[ 0.3417523205280304, -0.11678937822580338, 0.7088082432746887, 0.12221419811248779, -0.1708998680114746, -0.2788723111152649, -0.011003134772181511, -0.022954491898417473, 0.45965099334716797, 0.8809016346931458, -0.33091315627098083, 0.0829494297504425, 0.35948339104652405, 0.1681961119174...
def test _ example _ input _ two _ add _ frontend _ validation ( self, ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) : input _ page = inputpage ( ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) input _ page. create _ new _ input. select ( " example input two " ) input _ page. entity2...
[ 0.09721878170967102, 0.5531457662582397, 0.8638389706611633, 0.37751877307891846, 0.6590651273727417, 0.6646014451980591, 0.20188774168491364, -0.5348015427589417, 0.020443623885512352, 0.08926030993461609, -0.807733416557312, 0.2906227707862854, 0.7813794016838074, 0.34824615716934204, ...
def msjse _ lds _ bandwidths ( tau _ hi, k _ h, n, n _ components, x _ lds, fit _ u = true ) : global n _ eps _ np _ float64 n _ f = np. float64 ( n ) n _ c _ f = np. float64 ( n _ components ) # fitting u if fit _ u : log _ tau _ diff = np. log2 ( tau _ hi [ 1 :, : ] ) - np. log2 ( tau _ hi [ : - 1, : ] ) log _ tau _ ...
[ 0.5169593095779419, 0.17018546164035797, 1.0437322854995728, -0.4509391188621521, -0.47193247079849243, -0.11446251720190048, -0.3062394857406616, 0.24010442197322845, 0.08846628665924072, 0.10973028838634491, 0.6027235984802246, 0.6121283173561096, 0.07066959887742996, 0.8719964623451233,...
def initial _ subcloud _ validate ( subcloud, installed _ loads, software _ version ) : log. debug ( " validating subcloud prestage'% s'", subcloud. name ) if subcloud. availability _ status! = dccommon _ consts. availability _ online : raise exceptions. prestageprecheckfailedexception ( subcloud = subcloud. name, orch...
[ 0.27831727266311646, 0.3165801465511322, 0.898703396320343, 0.715369701385498, -0.11526298522949219, 0.41661909222602844, 0.6005009412765503, -0.2230152189731598, -0.20580831170082092, 0.26855117082595825, -0.06844358146190643, 0.2291571944952011, -0.4714294970035553, 0.8211209177970886, ...
def writecids ( self, ctype, fname ) : if ctype not in self. clsnaps. keys ( ) : raise notimplementederror ( " unknown cluster type in writecids. " ) if self. comm. get _ rank ( ) = = 0 : fid = open ( fname,'w') clsnaps = self. clsnaps [ ctype ] for clsnap in clsnaps : if not np. isnan ( clsnap. pos [ 0 ] [ 0 ] ) : cid...
[ -0.9114792943000793, -0.9736866354942322, 0.5924433469772339, 0.057679519057273865, 0.6590520739555359, 0.6301397085189819, 0.7683364152908325, 0.20082423090934753, 0.08927666395902634, 0.4419805407524109, -0.3475263714790344, -0.051215507090091705, -0.06625903397798538, 0.5087205767631531...
def load _ predictions ( scene _ name : str, model : str, files _ dir = " / users / tim / downloads / for _ visualization " ) - > list [ np. ndarray ] : points = np. load ( files _ dir + " / points / " + scene _ name + ". npy " ) if model = ='baseline': labels = np. load ( files _ dir + " / labels _ baseline / " + scen...
[ -0.7926355004310608, -0.8112998008728027, 0.49439799785614014, -0.5034629106521606, -0.13470642268657684, 0.3945527970790863, -0.619312584400177, -0.0070975711569190025, -0.5119500756263733, 1.651590347290039, -0.3564947247505188, 0.5501821041107178, 0.37235692143440247, 0.1662258356809616...
def cbow _ xqa _ reader ( vocab, config = dict ( ) ) : from jtr. jack. tasks. xqa. cbow _ baseline import cbow _ xqa _ model _ module from jtr. jack. tasks. xqa. shared import xqanoscoreoutputmodule from jtr. jack. tasks. xqa. cbow _ baseline import cbowxqainputmodule shared _ resources = sharedvocabandconfig ( vocab, ...
[ 0.36113640666007996, -0.0409129336476326, 0.4157610237598419, -0.33502575755119324, -0.747107207775116, -0.21208199858665466, 0.676092803478241, -0.3344259560108185, 0.8385844230651855, 0.9133235216140747, -0.0375324971973896, -0.1908360719680786, -0.6274332404136658, 0.27530020475387573, ...
def compare ( self, graph _ a, graph _ b, novelty _ percentage, node _ edge _ l ) - > float : pass
[ 0.1483267992734909, 0.28237929940223694, 0.4420916736125946, 0.4436401426792145, 0.4609224200248718, -0.12518185377120972, -0.03434623405337334, -0.030783602967858315, -0.6347247362136841, 0.5917216539382935, 0.5022302269935608, 0.4656188488006592, -0.3906433582305908, -0.04486601799726486...
async def create _ entry ( self, data : dict = none, files : dict = none ) - > bool : return await super ( ). create _ data ( data = data, files = files )
[ -0.11110356450080872, 0.9573773145675659, 0.32387736439704895, -0.15769198536872864, 0.8912948369979858, 0.5990018844604492, -1.1627354621887207, 0.4435948431491852, -0.8903279304504395, -0.2141057252883911, -0.2977963984012604, -0.29494979977607727, -0.1766967624425888, 0.4704764485359192...
async def get _ application ( self, mock _ db ) : return await init _ app ( )
[ -0.5724049210548401, 0.4429207742214203, 0.371420681476593, 1.201280951499939, 0.2598361372947693, -0.17932985723018646, -0.3112427592277527, 0.15289773046970367, -0.041019439697265625, 0.6082425117492676, -0.3770507276058197, 0.24523481726646423, -0.31939607858657837, 0.09975989907979965,...
def get _ cazy _ data ( cazy _ home, excluded _ classes, config _ dict, cazy _ dict, max _ tries, time _ stamp, logger, args, ) : # list of urls that were failed to be scraped failed _ url _ scrapes = [ ] # retrieve links to cazy class pages # nested lists of [ class _ url, number _ of _ attempted _ class _ url _ scrap...
[ -0.90900057554245, 0.1857258528470993, 0.6863422393798828, 0.4848578870296478, 0.19828040897846222, 0.3840949535369873, 0.08871223777532578, 0.5539221167564392, -0.3330742418766022, -0.6384992599487305, -0.18220950663089752, -0.18176859617233276, 0.34853801131248474, 0.8914329409599304, ...
def test _ available _ drive _ types ( self ) : with patch ( self. drives _ property, new _ callable = propertymock ) as drives : drives. return _ value = self. drives _ data storagepool = self. _ initialize _ dummy _ instance ( ) self. assertequal ( storagepool. available _ drive _ types [ 0 ], " hdd " ) self. asserte...
[ -0.49887678027153015, -0.13703252375125885, 0.3263009190559387, 0.14730070531368256, 1.3481557369232178, 0.5521312355995178, 0.38403117656707764, -0.12927725911140442, 0.012754633091390133, 0.24711015820503235, -0.1907292902469635, 0.3929606080055237, -0.4441966712474823, 0.301810652017593...
def put ( self, topic _ id : str ) - > none : assert self. user _ id is not none assert self. normalized _ payload is not none topic = topic _ fetchers. get _ topic _ by _ id ( topic _ id, strict = false ) if topic is none : raise self. pagenotfoundexception publish _ status = self. normalized _ payload ['publish _ sta...
[ -0.015949273481965065, -0.39400556683540344, 0.3372468650341034, -0.0023513338528573513, 0.012594610452651978, 0.1781790405511856, 0.06993096321821213, -0.009829421527683735, 0.30596306920051575, 0.6287269592285156, 0.988197922706604, 0.16451764106750488, -0.13270115852355957, 0.3706457316...
def check _ resources _ sufficient ( resources _ coffee, prompt _ user ) : water = menu [ prompt _ user ] [ " ingredients " ] [ " water " ] coffee = menu [ prompt _ user ] [ " ingredients " ] [ " coffee " ] water _ remains = resources _ coffee [ " water " ] - water coffee _ remains = resources _ coffee [ " coffee " ] -...
[ -0.394695907831192, -0.6777245998382568, 0.6921777129173279, 0.06734608858823776, -0.6212776899337769, 1.309935450553894, -0.24133390188217163, -0.14125429093837738, -0.8545383214950562, -0.7668734192848206, 0.045327574014663696, 0.14974552392959595, -0.251918762922287, 0.8877396583557129,...
def archived ( self, archived ) : self. _ archived = archived
[ 0.9101004600524902, -1.2590395212173462, 0.04754343256354332, 0.06812061369419098, -0.2619836926460266, 1.6741231679916382, 0.8823758363723755, 1.334141492843628, -0.7300601005554199, -1.0994560718536377, -1.195703387260437, 0.5341600775718689, 1.1307260990142822, 0.6066065430641174, -0....
def compute _ fuel _ mass _ needed _ for _ boost ( mission, rocket _ thrust, rocket _ mass _ loss _ rate, initial _ fuel _ mass, target _ delta _ v ) : # insert awesome code here... # you will probably also need this quantity : # mission. spacecraft _ mass force _ needed = ( mission. spacecraft _ mass + initial _ fuel ...
[ -0.2642824053764343, -0.5880581736564636, 0.425007164478302, -0.3336828649044037, 0.3918370008468628, -0.6305704116821289, -0.6491518616676331, 0.3808947503566742, -1.0343022346496582, -0.7963824272155762, 0.6519244909286499, 0.673926830291748, 0.11470112204551697, 0.8916845321655273, -0...
def slices ( groups ) : i = 0 for group in groups : yield i, i + group i + = group
[ -1.2677109241485596, -0.2349901646375656, 0.3642595708370209, 0.0058128139935433865, -0.5399186015129089, 0.06377708166837692, 0.9626570343971252, -0.6606513857841492, -0.10964468866586685, 0.016557147726416588, 0.33253997564315796, -0.5198066234588623, -0.9296107888221741, 0.1363197565078...
def main ( self, gmrecords ) : logging. info ('running subcommand \'% s \'' % self. command _ name ) self. gmrecords = gmrecords self. _ check _ arguments ( ) self. _ get _ events ( ) # get the process tag from the user or use " default " for tag self. process _ tag = ( gmrecords. args. label or " default " ) logging. ...
[ 0.503065288066864, 0.20745308697223663, 0.9300826787948608, 0.8175709247589111, 0.5849661827087402, 0.11676228791475296, 0.6658270955085754, 1.2385547161102295, -0.714162290096283, 0.0051166401244699955, 0.195468008518219, 0.20662228763103485, -0.3944253623485565, 0.10458678752183914, 0....
def get _ time _ to _ alarm ( self, alarm _ threshold = alarm _ threshold, parameterization = " phi _ theta ", metric = " time _ to _ alarm ", vis = false, write _ figs = paper _ ready ) : self. time _ to _ alarm, concentrations = self. compute _ time _ to _ alarm ( alarm _ threshold ) _, num _ samples = concentrations...
[ -0.18514642119407654, -0.24269287288188934, 0.6422479748725891, -0.09009899199008942, 0.3303014934062958, 0.26160338521003723, 0.4884657859802246, 0.1327066719532013, -0.5505277514457703, 0.7304376363754272, 0.2160198986530304, 0.2677103281021118, 0.7928555607795715, 0.2227565348148346, ...
def indexed _ data ( self ) - > pd. dataframe : data _ with _ index = self. data. set _ index ( self. common _ index _ fields ) if data _ with _ index. index. duplicated ( keep = false ). any ( ) : raise valueerror ( f " duplicate found in index " ) # if any duplicates slip in the following code may help you debug them...
[ -0.49116167426109314, 0.2420811951160431, 0.4218081533908844, -0.30255356431007385, 0.46704256534576416, -0.26873326301574707, 0.9631122350692749, -0.39635133743286133, 0.18531295657157898, -0.20214411616325378, 0.4233619272708893, 0.8028838634490967, -0.15654897689819336, -0.9906203746795...
def debug _ docker ( request, docker ) : yield if not hasattr ( request. node,'rep _ call') : return if not request. node. rep _ call. failed : return print ( " executing test failed ", request. node. nodeid ) containers = docker. containers. list ( all = true ) for c in containers : print ( f " container { c. name } :...
[ -0.3173835873603821, -0.30110564827919006, 0.9539746642112732, -0.9880516529083252, 0.1935061663389206, -0.46349653601646423, -0.07225827127695084, -0.8942872285842896, 0.06827051192522049, 0.056167326867580414, 0.23887942731380463, 0.6391454339027405, 0.6249071359634399, 0.875723540782928...
def compare _ cow _ transport _ algorithms ( ) : cows = load _ cows ( " ps1 _ cow _ data. txt " ) limit = 10 # print ( cows ) start1 = time. time ( ) greedy = greedy _ cow _ transport ( cows, limit ) end1 = time. time ( ) print ('greedy trips : ', len ( greedy ),'greedy time : ', end1 - start1 ) start2 = time. time ( )...
[ -0.322413831949234, 0.5029016137123108, 0.5010133981704712, 0.2525095045566559, 0.9213168621063232, 0.380353718996048, 0.14142094552516937, -0.8540476560592651, -1.478554606437683, 0.6306397318840027, -1.5745426416397095, 0.9985013008117676, 0.7823321223258972, 0.3138708174228668, 0.1460...
def build _ tree _ helper ( self, node ) : if node. all _ same _ class ( self. labels ) : node. leaf = true return node splits = [ ] for attr in self. data. loc [ : ] : nodes = { } try : # if the attribute is numerical int ( self. data. iloc [ 0 ] [ attr ] ) ranges = [ ] low = math. inf high = - math. inf for i in self...
[ -0.6508582830429077, 0.4140116572380066, 0.6577082276344299, -0.8981117606163025, -0.5168001055717468, -0.3984612822532654, 0.5571516156196594, 0.737786054611206, -0.44739553332328796, 0.024272799491882324, 0.1403881162405014, -0.04080160707235336, 0.7123075723648071, -0.33374208211898804,...
def run _ test ( test ) : # initialize test ( publishers, subscribers ) = yield from self. test _ handlers [ test. test _ type ]. on _ start ( test ) if none in publishers : test. test _ state = " test _ failed " self. log. error ( " failed to initialize test, a publisher failed initialization " ) return if none in sub...
[ 0.23481537401676178, -0.10604477673768997, 0.42967960238456726, -0.6666898131370544, -0.13532114028930664, 0.3855462670326233, 0.9025964140892029, -0.23044688999652863, -0.0895046666264534, -0.021924804896116257, 0.46625855565071106, -0.18647612631320953, -1.2970136404037476, 0.05989736318...
def config _ domain ( config ) : return set ( rule. pattern for rule in config ) # return reduce _ flow _ space ( domain )
[ -0.42684027552604675, 0.5360614657402039, 0.29709964990615845, 0.33676835894584656, 0.913575291633606, 0.625133216381073, 0.9391980767250061, 0.6564628481864929, 0.37755346298217773, 0.45089536905288696, -0.39009737968444824, 0.6831904649734497, 0.47065848112106323, 0.4590194821357727, 0...