text
stringlengths
25
2.19k
embedding
listlengths
768
768
def init _ parser ( self, dataset, tracefile ) : return
[ 0.5563015341758728, -0.819697380065918, 0.33892422914505005, -0.4326764643192291, 0.6373381614685059, 0.8812236785888672, -0.051616594195365906, 0.2326163649559021, -0.4468768537044525, -0.6833065748214722, -0.6570039391517639, -0.019429007545113564, -0.11498313397169113, 0.091443553566932...
def predict _ closest ( mode : str, names : list [ str ], amount : int, single _ version : bool, filter _ versions : bool ) - > dict [ str, list [ tuple [ str, str, float ] ] ] : # load the names of repos repos _ list = [ ] with open ( ".. /.. / models / repos _ list. txt " ) as fin : for line in fin : repos _ list. ap...
[ -0.586368203163147, -0.42469513416290283, 0.7597019672393799, -0.21701650321483612, -1.1844470500946045, 0.6846672296524048, 0.00015799645916558802, -0.07676415145397186, -1.2734006643295288, 1.0186535120010376, -0.5479447841644287, -0.4774862229824066, 0.3668496310710907, 0.47633299231529...
def create _ model ( self, ) - > callable [ [ union [ sequence, mapping ] ], mapping ] :
[ -1.5357974767684937, -0.1796717792749405, 0.47231215238571167, 0.13507327437400818, 0.47222891449928284, 0.11629200726747513, 0.04260823130607605, 0.1324438899755478, 0.29995349049568176, -0.2815335988998413, -0.8584568500518799, -0.5764128565788269, 1.0816951990127563, -0.2699865698814392...
def test _ step _ to _ sleep ( ) : graph = create _ object _ graph ( " example ", testing = true ) def func ( graph ) : raise sleepnow ( ) state _ machine = statemachine ( graph, initial _ state = func ) with patch. object ( graph. sleep _ policy, " sleep " ) as mocked _ sleep : next _ func = state _ machine. step ( ) ...
[ -0.027955761179327965, 0.8569590449333191, 0.3534944951534271, 0.796588659286499, 0.667095422744751, 0.7329593896865845, 0.5226894617080688, -0.5167778134346008, -0.04636969044804573, -0.9264041781425476, -1.0948708057403564, -0.014001661911606789, 0.3839574456214905, 0.08288797736167908, ...
def test _ md006 _ bad _ indentation _ in _ block _ quote ( ) : # arrange scanner = markdownscanner ( ) supplied _ arguments = [ " - - enable - rules ", " md006 ", " - - disable - rules ", " md007 ", " scan ", " test / resources / rules / md006 / bad _ indentation _ in _ block _ quote. md ", ] expected _ return _ code ...
[ 0.6390432119369507, -0.8371758460998535, 0.5679226517677307, 0.9636642932891846, 0.11696707457304001, -0.2628929018974304, 0.12609407305717468, 0.3219504654407501, -0.2743898630142212, 0.34662678837776184, 0.12556442618370056, -0.15924353897571564, -0.678477942943573, 0.5866552591323853, ...
def _ generate _ perfect _ calibration _ logits ( self, nsamples, nclasses ) : tf. random. set _ seed ( 1 ) logits = 2. 0 * tf. random. normal ( ( nsamples, nclasses ) ) py = tfp. distributions. categorical ( logits = logits ) labels = py. sample ( ) return logits, labels
[ -0.8391591906547546, -0.6451097726821899, 0.2477995604276657, -0.027229048311710358, -0.36561229825019836, 0.966600239276886, -0.5697636008262634, 0.23878136277198792, 0.3538029193878174, 0.6683415770530701, -0.42315125465393066, -0.06868497282266617, 0.29105252027511597, 0.380270332098007...
def next _ batch ( self, batch _ size, dataset, preprocessing _ fn = none, features _ to _ pad _ mask = none, concat _ features = false, multiple _ examples = 1, cache _ preprocessed = false, threads = 2, use _ queue = true, queue _ size = 10 ) : if use _ queue : return self. next _ batch _ queue ( batch _ size, datase...
[ -0.07946360111236572, 0.9825389385223389, 0.804845929145813, 0.6813697218894958, -0.34390223026275635, -0.6548693776130676, -0.23436574637889862, 0.4894581139087677, 0.6661850810050964, -1.0128426551818848, 0.05135563015937805, 0.5560362935066223, 0.5828516483306885, 0.7761730551719666, ...
def _ hash ( self, flow ) : r = flow. request ctx. log. warn ( " flow request url is : { } \ n ". format ( r. url ) ) _, _, path, _, query, _ = urllib. parse. urlparse ( r. url ) queriesarray = urllib. parse. parse _ qsl ( query, keep _ blank _ values = true ) # key : typing. list [ typing. any ] = [ str ( r. port ), s...
[ 0.10237199813127518, -0.3072735071182251, 0.8576578497886658, -0.2722587287425995, -0.37570634484291077, -0.19513224065303802, 0.15700092911720276, -0.47264793515205383, 0.13619567453861237, 0.3730570077896118, -0.5304826498031616, 0.6177331209182739, 0.07658734917640686, -0.13040220737457...
def test _ profile _ returns _ subscriptions ( authn _ policy, subscriptions _ model ) : request = dummyrequest ( ) authn _ policy. authenticated _ userid. return _ value = " acct : foo @ bar. com " subscriptions _ model. get _ subscriptions _ for _ uri. return _ value = \ { " some " : " data " } result = profilecontro...
[ 0.5645847916603088, 0.5134883522987366, 0.27922454476356506, -0.00538010336458683, 0.5804946422576904, 0.41099879145622253, -0.6450955271720886, -1.0391184091567993, 0.5128657817840576, -0.9667347073554993, -0.653801679611206, -0.5198772549629211, 0.060734134167432785, -0.48252201080322266...
def delete ( self, key ) : index = self. _ bucket _ index ( key ) bucket = self. buckets [ index ] todelete = none for i in bucket : if key = = i. data [ 0 ] : todelete = i break if todelete : bucket. delete ( todelete. data ) else : raise keyerror # todo : find the given key and delete its entry if found
[ 0.7000742554664612, 0.10594695806503296, 0.6884161829948425, -0.08336474746465683, 0.2951963543891907, -0.06320314854383469, 0.15117864310741425, -0.35717031359672546, 0.004819916095584631, -0.2343224138021469, -0.03241923451423645, 0.07430603355169296, -0.29786550998687744, 0.519784152507...
def get _ by ( self, id _ muestras ) : # se definie el query de la consulta. sql _ string = " " " select id, id _ muestras, codigo, descripcion, cantidad, st _ x ( the _ geom ) as x, st _ y ( the _ geom ) as y from puntos _ control where id _ muestras = % ( id _ muestras ) s and fecha _ recoleccion is not null " " " # ...
[ -0.5277699828147888, 0.2908956706523895, 0.315950870513916, -0.352105975151062, -0.5036605000495911, -0.8647333979606628, -0.6383358240127563, -0.9277331829071045, -0.15856416523456573, 0.11911964416503906, 0.1340789645910263, -0.1284296065568924, -0.055081404745578766, 0.00107033131644129...
def chain _ entanglement _ parameter ( coord, nc, dp, coord _ loc = [ 3, 6 ], sidechain = false ) : ent _ param = [ 0 ] * ( len ( coord. keys ( ) ) ) n _ applicable _ atoms = nc * dp - nc * 20 for i, key in enumerate ( coord ) : entang = 0 entang = chain _ entang _ helper ( coord [ key ], entang, nc, dp, coord _ loc, s...
[ -0.8229958415031433, 0.3015759289264679, 0.3957992196083069, -1.517637014389038, 0.8690596222877502, 0.5897315144538879, 0.2555431127548218, 0.300252765417099, -0.7856249213218689, 0.8679039478302002, -0.3247620165348053, -0.4496375620365143, -0.09901408851146698, -0.08237862586975098, 0...
def test _ mr _ job _ succeeded _ 1 ( self ) : r _ fact = 0. 36 r _ free = 0. 34 data = simbad. rotsearch. mr _ job _ succeeded ( r _ fact, r _ free ) self. asserttrue ( data )
[ 0.4511851966381073, 0.56160968542099, 0.32769402861595154, 0.8252029418945312, 0.20909804105758667, 1.5340359210968018, -0.24240803718566895, 0.2519216239452362, -0.2630652189254761, -0.5689850449562073, -0.6527121663093567, -0.04068795219063759, -0.7291920781135559, 0.026715492829680443, ...
async def get _ motion _ status ( self, device : optional [ str ] = none, * * kwargs : any ) - > motionstatus : # global or individual? if device is none : return self. _ _ motion _ status else : # does it exist? if device in self. _ _ motion _ status _ single : return self. _ _ motion _ status _ single [ device ] else...
[ -0.13317905366420746, 0.6507040858268738, 0.3411162793636322, 1.1832282543182373, -0.04210607334971428, 0.32806628942489624, -0.1993197500705719, -0.35431966185569763, 0.539777934551239, -0.3965007960796356, -0.09360326081514359, 1.0680440664291382, -0.7427669763565063, 0.4302493631839752,...
def test _ get _ digest ( image _ config : imageconfig, image _ config _ signed : imageconfig, config _ digest : str, config _ digest _ signed : str, ) : assert image _ config. get _ digest ( ) = = config _ digest assert image _ config _ signed. get _ digest ( ) = = config _ digest _ signed
[ -0.18582864105701447, -0.3913000524044037, 0.5465445518493652, 0.5818622708320618, 0.8061442971229553, -0.24773165583610535, 0.07282062619924545, 0.033812228590250015, 0.68166583776474, -0.20153997838497162, -0.14752845466136932, 0.21427269279956818, 0.6921705603599548, 0.23530881106853485...
def is _ dead _ end ( dungeon, tile ) : i = 0 for _, tup in cons. four _ directions. items ( ) : neighbour = dungeon. map. get _ tile _ neighbour ( tile, tup ) if neighbour. get _ type ( ) = = tiletypes. floor : i + = 1 return 0 < i < 2
[ -1.102638840675354, 0.004180685617029667, 0.7725924849510193, 0.4925789535045624, 0.07788102328777313, 0.5567920207977295, 0.22463758289813995, -0.08951084315776825, -0.38923919200897217, 0.23677414655685425, -0.08886413276195526, -0.3447357714176178, -0.7286136746406555, 1.092141151428222...
def find _ idx _ by _ name ( self, name : str ) - > int : return self. _ df. find _ idx _ by _ name ( name )
[ -1.498014211654663, 0.1776496320962906, 0.41781821846961975, -0.27442869544029236, -0.7545955181121826, -0.9463505148887634, 0.6505172252655029, -0.9205531477928162, -0.7502930760383606, 0.24496684968471527, -0.4578391909599304, -0.15481479465961456, -0.6573594808578491, -0.414037853479385...
def gnu ( self, visible = false ) : l = [ ] if visible : pt3 = point ( self. pt1. x, self. pt2. y ) # top left pt4 = point ( self. pt2. x, self. pt1. y ) # bottom right l. append ( self. pt1. gnu ( ) ) l. append ( self. pt2. gnu ( ) ) l. append ( pt3. gnu ( ) ) l. append ( pt4. gnu ( ) ) l. append ('set object rectangl...
[ -0.572198212146759, 0.134365975856781, 0.7683908939361572, -0.6860705614089966, -0.005295923911035061, 0.4748545289039612, 0.04403636232018471, -0.8990570902824402, -0.7804731726646423, 0.42811787128448486, -0.17473366856575012, 0.8231569528579712, 0.36247196793556213, 0.20682018995285034,...
def rabin _ miller ( n, tries = 7 ) : if n = = 2 : return true if n % 2 = = 0 or n < 2 : return false p = primes ( tries * * 2 ) # necessary because of the test below if n in p : return true s = n - 1 r = 0 while s % 2 = = 0 : r = r + 1 s = s / 2 for i in range ( tries ) : a = p [ i ] if power _ mod ( a, s, n ) = = 1 :...
[ -1.1946089267730713, 0.29449886083602905, 0.5952993631362915, 0.9455597400665283, -0.40863633155822754, 0.4797707796096802, -0.2878846824169159, 0.046767301857471466, 0.813606858253479, -0.04382163658738136, -0.5723110437393188, -0.15145154297351837, -1.007112741470337, 0.6281288862228394,...
def write _ file ( file, b ) : if hasattr ( file, " write _ bytes " ) : file. write _ bytes ( b ) elif hasattr ( file, " write " ) : file. write ( b ) else : with open ( file, " wb " ) as f : f. write ( b )
[ 0.3633699417114258, -0.18682758510112762, 0.5253593921661377, 1.192338466644287, 1.32869553565979, 0.5563334226608276, -0.004917957354336977, 0.4223463833332062, -0.5042054653167725, -0.19118915498256683, 0.6657599806785583, -0.36433061957359314, 0.22066490352153778, 0.6855573058128357, ...
def _ addcomponenttokit ( self, session, c, dbkit ) : try : dbcomponent = session. query ( components ). join ( kits ). filter ( and _ ( kits. name = = dbkit. name, kits. version = = dbkit. version, kits. iteration = = dbkit. iteration, components. name = = c. getname ( ), components. version = = c. getversion ( ) ) )....
[ -0.48980066180229187, 0.2051628977060318, 0.6289237141609192, -1.1505595445632935, 0.6376767754554749, 0.1535569578409195, -0.3008061945438385, 0.17410963773727417, 0.22801296412944794, -0.21685102581977844, -0.12929785251617432, -0.865562915802002, -0.10655348747968674, 0.8230209350585938...
def test _ disconnect ( self ) : c1 = self. _ new _ client ( ) c1. connect ( ) response = c1. received _ frames. get ( timeout = 0. 5 ) self. assertequal ( response. cmd, frames. connected ) c1. disconnect ( ) self. assertraises ( queueempty, lambda : c1. received _ frames. get ( block = false ) )
[ 0.18444207310676575, 0.1706751585006714, 0.40554460883140564, -0.2818308174610138, 0.37552693486213684, -0.034485042095184326, 0.0987384170293808, -0.555199921131134, 0.1953170746564865, -0.6199348568916321, -0.7710291743278503, -0.5846930742263794, -0.5890880823135376, 0.5972592830657959,...
def test _ depth _ first _ trav _ irregular ( gr ) : gr. add _ edge ( 1, 2 ) gr. add _ edge ( 1, 3 ) gr. add _ edge ( 2, 4 ) gr. add _ edge ( 2, 5 ) gr. add _ edge ( 3, 6 ) gr. add _ edge ( 3, 7 ) gr. add _ edge ( 4, 3 ) assert gr. depth _ first _ traversal ( 1 ) = = [ 1, 2, 4, 3, 6, 7, 5 ]
[ -0.11734507977962494, 1.355941891670227, 0.8281762599945068, 0.4292502701282501, 0.7629427313804626, 0.23916661739349365, 1.5910676717758179, -0.15989938378334045, 0.058806806802749634, -0.18143506348133087, -0.4611782133579254, -0.31041017174720764, 0.01717880740761757, -0.244944393634796...
def test _ boolvalue ( self ) : testresult = { } testresult = dataparser _ map. advancesearch ( " 1 ", " active ", " true " ) # print ( testresult ) self. assertequal ( testresult [ 0 ] [ " active " ], true, " bool search failed " ) self. assertequal ( testresult [ 0 ] [ " _ id " ], 1, " bool search failed " )
[ -0.6990695595741272, -0.26165151596069336, 0.5420436263084412, -0.28298789262771606, -0.20095022022724152, 0.5441535711288452, -0.16984593868255615, 0.1883705109357834, -1.5277694463729858, -0.2269492745399475, -0.7604070901870728, -0.35894492268562317, -0.48257049918174744, -0.14815610647...
async def send _ command ( self, command : str ) : # if the server is not running, return if not self. is _ running : return # otherwise, send it to stdin self. process. stdin. write ( command ) await self. process. stdin. drain ( )
[ -1.0175817012786865, -0.15484684705734253, 0.558544397354126, 0.433117151260376, 0.6470800042152405, 0.7738850712776184, -0.6100492477416992, -0.4502980709075928, 0.15599992871284485, 0.37104088068008423, -0.31532350182533264, 0.6851348876953125, -1.198675513267517, 0.6580619812011719, -...
def select ( self, columns : " union [ str, list [ str ] ] " ) - > " gbselection " : if self. downsample : raise valueerror ( " select not supported in downsample operation " ) if isinstance ( columns, str ) : columns = [ columns ] return gbselection ( self. _ df, self. by, columns )
[ -0.6746228337287903, 0.8374878764152527, 0.3829745054244995, 0.6521267890930176, 0.5737338066101074, -0.07612188905477524, 0.6586114168167114, -1.1081539392471313, -0.4347976744174957, -0.4095882773399353, 0.18700002133846283, 1.1689724922180176, -1.3480931520462036, -1.3984956741333008, ...
def namespace _ to _ dict ( self, args ) : args _ dict = vars ( copy. deepcopy ( args ) ) for arg in args _ dict : obj = args _ dict [ arg ] if isinstance ( obj, argparse. namespace ) : args _ dict [ arg ] = self. namespace _ to _ dict ( obj ) return args _ dict
[ -0.5304451584815979, -0.2795359790325165, 0.4285447299480438, -0.5252420902252197, -0.7197659015655518, -0.2937948703765869, -0.6540494561195374, -0.406697154045105, 0.22435274720191956, 0.10390479862689972, -0.5113962292671204, 0.33364418148994446, -0.21624067425727844, 1.8022167682647705...
def test _ comoving _ distance _ converter _ integration ( cosmology ) : cdc = comovingdistanceconverter ( d _ min = 10, d _ max = 1000, cosmology = cosmology, scale = 100, n _ interp = 10 ) u, lju = cdc. to _ uniform _ parameter ( 500 ) dl, ljd = cdc. from _ uniform _ parameter ( 500 ) assert u is not none assert dl i...
[ -0.5786632895469666, -0.05617079138755798, 0.4906741678714752, -0.6341598629951477, 0.8861017823219299, 1.1009005308151245, 0.11093287914991379, 0.2381102740764618, 0.1923844814300537, 0.12613746523857117, -1.4904552698135376, -0.1001102551817894, 0.38026776909828186, 0.7488985061645508, ...
def _ is _ move _ six ( self ) : return self. _ move _ counter % 6 = = 0
[ -0.48128604888916016, -0.3591899871826172, 0.7358476519584656, 1.1537021398544312, 0.2764245867729187, -0.4572030007839203, -0.2578067481517792, -0.31252577900886536, 0.7261541485786438, -0.1388239562511444, -1.2383244037628174, -0.6512178182601929, 0.06887787580490112, -0.278562992811203,...
def winbio _ winbioasyncmonitorframeworkchanges ( jitter ) : ret _ ad, args = jitter. func _ args _ stdcall ( [ " frameworkhandle ", " changetypes " ] ) raise runtimeerror ('api not implemented') jitter. func _ ret _ stdcall ( ret _ ad, ret _ value )
[ -0.24637264013290405, 0.6070490479469299, 0.22487646341323853, 0.25100216269493103, 0.6164448857307434, -0.4200320839881897, 1.4223651885986328, -0.7525615096092224, -0.16310420632362366, 0.05730582773685455, -0.42494481801986694, -0.15505212545394897, -1.4848581552505493, 1.84564447402954...
def test _ blocked _ ip _ specific ( self ) - > none : self. lookups [ " example. com " ] = [ ( ipv4address, " 192. 168. 1. 1 " ) ] channel = self. make _ request ( " get ", " preview _ url? url = http : / / example. com ", shorthand = false ) # no requests made. self. assertequal ( len ( self. reactor. tcpclients ), 0...
[ -0.7729233503341675, 1.6179440021514893, 0.35137930512428284, -0.08246942609548569, 0.29845908284187317, -0.10682506859302521, -0.5542376041412354, 0.013591540977358818, 0.04116874560713768, -0.7846352458000183, -0.49953821301460266, 0.43749168515205383, 0.27998438477516174, -0.10018678009...
def update _ product ( self, product _ id ) : action = " update product % s " % product _ id success = false # todo not working # - api refuses to accept patch in documented format # - maybe just a sandbox limitation? self. log. info ( action, " not supported by api " ) return true db = current. db s3db = current. s3db...
[ -0.6346678733825684, 0.0379299633204937, 0.8398528695106506, 0.06890158355236053, 0.27813369035720825, 0.5948543548583984, 0.08583153784275055, 0.19295303523540497, 0.4643279016017914, -0.13686418533325195, -0.019493667408823967, 0.4248707592487335, -0.4510830044746399, 0.3971222937107086,...
def update _ plot ( self ) : # set the plot's data to the new x and y points. self. plot. set _ data ( self. xs, self. ys ) # now expand the plot's axis boundary as the path grows. self. plot. axes. set _ xlim ( min ( self. xs ) - 0. 1, max ( self. xs ) + 0. 1 ) self. plot. axes. set _ ylim ( min ( self. ys ) - 0. 1, m...
[ 0.568546712398529, -0.4517284631729126, 0.3315781354904175, 0.04322734847664833, -0.43375420570373535, 0.2891767919063568, 0.29708653688430786, 0.06192166358232498, -0.22588583827018738, -0.5258651971817017, 0.41644734144210815, 0.46657875180244446, 0.4186461865901947, -0.8132789134979248,...
def plotallinone ( ) : # count of all requests in the database countofrequests = connection _ handler. getconnection ( ). requestcount ( ) # get names and counts of the top ten domains lables _ domain, sizes _ domain = pie _ chart. _ _ gettoptendomains ( ) # creation of lists to show " other " domains in relation to th...
[ 0.34163883328437805, 0.8142333030700684, 0.7963067293167114, -1.0968899726867676, -0.0029606893658638, 0.31338635087013245, 0.4362255334854126, 0.2779811918735504, 0.84516441822052, -0.6372447609901428, -0.7717118263244629, 0.8241314888000488, 0.19309328496456146, 0.5821254849433899, 1.2...
def execute _ request ( self, method, url, connect _ timeout = none, read _ timeout = none, retries = none ) : # make a request if not connect _ timeout : conn _ timeout = int ( self. auth _ config ['conn _ timeout'] ) if not read _ timeout : read _ timeout = int ( self. auth _ config ['read _ timeout'] ) if not retrie...
[ -1.1763317584991455, -0.10825356841087341, 0.8686743378639221, 0.3787544369697571, -0.09669630974531174, -0.34484565258026123, -0.7193902730941772, -0.2132502794265747, 0.17949165403842926, 0.21414929628372192, 0.3311706781387329, 0.28454428911209106, -0.22773274779319763, -0.6126106381416...
def clear _ layer ( name, include _ hidden = true, include _ children = true, purge = true ) : if not rs. islayer ( name ) : return guids = find _ objects _ on _ layer ( name, include _ hidden, include _ children ) rs. enableredraw ( false ) if purge and purge _ object : for guid in guids : obj = find _ object ( guid )...
[ 0.3759155869483948, -0.03351616859436035, 0.5508337616920471, -0.04467874765396118, -1.0729025602340698, 0.002518910448998213, -0.1253879964351654, -0.615768551826477, 0.8146874904632568, 0.8625494837760925, -0.5352232456207275, 0.8597528338432312, -0.034471865743398666, 0.6760220527648926...
def test _ include _ multiple _ places ( self ) : self. populate _ file ('main. yaml ','''- - - include : - file : include1. yml as : inc1 - file : include2. yml as : inc2''') self. populate _ file ('include1. yml ','''- - - include : - file : include2. yml as : inc2''') self. populate _ file ('include2. yml ','''- - -...
[ 1.0812146663665771, -0.003003521356731653, 0.9982564449310303, 0.862379252910614, -0.1489754468202591, 0.8859952688217163, 0.5048746466636658, 0.6448977589607239, 0.19489192962646484, -0.13645684719085693, -0.14454466104507446, -0.14255286753177643, 0.0012686233967542648, 0.651739060878753...
def all ( ) : years = range ( 2004, 2009 ) print ( " loading wrf data " ) wrfdata = load _ wrf ( years ) # junk = wrf. stats ( wrfdata [ 0 ]. data ) snodasdata = [ ] recondata = [ ] print ( " loading recon and snodas data " ) for y in years : print ( " " + str ( y ) ) snodasfile = " snodas / swe _ daily0600utc _ wester...
[ 0.3393014669418335, 0.06863399595022202, 0.6747732162475586, -0.7866179347038269, 0.8642364740371704, 0.08362819999456406, 0.07886466383934021, 0.5662288665771484, -0.37026485800743103, -0.37649261951446533, 0.11827494204044342, 1.2906725406646729, -0.011542415246367455, 0.6988898515701294...
def tabulate _ results ( results ) : # takes the form [ < filename >, model1score, model2score,... ] rows = [ ] # list of model names headers = [ " test filename " ] flag = 0 # dict that for each model, tracks the scores in a list per _ model = defaultdict ( list ) # iterate over each file for fname, file _ dict in res...
[ -0.275164395570755, 0.01985413394868374, 0.9190464019775391, 0.23392316699028015, 0.7432693839073181, 0.28635817766189575, 0.6169013977050781, -0.6840670704841614, -0.5038097500801086, 0.2715650796890259, 0.16806167364120483, -0.9018991589546204, 1.0779519081115723, 0.6739634871482849, -...
def get _ weather _ site _ by _ place _ name ( name : str ) - > dict : location = geocoder. osm ( name ) if not location. ok : raise valueerror ( f " osm could not find location for { name } " ) coordinates = location. geojson ['features'] [ 0 ] ['geometry'] ['coordinates'] nearest _ site = get _ weather _ site _ by _ ...
[ -0.41225525736808777, 0.07328817248344421, 0.45072293281555176, -0.7180216312408447, -1.315250277519226, -0.6998761892318726, -0.06950108706951141, -0.5822779536247253, -0.36740586161613464, 0.753528356552124, -0.4916129410266876, 0.04169086366891861, -0.13500021398067474, 0.19215978682041...
def parse _ command ( command ) : lookup = {'turn on': commands. turn _ on,'turn off': commands. turn _ off,'toggle': commands. toggle } parsed = re. findall ('( turn off | turn on | toggle ) \ s + ( \ d + ), ( \ d + ) through ( \ d + ), ( \ d + ) ', command ) [ 0 ] return [ lookup [ parsed [ 0 ] ], ( int ( parsed [ 1 ...
[ -0.672425389289856, 0.0034420257434248924, 0.580007016658783, -0.23605380952358246, 0.15501312911510468, -0.29227158427238464, 0.08071412891149521, 0.7946621775627136, 0.06628847122192383, 0.2958454191684723, -1.2533950805664062, -0.3817424774169922, -0.0913856029510498, 0.3573485016822815...
def remove ( self ) : jobmanager ( ). remove ( self ) # we just try to remove. the jobmanager takes care that unknown jobs are ignored
[ 0.3643377423286438, -0.16068093478679657, 0.41969311237335205, -0.1711699515581131, -0.6569957733154297, 0.29041850566864014, -0.26709869503974915, 0.7275714874267578, -0.02009640261530876, -1.5106463432312012, -0.5040577054023743, -0.46532413363456726, -0.760204553604126, 0.73104864358901...
def crop _ tensor ( net, out _ h, out _ w ) : _, _, in _ h, in _ w = net. shape assert in _ h > = out _ h and in _ w > = out _ w x _ offset = ( in _ w - out _ w ) / / 2 y _ offset = ( in _ h - out _ h ) / / 2 if x _ offset or y _ offset : cropped _ net = net [ :, :, y _ offset : y _ offset + out _ h, x _ offset : x _ o...
[ -0.32530322670936584, -0.72599196434021, 0.723630428314209, -0.4069216847419739, -0.5408536195755005, 0.8526498079299927, 0.4387299716472626, -0.7373800277709961, 0.02468091994524002, 0.5220543742179871, 0.2822389304637909, 0.034620270133018494, 0.8542576432228088, -1.042657494544983, 0....
def get _ params ( ntrain, exp _ name, order, nside, architecture = " fcn ", verbose = true ) : n _ classes = 2 params = dict ( ) params ['dir _ name'] = exp _ name # types of layers. params ['conv'] ='chebyshev5'# graph convolution : chebyshev5 or monomials. params ['pool'] ='max'# pooling : max or average. params ['a...
[ -0.06742003560066223, 0.4789675176143646, 0.7695216536521912, 0.36109259724617004, -0.1086149513721466, -1.0551180839538574, 0.3867817521095276, 0.11646364629268646, -0.7255620956420898, 0.7426728010177612, -0.8888310790061951, 0.19846880435943604, 0.449529230594635, 0.8315982818603516, ...
def _ add _ expected _ value _ global ( self, global _ data ) : if globalexplanation. _ does _ quack ( self ) : global _ data [ interpretdata. intercept ] = self. expected _ values return global _ data
[ -0.32977864146232605, 0.5546445846557617, 0.45163750648498535, -1.1616199016571045, 0.37479153275489807, 1.6932134628295898, 0.43295708298683167, 0.8199973702430725, 0.3085574507713318, 0.15009824931621552, 0.5510748624801636, 0.7395967245101929, -0.6571121215820312, 0.5195846557617188, ...
def read _ data ( self ) : roster _ data = roster _ data _ re. search ( self. content ). groupdict ( ) self. month = roster _ data ['month'] self. year = int ( roster _ data ['year'] ) # found all crewmember stats. of particular importance are the # timezone of the given bidline. # todo : there should be only one type ...
[ -0.2631136178970337, -0.08684936165809631, 0.7250856757164001, -0.841066300868988, 0.6842647790908813, 0.3100293278694153, -0.08925306051969528, -0.026902396231889725, -0.40759003162384033, -1.0277053117752075, 0.20390169322490692, 0.22079022228717804, 0.14127270877361298, 0.17441156506538...
def usage2 ( ) : app, server = pyro4server. flaskify ( name = " testflaskifyserver ", simulated = true ) app. run ( debug = true )
[ 0.41307657957077026, 0.8550287485122681, 0.4477854073047638, 0.26720622181892395, 0.5244277715682983, -0.4932591915130615, 0.07748087495565414, 0.2993939518928528, -0.4712718427181244, -0.7379727363586426, -1.2768969535827637, 0.7679710984230042, -0.40632322430610657, 0.8605868220329285, ...
def edit ( request, bookmark _ id ) : user = users. get _ current _ user ( ) if user is none : return http. httpresponseforbidden ('you must be signed in to add or edit a bookmark') bookmark = none if bookmark _ id : bookmark = bookmark. get ( db. key. from _ path ( bookmark. kind ( ), int ( bookmark _ id ) ) ) # todo ...
[ -0.6899435520172119, -0.09509282559156418, 0.4474914073944092, 0.5875524282455444, 0.618615448474884, -0.12026304006576538, 1.2264647483825684, 0.44288575649261475, 0.04947429150342941, -0.11233193427324295, -0.49393442273139954, 0.07871701568365097, 0.17622484266757965, 0.7806544899940491...
def compute _ grid _ bounds ( ctx, csector ) : # lame, we create a temp map object to get the bounds if ctx [ " t " ] = = " cwa " : sector = " cwa " else : sector = " state " if len ( csector ) = = 2 else csector mp = mapplot ( apctx = ctx, sector = sector, nocaption = true, state = csector, cwa = ( ctx [ " wfo " ] if ...
[ -0.36158475279808044, -0.32574543356895447, 0.7489204406738281, -0.09178674966096878, -0.13726481795310974, 0.01325747650116682, -0.37711840867996216, -0.11951268464326859, 0.8258911371231079, -0.06761171668767929, -0.1405160129070282, 0.36386677622795105, 0.1729295253753662, 0.66745519638...
def blog _ categories ( * args ) : posts = blogpost. objects. published ( ) return list ( blogcategory. objects. filter ( blogposts _ _ in = posts ). distinct ( ) )
[ 0.9627657532691956, 0.5801200270652771, 0.22556449472904205, 0.8355739712715149, 0.16413068771362305, 0.23628176748752594, -0.16595232486724854, 0.2201741635799408, -0.5271320343017578, -0.8669247031211853, -0.5157618522644043, -0.054614223539829254, 0.3819437325000763, 0.37237176299095154...
def train ( self ) : start _ time = time ( ) self. model. train ( ) times = [ ] t = time ( ) for step, sample in enumerate ( self. train _ loader ) : l = self. train _ step ( sample ) if self. rank = = 0 : self. train _ losses. append ( l ) # display progress progress = ( step + 1 ) / self. train _ len progress _ bar =...
[ -0.6411580443382263, 0.26048544049263, 0.7073818445205688, -0.012535128742456436, -0.3713810443878174, -0.079011932015419, 0.5837458372116089, 0.02170616015791893, -1.5222387313842773, 0.3167150318622589, -0.4239535629749298, 0.3533756136894226, 0.42887255549430847, 1.1488544940948486, 0...
def test _ member _ variable ( self ) : self. found _ lines _ eq ('+ member : membervariable ', [ ('class < b > membervariable < / b > { ', 2 ), ('int < b > member _ variable < / b > ; ', 4 ) ] )
[ 0.6675774455070496, -0.8721411824226379, 0.32368025183677673, 0.3853456974029541, 0.5698755383491516, -0.17165541648864746, -0.4307746887207031, -0.34789741039276123, 0.3410283327102661, -0.43961605429649353, -0.7274903655052185, 0.30412882566452026, -0.5970385670661926, 0.2850002348423004...
def _ stripfilename ( filenode ) : api _ basename = _ getbasefilename ( filenode ) if api _ basename. endswith ('_ dev') : api _ basename = api _ basename [ : - len ('_ dev') ] if api _ basename. endswith ('_ trusted') : api _ basename = api _ basename [ : - len ('_ trusted') ] if api _ basename. endswith ('_ private')...
[ -0.9247068762779236, -1.028235912322998, 0.7417483329772949, -1.1516789197921753, -0.2157394289970398, 0.4169061481952667, -0.27673864364624023, -0.06639578193426132, -1.0898313522338867, 0.11551462113857269, 0.03968271240592003, 0.29808133840560913, -0.11979400366544724, 0.284760326147079...
def setup ( self ) : image _ path = os. path. join ( os. path. dirname ( _ _ file _ _ ),'windows _ xp _ tags. jpg') with open ( image _ path,'rb') as image _ file : self. image = image ( image _ file ) assert self. image. has _ exif
[ 0.7111731767654419, 0.10361097753047943, 0.5903274416923523, 0.28036248683929443, 0.4920535981655121, 0.32501477003097534, 0.1996472030878067, 0.6842172741889954, -0.13767209649085999, -0.14334745705127716, -0.23589864373207092, -0.23376889526844025, 0.005034261848777533, 0.571519792079925...
def plot _ total _ effects ( total _ effects, ax, truncation _ pct = 0. 95, rv ='z ', qoi = 0 ) : total _ effects = total _ effects [ :, qoi ] width =. 95 locations = np. arange ( total _ effects. shape [ 0 ] ) p = ax. bar ( locations - width / 2, total _ effects, width, align ='edge') labels = ['$ % s _ { % d } $'% ( ...
[ 0.30712658166885376, 0.32426491379737854, 0.6656036972999573, -0.9742125272750854, -0.6068102717399597, 0.40135160088539124, 1.3312593698501587, -0.10168582201004028, 0.4831099808216095, 0.41816967725753784, 0.40277618169784546, 0.37743276357650757, -0.3245904743671417, -1.2250220775604248...
def exponential _ fit ( all _ data, type = " mono ", stretched = false, dim = " t1 ", indirect _ dim = none, ws _ key = " integrals ", ) : data, isdict = return _ data ( all _ data ) if ws _ key in all _ data. keys ( ) : x _ axis = all _ data [ ws _ key ]. coords [ dim ] new _ axis = _ np. r _ [ _ np. min ( x _ axis ) ...
[ 0.1967579871416092, -0.07140345871448517, 0.8966997861862183, -0.28274109959602356, -0.7358806729316711, 0.5092610120773315, 0.06227437034249306, 0.6860623955726624, -0.12486054003238678, 0.6058108806610107, -0.10563156008720398, 1.4798260927200317, -0.03935287892818451, -0.239789485931396...
def getxyalignedgroups ( sc, regdict, optimization = false, usevolumeshifts = false, lambdamotion = 0. 15, micromotiongain = 1. 0, sigmapix = 1. 0, sigmatime = 36, structuresize = 3 ) : start = time. time ( ) if not optimization : fieldmaskbool = regdict ['fieldmaskbool'] fielddur = regdict ['fielddur'] fieldtimes = np...
[ 0.28086522221565247, 0.7118672132492065, 0.7232417464256287, -0.4992467164993286, -0.23427420854568481, -0.7651551365852356, -0.28556057810783386, 0.3041739761829376, 0.14160647988319397, 0.39729830622673035, 0.314124196767807, 0.8987931609153748, -0.4210769832134247, 0.5369172692298889, ...
def dump _ best _ model ( self ) : self. logger _ object. log ( self. file _ object, " entered dump _ best _ model method of modeldumper class. " ) try : with open ( str ( config. tuned _ hyperparams _ file _ path ), " r " ) as outfile : params = json. load ( outfile ) self. logger _ object. log ( self. file _ object, ...
[ -0.7425633072853088, -0.7002108693122864, 0.9303475022315979, 0.274082750082016, 1.1677889823913574, 0.588648796081543, 0.6202797889709473, -0.142841637134552, -1.3517813682556152, -0.5541211366653442, -0.8484581708908081, 0.23835919797420502, 0.3647567331790924, 0.5445066094398499, 0.80...
def _ _ init _ _ ( self ) - > none : self. w : popxl. tensor = none self. b : popxl. tensor = none
[ 0.2907751798629761, 0.2989565432071686, 0.2973717451095581, -0.20348180830478668, 0.19331473112106323, 0.13125252723693848, 0.8132106065750122, 0.16705425083637238, -0.26514720916748047, 0.21930760145187378, -0.8378452658653259, -0.4937891364097595, 0.08529037982225418, -0.7428046464920044...
def test _ slack _ url _ sub ( self ) : os. environ [ " slack _ webhook _ url _ base " ] = self. slack _ url _ base value = magtape. slack _ url _ sub ( self. slack _ def _ url ) self. assertequal ( value, self. sub _ value )
[ 0.9671391248703003, 0.15452095866203308, 0.45144811272621155, 0.18635930120944977, 0.482893705368042, 0.5413631200790405, -0.1272314488887787, -0.36181437969207764, -0.7043949365615845, -1.058671474456787, -0.6736761331558228, 1.475716471672058, -0.10462255775928497, -0.11537227034568787, ...
def run _ tests ( self ) : jobid = self. job ['id'] logger = self. logger ctrl = self. job ['environment'] ['controller'] vms = self. client. meta _ vms ( self. appid ). vms for vm in vms : if vm. name. lower ( ) = = ctrl ['host']. lower ( ) : break else : raise jobfailed ('controller vm not found : % s'% name ) host =...
[ 1.3674668073654175, 0.5002647638320923, 0.9059675931930542, 0.28997036814689636, 0.1318824142217636, 0.16720150411128998, 0.13414785265922546, 0.2832425832748413, -0.4287049472332001, 0.6372284889221191, -0.3087879717350006, 0.2687477767467499, -0.17242108285427094, 0.1233552023768425, -...
def start ( self ) : if self. running : return self. filename = self. getfilename ( ) self. file = open ( self. filename, " wb " ) self. image = image. new ('rgb ', self. viewport. size ) self. writeheader ( ) # insert our recorder at the beginning of the render sequence. # after the beginning the next frame will have ...
[ -0.4915524423122406, -0.31325674057006836, 0.765944242477417, 0.16030143201351166, -0.412060022354126, -0.19025588035583496, 0.46177613735198975, 0.8127001523971558, -0.5478686690330505, -0.5480214953422546, -0.01643139123916626, 0.33928200602531433, -0.7296035885810852, 0.5381987690925598...
def runtime _ urls ( self ) - > optional [ sequence [ str ] ] : return pulumi. get ( self, " runtime _ urls " )
[ -0.4675396680831909, 0.21180763840675354, 0.56839919090271, 0.8810410499572754, 1.5082600116729736, 1.0471127033233643, -0.48670056462287903, -0.034474898129701614, 0.3334340751171112, -0.29301825165748596, -1.1093896627426147, 0.632440984249115, -0.34399059414863586, 0.2282712459564209, ...
async def test _ attributes _ ct ( hass : homeassistant, mqtt _ mock : mqttmockhaclient, setup _ tasmota ) - > none : config = copy. deepcopy ( default _ config ) config [ " rl " ] [ 0 ] = 2 config [ " lt _ st " ] = 2 # 2 channel light ( cw ) mac = config [ " mac " ] async _ fire _ mqtt _ message ( hass, f " { default ...
[ 0.28948867321014404, -0.02096358686685562, 0.4208777844905853, -0.7061048746109009, 0.4278494715690613, 0.2686680555343628, 0.12096414715051651, 0.5696384906768799, 0.4284817576408386, -0.7355118989944458, -0.5580341815948486, -0.07916192710399628, 0.3919669985771179, 0.7793965339660645, ...
def reformat _ float _ as _ str ( id _ value ) : if pd. isnull ( id _ value ) : return'' return str ( int ( id _ value ) )
[ 0.19279888272285461, 0.2704216539859772, 0.3544755280017853, -1.0528360605239868, -0.1361592411994934, -0.3549012839794159, -0.48135510087013245, -0.8510982394218445, -0.15999677777290344, 0.21720746159553528, 1.3224821090698242, -0.3664810061454773, 0.011159156449139118, -0.11511711776256...
def get ( self, key ) : index = self. _ bucket _ index ( key ) bucket = self. buckets [ index ] for i in bucket : if i. data [ 0 ] = = key : return i. data [ 1 ] raise keyerror # todo : check if the given key exists and return its associated value
[ 0.07253788411617279, 0.021895457059144974, 0.39770281314849854, 0.10880521684885025, -0.07893753051757812, 0.05292174965143204, -0.14866213500499725, -1.1943345069885254, -0.8178345561027527, -0.444978803396225, 0.2212715893983841, 0.2877708971500397, 0.3728440999984741, -0.024837221950292...
def delete _ account ( self, account _ id ) : del self. config ['accounts'] [ account _ id ]
[ 0.7174994349479675, -0.003535288153216243, -0.2238021045923233, 0.6072717905044556, 1.06834876537323, 0.11071761697530746, 0.36986786127090454, 0.9214975237846375, 1.0959774255752563, 0.055628105998039246, 0.10982329398393631, 1.2395340204238892, 0.237694650888443, 1.2122132778167725, 0....
def writeread ( self, serial, writebytes ) : print " writeread : serial : % s " % serial if serial not in self. devices : print " writeread : no device with serial % s " % serial return " " print " writeread : writing % d bytes " % len ( writebytes ) d = self. devices [ serial ] writelist = [ ord ( b ) for b in writeby...
[ -1.8575165271759033, -0.07571806013584137, 0.6287081837654114, -0.3894782066345215, -0.11653830111026764, -0.4756499230861664, 0.06741535663604736, -0.24207501113414764, 1.5377534627914429, -0.22835342586040497, 0.25916817784309387, 0.2710742652416229, -1.0150572061538696, -0.6533755660057...
def einsumdense ( d _ input, d _ output, use _ bias ) : layers = [ tl. weights ( init. glorotuniforminitializer ( ), [ d _ output, d _ input ] ), tl. fn ('einsumdense ', ( lambda kernel, embeds : # pylint : disable = g - long - lambda jnp. einsum ('xd,... d - >... x ', kernel, embeds ) ) ) ] if use _ bias : layers. ext...
[ -0.16896472871303558, 0.5847800970077515, 0.5928095579147339, 0.18452779948711395, 0.28781068325042725, -0.7809189558029175, 0.6309122443199158, -0.3543064296245575, 0.604577362537384, 0.3494793772697449, -0.27894699573516846, -0.3162878751754761, -0.3582168519496918, -0.14167214930057526,...
def gain ( self, gain = none ) : if gain is not none : ig = { self. again [ k ] : k for k in self. again. keys ( ) } if gain not in ig : raise attributeerror ('gain must be one of { } ) '. \ format ( sorted ( ig. keys ( ) ) ) ) self. _ write ( 0x0f, ig [ gain ] ) return self. again [ self. _ read ( 0x0f ) & 0b11 ]
[ -0.558487057685852, -0.08463241159915924, 0.5282517075538635, 0.6478114128112793, -0.0011220553424209356, -0.35939040780067444, 0.6456214189529419, -0.6356745958328247, 0.24367515742778778, -0.6891840100288391, -0.4875657260417938, 0.7969357371330261, -1.275830626487732, -0.148253411054611...
def gf _ sqr ( f, p ) : df = gf _ degree ( f ) dh = 2 * df h = [ 0 ] * ( dh + 1 ) for i in xrange ( 0, dh + 1 ) : coeff = 0 jmin = max ( 0, i - df ) jmax = min ( i, df ) n = jmax - jmin + 1 jmax = jmin + n / / 2 - 1 for j in xrange ( jmin, jmax + 1 ) : coeff + = f [ j ] * f [ i - j ] coeff + = coeff if n & 1 : elem = f...
[ -0.1237550601363182, 0.3901396691799164, 0.7218384742736816, -0.16522489488124847, -0.7256286144256592, -0.12372957915067673, 0.09578347951173782, -0.12946580350399017, -0.25863316655158997, 0.2559747099876404, -0.1511887013912201, 0.15753871202468872, -0.6558321714401245, -0.2335577905178...
def read ( fname ) : with open ( os. path. join ( os. path. dirname ( _ _ file _ _ ), fname ) ) as fd : return fd. read ( )
[ 0.0813438817858696, -0.4555821716785431, 0.77439284324646, -0.293223112821579, -1.109171748161316, 0.41268447041511536, 0.6353347897529602, -0.056010372936725616, -1.139454960823059, -0.2768438458442688, 0.9004247188568115, 0.004213860258460045, 0.35488179326057434, -0.7925252318382263, ...
def unfulfilled _ fks ( self, table ) : if not table. constraints : return { } unfulfilled = { } for ( constraint _ name, constraint ) in table. constraints. items ( ) : error = self. find _ constraint _ errors ( table, constraint ) if error : unfulfilled [ constraint _ name ] = { " error " : error, " foreign _ key " :...
[ -1.0350475311279297, -0.4036189019680023, 0.48103398084640503, -0.5683711171150208, -0.5997316837310791, -0.8340624570846558, 0.7282706499099731, -0.630295991897583, -0.10265364497900009, -0.06784632056951523, -0.6547757387161255, -1.2911016941070557, 0.32269617915153503, 0.398674696683883...
def set _ optimizer _ params _ grad ( named _ params _ optimizer, named _ params _ model, test _ nan = false ) : is _ nan = false for ( name _ opti, param _ opti ), ( name _ model, param _ model ) in zip ( named _ params _ optimizer, named _ params _ model ) : if name _ opti! = name _ model : logger. error ( " name _ o...
[ -0.3576958179473877, -0.02619284950196743, 0.7716302871704102, -0.15267829596996307, -0.01403054315596819, 0.39106765389442444, -0.33828607201576233, -0.2974123954772949, -1.0555176734924316, 1.196334958076477, -0.8543853759765625, 0.4246315658092499, -0.6586994528770447, 0.647096753120422...
def test _ cp _ special _ resolution _ correction _ notification ( app, session, status, legal _ type ) : # setup filing + business for email legal _ name ='cp business'original _ filing = prep _ cp _ special _ resolution _ filing ( cp _ identifier,'1 ', legal _ type, legal _ name, submitter _ role = none ) token ='tok...
[ 1.0441101789474487, -0.32953229546546936, 0.7504042387008667, -0.1647043228149414, 0.5861725211143494, 0.12239637970924377, 0.44622546434402466, 0.49447521567344666, -0.18949271738529205, 0.009492177516222, -0.12463455647230148, 0.47416093945503235, 0.41494107246398926, 0.2468509078025818,...
async def _ monitor _ once ( self ) : try : _ log. debug ( " connecting to smart bridge via ssl " ) self. _ leap = await self. _ connect ( ) self. _ leap. subscribe _ unsolicited ( self. _ handle _ unsolicited ) _ log. debug ( " successfully connected to smart bridge. " ) if self. _ login _ task is not none : self. _ l...
[ -0.04498687759041786, 0.407650887966156, 0.7561187148094177, -0.02813117764890194, 0.5866174697875977, -0.21817807853221893, 0.11996067315340042, -0.30807316303253174, 0.5819581747055054, -0.585236132144928, -0.8577556014060974, -0.2901625633239746, 0.3871287405490875, 0.38538858294487, ...
def has _ good _ discrepancy ( self, all _ discrepancy, group1, group2 ) : if not self. use _ discrepancy : return true db _ id1 = group1 ['db _ id'] db _ id2 = group2 ['db _ id'] if not disc. valid _ chain ( group1 ) or not disc. valid _ chain ( group2 ) : self. logger. debug ( " chains not valid for discrepancy " ) r...
[ -0.720221757888794, 0.21656648814678192, 0.7996490001678467, -0.5284274816513062, -0.44080331921577454, 0.3073576092720032, -0.03192142769694328, 0.40920642018318176, -0.4146227240562439, 0.033924564719200134, 0.15889325737953186, 0.1939692348241806, -0.7638737559318542, 0.6819913983345032...
def test _ _ welcomescreen _ _ to _ data ( ) : description ='yukari'welcome _ channels = [ welcomescreenchannel ( description ='koishi'), ] expected _ data = {'description': description,'welcome _ channels': [ step. to _ data ( defaults = true ) for step in welcome _ channels ], } welcome _ screen = welcomescreen ( des...
[ -0.1039409264922142, 0.7332314848899841, 0.3591744303703308, -0.2518947422504425, 0.5251704454421997, 0.2743954062461853, -1.24549400806427, -0.7798374891281128, 0.1660691797733307, 0.4367482364177704, -0.9163538217544556, -0.44867637753486633, 0.1035471186041832, 0.5572410821914673, -0....
def from _ flight _ itinerary ( self, roster _ day ) : duty _ day = dutyday ( ) for flight in roster _ day ['flights'] : itinerary = itinerary. from _ date _ and _ strings ( date = self. date _ tracker. dated, begin = flight ['begin'], end = flight ['end'], timezone = self. crew _ member. base. timezone ) origin = airp...
[ -0.25762802362442017, -0.9227748513221741, 0.6873703002929688, -0.029871201142668724, 0.5946467518806458, 0.5363764762878418, -0.7493249177932739, -0.4520604908466339, -0.7163971662521362, -0.7531996369361877, 0.03789728507399559, -0.07544984668493271, -0.053259044885635376, 0.414982050657...
async def listen _ for _ all _ responses ( self, callback _ function = none, timeout = none ) : url = " { } { } : { } / ws / responses / current _ operation ". format ( self. _ ws, self. _ server _ ip, self. _ server _ port ) if callback _ function : task = await self. stream _ output ( url, callback _ function, timeou...
[ 0.560747504234314, -0.31993693113327026, 0.7786816954612732, -0.20848621428012848, -0.09624401479959488, -0.7220888733863831, 0.9659355282783508, -0.14142835140228271, 0.3462980389595032, -0.5282589197158813, 0.39838650822639465, 0.3801981508731842, -0.24278773367404938, 0.2757622897624969...
def parse _ mechanism ( str, d ) : a = re _ dual _ cidr. split ( str ) if len ( a ) = = 3 : str, cidr6 = a [ 0 ], int ( a [ 1 ] ) else : cidr6 = none a = re _ cidr. split ( str ) if len ( a ) = = 3 : str, cidr = a [ 0 ], int ( a [ 1 ] ) else : cidr = none a = str. split (': ', 1 ) if len ( a ) < 2 : return str. lower (...
[ 0.1036602258682251, -0.8469709157943726, 0.5299994349479675, -0.37511271238327026, -0.22244895994663239, -0.4825412333011627, 0.2567504942417145, 0.0021527844946831465, -0.09771788865327835, -0.19872641563415527, -0.19828198850154877, 0.11274632066488266, 0.013639737851917744, -0.843822836...
def home ( request ) : customer _ fields = {'from': true,'assign': false,'agm': false,'date _ signed': false,'customer _ name': true,'customer _ address': false,'customer _ email': false,'phone _ number': true,'notes': false } service _ fields = {'agm': true,'customer _ name': true,'customer _ address': true,'customer ...
[ 1.0923070907592773, -0.5906515121459961, 0.7369202971458435, 0.6849762201309204, -0.6206530332565308, 1.0991061925888062, 0.40015149116516113, 0.30477041006088257, -0.3678058087825775, 0.6302494406700134, 0.6913731098175049, 0.014911483973264694, -0.46285510063171387, -0.3669739365577698, ...
def betting _ accuracy ( ) : data = getdata. load _ preprocessed _ data ( ) correct = 0 matches = 0 for index, row in data. iterrows ( ) : matches = matches + 1 odds = [ row ['avg _ home _ win _ odds'], row ['avg _ draw _ odds'], row ['avg _ away _ win _ odds'] ] i = odds. index ( max ( odds ) ) result = row ['match _ ...
[ -0.5257123112678528, -0.019041279330849648, 0.6728792190551758, -0.03949171304702759, -0.1775536984205246, 0.2978447675704956, 1.110146164894104, 0.4084143340587616, -0.4754708409309387, 0.2510410249233246, 0.5401644706726074, 0.21813622117042542, 0.24709200859069824, 0.14636726677417755, ...
def decay _ params ( self ) : peak _ index = self. peak _ index ( ) # 1. the squared impulse response is averaged into localtime intervals in the range of 10 – 50 ms, # to yield a smooth curve without losing short decays. data = self. data. copy ( ) # from peak to 2 seconds after the peak data = data [ peak _ index : m...
[ 0.766846776008606, -0.2973589301109314, 0.8324540853500366, -0.5906972885131836, 0.4276060163974762, -0.19110754132270813, 0.46835991740226746, -0.2784138321876526, 0.2204841822385788, 0.10066883265972137, -0.35524168610572815, 0.8970188498497009, -0.3170298635959625, 0.5673659443855286, ...
def main ( ) - > none : type _ opts = ('tcai _ 2 ','tfts _ 1 ','tcai _ 2 ','tfts _ 1') obs _ opts = ('ob1d ','ob1n ','spod ','spon') rtime _ opts = ( ['{ } h '. format ( x ) for x in range ( 1, 24 ) ] + ['{ } d '. format ( x ) for x in range ( 1, 8 ) ] ) if path ('/ data / gosat / share / db / sron _ gosat. db'). is _ ...
[ 0.28539028763771057, 0.2269895374774933, 0.878129780292511, 0.5100293755531311, -0.012311799451708794, 0.19405344128608704, 0.15883979201316833, -0.9689689874649048, -0.39471232891082764, 0.9120426177978516, -0.14048387110233307, -0.0984763503074646, 0.4399487376213074, 0.06466412544250488...
def ans ( ) : return render _ template ('answer. html ', answer = answer _ dict )
[ 0.3119977116584778, -0.19934533536434174, 0.31270769238471985, -0.687215268611908, -1.411725640296936, 0.42983007431030273, -0.11529991775751114, 0.8007977604866028, 0.11662333458662033, 0.3753385543823242, 0.11560655385255814, -0.6782810091972351, 0.9487714171409607, 0.17806066572666168, ...
def update ( ) : # read key input read _ keys ( ) # update positions update _ position ( ship ) for b in bullets : update _ position ( b ) for a in asteroids : update _ position ( a ) # detect collisions for a in asteroids : if a. colliderect ( ship ) : # we don't actually have a " game over " behavior, yet. # just pri...
[ -0.7535953521728516, -0.47939714789390564, 0.566811203956604, 0.02159597910940647, 0.4753952622413635, 0.4011448323726654, 0.13713760673999786, -0.6779815554618835, 0.026894232258200645, 0.24632951617240906, -0.21668505668640137, -0.11886225640773773, 0.40747880935668945, 0.256737947463989...
def test _ tag _ str ( self ) : tag = models. tag. objects. create ( name ='test tag ', user = sample _ user ( ) ) self. assertequal ( str ( tag ), tag. name )
[ 0.7791332602500916, -0.6374852061271667, -0.4407695531845093, 0.032387785613536835, 0.5609732866287231, 0.9492660164833069, -0.3679385483264923, -0.43750670552253723, -0.8699400424957275, -0.07753482460975647, -1.0859566926956177, 0.004990724381059408, -0.1719057261943817, 0.29373979568481...
def callcpu ( self, sharedarray, blocks, globaltimestep ) : # uppyramid of swept step for block in blocks : ct = globaltimestep self. cpuarray [ :, :, :, : ] = sharedarray [ block ] for ts, blockset in enumerate ( self. sets, start = self. start ) : # calculating step self. cpu. step ( self. cpuarray, blockset, ts, ct ...
[ -0.32422855496406555, 0.38722074031829834, 0.6919923424720764, 0.41311115026474, -0.2949267029762268, 0.22289302945137024, 0.9612630605697632, 0.020349271595478058, -0.6289315819740295, 0.8666202425956726, -0.07450783252716064, 0.1893603652715683, -0.9436783194541931, 0.9701899290084839, ...
def createonerow ( width ) : row = [ ] for col in range ( width ) : row + = [ 0 ] return row
[ -1.0598455667495728, 0.5276581645011902, 0.482379674911499, 0.3897847533226013, 1.0730785131454468, -0.45723825693130493, -0.31976795196533203, -0.13330230116844177, 0.8424471616744995, -0.5788628458976746, -0.08776180446147919, -0.8361456990242004, -0.41494593024253845, 1.5472090244293213...
def zp _ pow ( a, n, p ) : if n < 0 : a, n = zp _ inv ( a ), - n b = 1 while n : if n & 1 : b * = a n - = 1 a * = a a % = p n > > = 1 return b % p
[ -0.4531850814819336, -0.18590965867042542, 0.5460771322250366, 0.852959930896759, -0.40679067373275757, -0.37549883127212524, -0.0034847380593419075, 0.3932202160358429, 0.5123942494392395, 0.3505781292915344, 0.4491027593612671, -0.7386837005615234, -1.5286533832550049, -0.140141800045967...
def local _ gateway _ id ( self ) - > optional [ pulumi. input [ str ] ] : return pulumi. get ( self, " local _ gateway _ id " )
[ 1.810529351234436, -0.5338799953460693, 0.4674200117588043, 0.35665908455848694, -0.3358761966228485, 0.5840953588485718, 0.06621745228767395, 0.4255131185054779, 1.2363911867141724, 0.03924868255853653, -0.17714111506938934, 1.2994025945663452, -0.6181601285934448, 0.7904133796691895, -...
def run ( handlerclass = basehttprequesthandler, serverclass = httpserver, protocol = " http / 1. 0 ", port = 8000, bind = " " ) : server _ address = ( bind, port ) handlerclass. protocol _ version = protocol httpd = threadedhttpserver ( server _ address, handlerclass ) sa = httpd. socket. getsockname ( ) serve _ messa...
[ -0.4139764606952667, -0.27994367480278015, 0.7829410433769226, 0.6765435934066772, 0.25596103072166443, 1.151193380355835, 0.3544442653656006, 0.025476297363638878, -1.0501818656921387, 0.03863052651286125, -0.2488744705915451, 0.513365626335144, -1.2194008827209473, 0.11466012895107269, ...
def compute _ primes ( self, cubes ) : sigma = [ ] for i in range ( self. numvars + 1 ) : sigma. append ( set ( ) ) for i in cubes : sigma [ bitcount ( i ) ]. add ( ( i, 0 ) ) primes = set ( ) while sigma : nsigma = [ ] redundant = set ( ) for c1, c2 in zip ( sigma [ : - 1 ], sigma [ 1 : ] ) : nc = set ( ) for a in c1 ...
[ -0.6731306314468384, 0.8616256713867188, 0.6297299265861511, 0.5131232738494873, -0.07057591527700424, -0.25236040353775024, 0.38517600297927856, -0.0003365392331033945, 0.37471285462379456, 1.0328785181045532, -0.889203667640686, -0.05016127973794937, -1.1037436723709106, 0.44332894682884...
def get _ verbose ( deity ) : description ='this prayer appears to be about'if'name'in deity : description + = deity ['name']. strip ( ) else : description + ='an unknown % s deity'% deity ['gender'] if'kingdom'in deity : description + = ', belonging to the kingdom of the % s'% deity ['kingdom'] description + = '.'retu...
[ 0.05333264172077179, 0.2890934646129608, 0.44399845600128174, -1.0162690877914429, -0.09046003967523575, -0.7384828329086304, -1.2253838777542114, -0.600807785987854, -0.20637090504169464, 0.7759167551994324, 0.5060316324234009, 1.1817967891693115, 0.43660151958465576, 1.0325605869293213, ...
def writejson ( self, json _ obj ) : self. _ file. write ( bytes ( json. dumps ( json _ obj ) + " \ n ", " utf - 8 " ) )
[ -0.5976011157035828, -1.0007644891738892, 0.38475698232650757, -0.4000970125198364, 0.14363421499729156, 0.3779706656932831, 0.11831796169281006, 0.06656152009963989, 0.14628946781158447, -0.3558635711669922, -1.4773756265640259, 0.33529791235923767, 0.4874822199344635, 0.7097920179367065,...
def funcnameinner ( self, raw _ func _ name ) : base _ name = raw _ func _ name # check for the libc edge case if iswindows ( ) and ( not ismatching ( ) ) and base _ name. startswith ( " _ _ imp _ " ) : base _ name = base _ name [ len ( " _ _ imp _ " ) : ] if iswindows ( ) and ( not ismatching ( ) ) and base _ name. st...
[ -0.7190744280815125, -0.9396611452102661, 0.7919055819511414, -0.6897987723350525, -0.8776677846908569, -0.5112383961677551, 0.3893682062625885, -0.2756645679473877, 0.03743734955787659, -0.047665324062108994, 0.5101819634437561, 0.7054643034934998, -0.23078607022762299, 0.3562717735767364...
def s3list ( bucket, path, suffix = none, start = none, end = none, recursive = true, list _ dirs = true, list _ objs = true, limit = none ) : s3obj = namedtuple ('s3obj ', ['key ','mtime ','size ','etag ','bucket'] ) kwargs = dict ( ) if start is not none : if not start. startswith ( path ) : start = os. path. join ( ...
[ -0.2295849621295929, 0.02794872224330902, 0.8090565204620361, -0.4617365300655365, -0.37676510214805603, -0.4242541790008545, -0.150641530752182, 0.01906527206301689, 0.7730557322502136, 0.0819697231054306, -0.7577329277992249, 0.146193265914917, 0.5257176756858826, 0.02310783974826336, ...
def test _ passes _ gene _ inheritance _ surrounding _ disruptive _ dup ( self ) : gene _ inh = { " inh " : { " monoallelic " : \ { " loss of function " } }, " status " : \ { " confirmed dd gene " }, " start " : 5000, " end " : 6000 } # make a gene that is loss of function, with a monoallelic inheritance self. inh. kno...
[ 0.5763556957244873, 0.07259885221719742, 0.726565957069397, 0.74406498670578, 0.08582183718681335, 0.9538211226463318, 0.5431802868843079, 0.19107872247695923, 0.09112702310085297, -0.26774200797080994, -0.9226474165916443, 1.2827348709106445, -0.10166425257921219, -0.215105801820755, 1....
def get _ details _ permissions ( self ) : l = { } for i in self. _ permissions : perm = i pos = i. rfind ( ". " ) if pos! = - 1 : perm = i [ pos + 1 : ] try : l [ i ] = dvm _ permissions [ " manifest _ permission " ] [ perm ] except keyerror : l [ i ] = [ " normal ", " unknown permission from android reference ", " un...
[ -0.3017529547214508, 0.28359654545783997, 0.4541829228401184, -0.11736412346363068, -0.525797963142395, -0.8589511513710022, -0.466055303812027, -0.18696261942386627, -0.17170892655849457, 0.6597499847412109, 0.574475884437561, 0.17558389902114868, 0.0709492638707161, 0.2535455524921417, ...