text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def morris _ sensitivities ( fun, variable, ntrajectories, nlevels = 4 ) : nvars = variable. num _ vars ( ) icdfs = [ v. ppf for v in variable. marginals ( ) ] samples = get _ morris _ samples ( nvars, nlevels, ntrajectories, icdfs = icdfs ) values = fun ( samples ) elem _ effects = get _ morris _ elementary _ effects ... | [
-0.19945503771305084,
-0.5628620982170105,
0.32568225264549255,
0.2838008999824524,
-0.5193523168563843,
-0.8890552520751953,
0.445683091878891,
-0.3554095923900604,
0.47839388251304626,
0.5334990620613098,
-0.3468360900878906,
0.324599027633667,
0.0605824813246727,
0.32974934577941895,
... |
def fixed _ ip _ bulk _ create ( context, ips ) : return impl. fixed _ ip _ bulk _ create ( context, ips ) | [
-1.480041742324829,
0.32928726077079773,
0.22717365622520447,
1.0065767765045166,
0.7782691121101379,
-0.16847701370716095,
0.17891918122768402,
-0.31719160079956055,
0.5435774326324463,
0.08030473440885544,
-0.5541013479232788,
-0.7874796390533447,
-0.12455762177705765,
-0.348619550466537... |
def writeeventlogprovider ( self, log _ source ) : output _ filename = f'provider - { log _ source : s } '. replace ('','-'). replace ('/ ','-') self. _ file _ object. write ( f'{ log _ source : s } < { output _ filename : s } > \ n') | [
-0.7328220009803772,
-0.04674995690584183,
0.4861162006855011,
-0.19641068577766418,
-0.1902424395084381,
0.2863534986972809,
0.8652285933494568,
0.7467936873435974,
0.1784888654947281,
0.149427592754364,
-0.2976364195346832,
0.49679312109947205,
0.7032767534255981,
0.09792497754096985,
... |
def application ( self ) : return self ['application'] | [
-0.06741727888584137,
-0.7539705634117126,
0.0829094797372818,
0.16973541676998138,
-0.23531299829483032,
1.111257791519165,
0.4345442056655884,
-0.2997344732284546,
0.8692706227302551,
0.19676510989665985,
0.3184068500995636,
0.1278008669614792,
0.5507842302322388,
0.10285316407680511,
... |
def gf _ multi _ eval ( f, a, p ) : return [ gf _ eval ( f, a, p ) for a in a ] | [
0.09627444297075272,
-0.12837354838848114,
0.4927498400211334,
0.09813497215509415,
0.8346838355064392,
0.17196281254291534,
-0.9783838391304016,
1.2933589220046997,
-0.7402434349060059,
0.6505324244499207,
0.06837315112352371,
-0.3513830900192261,
0.34961846470832825,
0.6212103962898254,
... |
def create _ readermt ( cfg, max _ iter = 0 ) : if not isinstance ( cfg, dict ) : raise typeerror ( " the config should be a dict when creating reader. " ) # synchornize use _ fine _ grained _ loss / num _ classes from global _ cfg to reader cfg reader = readermt ( * * cfg ) ( ) num _ classes = reader. num _ classes nu... | [
-0.4228454530239105,
-0.0350029431283474,
0.5858929753303528,
0.02275131270289421,
-0.5310587286949158,
-0.2573227286338806,
-0.1289563924074173,
0.052885085344314575,
-0.9203619956970215,
0.4656939208507538,
0.6638954281806946,
-0.5725666880607605,
-0.08987187594175339,
0.3162128031253814... |
def wait _ time ( self ) : return self. account _ wait [ self. account _ type ] | [
-0.38727864623069763,
0.1111329048871994,
0.42444610595703125,
0.2178194373846054,
0.4496890902519226,
0.8937100172042847,
0.5487192869186401,
-0.5014584064483643,
-0.1418580710887909,
0.5852106809616089,
-0.07863400876522064,
0.3725794851779938,
-0.13622590899467468,
-0.23367956280708313,... |
def _ _ cmp _ match ( self, match _ container, idx1, idx2 ) : # check if 2 match tuples don't intersect in their groups match _ t1, match _ t2 = match _ container [ idx1 ], match _ container [ idx2 ] if self. _ _ disjoint _ match ( match _ t1. spans, match _ t2. spans ) : # return 0 if yes, which means that both groups... | [
-0.15831799805164337,
-0.17108824849128723,
1.0811372995376587,
-0.6841862797737122,
-0.30907154083251953,
-0.06467006355524063,
0.5878811478614807,
-0.14807428419589996,
-0.9158198833465576,
0.17202673852443695,
0.5083972215652466,
-0.3153875768184662,
-0.5808017253875732,
-0.630608558654... |
async def teen _ pic ( self, ctx, state = " new " ) : post = await self. nudes ( " legalteens ", state ) await ctx. embed ( title = post [ " title " ], color = 0xf4428f, image = post [ " url " ], footer _ default = true ) | [
0.2433103621006012,
0.6235097050666809,
0.4716966152191162,
-0.813294529914856,
0.06342402845621109,
1.1683510541915894,
-0.6529719829559326,
0.12138926982879639,
-0.08947141468524933,
0.07840093225240707,
-1.3319649696350098,
0.6262805461883545,
0.6751990914344788,
-0.10379360616207123,
... |
def feet2m ( lengthfeet ) : return lengthfeet * 0. 3048 | [
0.058547697961330414,
-0.08150319010019302,
0.23250283300876617,
-0.28685125708580017,
0.4590410888195038,
-0.21015693247318268,
-0.65016770362854,
0.06966884434223175,
0.45007404685020447,
-0.7857537269592285,
-0.2077087163925171,
-0.07003393024206161,
0.013624059967696667,
0.814464986324... |
def get _ test _ examples ( self, data _ dir ) : raise notimplementederror ( ) | [
-0.18210339546203613,
0.1552765816450119,
0.39903488755226135,
0.0880892276763916,
0.6423447728157043,
0.5206878185272217,
0.40323805809020996,
0.36005261540412903,
0.4172298014163971,
-0.4158848524093628,
-0.8133530020713806,
0.824962317943573,
0.1507297307252884,
0.4950193464756012,
-1... |
def _ _ init _ _ ( _ _ self _ _, *, daily _ recurrence _ time : pulumi. input [ str ], notification _ settings : pulumi. input ['globalvmshutdownschedulenotificationsettingsargs'], timezone : pulumi. input [ str ], virtual _ machine _ id : pulumi. input [ str ], enabled : optional [ pulumi. input [ bool ] ] = none, loc... | [
-0.5262191891670227,
0.893683671951294,
0.8060606122016907,
0.5832237005233765,
0.6839847564697266,
0.3775698244571686,
-0.4000738859176636,
0.9305640459060669,
-0.00097433797782287,
0.9270732402801514,
-0.7509220242500305,
0.2798002362251282,
0.08985404670238495,
-0.6306610107421875,
-0... |
def provider _ fw _ rule _ create ( context, rule ) : return impl. provider _ fw _ rule _ create ( context, rule ) | [
0.00350135937333107,
0.9341406226158142,
0.2268303781747818,
-0.0032666539773344994,
1.0299668312072754,
0.5549201965332031,
0.28546416759490967,
-0.3844330906867981,
0.5110730528831482,
-0.23103764653205872,
0.3800657391548157,
0.09640739113092422,
-0.38209494948387146,
0.3882002532482147... |
def masked _ softmax _ cross _ entropy ( preds, labels, mask ) : loss = tf. nn. softmax _ cross _ entropy _ with _ logits ( logits = preds, labels = labels ) mask = tf. cast ( mask, dtype = tf. float32 ) mask / = tf. reduce _ mean ( mask ) loss * = mask return tf. reduce _ mean ( loss ) | [
-0.5575032234191895,
-0.46799319982528687,
0.28394678235054016,
1.185827612876892,
-0.5369024872779846,
-0.09191809594631195,
-0.1942041665315628,
0.07439492642879486,
-0.17713916301727295,
1.3222497701644897,
0.5460760593414307,
0.3377283215522766,
0.14198827743530273,
-1.0600628852844238... |
def disjoint _ boxes _ mask ( a : tensor, b : tensor ) - > tensor : return ( ( b [ :, :, 1 ] < = a [ :, :, 0 ] ) | ( b [ :, :, 0 ] > = a [ :, :, 1 ] ) ). any ( dim = - 1 ) | [
-0.5296506881713867,
-0.17642807960510254,
0.9362245798110962,
0.7490481734275818,
-0.045382604002952576,
0.20822730660438538,
0.27451926469802856,
-0.35201436281204224,
-0.49403175711631775,
0.44682034850120544,
-0.21549935638904572,
-0.22106459736824036,
-0.03897742182016373,
-0.74304407... |
def test _ generate _ empty _ http ( self ) : cpe _ string = b'' server = serverbase ( self. app ) ctx = methodcontext ( server, methodcontext. server ) ctx. in _ string = [ cpe _ string ] ctx, = server. generate _ contexts ( ctx ) server. get _ in _ object ( ctx ) if ctx. in _ error is not none : raise ctx. in _ error... | [
-0.18017563223838806,
0.22154052555561066,
0.46386831998825073,
-0.05070404335856438,
0.18365733325481415,
0.9462709426879883,
0.31896331906318665,
-0.2838202714920044,
-0.38199684023857117,
-0.4166838824748993,
0.1295347660779953,
0.21568694710731506,
-0.4556434750556946,
-0.3063664436340... |
def is _ fill _ compute _ el ( obj ) : return ( hasattr ( obj, " fill " ) and hasattr ( obj, " compute " ) and callable ( obj. fill ) and callable ( obj. compute ) ) | [
0.1791020929813385,
0.21841834485530853,
0.46203839778900146,
0.31778189539909363,
-0.2448425441980362,
0.5041450262069702,
0.39327219128608704,
-0.5505728721618652,
1.209289789199829,
-0.11243785172700882,
-0.6264021992683411,
-0.29383227229118347,
0.6790663003921509,
1.7968246936798096,
... |
def get _ hash _ id ( self ) : return self. hash _ id | [
1.7494882345199585,
-0.6140657663345337,
0.508177638053894,
0.9896671772003174,
0.5916892290115356,
1.8510966300964355,
0.34278321266174316,
0.2760574221611023,
0.13622742891311646,
-1.079052448272705,
0.3253285884857178,
1.0367748737335205,
-0.8714076280593872,
-0.5267218351364136,
0.75... |
def update _ block _ locations ( self, top _ left : tuple [ float, float ], size : float ) - > none : if len ( self. children ) = = 0 : self. size = size self. position = top _ left else : self. size = size self. position = top _ left self. update _ child _ block _ locations ( top _ left, round ( size / 2. 0 ) ) | [
-0.5742019414901733,
-0.782562792301178,
0.4423031210899353,
0.2264590710401535,
-0.17314378917217255,
0.25386714935302734,
0.6783140301704407,
-0.692291259765625,
-0.19551579654216766,
-0.3649851679801941,
-0.35425886511802673,
-0.3023805618286133,
-0.21057142317295074,
1.4133716821670532... |
def add _ comma ( number : any, convert = false ) - > str : if convert : number = english _ to _ nepali ( number ) else : number = str ( number ) number _ with _ comma = [ ] counter = 0 for nepali _ number _ char in list ( str ( number ) ) [ : : - 1 ] : if counter = = 3 or ( counter! = 1 and ( counter - 1 ) % 2 = = 0 )... | [
-1.2469524145126343,
0.4399784505367279,
1.04475736618042,
0.2958867847919464,
0.04712904244661331,
0.5310445427894592,
-0.8037609457969666,
-0.005689372308552265,
1.0945850610733032,
-0.05340765044093132,
0.8979458212852478,
-0.2652522921562195,
-0.5752758979797363,
-0.12998603284358978,
... |
def _ get _ qtr ( datetime _ in ) : try : return int ( ( datetime _ in. month - 1 ) / 3 ) + 1 except attributeerror : pass return int ( ( datetime _ in - 1 ) / 3 ) + 1 | [
-0.5135757923126221,
0.4107590615749359,
0.43805673718452454,
-0.05537205561995506,
-0.5727946758270264,
0.16869764029979706,
0.19528353214263916,
-0.39420977234840393,
-0.13825573027133942,
-0.40184640884399414,
0.4211549162864685,
-0.7904742360115051,
-0.3177978992462158,
-0.389767616987... |
def on _ append _ clicked ( self ) : # todo : not implemented yet def testconnection ( ip, port, service _ name ) : url _ origin = u'http : / /'+ ip + u':'+ port + u'/ ws - gateway / gateway / ws /'+ service _ name + '? wsdl'url = str ( url _ origin ) auth = httpauthenticated ( username ='administrator ', password ='qu... | [
-0.14369283616542816,
0.15588223934173584,
0.7245494723320007,
-0.30247989296913147,
-0.9399408102035522,
-0.42006006836891174,
0.24482616782188416,
-1.1598902940750122,
0.17269226908683777,
-0.45207566022872925,
0.25075268745422363,
0.08856508880853653,
-0.6181544661521912,
1.026684880256... |
def create _ plates ( model : any, key : str, is _ stress : bool ) - > dict [ str, any ] : if is _ stress : plates = [ model. ctria3 _ stress, model. cquad4 _ stress, model. ctria6 _ stress, model. cquad8 _ stress, model. ctriar _ stress, model. cquadr _ stress, ] else : plates = [ model. ctria3 _ strain, model. cquad4... | [
-0.2067180722951889,
-0.020602578297257423,
0.6980894207954407,
0.42076948285102844,
0.18832015991210938,
0.4680308997631073,
0.6874098181724548,
-0.7381874322891235,
-0.009343959391117096,
1.1429041624069214,
-0.181465744972229,
-0.9020730257034302,
-0.12681356072425842,
0.630845844745636... |
def refresh _ source ( self, ldf ) : if ( ldf is not none ) : from lux. processor. parser import parser from lux. processor. validator import validator from lux. processor. compiler import compiler self. _ source = ldf self. _ source. maintain _ metadata ( ) if len ( self. _ input _ lst ) > 0 : if ( self. _ is _ vis _ ... | [
-0.3197753429412842,
-0.25812581181526184,
0.3691662847995758,
0.0836697667837143,
0.13748100399971008,
-0.05841623246669769,
0.24097637832164764,
0.2463659793138504,
0.4121808111667633,
-0.21534259617328644,
-0.44420522451400757,
1.0823898315429688,
-0.6847686171531677,
0.9558601379394531... |
def instance _ type _ access _ remove ( context, flavor _ id, project _ id ) : return impl. instance _ type _ access _ remove ( context, flavor _ id, project _ id ) | [
-0.8307797312736511,
0.08613145351409912,
0.5965808033943176,
0.03406298905611038,
-0.3832755386829376,
-0.06291116774082184,
1.0910135507583618,
-0.12167677283287048,
-0.7658289670944214,
0.7867506146430969,
0.5671294927597046,
1.2825947999954224,
-1.1747617721557617,
-0.15008936822414398... |
def fprop ( self, inputs : jtensor, paddings : jtensor = none ) - > jtensor : # pytype : disable = annotation - type - mismatch # jax - ndarray p = self. params theta = self. local _ theta ( ) # assume output _ dims = = input _ dims output _ dims = p. input _ dims fprop _ dtype = self. fprop _ dtype # consistent with g... | [
-0.13923567533493042,
0.39307448267936707,
0.7508865594863892,
0.3089917302131653,
-0.6462154984474182,
-0.4143292307853699,
0.7094616889953613,
-0.3418538272380829,
0.18343906104564667,
0.19180171191692352,
0.6775054931640625,
0.36745017766952515,
-0.10848230123519897,
-0.3748852610588074... |
def transcribe _ file ( speech _ file ) : from google. cloud import speech from google. cloud. speech import enums from google. cloud. speech import types client = speech. speechclient ( ) # [ start migration _ sync _ request ] # [ start migration _ audio _ config _ file ] with io. open ( speech _ file,'rb') as audio _... | [
0.5852593779563904,
0.1801324486732483,
0.7096290588378906,
0.3871948719024658,
0.39135506749153137,
0.02250566892325878,
-0.03731638938188553,
-0.33136293292045593,
-0.9642704129219055,
0.9750604033470154,
-0.960944414138794,
0.38819894194602966,
0.34680041670799255,
0.4015536606311798,
... |
def _ _ init _ _ ( self, account _ id = none, password = none ) : self. account _ id = account _ id self. password = password | [
1.1936293840408325,
-1.0841755867004395,
0.47815585136413574,
0.7847516536712646,
0.5395310521125793,
-0.5335709452629089,
-0.5950161814689636,
1.0306731462478638,
0.8580014705657959,
-0.302257239818573,
0.13746033608913422,
0.9353823065757751,
0.08772692084312439,
0.7664981484413147,
0.... |
def async _ get _ options _ flow ( config _ entry : config _ entries. configentry, ) - > config _ entries. optionsflow : return optionsflowhandler ( config _ entry ) | [
0.8237225413322449,
-0.1764805018901825,
0.08298148214817047,
0.2939814627170563,
0.8359178304672241,
-0.18074271082878113,
0.19074997305870056,
-0.07767892628908157,
0.7843726277351379,
-0.14080822467803955,
0.7145901322364807,
0.5017719864845276,
0.4540155231952667,
-0.19984205067157745,... |
def wolf _ appear ( cb _ settings, screen, wolf _ pack ) : if random. randint ( 0, 10000 ) = = 27 : # 1 in 500 chance of wolf appearing wolf = wolf ( cb _ settings, screen ) wolf _ pack. add ( wolf ) | [
-0.5096114873886108,
0.0073320562951266766,
0.36299923062324524,
0.38411766290664673,
0.6033069491386414,
0.08701702952384949,
-0.19516636431217194,
0.39691153168678284,
1.1203337907791138,
0.18479162454605103,
-0.3704022765159607,
0.4783577620983124,
-1.01095712184906,
1.13504159450531,
... |
def test _ func1 _ with _ return ( self ) : def func ( ) : for i in range ( 10 ) : for j in range ( 20 ) : return i * * j self. _ test _ func ( func, 2 ) | [
-0.2792336642742157,
0.18126974999904633,
0.3748447299003601,
0.4516490399837494,
-0.12843887507915497,
-0.7912583351135254,
1.3973259925842285,
-0.09261113405227661,
-0.439932644367218,
-0.2505936920642853,
-0.673903226852417,
-0.32430654764175415,
0.019782574847340584,
-0.283572882413864... |
def get _ current _ assignments ( self ) : today = date. today ( ) return assignment. objects. filter ( class _ key _ id = self. id, start _ date _ _ lte = today, end _ date _ _ gte = today ). all ( ) | [
-1.733406901359558,
-1.2170259952545166,
0.7307649254798889,
0.8069392442703247,
-0.1817452609539032,
0.4880342483520508,
0.31619638204574585,
-0.23877693712711334,
-1.7921173572540283,
0.4214760363101959,
0.8042925596237183,
0.15328457951545715,
-0.1501329094171524,
0.6964676380157471,
... |
def checkio ( nums : list ) : if not all ( isinstance ( num, int ) for num in nums ) : return elif not nums : return 0 if len ( nums ) > 20 : return if not all ( - 100 < x < 100 for x in nums ) : return sum _ selected _ numbres = sum ( num for i, num in enumerate ( nums ) if i % 2 = = 0 ) return sum _ selected _ numbre... | [
-0.6776732206344604,
0.5833243727684021,
0.7533438801765442,
0.020740922540426254,
0.3900332450866699,
-0.29205235838890076,
0.8262186646461487,
-0.15704646706581116,
0.4691442549228668,
-0.07729317247867584,
-0.2561582922935486,
0.09420014172792435,
-0.7780795693397522,
0.2852075695991516... |
def pexpect ( self ) : import pexpect assert not self. _ ignore _ errors _ check _ directory ( self. directory ) arguments = self. arguments return pexpect. spawn ( arguments [ 0 ], args = arguments [ 1 : ], env = self. env, cwd = self. directory ) | [
0.3605509102344513,
-0.08852779120206833,
0.4812692105770111,
-0.4540254771709442,
0.6909055113792419,
0.5819571614265442,
0.05598923936486244,
0.2882559895515442,
0.1536361426115036,
-0.21653419733047485,
0.9109292030334473,
0.2561638653278351,
-0.7826319932937622,
-0.15694721043109894,
... |
def test _ create _ user _ valid ( self ) : user _ count = user. objects. all ( ). count ( ) user. objects. create _ user ( * * newuser _ valid ) self. assertequal ( user. objects. all ( ). count ( ), user _ count + 1 ) | [
0.2196401059627533,
0.5872511863708496,
0.251286119222641,
1.5425524711608887,
0.770390510559082,
1.4084450006484985,
0.4255105257034302,
0.4827718138694763,
-0.5364872813224792,
-0.78338623046875,
-1.0815316438674927,
-1.5997750759124756,
0.3275340497493744,
0.12068863958120346,
0.57570... |
def get _ frequencies ( bands, src ) : freq = dict ( ) for i in range ( len ( bands ) ) : freq [ i ] = 0 tuples = src. getpointdata ( ). getscalars ( ). getnumberoftuples ( ) for i in range ( tuples ) : x = src. getpointdata ( ). getscalars ( ). gettuple1 ( i ) for j in range ( len ( bands ) ) : if x < = bands [ j ] [ ... | [
-0.19034980237483978,
0.5638570189476013,
0.5835460424423218,
-0.03195955604314804,
-0.6588821411132812,
-0.06776183843612671,
0.25368615984916687,
-1.011134147644043,
-0.6792345643043518,
-0.19465939700603485,
-0.8163257837295532,
-0.5347962975502014,
0.30570363998413086,
0.11841028928756... |
def configure _ datasets ( self ) : if self. dataset = = " blat _ ecolx " : self. alignment _ file = self. working _ dir + " / alignments / blat _ ecolx _ hmmerbit _ plmc _ n5 _ m30 _ f50 _ t0. 2 _ r24 - 286 _ id100 _ b105. a2m " self. theta = 0. 2 elif self. dataset = = " pabp _ yeast " : self. alignment _ file = self... | [
-0.7212647795677185,
-0.5818642973899841,
0.6407053470611572,
-0.624479353427887,
-0.004428177606314421,
0.40853726863861084,
0.24726341664791107,
0.4578321576118469,
-0.26439812779426575,
0.03143928945064545,
-0.027225449681282043,
0.2661840319633484,
-0.1597035825252533,
0.31070229411125... |
def provider _ fw _ rule _ destroy ( context, rule _ id ) : return impl. provider _ fw _ rule _ destroy ( context, rule _ id ) | [
-0.2868303060531616,
0.22678153216838837,
0.11386280506849289,
-0.22719094157218933,
0.922576904296875,
-0.2052597552537918,
0.14811749756336212,
0.14733147621154785,
0.7165235877037048,
0.47723260521888733,
0.8292352557182312,
0.6488154530525208,
-0.41153648495674133,
0.8760292530059814,
... |
def get _ models _ from _ disk ( ) : try : print ( " > > > retrieving models from disk... " ) model _ train _ textonly = load _ model ('model _ train _ textonly. h5') model _ train _ vqa = load _ model ('model _ train _ vqa. h5') model _ encoder _ text _ only = load _ model ('model _ encoder _ text _ only. h5') model _... | [
-0.8574487566947937,
-0.11226622015237808,
0.35397282242774963,
0.7387693524360657,
0.49634861946105957,
0.814466118812561,
0.35340791940689087,
-0.9123960733413696,
-0.48769065737724304,
0.24447572231292725,
-1.1870229244232178,
-0.03459227830171585,
0.09988413006067276,
0.471631377935409... |
def test _ calcrule _ 34 ( ) : loss _ in = np. array ( [ 0., 10., 20., 30., 40., 50., 60. ] ) deductible = np. ones _ like ( loss _ in ) * 5 over _ limit = np. ones _ like ( loss _ in ) * 5 under _ limit = np. ones _ like ( loss _ in ) * 5 loss _ out = np. empty _ like ( loss _ in ) policy = np. array ( [ ( 0, 34, 15, ... | [
0.4388315975666046,
0.143185093998909,
0.9860286712646484,
-0.4977400004863739,
0.14354653656482697,
0.3104223906993866,
0.5327377915382385,
-0.6484530568122864,
0.16525909304618835,
-0.10577813535928726,
-0.33317840099334717,
0.3893629312515259,
-0.18407441675662994,
-0.48617950081825256,... |
def test _ multiple _ occurence ( ) : stack = stack ( ) stack. stack _ list = np. array ( [ 3, 3, 3 ], dtype = dtype ) assert stack. mixed _ can _ be _ palindrome ( ) | [
0.3182385265827179,
0.8229227662086487,
0.520400881767273,
1.0584039688110352,
1.2991223335266113,
0.31595608592033386,
0.7984733581542969,
0.7927573919296265,
-0.17883437871932983,
-0.36521264910697937,
-1.0174063444137573,
-1.0694317817687988,
-1.0036966800689697,
1.014155387878418,
0.... |
def process _ song _ data ( spark, input _ data, output _ data ) : # get filepath to song data file song _ data = input _ data +'song _ data / * / * / * / *. json'# read song data file song _ data _ df = spark. read. json ( song _ data ) song _ data _ df = song _ data _ df. dropduplicates ( ) song _ data _ df. createor... | [
0.4690078794956207,
-0.13033615052700043,
0.8085540533065796,
-0.1629333347082138,
0.1355360597372055,
0.6785939335823059,
0.7587018609046936,
0.4334188401699066,
-0.4368743598461151,
-0.1127779483795166,
-0.11466563493013382,
0.10851476341485977,
0.8411922454833984,
-0.1532275676727295,
... |
def sling _ servlet _ extensions ( self ) - > confignodepropertystring : return self. _ sling _ servlet _ extensions | [
1.5446357727050781,
0.2003217339515686,
0.08363490551710129,
0.8761366605758667,
-0.4440460205078125,
1.2572121620178223,
0.005224865861237049,
-0.6016626954078674,
1.7746782302856445,
-0.19192826747894287,
-0.7666739225387573,
-0.07329820841550827,
0.035826414823532104,
-0.144555121660232... |
def generate _ index _ dict ( item _ list, start _ index = 1 ) : index _ dict = { } index = start _ index # default starts from 1. for item in item _ list : if item not in index _ dict : index _ dict [ item ] = index index + = 1 return index _ dict | [
-1.2017195224761963,
-0.009593378752470016,
0.2542584240436554,
-0.04284098371863365,
-0.36089202761650085,
-0.07426725327968597,
1.2486250400543213,
1.0865048170089722,
-0.37330612540245056,
0.11609843373298645,
-2.1069247722625732,
-0.3118906021118164,
-0.1590200513601303,
-0.30422720313... |
def condense _ data ( in _ file, out _ file, city ) : with open ( out _ file,'w') as f _ out, open ( in _ file,'r') as f _ in : # set up csv dictwriter object - writer requires column names for the # first row as the " fieldnames " argument out _ colnames = ['duration ','month ','hour ','day _ of _ week ','user _ type'... | [
-0.03850036859512329,
-0.6751633882522583,
0.6499438881874084,
-0.3724239468574524,
-0.31350451707839966,
0.26692137122154236,
-0.014872580766677856,
0.5606582760810852,
-0.5258045196533203,
0.03461674228310585,
-0.06083693355321884,
0.4867773950099945,
0.904633641242981,
-0.21360284090042... |
def plot _ mc _ truth ( axis, mc _ model, decay = false ) : if decay : norm = mc _ model ['tau'] ['value'] else : norm = mc _ model ['sigmav'] ['value'] mass = mc _ model ['mass'] ['value'] axis. scatter ( [ mass ], [ norm ] ) | [
0.15124648809432983,
-0.45704036951065063,
0.38403019309043884,
-0.06178637966513634,
-1.5158100128173828,
1.0996417999267578,
-0.19869494438171387,
0.4364531934261322,
-0.44765231013298035,
0.04638347402215004,
0.5788217782974243,
0.7872750759124756,
-0.8378622531890869,
0.546006619930267... |
def close ( self ) : raise notimplementederror ( " method'close ( )'not implemented. " ) | [
-0.4292365312576294,
-0.5261958241462708,
0.45864760875701904,
0.38750845193862915,
-0.7271078824996948,
1.8610903024673462,
0.7785620093345642,
-0.22246795892715454,
-0.782069742679596,
-1.0594635009765625,
0.5056365132331848,
0.24408064782619476,
0.08383771777153015,
0.8401020169258118,
... |
def desired _ sensors ( sensor _ d, sensor _ l ) : newl = [ ] for i in sensor _ l : if'flag'in i : continue # elif'temperature'in i : # continue elif'original'in i : break else : yrs = sensor _ d [ i ] [ 2 ] if len ( yrs ) > 2 : newl. append ( i ) # remove unwanted temperature tfound = false for j in newl : if'temperat... | [
-0.7210420966148376,
-0.7886171340942383,
0.5671654939651489,
-0.18246188759803772,
-0.2837499976158142,
0.4656943678855896,
-0.7667907476425171,
0.5268067717552185,
-0.3201735317707062,
0.6013612151145935,
-0.2958196699619293,
0.5999396443367004,
0.2993563711643219,
0.4804273545742035,
... |
def pos _ tag ( self, textpair ) : t1 _ s = textpair. t1. split ( ) t2 _ s = textpair. t2. split ( ) t1 _ tag =''. join ( [ ele [ 1 ] for ele in self. postagger. tag ( t1 _ s ) ] ) t2 _ tag =''. join ( [ ele [ 1 ] for ele in self. postagger. tag ( t2 _ s ) ] ) if debug : print ( t1 _ tag, t2 _ tag ) return text _ pair.... | [
-0.6799809336662292,
-0.9969486594200134,
0.8154097199440002,
-1.2807174921035767,
-1.0637481212615967,
0.13173802196979523,
-0.995809018611908,
0.8383952379226685,
-1.734023928642273,
0.913384735584259,
0.13771790266036987,
-1.3295490741729736,
-0.6291393041610718,
-0.229683518409729,
-... |
def load _ petal _ fiber _ map ( existing = none, fibermaps = none ) : fp = existing if existing is none : fp = dict ( ) log = get _ logger ( ) if fibermaps is none : fibermaps = [ ( 4042, 5, " petal _ 2 _ final _ verification. csv " ), ( 4043, 7, " petal _ 3 _ final _ verification. csv " ), ( 4807, 2, " petal _ 4 _ fi... | [
-0.3839467763900757,
-0.8076179027557373,
0.7564399838447571,
-0.27315375208854675,
0.0776548981666565,
0.3679303228855133,
0.578737199306488,
-0.016200164332985878,
0.03646644204854965,
-0.6174368262290955,
0.06751743704080582,
-0.451479971408844,
-0.28666746616363525,
0.8475928902626038,... |
def _ _ members _ at _ _ ( self, realoffset ) : owner = self. owner # if this structure is not a union, then this is simple because there'll # be only one member at any given offset. it appears that idapython's api # seems to figure everything out for us and so we can just use it to # fetch the things we need to yield,... | [
-0.72043377161026,
-0.5139231085777283,
0.8557779788970947,
-0.6681652665138245,
0.1434459537267685,
0.16563373804092407,
-0.3963185250759125,
-1.1843324899673462,
0.4041482210159302,
-0.522216796875,
0.027232514694333076,
0.5708020329475403,
-0.14290395379066467,
-0.3386731743812561,
0.... |
def yaml _ dump ( filepath : str, data : dictionary ) : with open ( filepath,'w') as file _ descriptor : yaml. dump ( data, file _ descriptor ) | [
0.9251246452331543,
-0.35897156596183777,
0.08743763715028763,
-1.001508355140686,
0.713819682598114,
0.5455216765403748,
0.2841777801513672,
1.1265792846679688,
-0.4486566185951233,
0.17863808572292328,
-0.11823869496583939,
0.7887039184570312,
1.2239868640899658,
0.7840029001235962,
-0... |
def countries ( ) : # perform the sql query query = db. session. query ( globaltemperaturebymajorcity. country. distinct ( ). label ( " country " ) ). order _ by ( globaltemperaturebymajorcity. country ) countries = [ row. country for row in query. all ( ) ] # return a list of the countries return jsonify ( countries ) | [
-0.1452724188566208,
0.5643697381019592,
0.46435174345970154,
0.21344320476055145,
0.3028451204299927,
0.16820776462554932,
-0.43308696150779724,
0.5533006191253662,
-0.5795391201972961,
0.8845019340515137,
0.21730856597423553,
-0.8933412432670593,
0.10615302622318268,
0.9353589415550232,
... |
def normalizetimestamp ( originalvalue _ str ) : try : iscorrectformat, result _ str = _ _ check _ formatting ( originalvalue _ str ) if ( iscorrectformat ) : date _ obj = parse ( result _ str ) pac _ tz = pytz. timezone ('us / pacific') ea _ tz = pytz. timezone ('us / eastern') pac _ date _ obj = pac _ tz. localize ( ... | [
-0.19158323109149933,
-0.5312556028366089,
0.6427035331726074,
0.29583555459976196,
-0.5403698682785034,
0.37234193086624146,
0.10809703171253204,
-0.07405217736959457,
0.8576933741569519,
0.7380298376083374,
0.33337244391441345,
-0.4777759909629822,
-0.3743341267108917,
-0.338978707790374... |
def create _ user ( self, username : str, user _ password : str, user _ role : str, user _ metadata : dict, user _ settings : dict ) - > bool : return self. sqldata. create _ user ( username, user _ password, user _ role, user _ metadata, user _ settings ) | [
-0.9048064351081848,
0.9803928732872009,
0.47584614157676697,
-0.02850690670311451,
0.872871994972229,
0.7354248762130737,
-0.7399893999099731,
-0.6337026357650757,
-1.0034183263778687,
0.9352498054504395,
-0.45760345458984375,
-0.5368967652320862,
-0.016830971464514732,
-0.913827002048492... |
def get _ finetune _ datasets ( dataset _ name : str, tokenizer : robertatokenizerfast, is _ molnet : bool, split : optional [ str ] = " scaffold ", ) - > finetunedatasets : if is _ molnet : try : from chemberta. utils. molnet _ dataloader import load _ molnet _ dataset except importerror : raise importerror ( " ` deep... | [
-0.44787073135375977,
0.9556950330734253,
0.6222315430641174,
-0.19574187695980072,
-0.6221452355384827,
-0.57342129945755,
-0.18717774748802185,
-0.013775618746876717,
0.13588157296180725,
-0.7236302495002747,
-0.1289428323507309,
0.36317843198776245,
0.034662067890167236,
-0.726973593235... |
def create _ wing _ rotor _ wake _ file _ from _ template ( wing _ info : charmwinginfo, wing _ settings : charmrotorsettings, num _ psi, unit _ factor = u. in2ft ) : # get number of blades num _ blades = 1 # compute radians per second omega = wing _ settings. rpm * u. rpm2rad _ s # compute positioning phi _ offset _ d... | [
0.22317413985729218,
-0.609624981880188,
0.7846388816833496,
-0.4551554322242737,
-0.1555308848619461,
0.4662420153617859,
0.5035767555236816,
0.6679101586341858,
0.03980862721800804,
-0.09408643841743469,
-0.38601410388946533,
0.4447850286960602,
-0.20331527292728424,
0.003069660626351833... |
def test _ protprot _ lrmsd ( protprot _ caprimodule ) : protprot _ caprimodule. calc _ lrmsd ( ) assert round _ two _ dec ( protprot _ caprimodule. lrmsd ) = = 20. 94 | [
1.2538020610809326,
-1.0122435092926025,
0.4467396140098572,
-0.21354910731315613,
-0.26589760184288025,
0.9982117414474487,
-0.9172163605690002,
-0.2475135773420334,
0.2928635776042938,
-1.1598654985427856,
0.33988016843795776,
0.21086369454860687,
-0.7590113878250122,
0.5536133050918579,... |
def legendsandfigparagraphs ( text, parabnd = default _ para _ bnd, # string that means paragraph boundary ) : return ( p for p in paragraphs ( text, parabnd = parabnd ) \ if legendre. match ( p ) or figurere. search ( p ) ) | [
1.1508301496505737,
-0.4708847403526306,
0.386338472366333,
0.16024762392044067,
-0.5943091511726379,
0.5639033317565918,
-0.9061191082000732,
0.5905067920684814,
-0.04198131337761879,
0.39350399374961853,
-0.05941150709986687,
0.14606808125972748,
-0.8166933059692383,
0.0397925041615963,
... |
def applyrecommendation ( self, request, context ) : context. set _ code ( grpc. statuscode. unimplemented ) context. set _ details ('method not implemented!') raise notimplementederror ('method not implemented!') | [
-1.6272084712982178,
0.035200126469135284,
0.7796362042427063,
0.34926384687423706,
0.16336144506931305,
0.7351099848747253,
0.5246989727020264,
0.6950908303260803,
0.5508633255958557,
0.6256548166275024,
0.4323337972164154,
1.620514154434204,
-0.8283529281616211,
0.47032010555267334,
-0... |
def calchyperparams ( data, percentile = 75, numdays = 2, func = lambda x : x ['volume'] * x ['close'] ) : # goal : calculate 75 % percentile of daily price movemet assuming its normal diff = ( data ['high'] - data ['low'] ) thresh = np. percentile ( diff, percentile ) # calculate vol * price for data so that the bars ... | [
-0.6534894704818726,
0.7880585193634033,
0.6417994499206543,
-0.25401991605758667,
-0.169777512550354,
-0.0589216910302639,
0.22254213690757751,
-0.746745228767395,
-1.0456568002700806,
1.037993311882019,
0.5889061093330383,
0.2018551379442215,
0.7325838804244995,
0.14539173245429993,
0.... |
def on _ cbproveedor _ currentindexchanged ( self, index ) : if self. editmodel is not none : self. editmodel. idproveedor = self. proveedoresmodel. record ( index ). value ( " idproveedor " ). toint ( ) [ 0 ] | [
-0.447508305311203,
0.1274377554655075,
0.5102835893630981,
0.45734933018684387,
0.06863661855459213,
-0.30361562967300415,
0.6575937271118164,
0.4387039840221405,
0.4281963109970093,
0.9702346920967102,
-0.4591101408004761,
-0.35516634583473206,
-0.4616941213607788,
-0.34518375992774963,
... |
def show _ tagsmenu _ screen ( self ) : self. _ push _ prev _ screen _ to _ history ( ) self. tagsmenu _ screen. ids. tagsmenu _ widget. parent. scroll _ y = 1 self. sm. transition. direction ='left'self. sm. current ='tagsmenu ' | [
0.47822484374046326,
1.0579464435577393,
0.6780149936676025,
-0.6208145618438721,
0.8268667459487915,
-0.15266241133213043,
0.0009431935613974929,
-0.06660743802785873,
-0.35970044136047363,
0.2298535257577896,
-0.6529414653778076,
0.5115430951118469,
0.584638774394989,
1.6148295402526855,... |
def linkhoverleave ( self ) : self. unsetcursor ( ) self. linkleft. emit ( ) if self. _ linkhighlighter : self. clearhighlight ( self. _ linkhighlighter ) | [
0.8309592604637146,
-0.4051266014575958,
0.446389764547348,
0.21739539504051208,
0.17099882662296295,
-0.27571654319763184,
0.19429747760295868,
0.31384873390197754,
0.33327755331993103,
-0.3728746473789215,
-1.128335952758789,
0.12749658524990082,
-0.38073569536209106,
1.4746006727218628,... |
def _ decayed _ lr ( self, var _ dtype ) : return self. _ optimizer. _ decayed _ lr ( var _ dtype ) | [
0.10056594014167786,
-0.29096338152885437,
0.18089407682418823,
-0.8655120134353638,
-0.38212427496910095,
-0.27733752131462097,
-0.5162383913993835,
-0.28560012578964233,
0.2751149833202362,
0.44212815165519714,
0.1776040494441986,
0.7393877506256104,
-0.22528287768363953,
1.1986626386642... |
def resetfactions ( self ) : for cell in self. game. cells : cell. setfactionunknown ( ) | [
0.03213345631957054,
-0.35559266805648804,
0.3075081408023834,
0.29350054264068604,
1.4957784414291382,
-1.5386276245117188,
-0.02179495431482792,
-0.49611398577690125,
-0.7920607328414917,
-0.7197688221931458,
-0.48615309596061707,
0.15159094333648682,
0.6345934271812439,
-0.0254843235015... |
async def test _ form _ reauth ( hass : homeassistant, entry : mockconfigentry ) - > none : await setup _ integration ( hass, entry ) assert entry. state = = config _ entries. configentrystate. loaded with requests _ mock. mocker ( ) as mock _ request : mock _ request. get ( " https : / / user - api. wall - box. com / ... | [
-0.23659075796604156,
0.034895315766334534,
0.6201819181442261,
0.2735993266105652,
0.7942661643028259,
-0.5144788026809692,
-0.04205102100968361,
0.08150821924209595,
0.3799953758716583,
-0.23018109798431396,
-0.6369314789772034,
0.3926018476486206,
0.4286555051803589,
0.02455654181540012... |
def power ( f, v ) : return ( f [ 0 ] * v [ 0 ] + f [ 1 ] * v [ 1 ] + f [ 2 ] * v [ 2 ] ) | [
0.1942310780286789,
-0.007702863309532404,
0.5398025512695312,
-0.05371234565973282,
0.8996499180793762,
-0.8712306022644043,
-0.9627897143363953,
0.5421451330184937,
-0.789546012878418,
0.6949761509895325,
-0.022306233644485474,
-0.7164551615715027,
-0.46896862983703613,
-1.20226728916168... |
def update _ visual ( self ) : abs _ coord = self. get _ absolute _ positions ( ) # updates direction for each of 5 changeable squares for direction in self. image _ pos : # gets coordinates of image associated with that direction row = self. image _ pos [ direction ] [ 0 ] col = self. image _ pos [ direction ] [ 1 ] n... | [
-0.9183511137962341,
-1.5669403076171875,
0.4796629548072815,
-0.04546673968434334,
-0.5675888061523438,
0.0039045694284141064,
0.8739409446716309,
-0.10382232069969177,
-0.06609223037958145,
0.44890883564949036,
0.28115153312683105,
0.5721898674964905,
0.3269697427749634,
0.44583117961883... |
def checkmiss ( source, centre, target1, target2 ) : mainline = centre - source mainlength = np. linalg. norm ( mainline ) target1vec = target1 - source # target1length = np. linalg. norm ( target1vec ) target1length = math. sqrt ( math. pow ( target1vec [ 0 ], 2 ) + math. pow ( target1vec [ 1 ], 2 ) + math. pow ( targ... | [
-0.08319586515426636,
-0.5659223198890686,
1.078690767288208,
-0.5546992421150208,
-0.5045310854911804,
0.6976167559623718,
-0.23056983947753906,
-0.5850340723991394,
0.03169974684715271,
0.45332977175712585,
0.307734876871109,
0.4194033741950989,
-0.37043964862823486,
-0.43419790267944336... |
def compute _ bpsn _ auc ( df, subgroup, label, oof _ name ) : subgroup _ negative _ examples = df [ df [ subgroup ] & ~ df [ label ] ] non _ subgroup _ positive _ examples = df [ ~ df [ subgroup ] & df [ label ] ] examples = subgroup _ negative _ examples. append ( non _ subgroup _ positive _ examples ) return compute... | [
0.24371150135993958,
-0.3247753977775574,
0.6815559267997742,
0.8507875800132751,
-0.04931933805346489,
-0.4550403356552124,
-0.11476825177669525,
-0.4410665035247803,
0.1136946901679039,
0.876557469367981,
0.599470317363739,
1.6065465211868286,
0.8241798281669617,
-0.8460678458213806,
1... |
def get _ absolute _ url ( self ) : return reverse ('post - detail ', kwargs = {'pk': self. pk } ) | [
0.5025664567947388,
-0.12269018590450287,
0.7110655903816223,
0.10894075036048889,
1.0391435623168945,
1.1250430345535278,
-0.2971230447292328,
0.6813111901283264,
-0.8322655558586121,
-0.6098073124885559,
0.26077520847320557,
0.37040606141090393,
0.6744024753570557,
0.6090775728225708,
... |
def hsv _ to _ rgb ( t ) : return _ colorsys. hsv _ to _ rgb ( * t ) | [
-1.7892390489578247,
0.05661020055413246,
0.3800906538963318,
0.5487066507339478,
0.5671848058700562,
-0.10075552761554718,
-0.24020659923553467,
-0.32160982489585876,
-0.6000462770462036,
0.49831533432006836,
-1.0058506727218628,
-0.06766948848962784,
0.08128577470779419,
0.51067447662353... |
def distance ( * args ) : total = 0 for ( index, num ) in enumerate ( args [ 1 : ] ) : total + = abs ( args [ index ] - num ) return total | [
-0.3490508794784546,
0.027880193665623665,
0.6522316932678223,
0.3925718665122986,
1.0597368478775024,
1.1174683570861816,
0.6359745860099792,
0.11686597764492035,
-0.13253171741962433,
0.6081212759017944,
-0.4887034595012665,
-0.663000762462616,
-0.6019686460494995,
-0.030753275379538536,... |
def gettargetazza ( ra, dec, time, lat = - 26. 7033, lon = 116. 671, height = 377. 827 ) : # print " creating earthlocation for : lat = { 0 } deg, lon = { 1 } deg ". format ( lat, lon ) location = earthlocation ( lat = lat * u. deg, lon = lon * u. deg, height = height * u. m ) # print " creating skycoord for target at ... | [
-0.5033817291259766,
-0.8146188259124756,
0.6820039749145508,
-0.22113563120365143,
0.6504728198051453,
0.08913908153772354,
-0.13958889245986938,
0.11301320046186447,
-0.28997862339019775,
0.15814387798309326,
0.03267386555671692,
0.5181071758270264,
0.8385921716690063,
0.5942177772521973... |
def fromarray ( data, label = 0 ) : time, freq, amp, phase, bw = [ lib. as _ c _ contiguous ( data [ :, i ] ) for i in range ( 5 ) ] return partial ( label, time, freq, amp, phase, bw ) | [
0.5138651728630066,
-0.13769766688346863,
0.5294758081436157,
-0.3463577330112457,
-0.8378364443778992,
-0.016519665718078613,
0.30992066860198975,
-1.3980941772460938,
0.4327121675014496,
0.5050606727600098,
-0.1325836032629013,
-0.7209532260894775,
-0.8875774145126343,
0.1385442465543747... |
def _ _ mapinstancecategorylist ( self, tobj, categorynamelist, mycontainer, filtertype ) : # consider md as orderdict _ = filtertype md = { } for categoryname in categorynamelist : catobj = mycontainer. getobj ( categoryname ) if catobj is none : continue attributenamelist = catobj. getattributelist ( ) attributeindex... | [
-1.7123897075653076,
-0.055796291679143906,
0.7957623600959778,
-0.4612249433994293,
-0.9739332795143127,
-0.36839738488197327,
-0.02581888623535633,
-0.011728339828550816,
0.17833828926086426,
0.10895014554262161,
-0.281400591135025,
-0.4933348298072815,
0.3622746467590332,
0.951663911342... |
def decode ( loc, priors, variances ) : loc = loc * variances boxes = torch. cat ( ( priors [ :, : 2 ] + loc [ :, : 2 ] * priors [ :, 2 : ], priors [ :, 2 : ] * torch. exp ( loc [ :, 2 : ] ) ), 1 ) boxes = xywh _ 2 _ xyxy ( boxes ) return boxes # xyxy | [
-0.693344235420227,
-0.5642036199569702,
0.5187264680862427,
-1.018871784210205,
-0.5837319493293762,
-0.9568858742713928,
0.15295396745204926,
0.5555301904678345,
0.28123095631599426,
-0.16715997457504272,
-0.3943428695201874,
-0.1001364067196846,
0.527438223361969,
-0.4455859959125519,
... |
def winbio _ winbioopensession ( jitter ) : ret _ ad, args = jitter. func _ args _ stdcall ( [ " factor ", " pooltype ", " flags ", " unitarray ", " unitcount ", " databaseid ", " sessionhandle " ] ) raise runtimeerror ('api not implemented') jitter. func _ ret _ stdcall ( ret _ ad, ret _ value ) | [
-0.6447639465332031,
-0.6107048988342285,
0.442333847284317,
0.22890985012054443,
0.036726877093315125,
0.7747607827186584,
2.051760196685791,
-0.8261897563934326,
0.30952969193458557,
0.21151065826416016,
-0.049584198743104935,
0.648692786693573,
-1.4270788431167603,
0.4568423926830292,
... |
def sms _ template _ id ( self ) : return self. _ sms _ template _ id | [
0.8708624839782715,
-0.29558002948760986,
0.33393824100494385,
0.4393453001976013,
-0.7339586615562439,
0.5709287524223328,
-0.2255040407180786,
0.531891405582428,
1.5260648727416992,
-0.13811719417572021,
-0.6906182169914246,
0.17140351235866547,
-0.6732630729675293,
0.41188788414001465,
... |
def vpnvserver _ staserver _ bindings ( self ) : try : return self. _ vpnvserver _ staserver _ binding except exception as e : raise e | [
-0.7158753275871277,
-0.18840044736862183,
0.2825234532356262,
1.3172566890716553,
-0.6000446677207947,
0.9558975100517273,
0.3049072325229645,
-0.41405975818634033,
0.8539978861808777,
0.8522051572799683,
-1.7985483407974243,
0.5538800954818726,
-1.125355839729309,
0.26387351751327515,
... |
def add ( self, pairids, predictions ) : if isinstance ( pairids, str ) : pairids = [ pairids ] predictions = [ predictions ] self. matched. add ( pairids, predictions ) self. mismatched. add ( pairids, predictions ) if self. batch _ hash is none and self. matched. count + self. mismatched. count > 100 : content = self... | [
-0.6066609621047974,
-0.29728391766548157,
0.4841882586479187,
0.7860625982284546,
0.2439851015806198,
0.45754140615463257,
-0.23277173936367035,
0.22581420838832855,
-0.3130567967891693,
-0.2542197108268738,
-0.05509323626756668,
-0.024209313094615936,
-0.02096799947321415,
0.607974946498... |
def upload _ photos ( observation _ id : int, photos : multifile, * * params ) - > listresponse : responses = [ ] params ['observation _ photo [ observation _ id ]'] = observation _ id for photo in ensure _ list ( photos ) : response = post ( url = f'{ api _ v0 } / observation _ photos ', files = photo, raise _ for _ s... | [
-1.4043095111846924,
0.07518709450960159,
0.6394133567810059,
0.6585355997085571,
0.6775860786437988,
-0.3054065704345703,
-0.20455117523670197,
-0.5692618489265442,
0.31243911385536194,
1.171730399131775,
-1.0172033309936523,
-0.5139070749282837,
0.09133411943912506,
0.9416219592094421,
... |
def create _ table ( conn, create _ table _ sql ) : try : c = conn. cursor ( ) c. execute ( create _ table _ sql ) except error as e : print ( e ) | [
1.6840391159057617,
-0.17491543292999268,
0.2932940125465393,
1.5061386823654175,
0.8787521123886108,
0.10528450459241867,
-0.5374119877815247,
0.12265907973051071,
-1.35293447971344,
0.3599981963634491,
0.2377767711877823,
0.017687050625681877,
0.43477490544319153,
0.22536537051200867,
... |
def get _ template _ names ( self, request, obj ) : if self. template _ name is none : return [ ] elif isinstance ( self. template _ name, basestring ) : return [ self. template _ name ] else : return self. template _ name | [
-0.8857510685920715,
-0.3047124445438385,
0.7179668545722961,
0.39171627163887024,
0.04354974254965782,
-0.6047137975692749,
-0.8390383124351501,
-0.4764191210269928,
1.2064529657363892,
0.4792722165584564,
-0.413821280002594,
-0.21545526385307312,
-0.14787472784519196,
0.4752301573753357,... |
def quota _ usage _ get ( context, project _ id, resource ) : return impl. quota _ usage _ get ( context, project _ id, resource ) | [
-0.36780425906181335,
-0.044699639081954956,
0.38319289684295654,
-0.2733372747898102,
-0.15542125701904297,
-1.0330520868301392,
-0.057231683284044266,
-1.2790542840957642,
-0.45570820569992065,
0.9941224455833435,
0.9567446112632751,
0.4395768642425537,
1.1409884691238403,
-1.10100841522... |
def add _ histogram ( self, exp _ file, compute = false, nbins = none, histrange = none, spacing = none, edges = none, errortype = " gaussian ", scale = 1. 0 ) : # add observable object if compute is false. # otherwise, compute the actual observed values. if compute = = false : observable = histogramo ( nbins, histrang... | [
0.2957146465778351,
0.5021092891693115,
1.070385217666626,
0.49696841835975647,
0.47425511479377747,
0.2634456753730774,
-0.016027012839913368,
0.3691607415676117,
-0.1195833832025528,
-0.7352985143661499,
-0.24828845262527466,
0.48917993903160095,
0.07296060025691986,
0.9599155187606812,
... |
def solvenormal ( self ) : n = len ( self. trials [ 0 ] [ 0 ] ) mean1 = np. zeros ( n ) mean2 = np. zeros ( n ) cov = np. zeros ( ( 2 * n, 2 * n ) ) num = 0 for trial in self. trials : for ( xi, xn ) in zip ( trial [ : - 1 ], trial [ 1 : ] ) : mean1 + = xi mean2 + = xn num + = 1 mean1 / = num mean2 / = num for trial in... | [
0.1126914694905281,
-0.29052266478538513,
0.9314516186714172,
0.0965116024017334,
0.430623322725296,
-0.23676224052906036,
0.7560282349586487,
0.31589674949645996,
0.05428867042064667,
0.27668771147727966,
0.07973915338516235,
0.5397310256958008,
-0.09047701209783554,
0.13309134542942047,
... |
def get _ lane ( self ) : return int ( self. _ entry [ 1 ] ) | [
0.4779212474822998,
0.04124102741479874,
0.3531430959701538,
-0.3648231029510498,
0.8016301989555359,
0.8134005665779114,
0.23016178607940674,
0.35895147919654846,
-0.23437848687171936,
-0.2735815942287445,
0.7047874331474304,
0.30866739153862,
-0.6965804100036621,
-0.09097566455602646,
... |
def fit ( self, df, max _ length ) : if self. method = = " bert " : # define tokenizer, bert model from pretrained tokenizer = berttokenizerfast. from _ pretrained ( self. pre _ trained _ name, do _ lower = true ) # define dataset and process df with max _ length sequence dataset = dataset ( method = self. method, toke... | [
-0.2805514335632324,
0.41615593433380127,
0.6404599547386169,
0.19538338482379913,
-0.211768239736557,
-0.2402908354997635,
0.20169992744922638,
0.15037700533866882,
-0.27150681614875793,
-0.3794585168361664,
-0.2618972659111023,
0.6183716058731079,
0.6115768551826477,
0.6866834163665771,
... |
def fourier _ spectrum ( nsamples, data, deltat, logdb, power, rms ) : data _ freq = np. fft. rfft ( data * np. hanning ( nsamples ) ) nfreqs = data _ freq. size data _ freq = data _ freq / nfreqs ascale = 4 if ( rms ) : ascale = ascale / ( 2 * np. sqrt ( 2 ) ) if ( power ) : spectrum = ( ascale * absolute ( data _ fre... | [
0.7666217088699341,
-0.13807998597621918,
0.5567966103553772,
-0.053008630871772766,
-0.02828962169587612,
-0.7395775318145752,
-0.7784802913665771,
0.5313936471939087,
-0.44752049446105957,
-0.5357349514961243,
-0.10471644997596741,
-0.5962419509887695,
0.31518012285232544,
1.297625422477... |
def testlatestfindchromeuprevcandidate ( self ) : stable _ ebuilds = self. _ getstableebuilds ( ) candidate = cros _ mark _ chrome _ as _ stable. findchromeuprevcandidate ( stable _ ebuilds, constants. chrome _ rev _ latest, self. sticky _ branch ) self. assertequal ( candidate. ebuild _ path, self. latest _ stable ) | [
0.11777644604444504,
-0.24755804240703583,
0.40445834398269653,
0.9365689158439636,
0.9707003235816956,
0.740736722946167,
0.8606162071228027,
0.23536339402198792,
-0.4463100731372833,
-0.017731359228491783,
0.3527645468711853,
0.5386759042739868,
-0.20219552516937256,
0.20004035532474518,... |
def nwc _ calc ( inv, ar, ap, inv _ growth = 1. 0, ar _ growth = 1. 0, ap _ growth = 1. 0 ) : nwc = ( inv * ( 1 + ( inv _ growth / 100 ) ) ) + ( ar * ( 1 + ( ar _ growth / 100 ) ) ) - ( ap * ( 1 + ( ap _ growth / 100 ) ) ) return nwc | [
0.29029184579849243,
-0.2604418694972992,
0.42504972219467163,
0.19725418090820312,
-0.7707723379135132,
-0.39945802092552185,
0.8287485241889954,
-0.8503108024597168,
-0.23328855633735657,
-0.009081478230655193,
0.35343214869499207,
-0.07507199048995972,
0.42687684297561646,
-0.3161238431... |
def generate _ buildings ( width : int, depth : int, min _ bin : int, max _ bin : int, spacing : int, x _ addend : int = 0, y _ addend : int = 0 ) - > optional [ list [ tuple [ int, int, int, int ] ] ] : if width < min _ bin or depth < min _ bin : return none can _ split _ width = ( width > = min _ bin * 2 + spacing ) ... | [
-1.1342275142669678,
0.5385175347328186,
0.928128719329834,
-0.10862527042627335,
-0.15655238926410675,
0.03361721336841583,
0.642623245716095,
-0.4119446873664856,
0.3743438124656677,
-0.9666361212730408,
-0.001039298833347857,
0.03287416324019432,
-0.718651294708252,
-0.3089689612388611,... |
def load _ labels ( label _ path, label _ interest ) : table = pd. read _ csv ( label _ path ) table = table. set _ index ( ['biopsy'] ) y = table [ label _ interest ] stratefied _ variable = table [ label _ interest ] folds = table [ " fold " ] return y, folds, stratefied _ variable | [
0.13815493881702423,
0.13193726539611816,
0.4920598566532135,
-0.5118869543075562,
0.5170744061470032,
0.1308380663394928,
-0.8548581004142761,
-0.10265877097845078,
-0.8703081011772156,
0.7902571558952332,
0.26741743087768555,
0.5940144658088684,
-0.4713587760925293,
-1.1676676273345947,
... |
def test _ import _ v1 _ database _ multiple ( self ) : num _ databases = db. session. query ( database ). count ( ) contents = { " databases / imported _ database. yaml " : yaml. safe _ dump ( database _ config ), " metadata. yaml " : yaml. safe _ dump ( database _ metadata _ config ), } command = importdatabasescomma... | [
-0.034510161727666855,
1.1355106830596924,
0.7052059769630432,
0.8818925619125366,
1.249603509902954,
0.8260705471038818,
0.912268877029419,
0.28935372829437256,
-0.09270936250686646,
0.33831578493118286,
-0.643384575843811,
0.03503511846065521,
-0.750152587890625,
0.24369961023330688,
0... |
def _ _ init _ _ ( self, pathtofiles, pathtostopwords = none, eliminatestopwords = false, stemmer = none, wordstokeep = none, n = 1 ) : self. pathtofiles = pathtofiles self. vocabulary = { } self. numberofwords = 0 self. wordcount = { } self. stopwords = [ ] self. stemmer = stemmer self. eliminatestopwords = eliminates... | [
-0.3831900656223297,
0.33835285902023315,
0.5519351959228516,
0.1466059684753418,
0.13161085546016693,
-0.16426478326320648,
0.37214189767837524,
0.1671234667301178,
-0.7087599635124207,
-0.02222396247088909,
-0.24007505178451538,
-0.9603098034858704,
-0.2840752601623535,
1.377716541290283... |
def cumulativepage ( chatid ) : thischat = myfunc. chat ( ) tables = [ " complexfeedback ",'interactions ','maintable ','simplefeedback'] pageinformation = { } for eachtable in tables : db = myfunc. databaseconnection ( ) cur = db. cursor ( ) if ( eachtable = = " maintable " ) : thisquery = " " " select * from % s wher... | [
0.6170505285263062,
-0.651468813419342,
0.9315388798713684,
-0.7357764840126038,
-0.30113086104393005,
0.23646126687526703,
0.43677279353141785,
0.3596503734588623,
0.04556618258357048,
0.12213331460952759,
0.4812075197696686,
-0.7796565294265747,
-0.11834205687046051,
1.165332555770874,
... |
def test _ get _ template _ association ( self ) : pass | [
-0.1826193928718567,
-0.055624302476644516,
0.3830187916755676,
0.8177337050437927,
0.3876705765724182,
-0.5439869165420532,
1.8462142944335938,
-0.2223285585641861,
0.04391791671514511,
-0.7718454599380493,
-0.004208693280816078,
-0.18543194234371185,
-0.6449697017669678,
0.47230082750320... |
def create _ balance _ subgait ( cls ) : is _ balance _ used = rospy. get _ param ('/ balance ', false ) if not is _ balance _ used : return cls ( ) moveit _ commander. roscpp _ initialize ( sys. argv ) moveit _ commander. robotcommander ( ) moveit _ commander. planningsceneinterface ( ) try : move _ groups = {'all _ l... | [
0.2885589003562927,
-0.04286705330014229,
0.7709888815879822,
0.1365823745727539,
0.5003167390823364,
0.5768129229545593,
-0.10873167216777802,
-0.7659439444541931,
-0.16010744869709015,
-0.31610584259033203,
0.3231585919857025,
0.25879430770874023,
-0.91380774974823,
0.2512057423591614,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.