text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def jse _ implem ( x _ hds, perp, init, w _ cf ) : global module _ name, sim _ dr _ nitmax, sim _ dr _ gtol, sim _ dr _ ftol, sim _ dr _ maxls, sim _ dr _ maxcor if ( w _ cf < = 0 ) or ( w _ cf > = 1 ) : raise valueerror ( " error in function jse _ implem of module { module _ name } : w _ cf = { w _ cf } while it shoul... | [
0.19735026359558105,
0.7680431604385376,
0.9504351615905762,
-0.24873054027557373,
0.025821387767791748,
-0.466386616230011,
-0.17807266116142273,
-0.5988990068435669,
-0.2636348009109497,
0.5241142511367798,
-0.16531921923160553,
-0.22897672653198242,
-0.14360614120960236,
0.5548739433288... |
def checknumber ( self, part ) : try : part, coef = self. checkcoef ( part ) part = eval ( part ) if isinstance ( part, list ) : raise nameerror sign ='+'if part > = 0 else'-'return {'number': abs ( part ),'sign': sign,'coefficient': coef } except ( nameerror, syntaxerror ) as e : return none | [
-0.41172173619270325,
-0.5583769083023071,
0.7079296708106995,
0.02384941093623638,
-1.1893630027770996,
-0.6121000647544861,
-0.6465175151824951,
-0.5207692980766296,
-0.20455266535282135,
0.09769692271947861,
-1.3319505453109741,
-0.6940672993659973,
-0.4097348749637604,
-0.0627012029290... |
def test _ list _ integer _ length _ nistxml _ sv _ iv _ list _ integer _ length _ 1 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / integer / schema + instance / nistschema - sv - iv - list - integer - length - 1. xsd ", instance = " nistdata / list / integer / schema + ... | [
-0.4378630220890045,
-0.11385098099708557,
0.33724188804626465,
0.42665529251098633,
-0.3917825520038605,
-0.07650762051343918,
0.3288082182407379,
0.3515421450138092,
1.0487136840820312,
1.0176310539245605,
-1.1514570713043213,
-0.3990347981452942,
-0.6091532707214355,
1.153298258781433,
... |
def _ _ get _ task _ defs _ and _ update _ links ( self ) : tasks = [ ] for d in self. task _ defs : if isinstance ( d, dagtask ) : tasks. append ( d. _ _ get _ task _ defs _ and _ update _ links ( ) ) else : tasks. append ( d. copy ( ) ) self. _ _ apply _ links _ to _ task _ defs ( tasks ) tasks = list ( _ flatten ( t... | [
-0.5608832836151123,
0.8132280111312866,
0.5260595679283142,
1.1152598857879639,
0.3542722165584564,
-0.828347384929657,
0.564581573009491,
0.7264401912689209,
0.1473599374294281,
-0.8698158860206604,
-0.5344809293746948,
-0.08273327350616455,
0.5841464996337891,
1.0355476140975952,
-0.0... |
def construct _ model ( self ) : raise notimplementederror ( ) pass | [
-0.9099687337875366,
-0.8464048504829407,
0.2657596170902252,
0.10845809429883957,
0.4113841950893402,
1.1006391048431396,
0.7238836884498596,
0.07719395309686661,
-0.6426243185997009,
-0.43164753913879395,
-0.6810708045959473,
-0.5153605937957764,
1.0716497898101807,
0.160024031996727,
... |
def hyp _ out ( self ) : wav = b''. join ( self. rec _ buffer ) self. rec _ buffer = [ ] nblist = self. recognize ( wav ) return nblist | [
0.06056396663188934,
0.3194800615310669,
0.427110880613327,
0.02549387700855732,
0.47315436601638794,
-0.22072219848632812,
0.3369838297367096,
0.17265059053897858,
0.19361042976379395,
-0.21848784387111664,
-1.5685253143310547,
0.623784065246582,
-1.392608404159546,
0.34543877840042114,
... |
def parent _ state ( state, max _ depth ) : if len ( state ) = = 0 : return state parent _ trees, full _ trees = get _ trees _ max _ depth ( state, max _ depth ) if len ( parent _ trees ) = = 0 : return [ ] last _ tree _ start = parent _ trees [ - 1 ] [ 0 ] my _ posns = [ last _ tree _ start ] for tree _ posns in rever... | [
-0.2397003173828125,
-0.13205817341804504,
0.8925426006317139,
-0.19628603756427765,
-0.25521793961524963,
-0.3284376263618469,
-0.17689496278762817,
0.1954411417245865,
0.35908493399620056,
0.6869059205055237,
-0.04581364989280701,
-0.44437673687934875,
-0.1883968710899353,
-0.11200082302... |
def set _ bloginfotext ( self, text ='' ) : try : cnx = self. env. get _ db _ cnx ( ) cursor = cnx. cursor ( ) cursor. execute ( " update system set value = % s " \ " where name = % s ", ( text,'fullblog _ infotext') ) cnx. commit ( ) return true except : return false | [
0.0017761882627382874,
0.14870159327983856,
0.8267301917076111,
0.19916877150535583,
-0.7826225757598877,
1.038915753364563,
-0.10395421832799911,
0.029074352234601974,
-0.6661043763160706,
0.5673643350601196,
-1.482103705406189,
-0.803826093673706,
-1.8597402572631836,
0.16116872429847717... |
def _ _ init _ _ ( self, material, thickness, element = none ) : self. material = material self. thickness = thickness if element : self. element = element else : self. element = cst ( ) | [
1.2068194150924683,
-0.4893198609352112,
0.3718736171722412,
0.9227837324142456,
-0.3164500296115875,
0.6613794565200806,
-0.6444672346115112,
0.5197458267211914,
0.44035279750823975,
-0.7573866248130798,
-0.20699524879455566,
0.32920703291893005,
-0.5103147029876709,
0.9083691835403442,
... |
def _ parse ( self, parsed _ json ) : result = [ ] for key in parsed _ json : data _ entry = parsed _ json [ key ] result. append ( { attr _ mode _ s : data _ entry [ 0 ], attr _ latitude : data _ entry [ 1 ], attr _ longitude : data _ entry [ 2 ], attr _ track : data _ entry [ 3 ], attr _ altitude : data _ entry [ 4 ]... | [
-0.42303428053855896,
-0.9298162460327148,
0.6289711594581604,
-1.4573242664337158,
-0.39508548378944397,
0.3488558530807495,
-0.8858169913291931,
-0.10738907754421234,
-0.31312108039855957,
0.17936724424362183,
-0.6959860920906067,
-0.455695241689682,
0.4553021490573883,
0.964032053947448... |
def set _ backlight _ white ( self ) : self. set _ backlight _ rgb ( 0xff, 0xff, 0xff ) | [
-0.04526239633560181,
1.0300204753875732,
0.6424680948257446,
-0.5024959444999695,
1.2347737550735474,
-0.4111652374267578,
0.6484218835830688,
-0.8720605969429016,
0.28443440794944763,
0.5947847962379456,
-0.18931837379932404,
1.1611031293869019,
-1.292857050895691,
0.7289844751358032,
... |
def topdata _ updated ( self, * obj ) : self. load _ data ( ) | [
-1.0422917604446411,
-1.2033053636550903,
0.3845329284667969,
-0.25270259380340576,
-1.0661756992340088,
0.6331359148025513,
-0.35637587308883667,
-0.621945321559906,
0.15083587169647217,
0.037266381084918976,
-0.8088765740394592,
0.7619959712028503,
0.47697824239730835,
-0.527715027332305... |
def plot _ individual _ panel ( inargs, rootgroup, i, iday, axflat, n _ cols, n _ rows, ylabel, data, label, clist ) : ax = axflat [ iday ] if i = = 0 : # do once for each axis dateobj = ( timedelta ( seconds = int ( rootgroup. variables ['date'] [ iday ] ) ) + datetime ( 1, 1, 1 ) ) datestr = dateobj. strftime ( get _... | [
-0.6232565641403198,
0.18143287301063538,
0.9974679946899414,
-0.04723746329545975,
-0.5127763748168945,
0.8557309508323669,
0.3472653329372406,
-0.6170990467071533,
-0.31537267565727234,
0.22492876648902893,
0.9301036596298218,
0.6562088131904602,
-0.31554722785949707,
0.6697512269020081,... |
def create ( self ) : self. logger. info ( " create topic message'{ 0 }'". format ( self. name ) ) return self. discovery _ pubsub. topics ( ). publish ( topic = self. topic _ path, body = self. to _ dict ( ) ). execute ( ) | [
0.19530653953552246,
0.09533341228961945,
0.2005704939365387,
-0.006699821446090937,
0.988060474395752,
0.32849329710006714,
-0.5405395030975342,
-0.189020574092865,
-0.902884840965271,
-0.41238948702812195,
0.3711792528629303,
0.091916024684906,
-0.6469347476959229,
0.32721567153930664,
... |
def query6 ( connection ) : current = time. time ( ) cursor = connection. cursor ( ) cursor. execute ( " " " select br. name, br. city | | ','| | br. state | | ','| | br. country as address, count ( case when r. overall > 4. 5 then 1 end ) as overall _ quality _ beers from brewery as br inner join beer as b on br. id =... | [
0.3500465452671051,
-0.3212710916996002,
0.5763843059539795,
1.0203622579574585,
-0.46648314595222473,
-0.21542860567569733,
0.38391685485839844,
0.25480976700782776,
-0.9605029225349426,
0.395778089761734,
-0.15119458734989166,
-0.27685120701789856,
-0.2692701518535614,
0.0384420007467269... |
def misfit _ quantification ( self, event : str, validation = false, window _ set = none ) : iteration = self. comm. project. current _ iteration if window _ set is none : if self. comm. project. inversion _ mode = = " mini - batch " : window _ set = iteration + " _ " + event else : window _ set = event # check if adjo... | [
0.4131288230419159,
0.12257859855890274,
0.7233594655990601,
-0.26043471693992615,
-0.5463221669197083,
0.14915965497493744,
0.3529045879840851,
-0.20208211243152618,
0.3709257245063782,
0.305591344833374,
-0.49997276067733765,
-0.33920836448669434,
-0.6494242548942566,
1.2477058172225952,... |
def registerdevices ( self, listofdevices ) : bulkadd = apiclient. bulkaddurl % ( self. host ) r = requests. post ( bulkadd, auth = self. credentials, data = json. dumps ( listofdevices ), headers = {'content - type':'application / json'}, verify = self. verify ) status = r. status _ code if status = = 201 : self. logg... | [
-2.11798357963562,
0.3632543385028839,
0.7168022394180298,
0.48836687207221985,
0.28261488676071167,
-0.7812473773956299,
-0.05352432653307915,
-0.4005206227302551,
0.1457071304321289,
0.6523330807685852,
-1.081006646156311,
0.41318997740745544,
-1.2729523181915283,
0.8620743751525879,
0... |
def test _ evaluation _ and _ gradient _ four _ models ( self ) : ninputs = 1 # nnodes = 4 ndiscrepancy _ params, nscaling _ params = 3, 1 graph = setup _ 4 _ model _ graph ( ) populate _ functions _ multiplicative _ additive _ graph ( graph, monomial _ 1d, monomial _ 1d, ndiscrepancy _ params, nscaling _ params, ninpu... | [
0.5308798551559448,
0.14892803132534027,
0.8548380732536316,
-0.11988941580057144,
0.4702360928058624,
0.4690908193588257,
0.7408657073974609,
-0.590911865234375,
-0.35522064566612244,
0.01962241902947426,
-0.6319760680198669,
-0.4667005240917206,
0.061776284128427505,
0.38345664739608765,... |
def mergetwolists ( l1 : listnode, l2 : listnode ) - > listnode : # initialize root to none root = none # iterate while we have values in either list while l1 or l2 : # list 1 is empty, use list 2 if not l1 : node = listnode ( l2. val ) l2 = l2. next # list 2 is empty, use list 1 elif not l2 : node = listnode ( l1. val... | [
0.057845089584589005,
-0.13414347171783447,
0.9980776906013489,
0.24528805911540985,
-0.6497983932495117,
0.42802751064300537,
-1.3102225065231323,
-0.5404244661331177,
-0.07305516302585602,
-0.5829374194145203,
-0.37974950671195984,
0.747577965259552,
-0.577552318572998,
0.680542588233947... |
def test _ atomic _ language _ min _ length _ 4 _ nistxml _ sv _ iv _ atomic _ language _ min _ length _ 5 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / language / schema + instance / nistschema - sv - iv - atomic - language - minlength - 5. xsd ", instance = " nistda... | [
0.31159982085227966,
-0.5411332249641418,
0.24245585501194,
0.3256952166557312,
-0.7796798348426819,
-0.032647546380758286,
0.11289964616298676,
-0.6314181089401245,
0.25827503204345703,
0.6127567887306213,
-0.588164746761322,
-0.02186906337738037,
-0.8073863983154297,
-0.02229881845414638... |
def _ is _ org _ member ( self, org ) : url = " % s / user / orgs " % self. _ api _ url data = self. get _ all _ pages ( url ) if not self. _ bad _ response and data : for org _ data in data : if org _ data [ " login " ] = = org : return true return false | [
-0.5401428937911987,
0.14435945451259613,
0.5728052258491516,
0.4168234169483185,
0.175034761428833,
0.09518691152334213,
-1.3591623306274414,
0.020272543653845787,
0.32462483644485474,
-0.09463070333003998,
-0.3202759921550751,
0.17606954276561737,
-0.4578925669193268,
-0.1188524290919303... |
def cleanuptimeline ( t ) : if t. week = = 1 : t. add _ week ( ) else : last _ day = t. timeline [ " week " + str ( t. week - 1 ) ] [ - 1 ]. date distance = ( last _ day - date. today ( ) ). days + 1 while distance < 0 : t. add _ week ( distance ) distance + = 7 | [
-0.5386661291122437,
0.5535033941268921,
0.651425838470459,
-0.9648604989051819,
0.31002193689346313,
0.07963275164365768,
0.42073145508766174,
0.007810650393366814,
1.132920265197754,
-0.024157395586371422,
0.1773270219564438,
-1.0317834615707397,
0.33343392610549927,
0.15026454627513885,... |
def ceil ( x, name = none ) : return gen _ math _ ops. ceil ( x, name ) | [
0.4599098265171051,
0.9054449200630188,
0.29939591884613037,
0.8465456962585449,
-1.270497441291809,
-0.3483141362667084,
-0.046178050339221954,
-1.2812368869781494,
-0.7913262248039246,
1.0178529024124146,
-0.30790215730667114,
0.21705350279808044,
1.119714617729187,
-1.3110723495483398,
... |
def displaybraillemessage ( message, cursor = - 1, flashtime = 0 ) : if not _ settingsmanager. getsetting ('enablebraille') \ and not _ settingsmanager. getsetting ('enablebraillemonitor') : debug. println ( debug. level _ info, " braille : display message disabled " ) return braille. displaymessage ( message, cursor, ... | [
1.3315023183822632,
0.2679505944252014,
0.4996888339519501,
0.454659104347229,
-0.3732896149158478,
0.45477086305618286,
0.3785889744758606,
-0.02533699758350849,
-0.015966501086950302,
0.2185859978199005,
0.24439489841461182,
0.642641544342041,
-2.0501322746276855,
0.9583559632301331,
0... |
def do _ get _ servers ( self, args ) : global token global pp headers = { " region " : datacenter, " x - auth - token " : token } custom _ url = dct [ datacenter ] +'/ servers'r = requests. get ( custom _ url, headers = headers ) if r. status _ code = = 200 : global pp # pp. pprint ( r. json ( ) ) print ( " number of ... | [
-0.7215789556503296,
-0.13567021489143372,
0.8956969380378723,
-0.40041467547416687,
0.46792423725128174,
-0.19788680970668793,
-0.1789761334657669,
0.06215755641460419,
0.7870840430259705,
0.1346205174922943,
-0.32373514771461487,
0.9719852805137634,
-0.5209696292877197,
0.821466445922851... |
def dbdoesuserexist ( email ) : err = [ ] syserr = [ ] try : user = dbaccessconnection. userinfo. select ( dbaccessconnection. userinfo. c. emailaddress = = email ). execute ( ). first ( ) except : syserr. append ( " dbdoesuserexist error found " ) if user is not none and err is not none and syserr is not none : return... | [
-0.228591188788414,
0.36764955520629883,
0.7931361198425293,
0.013915108516812325,
1.1530810594558716,
0.6630212664604187,
0.11939463764429092,
0.3597155213356018,
-0.007200570311397314,
0.46084463596343994,
-0.08815782517194748,
-0.4118240177631378,
-0.3911035656929016,
0.6513667702674866... |
def test _ atomic _ base64 _ binary _ enumeration _ 3 _ nistxml _ sv _ iv _ atomic _ base64 _ binary _ enumeration _ 4 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / base64binary / schema + instance / nistschema - sv - iv - atomic - base64binary - enumeration - 4. xsd ... | [
-0.713821291923523,
-0.25015345215797424,
0.662524402141571,
0.9659077525138855,
0.11368979513645172,
0.05829836428165436,
0.21534378826618195,
-0.2987799644470215,
0.2824735939502716,
0.378293514251709,
-0.39278700947761536,
-0.38664510846138,
-0.5840103626251221,
-0.19504690170288086,
... |
def updatebraille ( self, obj, extraregion = none ) : if not _ settingsmanager. getsetting ('enablebraille') \ and not _ settingsmanager. getsetting ('enablebraillemonitor') : debug. println ( debug. level _ info, " braille : update disabled " ) return if not obj : return self. clearbraille ( ) line = self. getnewbrail... | [
0.06144867464900017,
-0.5787814855575562,
0.6867710947990417,
0.3183700144290924,
-0.7465522885322571,
1.0079286098480225,
0.1910710483789444,
0.07687398791313171,
0.6429892778396606,
0.06689243018627167,
-1.1912294626235962,
0.35996800661087036,
-0.846781849861145,
0.1662359982728958,
0... |
def sne _ init _ random _ embedding ( n, n _ components, rand _ state ) : return 10 * * ( - 4 ) * rand _ state. randn ( n, n _ components ) | [
-0.0980125218629837,
0.563326895236969,
0.3039174973964691,
-0.22334237396717072,
0.5959648489952087,
0.37452182173728943,
-0.02278350666165352,
0.5047802925109863,
1.4866679906845093,
-0.5908191800117493,
-1.5358843803405762,
-0.8491176962852478,
0.40022915601730347,
-0.18618497252464294,... |
def task _ 5 _ 2 _ 1 ( ) : results = [ none, none, none, none ] # todo task 5. 2. 1 : your code goes here conf _ level =. 0015 sim = simulation ( ) sim. sim _ param. rho = 0. 9 sim. sim _ param. s = 4 i = 0 tic = timeindependentcounter ( ) for sim _ time in [ 100000, 1000000 ] : sim. sim _ param. sim _ time = sim _ tim... | [
0.18824546039104462,
0.017735188826918602,
0.9592580199241638,
0.7719706296920776,
0.31403690576553345,
0.02745361626148224,
0.991570234298706,
-0.04362618178129196,
-1.1381580829620361,
1.2055463790893555,
-0.8048545122146606,
-0.21869347989559174,
-0.8574228286743164,
0.9990594387054443,... |
async def test _ bypass ( hass, two _ zone _ alarm ) : # noqa : f811 await setup _ risco ( hass ) with patch ( " homeassistant. components. risco. riscoapi. bypass _ zone " ) as mock : data = { " entity _ id " : first _ entity _ id } await hass. services. async _ call ( domain, " bypass _ zone ", service _ data = data,... | [
0.7060039639472961,
0.6950100064277649,
0.6189569234848022,
0.6188315153121948,
1.743316411972046,
0.5326336622238159,
0.8532475829124451,
-0.7215704321861267,
0.07042117416858673,
-0.5839475989341736,
-0.21531149744987488,
0.7103416323661804,
0.06420079618692398,
0.27637138962745667,
0.... |
def get _ xml _ element ( self, root = " artifact " ) : root = element ( root ) for key in ( " artifactid ", " groupid ", " extension ", " version ", " classifier ", " namespace " ) : if hasattr ( self, key ) and getattr ( self, key ) : item = subelement ( root, key ) item. text = getattr ( self, key ) return root | [
0.2198014110326767,
-0.23570547997951508,
0.2550860643386841,
0.34121307730674744,
-0.8124480247497559,
0.36911317706108093,
0.01684660278260708,
-0.44832903146743774,
0.3159973621368408,
-0.7802024483680725,
0.1292567104101181,
0.8581408858299255,
-0.13762177526950836,
0.04716444388031959... |
def getcounter ( self, key ) : pass | [
-0.48588916659355164,
-0.7250494956970215,
0.2695878744125366,
0.14892660081386566,
-0.15070807933807373,
0.2832830250263214,
-0.02872222661972046,
0.012573410756886005,
-0.5837864875793457,
-0.01876983977854252,
-0.42795705795288086,
-0.15958565473556519,
-0.3761371672153473,
0.7061278223... |
def flip ( dictionary ) : return { value : key for key, value in dictionary. items ( ) } | [
-1.2602620124816895,
-0.014391142874956131,
0.40722084045410156,
-1.035509467124939,
-1.048142671585083,
0.9368083477020264,
-0.6142243146896362,
0.9715430736541748,
-0.642918050289154,
0.32110247015953064,
-0.02152075618505478,
-0.36951419711112976,
1.2451388835906982,
0.13219203054904938... |
def cast ( * args ) : return _ itksubtractconstantfromimagefilterpython. itksubtractconstantfromimagefilteriul3diul3 _ cast ( * args ) | [
0.5564056038856506,
-0.04208120331168175,
0.5832998752593994,
-0.5741714835166931,
-0.5147488713264465,
1.56634521484375,
0.02637479454278946,
0.46500253677368164,
0.4642980396747589,
0.22905533015727997,
-0.35557088255882263,
0.06494812667369843,
-0.04528411850333214,
-0.9621031284332275,... |
def test2 ( ) : print ( " \ ntest 2 : " ) table = linkedhashtable ( ) table. add ( " this " ) table. add ( " is " ) table. add ( " test " ) table. add ( " 2 " ) table. add ( " which " ) table. add ( " checks " ) table. add ( " the " ) table. add ( " hashset " ) print _ set ( table ) print ( " size " + str ( table. size... | [
0.6772688627243042,
0.5700116753578186,
0.9485888481140137,
0.23313219845294952,
-0.5596441030502319,
0.04159322753548622,
0.30252015590667725,
-0.5487659573554993,
-0.3232165277004242,
-0.29072967171669006,
0.12571296095848083,
0.040980346500873566,
-0.4959268569946289,
-0.322122335433959... |
def sanity _ check ( self ) : assert ( len ( self. ffn _ perceptron _ per _ layer ) = = len ( self. ffn _ layer _ wise _ dropout ) ), " perceptron perlayer and number of droupout mismath " assert ( self. ffn _ num _ layer = = len ( self. ffn _ perceptron _ per _ layer ) ), " number of layer and length of perceptron per... | [
0.13273710012435913,
-0.0708223283290863,
0.6005845665931702,
-0.48059171438217163,
0.5285013318061829,
-0.13222360610961914,
0.6673647165298462,
0.3425185978412628,
0.9492784142494202,
-0.9910730123519897,
0.06929581612348557,
-0.5177201628684998,
-0.21915264427661896,
1.3238459825515747,... |
def load _ polygon ( poly _ fpath ) : try : with open ( poly _ fpath ) as f : poly _ geojson = json. load ( f ) # print ( poly _ geojson ) poly = shape ( poly _ geojson ['geometry'] ) # print ( poly ) return poly, poly _ geojson except exception as e : logger. exception ( " error loading % r ", poly _ fpath ) return no... | [
0.2592867612838745,
-1.6144375801086426,
0.6758362650871277,
-0.8236528635025024,
-0.46841081976890564,
0.5107455253601074,
-0.16548912227153778,
-0.3603920638561249,
0.318757563829422,
0.5568113327026367,
-1.1938148736953735,
-0.09794773161411285,
0.0673767551779747,
-1.2164307832717896,
... |
def approximate _ a ( env, x, u, delta = 1e - 5, dt = 1e - 5 ) : state _ dim = x. shape [ 0 ] action _ dim = u. shape [ 0 ] a = np. zeros ( ( state _ dim, state _ dim ) ) xs _ inc = np. tile ( x, ( state _ dim, 1 ) ) + delta * np. eye ( state _ dim ) xs _ dec = np. tile ( x, ( state _ dim, 1 ) ) - delta * np. eye ( sta... | [
-0.6051711440086365,
-0.014061542227864265,
0.8172918558120728,
-0.5597274899482727,
-0.4922831952571869,
0.19332771003246307,
0.4435618817806244,
-0.35250499844551086,
-0.015050585381686687,
0.030077539384365082,
0.3504861891269684,
0.8323929309844971,
0.4924197196960449,
0.11026747524738... |
def get _ migration ( migration _ name : optional [ str ] = none, resource _ group _ name : optional [ str ] = none, subscription _ id : optional [ str ] = none, target _ db _ server _ name : optional [ str ] = none, opts : optional [ pulumi. invokeoptions ] = none ) - > awaitablegetmigrationresult : _ _ args _ _ = dic... | [
-0.47048094868659973,
0.866226077079773,
0.9381574988365173,
0.5051127076148987,
-0.09007586538791656,
-0.27663102746009827,
-1.3818461894989014,
-0.4604365825653076,
-0.3806847631931305,
0.4244825839996338,
-0.06242835521697998,
1.0843431949615479,
-0.29544153809547424,
-0.437761306762695... |
def get _ issues ( jira, project, startdate ='', enddate ='' ) : block _ size = 1000 block _ num = 0 all _ issues = [ ] jql ='project = { 0 } '. format ( project ) if startdate and enddate : jql ='project = { 0 } and created > = { 1 } and created < = { 2 } '. format ( project, startdate, enddate ) while true : start _ ... | [
-0.7985476851463318,
0.437799870967865,
0.6783251762390137,
0.33216041326522827,
0.1473657786846161,
-0.042460616677999496,
-0.3714524209499359,
-0.7028257250785828,
-0.6507972478866577,
-0.3745581805706024,
-0.0024317866191267967,
0.32213491201400757,
-0.6599771976470947,
0.19339491426944... |
def get _ db _ access ( ) : loadconfig ( ) c = configdict [ " credentials " ] [ " mysql " ] db = dbconn. dbconn ( c [ " user " ], c [ " password " ], c [ " host " ], c [ " port " ] ) return db | [
0.06231736019253731,
-0.15104123950004578,
0.6672792434692383,
-0.056342363357543945,
-0.26567429304122925,
-0.43768125772476196,
-0.05168842896819115,
0.9072476029396057,
-0.7259588837623596,
-0.8376321196556091,
-0.07926633208990097,
0.8021954298019409,
-0.69162917137146,
0.1107752099633... |
async def expgain ( self, winner, loser ) : winner = await self. getmain ( winner ) if loser. typeobj = = " npc " : exp = randint ( loser. minxp, loser. maxxp ) else : exp = loser. xpthresh / 3 message = " " irl = await self. getirl ( winner ) if winner. hasbuff ( ) : if winner. curbuff = = 402 : exp + = 0. 20 * exp me... | [
-0.20854699611663818,
0.30504167079925537,
0.988446831703186,
-0.12260760366916656,
-0.4669052064418793,
-0.05821678787469864,
-0.593928873538971,
0.47358065843582153,
0.43021905422210693,
0.5857917070388794,
-0.6257063150405884,
0.23368170857429504,
-0.7772449254989624,
0.2585663199424743... |
def _ _ str _ _ ( self ) : txt = " " " " " your code goes here " " " return txt | [
0.12696629762649536,
-1.0136905908584595,
0.6573875546455383,
-0.27947306632995605,
-0.21060526371002197,
0.8152874708175659,
0.11713574826717377,
0.10493383556604385,
-0.054580360651016235,
-0.15853053331375122,
-0.15799567103385925,
0.3940335512161255,
-0.6827388405799866,
0.083477035164... |
def blueish ( pt ) : return int ( pt [ 0 ] ) - pt [ 1 ] - pt [ 2 ] ; | [
-0.22688044607639313,
-0.7634783387184143,
0.4196416139602661,
-0.2194550633430481,
0.07562145590782166,
0.9763092398643494,
0.006429287139326334,
-0.5159947872161865,
-0.7136610746383667,
0.017355628311634064,
-0.5214731693267822,
1.2810701131820679,
-0.6625044941902161,
-0.58583986759185... |
def get ( self, * args, * * kwargs ) : self. write ( self. db. packages [ self. data ( " pkg " ) ] ) | [
-1.4645392894744873,
0.6439420580863953,
0.14284798502922058,
-0.2483997344970703,
1.3361293077468872,
-0.4328598082065582,
-0.5070314407348633,
0.022622471675276756,
-0.1885402798652649,
-0.7014661431312561,
-0.17967204749584198,
-0.16689494252204895,
-0.3702503442764282,
-0.0901788026094... |
def _ _ call _ _ ( self, ann, doc = none ) : if self. type is not none : if isinstance ( self. type, str ) : if self. type! = ann. type : return false elif callable ( self. type ) : if not self. type ( ann. type ) : return false elif isinstance ( self. type, ( class _ re _ pattern, class _ regex _ pattern ) ) : if not ... | [
-0.9693624377250671,
-0.48765188455581665,
0.972189724445343,
0.7113153338432312,
-0.6517775654792786,
0.6647251844406128,
0.35157862305641174,
-0.14873048663139343,
0.45347654819488525,
0.01897481270134449,
0.11949801445007324,
0.7268308401107788,
-0.8291723132133484,
0.8640589118003845,
... |
def b _ delta ( rewards, states, alpha ) : # init s _ names = set ( states ) v _ dict = { } rpe _ dict = { } for s in s _ names : v _ dict [ s ] = [ 0. ] rpe _ dict [ s ] = [ ] for r, s in zip ( rewards, states ) : # # skip terminal states if ( s = = 0 ) | ( s = ='0') : continue v = v _ dict [ s ] [ - 1 ] # # the delta... | [
0.006329861935228109,
-0.4430321156978607,
0.6857293844223022,
-0.8493193984031677,
0.20947645604610443,
0.7440504431724548,
-0.3720964193344116,
1.032784342765808,
-0.08870100975036621,
0.7532697916030884,
0.24939033389091492,
-0.25927555561065674,
0.12833371758460999,
0.066685751080513,
... |
def ssxxsuffix ( i ) : if i < 1 : i = 1 elif i > 20 : i = 20 return ". ss % 0. 2d " % i | [
-0.31565552949905396,
-0.30754831433296204,
0.689902663230896,
-0.8462147116661072,
-0.9974647164344788,
0.7618381977081299,
0.7694168090820312,
-0.2723904252052307,
-0.31002581119537354,
-0.4793362319469452,
-0.6391025185585022,
0.6025797128677368,
-0.09534110128879547,
0.4272486567497253... |
def calc _ lincor ( mod2pt, dnvals, startdn, ndegree = 3 ) : # difference in the actual and ideal cases # dnvalst = dnvals [ 5 : ] dnvalst = dnvals diff _ exp = mod2pt ( dnvalst ) diff _ ideal = np. full ( ( len ( dnvalst ) ), mod2pt. c0 ) # now create ramps from both allowing for non - zero ramp starting points dn _ e... | [
0.5894395112991333,
-0.369171142578125,
0.5049189925193787,
-0.06527674198150635,
-0.5059652328491211,
0.07898502796888351,
-0.6009415984153748,
0.5874340534210205,
0.11365622282028198,
0.11659456044435501,
-0.7859967350959778,
0.24481213092803955,
-0.2537156939506531,
-0.3642449676990509,... |
def delete _ post ( self, bp, version = 0 ) : warnings = [ ] fields = bp. _ fetch _ fields ( version ) if not fields : warnings. append ( ('', " post and / or version does not exist. " ) ) # inital checking. return if there are problems. if warnings : return warnings # do delete is _ deleted = bp. delete ( version ) if... | [
0.25197237730026245,
-0.3657783567905426,
0.6167879700660706,
0.8223609328269958,
0.6722002625465393,
0.037628572434186935,
-0.3326897919178009,
-0.39500677585601807,
-0.014704853296279907,
0.6183661222457886,
-0.8309410810470581,
-0.5363981127738953,
-1.0186867713928223,
0.131271690130233... |
def test _ atomic _ any _ uri _ max _ length _ nistxml _ sv _ iv _ atomic _ any _ uri _ max _ length _ 1 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / anyuri / schema + instance / nistschema - sv - iv - atomic - anyuri - maxlength - 1. xsd ", instance = " nistdata / a... | [
-0.04771115630865097,
-0.35632604360580444,
0.37944620847702026,
1.3243728876113892,
-0.4424082636833191,
-0.07238271832466125,
-0.3547123074531555,
0.1403430849313736,
-0.013035408221185207,
-0.05303775519132614,
0.13807258009910583,
-0.13389599323272705,
-0.013612293638288975,
0.44805288... |
def compare _ baselines ( old _ baseline _ filename, new _ baseline _ filename ) : if old _ baseline _ filename = = new _ baseline _ filename : raise redundantcomparisonerror old _ baseline = _ get _ baseline _ from _ file ( old _ baseline _ filename ) new _ baseline = _ get _ baseline _ from _ file ( new _ baseline _ ... | [
0.5184995532035828,
-0.6868029832839966,
1.0020569562911987,
0.31354695558547974,
0.6538299918174744,
-0.21776598691940308,
0.2031363546848297,
-0.408947229385376,
-0.13153444230556488,
0.48989275097846985,
-0.2649061679840088,
1.6459951400756836,
-0.652725875377655,
0.31075823307037354,
... |
def test _ uclust _ assigner ( self ) : params = {'id _ to _ taxonomy _ fp': self. id _ to _ tax1 _ fp,'reference _ sequences _ fp': self. refseqs1 _ fp } t = uclustconsensustaxonassigner ( params ) result = t ( seq _ path = self. inseqs1 _ fp, result _ path = none, uc _ path = self. output _ uc _ fp, log _ path = self... | [
-0.3124668002128601,
-0.7784940004348755,
0.5546857714653015,
-0.01834384724497795,
-0.07210227847099304,
0.06936947256326675,
0.9975728988647461,
0.2556518614292145,
-0.49510228633880615,
-0.493133008480072,
0.16893330216407776,
-0.49584275484085083,
-0.11407145112752914,
-0.2355895787477... |
def get _ groups ( env, admin _ api _ key ) : if check _ invalid _ env ( env ) : return none, none api _ url = env + " / api / account. json / get _ groups " r7 = requests. get ( api _ url, headers = { " content - type " : " application / json ", " access _ key " : admin _ api _ key } ) groups _ list = [ ] groups _ dup... | [
-1.2492177486419678,
0.6673821806907654,
0.5815519690513611,
-0.2815193831920624,
0.6880018711090088,
-0.5646508932113647,
-0.21923619508743286,
-1.0592533349990845,
0.2645493447780609,
1.0012753009796143,
0.005273261107504368,
1.667532205581665,
-0.12098872661590576,
1.1691744327545166,
... |
def test _ validate _ endpoints ( self ) : self. assertraises ( valueerror, self. ep. new, " asdfasdf ", name = 1 ) ep = krest. endpoint ( krest _ host, krest _ user, krest _ password, ssl _ validate = false, autodiscover = false, validate _ endpoints = false ) try : ep. new ( " blah ", name = 1 ) except valueerror : s... | [
0.07962188124656677,
0.4647252559661865,
0.4053950905799866,
1.2326650619506836,
0.781250536441803,
0.863535463809967,
-0.5448526740074158,
-0.027713438495993614,
-0.9389289617538452,
0.23616436123847961,
-0.05974961072206497,
-0.45190414786338806,
-0.4572780728340149,
0.37182480096817017,... |
def to _ csv ( self, path : pathlib. path ) : raise notimplementederror ( " subsclass must implement " ) | [
-0.2894405722618103,
-0.6165632605552673,
0.43276455998420715,
0.507050096988678,
-0.10264182835817337,
0.637380063533783,
-0.1459534913301468,
-0.5548051595687866,
0.06890237331390381,
-0.6261386275291443,
-0.44792890548706055,
1.1618088483810425,
0.9550819396972656,
0.3447849750518799,
... |
def test _ poststodefaulthost ( self ) : d = self. observer. _ postexception ('< not - real - xml / >') self. successresultof ( d ) self. agent. request. assert _ called _ once _ with ('post ','http : / / api. airbrake. io / notifier _ api / v2 / notices ', headers = mock. any, bodyproducer = mock. any ) | [
0.25352537631988525,
1.0710718631744385,
0.5311855673789978,
0.452752947807312,
1.5036485195159912,
0.5333898067474365,
-0.39743342995643616,
-0.09707865864038467,
-1.059451699256897,
-0.7140156030654907,
-0.7396096587181091,
-0.18069933354854584,
-0.059616152197122574,
0.47635287046432495... |
def render _ template ( self, template _ arg, default _ contents = none ) : prefixes = {'cloud _ init _ template':'cloud - init ','user _ data _ template':'user - script ','minion _ template':'minion - template'} prefix = prefixes [ template _ arg ] if self. config [ template _ arg ] = = none : template _ name = " % s.... | [
-0.5003273487091064,
-0.10310228168964386,
0.4483395218849182,
-0.5903112292289734,
0.4828428328037262,
0.17080599069595337,
-0.6692334413528442,
0.398558646440506,
-0.4146995544433594,
0.6234940886497498,
-0.27111607789993286,
-0.8568803071975708,
-0.5046014189720154,
0.4060879647731781,
... |
def fetch ( self, query _ results, *, path, downloader, * * kwargs ) : base _ url = ('http : / / soar. esac. esa. int / soar - sl - tap / data?'f'retrieval _ type = last _ product') for row in query _ results : url = base _ url if row ['level']. startswith ('ll') : url + ='& product _ type = low _ latency'else : url + ... | [
-0.0324748270213604,
-0.41780585050582886,
0.4065089523792267,
-0.3171634376049042,
0.7056719064712524,
0.3222206234931946,
-0.9531213641166687,
-0.6448394656181335,
0.32855817675590515,
-0.20635031163692474,
0.17934881150722504,
-0.08707409352064133,
0.9742662906646729,
0.3947615325450897... |
def presentmessage ( self, fullmessage, briefmessage = none, voice = none ) : if not fullmessage : return if briefmessage is none : briefmessage = fullmessage if _ settingsmanager. getsetting ('enablespeech') : currentcapstyle = _ settingsmanager. getsetting ('capitalizationstyle') _ settingsmanager. setsetting ('capit... | [
0.12604475021362305,
-0.23552410304546356,
0.9817168712615967,
0.19437816739082336,
0.7770979404449463,
0.14858387410640717,
-0.31549420952796936,
-0.15330231189727783,
0.40639379620552063,
0.3873591423034668,
0.34723058342933655,
0.37837132811546326,
-1.3251434564590454,
1.606371521949768... |
def boutonclick ( buttons ) : global tourjoueur, nbtours # on utilise les variables definies au debut du programme # on fait jouer le premier joueur si c'est son tour et si il a clique sur une case valide if buttons [ " text " ] = = " " and tourjoueur = = true : buttons ['fg'] = joueur1 ['couleur'] buttons [ " text " ]... | [
-0.08598900586366653,
0.023634839802980423,
0.927858293056488,
-0.0031904138159006834,
-0.3959067463874817,
0.5191234946250916,
-0.19170591235160828,
-0.2248208224773407,
-0.8334324359893799,
0.3892039954662323,
-1.0527266263961792,
0.4001014828681946,
0.013889764435589314,
0.5898442268371... |
def gen _ all _ holds _ len ( hand, length, indeksy ) : seq _ outcomes = gen _ all _ combs ( indeksy, length ) wartosci _ l = list ( hand ) holds = [ tuple ( [ wartosci _ l [ x ] for x in tupla ] ) for tupla in seq _ outcomes ] return holds | [
-0.8969314098358154,
0.08095856755971909,
0.4503766894340515,
0.36879396438598633,
-0.07550196349620819,
0.5220108032226562,
-0.26254335045814514,
0.9015442728996277,
-0.04499135911464691,
-0.15252447128295898,
-0.7238346338272095,
-0.6342626810073853,
-0.08787468075752258,
-0.332140564918... |
def gui _ generator ( graph : mapgraph, building _ lst : list ) - > none : root = tk ( ) root. title ( " to - run - to map " ) intro _ label = label ( root, text = " to - run - to map ", font = ( " american typewriter ", 18,'bold'), fg ='royalblue4') intro _ label. pack ( ) msg _ label = label ( root, text = " please e... | [
-0.7478030323982239,
0.26302260160446167,
0.928587019443512,
0.4144245982170105,
-0.6150325536727905,
0.6661513447761536,
0.5071895718574524,
0.27300453186035156,
-0.9192432761192322,
-0.13307684659957886,
-0.3244696259498596,
0.12022937834262848,
0.013607553206384182,
0.7100099325180054,
... |
def list _ bunnies _ by _ suffix ( self, suffix ) : return self. bunnies _ by _ suffix. values (''. join ( reversed ( suffix ) ) ) | [
-0.2963773012161255,
-0.06364574283361435,
0.3086652457714081,
0.38828229904174805,
-0.005339586641639471,
-0.7621588706970215,
-0.7363883852958679,
0.47099027037620544,
-0.49783948063850403,
0.12720295786857605,
-1.1971889734268188,
0.8529369235038757,
0.018392041325569153,
0.659796893596... |
def long _ task ( self ) : tests. client _ code ( testone ) message ='' total = random. randint ( 10, 50 ) for i in range ( total ) : self. update _ state ( state ='progress ', meta = {'current': i,'total': total,'status': message } ) time. sleep ( 1 ) return {'current': 100,'total': 100,'status':'task completed! ','re... | [
-0.3767927289009094,
0.5359553098678589,
0.604928195476532,
-0.7994190454483032,
0.20629388093948364,
0.18567490577697754,
0.7186917662620544,
0.19078727066516876,
-0.2943403124809265,
1.1975858211517334,
-1.1027250289916992,
-0.8495885133743286,
0.12221518158912659,
0.2636924088001251,
... |
def autolabel ( ax, rects ) : for rect in rects : height = rect. get _ height ( ) ax. text ( rect. get _ x ( ) + rect. get _ width ( ) / 2., 1 * height,'% d'% int ( height ), ha ='center ', va ='bottom') | [
0.3043047785758972,
-0.9952217936515808,
0.695357620716095,
-0.14591087400913239,
-0.06375168263912201,
0.07505779713392258,
0.6365901827812195,
-0.5057911276817322,
0.16157694160938263,
0.4015279710292816,
-0.17117968201637268,
0.2903740704059601,
0.8043541312217712,
-0.40773314237594604,... |
def get _ attribute ( self ) : if not self. is _ leaf ( ) : return self. attribute else : raise exception ( " leaf nodes have no attribute. " ) | [
0.5318425893783569,
-0.3025408983230591,
0.3771637976169586,
1.376839280128479,
0.4284627437591553,
0.15546590089797974,
0.3554542362689972,
0.14686863124370575,
0.05365164205431938,
-0.3772520422935486,
1.424971342086792,
0.5949355363845825,
-0.6389767527580261,
0.4112536311149597,
0.29... |
def get _ word _ tokenizer ( language ) : return _ treebank _ word _ tokenizer | [
0.012458855286240578,
0.03142352029681206,
0.26521819829940796,
-0.08899547159671783,
-0.7651201486587524,
-0.8472301363945007,
-0.4030066430568695,
-0.15470156073570251,
-0.6993924975395203,
-0.4281485676765442,
-0.9584142565727234,
0.2752256989479065,
-0.7991788983345032,
0.9799472689628... |
def buildstartline ( self, caseno ) : startline = " - - - - " + caseno + " " + " " + \ " - - - - " # startline = " - - - - " + caseno + " " + " start " + " " + \ # " - - - - " self. logger. info ( startline ) | [
0.08760110288858414,
-1.572237253189087,
0.943494439125061,
0.6635004281997681,
-0.022248048335313797,
0.3441777229309082,
0.16480979323387146,
0.24747340381145477,
-0.13505764305591583,
-0.552818775177002,
-0.23301012814044952,
0.8926821947097778,
0.12668395042419434,
0.6721717119216919,
... |
def round _ ( x ) : if isinstance ( x, xr. dataarray ) : return x. round ( ) return round ( x ) | [
0.19344541430473328,
0.731277346611023,
0.30275678634643555,
-0.40948566794395447,
0.12115687876939774,
-0.23226836323738098,
0.3479473888874054,
-1.3995414972305298,
0.9904295206069946,
-0.4869195818901062,
0.07141754776239395,
1.3631577491760254,
0.10331782698631287,
0.47770020365715027,... |
def test _ atomic _ qname _ enumeration _ 1 _ nistxml _ sv _ iv _ atomic _ qname _ enumeration _ 2 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / qname / schema + instance / nistschema - sv - iv - atomic - qname - enumeration - 2. xsd ", instance = " nistdata / atomic ... | [
-0.6523820161819458,
-1.2617719173431396,
0.5181660056114197,
0.4199300706386566,
-0.37697067856788635,
0.1894453763961792,
-0.1343023031949997,
-0.5366280674934387,
-0.10656873881816864,
0.5317758321762085,
-0.3007795810699463,
0.34712013602256775,
0.590354323387146,
-0.011137682013213634... |
def nextpermutation ( self, nums : list [ int ] ) - > none : i = len ( nums ) - 1 while i > 0 and nums [ i ] < = nums [ i - 1 ] : i - = 1 if i = = 0 : nums. reverse ( ) return nums i - = 1 j = len ( nums ) - 1 while j > 0 and nums [ j ] < = nums [ i ] : j - = 1 nums [ i ], nums [ j ] = nums [ j ], nums [ i ] index = i ... | [
-1.0532071590423584,
0.1270410269498825,
0.8065013885498047,
0.47497403621673584,
-0.8177292943000793,
0.18360473215579987,
1.1886636018753052,
-0.2691565454006195,
0.8853333592414856,
0.02719219960272312,
0.02666481025516987,
0.1843043863773346,
-0.6928284168243408,
0.07840793579816818,
... |
def _ _ init _ _ ( self, dataset _ name, hyper _ yaml ) : script _ dir = os. path. dirname ( _ _ file _ _ ) absolute _ path = os. path. join ( script _ dir, hyper _ yaml ) # load the set of hyperparameters contained in the yaml file with open ( absolute _ path ) as f : self. hyper = yaml. safe _ load ( f ) self. datase... | [
0.48200923204421997,
-0.1202947124838829,
0.6274508833885193,
-0.011424998752772808,
0.09035906195640564,
-0.474293977022171,
0.020457856357097626,
0.9819380640983582,
-0.6037666201591492,
-0.1684998869895935,
-0.8220702409744263,
1.0982791185379028,
0.2322661280632019,
0.7111061811447144,... |
def describe _ backend _ servers ( self, blb _ id, marker = none, max _ keys = none, config = none ) : path = utils. append _ uri ( self. version,'blb ', blb _ id,'backendserver') params = { } if marker is not none : params [ b'marker'] = marker if max _ keys is not none : params [ b'maxkeys'] = max _ keys return self.... | [
-0.8731456995010376,
0.6711557507514954,
0.8460354804992676,
-0.44480568170547485,
0.9858450889587402,
-0.6924684047698975,
-0.34174206852912903,
-0.11633983999490738,
-0.14644911885261536,
0.798610508441925,
-0.7347867488861084,
2.0066819190979004,
-1.4625333547592163,
0.01571178436279297... |
def get _ vf _ ts _ pvrow _ element ( self, pvrow _ idx, pvrow _ element, ts _ pvrows, ts _ ground, rotation _ vec, pvrow _ width ) : tilted _ to _ left = rotation _ vec > 0 n _ shadows = len ( ts _ pvrows ) n _ steps = len ( rotation _ vec ) pvrow _ element _ coords = pvrow _ element. coords pvrow _ element _ length =... | [
-0.10435672849416733,
0.6596611738204956,
0.6167556047439575,
-0.2259962111711502,
-0.1337233930826187,
-0.1473989486694336,
0.32760313153266907,
-0.22630278766155243,
0.32795119285583496,
0.6802875399589539,
0.4132755994796753,
0.535778820514679,
0.1309775561094284,
0.6540696024894714,
... |
def best _ promo ( order : order ) - > decimal : return max ( promo ( order ) for promo in promos ) | [
0.21907231211662292,
0.3439335227012634,
0.3899698257446289,
1.3702727556228638,
-0.6965780854225159,
-0.8658015727996826,
-1.530746579170227,
-0.2143861949443817,
0.5323750972747803,
0.8425177335739136,
0.8213826417922974,
0.6067540645599365,
0.32615360617637634,
-0.48557716608047485,
-... |
def get _ cube _ xsection ( orig _ cube, center, width ) : cube = orig _ cube. copy ( ) shape = cube. shape try : assert ( np. all ( np. where ( center < 0 ) ) ) assert ( center [ 0 ] < shape [ 1 ] ) assert ( center [ 1 ] < shape [ 2 ] ) except assertionerror : print ( " bad value for center " ) return none # [ ( xlow,... | [
0.593843936920166,
-0.7698444128036499,
0.9987467527389526,
-0.2361993044614792,
-1.2864044904708862,
-0.5164245963096619,
-0.1488252729177475,
0.4915783107280731,
0.07402600347995758,
1.266966700553894,
-0.1043538898229599,
0.5423456430435181,
-0.5591133832931519,
-0.4462248980998993,
1... |
def dis ( matrix1, matrix2, metric : mm ) : if metric = = matrixmetric. onenorm : return np. linalg. norm ( matrix1 - matrix2, 1 ) elif metric = = matrixmetric. twonorm : return np. linalg. norm ( matrix1 - matrix2 ) # elif metric = = matrixmetric. weightednorm : # raise runtimeerror ( " weightednorm not yet implemente... | [
0.7034541964530945,
-0.3863160312175751,
0.5262544751167297,
0.7518964409828186,
-1.22694993019104,
0.46100983023643494,
0.0662815123796463,
-0.5502832531929016,
-0.6995835900306702,
0.015873344615101814,
1.136634111404419,
0.4532073140144348,
-0.16577409207820892,
0.0012039708672091365,
... |
def execution _ event _ id ( self, execution _ event _ id ) : self. _ execution _ event _ id = execution _ event _ id | [
0.12782010436058044,
-0.5197172164916992,
-0.10184480249881744,
0.6997745037078857,
0.45392686128616333,
1.6405233144760132,
0.13762687146663666,
1.1873972415924072,
0.027838416397571564,
0.42461153864860535,
-0.166889950633049,
0.20485006272792816,
0.24290648102760315,
0.8020411133766174,... |
def addmeasurementinput ( self, measured _ object ) : mes _ obj = dip. image ( measured _ object ) self. input _ queue. put ( ( self. measureflowchart. fc _ process, mes _ obj ) ) | [
-0.42164698243141174,
-0.05152846500277519,
0.655271053314209,
-0.17387449741363525,
-0.2839018702507019,
1.0043741464614868,
0.7094117403030396,
-1.0254697799682617,
1.1544243097305298,
-1.224146842956543,
-0.5412471890449524,
-0.13810889422893524,
0.09554484486579895,
1.093261480331421,
... |
def test _ get _ passed _ mins ( ) : from crowdstrikemalquery import get _ passed _ mins start _ time = datetime. datetime. now ( ) end _ time _ str = start _ time. replace ( hour = 16 ). timestamp ( ) expected _ time _ delta = 120 result = get _ passed _ mins ( start _ time, end _ time _ str ) assert expected _ time _... | [
0.20921576023101807,
-0.4909970164299011,
0.4466273784637451,
0.19012567400932312,
0.7740715146064758,
1.2718578577041626,
-0.6586267948150635,
-0.6401685476303101,
-0.3161739408969879,
-1.1001125574111938,
-0.3962041437625885,
0.6812348365783691,
-0.015102208591997623,
-0.507348358631134,... |
def save _ features ( experiment, * * prm ) : nwaveforms _ max = prm ['pca _ nwaveforms _ max'] npcs = prm ['nfeatures _ per _ channel'] for chgrp in iterkeys ( experiment. channel _ groups ) : spikes = experiment. channel _ groups [ chgrp ]. spikes # extract a subset of the saveforms. nspikes = len ( spikes ) # skip t... | [
-0.2675092816352844,
0.38507553935050964,
0.3670169413089752,
0.20858772099018097,
0.7950225472450256,
-0.6519621014595032,
0.6735566854476929,
0.6032054424285889,
0.12020818889141083,
0.10022592544555664,
-1.0247784852981567,
0.03499174118041992,
-0.6373972296714783,
-0.02694643661379814,... |
def scale ( self ) : return self. _ v _ scale | [
-0.08940834552049637,
-0.03717637434601784,
0.3575337529182434,
0.10259057581424713,
0.2713804841041565,
0.5054340958595276,
-0.6137531399726868,
-0.9012526273727417,
0.04906684532761574,
1.039339542388916,
0.2397792488336563,
0.1054561510682106,
-0.8253152370452881,
-0.30550748109817505,
... |
def cohen _ d ( x1, x2 ) : # pooled standard deviation n1, n2 = len ( x1 ), len ( x2 ) v1, v2 = np. var ( x1, ddof = 1 ), np. var ( x2, ddof = 1 ) s = np. sqrt ( ( ( n1 - 1 ) * v1 + ( n2 - 1 ) * v2 ) / float ( n1 + n2 - 2 ) ) u1, u2 = np. mean ( x1 ), np. mean ( x2 ) # standardized difference measure, cohen's d return ... | [
0.35629311203956604,
0.09547644108533859,
0.8700642585754395,
0.21348609030246735,
-0.6739867925643921,
0.41793808341026306,
0.17666023969650269,
-0.44120824337005615,
-0.7055615186691284,
0.5174995064735413,
0.0005945258890278637,
1.424961805343628,
0.7806695103645325,
-0.3015820682048797... |
def get _ longest _ length _ of _ word ( self, word ) : value = self. max _ len _ for _ each _ word. get ( word ) return value | [
0.6257651448249817,
-0.10233689099550247,
0.1754612922668457,
0.12372369319200516,
0.06274525076150894,
0.2953782379627228,
-0.7521475553512573,
-0.14891569316387177,
0.2510758340358734,
0.17351500689983368,
-0.18775047361850739,
0.2272069752216339,
-0.2222929298877716,
0.8251414895057678,... |
def test _ atomic _ base64 _ binary _ max _ length _ nistxml _ sv _ iv _ atomic _ base64 _ binary _ max _ length _ 1 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / base64binary / schema + instance / nistschema - sv - iv - atomic - base64binary - maxlength - 1. xsd ", i... | [
0.28393271565437317,
-0.12833593785762787,
0.2585327923297882,
1.348228931427002,
0.04098990559577942,
0.04865100234746933,
0.011334680020809174,
-0.1768704503774643,
0.14811080694198608,
0.41924306750297546,
-0.36493387818336487,
-0.27085617184638977,
-0.7038046717643738,
0.23807771503925... |
def group ( * args ) : total _ weight = 0 for person in args : total _ weight + = weights [ person ] return total _ weight | [
-0.07387092709541321,
0.04637547582387924,
0.5149331092834473,
-0.30090588331222534,
0.518939733505249,
0.597615122795105,
0.48551732301712036,
0.10368406027555466,
-1.3303486108779907,
0.13771481812000275,
0.414606511592865,
-0.46002814173698425,
-0.9730861186981201,
0.9317984580993652,
... |
def raster _ 4band _ s3 ( minio _ testdata _ bucket ) : return prepare _ s3 _ testfile ( minio _ testdata _ bucket, " 4band _ test. tif " ) | [
1.4402689933776855,
-0.5460057258605957,
0.2351057082414627,
-0.3975239098072052,
-0.04614555463194847,
0.9685412049293518,
0.685774028301239,
-0.46688613295555115,
0.45473986864089966,
-0.14929941296577454,
-0.2241441309452057,
0.14716775715351105,
-0.7203459739685059,
-1.2910058498382568... |
def start _ tracing _ queries ( on _ execute _ callback = none, on _ executemany _ callback = none, on _ query _ callback = none, log = none ) : global _ slow _ query _ time, _ original _ settings _ debug _ slow _ query _ time = getattr ( settings,'slow _ query _ time ', default _ slow _ query _ time ) if on _ execute ... | [
0.3522224724292755,
0.11521787196397781,
0.7872806787490845,
0.3307538330554962,
0.6215694546699524,
-0.45385339856147766,
0.2055892050266266,
-0.37207749485969543,
0.47828641533851624,
0.10409075766801834,
-0.17144902050495148,
0.016658984124660492,
-0.0666542500257492,
0.6283982396125793... |
def duplicatezeros ( self, arr : list [ int ] ) - > none : cnt = len ( [ val for val in arr if val = = 0 ] ) # cnt = len ( [ val for val in arr if val = = 0 ] ) i = 0 while i < len ( arr ) - 1 : if arr [ i ] = = 0 : arr [ : ] = arr [ 0 : i + 1 ] + [ 0 ] + arr [ i + 1 : len ( arr ) - 1 ] # print ( i ) # print ( arr ) cn... | [
0.11196364462375641,
-0.04013558104634285,
0.7452515363693237,
1.0227283239364624,
-0.06958349049091339,
0.6207075715065002,
1.379425048828125,
0.27984756231307983,
1.2673336267471313,
-0.08231310546398163,
-0.5724841952323914,
0.002161558950319886,
-0.2025299221277237,
1.6649186611175537,... |
def searchpostcontrolflow ( actioninput, user _ id, vno, priv, pid ) : # control flow of the search posts actions # ['b ','t ','e ','q ','v ','a'] if priv = ='privileged and question': if actioninput. lower ( ) = ='a': make _ post ( user _ id,'a ', pid ) elif actioninput. lower ( ) = ='b': return badge ( pid ) elif act... | [
0.3870953619480133,
-0.8854508996009827,
0.875819742679596,
0.1249711737036705,
-0.11925733834505081,
0.5014150142669678,
-0.4407571852207184,
-0.6661999821662903,
0.2036755383014679,
-0.6157205700874329,
-0.15348516404628754,
0.03786488622426987,
-0.6028081774711609,
-0.09579659253358841,... |
def _ zeros _ like _ map _ tensor ( x ) : return x | [
-0.6056670546531677,
-0.9734476804733276,
0.4370344877243042,
-0.6304002404212952,
-1.2134300470352173,
0.924864649772644,
-0.1019275039434433,
0.019278543069958687,
1.1202406883239746,
-0.6819792985916138,
-0.17298278212547302,
0.3887285590171814,
1.6629223823547363,
-1.3301609754562378,
... |
def test _ atomic _ qname _ pattern _ 2 _ nistxml _ sv _ iv _ atomic _ qname _ pattern _ 3 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / qname / schema + instance / nistschema - sv - iv - atomic - qname - pattern - 3. xsd ", instance = " nistdata / atomic / qname / sc... | [
-0.07707623392343521,
-0.46201521158218384,
0.4995794892311096,
0.10951007157564163,
-0.5672221779823303,
0.6537628769874573,
-0.8767467141151428,
-0.5247634053230286,
0.3422907292842865,
0.7626909613609314,
-0.397091269493103,
0.18681037425994873,
0.23209244012832642,
-0.5092907547950745,... |
def on _ dropdown ( self, * args ) : temp _ list = [ ] same _ item = false selected _ items = true for item in self. drop _ entry : temp _ list. append ( item. get ( ) ) if temp _ list. count ( item. get ( ) ) > 1 : same _ item = true if item. get ( ) = = self. drop _ options [ 0 ] : selected _ items = false if selecte... | [
0.4350995123386383,
-0.7263550758361816,
0.5383650660514832,
1.075013518333435,
1.2370784282684326,
0.7142365574836731,
0.6199992895126343,
-0.4816219210624695,
0.9492974877357483,
0.8134220838546753,
-0.3937188982963562,
-0.30796197056770325,
-0.5432765483856201,
0.3512547016143799,
-0.... |
def reduce ( self, start = 0, end = none ) : if end is none : end = self. _ capacity if end < 0 : end + = self. _ capacity end - = 1 return self. _ reduce _ helper ( start, end, 1, 0, self. _ capacity - 1 ) | [
-0.6356279850006104,
0.4006969630718231,
0.636280357837677,
0.8075872659683228,
0.4502275288105011,
-1.0719890594482422,
0.6944013237953186,
0.5549846291542053,
-0.9990584254264832,
-0.2164713740348816,
-0.4466274678707123,
0.5026471018791199,
-0.769396185874939,
-0.4482443034648895,
0.8... |
def check _ repeated ( self, argument, from _ tty ) - > bool : # don't care unless it's interactive use if not from _ tty : return false lines = gdb. execute ( " show commands ", from _ tty = false, to _ string = true ) lines = lines. splitlines ( ) # no history if not lines : return false last _ line = lines [ - 1 ] n... | [
-0.41965651512145996,
0.7597704529762268,
0.7543412446975708,
0.006751425098627806,
0.23610535264015198,
-0.2222055345773697,
0.05223904922604561,
-0.612373948097229,
0.09538177400827408,
0.030214276164770126,
-0.3334300220012665,
0.3805476427078247,
-0.08808454871177673,
0.783146023750305... |
def secondary _ connection _ string ( self ) - > str : return pulumi. get ( self, " secondary _ connection _ string " ) | [
0.880990207195282,
-1.4434733390808105,
0.49451202154159546,
0.5082085132598877,
-0.015833048149943352,
0.3166351318359375,
-0.11843086034059525,
-0.7749646306037903,
0.001576773589476943,
-0.570564866065979,
0.2374611794948578,
1.2005927562713623,
0.2666871249675751,
-1.427452564239502,
... |
def get _ ranked _ splits ( self, splits ) : return sorted ( splits, key = lambda x : self. information _ gain ( x [ 0 ], x [ 1 ] ), reverse = true ) | [
-0.7636830806732178,
0.19340910017490387,
0.4053521752357483,
0.6117355227470398,
0.44606101512908936,
-0.058844488114118576,
-0.1900452971458435,
-0.05865074321627617,
-0.42216944694519043,
-0.22429852187633514,
-0.4527340829372406,
0.7198953032493591,
-0.12657062709331512,
-0.44785737991... |
def constructexonstructure ( cdsseq, geneseq, listhits ) : blocks = [ ] counthit = 0 while not cover _ wholecds ( blocks, len ( cdsseq ) ) : i = 0 while i < len ( listhits ) : listremove = [ ] currenthit = treathit ( listhits [ i ], cdsseq, geneseq ) if len ( currenthit )! = 0 : if len ( blocks ) > 0 : for j in range (... | [
-0.10204841941595078,
-0.8295427560806274,
1.0117613077163696,
-0.5877491235733032,
-1.0891814231872559,
-0.49727433919906616,
1.2918719053268433,
0.22002564370632172,
-0.398257851600647,
0.3082241714000702,
-0.4659722149372101,
0.13105803728103638,
-0.49154409766197205,
-0.192857548594474... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.