text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def itksubtractconstantfromimagefilterid3did3 _ cast ( * args ) : return _ itksubtractconstantfromimagefilterpython. itksubtractconstantfromimagefilterid3did3 _ cast ( * args ) | [
0.8221150040626526,
0.34730035066604614,
0.21428662538528442,
-1.547071099281311,
-0.6166244745254517,
0.9637340307235718,
-0.44796648621559143,
0.48815226554870605,
1.0666617155075073,
0.5607721209526062,
-1.2894243001937866,
-0.1080167219042778,
-0.5226596593856812,
-1.3469109535217285,
... |
def query _ all _ elements _ of _ category ( doc, cat ) : collector = db. filteredelementcollector ( doc ) elements = collector. ofcategory ( cat ) \. whereelementisnotelementtype ( ) \. toelements ( ) return elements | [
-0.568641722202301,
0.5034079551696777,
0.33741167187690735,
0.7339772582054138,
-0.08614303171634674,
0.5907260179519653,
-0.8120112419128418,
-0.553199052810669,
0.07157086580991745,
-0.07075583189725876,
0.5833057165145874,
0.39225444197654724,
0.06428951770067215,
1.2831354141235352,
... |
def test _ call _ alt _ input _ types ( self ) : p = blasttaxonassigner ( { \'reference _ seqs _ filepath': self. reference _ seqs _ fp, \'id _ to _ taxonomy _ filepath': self. id _ to _ taxonomy _ fp } ) # neither seqs or seq _ fp passed results in assertionerror self. assertraises ( assertionerror, p ) # functions wi... | [
-0.1256728172302246,
-0.8722270727157593,
0.5325798988342285,
0.3005119264125824,
0.13924022018909454,
0.9358419179916382,
0.22866854071617126,
-0.028036152943968773,
0.4422444701194763,
-0.020374104380607605,
0.371237576007843,
-0.27667203545570374,
-0.3603123128414154,
0.6631418466567993... |
async def triggered _ on ( self, ctx : filtercontext ) - > bool : if ctx. embeds : if ctx. event = = event. message _ edit : if not ctx. message. edited _ at : # this might happen, apparently. return false # if the edit delta is less than 100 microseconds, it's probably a double filter trigger. delta = ctx. message. ed... | [
-0.23665207624435425,
0.29959774017333984,
0.8466667532920837,
0.4643056094646454,
-0.2815414071083069,
-0.16847297549247742,
0.8734753727912903,
0.13967688381671906,
0.21547231078147888,
-0.2966488301753998,
-1.2718912363052368,
0.7424494624137878,
-0.19022752344608307,
0.7228838205337524... |
def createtable ( self ) : self. cursor. execute ('create table if not exists chat _ log ( channel _ id integer not null, stream _ id'' integer not null, text string, user string, chat _ time datetime, offset int,'' foreign key ( channel _ id ) references channels ( channel _ id ) )') | [
1.1945745944976807,
-0.4863290786743164,
0.5577009916305542,
-0.7926880717277527,
0.6391178369522095,
0.47257110476493835,
-0.4326786398887634,
-0.3023822605609894,
-1.410558819770813,
0.2103354036808014,
-0.2857661843299866,
0.513551652431488,
-0.7948479056358337,
0.8396244049072266,
0.... |
def save _ user _ id _ to _ session ( self, user _ id ) : self. session ['user _ id'] = user _ id | [
-0.7914450168609619,
-1.374746322631836,
0.07883451133966446,
0.33231058716773987,
0.40808987617492676,
0.17257851362228394,
0.5949826836585999,
-0.737358808517456,
1.1215554475784302,
0.581218421459198,
-1.5210052728652954,
0.6249279975891113,
-0.32963356375694275,
0.6299042105674744,
0... |
def describebillsummarybyproduct ( self, request ) : try : params = request. _ serialize ( ) headers = request. headers body = self. call ( " describebillsummarybyproduct ", params, headers = headers ) response = json. loads ( body ) model = models. describebillsummarybyproductresponse ( ) model. _ deserialize ( respon... | [
-0.7725851535797119,
1.0418047904968262,
0.6562459468841553,
0.43689921498298645,
-0.06029225140810013,
0.46373334527015686,
-0.0013714319793507457,
-0.9340303540229797,
0.15290765464305878,
0.013348666951060295,
-0.7108734846115112,
0.8231193423271179,
-0.5240758061408997,
0.1226088330149... |
def sql _ execute ( sql, value ) : cur = connection. cursor ( ) cur. execute ( sql, value ) | [
0.6971518397331238,
0.03510325029492378,
0.1668674200773239,
0.8019608855247498,
-0.16727568209171295,
-0.2135094553232193,
-1.5740272998809814,
-0.39686867594718933,
-0.907131552696228,
0.43693771958351135,
0.1699555665254593,
-0.2937923073768616,
0.4544982314109802,
-0.15408000349998474,... |
def test _ ridge _ warning _ in _ fit _ mle ( self ) : # create the mnl model object whose coefficients will be estimated. base _ mixl = self. mixl _ obj # create a variable for the arguments to the fit _ mle function. fit _ args = [ self. fake _ betas _ ext, 2 ] # create a variable for the fit _ mle function's kwargs.... | [
0.9123126864433289,
-0.09559899568557739,
0.6019079089164734,
0.19221320748329163,
0.06799434870481491,
0.21804454922676086,
-0.31174033880233765,
-0.6896848082542419,
-0.6553776264190674,
0.15107007324695587,
-0.17773717641830444,
0.9366521239280701,
-0.6407299637794495,
0.292830616235733... |
def rgb2ycbcr ( img : np. ndarray, y _ only : bool = false ) - > np. ndarray : img _ type = img. dtype img = _ convert _ input _ type _ range ( img ) if y _ only : out _ img = np. dot ( img, [ 65. 481, 128. 553, 24. 966 ] ) + 16. 0 else : out _ img = np. matmul ( img, [ [ 65. 481, - 37. 797, 112. 0 ], [ 128. 553, - 74.... | [
0.13305990397930145,
-0.1689237356185913,
0.9602643251419067,
-0.09305145591497421,
0.14274059236049652,
-0.33375558257102966,
1.0594927072525024,
-0.3499337136745453,
0.03233138099312782,
-0.14802128076553345,
-0.3363385796546936,
0.6770716905593872,
0.2747420072555542,
0.8570018410682678... |
def to _ nearest _ quarter _ tone ( number, frac = false ) : number = round ( float ( number ) * 4 ) / 4 div, mod = divmod ( number, 1 ) if mod = = 0. 75 : div + = 1 elif mod = = 0. 5 : div + = 0. 5 if frac is false : return abjad. math. integer _ equivalent _ number _ to _ integer ( div ) else : return quicktions. fra... | [
-0.1448984593153,
0.03854205831885338,
0.4557395577430725,
-0.3667062819004059,
-1.18623948097229,
-0.5018377900123596,
1.1409122943878174,
-2.092632293701172,
0.40728312730789185,
-0.7591269612312317,
-0.06058499962091446,
-0.08469826728105545,
0.03281264379620552,
0.6791431903839111,
-... |
def hasgui ( cls ) : return true | [
0.21841606497764587,
0.3476716876029968,
0.39973750710487366,
0.7071096301078796,
0.03001958131790161,
0.6821020841598511,
-0.8265565633773804,
0.6665927171707153,
-0.5720162391662598,
-0.7771346569061279,
-0.9022217988967896,
0.014062982983887196,
-0.8259097933769226,
1.8992019891738892,
... |
def inject ( self, * * kwargs ) : logger. debug ( " injecting variables into the kernel : % s. ", ', '. join ( kwargs. keys ( ) ) ) try : self. kernel. shell. push ( kwargs ) except exception as e : # pragma : no cover logger. error ( " could not inject variables to the ipython kernel : % s. ", str ( e ) ) | [
-0.8333234190940857,
1.1650837659835815,
0.4417082667350769,
-0.11166979372501373,
-0.1587083339691162,
0.14463311433792114,
-0.8265218138694763,
-0.8079611659049988,
-0.9001187682151794,
0.3145269751548767,
-0.5447995662689209,
0.09957636147737503,
-1.0852630138397217,
0.2687031328678131,... |
def testaddingnothing ( self ) : ssd = self. original ( ) op = iecorescene. addsmoothskinninginfluencesop ( ) op. parameters ( ) ['input']. setvalue ( ssd ) result = op. operate ( ) self. assertequal ( result. influencenames ( ), ssd. influencenames ( ) ) self. assertequal ( result. influencepose ( ), ssd. influencepos... | [
-0.1418685019016266,
0.476965069770813,
0.6291420459747314,
-0.25150904059410095,
0.1557481586933136,
0.7184503674507141,
0.6790677905082703,
-0.17448729276657104,
0.6255238056182861,
-1.0460954904556274,
-0.3876405954360962,
0.31884709000587463,
-0.7279511094093323,
0.3027891218662262,
... |
async def test _ service _ types ( self ) : resp = await self. client. request ( " get ", " / services / types " ) data = await resp. json ( ) assert 200 = = resp. status assert " service - registry " = = data [ 0 ] assert " beacon - aggregator " = = data [ 1 ] assert " beacon " = = data [ 2 ] | [
-0.38699159026145935,
1.3846683502197266,
0.316707968711853,
0.27014485001564026,
1.6276226043701172,
0.41976219415664673,
-0.12884041666984558,
-0.4582216143608093,
-0.22621341049671173,
-0.3484409749507904,
0.16739942133426666,
0.4292016923427582,
-0.31022879481315613,
0.8101263046264648... |
def reduce _ std ( input _ tensor, axis = none, keepdims = false, name = none ) : name = name if name else " reduce _ std " with ops. name _ scope ( name ) : input _ tensor = ops. convert _ to _ tensor ( input _ tensor ) variance = reduce _ variance ( input _ tensor, axis = axis, keepdims = keepdims ) return gen _ math... | [
0.539164662361145,
-0.030217371881008148,
0.829383909702301,
0.5076529383659363,
-0.4307975471019745,
0.5403540134429932,
0.8438060283660889,
0.2790660858154297,
-0.09007997810840607,
0.39704492688179016,
-0.8075962066650391,
0.680205225944519,
-0.25546425580978394,
-0.621597945690155,
0... |
def available _ transformer ( ) : return _ availability | [
-1.444252848625183,
-1.1398231983184814,
0.32907816767692566,
-0.543267548084259,
-0.5378601551055908,
0.2071530818939209,
-0.20369499921798706,
1.3205453157424927,
-0.3079974353313446,
0.8314576745033264,
-0.6335997581481934,
0.08214657753705978,
-0.14729207754135132,
-0.1656646728515625,... |
def combine _ data ( self, image1, image2, method ='and') : if ( isinstance ( image1, str ) & isinstance ( image2, str ) ) : image1 = nib. load ( image1 ). get _ data ( ) image2 = nib. load ( image2 ). get _ data ( ) labels = np. unique ( np. concatenate ( ( np. unique ( image1 ), np. unique ( image2 ) ) ) ) [ 1 : ] ou... | [
-1.4731241464614868,
-0.7138174772262573,
1.019035816192627,
-0.09903842210769653,
-0.16348153352737427,
-0.09190567582845688,
-0.2952022850513458,
-0.43514615297317505,
-0.1319866180419922,
0.6828624606132507,
0.8867074251174927,
0.03326534107327461,
0.10717477649450302,
0.816729426383972... |
def lambda _ handler ( event, context ) : # call sp to perform etl and load dimensions cursor. callproc ('updatedimensions') # call sp to perform etl and load fact tables cursor. callproc ('updatefacts') # close cursor close ( ) | [
0.8810892701148987,
0.18281221389770508,
0.43846791982650757,
0.2636410892009735,
-0.6913267970085144,
0.7770150303840637,
0.751889169216156,
0.38941144943237305,
0.0042982399463653564,
-0.06032468378543854,
-0.040460117161273956,
0.2320791631937027,
1.219226598739624,
0.41961050033569336,... |
def serve _ eventlet ( self ) : listener = eventlet. listen ( ( " 0. 0. 0. 0 ", self. port ) ) logger. info ( " starting eventlet listener % s for flask % s " % ( listener, self. flask ) ) wsgi. server ( listener, self. flask, * * self. wsgi _ options ( ) ) | [
0.6809231638908386,
-0.8964012861251831,
0.20227016508579254,
-0.6182996034622192,
1.0974522829055786,
0.5600518584251404,
0.390749990940094,
-0.11169207841157913,
-0.6904094219207764,
-0.23979711532592773,
0.17057067155838013,
0.5492446422576904,
0.3887321352958679,
0.22342193126678467,
... |
def font _ style ( self, font _ style ) : allowed _ values = [ " serif ", " sans - serif ", " handwritten ", " collage " ] # noqa : e501 if font _ style not in allowed _ values : raise valueerror ( " invalid value for ` font _ style ` ( { 0 } ), must be one of { 1 } ". format ( font _ style, allowed _ values ) ) self. ... | [
0.014504913240671158,
0.05276580899953842,
-0.8852429389953613,
0.8450095057487488,
0.058419033885002136,
-0.20012329518795013,
-0.6178141236305237,
0.24603424966335297,
-0.3011007010936737,
-0.16005998849868774,
0.10853938013315201,
-0.18029683828353882,
-0.6516243815422058,
0.23670789599... |
def test _ current _ memberships ( self, derrida ) : # should return team from first grant plus old members who stayed on katie = person. objects. get ( first _ name = " katie ", last _ name = " chenoweth " ) rsk = person. objects. get ( first _ name = " rebecca ", last _ name = " koeser " ) rm = person. objects. get (... | [
0.23391132056713104,
-1.138053059577942,
0.5910603404045105,
-0.3193606734275818,
0.28547534346580505,
0.7772817611694336,
-0.04710742086172104,
-0.15920011699199677,
-0.7060821652412415,
-0.1419348120689392,
0.6276594400405884,
0.11259288340806961,
-0.4252655506134033,
0.1919795572757721,... |
def naked _ twins ( values ) : # stores all naked twins naked _ twin = { } for unit in unitlist : naked _ twin _ unit = { } for box in unit : if len ( values [ box ] ) = = 2 : if not values [ box ] in naked _ twin _ unit : naked _ twin _ unit [ values [ box ] ] = [ box ] else : naked _ twin _ unit [ values [ box ] ]. a... | [
-1.048356294631958,
-0.4247603416442871,
0.799969494342804,
-0.9342504143714905,
-1.0954010486602783,
0.34209930896759033,
0.40678682923316956,
-0.21809162199497223,
-0.010770405642688274,
-0.03150894492864609,
-1.2835285663604736,
0.3774435818195343,
0.6364051103591919,
0.9875261187553406... |
def get _ vogs ( db : session, id : optional [ set [ str ] ], pmin : optional [ int ], pmax : optional [ int ], smax : optional [ int ], smin : optional [ int ], function : optional [ set [ str ] ], consensus _ function : optional [ set [ str ] ], minglca : optional [ int ], maxglca : optional [ int ], mingglca : optio... | [
0.10343799740076065,
0.688444197177887,
0.5619723796844482,
0.0711996778845787,
0.03846107795834541,
-0.49312645196914673,
-0.7322155237197876,
-0.4368276596069336,
-0.4299675524234772,
0.14525140821933746,
0.20826171338558197,
0.357846200466156,
-0.8871862292289734,
0.6863960027694702,
... |
def read _ novel _ info _ in _ browser ( self ) - > none : raise notimplementederror ( ) | [
-0.6000960469245911,
-0.9789530634880066,
0.41542163491249084,
0.9242878556251526,
0.23561611771583557,
1.165902018547058,
0.1730448454618454,
-0.7206875681877136,
-1.3825784921646118,
-0.2748905420303345,
0.4779491424560547,
-0.04433880001306534,
0.5132928490638733,
0.6481742858886719,
... |
def removedevice ( self, typeid, deviceid ) : deviceurl = apiclient. deviceurl % ( self. host, typeid, deviceid ) r = requests. delete ( deviceurl, auth = self. credentials, verify = self. verify ) status = r. status _ code if status = = 204 : self. logger. debug ( " device was successfully removed " ) return true elif... | [
-1.452810525894165,
0.1889883577823639,
0.9537004828453064,
0.5442165732383728,
-0.34824034571647644,
0.14881904423236847,
0.030117060989141464,
0.06816715747117996,
0.22434595227241516,
0.45912131667137146,
-0.03404787927865982,
0.7838025093078613,
-2.0451648235321045,
-0.1975677162408828... |
def create _ savename ( self ) : savename = self. config. get ('grid ','dir') + self. fname. split ('/') [ - 1 ] newsuffix ='_ gridded _ % ix % ix % i. nc'% ( self. nx, self. ny, self. nz ) savename = savename. replace ( '. nc ', newsuffix ) return savename | [
-0.486815869808197,
-0.3794424533843994,
0.6046581864356995,
-0.38996273279190063,
0.1704932302236557,
0.5587921738624573,
0.27712634205818176,
-0.3465631604194641,
-0.48711273074150085,
0.34994742274284363,
-0.3547739088535309,
-0.4641031324863434,
0.24957211315631866,
0.20349618792533875... |
def search _ shopify _ location _ for _ import _ stock ( self, instance, model _ id, log _ line _ array ) : location _ ids = self. env [ " shopify. location. ept " ]. search ( [ ( " legacy ", " = ", false ), ( " instance _ id ", " = ", instance. id ) ] ) if not location _ ids : message = " location not found for instan... | [
-0.8057378530502319,
-0.36310622096061707,
0.3435502052307129,
-0.27184927463531494,
0.23187486827373505,
0.37884920835494995,
-0.12479737401008606,
-0.5864671468734741,
0.21349956095218658,
0.6875975728034973,
-0.6146227717399597,
0.11041259765625,
0.05072571337223053,
0.5384169220924377,... |
def write _ output _ to _ excel ( users, filename ) : workbook = xlwt. workbook ( ) sheet = workbook. add _ sheet ( " networks " ) attrs = [ " service ", " name ",'password ', " project ", " role " ] for i in range ( len ( attrs ) ) : sheet. write ( 0, i, attrs [ i ] ) for j in range ( len ( users ) ) : for i in range ... | [
-0.5426101684570312,
-0.7401349544525146,
0.2631411552429199,
0.1636473536491394,
-0.12874889373779297,
0.6158161163330078,
0.6073517799377441,
0.24905025959014893,
-0.7758198380470276,
-0.31529128551483154,
-0.016069814562797546,
-0.44277554750442505,
-0.3161788284778595,
0.41233336925506... |
def query5 ( connection ) : current = time. time ( ) cursor = connection. cursor ( ) cursor. execute ( " " " select b. name as limited _ avail _ beers, br. name as brewery _ name, br. city as city from beer as b inner join brewery as br on b. brewery = br. id inner join availability as a on b. availability = a. id inne... | [
0.29767972230911255,
-0.46090829372406006,
0.5378919243812561,
-0.019666772335767746,
-0.626641571521759,
0.35828983783721924,
0.4437415897846222,
-0.20843252539634705,
-0.8167718648910522,
0.7829245328903198,
0.08778878301382065,
0.21516360342502594,
-0.6521921753883362,
0.507881045341491... |
def nb _ ll ( data, p, r ) : # todo : include factorial... # data = data + eps genes, cells = data. shape clusters = p. shape [ 1 ] lls = np. zeros ( ( cells, clusters ) ) for c in range ( clusters ) : p _ c = p [ :, c ]. reshape ( ( genes, 1 ) ) r _ c = r [ :, c ]. reshape ( ( genes, 1 ) ) # don't need constant factor... | [
0.7605694532394409,
-0.17386725544929504,
0.554678201675415,
-0.05247947946190834,
0.3964204490184784,
0.36170151829719543,
-0.27155202627182007,
0.08591708540916443,
0.15776655077934265,
0.09117177128791809,
-0.08418682962656021,
0.3163048326969147,
-0.3614186644554138,
-0.206416413187980... |
def parse _ setupapi ( setup _ log ) : device _ list = list ( ) unique _ list = set ( ) with open ( setup _ log ) as in _ file : for line in in _ file : lower _ line = line. lower ( ) if'device install ( hardware initiated )'in \ lower _ line and ('vid'in lower _ line or'ven'in lower _ line ) : device _ name = line. sp... | [
-0.6994345188140869,
-1.0843228101730347,
0.455648809671402,
0.16292080283164978,
0.11730021238327026,
-0.5675429701805115,
0.5744408369064331,
0.8114373683929443,
-0.5779109001159668,
1.097693920135498,
-0.6077249050140381,
-0.80473792552948,
0.007173331920057535,
0.8389679193496704,
-0... |
def fold _ with _ overlap ( self, x, target, overlap ) : _, total _ len, features = x. size ( ) # calculate variables needed num _ folds = ( total _ len - overlap ) / / ( target + overlap ) extended _ len = num _ folds * ( overlap + target ) + overlap remaining = total _ len - extended _ len # pad if some time steps po... | [
-0.26805561780929565,
-0.05461418256163597,
0.7995767593383789,
0.6233891844749451,
-1.1667155027389526,
0.24782806634902954,
0.1892683357000351,
0.3909166753292084,
0.2434224784374237,
0.29416826367378235,
-0.02510778233408928,
0.19582921266555786,
0.467563658952713,
-0.6016429662704468,
... |
def zeroarray ( self, variable _ name ) : setattr ( self. _ _ records, variable _ name, np. zeros ( self. array _ len ) ) | [
-0.18682508170604706,
-1.1574302911758423,
0.6269126534461975,
-1.2244890928268433,
0.9564847350120544,
0.06570816040039062,
0.597907543182373,
0.5833351016044617,
-0.23750917613506317,
0.347012460231781,
-0.49650663137435913,
1.3135251998901367,
-0.47053995728492737,
0.7446103096008301,
... |
def testpatchedsudsjurkoappenderissue63 ( self ) : # create a fake operation to set a keyword's finalmobileurls and finalurls # to a blank value. in the bug, these fields would be excluded from the # output. operations = [ {'operator':'set ','operand': {'xsi _ type':'biddableadgroupcriterion ','adgroupid': 1,'criterion... | [
-0.09362031519412994,
0.8006542325019836,
0.5590348839759827,
-0.06060364097356796,
-0.2554227113723755,
-0.19651445746421814,
-0.2599305212497711,
-0.010074782185256481,
0.9209465384483337,
-0.2385493814945221,
0.31299108266830444,
0.702513575553894,
-0.1507098376750946,
0.363860458135604... |
def fuzz _ url _ variables ( self, url, variables, attack _ type ='all') : if not isinstance ( variables, list ) : print " unknown type for variables " attack _ targets = [ ] variables _ dict = { } url _ variables = self. get _ url _ variables ( ) fuzz _ checks = get _ generic _ fuzz _ checks ( ) for fuzz _ check in fu... | [
-1.0898000001907349,
-0.6358017325401306,
0.5413714647293091,
0.3337997794151306,
0.7567596435546875,
-0.35829389095306396,
0.014984364621341228,
0.7611365914344788,
-0.2964031994342804,
-0.37807968258857727,
-0.3491828143596649,
0.5160659551620483,
-0.36234745383262634,
1.1081054210662842... |
def test _ room _ at _ location ( self ) : lvl = level ( 1, 50, 50, none ) room1 = room ( pos ( 0, 0 ), pos ( 10, 10 ) ) lvl. add _ room ( 0, room1 ) room2 = room ( pos ( 20, 20 ), pos ( 30, 30 ) ) lvl. add _ room ( 1, room2 ) assert lvl. find _ room ( pos ( 50, 50 ) ) is none assert lvl. find _ room ( pos ( 5, 5 ) ) =... | [
-0.25092244148254395,
-1.222659707069397,
0.586932361125946,
-0.12414843589067459,
0.3975456953048706,
0.6174807548522949,
0.2797296643257141,
-0.3063061535358429,
-0.5116508603096008,
0.32393398880958557,
-0.8715106248855591,
0.14810849726200104,
-0.38116776943206787,
0.5829230546951294,
... |
def actionsf _ 8p _ generator ( state ) : position = findblank _ 8p ( state ) sqrt = int ( math. sqrt ( len ( state ) ) ) if position [ 1 ]! = 0 : yield " left " if position [ 1 ]! = sqrt - 1 : yield " right " if position [ 0 ]! = 0 : yield " up " if position [ 0 ]! = sqrt - 1 : yield " down " | [
-0.6558824181556702,
-0.5100043416023254,
0.5630106329917908,
-0.12627944350242615,
0.15359213948249817,
0.2162242978811264,
0.29954466223716736,
-0.9831543564796448,
0.9849655032157898,
0.23176619410514832,
0.020413607358932495,
-0.8409802317619324,
-0.5171413421630859,
0.2273964285850525... |
def prepare _ model _ inputs ( self, batch ) : batch = self. template. process _ batch ( batch ) input _ batch = { key : batch [ key ] for key in batch if key in self. forward _ keys } return input _ batch | [
-0.5985187292098999,
-0.48926863074302673,
0.47929176688194275,
-0.5281534194946289,
-1.177761435508728,
0.32543274760246277,
0.18460893630981445,
-0.15727189183235168,
-1.0282618999481201,
0.0008718279423192143,
-0.8611629009246826,
-0.6933205127716064,
0.3532058298587799,
0.6845209598541... |
def top _ 3 ( ) : query ='''select articles. title, count ( log. id ) as views from articles, log where log. path like'/ article /'| | articles. slug group by log. path, articles. title order by views desc limit 3 ;'''r = execute _ query ( query ) result = " ". join ( result % ( title, views ) for title, views in r ) r... | [
0.5516479015350342,
0.32076284289360046,
0.5970560312271118,
-0.5831068754196167,
-0.37198546528816223,
-0.024944856762886047,
-0.500625491142273,
0.121050626039505,
-0.5866780877113342,
0.3984622061252594,
1.1353347301483154,
0.29801955819129944,
0.36726075410842896,
-1.0481016635894775,
... |
def hexoraddressexpr ( s ) : try : return int ( s, 16 ) except valueerror : return addressexpr ( s ) | [
0.5639108419418335,
-0.32584911584854126,
0.2387343943119049,
-0.08653006702661514,
-0.718096911907196,
-0.5342795848846436,
-0.28095197677612305,
1.2461503744125366,
1.08734130859375,
-0.3808501064777374,
0.23065058887004852,
0.18747644126415253,
-0.14637215435504913,
-0.3369922637939453,... |
def compute _ in _ degrees ( digraph ) : in _ degrees = { } for key _ i in digraph : degree = 0 for key _ j in digraph : if key _ i in digraph [ key _ j ] : degree + = 1 in _ degrees [ key _ i ] = degree return in _ degrees | [
-0.6609840989112854,
0.6364222764968872,
0.531092643737793,
-0.35697174072265625,
-0.5345184803009033,
-0.9724790453910828,
0.9023615121841431,
0.9392833113670349,
-0.6046327352523804,
1.105374813079834,
-1.5014952421188354,
-0.4306521415710449,
-0.6808589696884155,
0.20844531059265137,
... |
def _ attach _ fork _ exec ( self, gnupg _ commands, args, create _ fhs, attach _ fhs ) : process = process ( ) for fh _ name in create _ fhs + attach _ fhs. keys ( ) : if fh _ name not in _ fd _ modes : raise keyerror ( " unrecognized filehandle name'% s'; must be one of % s " % ( fh _ name, _ fd _ modes. keys ( ) ) )... | [
0.8616712093353271,
-0.5353589057922363,
0.953339159488678,
0.08026303350925446,
0.342325896024704,
0.5253273844718933,
0.15811367332935333,
-0.442800909280777,
-0.890564501285553,
-0.30608001351356506,
0.6166118383407593,
0.24941805005073547,
-0.1815447062253952,
1.0910203456878662,
0.2... |
def testgotologoutfunction ( self ) : self. utils. account. login _ as ( self. username, self. password ) startpageurl = self. po. current _ url ( ) self. po. set _ page _ load _ marker ( ) self. po. goto _ logout ( ) self. po. wait _ for _ page _ to _ load ( ) endpageurl = self. po. current _ url ( ) assert startpageu... | [
-0.22546985745429993,
0.1293780356645584,
0.31655001640319824,
-0.4487881064414978,
0.3118876516819,
0.2689395546913147,
0.6356831789016724,
-0.04077746346592903,
0.009379709139466286,
-0.3430993854999542,
-0.31441357731819153,
0.4380095899105072,
0.0867399349808693,
-0.508945882320404,
... |
def describe _ closest _ points ( self, parameterized _ points ) : closest _ parameterized _ xyzs = self. get _ closest _ points ( parameterized _ points ) for closest _ point in closest _ parameterized _ xyzs : parameterized _ point, xyz _ point = closest _ point tags = [ ] for i, axis _ label in enumerate ( self. axi... | [
0.6215431094169617,
-0.6341555714607239,
0.7258474230766296,
-0.3776938021183014,
0.351176381111145,
0.948848307132721,
-0.25068235397338867,
-0.0993555560708046,
-0.8130828738212585,
0.6045876145362854,
0.16426292061805725,
1.117305040359497,
0.5742349624633789,
0.5227895379066467,
-0.0... |
def act ( self, obs, optimal = false ) : mus = self. target _ actor. predict ( [ obs. reshape ( 1, * obs. shape ) / 255, self. adv _ placeholder, self. act _ placeholder ] ) [ 0 ] if optimal : action = [ mu for mu in mus ] else : action = [ random. gauss ( mu, self. actor _ sigma ) for mu in mus ] return action | [
-1.6763430833816528,
-0.5029900670051575,
0.4047209918498993,
0.19744952023029327,
0.23240654170513153,
0.17940209805965424,
0.01269566174596548,
0.3998490571975708,
0.985605776309967,
1.2372581958770752,
0.42517438530921936,
1.8813937902450562,
0.603559136390686,
-0.09585577249526978,
-... |
def find _ recent ( redd, fname, destdir, dstr ) : # default return value ret = false # make sure the file doesn't already exist in destdir local _ file = glob. glob ( os. path. join ( destdir, dstr + fname ) ) if len ( local _ file ) = = 1 : print ( " % s already exists in % s " % ( fname, destdir ) ) ret = true # sea... | [
-0.19299393892288208,
0.7682685256004333,
0.9108906388282776,
-0.9198392033576965,
-0.38305699825286865,
-0.2767302989959717,
0.508622407913208,
0.8198173642158508,
-0.2685457170009613,
-0.374350905418396,
0.5116041302680969,
-0.20058034360408783,
-0.19152367115020752,
0.890180230140686,
... |
def preprocess _ for _ eval ( image, height, width, central _ fraction = 0. 875, scope = none ) : with tf. name _ scope ( scope,'eval _ image ', [ image, height, width ] ) : if image. dtype! = tf. float32 : image = tf. image. convert _ image _ dtype ( image, dtype = tf. float32 ) # crop the central region of the image ... | [
0.21111510694026947,
0.14114178717136383,
0.6503177285194397,
-0.8165144920349121,
-0.17948704957962036,
-0.2674116790294647,
0.38225239515304565,
0.3731539249420166,
0.1327562928199768,
0.5209987163543701,
0.9301188588142395,
0.3977693021297455,
0.9169542789459229,
-0.17103643715381622,
... |
def make _ new _ get _ user _ response ( row ) : return {'username': row ['username'],'categories': row ['categories'],'imagename': row ['imagename'],'reftoimage': row ['reftoimage'],'imgdictbytag': row ['imgdictbytag'],'canview': row ['canview'],'imgdictbyimage': row ['imgdictbyimage'] } | [
-0.7369430065155029,
-0.7922457456588745,
0.30855125188827515,
-0.5003442764282227,
-1.1413705348968506,
-1.0725769996643066,
0.22850766777992249,
-0.9597777128219604,
0.9233572483062744,
-0.08389226347208023,
-0.5435705184936523,
-0.3082965314388275,
0.8882929086685181,
-0.569805741310119... |
def test _ atomic _ any _ uri _ min _ length _ 2 _ nistxml _ sv _ iv _ atomic _ any _ uri _ min _ length _ 3 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / anyuri / schema + instance / nistschema - sv - iv - atomic - anyuri - minlength - 3. xsd ", instance = " nistdata... | [
0.27596285939216614,
-0.3273025155067444,
0.5414990186691284,
0.5771757364273071,
-0.20914965867996216,
0.24871942400932312,
-0.7665915489196777,
-0.11032302677631378,
0.7389686703681946,
-0.16158825159072876,
0.17733286321163177,
-0.07154244929552078,
-0.6432108879089355,
-0.2035014927387... |
def per _ packet _ update ( topology, new _ policy, use _ extension = true, use _ subspace = true, use _ island = false ) : # if current policy empty if ( inst. current _ internal _ policy. is _ empty ( ) and inst. current _ edge _ policy. is _ empty and inst. current _ abstract _ policy. is _ empty ( ) ) : # use empty... | [
-0.39046216011047363,
-0.7494083046913147,
1.0059248208999634,
-0.6516035795211792,
-0.7512179613113403,
1.4323134422302246,
0.5024039149284363,
0.2328413873910904,
0.5413598418235779,
0.8344795107841492,
0.22483636438846588,
-0.14349611103534698,
-0.3334106504917145,
0.24402238428592682,
... |
def mi _ model _ 1d _ gd ( x, y, biascorrect = true, demeaned = false ) : x, y = np. atleast _ 2d ( x ), np. squeeze ( y ) if x. ndim > 2 : raise valueerror ( " x must be at most 2d " ) if y. ndim > 1 : raise valueerror ( " only univariate discrete variables supported " ) if not np. issubdtype ( y. dtype, int ) : raise... | [
0.02996436133980751,
0.15306223928928375,
0.8729143142700195,
-0.5207796692848206,
-1.3317046165466309,
0.2175406515598297,
-0.3991658389568329,
-0.15609221160411835,
-0.05478028953075409,
1.120292067527771,
0.8430905938148499,
0.6356623768806458,
-0.27927717566490173,
-0.0702645555138588,... |
def run _ suite ( self, suite, * * kwargs ) : return self. test _ runner ( verbosity = self. verbosity, failfast = self. failfast, ). run ( suite ) | [
-0.8269189596176147,
0.23417769372463226,
0.04247933626174927,
1.0269607305526733,
0.012380838394165039,
-0.5645641684532166,
-0.13172781467437744,
-0.128239244222641,
-0.2638920545578003,
-0.4308333396911621,
0.43308818340301514,
-0.0689086765050888,
-0.6540746688842773,
0.544699609279632... |
def mark ( self, element ) : print " element. response = ", element. cached _ response print " element. uri = ", element. uri print " element. freshness = ", element. freshness if element is not none : print " unfreshening " element. freshness = false self. cache. debug _ print ( ) | [
-0.8120964169502258,
0.03746167570352554,
0.30215904116630554,
-0.19499316811561584,
0.5751920938491821,
-0.09438783675432205,
0.23563042283058167,
-0.06899436563253403,
0.9585227966308594,
-0.3919508159160614,
-0.6685484647750854,
0.8738824725151062,
-0.09275282174348831,
0.88202410936355... |
def presentdate ( self, inputevent ) : dateformat = _ settingsmanager. getsetting ('presentdateformat') message = time. strftime ( dateformat, time. localtime ( ) ) self. presentmessage ( message ) return true | [
-0.18584968149662018,
-0.28264889121055603,
0.684023916721344,
-0.14168967306613922,
0.3397497236728668,
1.5066059827804565,
-0.22795207798480988,
-0.3750768005847931,
0.356981486082077,
0.17671649158000946,
0.4285833537578583,
0.10322251915931702,
-0.7861959338188171,
1.040610671043396,
... |
def to _ json ( self ) - > dict : output = { " _ type " : type ( self ). _ _ name _ _ } # add ins for optional top level attributes for k in dir ( self ) : try : v = getattr ( self, k ) is _ method = callable ( v ) is _ private = k. startswith ( " _ " ) if is _ method or is _ private : continue to _ json = hasattr ( v,... | [
-1.9492353200912476,
-0.6796598434448242,
0.8070095777511597,
-0.48986709117889404,
-0.828289806842804,
-1.325544834136963,
0.5687131881713867,
-1.3310351371765137,
0.07582031190395355,
0.19916297495365143,
-1.0088160037994385,
0.47084707021713257,
0.8155058026313782,
1.2676748037338257,
... |
def _ _ init _ _ ( self, r, b, t _ esc, delta, z ) : # distance / volume units related to the blob self. r = r. to ('cm') # dimenison of the emitting blob, in cgs self. volume = 4 / 3 * np. pi * self. r * * 3 self. light _ crossing _ time = ( self. r / c ). to ('s') # all the times in units of crossing time self. delta... | [
0.8725876212120056,
-0.49936652183532715,
0.5231452584266663,
0.17191959917545319,
0.4464361369609833,
0.5819239616394043,
-0.02524293214082718,
0.64974045753479,
-0.5358443856239319,
0.3042519688606262,
-0.6935096979141235,
-0.8288057446479797,
-0.5508333444595337,
0.23378139734268188,
... |
def getreward ( self, state, action, nextstate ) : if self. isterminal ( nextstate ) : return 0 else : return - 1 | [
-0.23896823823451996,
0.12064974755048752,
0.4779590964317322,
0.09386930614709854,
0.40668755769729614,
-0.4512852430343628,
-0.5048239827156067,
0.166775643825531,
1.0683585405349731,
0.27493762969970703,
0.5093063712120056,
1.0323424339294434,
-0.47841060161590576,
-0.74341881275177,
... |
def convert _ str _ to _ fnv64 ( text : str, seed : int = 14695981039346656037, high _ bit : bool = true ) - > int : fnv _ hash = commonresourceutils. _ str _ to _ fnv ( text, seed, 1099511628211, 18446744073709551616 ) if high _ bit : fnv _ hash | = 9223372036854775808 return fnv _ hash | [
-0.31566688418388367,
0.2641446590423584,
0.5886628031730652,
1.2817729711532593,
-0.784686267375946,
-0.9609779715538025,
-0.23418296873569489,
-0.17536266148090363,
-0.387768417596817,
-0.12660914659500122,
-0.4835873246192932,
-0.17692981660366058,
-0.07853543758392334,
0.03408938273787... |
def test _ list _ decimal _ enumeration _ 3 _ nistxml _ sv _ iv _ list _ decimal _ enumeration _ 4 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / decimal / schema + instance / nistschema - sv - iv - list - decimal - enumeration - 4. xsd ", instance = " nistdata / list / ... | [
-0.9175372123718262,
-0.21467114984989166,
0.6934472918510437,
0.5412706732749939,
0.11691447347402573,
-0.15562184154987335,
-0.24034948647022247,
0.33061733841896057,
1.2459520101547241,
-0.04593534767627716,
-0.8897958397865295,
-1.045171856880188,
-0.07880042493343353,
0.12479103356599... |
def test _ example _ input _ one _ default _ value _ order _ by ( self, ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) : input _ page = inputpage ( ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) default _ order _ by = " lastmodifieddate " input _ page. create _ new _ input. select ( ... | [
-0.12524712085723877,
0.451962411403656,
0.448595255613327,
1.066003441810608,
1.1872472763061523,
0.20591621100902557,
0.021300485357642174,
-0.4959367513656616,
0.25477826595306396,
-0.13088729977607727,
-0.05491918697953224,
-0.7944667339324951,
0.028937719762325287,
0.3634096086025238,... |
def getactivethingtype ( self, thingtypeid, parameters = none ) : thingtypeurl = apiclient. thingtypeurl % ( self. host, thingtypeid ) r = requests. get ( thingtypeurl, auth = self. credentials, params = parameters, verify = self. verify ) status = r. status _ code if status = = 200 : self. logger. debug ( " acvtive th... | [
-1.2975329160690308,
-1.1600397825241089,
0.7165499329566956,
-0.11385288834571838,
-0.20408174395561218,
-0.8211067318916321,
-0.22691364586353302,
-1.1003799438476562,
-0.37929266691207886,
0.8243424296379089,
-0.24342063069343567,
1.6631749868392944,
-1.27102530002594,
-0.27306917309761... |
def finalize _ configs ( is _ training ) : if not _ c. data. class _ names : # from dataset. dataset _ utils import load _ class _ names # classes, _ = load _ class _ names ( _ c. data. name ) num _ classes = getattr ( _ c. data, _ c. data. name. upper ( ) ). num _ category _ c. data. num _ category = num _ classes # _... | [
-0.557734489440918,
0.6960428953170776,
0.6807647347450256,
-0.4145437777042389,
0.7657079100608826,
0.0715334489941597,
1.0161161422729492,
0.19654685258865356,
-0.6424509286880493,
0.17709721624851227,
-0.36741578578948975,
0.08883931487798691,
0.5028367638587952,
0.6764675974845886,
1... |
def get _ version _ number ( template _ version _ manager, template ) : return template _ version _ manager. get _ version _ number ( template ) | [
-0.9943144917488098,
-0.7456626892089844,
0.3341295123100281,
0.25471335649490356,
-0.8250977396965027,
-0.8194720149040222,
0.6547076106071472,
0.9421939849853516,
-0.47003498673439026,
-0.08497515320777893,
-1.372085452079773,
-0.321062296628952,
0.3155805766582489,
0.8297054171562195,
... |
def timeout _ command ( command, timeout ) : import subprocess, datetime, os, time, signal start = datetime. datetime. now ( ) # create process process = subprocess. popen ( command, stdout = subprocess. pipe, stderr = subprocess. pipe ) process _ name = str ( ( command. split ( " \ \ " ) [ - 1 ] ). split ( ". " ) [ 0 ... | [
0.4313707649707794,
-0.4864594340324402,
0.9414219856262207,
-0.3648170828819275,
-0.6828545331954956,
0.18703694641590118,
-0.2454892247915268,
-0.03473307192325592,
-0.20843595266342163,
0.7109219431877136,
0.1194731816649437,
0.3492348790168762,
-0.3184036612510681,
0.27641743421554565,... |
def forward ( self, input1, input2 ) : return self. f ( input1, input2 ) | [
-0.4487802982330322,
0.002641667379066348,
0.37367913126945496,
0.9381508231163025,
-0.8404513001441956,
0.2567162811756134,
-0.5388104915618896,
-0.29011791944503784,
-1.8012840747833252,
-1.1268157958984375,
0.502869725227356,
0.7215713858604431,
0.26003795862197876,
-0.6212383508682251,... |
def get _ shared _ weights ( cls ) : return get _ list _ of _ variables ( cls. shared _ layers ) | [
-0.19890737533569336,
-0.13888412714004517,
0.6415550708770752,
1.3161718845367432,
0.5991978049278259,
0.3923815190792084,
0.9583331942558289,
-0.5015259385108948,
-0.3276474177837372,
0.08651094138622284,
-1.258974313735962,
0.5464308261871338,
-0.8325701355934143,
1.2670198678970337,
... |
def specific _ solver _ kwargs ( solver ) : return dict ( ) | [
-1.1852737665176392,
-0.6306973695755005,
0.19908082485198975,
0.28071218729019165,
-1.1168800592422485,
-0.49372899532318115,
0.0508991964161396,
-0.2982517182826996,
0.1815412938594818,
0.01713126339018345,
-1.1317386627197266,
-0.8999683260917664,
0.42409300804138184,
0.9191967844963074... |
def paintevent ( self, event ) : opt = qtgui. qstyleoption ( ) opt. initfrom ( self ) painter = qtgui. qpainter ( self ) self. style ( ). drawprimitive ( qtgui. qstyle. pe _ widget, opt, painter, self ) super ( storagemapwidget, self ). paintevent ( event ) | [
0.06151717156171799,
0.04939834028482437,
0.4076043963432312,
-0.7530727982521057,
-0.09579839557409286,
0.7639873623847961,
-0.4907490611076355,
0.5837143063545227,
1.0237294435501099,
-1.0566363334655762,
0.10736946761608124,
-0.219563290476799,
-0.03543103113770485,
0.9564159512519836,
... |
def _ install _ extauth ( self ) : url = self. _ file _ extauth base _ file ='extauth - nc. tgz'try : logger. debug ('going to download ejabberd / extauth') tmpdir = util. safe _ new _ dir ('/ tmp / ejabberd - extauth - install') archive _ path = os. path. join ( tmpdir, base _ file ) try : self. audit. audit _ evt ('p... | [
-0.3209005296230316,
-0.537983238697052,
0.8702995777130127,
-0.18682290613651276,
-0.45958781242370605,
-0.037617847323417664,
0.8395138382911682,
0.30319246649742126,
0.3756559491157532,
0.9160979986190796,
0.45157715678215027,
-0.09374317526817322,
-0.23857904970645905,
0.15748231112957... |
def thetafrommovequc ( self, theta ) : return float ( theta ) | [
0.3727389872074127,
-1.0149195194244385,
0.217484250664711,
-0.019669435918331146,
-0.2827044129371643,
-0.19023945927619934,
0.24780423939228058,
-0.5302624702453613,
-0.8177894949913025,
0.7779988646507263,
0.07932037115097046,
-0.3949662148952484,
0.1948196291923523,
-0.7198014259338379... |
def raw _ name ( self ) : pass | [
-0.26565244793891907,
-0.8702504634857178,
0.5304845571517944,
-0.07210806012153625,
-1.1984617710113525,
0.8744407296180725,
-0.20189468562602997,
-0.3932533264160156,
0.36440423130989075,
0.13790516555309296,
-0.8514549732208252,
0.3409520983695984,
1.5549194812774658,
-0.037848874926567... |
def intro _ story ( player ) : # time. sleep ( 5 ) print ( " your escape pod has crash - landed on a jungle planet. " + " inside your escape pod is a crate filled with items, " + " but you can only take one. which one do you take : " ) item _ menu = ( " flashlight ", " medkit ", " knife " ) selection = menu ( item _ me... | [
-0.5229276418685913,
-0.3827148675918579,
0.7797209024429321,
0.9672152996063232,
0.7657389640808105,
-0.009655945003032684,
0.47881218791007996,
-0.4013654887676239,
-0.3085288107395172,
0.14725129306316376,
-0.648137092590332,
-0.3492726683616638,
-0.146093487739563,
-0.2994097173213959,... |
def push ( self, card ) : self. cards. insert ( 0, card ) | [
-0.598522424697876,
1.1218550205230713,
0.26970428228378296,
-0.40695932507514954,
0.8997340798377991,
0.611016571521759,
-0.5094849467277527,
-0.033634405583143234,
-0.1368609070777893,
0.6106710433959961,
-0.5638707280158997,
0.802828311920166,
-0.26127997040748596,
0.3367573022842407,
... |
def get _ review ( cursor, hpage _ html, movie _ title ) : print ( '...') # 1. fetch review page result = etree. html ( hpage _ html ). xpath ('/ / a [ starts - with ( text ( ), " see all " ) and contains ( text ( ), " user reviews " ) ] / @ href') review _ url = imdb _ url + str ( result [ 0 ] ) logger. debug ('review... | [
-0.11404404789209366,
-0.012376745231449604,
0.9045789837837219,
0.4696629047393799,
0.5945587158203125,
-0.4779953062534332,
-0.45846909284591675,
0.4702449142932892,
0.09200983494520187,
1.108202338218689,
-0.34958890080451965,
0.07606139034032822,
-0.2438810169696808,
0.9116069078445435... |
def copy ( self ) - > boundaries : return self. _ _ class _ _ ( [ bc. copy ( ) for bc in self ] ) | [
-0.6632555723190308,
-1.4337929487228394,
0.5302619934082031,
1.2662898302078247,
-0.5722616910934448,
1.0770007371902466,
0.03628059849143028,
-0.9412117004394531,
0.7918699979782104,
-0.38167718052864075,
-1.36141836643219,
0.5575817823410034,
-1.1369918584823608,
0.12774863839149475,
... |
def replace _ with _ expanded ( self, cursor _ iter, buffer, before, after ) : # we are currently lame and do not know how to do placeholders. # so remove all | characters from after. after = after. replace ( " | ", " " ) # delete the last word in the line ( i. e., the'before'text, aka the # zen un - expanded code ), s... | [
0.79090815782547,
0.5659162998199463,
0.7030184864997864,
-0.27473726868629456,
-0.9056344628334045,
-0.5400385856628418,
-0.5894800424575806,
1.1330008506774902,
-0.19112731516361237,
-0.3609173893928528,
-0.47706520557403564,
-0.2860601842403412,
-1.1605522632598877,
0.19175602495670319,... |
def egreedy _ policy ( q _ values : dict, valid _ actions : list, device : torch _ device, epsilon : float ) - > th. tensor : sample = random. random ( ) greedy = q _ values is not none and sample > epsilon if greedy : actions = drlcontroller. greedy _ policy ( q _ values, valid _ actions ) else : actions = drlcontroll... | [
0.02730548568069935,
0.05110461264848709,
0.3758547902107239,
-0.12958063185214996,
1.1151368618011475,
0.8659471869468689,
-0.6954053044319153,
-0.09911340475082397,
1.1593855619430542,
0.2704211175441742,
0.24562132358551025,
-0.05323063209652901,
0.5773381590843201,
-0.3255014717578888,... |
def _ taxinc _ to _ amt ( self ) : taxinc ( self. _ _ policy, self. _ _ records ) schxyztax ( self. _ _ policy, self. _ _ records ) gainstax ( self. _ _ policy, self. _ _ records ) agisurtax ( self. _ _ policy, self. _ _ records ) netinvinctax ( self. _ _ policy, self. _ _ records ) amt ( self. _ _ policy, self. _ _ re... | [
1.0213624238967896,
-0.9334216713905334,
0.4763163924217224,
-1.341330885887146,
0.6182518601417542,
0.4061780273914337,
0.1109323725104332,
-0.5056712627410889,
-0.2935955226421356,
1.0606194734573364,
-0.11480070650577545,
0.27492377161979675,
0.5054978132247925,
-0.44921860098838806,
... |
def _ _ init _ _ ( self, text, time ) : self. text = text self. time = float ( time ) if time is not none else time self. user = none self. is _ interactive = false self. is _ suspicious = false self. parsetree = none self. execution _ time = none self. earliest _ event = none self. latest _ event = none self. range = ... | [
0.7465918660163879,
-0.7673962712287903,
0.610503077507019,
0.540690004825592,
0.03512261435389519,
-0.3429880440235138,
-0.54635089635849,
0.4468001127243042,
0.007947907783091068,
0.033274661749601364,
-0.86980140209198,
0.6033494472503662,
-1.1259835958480835,
0.7708247900009155,
0.08... |
def _ dec _ key _ ref ( self ) : key _ id = backend. jheaps _ aheaphandle _ l _ get _ key ( self. _ handle ) _ dec _ ref ( _ id _ to _ obj ( key _ id ) ) | [
0.46545249223709106,
-0.3940380811691284,
0.37025579810142517,
-1.224736213684082,
0.13005298376083374,
-0.3651908338069916,
0.1116117313504219,
-0.05393723398447037,
-0.6201726198196411,
0.6563097238540649,
0.7029791474342346,
0.4969649314880371,
-0.23673880100250244,
0.3668406307697296,
... |
def interpolate _ to _ derivative _ img ( pxs, pys, dxs, dys, d _ img, w1, w2 ) : for i in range ( d _ img. shape [ 0 ] ) : d _ img [ i ]. index _ put _ ( ( pys, pxs ), w1 [ i ] * ( - ( 1. 0 - dys ) ) + w2 [ i ] * ( - ( 1. 0 - dxs ) ), accumulate = true ) d _ img [ i ]. index _ put _ ( ( pys, pxs + 1 ), w1 [ i ] * ( 1.... | [
-0.994810938835144,
0.24225953221321106,
0.8785852193832397,
-1.0669176578521729,
0.18086785078048706,
0.20487233996391296,
0.1758992224931717,
-0.1802188903093338,
-0.21584148705005646,
0.0810927003622055,
0.7779454588890076,
0.16943278908729553,
0.5967934727668762,
0.24712595343589783,
... |
def resource _ group _ name ( self ) - > pulumi. input [ str ] : return pulumi. get ( self, " resource _ group _ name " ) | [
0.2080364227294922,
0.7879700660705566,
0.16020064055919647,
-0.6612588763237,
-0.7099350094795227,
0.8718101382255554,
0.3289973735809326,
0.07465322315692902,
-0.25632670521736145,
0.20640073716640472,
0.7173259854316711,
0.5904363989830017,
0.28491735458374023,
-0.13592976331710815,
-... |
def isnumeric ( cls, obj ) : return isinstance ( obj, ( int, float, complex ) ) | [
-0.45391327142715454,
-0.16261975467205048,
0.4795534610748291,
1.7998987436294556,
0.21106202900409698,
0.647259533405304,
0.5795326828956604,
-1.0191551446914673,
0.3546306788921356,
0.3175015449523926,
-1.267350435256958,
-0.6687417030334473,
-0.7516990303993225,
-0.15478898584842682,
... |
def async _ start _ discovery ( hass : homeassistant ) - > bool : domain _ data = hass. data. setdefault ( domain, { } ) if discovery in domain _ data : return false # already running discovery = domain _ data [ discovery ] = sensemediscovery ( false ) discovery. add _ callback ( lambda devices : async _ trigger _ disc... | [
0.12208995968103409,
0.5262086987495422,
0.38477978110313416,
0.9030038714408875,
0.4139884412288666,
-0.40884754061698914,
0.005419555120170116,
0.13288719952106476,
0.8509102463722229,
-0.8048160672187805,
-0.1297455132007599,
-0.07501277327537537,
0.664170503616333,
0.8201020359992981,
... |
def test _ compute _ simple ( self ) - > none : random _ function = make _ random _ function ( [ # weights for the first neuron. 0. 3, 0. 4, # weights for the second neuron. 0. 5, 0. 6, ] ) dense _ layer = denselayer ( neuron _ count = 2, activation = relu, activation _ prime = relu _ prime, random _ function = random ... | [
0.19803781807422638,
-0.022012164816260338,
0.617640495300293,
0.9070886969566345,
0.9513159990310669,
-0.13619503378868103,
0.36940625309944153,
0.06664919853210449,
0.11425497382879257,
-0.4287908971309662,
-0.5544367432594299,
-0.18825989961624146,
-0.513988196849823,
0.4111887216567993... |
def get ( self, key, default = none ) : with self. _ cache _ lock : try : item, _ = self. _ cache. get ( key ) return item except : return default | [
-0.48609068989753723,
0.8893920183181763,
0.21894308924674988,
1.0819730758666992,
0.3361968696117401,
-0.24939993023872375,
-1.2511138916015625,
-0.8506353497505188,
-0.621410608291626,
0.5476335883140564,
0.080177441239357,
-0.2104840874671936,
-1.4377262592315674,
-1.0301454067230225,
... |
def _ check _ row ( self ) : total = sum ( [ self. _ letter _ dict [ self. _ game _ state. board [ self. _ row ] [ column ] ] for column in range ( 3 ) ] ) if abs ( total ) = = 3 : winning _ letter = self. _ game _ state. board [ self. _ row ] [ self. _ col ] self. _ game _ outcome = winning _ letter return true return... | [
-0.6247571110725403,
0.9051392674446106,
0.8962549567222595,
-0.04302560165524483,
-0.3699556887149811,
0.07363482564687729,
-0.39611902832984924,
-0.13088569045066833,
0.033620186150074005,
0.822430431842804,
-0.13142776489257812,
-0.7232527136802673,
0.5341169834136963,
-0.69806337356567... |
def build _ docs _ for _ packages ( current _ packages : list [ str ], docs _ only : bool, spellcheck _ only : bool, jobs : int, verbose : bool, ) - > tuple [ dict [ str, list [ docbuilderror ] ], dict [ str, list [ spellingerror ] ] ] : all _ build _ errors : dict [ str, list [ docbuilderror ] ] = defaultdict ( list )... | [
-0.9423646330833435,
0.16821639239788055,
0.41672441363334656,
0.5720875263214111,
-0.1281978040933609,
0.3555009067058563,
0.5207828879356384,
0.6803784966468811,
0.021950287744402885,
-0.15136541426181793,
0.43612122535705566,
0.06931056827306747,
0.017956333234906197,
0.9490415453910828... |
def _ _ init _ _ ( self, nside, regions = none, root _ models = none ) : self. nside = int ( nside ) self. hp _ npix = hp. nside2npix ( nside ) # generate the indices of all healpix pixels self. indices = np. arange ( hp. nside2npix ( nside ), dtype = " int " ) self. n _ healpix _ pxl = len ( self. indices ) self. pola... | [
-0.02936496026813984,
-0.2910688817501068,
0.7740325331687927,
0.03997907042503357,
-0.28056731820106506,
0.5240582823753357,
-0.4371039867401123,
-0.3326117992401123,
-0.4780246615409851,
-0.3858823776245117,
0.7940890192985535,
-0.48095589876174927,
0.04006259888410568,
0.71722012758255,... |
def _ add _ edge ( i, j ) : edge _ points. append ( points [ [ i, j ] ] ) | [
-0.3082031309604645,
0.29698634147644043,
0.26577723026275635,
0.07045180350542068,
0.8036329746246338,
0.449763685464859,
-1.0508532524108887,
0.38873931765556335,
-0.3191543221473694,
1.1781798601150513,
0.24091841280460358,
0.22435440123081207,
-0.6471142172813416,
-0.8729363083839417,
... |
def filter _ ignored _ datasets ( dirs, root ) : for drc in dirs : test _ drc = str ( drc. relative _ to ( root ) ) if test _ drc not in ignore _ list : yield drc elif verbose : print ('ignored : ', test _ drc ) | [
-0.2909592092037201,
0.05432623252272606,
0.42132553458213806,
0.06474053859710693,
-0.6317654252052307,
-0.002399367280304432,
0.31499072909355164,
-0.1760272979736328,
0.6939139366149902,
-0.20036903023719788,
0.1532927304506302,
0.3312193751335144,
-0.29231804609298706,
0.26040542125701... |
def cat ( ) : return render _ template ( " cat. html " ) | [
1.066835641860962,
0.7027982473373413,
0.24893076717853546,
0.160594642162323,
-0.10458105802536011,
0.4108896851539612,
-0.28490322828292847,
1.1278477907180786,
-1.9933620691299438,
-0.7908635139465332,
1.1041760444641113,
-0.3841903805732727,
0.8539369106292725,
0.3032746911048889,
-1... |
def distribution ( data, transformed = false ) : # create figure fig = pl. figure ( figsize = ( 11, 5 ) ) ; # skewed feature plotting for i, feature in enumerate ( ['driverid ','constructorid'] ) : ax = fig. add _ subplot ( 1, 2, i + 1 ) ax. hist ( data [ feature ], bins = 842, color ='# 00a0a0') ax. set _ title ( "'% ... | [
0.4625782072544098,
0.34536340832710266,
0.9984347224235535,
-0.3111761808395386,
-0.4637511670589447,
0.18562570214271545,
0.603946328163147,
1.237731695175171,
0.002320237457752228,
-0.7179901003837585,
0.34926846623420715,
0.9666808247566223,
0.5700575113296509,
0.33580872416496277,
0... |
def is _ climate _ on ( self ) - > bool : return self. _ vehicle _ data. get ( " climate _ state ", { } ). get ( " is _ climate _ on " ) | [
0.039497558027505875,
-0.3467208743095398,
0.2892400324344635,
0.4165388345718384,
0.15056942403316498,
0.26465681195259094,
-1.1488999128341675,
0.8611387610435486,
-0.6841116547584534,
1.0935195684432983,
-0.3523465692996979,
0.1821008324623108,
-0.3808381259441376,
-0.3612838387489319,
... |
def prepare _ val _ for _ stock _ inventory ( self, location _ id, inventory _ levels, instance ) : stock _ inventory _ array = [ ] product _ ids _ list = [ ] lot _ stock _ id = location _ id. import _ stock _ warehouse _ id. lot _ stock _ id. id for inventory _ level in inventory _ levels : inventory _ level = invento... | [
-1.3264033794403076,
-0.7702270150184631,
0.4512523412704468,
0.061154358088970184,
0.7292467951774597,
0.17235378921031952,
-0.5593238472938538,
-0.7469525933265686,
0.40764716267585754,
1.143619418144226,
-0.9661341309547424,
0.5575715899467468,
0.6082220077514648,
0.48781317472457886,
... |
def test _ list _ integer _ min _ length _ 3 _ nistxml _ sv _ iv _ list _ integer _ min _ length _ 4 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / integer / schema + instance / nistschema - sv - iv - list - integer - minlength - 4. xsd ", instance = " nistdata / list / ... | [
-0.18347233533859253,
-0.7644549608230591,
0.29667937755584717,
0.1948629915714264,
-0.7336390614509583,
-0.14104107022285461,
-0.7699198126792908,
-0.1332871913909912,
0.9046076536178589,
0.39365753531455994,
-1.125691294670105,
-0.3134812116622925,
-0.7299845814704895,
0.4464708268642425... |
def verify _ snmp _ action ( self, system _ name, snmp _ result, mib _ string = none ) : wdesc = " verify the snmp action results " utils. testcase _ utils. psubstep ( wdesc ) errindication = utils. data _ utils. get _ object _ from _ datarepository ( str ( system _ name ) + " _ errindication " ) varbindtable = utils. ... | [
-0.36546918749809265,
-0.7006715536117554,
0.6018661260604858,
0.19234903156757355,
0.31320562958717346,
-0.1499634087085724,
0.2806500792503357,
-0.295116662979126,
0.9720408916473389,
0.43154749274253845,
-0.6782513856887817,
0.4713834226131439,
-1.2093639373779297,
0.5615715384483337,
... |
def build _ node _ creator ( self, bound _ parameters, min _ y _ length, max _ y _ length = none ) : max _ y _ length = min _ y _ length if max _ y _ length is none else max _ y _ length min _ bound = self. _ build _ min _ bound ( max _ y _ length ) max _ bound = self. _ build _ max _ bound ( bound _ parameters, min _ ... | [
0.027221888303756714,
-0.3490682542324066,
0.3795037567615509,
0.3227009177207947,
0.07145316153764725,
0.13214898109436035,
-0.5691596269607544,
-0.23875971138477325,
-0.3032846748828888,
-0.6977027654647827,
0.07527942210435867,
0.8815142512321472,
0.22279345989227295,
-0.140361875295639... |
def place _ points _ in _ overlaps ( cg, size _ threshold = 0. 0007, reference = none, height = 0, iterative _ phase _ kwargs = {'size': 71 } ) : if not session : warnings. warn ('this function requires a database connection configured via an autocnet config file.') return points = [ ] session = session ( ) srid = conf... | [
0.38848885893821716,
0.5922138094902039,
0.5349249243736267,
-0.3074895441532135,
0.19576632976531982,
-0.07217227667570114,
0.15163324773311615,
0.6257946491241455,
0.1417364776134491,
0.6174178719520569,
0.2415822297334671,
-0.13259850442409515,
-0.031006045639514923,
0.4982340633869171,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.