text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def _ _ init _ _ ( self, pos = false, radius = 0, direction = false, transform = false ) : self. init ( ) # self. pos = vec ( pos ) self. point _ type ='incurve'self. pos = none self. direction = false self. transform = transform # self. radius = radius # self. direction = direction # self. transform = transform self. ... | [
0.34769493341445923,
-0.773722231388092,
0.7248260974884033,
0.4780343174934387,
0.4923761188983917,
0.22787848114967346,
0.001825628336519003,
0.7137669920921326,
0.5055475831031799,
-0.33361274003982544,
-0.866469144821167,
-0.050988733768463135,
-0.25048285722732544,
-0.1245663166046142... |
def test _ call ( self ) : self. holder ( self. result ) self. assertequal ( self. result. errors, [ ( self. holder, ( self. error. type, self. error. value, self. error. tb ) ) ] ) | [
-0.5392584204673767,
0.26370128989219666,
0.31144872307777405,
-0.37286287546157837,
0.5581862330436707,
0.9854864478111267,
-0.4222026467323303,
-0.7644041180610657,
0.20546136796474457,
-0.967372715473175,
0.3215779662132263,
-0.07755216211080551,
-0.8012586832046509,
-0.2190158218145370... |
def get _ size ( self ) : return len ( self. value ) | [
-0.11329759657382965,
0.6696279048919678,
0.35125377774238586,
-1.1095998287200928,
0.5007461905479431,
0.3999493420124054,
0.23906303942203522,
0.3247290551662445,
-0.05920853465795517,
-1.0276906490325928,
-0.992543637752533,
-0.019572729244828224,
-0.11257631331682205,
0.250935524702072... |
def get _ visit _ model ( self, instance ) : for model in get _ models ( get _ app ( instance. _ meta. app _ label ) ) : if isinstance ( model ( ), basevisittracking ) : return model raise typeerror ('unable to determine the visit model from instance { 0 } for app { 1 } '. format ( instance. _ meta. model _ name, insta... | [
-0.47365713119506836,
0.43423986434936523,
0.6684228777885437,
0.6389110088348389,
0.7015722393989563,
1.3694335222244263,
1.0797268152236938,
-0.5594465732574463,
-0.387291818857193,
0.9233519434928894,
0.7245596647262573,
0.2886127829551697,
0.3396627604961395,
-0.08969318121671677,
0.... |
def iterpins ( self ) : return self. load ( ). iteritems ( ) | [
-0.903802216053009,
-0.8473196625709534,
0.30920472741127014,
-0.8478919267654419,
0.0021186741068959236,
0.746973991394043,
-0.5341709852218628,
-0.3163518011569977,
0.1929178237915039,
0.6089611053466797,
0.3314000964164734,
-0.09230789542198181,
-0.3593885600566864,
-0.434846967458725,
... |
def add _ modules ( self ) : _, folder _ names = helpers. get _ files _ and _ folders ( self. sync _ path, include _ full _ path = false ) module _ names = [ f _ name for f _ name in folder _ names if f _ name not in non _ module _ folder _ names ] for idx, module _ name in enumerate ( module _ names ) : module _ path ... | [
-0.16492056846618652,
-0.014306272380053997,
0.6081093549728394,
0.20398223400115967,
1.3244520425796509,
0.46293994784355164,
0.5880615711212158,
-0.15956903994083405,
-0.1935696005821228,
0.10651670396327972,
-0.052693285048007965,
0.11792173236608505,
0.14798389375209808,
0.556782007217... |
def commits ( repo, region, seen, before, payload, commit _ id ) : if commit _ id in seen or commit _ id = = before : return seen. add ( commit _ id ) commit = none while true : try : commit = codecommit. get _ commit ( repositoryname = repo, commitid = commit _ id ) break except clienterror as err : if err. response [... | [
1.1884346008300781,
-0.26288723945617676,
0.5660809278488159,
-0.9023147821426392,
0.5871798992156982,
-0.8224471807479858,
-0.4676578938961029,
-1.3550301790237427,
-0.37554553151130676,
0.22726623713970184,
0.5601848363876343,
0.45641830563545227,
-0.2149188071489334,
0.00263557652942836... |
def search ( ) : pandora _ speak ('what you want to search, sir?') to _ search = record _ audio ( ) # store what the user wanna search pandora _ speak ('you said :'+ to _ search + ', yes?') # repeating to confirm the sentence confirm = record _ audio ( ) # confirming with'yes'or'right'print ('you :'+ confirm ) # print ... | [
0.05246886610984802,
0.3770189881324768,
0.7096388339996338,
0.8612222075462341,
-0.04001672938466072,
0.6355255842208862,
-0.3236042857170105,
-0.8012998700141907,
-0.14050009846687317,
0.10828649252653122,
0.04913678392767906,
0.4237332344055176,
-0.9854320287704468,
0.11462243646383286,... |
async def embed ( self, content = none, * * kwargs ) : # extract regular parameters. content = content tts = kwargs. pop ( " tts ", false ) file = kwargs. pop ( " file ", none ) files = kwargs. pop ( " files ", none ) delete _ after = kwargs. pop ( " delete _ after ", none ) nonce = kwargs. pop ( " nonce ", none ) allo... | [
-0.4640454351902008,
0.9635653495788574,
0.787262499332428,
0.4984332323074341,
0.06527187675237656,
0.27822941541671753,
-0.09922369569540024,
-0.6730080842971802,
-0.3630043864250183,
-0.33670753240585327,
0.04541671648621559,
0.5394039750099182,
-1.01006281375885,
0.5338683724403381,
... |
def drop _ partitions _ ddl ( self, table, partition _ specs ) : partition _ specs. sort ( ) return'\ n '. join ( ['alter table { 0 } drop if exists partition ( { 1 } ) ; '. format ( table, spec ) for spec in partition _ specs ] ) | [
-0.43959322571754456,
-0.7489284873008728,
0.5868690609931946,
0.3822287321090698,
-0.15581224858760834,
0.22573049366474152,
-0.14022189378738403,
0.3290870785713196,
-1.0976258516311646,
0.6783263087272644,
1.232053279876709,
-0.5315306186676025,
0.39444699883461,
-0.14631490409374237,
... |
def get _ name ( self ) : return self. name | [
-0.6760267615318298,
-1.3101738691329956,
0.39598309993743896,
-0.12174882739782333,
-0.4941951334476471,
0.554806649684906,
0.11127790808677673,
-0.3621368408203125,
-0.242742657661438,
0.14369943737983704,
-0.47305575013160706,
0.2884862720966339,
0.10772591084241867,
-0.2245897203683853... |
def send _ to _ channel ( self, channel, message ) : users = self. get _ users _ in _ channel ( channel ) return self. _ send _ to _ users ( users, message ) | [
-1.1463842391967773,
0.05757814273238182,
0.10609475523233414,
-0.26250821352005005,
1.2088987827301025,
-0.16994543373584747,
0.04387848824262619,
-0.4977496862411499,
-0.6948704719543457,
0.26519790291786194,
0.3770720660686493,
1.3602763414382935,
-1.0009111166000366,
0.4997812807559967... |
def mask _ filter ( self, old ) : new = { } for akey in old. keys ( ) : new [ akey ] = { " config " : old [ akey ] [ " config " ], " data " : [ ] } conf = getattr ( self. voptions, akey, none ) new [ akey ] [ " config " ] [ " filter " ] = conf. filter for item in old [ akey ] [ " data " ] : # todo : need to improve thi... | [
-0.4068711996078491,
-0.7046570181846619,
0.4711892306804657,
-0.499686062335968,
-0.6642774939537048,
-0.34384357929229736,
-0.6896576881408691,
-0.9365342855453491,
0.005736400838941336,
0.9634844660758972,
0.14809952676296234,
0.8315230011940002,
0.45938464999198914,
0.43607380986213684... |
def get _ age ( x ) : cid = x. cohortid. unique ( ) [ 0 ] if self. in _ boot : cid = self. bootstrap _ id _ dates [ cid ] return self. cid _ ages [ cid ] | [
-0.7630696892738342,
-0.06365903466939926,
0.525591254234314,
0.7272922992706299,
0.04289425164461136,
-0.4344596266746521,
-0.6195199489593506,
-1.2260197401046753,
0.4962221384048462,
0.4327894449234009,
0.33085399866104126,
0.28515875339508057,
-0.033130794763565063,
0.49851396679878235... |
def _ make _ fake _ dataset _ fn ( initial _ delay _ us, remainder _ delay _ us ) : def fake _ dataset _ fn ( unused ) : " " " returns a function that creates a dataset with the specified delays. " " " del unused def make _ dataset ( time _ us, num _ elements ) : dataset = dataset _ ops. dataset. range ( num _ elements... | [
-0.045003559440374374,
0.6812404990196228,
0.508918285369873,
-0.3608019948005676,
-0.4215710759162903,
-0.17407779395580292,
0.48473066091537476,
0.37464669346809387,
0.2816978991031647,
-1.0352660417556763,
0.17941631376743317,
0.4315960109233856,
0.5681296586990356,
-0.9365366697311401,... |
def _ _ init _ _ ( self, root _ dir ) : self. root _ dir = root _ dir self. cages _ dir = [ os. path. join ( self. root _ dir, item ) for item in os. listdir ( self. root _ dir ) if'homecage'in item. lower ( ) ] self. mice _ dir = [ ] cages _ dir _ list = [ ] for cage in self. cages _ dir : animal _ dir = os. path. joi... | [
0.4749240577220917,
-0.4197257161140442,
0.7446533441543579,
0.9906502366065979,
-0.028624719008803368,
-0.09953387826681137,
0.6050105094909668,
-0.24533319473266602,
0.09284361451864243,
-0.18304221332073212,
-0.41554269194602966,
0.01412513293325901,
-0.13076548278331757,
1.087949395179... |
def remove _ client _ from _ games _ except ( self, client, exclude _ game ) : dict = self. games. copy ( ) # avoid changed during iteration error for game in dict : if game in self. games : if client. id in self. games [ game ]. connected _ clients and exclude _ game! = self. games [ game ] : self. games [ game ]. rem... | [
-0.16891677677631378,
-0.3237934410572052,
0.748759925365448,
-0.409233421087265,
-1.1948550939559937,
1.2004156112670898,
-0.27521321177482605,
-0.2724837064743042,
-0.22656016051769257,
1.564387559890747,
-0.09767638891935349,
0.3334774971008301,
-1.8742702007293701,
-0.34035173058509827... |
def read _ from _ gpio ( self ) : if ( false ) : pass self. _ value = self. _ value + random. random ( ) * ( - 0. 5 + random. random ( ) ) # print ( " new gpio value : ", self. _ value ) return self. _ value return abs ( self. _ last _ value + random. random ( ) * ( - 0. 5 + random. random ( ) ) ) | [
-0.22852924466133118,
0.3115674555301666,
0.6483834385871887,
0.059369754046201706,
-0.9621094465255737,
1.0493742227554321,
0.07343067228794098,
-0.5140058994293213,
-0.59466153383255,
-0.2473844587802887,
0.7415403127670288,
-0.18408988416194916,
-0.2906602919101715,
-0.18787163496017456... |
def test _ 01 _ 0 _ days ( self ) : l _ days = schedtime. _ extract _ days ( self. m _ schedule _ obj, t _ wednesday ) self. assertequal ( l _ days, 0 ) self. m _ schedule _ obj. dayofweek = dayofweek _ wednesday l _ days = schedtime. _ extract _ days ( self. m _ schedule _ obj, t _ wednesday ) # print ( prettyformatan... | [
-0.6301221251487732,
0.3673527240753174,
0.40628865361213684,
-1.5307421684265137,
0.5845566391944885,
-0.2564820647239685,
0.15821559727191925,
-0.3924190104007721,
0.6660345196723938,
-0.627276599407196,
0.2426820993423462,
-0.10991717875003815,
0.16796934604644775,
0.6100360751152039,
... |
def _ make _ dec ( self, block, planes, blocks, share _ planes = 8, nsample = 16, is _ head = false ) : decoder = [ ] decoder. append ( transitionup ( self. in _ planes, none if is _ head else planes * block. expansion ) ) self. in _ planes = planes * block. expansion if is _ head : decoder _ inputs = [ layers. input (... | [
0.07646270841360092,
0.4420829713344574,
0.9525461792945862,
0.5391538739204407,
-0.4972738027572632,
0.11592001467943192,
0.2767163813114166,
0.2914949357509613,
-0.33073389530181885,
-0.17672385275363922,
-0.17954587936401367,
-0.6882349252700806,
0.06759776920080185,
0.18457287549972534... |
def address _ string ( self ) : return self. client _ address [ 0 ] | [
0.20391151309013367,
-1.2085789442062378,
0.536734402179718,
-0.8543994426727295,
0.3316212296485901,
0.7535171508789062,
0.3381125032901764,
-0.699462890625,
0.4424610137939453,
0.19121971726417542,
1.2905654907226562,
1.3599443435668945,
-0.45232751965522766,
-1.3186370134353638,
0.278... |
def _ _ init _ _ ( self, local _ importance _ values = none, * * kwargs ) : super ( localexplanation, self ). _ _ init _ _ ( * * kwargs ) self. _ logger. debug ('initializing localexplanation') self. _ local _ importance _ values = local _ importance _ values | [
1.0681434869766235,
0.5681824088096619,
0.3736220896244049,
0.10331791639328003,
-0.13249041140079498,
-0.25352832674980164,
-0.13293404877185822,
1.7933628559112549,
0.21151499450206757,
-0.08250442892313004,
-0.9156836271286011,
0.3383839428424835,
-0.20949210226535797,
1.206537485122680... |
async def room _ open ( self, ctx ) : if not await self. bot. has _ perm ( ctx ) : return message = ctx. message author = self. bot. admin _ override ( ctx ) archive _ cat = ctx. guild. get _ channel ( self. create _ category ) # does user already have a channel open? open _ rooms = self. user _ rooms _ open ( owner. i... | [
-0.5332295298576355,
0.6592960953712463,
0.6980351805686951,
0.3816184103488922,
0.16469526290893555,
-0.11424674093723297,
-0.23414312303066254,
-0.027021782472729683,
-0.11807874590158463,
-0.10493934899568558,
0.2266809195280075,
0.5063730478286743,
-0.6072530746459961,
0.94860923290252... |
def target _ node ( self ) : pass # pragma : no cover | [
-0.6424639225006104,
-0.7752029895782471,
0.3096463680267334,
-0.2531273066997528,
1.2054803371429443,
0.5278207063674927,
0.5211055278778076,
0.37084323167800903,
0.20130018889904022,
-0.26700225472450256,
0.6750267148017883,
1.214411973953247,
0.27201396226882935,
-0.644538402557373,
-... |
def plot _ bar ( x, y, z = np. array ( [ i for i in range ( 100 ) ] ), nombre ='sigmoide 3d') : fig = plt. figure ( figsize = ( 10, 10 ) ) ax = fig. add _ subplot ( 111, projection ='3d') ax. bar3d ( x = x, y = z, z = y, dx = 1, dy = 1, dz = 0. 1, shade = true ) ax. set _ title ( f " { nombre } " ) ax. set _ xlabel ('x... | [
0.3921492397785187,
1.01485276222229,
0.7174594402313232,
0.1961894929409027,
-0.34317106008529663,
1.5394618511199951,
-0.26593977212905884,
0.3083023428916931,
-0.44687408208847046,
0.036478541791439056,
0.1724523901939392,
0.9749841094017029,
-0.8394818902015686,
-0.24914467334747314,
... |
def _ remove _ empty _ fires ( bright _ list, df _ firms ) : bright _ list _ nonzero = [ ] event _ id _ new = 1 for i, br _ list in enumerate ( bright _ list ) : if br _ list. count _ nonzero ( ) > 0 : bright _ list _ nonzero. append ( br _ list ) df _ firms. event _ id. values [ df _ firms. event _ id = = i + 1 ] = ev... | [
-0.17033308744430542,
-0.32571545243263245,
0.4819622039794922,
0.8203428983688354,
0.22159510850906372,
-0.9794939160346985,
0.37418699264526367,
1.13858962059021,
0.25047069787979126,
-0.23725703358650208,
-0.3959885835647583,
0.42554906010627747,
-0.582897424697876,
0.8526917099952698,
... |
def get _ volume _ object ( self ) : return | [
0.6517120003700256,
-1.3275303840637207,
0.33885544538497925,
0.5886092782020569,
-0.10500334948301315,
0.027806846424937248,
0.2950422465801239,
-0.9494045376777649,
-0.3560047447681427,
-1.8712509870529175,
0.3519159257411957,
1.0177159309387207,
-0.17352992296218872,
-0.5218589305877686... |
def test _ orphan _ create _ table ( cs _ orphan _ create _ sql ) : # first process all sql dump names in file cs _ orphan _ create _ sql. make _ sql _ dump _ suffixes ( ) orphan _ line ='create table myschema. der _ all _ brands _ transposed ( '. lower ( ) coll. find _ dupes ( orphan _ line, cs _ orphan _ create _ sql... | [
0.3876129984855652,
0.4511694312095642,
0.56119704246521,
-0.2230076789855957,
0.5170724391937256,
0.7194650173187256,
0.4978059232234955,
-0.7075210213661194,
-0.42749470472335815,
-0.12920358777046204,
-0.9112021923065186,
0.16490809619426727,
0.770577609539032,
0.46556732058525085,
0.... |
async def listen _ for _ new _ callbacks ( self, callback _ function = none, timeout = none ) : url = " { } { } : { } / ws / new _ callbacks / current _ operation ". format ( self. _ ws, self. _ server _ ip, self. _ server _ port ) if callback _ function : task = await self. stream _ output ( url, callback _ function, ... | [
0.17433956265449524,
0.22894077003002167,
0.533210813999176,
0.3105999827384949,
-0.8461920022964478,
-0.6755484342575073,
0.4075475335121155,
-0.3436645567417145,
0.022598862648010254,
0.16872303187847137,
-0.09399514645338058,
0.6055967211723328,
-0.40714728832244873,
0.8898100852966309,... |
def fitsol _ fit ( self ) : # calculate the dispersion # disp = ( ids [ - 1 ] - ids [ 0 ] ) / ( tcent [ idx _ str [ - 1 ] ] - tcent [ idx _ str [ 0 ] ] ) # final _ fit = fitting. iterative _ fitting ( censpec, tcent, idx _ str, ids, # llist, disp, verbose = false, # n _ first = 2, n _ final = self. _ fitdict [ " polyor... | [
0.9827370643615723,
-0.8979856967926025,
0.6074764132499695,
-0.21759074926376343,
0.08700355142354965,
0.009999056346714497,
-0.1702352911233902,
0.19736838340759277,
-0.06040916219353676,
-0.8823654651641846,
0.37395212054252625,
0.5271332263946533,
-0.00482851080596447,
0.33676990866661... |
def poisson ( t, y, den ) : y1, y2 = y y1d = y2 y2d = - den ( t ) / t return [ y1d, y2d ] | [
-0.3035300076007843,
-0.7475631833076477,
0.5276955366134644,
-0.6140758991241455,
-0.20829126238822937,
0.38949933648109436,
-0.10692646354436874,
-0.8147445917129517,
-1.4294072389602661,
0.29743021726608276,
-0.004295640625059605,
-0.004603062756359577,
1.2435271739959717,
-0.5666908025... |
def training _ loop ( config, coord, sess, summary _ op, summary _ writer, saver, restore _ saver, threads, directories, train _ dict, val _ dict, exp _ label, num _ params, use _ db, log, placeholders = false, checkpoint = none, save _ weights = false, save _ checkpoints = false, save _ activities = false, save _ grad... | [
-0.4872308373451233,
0.5195577144622803,
0.5296491980552673,
0.4500606060028076,
0.1111738458275795,
-0.28299039602279663,
0.3392212986946106,
0.7266859412193298,
-0.9176066517829895,
0.6338885426521301,
-0.03300543874502182,
-0.7636427283287048,
0.4486738443374634,
0.14058569073677063,
... |
def test _ load _ from _ config _ empty ( self ) : normalizer = normalizer. load _ from _ config ( { } ) assert _ equal ( normalizer, normalizer ) assert _ equal ( normalizer. _ types _ config, none ) | [
-0.5814460515975952,
0.06634930521249771,
0.33217141032218933,
-0.450416624546051,
-0.22197610139846802,
0.0242826659232378,
-0.23149487376213074,
-0.34363359212875366,
0.21198047697544098,
-0.30651482939720154,
-1.257751226425171,
-0.49019524455070496,
-0.8256859183311462,
0.6473859548568... |
def access ( self, distance, fuzziness, new _ theme, replacee, replacee _ pos ) : if distance = = - 1 : return self. access _ backup ( replacee, replacee _ pos ) for similar _ word _ list in new _ theme. _ similar _ word _ lists : for ii in [ int ( round ( jj * ( - 0. 5 if jj % 2 = = 0 else 0. 5 ) ) ) for jj in range (... | [
0.08888540416955948,
-0.5133665204048157,
0.8229808211326599,
-0.5243397951126099,
-1.2507879734039307,
-0.2938598394393921,
1.0327376127243042,
0.25448179244995117,
-0.12004806846380234,
0.5083722472190857,
0.4810890853404999,
0.5086897015571594,
-0.7052057385444641,
0.5034283995628357,
... |
def _ connect ( self ) : if not self. _ db : import boto sdb = boto. connect _ sdb ( ) if not self. domain _ name : self. domain _ name = boto. config. get ( " db ", " sequence _ db ", boto. config. get ( " db ", " db _ name ", " default " ) ) try : self. _ db = sdb. get _ domain ( self. domain _ name ) except sdbrespo... | [
-1.1005010604858398,
0.4778316617012024,
0.6898888349533081,
0.3312758803367615,
0.24302566051483154,
-0.1251046508550644,
-0.2913717031478882,
-0.49472060799598694,
-0.11445847898721695,
-0.19801168143749237,
0.00014088471652939916,
0.007877059280872345,
-0.5579161643981934,
-0.0323157124... |
def _ _ post _ init _ _ ( self ) : self. _ input _ spec = self. get _ input _ spec ( ) self. _ output _ spec = self. get _ output _ spec ( ) | [
-0.2527009844779968,
-1.2676938772201538,
0.4136945605278015,
-0.3869039714336395,
-0.35351961851119995,
-0.6664115190505981,
1.1044862270355225,
-0.295453816652298,
-0.8685764074325562,
-0.5011780858039856,
-0.24749746918678284,
0.10352480411529541,
0.5948905944824219,
0.5917403697967529,... |
def levenshtein ( s, t, inscost = 1. 0, delcost = 1. 0, substcost = 1. 0 ) : @ memolrec def lrec ( spast, tpast, srem, trem, cost ) : if len ( srem ) = = 0 : return spast + len ( trem ) * ['_'], tpast + trem, [ ], [ ], cost + len ( trem ) if len ( trem ) = = 0 : return spast + srem, tpast + len ( srem ) * ['_'], [ ], [... | [
0.3807469606399536,
-0.2564573585987091,
0.6857469081878662,
-1.1327359676361084,
-0.524046778678894,
-0.6616288423538208,
0.027961386367678642,
0.1553776115179062,
-0.09558572620153427,
0.27050068974494934,
-0.9627044796943665,
0.5903342962265015,
-0.3477419316768646,
-0.734171986579895,
... |
def view _ shape ( shape, view ) : if view is none : return shape else : return np. broadcast _ to ( 1, shape ) [ view ]. shape | [
0.3199484646320343,
-0.19640949368476868,
0.5234556794166565,
0.029929226264357567,
-0.25954851508140564,
-0.38860803842544556,
0.5159308314323425,
0.04215474799275398,
1.7427066564559937,
-0.3846890926361084,
1.388947606086731,
1.6310738325119019,
-0.077170729637146,
-0.39417847990989685,... |
def sample _ and _ marginalize ( self, fnx, f, measure ) : raise exception ( " this is the base region class! use a subclass " ) | [
0.38868463039398193,
-0.2635340988636017,
0.23316679894924164,
0.6542829871177673,
-0.38383418321609497,
0.10001982003450394,
-0.5904182195663452,
-0.07872471213340759,
0.6450483202934265,
-0.7904743552207947,
0.9128737449645996,
0.43439987301826477,
0.15005157887935638,
0.7553517818450928... |
def landmark _ correction ( y, l, state, s ) : r = state. r x = state. x p = state. p rl = np. hstack ( [ r, l ] ) # robot and landmark pointer in x x _ y, j _ r, j _ y = observe ( x [ r ], x [ l ] ) # expectation measurement y = h ( x ) j _ ry = np. hstack ( [ j _ r, j _ y ] ) # expectation jacobian # meassurement ino... | [
0.5214869379997253,
-0.9925334453582764,
0.7423260807991028,
-0.73878413438797,
-0.754219651222229,
0.6784976720809937,
-0.005114576313644648,
1.2509335279464722,
0.09027659147977829,
0.4006474018096924,
0.10491588711738586,
0.34708651900291443,
0.25214123725891113,
0.5201945900917053,
0... |
def pagestats ( self, url ) : data = self. _ request ('/ api / pagestats ', locals ( ) ) return result ( json. loads ( data ) ) | [
-1.1722368001937866,
0.2849752902984619,
0.6367141008377075,
-0.61482834815979,
-0.0759352445602417,
-0.8275758028030396,
-1.2937263250350952,
-0.9647955894470215,
0.41665369272232056,
0.20701313018798828,
-0.6925061345100403,
0.49315497279167175,
-0.48893120884895325,
-0.06321693956851959... |
def detokenize ( integers ) : s = trax. data. detokenize ( integers, vocab _ dir ='vocab _ dir / ', vocab _ file ='summarize32k. subword. subwords') return wrapper. fill ( s ) | [
0.029758721590042114,
0.9407356977462769,
0.39930811524391174,
-0.5666003227233887,
-0.10942736268043518,
0.08738435059785843,
-0.11329465359449387,
0.4514971673488617,
-0.3784556984901428,
0.21134963631629944,
-0.8246219754219055,
-0.000665326020680368,
-0.2944462299346924,
-0.26806980371... |
def get _ wceff _ nunu ( q2, wc, par, b, m, nu1, nu2, scale ) : qiqj = meson _ quark [ ( b, m ) ] c = { } c ['7'] = 0 c ['7p'] = 0 c ['v'] = wc ['cl _'+ qiqj + nu1 + nu2 ] c ['vp'] = wc ['cr _'+ qiqj + nu1 + nu2 ] c ['a'] = - wc ['cl _'+ qiqj + nu1 + nu2 ] c ['ap'] = - wc ['cr _'+ qiqj + nu1 + nu2 ] c ['s'] = 0 c ['sp'... | [
-0.449782133102417,
-0.2928445637226105,
0.5125340819358826,
-0.9370219111442566,
-0.3385985791683197,
-0.03834892809391022,
-0.5082451701164246,
0.0836738869547844,
-0.8840054273605347,
0.2184676080942154,
-0.7061871290206909,
0.5914453864097595,
-0.6376237273216248,
-0.09662873297929764,... |
def make _ left _ df ( station, year ) : # leapyear bool lb = false if ( int ( year ) % 4 ) = = 0 : lb = true filename = get _ filename ( station, year, 1 ) first = pd. read _ csv ( filename, nrows = 41 ) data1 = first. iloc [ :, : 7 ] data1. iloc [ 9 ] [ 0 ] ='yyyy / / mm / / dd'for i in range ( 31 ) : data1. iloc [ 1... | [
0.0500597320497036,
0.17072831094264984,
0.9816687703132629,
-0.5693256855010986,
-0.3707522451877594,
0.8924001455307007,
0.004967329557985067,
-0.2280968725681305,
0.4930139482021332,
0.13461612164974213,
0.20147940516471863,
-0.1702936440706253,
0.7748396396636963,
-0.3091232478618622,
... |
def test _ cant _ get _ driver _ invalid _ request ( self ) : res = self. client. post ('/ driver / get') self. assertequal ( res. status _ code, 405 ) res = self. client. delete ('/ driver / get') self. assertequal ( res. status _ code, 405 ) res = self. client. put ('/ driver / get') self. assertequal ( res. status _... | [
-0.9407665133476257,
-0.2315293848514557,
0.7750645279884338,
0.3924373388290405,
0.6532450914382935,
0.21641960740089417,
-0.39917057752609253,
0.2147316187620163,
-0.14683650434017181,
-0.7227463126182556,
0.37100890278816223,
0.19808562099933624,
-0.3303559720516205,
0.179075688123703,
... |
def on _ landing ( self, request ) : self. mark _ viewed ( ) if hasattr ( self. person,'on _ landing') and hasattr ( self. person. on _ landing,'_ _ call _ _') : self. person. on _ landing ( request ) if self. job. content _ type is not none and \ hasattr ( self. job. group _ object,'on _ landing') and \ hasattr ( self... | [
0.24319201707839966,
-0.3731234073638916,
0.7130014300346375,
0.47702232003211975,
-0.4560605585575104,
-0.2781103253364563,
0.7265775203704834,
-0.6682074069976807,
-0.2839277982711792,
-0.6160484552383423,
0.5572816133499146,
-0.0018395879305899143,
-0.2987801432609558,
1.691451072692871... |
def ajax _ comment _ tags ( context ) : new _ context = {'static _ url': context. get ('static _ url ', none ),'use _ threadedcomments': appsettings. use _ threadedcomments, } # be configuration independent : if new _ context ['static _ url'] is none : try : request = context ['request'] except keyerror : new _ context... | [
-0.08848819136619568,
-0.4262751638889313,
0.6503614783287048,
-0.11060640960931778,
0.5939772129058838,
-0.6088161468505859,
-0.0065144565887749195,
-0.5618506073951721,
0.08639603853225708,
0.7091048359870911,
-0.35082560777664185,
-0.13113842904567719,
0.280277818441391,
0.8468026518821... |
async def update _ disabled _ commands _ profile ( self, profile : disabledcommandsprofile ) - > mythicresponse : url = " { } { } : { } / api / v { } / operations / disabled _ commands _ profile ". format ( self. _ http, self. server _ ip, self. _ server _ port, self. _ server _ api _ version ) data = { profile. name :... | [
-0.027888566255569458,
-0.3596208691596985,
0.8798015713691711,
-0.1335475742816925,
0.43845880031585693,
-0.3276178240776062,
0.08216839283704758,
-0.7300340533256531,
0.6547647714614868,
-0.10584267973899841,
-0.8091918230056763,
-0.3639569580554962,
-1.0138870477676392,
0.50653868913650... |
def make _ coverpage ( si, data _ d, start _ year, end _ year, s _ list, fname ) : tpage = " " " < p style = " font - size : 30px ; font - family : t ; " > < span style = " text - decoration : underline ; " > < strong > cumulative summary report < / strong > < / span > < / p > < p style = " font - size : 20px ; font - ... | [
0.4453669488430023,
0.8633944392204285,
1.5032813549041748,
-0.7095916271209717,
-1.1026020050048828,
1.0342433452606201,
-0.2134382128715515,
0.4897763133049011,
-0.7108426094055176,
0.8308109641075134,
0.578427791595459,
-0.8142227530479431,
0.6131982803344727,
0.20161442458629608,
0.4... |
def reddit ( bot, event, * args ) : results = requests. get ('https : / / api. reddit. com / search /? q = { query } & limit = 10 '. format ( query = parse. quote _ plus (''. join ( args ) ) ), headers = {'user - agent':'icbot v360. n0. sc0p3'} ) if results. status _ code! = 200 : bot. send _ message ( event. conv,'hmm... | [
-0.5037861466407776,
0.22081735730171204,
0.7549048066139221,
-0.45347124338150024,
1.1211645603179932,
0.5598388910293579,
-0.5031766891479492,
-0.7432129979133606,
-0.3097854256629944,
0.011070522479712963,
-0.1300869733095169,
0.18245115876197815,
-0.23528072237968445,
0.088225781917572... |
def find _ snowball _ sources ( ) : return sorted ( glob. glob ( os. path. join ( _ snowball _ dir,'*. sbl') ) ) | [
1.0308107137680054,
0.5529152154922485,
0.45299920439720154,
1.0703401565551758,
0.412672758102417,
0.8215871453285217,
1.1807044744491577,
-0.3608168065547943,
0.6072307825088501,
-0.09591928124427795,
-0.6850981116294861,
0.0064393565990030766,
0.040123920887708664,
0.9888386726379395,
... |
def make _ authorizer ( secret : optional [ str ] = none, algorithm : optional [ str ] = none ) - > callable [ [ dict ], dict ] : secret = secret if secret is not none else \ os. environ. get ( " jwt _ secret ", default _ jwt _ secret ) algorithm = algorithm if algorithm is not none \ else os. environ. get ( " jwt _ al... | [
0.5987606048583984,
0.30675363540649414,
0.7532488107681274,
-0.6059679985046387,
-1.261508822441101,
-0.8673376441001892,
-0.29387471079826355,
0.09294357150793076,
-0.22507409751415253,
0.1767590343952179,
-0.27926427125930786,
1.0028307437896729,
0.9119401574134827,
0.30577754974365234,... |
def close _ db ( ) : try : db. shutdown ( ) print ( " db shut down " ) except nameerror : print'could not shutdown neo4j database. ' | [
0.02210005559027195,
0.5059601664543152,
0.26942047476768494,
0.2206229418516159,
-0.0878475159406662,
0.37694501876831055,
-0.47991976141929626,
-0.7600406408309937,
-0.42838364839553833,
0.45722800493240356,
0.4158093333244324,
-0.23375800251960754,
-0.8850237131118774,
0.701157629489898... |
def test _ writer _ config _ change ( self ) - > none : self. _ insert _ row _ with _ id ( " first ", 3 ) self. _ insert _ row _ with _ id ( " second ", 5 ) # initial config has two writers id _ gen = self. _ create _ id _ generator ( " worker ", writers = [ " first ", " second " ] ) self. assertequal ( id _ gen. get _... | [
-0.4119083285331726,
0.12328736484050751,
0.6762698292732239,
0.0551147386431694,
0.29316574335098267,
-0.5495008230209351,
0.601068377494812,
-0.12350200861692429,
-0.24873150885105133,
0.2927771210670471,
-1.0307657718658447,
-0.6119024753570557,
-0.5834598541259766,
0.7301600575447083,
... |
def fat _ percentage ( bmi, age, sex ) : # f - % for adults if age > = 18 : fat _ percentage = 1. 2 * bmi + 0. 23 * age - 10. 8 * sex - 5. 4 else : # f - % for children fat _ percentage = 1. 51 * bmi - 0. 70 * age - 3. 6 * sex + 1. 4 return fat _ percentage | [
0.4569094479084015,
-0.41543450951576233,
0.6634148359298706,
0.24660776555538177,
-0.3247365355491638,
-0.1965578943490982,
-0.22787770628929138,
-0.2662786543369293,
-1.0639255046844482,
0.497519850730896,
0.07808233052492142,
-0.5290797352790833,
-0.23927439749240875,
-0.225987955927848... |
def testreloadpopulatessourcewriter ( self ) : gen = _ eventgenerator ( self ) acc = self. _ make _ accumulator ( gen ) gen. addevent ( event _ pb2. event ( wall _ time = 1, step = 2, source _ metadata = event _ pb2. sourcemetadata ( writer = " custom _ writer " ), ) ) acc. reload ( ) def _ die ( * args, * * kwargs ) :... | [
-0.1009470522403717,
0.18425244092941284,
0.5509040355682373,
0.3292219042778015,
0.30052274465560913,
-0.16963396966457367,
0.5332497358322144,
-0.28496983647346497,
0.18273308873176575,
-0.09668782353401184,
-0.3915615677833557,
-0.4238906502723694,
0.547997772693634,
0.13185404241085052... |
def test _ validate _ int _ good ( self ) : good _ int = 1 validated = helpers. validate _ int ( good _ int,'good _ int') self. assertequal ( validated, 1 ) good _ int = 35 validated = helpers. validate _ int ( good _ int,'good _ int') self. assertequal ( validated, 35 ) | [
-0.04265449196100235,
-0.35603776574134827,
0.3850771188735962,
-0.4396532475948334,
0.2820959985256195,
1.1686397790908813,
-0.3215773105621338,
-0.8408631682395935,
-0.6762905120849609,
-0.5292544960975647,
-0.3928980231285095,
0.26301872730255127,
0.2797483503818512,
0.26226454973220825... |
def create _ padded _ batch ( state, x, y, return _ dict = false ) : mx = state ['seqlen'] my = state ['seqlen'] if state ['trim _ batches'] : # similar length for all source sequences mx = numpy. minimum ( state ['seqlen'], max ( [ len ( xx ) for xx in x [ 0 ] ] ) ) + 1 # similar length for all target sequences my = n... | [
0.019976582378149033,
0.22030052542686462,
0.8849493861198425,
-0.8890751600265503,
-0.21320085227489471,
-0.4072463810443878,
-0.07693060487508774,
-0.5208309292793274,
0.4665932357311249,
0.7502654194831848,
-0.6208956837654114,
0.38710930943489075,
0.7162822484970093,
0.3311984837055206... |
def crossprod ( f, g ) : res = f. copy ( ) res. cross _ product ( g ) res. minimize ( ) return res | [
0.8006421327590942,
0.18495020270347595,
0.20060372352600098,
1.1183724403381348,
-0.46848058700561523,
-0.17187367379665375,
0.2994307577610016,
0.13673973083496094,
-0.19678586721420288,
0.9568941593170166,
0.5172475576400757,
0.16432124376296997,
-0.07739704102277756,
-1.288534760475158... |
async def create _ disabled _ commands _ profile ( self, profile : disabledcommandsprofile ) - > mythicresponse : url = " { } { } : { } / api / v { } / operations / disabled _ commands _ profile ". format ( self. _ http, self. server _ ip, self. _ server _ port, self. _ server _ api _ version ) data = { profile. name :... | [
0.17175686359405518,
-0.0838668942451477,
0.8584263920783997,
-0.02209177054464817,
0.6911945343017578,
-0.30929329991340637,
0.02724817954003811,
-0.8723711371421814,
0.6303022503852844,
-0.34308987855911255,
-0.6999096274375916,
-0.523071825504303,
-0.9682043790817261,
0.7076365947723389... |
def _ media ( suffix ) : if suffix : return u'% s % s'% ( settings. media _ url, suffix ) return'' | [
-0.04937180131673813,
-0.3186105489730835,
0.32903754711151123,
-0.16098907589912415,
-0.15148992836475372,
-0.2434607744216919,
-0.47204864025115967,
0.4627607464790344,
0.33068162202835083,
-0.4076038599014282,
0.5167964696884155,
0.6900631785392761,
0.4651997685432434,
0.621415734291076... |
def get ( id ) : print ( f'incoming param id { id }') return doc | [
0.02603139728307724,
-0.15703889727592468,
0.24692153930664062,
-0.6122260093688965,
-0.02264239639043808,
0.4076269268989563,
-0.386834055185318,
-0.5499110221862793,
-0.4742639660835266,
-0.31843021512031555,
0.8899329900741577,
1.3491533994674683,
-0.48512712121009827,
0.148626238107681... |
def div ( self, ft, gtype ='tri ', btype = 1 ) : if gtype = ='tri': if btype = = 2 : divf = ( 1 / self. vor _ sa ) * np. dot ( - self. delta _ tri _ 0. t, self. vor _ edge _ len * ft ) elif btype = = 1 : divfo = ( 1 / self. vor _ sa [ self. inner _ tvert _ i ] ) * np. dot ( self. delta _ vor _ 1, self. vor _ edge _ len... | [
0.36964648962020874,
0.2639070749282837,
0.7509724497795105,
0.05718346685171127,
-0.26657652854919434,
0.10725805163383484,
0.731473982334137,
-0.21159930527210236,
-0.5479174256324768,
-0.05846630781888962,
-0.011816419661045074,
0.7061910629272461,
-0.7736034989356995,
0.863378822803497... |
def parseargs ( argv, defaults, minargs = none, maxargs = none, presets = none ) : assert type ( argv ) = = list assert type ( defaults ) = = list assert minargs is none or type ( minargs ) in ( int, long ) and minargs > = 0 assert maxargs is none or type ( maxargs ) in ( int, long ) and maxargs > = minargs assert pres... | [
-1.1875232458114624,
0.0415472649037838,
0.8171483874320984,
-0.4998015761375427,
-0.36273398995399475,
-0.27074214816093445,
0.1173597052693367,
-0.3195284903049469,
-0.5957965850830078,
0.8485702276229858,
-0.421750009059906,
0.2993212938308716,
-0.010528432205319405,
0.5883648991584778,... |
def menu ( options ) : error _ invalid _ option = ('enter a value between 1 -'+ str ( len ( options ) ) + '.') acceptable _ answer _ range = range ( 1, ( len ( options ) + 1 ) ) selection _ chosen = false while not selection _ chosen : option _ number = 1 for option in options : print ( str ( option _ number ) +')'+ op... | [
-0.7764241695404053,
-0.24351295828819275,
0.732498049736023,
0.7341969609260559,
-0.35589876770973206,
0.47808876633644104,
1.1721376180648804,
-0.6466582417488098,
0.1121036633849144,
-0.3699364960193634,
0.3844050168991089,
0.17987242341041565,
-1.0871950387954712,
-0.2495926171541214,
... |
def get _ pubmed _ id _ for _ doc ( doc _ id ) : return doc _ id | [
1.2940489053726196,
-0.8890239000320435,
0.20811566710472107,
0.041340284049510956,
-0.17823795974254608,
0.2482028305530548,
-0.1378079652786255,
0.8843735456466675,
0.3559154272079468,
-0.2135838121175766,
0.8530454039573669,
0.41881632804870605,
0.17261669039726257,
0.9909769892692566,
... |
def _ extract _ response _ data ( response : response ) - > optional [ dict ] : try : # handles werkzeug. wrappers. response data = json. loads ( response. data. decode ('utf - 8') ) except attributeerror : # handles requests. response type data = response. json ( ) if not data : raise jsondatanotfound ('unable to find... | [
-0.23341375589370728,
-1.008204698562622,
0.4393259584903717,
-0.7212619781494141,
-0.40802761912345886,
-0.7057738900184631,
-0.18106049299240112,
-1.4036024808883667,
0.9447906017303467,
-0.09302397817373276,
-0.190161794424057,
-0.4396962821483612,
0.07800514250993729,
-0.37567237019538... |
def native _ step ( self ) - > float : return max ( self. entity _ description. native _ step _ fn ( self. actuator ), 1 ) | [
-0.048177942633628845,
0.32272088527679443,
0.17053698003292084,
1.2191779613494873,
-0.1482200026512146,
0.002536841668188572,
-0.44767916202545166,
0.09913129359483719,
-0.9043025970458984,
-0.7845811247825623,
0.18859392404556274,
0.17067912220954895,
0.13800662755966187,
0.783412516117... |
def add ( x, y ) : return str ( int ( x ) + int ( y ) ) # change string into integer | [
-0.5499506592750549,
-0.8049425482749939,
0.7451598644256592,
-1.2580294609069824,
-0.924292266368866,
0.8333588242530823,
-1.2884325981140137,
-1.4943923950195312,
0.14965222775936127,
0.4268876612186432,
0.8011358976364136,
0.6668472290039062,
-0.19034408032894135,
-0.7534826993942261,
... |
def owner _ teams ( self ) : url = self. _ data. get ('related ', { } ). get ('owner _ teams') return entitymanager ( self. _ tower, entity _ object ='team ', primary _ match _ field ='name ', url = url ) | [
0.35860687494277954,
0.16430912911891937,
0.3173849582672119,
0.10048002004623413,
0.04957829415798187,
0.049308329820632935,
-0.017145082354545593,
-0.31643912196159363,
-0.01378662046045065,
-1.485267162322998,
0.43382903933525085,
-0.5398844480514526,
0.6665135622024536,
-1.097689151763... |
def start _ spin ( ) : global spin _ thread spin _ thread = threading. thread ( target = _ spin ) spin _ thread. start ( ) | [
0.46341395378112793,
-0.55094313621521,
0.2060505449771881,
0.5533578395843506,
1.0475995540618896,
0.38542550802230835,
0.3221514821052551,
1.1569035053253174,
-0.2851608097553253,
-0.8238110542297363,
-0.24884752929210663,
1.4412647485733032,
-0.7937175035476685,
-0.30904391407966614,
... |
def load _ sst _ data ( self, path ) : data = [ ] def updatelang ( tokens ) : " " " a helper to update vocabulary dictionary. " " " for token in tokens : self. corpuslang. addword ( token ) with open ( path ) as f : text = f. read ( ). splitlines ( ) for i, line in enumerate ( text ) : text _ 1 = re. sub ( r'\ s * ( \ ... | [
-0.4120875597000122,
-0.4938594102859497,
0.8878955841064453,
-0.7656967639923096,
-0.9084619879722595,
0.44820165634155273,
-0.8549672365188599,
0.4207884967327118,
-1.097812533378601,
0.4672659635543823,
-0.7317362427711487,
-0.028871318325400352,
-0.4636075496673584,
-0.1289939433336258... |
async def test _ unlinked _ light2 ( hass : homeassistant, mqtt _ mock : mqttmockhaclient, setup _ tasmota ) - > none : config = copy. deepcopy ( default _ config ) config [ " rl " ] [ 0 ] = 1 config [ " rl " ] [ 1 ] = 1 config [ " rl " ] [ 2 ] = 2 config [ " rl " ] [ 3 ] = 2 config [ " lk " ] = 0 # rgb + white channel... | [
0.1607998162508011,
-0.3882487416267395,
0.2901454269886017,
-0.8718506097793579,
0.5071120858192444,
0.20980170369148254,
0.6025713086128235,
-0.09850618243217468,
0.3046093285083771,
-1.052655577659607,
-0.6914001703262329,
-0.1478927731513977,
0.0668155774474144,
0.9432207942008972,
-... |
def symbol _ to _ fsa ( sym ) : bfsa = hfst. hfstbasictransducer ( ) string _ pair _ path = ( ( sym, sym ) ) bfsa. disjunct ( string _ pair _ path, 0 ) fsa = hfst. fst ( bfsa ) return ( fsa ) | [
-0.5408766269683838,
-0.4431547224521637,
0.32735010981559753,
-0.27939340472221375,
-0.48223432898521423,
-1.9377886056900024,
0.8984317183494568,
-0.29583224654197693,
0.926150381565094,
-0.8111863732337952,
-0.3687081038951874,
-0.0632101446390152,
0.36945047974586487,
0.027894865721464... |
def duration _ list ( filename, user ) : durations = [ ] with open ( filename,'r') as f _ in : # set up csv reader object reader = csv. dictreader ( f _ in ) for row in reader : # for subscribers if row ['user _ type'] = ='subscriber'and user = ='subscriber': durations. append ( round ( float ( row ['duration'] ), 0 ) ... | [
0.3552801012992859,
-0.06090150028467178,
0.30996233224868774,
0.44693127274513245,
0.42511576414108276,
0.22678200900554657,
-0.5841224789619446,
0.8179163932800293,
-0.3699759840965271,
1.6187667846679688,
0.003082847688347101,
0.280909925699234,
0.39240872859954834,
1.6633069515228271,
... |
def get _ geometry ( self ) : geometry = none validation _ error = validationerror ('only one geometry allowed.') if self. geometry _ point : if geometry : raise validation _ error geometry = self. geometry _ point if self. geometry _ polygon : if geometry : raise validation _ error geometry = self. geometry _ polygon ... | [
0.513879656791687,
-0.1513410210609436,
0.429500550031662,
1.6015876531600952,
0.5968416333198547,
0.11920571327209473,
0.42182183265686035,
-0.34806519746780396,
0.26528650522232056,
-0.7333777546882629,
0.4776817560195923,
0.8355079889297485,
0.4359258711338043,
-0.1760300248861313,
0.... |
def calc _ topos _ impl ( t _ obs : np. ndarray, obsgeoloc : earthlocation ) - > np. ndarray : # compute the correction due to the observatory of obstime _ mjd and geoloc are passed # dq _ obs is the displacement from geocenter to the observatory # the observation times as skyfield time objects t _ obs _ jd = mjd _ to ... | [
-0.536003053188324,
0.5424399971961975,
0.8894497156143188,
-1.3151143789291382,
-0.33156996965408325,
0.37832483649253845,
0.25341981649398804,
0.14781101047992706,
0.18011794984340668,
0.5172426700592041,
0.1603413075208664,
-0.5444476008415222,
1.2864083051681519,
0.11876799911260605,
... |
def filepath _ to _ uri ( path ) : if path is none : return path # i know about ` os. sep ` and ` os. altsep ` but i want to leave # some flexibility for hardcoding separators. return urllib. quote ( str ( path ). replace ( b " \ \ ", b " / " ), safe = b " / ~! * ( )'" ) | [
-0.22601673007011414,
-0.3045448362827301,
0.4263872504234314,
-0.08982359617948532,
-0.12079265713691711,
-0.2939915060997009,
-0.26916590332984924,
0.7920929193496704,
-0.2565590739250183,
0.2132391333580017,
0.420660138130188,
-0.7760995030403137,
0.3388119041919708,
-0.5174689888954163... |
def delete ( self, obj ) : # override deleted _ object = objectrepository. delete ( self, obj ) if deleted _ object is none : return none if self. _ has _ store : try : deleted _ object. delete _ from ( self. _ store ) except : log. error ('exception writing deletion of % s to inventory store ', str ( obj ) ) raise ret... | [
0.28159278631210327,
-0.8467580676078796,
0.4787822663784027,
0.18308554589748383,
-0.09494981914758682,
0.1449425369501114,
0.4732784330844879,
-0.17060387134552002,
1.8122190237045288,
-0.14417648315429688,
-0.2594333291053772,
-0.19099168479442596,
-0.7667343020439148,
-0.65989536046981... |
def create _ file ( self, path, file _ data, overwrite ) : pass | [
-0.010539842769503593,
-0.7795579433441162,
0.2108144909143448,
0.5226790308952332,
1.3936595916748047,
0.7845401763916016,
-0.19196149706840515,
0.3562573790550232,
-1.5483921766281128,
-0.7843415141105652,
0.44924354553222656,
-0.6420880556106567,
-0.027256647124886513,
-0.26944676041603... |
def send _ message ( self, chat _ id, text, * * options ) : return self. api _ call ( " sendmessage ", chat _ id = chat _ id, text = text, * * options ) | [
-0.5900446772575378,
0.310174822807312,
0.1969403773546219,
0.8395636677742004,
0.11638575047254562,
-0.3579936921596527,
-1.6622203588485718,
-0.9950835704803467,
-0.4192172586917877,
0.4074030816555023,
0.07393502444028854,
0.6142720580101013,
-1.443914532661438,
0.8177111744880676,
-1... |
def close _ connection ( self ) : self. cursor. close ( ) self. conn. close ( ) | [
-0.06838379800319672,
-1.5568630695343018,
0.7387904524803162,
-0.08653330057859421,
0.10285326093435287,
0.6653110384941101,
-0.3742101788520813,
1.048842191696167,
-1.2701054811477661,
-0.3344380259513855,
0.6451060771942139,
0.15357337892055511,
-0.3841508626937866,
0.7953941822052002,
... |
def set _ scale ( self, value, field, * arguments, * * named ) : if isinstance ( value, ( int, long, float ) ) : value = ( value, value, value ) if 0. 0 in value : r = [ ] for i in value : if i = = 0 : r. append ( 1. 0e32 ) else : r. append ( 1. 0 / i ) self. range = r else : self. range = array ( ( 1. 0, 1. 0, 1. 0 ),... | [
-0.8971437215805054,
0.2009064108133316,
0.6949709057807922,
0.004475671332329512,
0.45075032114982605,
0.1886550486087799,
-0.2080165147781372,
-0.5399408340454102,
-0.4793410897254944,
0.6943227052688599,
-0.23094631731510162,
-0.3189604878425598,
-0.7799392342567444,
1.4203195571899414,... |
def get _ domain _ codes ( dl ) : uri _ regex = cfg. domain _ code _ regex dl = list ( filter ( lambda x : x is not none, dl ) ) dl = list ( filter ( lambda x : re. match ( uri _ regex, x ), dl ) ) dl = list ( map ( lambda x : re. match ( uri _ regex, x ) [ 0 ], dl ) ) dl = list ( map ( lambda x : cfg. domain _ namespa... | [
-0.44606178998947144,
0.2922278046607971,
0.5529640913009644,
0.14465118944644928,
0.2966054379940033,
-0.3132006824016571,
-0.4448694884777069,
0.8760017156600952,
1.133018136024475,
-0.612220048904419,
-0.3052702248096466,
0.5915529727935791,
0.08942854404449463,
1.1539723873138428,
0.... |
def get _ users ( self, uuid = none, * * kwargs ) : return self. request ('users ', uuid = uuid, * * kwargs ) | [
-1.4613983631134033,
0.4036691188812256,
0.24456796050071716,
0.8171607851982117,
0.581066906452179,
-0.523787796497345,
-1.0952939987182617,
0.44648170471191406,
0.022921567782759666,
-0.261392205953598,
-0.20435278117656708,
0.9075571298599243,
-0.9926179647445679,
-0.2036861628293991,
... |
def test _ nfc _ wps _ config _ token ( dev, apdev ) : ssid = " test - wps - nfc - conf - token " params = ap _ wps _ params ( ssid ) hapd = hostapd. add _ ap ( apdev [ 0 ], params ) logger. info ( " nfc configuration token from ap to station " ) conf = hapd. request ( " wps _ nfc _ config _ token ndef " ). rstrip ( ) ... | [
-0.29299452900886536,
0.1119086816906929,
0.49401986598968506,
-0.17972464859485626,
-0.0923580601811409,
0.15752267837524414,
0.10973652452230453,
0.2981075942516327,
-0.24655131995677948,
-0.2533985674381256,
-0.09027191996574402,
-0.10353779047727585,
0.5950084924697876,
0.4677744209766... |
def luma _ matrix _ horizontal _ size ( self, luma _ matrix _ horizontal _ size ) : # type : ( int ) - > none if luma _ matrix _ horizontal _ size is not none : if not isinstance ( luma _ matrix _ horizontal _ size, int ) : raise typeerror ( " invalid type for ` luma _ matrix _ horizontal _ size `, type has to be ` int... | [
0.4524541199207306,
0.009797495789825916,
-0.42817580699920654,
-0.12688864767551422,
-0.3536670506000519,
0.9801917672157288,
-0.539641261100769,
1.053366780281067,
-0.281335711479187,
-0.7050984501838684,
-0.13068217039108276,
-0.49614498019218445,
-0.6760809421539307,
-0.059822633862495... |
async def test _ sending _ mqtt _ commands _ rgbw _ legacy ( hass : homeassistant, mqtt _ mock : mqttmockhaclient, setup _ tasmota ) - > none : config = copy. deepcopy ( default _ config ) config [ " sw " ] = " 9. 4. 0. 3 " # rgbw support was added in 9. 4. 0. 4 config [ " rl " ] [ 0 ] = 2 config [ " lt _ st " ] = 4 # ... | [
0.5112714171409607,
-0.10417830944061279,
0.5931552648544312,
0.11063268035650253,
-0.21140693128108978,
0.694189190864563,
-0.31493180990219116,
-0.5061647891998291,
-0.1930038183927536,
0.05291461944580078,
-0.5137410759925842,
-0.12061116844415665,
0.1331055611371994,
0.9665799736976624... |
def module _ updater ( config ) : global new _ changes if config ['module _ updater'] : print ('- - > now checking module updates...') time. sleep ( 2. 5 ) requirements _ file = open ( config ['requirements _ file'],'r') # parse requirements file requirements = requirements _ file. readlines ( ) dependencies = [ ] for ... | [
-0.7311459183692932,
-0.735308051109314,
0.5947516560554504,
-0.06919047981500626,
-0.17321456968784332,
0.12292630970478058,
-0.1119123324751854,
0.5358047485351562,
-0.2744339406490326,
0.9466794729232788,
-0.1146741732954979,
-0.37857896089553833,
-0.367978572845459,
1.238884449005127,
... |
def start ( self ) : # start the bluetooth server and event loop ( note : this doesn't connect or pair ). self. _ bluetooth. start _ server ( ) main _ thread = thread ( target = self. _ main _ thread ) main _ thread. setdaemon ( true ) main _ thread. start ( ) | [
-0.1491001844406128,
-0.3988960385322571,
0.39899688959121704,
-0.03761822730302811,
0.8813210725784302,
0.23164702951908112,
-0.10858199745416641,
0.7914305329322815,
-0.19022823870182037,
-0.6122194528579712,
0.34118762612342834,
1.1415278911590576,
-0.8804113268852234,
0.254202514886856... |
def listen ( self ) : shutdown = { " count " : 0 } def _ stop _ handler ( _ signo, _ stack _ frame ) : logging. info ( " caught signal, shutting down at next opportunity " ) shutdown [ " count " ] + = 1 if shutdown [ " count " ] > 3 : logging. warning ( " caught % d signals, shutting down now ", shutdown [ " count " ] ... | [
0.40415820479393005,
-0.4837157726287842,
0.9372503757476807,
0.16302110254764557,
0.22827504575252533,
0.1250317543745041,
0.7279247641563416,
-0.020585250109434128,
-0.30998945236206055,
0.09838586300611496,
0.1325778365135193,
-0.5812978744506836,
-0.15255703032016754,
1.055382609367370... |
def g ( rep ) : if len ( rep ) > 1 : raise valueerror ( " warning : only the first slice will be returned. ", rep ) return graph ( rep ) [ 0 ] | [
-0.5719651579856873,
1.3996669054031372,
0.44203877449035645,
0.07894229888916016,
-0.5255568027496338,
-0.3727383017539978,
0.3522745966911316,
-0.11816879361867905,
0.2898712158203125,
1.3004834651947021,
0.39478927850723267,
0.5453293919563293,
-0.5262137651443481,
-1.1703565120697021,
... |
def _ _ init _ _ ( self, ax, label, valmin, valmax, valinit = 0. 5, valfmt ='% 1. 2f ', closedmin = true, closedmax = true, slidermin = none, slidermax = none, dragging = true, * * kwargs ) : axeswidget. _ _ init _ _ ( self, ax ) self. valmin = valmin self. valmax = valmax self. val = valinit self. valinit = valinit se... | [
0.875706672668457,
-0.3246820271015167,
0.7839470505714417,
-0.2190210223197937,
-0.9321427345275879,
0.5553666353225708,
-0.05876680836081505,
-0.49854207038879395,
-0.07102316617965698,
-0.7755677103996277,
-0.34540069103240967,
-0.3657865822315216,
0.49474120140075684,
-0.15137404203414... |
def file _ to _ png ( fp ) : import pil. image # pylint : disable = import - error with io. bytesio ( ) as dest : pil. image. open ( fp ). save ( dest, " png ", optimize = true ) return dest. getvalue ( ) | [
-0.3360988199710846,
0.20345281064510345,
0.36602210998535156,
-0.4361734390258789,
-0.3739321529865265,
-0.11986582726240158,
0.30061981081962585,
-0.3525782525539398,
-0.2183416783809662,
0.4155064821243286,
-1.0153414011001587,
-0.7969275712966919,
0.8999654054641724,
-0.331088155508041... |
def op _ d ( i, j ) : if j < i - 1 : d = 0. 0 elif j = = i - 1 : d = op0 ( i, j + 1 ) - op1 ( i, j + 1 ) elif j = = i : d = op0 ( i, j + 1 ) - op1 ( i, j + 1 ) + 2 * op1 ( i, j ) elif i = = 0 and j = = 1 : d = op0 ( i, j + 1 ) - op1 ( i, j + 1 ) + 2 * op1 ( i, j ) - 2 * op1 ( i, j - 1 ) elif j > = i + 1 : d = op0 ( i, ... | [
-0.2644095718860626,
0.3312116861343384,
0.944050133228302,
0.5213760137557983,
-0.8493785858154297,
0.07419776916503906,
1.8807259798049927,
-0.4038688540458679,
0.21400898694992065,
0.565962553024292,
0.36925965547561646,
-0.055306315422058105,
0.022523898631334305,
0.08071601390838623,
... |
def calc _ loss ( self, * args ) : raise notimplementederror | [
-0.7455107569694519,
0.1772703230381012,
0.4419822096824646,
0.5866988301277161,
0.5442872643470764,
0.327670156955719,
0.5928573608398438,
0.058415573090314865,
-0.4023837447166443,
-0.4741576015949249,
-0.5783388018608093,
-0.4096270203590393,
0.15891516208648682,
0.6886400580406189,
-... |
def home ( user _ name = none ) : shopping _ list = [ " cheese ", " tune ", " the " ] return render _ template ( " home. html ", name = user _ name, i = 1, shopping _ list = shopping _ list ) | [
-0.0197459626942873,
0.9969743490219116,
0.3322574198246002,
1.476165533065796,
-0.29848620295524597,
-0.012675642967224121,
0.37332916259765625,
0.7755251526832581,
0.49105051159858704,
1.1192644834518433,
-0.7707557678222656,
-0.35911861062049866,
-0.41785669326782227,
0.1999687701463699... |
def calc _ realmode _ reg ( self, model ) : bw = model. vars. bandwidth _ actual. value # discovered that if rx signal fits into the adc bandwidth we get better # performance with real mode. so check if channel bandwidth is less than # 1 mhz and choose real mode else choose default complex mode. if bw < 1e6 : realmode ... | [
-0.22226546704769135,
0.19907310605049133,
0.6235140562057495,
0.3176724910736084,
0.544816255569458,
-0.1511564999818802,
0.5430362224578857,
-0.0772944986820221,
0.2928754985332489,
0.2287309318780899,
-0.07634855806827545,
-0.03366699069738388,
-0.7939549684524536,
0.39603009819984436,
... |
async def get _ file _ keys ( self ) - > t. list [ str ] : file _ keys = [ ] for ( _, _, filenames ) in os. walk ( self. media _ path ) : file _ keys. extend ( filenames ) break return file _ keys | [
-0.6920083165168762,
-0.6069087982177734,
0.45283961296081543,
0.5618541836738586,
0.5045331120491028,
-0.11173519492149353,
-0.06158972531557083,
0.5163299441337585,
-0.685916006565094,
0.4667644500732422,
-0.01159917376935482,
0.6918106079101562,
-0.6877225637435913,
0.6516078114509583,
... |
def test _ idtoken _ token _ at _ hash ( self ) : data = {'client _ id': self. client. client _ id,'redirect _ uri': self. client. default _ redirect _ uri,'response _ type': next ( self. client. response _ type _ values ( ) ),'scope':'openid email ','state': self. state,'nonce': self. nonce,'allow':'accept ', } respon... | [
-0.1757618635892868,
-0.3177120089530945,
0.5934979319572449,
-0.5138031244277954,
0.4463179111480713,
0.3567153513431549,
-0.5177115797996521,
-0.46941307187080383,
-0.10003361105918884,
-1.1597386598587036,
-1.010972023010254,
0.4268733263015747,
0.27275633811950684,
-0.7513001561164856,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.