text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def example _ 5 ( ) : square _ map = lambda x, y : x + [ y * * 2 ] square _ map. _ _ name _ _ = " sq _ map " x : list [ int ] = [ i for i in range ( 1, 4 ) ] x0 : list = [ ] res = fold ( x, square _ map, x0, debug = true ) print ( f " fold ( { x }, { square _ map. _ _ name _ _ }, { x0 } ) = { res } " ) | [
-0.243185892701149,
-0.578672468662262,
0.536212146282196,
0.2888459861278534,
-0.9389519095420837,
0.01922367326915264,
0.3347506523132324,
0.43996647000312805,
0.641543984413147,
0.05269117280840874,
-1.7126538753509521,
0.25943654775619507,
1.258462905883789,
0.8254634737968445,
0.495... |
def _ evaluate _ for _ shape ( self ) : child _ eval = self. children [ 0 ]. evaluate _ for _ shape ( ) vec = pybamm. evaluate _ for _ shape _ using _ domain ( self. domains [ " primary " ] ) return np. outer ( child _ eval, vec ). reshape ( - 1, 1 ) | [
0.01802579127252102,
-0.44801416993141174,
0.4426865577697754,
-1.037775993347168,
0.6566962003707886,
-0.285604864358902,
0.18210016191005707,
0.44740229845046997,
-0.6048992872238159,
-0.8092725872993469,
0.1407567262649536,
0.7431033253669739,
0.6278346180915833,
0.44298630952835083,
... |
def test _ atomic _ hex _ binary _ enumeration _ 2 _ nistxml _ sv _ iv _ atomic _ hex _ binary _ enumeration _ 3 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / hexbinary / schema + instance / nistschema - sv - iv - atomic - hexbinary - enumeration - 3. xsd ", instance ... | [
-0.7535807490348816,
-0.2186906337738037,
0.6681681275367737,
0.923805832862854,
-0.004819135647267103,
0.9740389585494995,
-0.46311116218566895,
0.4637318253517151,
0.3758513033390045,
1.0112028121948242,
-0.2932770252227783,
-0.18037165701389313,
0.1023360937833786,
-0.2232048362493515,
... |
def getresult ( self, data _ path, tree _ path = none ) : sample _ names, taxon _ names, data, lineages = \ self. getotutable ( data _ path ) calc _ names = [ ] for calc in self. calcs : # add either calc's multiple return value names, or fn name calc _ names. extend ( getattr ( calc. metric,'return _ names ', \ ( calc... | [
0.17778714001178741,
-0.011898964643478394,
0.8973997831344604,
0.3456313908100128,
0.6290887594223022,
-0.029878979548811913,
0.32936763763427734,
-0.9252526760101318,
-0.6590429544448853,
-0.2563100755214691,
0.3119484782218933,
-0.5189353227615356,
0.25888654589653015,
0.374631404876709... |
def get _ selected ( self, callback = none ) : self. eval _ js ('table. selected ( ) ', callback = callback ) | [
-0.21656575798988342,
0.08866988867521286,
0.2564162015914917,
0.7964169383049011,
-0.14546237885951996,
-2.06230092048645,
0.6373789310455322,
-0.6669973134994507,
0.1007024273276329,
-0.21716216206550598,
-0.7029164433479309,
0.869881272315979,
0.19778332114219666,
0.40124058723449707,
... |
def cause ( self, cause ) : allowed _ values = [ " unhandled _ exception ", " ignored _ exception ", " pattern _ match _ failure ", " premask _ type _ conversion _ failure ", " postmask _ type _ conversion _ failure ", " extended _ algorithm _ failure " ] # noqa : e501 if cause not in allowed _ values : raise valueerro... | [
-0.1259184032678604,
0.5275013446807861,
-0.06320177018642426,
0.7823742032051086,
-0.00558125413954258,
0.8488233685493469,
0.782911479473114,
0.4306696057319641,
0.00029070835444144905,
-0.2221354842185974,
-0.23912698030471802,
-0.0799110010266304,
-0.33785417675971985,
0.27169495820999... |
def batched _ placeholders ( dataset, max _ samples, n _ epochs, batch _ size ) : n _ threads = training _ params. n _ threads # load all sentences and the corresponding audio file paths. sentences, sentence _ lengths, wav _ paths = dataset. load ( max _ samples = max _ samples ) print ('loaded { } dataset sentences. '... | [
0.1298324316740036,
0.682847797870636,
0.7492623329162598,
-0.33356621861457825,
-0.1954042613506317,
-0.6206783056259155,
0.7327233552932739,
0.20838823914527893,
-0.5318123698234558,
0.27524644136428833,
-0.460966557264328,
-0.053341031074523926,
0.48920005559921265,
0.04566933587193489,... |
def test _ omp _ stack _ overflow ( self ) : runme = " " " if 1 : from numba import vectorize, threading _ layer import numpy as np @ vectorize ( ['f4 ( f4, f4, f4, f4, f4, f4, f4, f4 )'], target ='parallel') def foo ( a, b, c, d, e, f, g, h ) : return a + b + c + d + e + f + g + h x = np. ones ( 2 * * 20, np. float32 ... | [
0.5309689044952393,
0.7375336289405823,
0.8943880200386047,
0.390683114528656,
0.4882895052433014,
0.08167426288127899,
0.9198530316352844,
-1.0497212409973145,
0.16386283934116364,
-0.1311696171760559,
-0.0032781357876956463,
-0.24592836201190948,
-0.9822916984558105,
0.10288466513156891,... |
def test _ model _ collection _ init _ sequential ( self ) : opt _ args = dict ( max _ evaluations = 15, limit _ action = " ignore " ) model1 = evo _ app. model ( " f81 ", opt _ args = opt _ args ) model2 = evo _ app. model ( " hky85 ", opt _ args = opt _ args ) model3 = evo _ app. model ( " gtr ", opt _ args = opt _ a... | [
-0.18726128339767456,
0.18985769152641296,
0.6475188732147217,
0.17164038121700287,
1.1779369115829468,
0.34950941801071167,
0.11495223641395569,
-0.19696107506752014,
-0.7018458843231201,
-0.08249916881322861,
-0.7718515992164612,
-0.24328061938285828,
-0.21255716681480408,
0.131905302405... |
def _ _ init _ _ ( self ) : self. domain ='image'self. folder = os. path. dirname ( os. path. realpath ( _ _ file _ _ ) ) self. root _ style _ folder = os. path. join ( self. folder, " images / styles " ) self. picasso _ path = os. path. join ( self. folder, " images / picasso. jpg " ) os. environ [ " google _ applicat... | [
0.01193259097635746,
-0.4420456886291504,
0.3313142657279968,
-0.1402488499879837,
-0.01441581454128027,
0.5073331594467163,
0.5431540012359619,
0.06303524971008301,
-0.6745355725288391,
-0.043683044612407684,
-0.13255371153354645,
0.30818605422973633,
0.4984061121940613,
0.914269864559173... |
def get _ ticket ( func ) : @ wraps ( func ) def decorated _ function ( * args, * * kwargs ) : ticket _ pk = kwargs ['ticket _ pk'] ticket = models. bingoticket. get ( session = db _ session, game _ pk = flask. g. current _ game. pk, pk = ticket _ pk ) if ticket is none : return jsonify ( {'error':'unknown ticket'}, 40... | [
-0.2887744903564453,
-0.33700084686279297,
0.6332889199256897,
0.003948592580854893,
0.6902686357498169,
-0.43702301383018494,
0.12443029135465622,
-0.09332605451345444,
-0.3007538616657257,
-0.20349828898906708,
0.4877120554447174,
0.5796264410018921,
0.6785576939582825,
-0.30968561768531... |
def _ request ( self, url, method ='get ', params = none ) : self. connected = true retry _ counter = 0 method = method. lower ( ) func = getattr ( self. client, method ) params, _ = _ transparent _ params ( params ) def _ send ( retry _ counter ) : requests _ args = { } for k, v in self. client _ args. items ( ) : # m... | [
-0.5051426887512207,
-0.6897616982460022,
0.7447472810745239,
-0.1938692331314087,
0.014919583685696125,
-0.7021569609642029,
-0.5442151427268982,
-0.8506693243980408,
-0.5837469696998596,
-0.12792208790779114,
0.124427929520607,
-0.06677445024251938,
-0.5569193363189697,
0.198760524392128... |
def max _ rect4 ( data, m, n ) : print'> > max _ rect4 using 1d largest histogram area algo'" " " cache for all rows, which handling each column " " " cache = [ 0 ] * m def _ update _ cache ( ix ) : for iy in xrange ( m ) : if data [ iy * n + ix ]! = 0 : cache [ iy ] + = 1 else : cache [ iy ] = 0 import largest _ hist ... | [
0.5403719544410706,
0.268932968378067,
0.7106504440307617,
0.3571154773235321,
-0.3781142234802246,
-0.4583144783973694,
0.270812064409256,
-0.07040034234523773,
0.17149224877357483,
-0.1979171335697174,
0.23248906433582306,
-0.3151053786277771,
0.16598689556121826,
0.7828978300094604,
-... |
def binomial _ coefficient ( n, k ) : if k > n - k : # take advantage of symmetry k = n - k c = 1 for i in range ( k ) : c = c * ( n - i ) c = c / ( i + 1 ) return c | [
0.17523382604122162,
-0.30899277329444885,
0.3484940826892853,
0.40764179825782776,
0.22179366648197174,
-0.6607866883277893,
0.38483870029449463,
-0.029929406940937042,
-0.3762441575527191,
0.14861765503883362,
-0.08616631478071213,
-0.07500223070383072,
0.23818717896938324,
-0.0750876143... |
def assert _ columns _ exist ( self ) : assertions. assert _ cols _ in _ table ( self. e2e _ env. run _ query _ target _ snowflake,'ppw _ e2e _ tap _ s3 _ csv ','countries ', ['city ','country ','currency ','id ','language'], schema _ postfix = self. e2e _ env. sf _ schema _ postfix, ) assertions. assert _ cols _ in _ ... | [
-0.8021814227104187,
-0.1670086681842804,
0.46581771969795227,
0.1944492757320404,
1.3023792505264282,
0.8532543778419495,
0.3499739170074463,
-0.11419211328029633,
-0.5329130291938782,
-0.22430378198623657,
0.13448688387870789,
0.5633999705314636,
0.41819891333580017,
-0.08763289451599121... |
def _ convert _ network _ data ( self ) : network _ data = self. _ get _ network _ data ( ) # create a template because namedtuples are immutable nic _ template = dict. fromkeys ( base. networkdetails. _ fields ) nics = [ ] dns _ nameservers = self. _ get _ dns _ nameservers ( network _ data ) for link in network _ dat... | [
-0.9158990383148193,
0.06379029899835587,
0.36728766560554504,
-0.7940965890884399,
0.26403704285621643,
-0.24353419244289398,
-0.936065137386322,
-0.5641816258430481,
0.2207033932209015,
-0.4815896451473236,
-0.7220553159713745,
-0.9464631676673889,
0.10978076606988907,
0.2637756168842315... |
def restrict ( self, variable, value ) : pos = self. varlist. index ( variable ) # 的 的 new _ var _ list = self. varlist [ : pos ] + self. varlist [ pos + 1 : ] new _ cpt _ keyset = sorted ( list ( set ( [ k [ : pos ] + k [ pos + 1 : ] for k in self. cpt. keys ( ) ] ) ) ) # 新 的 合 成 的 合 new _ cpt = { } for new _ key in n... | [
-0.38680240511894226,
0.1937488317489624,
0.6016535758972168,
-0.2874583899974823,
-0.8780185580253601,
-0.9780998826026917,
0.2574067711830139,
-0.4686044454574585,
-0.045847177505493164,
0.07944267988204956,
-0.4143398702144623,
0.2564539611339569,
-0.8557506203651428,
-0.063878327608108... |
def send ( self, message ) : print ('test message') | [
0.3686358630657196,
0.1579437553882599,
0.19815102219581604,
0.5424926280975342,
1.0104420185089111,
0.7958154082298279,
0.687183141708374,
-0.9399691224098206,
-0.4735662341117859,
-0.8836966753005981,
0.40285545587539673,
0.5820569396018982,
-1.9074580669403076,
0.665957510471344,
-2.2... |
def undoclick ( self ) : self. clicked = false self. setborder ( black, 1 ) self. board. undopossiblemoves ( self. number ) | [
-0.042436569929122925,
0.2517487406730652,
0.5756866335868835,
-0.11116050183773041,
-0.2868680953979492,
-0.30910733342170715,
1.1779146194458008,
2.326192855834961,
0.05437028408050537,
-0.04057317599654198,
0.02549620531499386,
0.8025999665260315,
-0.23848067224025726,
-0.52745252847671... |
def do ( self, token ) : tks = token if hasattr ( token, " _ _ iter _ _ " ) else [ token ] rules = lemmatizertemplategenerator. load ( ) # cache me for rule in rules : template, _ = lemmatizertemplategenerator. get _ instance ( rule ) template. apply _ rule ( tks, rule ) # we force lemme if word is in lexicon with the ... | [
-0.19987262785434723,
-0.20924539864063263,
0.5656090378761292,
-0.7390875816345215,
-0.4022853672504425,
-0.7178572416305542,
-0.6905684471130371,
0.6677475571632385,
-0.2728549540042877,
-0.08619359135627747,
-0.36420300602912903,
-0.10631299763917923,
-0.7896677851676941,
0.998043954372... |
def load _ sendto _ values ( self ) : context = self. context return " \ n ". join ( context. getproperty ('forum _ sendto _ values ', [ ] ) ) | [
-0.7931591272354126,
0.004155879840254784,
0.3613875210285187,
-0.4496619403362274,
0.7669447064399719,
-0.6328170895576477,
-0.5380626916885376,
-1.0202393531799316,
-0.2837848365306854,
0.30196914076805115,
-0.7677423357963562,
0.37389281392097473,
0.041822399944067,
0.26720869541168213,... |
def _ constrainjoints ( self ) : for i in [ " pelvis ", " hip ", " knee ", " foot " ] : ik _ driver = none if not i = = " foot " : ik _ driver = self. joint _ dict [ i + " ik " ] orient _ blend = mc. createnode ( " blendcolors ", n = " { } _ { } _ { } jointorient _ bcl _ { } ". format ( self. side, self. name, i, self.... | [
-0.7838069796562195,
-0.09419280290603638,
0.9377744197845459,
-0.40396183729171753,
0.1498028039932251,
-0.02669963240623474,
0.3651700019836426,
0.05960235744714737,
-1.018054723739624,
0.27602311968803406,
-0.11075837910175323,
-0.6106790900230408,
-0.4165424704551697,
0.339643865823745... |
def htmlgetjson ( jsn, req = none ) : if jsn : _ j = none if isinstance ( jsn, str ) : _ j = loads ( jsn ) elif isinstance ( jsn, dict ) : _ j = jsn if _ j is not none : return f'< pre > < span style = " font - size : 90 % ; display : inline - block ; " > { annotateattributeshtml ( highlightdebugmessage ( dumps ( _ j, ... | [
-0.6356492638587952,
0.4495570957660675,
0.6037548780441284,
-0.5496711730957031,
-0.8281352519989014,
-1.246098518371582,
-0.19690391421318054,
-0.7409414649009705,
1.0673414468765259,
-0.4098133444786072,
-0.23481130599975586,
0.5953272581100464,
0.998928427696228,
0.9644532799720764,
... |
def is _ in _ gear ( self ) - > bool : return self. shift _ state in [ " d ", " r " ] | [
-0.7124955654144287,
0.002925666281953454,
0.5260895490646362,
0.46667709946632385,
0.018358588218688965,
0.6501830816268921,
-0.33632421493530273,
-0.8120840787887573,
-0.05808767303824425,
0.01575295999646187,
-0.20968319475650787,
0.8317800760269165,
-0.3897888958454132,
0.4754594266414... |
def can _ save ( self, dataset _ uri : str ) - > bool : | [
-1.2394949197769165,
0.861756443977356,
0.40898603200912476,
0.6075328588485718,
-0.04061894863843918,
0.004497956484556198,
-0.40380042791366577,
0.522572934627533,
-0.5635464787483215,
-0.11496516317129135,
-0.3990790843963623,
-0.12011785805225372,
-0.631324052810669,
0.0873945578932762... |
def create _ color ( self, name ) : self. execute ('insert into colors ( name ) values (? ) ', [ name ] ) | [
-0.06994476914405823,
0.10371760278940201,
0.4228160083293915,
-0.6879959106445312,
0.3778392970561981,
0.5875876545906067,
-0.526692271232605,
-0.40163376927375793,
-0.8853087425231934,
0.49717041850090027,
-0.8121063709259033,
-0.6088259816169739,
-0.4628208577632904,
0.1921844333410263,... |
def bivariate _ rl _ m ( self, ( alpha, mstar, logr0, sigma, beta ), limits, pixdx, m0 = - 21. 0, mdr = 7. ) : dmag = pixdx [ 0 ] dlogr = pixdx [ 1 ] # base 10 npix = np. around ( ( limits [ :, 1 ] - limits [ :, 0 ] ) / pixdx ). astype ('int') m = np. arange ( limits [ 0, 0 ], limits [ 0, 1 ], dmag ) # array in absolut... | [
0.652327835559845,
-0.47364941239356995,
0.9121549725532532,
-0.38902682065963745,
-0.320676326751709,
0.05952625349164009,
0.047693632543087006,
0.7320783138275146,
0.14148710668087006,
0.3340444564819336,
0.509516179561615,
0.6176660656929016,
-0.4131740629673004,
0.07675608992576599,
... |
def traverse ( self, root, pos ) : if not ( root ) : return ( x, y ) = pos self. traverse ( root. left, ( x - 1, y - 1 ) ) if pos in self. ans _ dict : insort ( self. ans _ dict [ pos ], root. val ) else : self. ans _ dict [ pos ] = [ root. val ] self. traverse ( root. right, ( x + 1, y - 1 ) ) | [
-0.12600800395011902,
0.32904744148254395,
0.5854044556617737,
-0.4289383292198181,
-1.6649733781814575,
-0.2903572618961334,
0.024593660607933998,
-0.07130198180675507,
-0.23010870814323425,
0.4213906228542328,
-0.2296641319990158,
0.08994575589895248,
-0.3634371757507324,
0.7029825448989... |
def load _ qc ( self ) : rejectval = self. config. get ('profiles ','qcreject') self. qc = self. read _ var ( self. qcvar )! = rejectval self. test _ shape ( self. qcvar, self. qc. shape, 2 ) | [
0.8653780817985535,
-0.07738274335861206,
0.4091646075248718,
-0.08662533760070801,
-0.11351671069860458,
0.5744907855987549,
-0.11541621387004852,
-0.4797055125236511,
-0.5274448990821838,
-0.7427679300308228,
-0.07779920846223831,
0.10822943598031998,
-1.3683768510818481,
-0.599892616271... |
def _ _ warn _ invalid _ loss ( batch _ loss, global _ step ) : if batch _ loss. isnan ( ). any ( ) : warnings. warn ( f " [ step { global _ step } ] mini - batch loss is { batch _ loss }. " + " this may break computation of quantities. " ) | [
0.23866122961044312,
-0.2808114290237427,
0.38868603110313416,
0.7350479364395142,
-0.5054367780685425,
0.22015702724456787,
-0.8213033080101013,
0.03205448016524315,
-1.093833565711975,
0.053970202803611755,
0.06963872164487839,
0.6033464670181274,
0.5701801776885986,
1.036086082458496,
... |
def default ( self, arg ) : arg = arg. split ( ". " ) if len ( arg ) > 1 : if " all ( ) " = = arg [ 1 ] : self. do _ all ( arg [ 0 ] ) if " count ( ) " = = arg [ 1 ] : itera = 0 for key, value in content. items ( ) : if arg [ 0 ] in key : itera + = 1 print ( itera ) | [
0.28868797421455383,
0.16861075162887573,
0.7354462146759033,
0.4840129613876343,
0.5722624659538269,
-0.187027707695961,
0.1317460685968399,
0.4627472460269928,
-0.9049174785614014,
0.09570394456386566,
0.11684346944093704,
-0.06299863010644913,
-0.5161098837852478,
1.110817313194275,
-... |
def broadcast _ url ( self, broadcast _ id = none, stop = false, layout = false ) : url = self. api _ url +'/ v2 / project /'+ self. api _ key +'/ broadcast'if broadcast _ id : url = url +'/'+ broadcast _ id if stop : url = url +'/ stop'if layout : url = url +'/ layout'return url | [
-0.6606858372688293,
0.0053933472372591496,
0.6193846464157104,
0.6323400735855103,
0.21001219749450684,
0.5725653767585754,
0.04461183771491051,
0.6966251134872437,
0.3004833161830902,
0.14910583198070526,
0.4740827977657318,
1.2470189332962036,
-0.6265469789505005,
0.23183614015579224,
... |
def parse _ cmdline ( ) : parser = argumentparser ( prog = " gk _ count _ frequency. py ", description = " ghostkoala output files into a ko count to read into r " ) parser. add _ argument ( " - i ", " - - indir ", dest = " indirname ", action = " store ", default = none, required = true, help = " input directory name ... | [
0.44592568278312683,
-0.2623918354511261,
0.6100817918777466,
0.12749873101711273,
0.6755419373512268,
0.28770455718040466,
0.49189385771751404,
-0.22883553802967072,
-1.133599877357483,
0.018864955753087997,
0.46045535802841187,
-0.9851086139678955,
0.04049881547689438,
0.4667556881904602... |
def get _ artist _ info _ from _ id ( self, artist _ id ) : artist _ info _ data = self. _ make _ request ( f " https : / / api. spotify. com / v1 / artists / { artist _ id } " ) if artist _ info _ data : artist _ info _ json = artist _ info _ data. json ( ) followers = artist _ info _ json [ " followers " ] [ " total ... | [
-0.7164977788925171,
-0.7857038378715515,
0.58598792552948,
-0.9499146342277527,
-0.21211408078670502,
-0.8922778964042664,
-0.8205324411392212,
-0.2888173758983612,
-0.05814912170171738,
-0.5085979104042053,
-1.0697463750839233,
0.5283235907554626,
-0.13697218894958496,
0.5236202478408813... |
def disable ( ) - > dict : return { " method " : " inspector. disable ", " params " : { } } | [
-0.2046670913696289,
-0.27076372504234314,
0.2531464695930481,
-0.14682890474796295,
-0.45400840044021606,
-0.19206330180168152,
0.8452629446983337,
1.0993889570236206,
-0.6284881234169006,
0.06546153873205185,
-0.9429237246513367,
-0.26977765560150146,
-0.8564001321792603,
0.0728710144758... |
def endelement ( self, name ) : if ( len ( self. chars. strip ( ) ) > 0 ) : print self. tab ( self. level + 1 ) + self. chars. rstrip ( ) self. chars ='' print self. tab ( self. level ) + " < / " + name. rstrip ( ) + " > " self. level = self. level - 1 | [
-0.28116336464881897,
0.011419199407100677,
0.7813380360603333,
-0.4556642472743988,
-0.6230515241622925,
0.7085575461387634,
0.2417319416999817,
0.11215441673994064,
-0.8689808249473572,
0.4270315170288086,
-0.5370320081710815,
0.6221005916595459,
-0.4853120446205139,
0.48177140951156616,... |
def new ( * args, * * kargs ) : obj = itksubtractconstantfromimagefilteriuc2diuc2. _ _ new _ orig _ _ ( ) import itktemplate itktemplate. new ( obj, * args, * * kargs ) return obj | [
0.08202780783176422,
-0.6746363043785095,
0.3012051582336426,
-0.39521053433418274,
-0.7998618483543396,
-0.3001655042171478,
1.320427656173706,
0.7056915163993835,
-1.3122738599777222,
-0.8372762203216553,
-0.5755161643028259,
0.01431505847722292,
1.3304370641708374,
0.012002590112388134,... |
def draw ( self, view ) : # implement me for i in self. _ aliens : if i is not none : for j in i : if j is not none : j. draw ( view ) if self. _ ship is not none : self. _ ship. draw ( view ) self. _ dline. draw ( view ) for x in self. _ bolts : x. draw ( view ) | [
-0.5644733905792236,
-0.18408264219760895,
0.7396323680877686,
-1.0097098350524902,
0.5101683735847473,
-0.15279848873615265,
-0.6350832581520081,
-0.31857261061668396,
0.17687733471393585,
-1.412145733833313,
0.3914724886417389,
0.2035706788301468,
0.6754912734031677,
0.5092594027519226,
... |
def test _ list _ decimal _ min _ length _ 3 _ nistxml _ sv _ iv _ list _ decimal _ min _ length _ 4 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / decimal / schema + instance / nistschema - sv - iv - list - decimal - minlength - 4. xsd ", instance = " nistdata / list / ... | [
-0.20769815146923065,
-0.0782880112528801,
0.5010066032409668,
0.19021250307559967,
-0.22638650238513947,
-0.055957451462745667,
-0.683312177658081,
-0.06993364542722702,
1.3670438528060913,
-0.40350964665412903,
-0.99172443151474,
-0.7233529686927795,
-0.5651788711547852,
-0.0285295676440... |
def add _ policy ( self, sec, ptype, rule ) : raise runtimeerror ( " not implemented " ) | [
0.17009855806827545,
0.37130436301231384,
0.38610121607780457,
0.7586638331413269,
1.6475590467453003,
1.9130529165267944,
-0.531266450881958,
-0.39492738246917725,
0.31172481179237366,
0.357622891664505,
0.14974458515644073,
0.4011286199092865,
-0.8459501266479492,
0.5770276784896851,
0... |
def sse ( clf, x, y ) : y _ hat = clf. predict ( x ) sse = np. sum ( ( y _ hat - y ) * * 2 ) return sse | [
0.3560226261615753,
-0.15890562534332275,
0.34966060519218445,
0.5325300693511963,
0.1789628267288208,
0.19562111794948578,
0.3034038543701172,
0.1360131800174713,
-0.32665833830833435,
0.8761270642280579,
-1.7480815649032593,
1.248513102531433,
0.7256591320037842,
0.12115775793790817,
0... |
async def download _ conversations ( background _ tasks : backgroundtasks, request : historyquery = historyquery ( ), collection : str = depends ( authentication. authenticate _ and _ get _ collection ), ) : conversation _ data, message = historyprocessor. flatten _ conversations ( collection, request. month, request. ... | [
0.05954590439796448,
-0.5337732434272766,
0.5450867414474487,
0.6123858690261841,
0.36878231167793274,
-0.1001095175743103,
0.2783951163291931,
-0.6488460302352905,
0.2632084786891937,
-0.20380178093910217,
0.6799798011779785,
0.35440272092819214,
-0.6027325987815857,
0.2504180669784546,
... |
def test _ func ( self ) : self. rol _ nu = rol _ get _ huidige ( self. request ) return self. rol _ nu! = rollen. rol _ none | [
-0.24813126027584076,
-0.10943635553121567,
0.36326897144317627,
0.5756982564926147,
0.8648649454116821,
-0.3452755808830261,
0.6418282985687256,
-0.3793443441390991,
0.26731443405151367,
-0.7358728051185608,
-0.2757412791252136,
0.4507136046886444,
-0.5415692925453186,
-0.4895897805690765... |
def getinputeventhandlerkey ( self, inputeventhandler ) : for keyname, handler in list ( self. inputeventhandlers. items ( ) ) : if handler = = inputeventhandler : return keyname return none | [
-0.2892921566963196,
-0.935792863368988,
0.3341101109981537,
0.031888384371995926,
-0.9299932718276978,
0.6476019620895386,
0.42279940843582153,
-0.2894445061683655,
-0.6012440323829651,
0.16110454499721527,
-0.790381133556366,
-0.11029543727636337,
-0.5657250881195068,
0.8556180000305176,... |
def form ( ) : return " " " < form class = " form - signin " action = " / commonsinterwiki / cgi - bin / main. py / " method = " get " > < h2 class = " form - signin - heading " > please enter an id. < / h2 > < input type = " text " class = " input - block - level " name = " id " placeholder = " q # # " > <! - - < inpu... | [
-0.3388321101665497,
-0.020349282771348953,
0.5369101166725159,
-0.24454383552074432,
0.009321514517068863,
0.29796501994132996,
0.06505923718214035,
0.010333524085581303,
-0.14146779477596283,
-0.4980265200138092,
-0.44006821513175964,
-0.48143601417541504,
-0.08933039754629135,
0.7094069... |
def cleanup ( self ) : log. debug ('deleting metadata folder : % r ', self. _ mgr. target _ path ) shutil. rmtree ( self. _ mgr. target _ path, ignore _ errors = true ) self. _ metadata _ path = none | [
0.1279638111591339,
-0.41034868359565735,
0.16182772815227509,
-0.5954321622848511,
0.668487548828125,
0.4983667731285095,
0.5284952521324158,
0.5653529763221741,
-0.46787434816360474,
-0.5568573474884033,
0.7907637357711792,
1.057732343673706,
0.1143767461180687,
0.31006506085395813,
0.... |
def test _ atomic _ qname _ enumeration _ 2 _ nistxml _ sv _ iv _ atomic _ qname _ enumeration _ 3 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / qname / schema + instance / nistschema - sv - iv - atomic - qname - enumeration - 3. xsd ", instance = " nistdata / atomic ... | [
-0.21866847574710846,
-0.7950646281242371,
0.5476962327957153,
-0.09042413532733917,
-0.1803925633430481,
0.3047918379306793,
-0.4529404938220978,
-0.9020543694496155,
0.45915523171424866,
0.5439711809158325,
-0.16397717595100403,
-0.29021981358528137,
-0.10884702950716019,
-0.499103188514... |
def cli ( verbose ) : level = ( logging. warning, logging. info, logging. debug ) [ min ( verbose, 2 ) ] l. setlevel ( level ) | [
0.8548145294189453,
0.05545607581734657,
0.5422669649124146,
0.8597497344017029,
0.8893663287162781,
0.06249343603849411,
-1.053471565246582,
-0.4386279582977295,
-0.9800198674201965,
-0.07918602228164673,
-0.5085171461105347,
1.1225833892822266,
0.46586504578590393,
0.39044278860092163,
... |
def write _ chimera _ markers ( filename, centers, apix _ x, apix _ y, apix _ z, marker _ size = 3. 0 ) : try : out = file ( filename, " w " ) out. write ('< marker _ set name = " % s " > \ n'% filename. split ( ". " ) [ 0 ] ) for j, c in enumerate ( centers ) : out. write ('< marker id = " % d " x = " % 1. 3f " y = " ... | [
-0.3826277554035187,
-1.024756669998169,
0.5454221367835999,
-0.2534011900424957,
0.5473445653915405,
-0.03782615065574646,
0.6352038979530334,
0.8637020587921143,
0.029636027291417122,
0.11191818118095398,
-0.1827469766139984,
-0.2321210503578186,
-0.5684985518455505,
-0.08639602363109589... |
def find _ vogs _ by _ uid ( db : session, ids : optional [ list [ str ] ] ) : if ids : log. debug ( " searching vogs by ids in the database... " ) return db. query ( vog ). filter ( vog. id. in _ ( ids ) ). all ( ) else : log. debug ( " no ids were given. " ) return list ( ) | [
-0.2815187871456146,
0.6393665075302124,
-0.06271081417798996,
0.414808064699173,
0.38673752546310425,
-0.6321154832839966,
-1.371604084968567,
-0.1370774805545807,
0.41101524233818054,
0.7693178057670593,
0.17138856649398804,
0.5962914228439331,
-0.8111496567726135,
1.0688605308532715,
... |
def state ( self, state ) : self. _ state = state | [
-0.6938380599021912,
0.2647537887096405,
-0.05033043771982193,
-0.46604734659194946,
0.013013267889618874,
0.6952746510505676,
0.47958868741989136,
0.8855622410774231,
-0.21200717985630035,
-0.7060412168502808,
-1.1696633100509644,
-0.4392821490764618,
-0.044606778770685196,
0.869578361511... |
def prepare _ pairs _ for _ metadata _ exports ( paths _ to _ samples _ info, tsca _ id, google _ bucket _ id, blacklist ) : # gather all samples all _ samples = get _ samples _ multiple _ batches ( paths _ to _ samples _ info, google _ bucket _ id ) # create list of pairs pairs _ list = create _ pairs _ list ( all _ s... | [
-0.3071354329586029,
-0.37334781885147095,
0.5215250253677368,
0.09390127658843994,
-0.3441709578037262,
-0.3543964624404907,
0.1420636773109436,
0.22167864441871643,
0.2620922923088074,
1.4792593717575073,
0.26164475083351135,
0.4504144787788391,
0.16496776044368744,
0.7236028909683228,
... |
def normalize _ data ( dataset ) : n _ train = dataset ['x']. shape [ 0 ] n _ val = dataset ['xv']. shape [ 0 ] n = n _ train + n _ val mean _ image = pixelwise _ mean _ memory _ efficient ( [ dataset ['x'], dataset ['xv'] ], n ) std _ image = pixelwise _ std _ memory _ efficient ( [ dataset ['x'], dataset ['xv'] ], n,... | [
-0.25110316276550293,
0.8850868940353394,
0.5729474425315857,
-0.22745594382286072,
-0.7954956293106079,
-0.3434848487377167,
-0.1020885556936264,
-0.11504334956407547,
0.7966848015785217,
0.4909043312072754,
0.47817808389663696,
0.808205246925354,
0.4060225486755371,
0.5267958045005798,
... |
def evaluate ( func, x, upper _ limit, lower _ limit ) : try : # try to evaluate func in x y = eval ( func ) # check if y exceedes limits if y > upper _ limit : return float ( " inf " ) elif y < lower _ limit : return float ( " - inf " ) else : return y except : return nan | [
0.11695882678031921,
-0.18309907615184784,
0.5547168254852295,
0.22713516652584076,
-0.07948936522006989,
0.5131701827049255,
-0.9912418127059937,
0.2240179181098938,
-0.5166730284690857,
-0.5423102378845215,
0.21899861097335815,
1.1153905391693115,
0.12543565034866333,
-0.8221498727798462... |
def calculate _ checksum _ on _ stream ( f, algorithm = d1 _ common. const. default _ checksum _ algorithm, chunk _ size = default _ chunk _ size, ) : checksum _ calc = get _ checksum _ calculator _ by _ dataone _ designator ( algorithm ) while true : chunk = f. read ( chunk _ size ) if not chunk : break checksum _ cal... | [
0.2947911024093628,
0.24309784173965454,
0.48759791254997253,
0.20377352833747864,
-0.34267041087150574,
-0.41997259855270386,
0.2858300507068634,
0.2600065767765045,
-0.8449752926826477,
-0.30547773838043213,
0.029194438830018044,
0.08952706307172775,
0.48387831449508667,
0.59307849407196... |
def calc _ img _ size ( self ) : img _ size = self. op. domain. shape found _ shape = false while not found _ shape : if ( sum ( [ img _ size [ 0 ] % 2 * * ( i + 1 ) for i in range ( self. downsample _ levels ) ] ) + sum ( [ img _ size [ 1 ] % 2 * * ( i + 1 ) for i in range ( self. downsample _ levels ) ] ) ) = = 0 : f... | [
-0.5419721603393555,
0.6433461308479309,
0.6922600269317627,
-0.5510411262512207,
-0.37024298310279846,
-0.3953019678592682,
1.3572196960449219,
0.2040565460920334,
-0.2722218632698059,
-0.2956365644931793,
-0.07399483770132065,
-0.006836394779384136,
-0.8326889872550964,
0.668834269046783... |
def _ createmetadatadict ( benchmark _ spec ) : metadata = mnist _ benchmark. createmetadatadict ( benchmark _ spec ) metadata. update ( {'depth': benchmark _ spec. depth,'mode': benchmark _ spec. mode,'data _ format': benchmark _ spec. data _ format,'precision': benchmark _ spec. precision,'skip _ host _ call': benchm... | [
0.4014834463596344,
0.03235545754432678,
0.38090506196022034,
-1.2907613515853882,
0.08705317974090576,
0.5102078914642334,
-0.3048735558986664,
0.010897329077124596,
-1.3359605073928833,
1.121338963508606,
-0.9937313795089722,
0.6487911343574524,
0.4417259693145752,
0.5999937057495117,
... |
def get _ position ( self, instrument ) : url = " { 0 } / { 1 } / accounts / { 2 } / positions / { 3 } ". format ( self. domain, self. api _ version, self. account _ id, instrument ) try : return self. _ client _ _ call ( uri = url, method = " get " ) except requestexception : return false except assertionerror : retur... | [
-1.0937755107879639,
0.6948937773704529,
0.6268450021743774,
0.1271689236164093,
0.20673826336860657,
0.3187861144542694,
0.20240679383277893,
-0.6084754467010498,
-0.12909024953842163,
0.6969059705734253,
-0.04047146067023277,
-0.4359395503997803,
-1.392106056213379,
-0.8182873725891113,
... |
def condition ( pred : any, true : any, false : any ) - > symbolicexpression | any : symbol _ obj = first _ symbolic _ object ( pred, true, false ) if symbol _ obj is not none : return symbol _ obj. expr _ cls ( lambda t, c, f : t if c else f,'{ } if { } else { } ', [ true, pred, false ] ) return true if pred else fals... | [
0.49949410557746887,
-0.21065044403076172,
0.49118247628211975,
-0.10688841342926025,
-0.385215163230896,
-0.15244783461093903,
0.6423285603523254,
1.0454055070877075,
-0.9447270631790161,
0.3349020183086395,
0.3618990182876587,
0.3902774453163147,
0.2930268347263336,
0.41295114159584045,
... |
def _ add _ mat _ spline ( self, names, cx, spline _ type ='bezier ', scaler = 1. ) : st3d = self. st3dinit tvars = [ ] for name in names : if name. startswith ('r') or name. startswith ('w') or name. startswith ('b') : l _ index = none try : ireg = int ( name [ 1 : 3 ] ) try : split = re. match ( r " ( [ a - z ] + ) (... | [
-0.28080612421035767,
-0.1030455082654953,
0.8569629192352295,
-0.7325924038887024,
-0.06692517548799515,
-0.021273108199238777,
-0.48174265027046204,
-0.20123623311519623,
0.21671564877033234,
0.04352610558271408,
-0.6495230793952942,
-0.3427867293357849,
-0.039007510989904404,
0.53527534... |
def remove ( self, w ) : self. blur ( w ) self. widgets. remove ( w ) # self. repaint ( ) self. chsize ( ) | [
-0.2982693314552307,
-0.27522778511047363,
0.47411438822746277,
-0.6733696460723877,
-1.1312052011489868,
0.12601915001869202,
0.8613733053207397,
0.2053605169057846,
0.7604098320007324,
-0.12717318534851074,
-0.893066942691803,
-0.021207885816693306,
-1.03794527053833,
0.8076741099357605,... |
def _ _ init _ _ ( self, execution _ event _ id = none, execution _ id = none, event _ type = none, severity = none, cause = none, count = none, time _ stamp = none, execution _ component _ id = none, masked _ object _ name = none, algorithm _ name = none, exception _ type = none, exception _ detail = none ) : # noqa :... | [
1.0697355270385742,
-0.04241203889250755,
0.7916631698608398,
0.17738929390907288,
0.15845341980457306,
-0.38443076610565186,
0.40732258558273315,
0.24691806733608246,
0.8198615908622742,
0.7101242542266846,
-0.04812125489115715,
0.5623640418052673,
0.7097543478012085,
-0.03092349879443645... |
def _ appendtoclipboard ( self, clipboard, text, newtext ) : text = text. rstrip ( " \ n " ) text = " % s \ n % s " % ( text, newtext ) if clipboard : clipboard. set _ text ( text, len ( text ) ) return true | [
-0.13926291465759277,
0.38028234243392944,
0.4058988392353058,
-0.24218636751174927,
-1.1794129610061646,
0.5647478699684143,
-1.6015331745147705,
0.573569118976593,
0.472532719373703,
0.7475219368934631,
0.05128840357065201,
-0.5696471333503723,
-0.03469761461019516,
0.252128928899765,
... |
def _ commit _ deletions ( self, cycle _ number, inventory, deleted, comment ) : signal _ blocker = signalblocker ( logger = log ) # get the original replicas from the inventory and organize them into sites deletions _ by _ site = collections. defaultdict ( list ) # { site : [ ( dataset _ replica, block _ replicas ) ] ... | [
0.656596839427948,
0.6445229649543762,
0.6890137791633606,
-0.058076925575733185,
0.11575779318809509,
-0.6815052628517151,
1.5994521379470825,
0.6909178495407104,
0.47821933031082153,
0.6291903853416443,
-0.3007622957229614,
0.27940866351127625,
-0.05948672443628311,
-0.1307765543460846,
... |
def validate _ static _ config ( host, port ) : url = setup _ url _ for _ address ( host, port ) if not url : _ logger. error ( " unable to get description url for wemo at : % s ", f " { host } : { port } " if port else host, ) return none try : device = pywemo. discovery. device _ from _ description ( url, none ) exce... | [
0.05928860604763031,
0.34491387009620667,
0.4578985869884491,
0.09199002385139465,
-0.1506069451570511,
-0.16513611376285553,
0.09064078330993652,
-0.2818411588668823,
-1.0764230489730835,
0.04235357418656349,
0.6039745211601257,
0.9618158340454102,
-0.4577364921569824,
0.6377682685852051,... |
def download _ method _ configs ( namespace, workspace ) : configs = firecloud _ api. list _ workspace _ configs ( namespace, workspace ). json ( ) configs _ list = [ ] for config in configs : df _ list = [ config ['name'], \ config ['methodrepomethod'] ['methodname'], \ config ['methodrepomethod'] ['methodversion'], \... | [
-1.072498083114624,
0.20693016052246094,
0.5422796607017517,
0.21576546132564545,
-0.04272310063242912,
-0.7494805455207825,
-0.3059699535369873,
-0.46228519082069397,
-0.12289255112409592,
0.6578961610794067,
-0.6795449256896973,
0.041042495518922806,
0.35974574089050293,
1.46901154518127... |
def resolve _ address ( self, gcaddr : int ) - > union [ datasection, textsection ] : for section in self. sections : if section. address < = gcaddr < ( section. address + section. size ) : return section raise unmappedaddresserror ( f " unmapped address : 0x { gcaddr : x } " ) | [
0.41197773814201355,
-0.3885985314846039,
0.633100688457489,
-1.0510551929473877,
-0.6182064414024353,
-0.20692388713359833,
0.24499046802520752,
-1.0775855779647827,
0.6139186024665833,
-0.7459778189659119,
0.9223688840866089,
0.3469032347202301,
0.16608233749866486,
0.27506187558174133,
... |
def time _ to _ full _ charge ( self ) - > float : return self. _ vehicle _ data. get ( " charge _ state ", { } ). get ( " time _ to _ full _ charge " ) | [
0.46852046251296997,
-0.15361128747463226,
0.519997239112854,
-0.44708681106567383,
0.4479711949825287,
-0.6715419292449951,
-0.9027652144432068,
-0.5785735845565796,
0.1026567816734314,
0.9983367323875427,
-0.4238305687904358,
-0.06241283193230629,
0.380001962184906,
0.5477166771888733,
... |
def barcode _ detect ( img _ ori ) : # get the dimension of the image height, width = img _ ori. shape [ : 2 ] # decode the barcode info barcode _ info = decode ( ( img _ ori. tobytes ( ), width, height ) ) # if barcode info was not empty if len ( barcode _ info ) > 0 : # get the decoded barcode info data value as stri... | [
0.6830826997756958,
-1.0127016305923462,
0.8017106056213379,
-0.5323284268379211,
-0.02003832533955574,
-0.5362877249717712,
-0.44220224022865295,
-0.054544948041439056,
-1.0122450590133667,
0.015633026137948036,
-0.6186569929122925,
0.14544090628623962,
-0.12960609793663025,
0.36787223815... |
def read _ fwf ( * args, * * kwargs ) - > linkeddataframe : return linkeddataframe ( pd. read _ fwf ( * args, * * kwargs ) ) | [
0.0959942489862442,
-0.13275949656963348,
0.4759870171546936,
-0.19543489813804626,
-0.04086846113204956,
-0.5689513683319092,
-0.11881221830844879,
-0.6190416812896729,
-0.3508199453353882,
-1.7830795049667358,
0.8791943788528442,
1.0626342296600342,
-0.7985036373138428,
-0.75895595550537... |
def reindex _ documents ( percent = 100 ) : from forums. models import thread from django. conf import settings index = get _ index ( thread ) start _ time = time. time ( ) log. info ('reindex threads : % s % s ', index, thread. _ meta. db _ table ) es = pyes. es ( settings. es _ hosts, timeout = 10. 0 ) log. info ('se... | [
-0.11674752831459045,
0.28409773111343384,
1.0194872617721558,
-0.05755804106593132,
-0.018439799547195435,
-0.10397866368293762,
0.3310261368751526,
-0.673913300037384,
0.09464679658412933,
0.5471729636192322,
0.05538066476583481,
0.23574131727218628,
-0.1478712558746338,
-0.6884869933128... |
def predict ( self, embedding : np. array ) - > np. array : pass | [
-0.6964828372001648,
-0.4302666187286377,
0.2935987114906311,
1.1658554077148438,
0.07334113866090775,
0.4450896680355072,
0.25257277488708496,
0.31290921568870544,
0.3944033980369568,
-0.10822436958551407,
-0.4328858256340027,
0.7574693560600281,
-0.0940474197268486,
0.5326200723648071,
... |
def referencematches ( self ) : reference _ families = self. mtablenamereferencefamilies reference _ domains = self. mtablenamereferencedomains domains = self. mtablenamedomains min _ evidence = self. mannotationminevidence min _ overlap = self. mannotationminoverlap subset _ tables = self. msubsettables subset _ where... | [
0.2332778424024582,
-0.36626723408699036,
0.7751027345657349,
-0.03474515303969383,
-0.3569788634777069,
0.19152262806892395,
1.2837693691253662,
-0.7949756979942322,
-0.6493679285049438,
0.07486160844564438,
0.34303706884384155,
0.21630015969276428,
-0.40980395674705505,
0.909923434257507... |
def generate _ report ( db : tokens. database ) - > dict [ str, int ] : present = [ entry for entry in db. entries ( ) if not entry. date _ removed ] # add 1 to each string's size to account for the null terminator. return {'present _ entries': len ( present ),'present _ size _ bytes': sum ( len ( entry. string ) + 1 f... | [
0.64506995677948,
0.9479963779449463,
0.4892481565475464,
-1.9099632501602173,
-0.06501184403896332,
-0.371768593788147,
0.5243097543716431,
0.2745073139667511,
-0.21751829981803894,
-0.2270517647266388,
-0.8046069741249084,
-0.9145402908325195,
-0.21897223591804504,
0.9209935665130615,
... |
def good _ zeros ( zeros, imag _ tol = 1. e - 10 ) : zeros = zeros [ np. where ( np. abs ( zeros ) < = 1 ) ] zeros = zeros [ np. where ( np. abs ( zeros. imag ) < imag _ tol ) ] return zeros | [
-0.7278245091438293,
-0.8284180164337158,
0.4502999782562256,
0.34358394145965576,
-0.5754318833351135,
-0.5019530057907104,
0.8286490440368652,
0.47353994846343994,
0.6544094085693359,
0.480567991733551,
0.5140527486801147,
0.6465272903442383,
0.00995906163007021,
-0.6817936301231384,
0... |
def element _ should _ be _ invisible ( self, name ) : selector = self. wait _ for _ element _ found ( name,'button / input / a / img ','this') self. element _ should _ not _ be _ visible ( selector ) | [
-0.7348031997680664,
0.35275325179100037,
0.5852577090263367,
0.7833730578422546,
0.3579038083553314,
0.8855167627334595,
0.3621465563774109,
-0.2674858272075653,
-0.025407664477825165,
0.2954062819480896,
-0.7170946002006531,
-0.6318567991256714,
-0.3502438962459564,
1.0819381475448608,
... |
def generate _ metadata ( dataset ) : return''. join ( dataset ['keywords'] ) +'' +''. join ( dataset ['cast'] ) +'' + dataset ['director'] +'' +''. join ( dataset ['genres'] ) | [
-0.8188502192497253,
0.012320328503847122,
0.5151218771934509,
-1.2824225425720215,
-0.1001213937997818,
0.4497026205062866,
-1.8001742362976074,
0.06247423589229584,
-0.11790691316127777,
1.0154900550842285,
-0.10508611798286438,
0.8924541473388672,
0.39943182468414307,
0.3660498261451721... |
def test _ atomic _ any _ uri _ min _ length _ 2 _ nistxml _ sv _ iv _ atomic _ any _ uri _ min _ length _ 3 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / anyuri / schema + instance / nistschema - sv - iv - atomic - anyuri - minlength - 3. xsd ", instance = " nistdata... | [
0.29744115471839905,
-0.46796268224716187,
0.5075223445892334,
0.5712248682975769,
-0.45230454206466675,
0.16672517359256744,
-0.4367579221725464,
-0.3073995113372803,
0.2316819131374359,
0.029507143422961235,
-0.18257145583629608,
0.09477069973945618,
-0.5601863265037537,
-0.0323570668697... |
def precompute ( self ) : self. _ make _ indexer ( * self. _ get _ indexers ( ) ) | [
-0.38128432631492615,
0.1199118047952652,
0.16536392271518707,
0.8655548095703125,
0.6364482045173645,
-0.5515685081481934,
1.4583948850631714,
0.4023197591304779,
-0.5176758766174316,
-0.6268149614334106,
-0.4779187738895416,
0.09334022551774979,
-0.2813095152378082,
0.39637941122055054,
... |
def main _ loop ( ) : wars = bunnywars ( ) while true : command = input ( ) args = command. split ( ) if command. startswith ('add') : # add commands if len ( args ) > 2 : # add a bunny bunny _ name = args [ 1 ] team _ id = int ( args [ 2 ] ) room _ id = int ( args [ 3 ] ) wars. add _ bunny ( bunny _ name, team _ id, r... | [
-0.00045588173088617623,
-0.7084900736808777,
0.8719488978385925,
0.523661196231842,
0.49575674533843994,
0.12999296188354492,
0.23685753345489502,
-0.20600280165672302,
-0.08114001154899597,
-0.35121339559555054,
-0.3888871371746063,
0.9560346007347107,
-0.5113092660903931,
0.225026771426... |
def node _ if _ new ( node : list, cond, stmt ) - > none : node. append ( [ " node _ if ", cond, stmt ] ) | [
0.1518646776676178,
0.9951357841491699,
0.2840368151664734,
0.39710623025894165,
0.037903107702732086,
-0.04554785415530205,
-0.9877220392227173,
0.6890026330947876,
-0.8040507435798645,
0.31129202246665955,
-0.22568759322166443,
0.17334195971488953,
0.1602991819381714,
1.2032755613327026,... |
def parse _ ped ( ped _ stream, family _ type ='ped') : pedigree = familyparser ( ped _ stream, family _ type = family _ type ) if len ( pedigree. families )! = 1 : raise pedigreeerror ( " only one case per ped file is allowed " ) family _ id = list ( pedigree. families. keys ( ) ) [ 0 ] family = pedigree. families [ f... | [
0.17350047826766968,
-1.0371112823486328,
0.5484627485275269,
-0.34928810596466064,
-0.8466657996177673,
0.2995838224887848,
-0.3729914426803589,
0.23042182624340057,
-0.15441524982452393,
-0.15173210203647614,
-0.14490006864070892,
-0.3774459958076477,
-0.2482573390007019,
1.6012123823165... |
def test _ list _ integer _ max _ length _ 4 _ nistxml _ sv _ iv _ list _ integer _ max _ length _ 5 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / integer / schema + instance / nistschema - sv - iv - list - integer - maxlength - 5. xsd ", instance = " nistdata / list / ... | [
-0.46142876148223877,
-0.19469161331653595,
0.13268180191516876,
0.4102593958377838,
-0.7257601022720337,
-0.20187853276729584,
-0.25757670402526855,
-0.1330888271331787,
0.7218431234359741,
0.8094348907470703,
-1.2546026706695557,
-0.40344226360321045,
-0.8113943934440613,
0.7804400920867... |
def test _ delete _ index ( self ) : count = 5 indexes _ arr _ of _ dicts = self. helper _ index _ array _ construct ( count ) for i in range ( 0, count ) : status, body = self. api _ create _ index ( self. current _ db, self. test _ ns, indexes _ arr _ of _ dicts [ i ] ) self. assertequal ( true, status = = self. api ... | [
-0.24047213792800903,
0.10087698698043823,
0.5014498829841614,
0.18471544981002808,
0.9099540710449219,
0.08053255081176758,
0.5593565106391907,
-0.5614513754844666,
0.9737392067909241,
-0.5970557332038879,
-0.4653550684452057,
0.42939597368240356,
-0.2923586666584015,
0.4786878824234009,
... |
def get _ sy _ dist ( n = 10000, recalc = false ) : base _ path = " { } / inputs / sy _ distribution. txt ". format ( sdp ) if os. path. exists ( base _ path ) and not recalc : with open ( base _ path ) as f : values = f. readlines ( ) else : s _ data _ path = " { } / inputs / s _ vs _ depth data. xlsx ". format ( sdp ... | [
-0.051446083933115005,
0.31233522295951843,
0.6327342391014099,
0.2934752404689789,
0.22032198309898376,
0.1592923253774643,
0.13995574414730072,
0.17154935002326965,
0.22298316657543182,
-0.06743811070919037,
-0.8334617614746094,
0.6616532206535339,
0.40960729122161865,
0.4112037718296051... |
def parent _ invoice _ id ( self ) : return self. _ parent _ invoice _ id | [
1.5098237991333008,
-1.0615936517715454,
0.25210657715797424,
0.18578925728797913,
-0.2479545772075653,
0.7056514620780945,
0.15676255524158478,
-0.13193613290786743,
0.054056912660598755,
-0.8792896866798401,
0.6673538088798523,
0.7210655212402344,
-1.1625951528549194,
-0.3942891955375671... |
def display ( self, debug : bool = false ) - > none : show _ maze = self. maze. copy ( ) # place agent in show maze if it's been initialised if self. position _ agent is not none : show _ maze [ self. position _ agent ] = cell. agent. value show _ maze _ repr = " " for row in range ( self. maze _ width ) : line = " " f... | [
0.8086063265800476,
-0.7314143180847168,
0.6312363147735596,
0.023465780541300774,
-0.35744476318359375,
-0.24116484820842743,
0.5981771945953369,
-0.0039057459216564894,
0.08595875650644302,
0.4446662962436676,
0.695240318775177,
0.42087265849113464,
0.14496679604053497,
0.972241580486297... |
def add _ child ( self, child ) : if self is not child and child not in self. _ children : if child is not none and type ( child ) is worldobject : self. _ children. append ( child ) child. set _ parent ( self ) | [
0.045679718255996704,
0.4322270154953003,
0.7777736783027649,
0.3557351231575012,
-0.45805028080940247,
1.362650990486145,
-0.14356768131256104,
-1.0170443058013916,
0.17803438007831573,
-0.4512516260147095,
-0.9059271812438965,
-0.023634012788534164,
-0.14199131727218628,
0.85078680515289... |
def from _ files ( cls, files : typing. dict [ str, str ], stage : str ) - > pd. dataframe : | [
-0.32573866844177246,
-0.21353623270988464,
0.1608525961637497,
0.05173783749341965,
-0.8611862659454346,
0.0218014158308506,
0.12198594212532043,
0.9714332818984985,
-1.3961818218231201,
-0.395894855260849,
0.48532524704933167,
0.09936534613370895,
0.4046873152256012,
0.040678270161151886... |
def get _ subset ( self, aggregation _ level : aggregationlevel, * * filters ) - > " datasetbase " : raise notimplementederror ( " subsclass must implement " ) | [
-0.31172382831573486,
0.36779192090034485,
0.5089985132217407,
0.41144558787345886,
-0.22638021409511566,
-0.27195557951927185,
-0.02081192657351494,
-0.37713128328323364,
-0.6532241106033325,
-0.5747699737548828,
0.7259538769721985,
0.9478750824928284,
0.8933266997337341,
-0.6498033404350... |
def dispatch _ notification ( self, message ) : raise notimplementederror ( ) | [
0.05122717469930649,
0.16208204627037048,
0.4944124221801758,
0.5789193511009216,
0.6077753305435181,
0.3287719190120697,
0.522942841053009,
0.46302032470703125,
-0.21971993148326874,
-0.08118988573551178,
-0.8666707873344421,
0.6313733458518982,
0.7699163556098938,
0.8099902868270874,
-... |
def fetch _ url ( url ) : utils. log ( " fetching url : % s " % url ) http = urllib2. urlopen ( urllib2. request ( url, none ) ) return http. read ( ) | [
-0.14253371953964233,
-0.26699867844581604,
0.29908740520477295,
-0.1577453762292862,
-0.9600540399551392,
0.6401670575141907,
-1.0270566940307617,
-0.425371915102005,
0.10581395775079727,
-0.4004456102848053,
-0.08390700072050095,
0.18064355850219727,
0.10569461435079575,
-0.0749222338199... |
def _ convert _ placeholders ( self, obj ) : def func ( obj ) : if isinstance ( obj, str ) : m = self. placeholder _ pattern. match ( obj ) if m : return percentplaceholder ( m. group ( 1 ) ) return obj return _ map _ json _ object ( func, obj ) | [
-0.971794605255127,
-0.1234411671757698,
0.507289469242096,
-0.3138117790222168,
-0.8999745845794678,
0.7756102681159973,
0.10649717599153519,
-0.4005579948425293,
0.5628452301025391,
0.43558380007743835,
0.05956414341926575,
-0.7217105031013489,
-0.11201584339141846,
-0.2548394799232483,
... |
def fixtures _ info _ cols ( self ) : raise notimplementederror ('should be implemented in subclass') | [
-0.29251518845558167,
-0.7699173092842102,
0.9009128212928772,
0.08949186652898788,
0.6374170780181885,
0.6070507168769836,
0.9766553044319153,
-0.8642674088478088,
-0.680793285369873,
-0.5596854090690613,
-1.1492193937301636,
-0.6258279085159302,
0.7953385710716248,
-0.18380776047706604,
... |
def state _ getter ( self ) : try : return self. actual _ state. value except attributeerror : return none | [
-0.4012656807899475,
-0.6081914305686951,
0.4054073989391327,
0.16690824925899506,
-0.5262627005577087,
-0.23214414715766907,
0.08497791737318039,
-0.6055338382720947,
0.1968574821949005,
-0.5685849785804749,
0.39856427907943726,
-0.2734885811805725,
0.47920915484428406,
-0.091993659734725... |
def process _ string _ data ( self, string _ data, separator ='\ n') : return [ x for x in string _ data. split ( separator ) ] | [
-0.07223004847764969,
-0.9967824816703796,
0.35151031613349915,
-0.3405416011810303,
-0.40184536576271057,
-0.3099289834499359,
-1.8105132579803467,
0.7109160423278809,
-0.11211857944726944,
0.04436273127794266,
0.1256273090839386,
0.027907824143767357,
-0.09611476957798004,
-0.59350329637... |
def create _ user ( username, email, * * kwargs ) : defaults = {'username': username,'email': email,'password':'userpassword ','first _ name':'user _ first _ name ','last _ name':'user _ last _ name ','birthday': date ( 1995, 7, 4 ),'is _ staff': false,'is _ superuser': false, } defaults. update ( kwargs ) if'address'n... | [
0.1643192619085312,
0.8852824568748474,
0.46929895877838135,
0.5552880167961121,
0.43558505177497864,
0.2713595926761627,
-0.6962387561798096,
-0.30745062232017517,
-0.3743489682674408,
-0.5407771468162537,
-1.3400253057479858,
-0.5465924143791199,
-0.38843050599098206,
-0.0396328419446945... |
def test _ get _ cve _ filter _ by _ assignershortname _ empty ( ) : res = requests. get ( f'{ env. awg _ base _ url } { cve _ url } / ', headers = utils. base _ headers, params = {'assigner _ short _ name':'cisco'} ) assert res. status _ code = = 200 recordslength = len ( json. loads ( res. content. decode ( ) ) ['cve... | [
0.048478271812200546,
-0.10055316984653473,
0.4036850929260254,
-0.3104858994483948,
0.6908466219902039,
0.5762487649917603,
-0.19269877672195435,
0.501809298992157,
0.06667531281709671,
-0.5274180769920349,
0.11671888828277588,
0.5007607340812683,
0.27137717604637146,
0.4244363009929657,
... |
def imrepl ( img ) : npimg = img. cpu ( ). numpy ( ) # plt. ioff ( ) fig = plt. figure ( dpi = 150 ) # plt. imshow ( np. transpose ( npimg, ( 1, 2, 0 ) ) ) tmp = tempfile. namedtemporaryfile ( suffix = ". png ", delete = false ) ax = fig. add _ subplot ( 111 ) ax. axes. get _ xaxis ( ). set _ visible ( false ) ax. axes... | [
-0.14558562636375427,
0.598804771900177,
0.8213933706283569,
-0.9022365808486938,
-1.1158578395843506,
0.4451158940792084,
1.166849136352539,
0.7427805662155151,
0.1441730409860611,
0.5737525224685669,
-0.23638367652893066,
0.1532776951789856,
0.5339300632476807,
-0.0850793644785881,
0.7... |
def _ calc _ density ( x : cp. ndarray, y : cp. ndarray ) : from cuml. neighbors import kerneldensity # calculate the point density xy = cp. vstack ( [ x, y ] ). t bandwidth = cp. power ( xy. shape [ 0 ], ( - 1. 0 / ( xy. shape [ 1 ] + 4 ) ) ) kde = kerneldensity ( kernel = " gaussian ", bandwidth = bandwidth ). fit ( ... | [
0.47075340151786804,
-0.08729029446840286,
0.5369250178337097,
0.3892810344696045,
-0.5583086609840393,
-0.3458261489868164,
-0.8316971063613892,
-0.29074808955192566,
0.21361030638217926,
0.8681885004043579,
0.4848829507827759,
-0.12378297746181488,
0.2223348617553711,
-0.2895013093948364... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.