text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def hmip _ config _ fixture ( ) - > configtype : entry _ data = { hmipc _ hapid : hapid, hmipc _ authtoken : auth _ token, hmipc _ name : " ", hmipc _ pin : happin, } return { hmipc _ domain : [ entry _ data ] } | [
-0.15779830515384674,
0.3149262070655823,
0.4033120572566986,
-0.42503657937049866,
0.3109622597694397,
-0.2505849301815033,
-0.667686939239502,
0.7067759037017822,
0.37629222869873047,
0.2166978269815445,
-0.8401082158088684,
0.04672214761376381,
-0.09212840348482132,
-0.09804628789424896... |
def main _ masks ( self, size, wsi _ height, wsi _ width ) : scale = self. get _ scale ( size, wsi _ height, wsi _ width ) for cls in self. classes : self. main _ mask ( cls, scale ) | [
-0.6820746064186096,
-0.6105291247367859,
0.3172033727169037,
0.8493979573249817,
0.06995898485183716,
-0.05898674204945564,
0.5128235816955566,
-1.489237666130066,
0.30364179611206055,
0.44776275753974915,
0.29326969385147095,
0.6397364735603333,
0.504115104675293,
1.345670461654663,
-0... |
def checkpassbyvalue ( filenode, releases ) : csgen = csgen ( ) # do not add any more entries to this whitelist. # http : / / crbug. com / 233439 type _ whitelist = ['pp _ arrayoutput ','pp _ completioncallback ','pp _ ext _ eventlistener ','pp _ floatpoint ','pp _ point ','pp _ touchpoint ','pp _ var'] nodes _ to _ ch... | [
-0.5136244297027588,
-0.017258675768971443,
0.8313546776771545,
0.717903196811676,
0.14552462100982666,
0.3760676085948944,
0.7848496437072754,
-0.31829994916915894,
-0.6744731068611145,
0.5402622222900391,
0.5141980648040771,
0.18671230971813202,
-0.5392399430274963,
0.9392185807228088,
... |
def filter _ accents ( text ) : # 32 - 127 basic latin ( the range of a - za - z # 128 - 591 = [ latin - 1 supplement, latin extended - a, latin extended - b ] return [ char for char in text. lower ( ) if ord ( char ) in range ( 128, 592 ) ] | [
0.8558108806610107,
-0.9086372256278992,
0.20008663833141327,
-0.3629310727119446,
-0.8881356120109558,
0.48147544264793396,
-0.34355613589286804,
-0.29260462522506714,
1.0469541549682617,
0.5849536657333374,
-0.1288381814956665,
0.5801454782485962,
-0.536806046962738,
-0.27221518754959106... |
def test _ list _ decimal _ enumeration _ 3 _ nistxml _ sv _ iv _ list _ decimal _ enumeration _ 4 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / decimal / schema + instance / nistschema - sv - iv - list - decimal - enumeration - 4. xsd ", instance = " nistdata / list / ... | [
-0.9063113331794739,
-0.46135544776916504,
0.6757839322090149,
0.9095302224159241,
0.184348464012146,
-0.025955399498343468,
-0.001800497411750257,
0.5433266758918762,
0.9759065508842468,
0.27900293469429016,
-0.8490130305290222,
-0.7742710709571838,
-0.014032597653567791,
-0.0257578287273... |
def _ get _ user _ org _ repos ( self ) : url = " % s / user / repos " % self. _ api _ url data = { " affiliation " : " organization _ member " } repo _ data = self. get _ all _ pages ( url, data ) org _ repo = [ ] if repo _ data : for repo in repo _ data : org _ repo. append ( " % s / % s " % ( repo ['owner'] ['login'... | [
-0.5123473405838013,
0.3779425323009491,
0.6651542782783508,
0.4241408705711365,
0.3275211751461029,
0.17011050879955292,
-0.39032384753227234,
-0.3283446133136749,
0.42442721128463745,
0.38952720165252686,
-0.03588363900780678,
-0.3980168402194977,
0.5927276611328125,
-0.1740238517522812,... |
def get _ entity _ sentence ( text, hpos, tpos ) : text _ len = len ( text ) # while hpos > = 0 and text [ hpos ]! ='\ n'and unicodedata. category ( text [ hpos ] )! ='po': while hpos > = 0 and text [ hpos ]! ='\ n': hpos - = 1 if text [ hpos ] = ='\ n': hpos + = 1 while tpos < text _ len and text [ tpos ]! ='\ n': tpo... | [
-0.158875972032547,
-0.9967047572135925,
0.7066879272460938,
-0.48322948813438416,
-0.05279913172125816,
-0.7654891014099121,
-0.536883533000946,
0.623746395111084,
-0.8504987955093384,
0.5722725987434387,
-0.09094905853271484,
-0.9818428158760071,
-0.22990292310714722,
0.7806667685508728,... |
def test _ call _ on _ the _ fly _ blast _ db ( self ) : p = blasttaxonassigner ( { \'reference _ seqs _ filepath': self. reference _ seqs _ fp, \'id _ to _ taxonomy _ filepath': self. id _ to _ taxonomy _ fp } ) actual = p ( self. input _ seqs _ fp ) self. assertequal ( actual, self. expected1 ) | [
-0.3400411903858185,
-0.559272825717926,
0.36946430802345276,
0.528301477432251,
0.37740910053253174,
0.7805705666542053,
0.21161828935146332,
-0.1956174671649933,
-0.06556802988052368,
0.23597313463687897,
-0.15137240290641785,
-0.488816499710083,
-0.7558612823486328,
-0.2665826678276062,... |
def sampling _ algorithm ( self, x, y ) : n _ to _ sample = self. det _ n _ to _ sample ( self. proportion ) if n _ to _ sample = = 0 : return self. return _ copies ( x, y, " sampling is not needed " ) # standardizing the data x _ orig, y _ orig = x, y scaler = standardscaler ( ) x = scaler. fit _ transform ( x ) y = y... | [
0.20352980494499207,
-0.4498017430305481,
0.6876888871192932,
0.35327592492103577,
-0.5368837714195251,
0.19365574419498444,
-0.9136006832122803,
-0.7939824461936951,
-0.5224191546440125,
1.165428876876831,
0.31607329845428467,
0.33417361974716187,
0.3467722535133362,
0.32791823148727417,
... |
def get _ job _ information ( self, sge _ id ) : msg = {'action':'get _ job _ instance _ information ','args': [ sge _ id ] } response = self. requester. send _ request ( msg ) return response | [
-1.0358614921569824,
0.5248624682426453,
0.45102354884147644,
-0.03564313054084778,
-0.5286474227905273,
0.17998720705509186,
0.22173090279102325,
-0.11717117577791214,
-0.4856571555137634,
0.09252436459064484,
-0.4815647602081299,
0.7910647392272949,
-1.01137375831604,
0.36554771661758423... |
def get _ one _ order ( self, order _ id ) : if order _ id not in orders : return invalid _ order ( ) order = orders. get ( order _ id ) return order | [
0.22325220704078674,
-0.00982589740306139,
0.09854040294885635,
0.640656590461731,
0.9898309707641602,
-0.9734145998954773,
-1.6140037775039673,
-0.3822525441646576,
1.288744568824768,
-0.15302792191505432,
0.6856175065040588,
0.6299735903739929,
-0.4480219781398773,
0.5446268916130066,
... |
def position _ in _ branch _ to _ large _ switch ( self, large _ branch, paths _ on _ side, side ) : total = self. paths _ left _ or _ right _ of _ large _ branch ( - large _ branch, ( side + 1 ) % 2 ) # todo : collapsed cusp return total + paths _ on _ side | [
-0.434366375207901,
0.179879829287529,
0.5404784083366394,
-0.28717944025993347,
-0.08870416134595871,
-0.06949768215417862,
-0.03983123227953911,
0.49085742235183716,
0.3177533447742462,
0.2489859163761139,
-0.6494324207305908,
-1.3754159212112427,
-0.2855493128299713,
0.5759256482124329,... |
def populate _ player _ from _ char ( char, game _ board ) : player _ id = parser. convert _ char _ to _ player _ id ( char ) player = parser. find _ player ( player _ id, game _ board ) if player is none and player _ id is not 0 : player = humplayer ( player _ id ) game _ board. add _ player ( player ) logger. debug (... | [
0.17054390907287598,
0.20731951296329498,
0.6007035970687866,
-0.2592346668243408,
1.0929545164108276,
-0.008029928430914879,
-0.011717252433300018,
-0.4858698844909668,
-0.04126304015517235,
0.08555852621793747,
-0.2297668159008026,
-0.6789551973342896,
-0.30147865414619446,
0.18141950666... |
def sum _ two ( num1, num2 = 8 ) : total = num1 + num2 print ( num1, " + ", num2, " = ", total ) return num1 + num2 | [
-0.2439229041337967,
-0.5319879651069641,
0.6499977707862854,
0.5557409524917603,
-0.43679434061050415,
0.551719069480896,
-0.2577977478504181,
-1.0617635250091553,
-0.6297610998153687,
-0.04261182248592377,
-0.7071759104728699,
0.9897782206535339,
-0.20958121120929718,
-0.4803341627120971... |
def set _ position ( self, vec ) : # todo : complete parameter documentation self. position = _ convert2tvec3 ( vec ) | [
-0.5456067323684692,
-0.2749677896499634,
0.08671723306179047,
0.07180222123861313,
0.31639307737350464,
0.42053520679473877,
0.4338420331478119,
-0.14775195717811584,
-0.11945146322250366,
0.5815243721008301,
-1.0604143142700195,
0.08461300283670425,
-0.042550742626190186,
0.0310685262084... |
def gateway _ port ( self, gateway _ port ) : self. _ gateway _ port = gateway _ port | [
0.48011982440948486,
-0.5355227589607239,
-0.028181344270706177,
-0.15921252965927124,
0.3758906126022339,
1.173268437385559,
1.0248408317565918,
0.4203551411628723,
-0.8629999160766602,
-0.03971545398235321,
-0.3929690420627594,
-0.6159563064575195,
-1.114855170249939,
0.9791715741157532,... |
def subscribe ( self, f ) : self. add _ handler ( f, type ='subscribe') | [
0.45672884583473206,
0.5502040982246399,
0.3902803361415863,
1.3629697561264038,
0.02413173019886017,
0.5585907101631165,
-0.3764110505580902,
0.19404196739196777,
-0.8669047355651855,
-1.2631858587265015,
-0.9946833252906799,
0.6440234184265137,
0.575869083404541,
0.354624480009079,
-0.... |
def test _ atomic _ hex _ binary _ enumeration _ 3 _ nistxml _ sv _ iv _ atomic _ hex _ binary _ enumeration _ 4 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / hexbinary / schema + instance / nistschema - sv - iv - atomic - hexbinary - enumeration - 4. xsd ", instance ... | [
-0.8100396990776062,
-0.02455410733819008,
0.7094730138778687,
0.5173346996307373,
-0.010736451484262943,
0.41317838430404663,
-0.23920349776744843,
0.015967663377523422,
0.29775387048721313,
0.21800564229488373,
-0.43555954098701477,
-1.0039515495300293,
-0.29796403646469116,
0.0224835649... |
def test _ reincarnation ( self, client ) : name = utils. gen _ str ( ) dataset = client. set _ dataset ( name = name, type = " local " ) version1 = dataset. create _ version ( path = _ _ file _ _ ) version2 = dataset. create _ version ( path = _ _ file _ _ ) assert version1. id = = version2. id versions = dataset. get... | [
0.06849031895399094,
-0.42757874727249146,
0.3730745017528534,
0.2891688644886017,
0.2718854546546936,
0.42773744463920593,
-0.19054901599884033,
-0.0685923621058464,
-0.569654643535614,
-0.4160327613353729,
-0.8164471387863159,
0.3581801950931549,
0.2754967212677002,
-0.3318680226802826,
... |
def set _ profile _ smbc ( life _ off, check _ cloud _ env, request, memory, store ) : smbc _ groups = [ " dialog _ compile _ smbc _ nikko _ test " ] associate _ group ( memory, request, store, smbc _ groups ) | [
0.374656617641449,
0.30586519837379456,
0.1680382341146469,
1.4676748514175415,
0.12034884095191956,
-0.18924807012081146,
0.548349916934967,
-0.38694170117378235,
0.4587581157684326,
0.4656568169593811,
-0.6453311443328857,
1.169869065284729,
-1.7836337089538574,
0.9777122139930725,
-0.... |
def scale _ price ( self, df, by _ col, new _ col, price _ col ='price _ numeric') : self. df [ new _ col ] = self. df [ [ price _ col, by _ col ] ]. apply ( lambda x : util. div ( * x ), axis = 1 ) | [
-0.996246337890625,
0.5545543432235718,
0.9038771390914917,
1.095928430557251,
0.5643740296363831,
-0.02866276353597641,
-0.18598291277885437,
-0.020283473655581474,
-1.1495184898376465,
1.6215194463729858,
0.04094633460044861,
0.2944287359714508,
0.4582171142101288,
-0.5596702694892883,
... |
def fdr _ threshold ( z _ vals, alpha ) : z _ vals _ = - np. sort ( - z _ vals ) p _ vals = norm. sf ( z _ vals _ ) n _ samples = len ( p _ vals ) pos = p _ vals < alpha * np. linspace (. 5 / n _ samples, 1 -. 5 / n _ samples, n _ samples ) if pos. any ( ) : return ( z _ vals _ [ pos ] [ - 1 ] - 1. e - 8 ) else : retur... | [
-0.13360042870044708,
-0.12463845312595367,
0.43117964267730713,
-0.15236254036426544,
-0.22429493069648743,
-0.5645366907119751,
0.1756390631198883,
-0.23953032493591309,
0.3130415081977844,
-0.009533933363854885,
0.3908538520336151,
-0.02407291904091835,
-1.0064302682876587,
0.6924313902... |
def movezeroes ( self, nums : list [ int ] ) - > none : # def reverse ( nums ) : # start = 0 # end = len ( nums ) - 1 # while end > start : # nums [ end ], nums [ start ] = nums [ start ], nums [ end ] # start + = 1 # end - = 1 # return nums # count = 0 # previous = none # for index in range ( len ( nums ) ) : # if num... | [
-0.3143543601036072,
-0.5567601919174194,
0.9473269581794739,
0.45777207612991333,
0.36386093497276306,
-0.24630345404148102,
1.5957112312316895,
0.29144468903541565,
-0.11610985547304153,
-0.013386787846684456,
0.004249993711709976,
0.7410486340522766,
-0.5506956577301025,
1.1567293405532... |
def test _ list _ decimal _ max _ length _ 1 _ nistxml _ sv _ iv _ list _ decimal _ max _ length _ 2 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / decimal / schema + instance / nistschema - sv - iv - list - decimal - maxlength - 2. xsd ", instance = " nistdata / list / ... | [
-0.43540680408477783,
-0.07562599331140518,
0.42020896077156067,
0.9133488535881042,
-0.13734102249145508,
0.18251360952854156,
-0.8012189865112305,
0.4435148537158966,
0.8493877053260803,
-0.1491924226284027,
-1.1482840776443481,
-0.20971350371837616,
0.27862411737442017,
0.42594376206398... |
def extractauthinfo ( self, appauth _ file _ path ) : with open ( appauth _ file _ path ) as f : auth _ info = json. load ( f ) privkey _ save _ path = str ( appauth _ file _ path. parent ) + " / " + str ( appauth _ file _ path. stem ) + " _ privkey " with open ( privkey _ save _ path,'w') as f : f. write ( auth _ info... | [
-0.690473735332489,
-0.7477787137031555,
0.5832322239875793,
0.547420859336853,
-0.48741424083709717,
-0.07109754532575607,
-0.44378378987312317,
-0.055547259747982025,
-0.4956967830657959,
1.0075663328170776,
-0.9202388525009155,
0.15120775997638702,
0.5213943123817444,
0.2613418400287628... |
def open _ file ( path ) : if os. path. exists ( path ) : return open ( path ) else : print ( " error! file path doesn't exist. " ) sys. exit ( ) | [
0.2514156997203827,
-0.024403730407357216,
0.4850930869579315,
0.0036987357307225466,
-0.2725222408771515,
1.363000512123108,
0.5704255104064941,
0.37065091729164124,
-0.6405144333839417,
-0.17951202392578125,
1.5718709230422974,
-0.6914175152778625,
0.16511259973049164,
-0.717532277107238... |
def delta _ sigma ( graph, c1, c2, p _ t, nodes2id ) : n = graph. number _ of _ nodes ( ) r _ c1c2 = distance _ com1 _ com2 ( graph, c1, c2, p _ t, nodes2id ) return ( 1 / n ) * len ( c1 ) * len ( c2 ) * r _ c1c2 * * 2 / ( len ( c1 ) + len ( c2 ) ) | [
0.3412590026855469,
-0.3954034149646759,
0.6150406002998352,
-0.13114184141159058,
0.3639805316925049,
0.7859230041503906,
0.0028906564693897963,
0.009318334050476551,
-1.0030570030212402,
0.5999648571014404,
-0.2245490401983261,
0.5601089596748352,
-0.1401410698890686,
-0.3763977587223053... |
def test _ atomic _ base64 _ binary _ length _ 3 _ nistxml _ sv _ iv _ atomic _ base64 _ binary _ length _ 4 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / base64binary / schema + instance / nistschema - sv - iv - atomic - base64binary - length - 4. xsd ", instance = "... | [
0.3787919580936432,
-0.1741422861814499,
0.38626351952552795,
0.816599428653717,
0.33322784304618835,
0.032870542258024216,
0.1634720116853714,
-0.20872777700424194,
-0.0802764892578125,
0.37628573179244995,
-0.5556051135063171,
-0.4407443702220917,
-0.6601570248603821,
-0.0220298413187265... |
def unequalgridcrossing ( self, c1, c2, outc1, outc2 ) : if not ( isinstance ( outc1, int ) or isinstance ( outc2, int ) ) : raise typeerror ( " number of individuals to swap must be of type int " ) grid1, grid2 = self. communities [ c1 ]. grid, self. communities [ c2 ]. grid if ( outc1 > grid1. size or outc2 > grid2. ... | [
-0.49696287512779236,
0.18099963665008545,
1.0160266160964966,
-0.5304825305938721,
-0.7606478333473206,
0.48031479120254517,
0.6697797775268555,
0.1611630916595459,
-0.7114413380622864,
0.8437708020210266,
0.3686501979827881,
1.0447214841842651,
-0.8436274528503418,
-0.1493711769580841,
... |
async def author _ name ( self, ctx : context, author _ name : str ) - > none : embed = self. embeds [ ctx. author ]. embed embed. set _ author ( name = author _ name, url = embed. author. url, icon _ url = embed. author. icon _ url ) await ctx. send ( " embeds author updated. " ) | [
-0.5288258194923401,
-0.650730550289154,
0.5059682726860046,
0.7154302000999451,
-0.7095630168914795,
-0.008871040306985378,
0.07547911256551743,
0.9632213115692139,
0.5726828575134277,
0.5612571835517883,
-0.9822844862937927,
1.0801571607589722,
0.41504013538360596,
-0.0012875857064500451... |
def _ _ init _ _ ( self, word _ list = none ) : super ( markogram, self ). _ _ init _ _ ( ) # initialize this as a new dict # add properties to track useful word counts for this histogram self. types = 0 # count of distinct word types in this histogram self. tokens = 0 # total count of all word tokens in this histogram... | [
0.8593342900276184,
0.8586605191230774,
0.6563045382499695,
0.2034178376197815,
0.20034684240818024,
-0.6074233651161194,
0.23399868607521057,
1.2510217428207397,
0.35591545701026917,
0.12277320772409439,
-0.5923750996589661,
0.1473630964756012,
-0.547397792339325,
1.9800870418548584,
-0... |
def clean ( self ) : cleaned _ data = super ( budgetestimateform, self ). clean ( ) repeat = cleaned _ data. get ('repeat') occurs = cleaned _ data. get ('occurring _ month') if repeat and occurs : msg = u'must select only one : repeat or occurring month'self. _ errors ['repeat'] = self. error _ class ( [ msg ] ) self.... | [
-0.04885781183838844,
-0.009635362774133682,
0.7171576023101807,
-0.0719304159283638,
0.0006601398927159607,
0.6621536612510681,
0.6896229386329651,
0.5355451703071594,
0.026197968050837517,
0.518031120300293,
0.5224595069885254,
0.9485373497009277,
-0.10571406781673431,
0.7107185125350952... |
def static _ get _ formatted _ instructions ( fixtures _ info, logger, sh, fixtures _ info _ cols, sport, start _ date, end _ date, ss, capital, use _ orders _ for _ instrs, kick _ off _ as _ dt, extra _ info = none ) : try : if isinstance ( start _ date, datetime ) : start _ date = start _ date. strftime ('% y - % m -... | [
-0.8627583384513855,
0.7481287121772766,
0.6598829030990601,
0.21302014589309692,
-0.3267201781272888,
-0.8416786193847656,
0.471558153629303,
-0.40843233466148376,
-0.0759119987487793,
-0.09764589369297028,
1.0223278999328613,
0.27425652742385864,
0.2677089273929596,
0.4626825749874115,
... |
def listdeleted ( ctx, # optional main parameter includevirtualvolumes = none ) : cli _ utils. establish _ connection ( ctx ) ctx. logger. info ( " " " : " " " " " " includevirtualvolumes = " " " + str ( includevirtualvolumes ) + " " " ; " " " + " " ) try : _ listdeletedvolumesresult = ctx. element. list _ deleted _ vo... | [
0.6524533033370972,
-1.3153377771377563,
0.8926358222961426,
0.648841381072998,
0.2575834095478058,
0.5235012173652649,
-0.12064298987388611,
0.24397236108779907,
1.1052603721618652,
-0.011663517914712429,
0.10102217644453049,
1.4432754516601562,
-0.5315396785736084,
0.08999732881784439,
... |
def index ( request ) : # render the html template index. html with the data in the context variable return render ( request,'index. html ', ) | [
0.09855903685092926,
0.21799945831298828,
0.07746287435293198,
0.10714063793420792,
0.09657970070838928,
0.5105865597724915,
0.1958271712064743,
0.9293218851089478,
-0.0628909021615982,
-0.32667991518974304,
0.6129045486450195,
-0.016900857910513878,
-0.11758852750062943,
-0.42353710532188... |
def volume _ ratio ( vol _ cube ) : time, depth, lat, lon = np. shape ( vol _ cube. data ) volume _ ratio _ data = np. zeros ( ( time, depth, lat, lon ) ) for j in range ( 0, lon ) : for i in range ( 0, lat ) : for k in range ( 0, depth ) : volume _ ratio _ data [ 0, k, i, j ] = ( 1. 0 / vol _ data [ 0, k, i, j ] ) vol... | [
-0.33204910159111023,
-0.5841741561889648,
0.580230712890625,
-0.4915447235107422,
0.2552577257156372,
-0.05091220885515213,
-0.15988169610500336,
0.4235121011734009,
-0.2608391046524048,
0.8072548508644104,
0.3844343423843384,
-0.05848272517323494,
-0.5422646999359131,
0.21366922557353973... |
def test _ top _ window ( ) : z0 _ dis = 0. 0 lam _ z = 1. 0 a, b = 3, 1 a _ bf, b _ bf, c _ bf = sbp. calc _ bf _ win _ params ( z0 _ dis, 1, lam _ z, a, b ) assert a _ bf = = 3. 0 assert b _ bf = = 1. 0 assert c _ bf > z0 _ dis assert c _ bf = = 1. 5 | [
0.31306707859039307,
-0.26619648933410645,
0.6851344704627991,
0.9483957290649414,
0.4920453727245331,
0.49597498774528503,
1.080896258354187,
-0.07050247490406036,
0.006751669570803642,
-0.6162180304527283,
0.208095520734787,
0.3130234479904175,
-0.6532774567604065,
1.2058310508728027,
... |
def findtan ( point, circ ) : x1, y1 = point x2, y2, radius = circ hypotenuse = sqrt ( ( x2 - x1 ) * * 2 + ( y2 - y1 ) * * 2 ) return degrees ( asin ( radius / hypotenuse ) ) | [
0.42096635699272156,
-0.030329231172800064,
0.4083389639854431,
-0.6001449823379517,
-0.19504058361053467,
-0.4007335901260376,
0.08948233723640442,
-0.12061388045549393,
-1.14964759349823,
0.42663097381591797,
-0.09840387105941772,
-0.06203179061412811,
-0.2798303961753845,
-0.34116300940... |
def ipwho ( self, renew = false ) : if " asn _ query _ status " in self. _ response and not renew : return self. _ response try : obj = ipwhois ( self. _ ip ) self. _ rawresponse = obj. lookup _ whois ( inc _ nir = true ) self. _ response [ " asn _ query _ status " ] = " ok " except : self. _ response [ " asn _ query _... | [
-0.9781399369239807,
-0.7880968451499939,
1.0629487037658691,
-0.4386245608329773,
-0.8767096400260925,
-0.057769957929849625,
-0.650351345539093,
-0.3094431161880493,
0.8752532005310059,
-0.007555193267762661,
-0.08770796656608582,
-0.4255436658859253,
0.047280728816986084,
-0.47285172343... |
def get _ meps _ folder _ dir ( folder ) : return os. path. join ( expanduser ( " ~ " ), " meps ", " meps _ data ", folder ) | [
-0.2195495218038559,
-0.011192601174116135,
0.25170475244522095,
-0.5561674237251282,
-0.6984074711799622,
1.3593854904174805,
0.17561295628547668,
0.3897603452205658,
0.09253206849098206,
-0.9847065806388855,
0.6603266596794128,
-0.06028863415122032,
-0.26868510246276855,
0.83163309097290... |
def update ( self, bullets, sensor _ data ) : super ( ai _ player, self ). update ( bullets, sensor _ data ) decision _ vector = self. _ brain. think ( self, bullets, sensor _ data ) self. _ perform _ decisions ( decision _ vector, bullets ) | [
-0.8861402869224548,
-0.8095244765281677,
0.32416048645973206,
0.040796585381031036,
0.7682446241378784,
0.6411358118057251,
-0.44567734003067017,
-0.6364848613739014,
0.24874663352966309,
0.3758924603462219,
-0.45054730772972107,
0.4430803954601288,
-0.10276024043560028,
-0.05342445895075... |
def find _ link ( reader, search _ range, separation, diameter = none, memory = 0, minmass = 0, noise _ size = 1, smoothing _ size = none, threshold = none, percentile = 64, before _ link = none, after _ link = none, refine = false, * * kwargs ) : shape = reader [ 0 ]. shape ndim = len ( shape ) if smoothing _ size is ... | [
0.07493023574352264,
0.05536544695496559,
0.7937144041061401,
0.42279404401779175,
-0.23519960045814514,
-1.0538432598114014,
0.5240483283996582,
-0.5094678401947021,
0.047060903161764145,
-0.6503349542617798,
0.20610882341861725,
0.43991339206695557,
-0.17958134412765503,
0.74536275863647... |
def times ( self ) : ts = filestoragemanagersingleton. get ( self. _ id ) return ts. times ( ) | [
-0.14494380354881287,
0.4499113857746124,
0.43499302864074707,
-0.6546199321746826,
0.980633020401001,
-1.1054903268814087,
-0.7325202226638794,
-0.08314619213342667,
-0.2600635886192322,
0.4141578674316406,
-1.036502480506897,
-0.509936511516571,
0.3894873261451721,
0.6581140160560608,
... |
def reverse _ vowels ( s ) : vowels ='aeiouaeiou's _ lst = list ( s ) i = 0 j = len ( s ) - 1 while i < j : if s _ lst [ i ] not in vowels : i + = 1 elif s _ lst [ j ] not in vowels : j - = 1 else : s _ lst [ i ], s _ lst [ j ] = s _ lst [ j ], s _ lst [ i ] i + = 1 j - = 1 return " ". join ( s _ lst ) | [
-0.5973998308181763,
-0.17344200611114502,
0.4767760634422302,
-0.5070472955703735,
-0.07816927134990692,
-0.7433061599731445,
0.11342308670282364,
1.4466978311538696,
0.7489165663719177,
0.5904384851455688,
-0.9760715365409851,
0.45913252234458923,
-0.5191280245780945,
-1.1231987476348877... |
def png _ decode _ ihdr ( chunk _ data ) : return struct. unpack ( '! 2i5b ', chunk _ data ) | [
-0.15821583569049835,
-0.797997236251831,
0.38497108221054077,
-0.4813820421695709,
-0.6412580013275146,
-0.2210695445537567,
-0.29308927059173584,
-0.5150737166404724,
-0.5694438219070435,
-0.36881309747695923,
-0.7193168997764587,
-0.013763646595180035,
-1.2476826906204224,
-1.1142687797... |
def get _ county _ data ( self, state, county = " * " ) : df = self. census _ data. get _ data ( state = state, county = county ) return df | [
0.30110636353492737,
0.3796568810939789,
0.3484770357608795,
0.8300713300704956,
-0.40408071875572205,
0.09680114686489105,
-0.5828536152839661,
0.029624927788972855,
-0.5282891392707825,
-0.8092873096466064,
0.1819562166929245,
1.4499919414520264,
0.521925151348114,
-0.07412971556186676,
... |
def setup _ embeddings ( self ) : with vs. variable _ scope ( " embeddings " ) : self. embeddings = tf. variable ( tf. constant ( 0. 0, shape = [ self. config. vocab _ size, self. config. embedding _ size ] ), trainable = false, name = " embeddings " ) embedding _ init = self. embeddings. assign ( self. np _ embeddings... | [
0.2573164105415344,
0.1707928329706192,
0.5328407883644104,
-0.25526177883148193,
0.3412169814109802,
-0.004874395672231913,
0.6030975580215454,
-0.018274925649166107,
0.29159820079803467,
0.27871015667915344,
-0.7558338046073914,
-0.008520087227225304,
-0.16061843931674957,
0.314545124769... |
def add _ keywords ( self, response : response ) - > list : categories = response. xpath ( " / / div [ @ class ='ncd - data otherdata - categories display - block indented'] / / a / text ( ) " ). getall ( ) try : # keyword may not exist categories. extend ( response. xpath ( " / / div [ @ class ='ncd - data otherdata -... | [
-0.057023461908102036,
0.22183945775032043,
0.7388426661491394,
0.18933458626270294,
0.29807719588279724,
-0.015358786098659039,
-0.9038097858428955,
-0.5601862072944641,
1.0475831031799316,
0.45687103271484375,
0.4617825150489807,
-0.901042640209198,
0.24774886667728424,
1.718237757682800... |
def rankkeywords ( docs ) : kwpcsr = keywordextractor ( docs ) words _ occurences = kwpcsr. count _ keywords ( ) # print ('occurences for each stemmed and lemmatized keyword :') # print ( words _ occurences ) # print ('sorted by descending occurence :') sorted _ words = sorted ( words _ occurences, key = words _ occure... | [
0.4129716753959656,
-0.7290208339691162,
0.5707449316978455,
-0.041958101093769073,
0.07518436759710312,
-0.15948337316513062,
0.3365033268928528,
0.5610456466674805,
-0.5754730701446533,
-0.0026647276245057583,
0.3594871163368225,
0.1813032627105713,
-0.8185098767280579,
1.204011559486389... |
def annotate _ heatmap ( im, data = none, valfmt = " { x :. 2f } ", textcolors = [ " black ", " white " ], threshold = none, * * textkw ) : if not isinstance ( data, ( list, np. ndarray ) ) : data = im. get _ array ( ) # normalize the threshold to the images color range. if threshold is not none : threshold = im. norm ... | [
0.38545042276382446,
-0.35201624035835266,
0.6174589395523071,
0.0915546789765358,
-0.9932485818862915,
-1.0752507448196411,
-0.5090881586074829,
0.4154396057128906,
0.6052542924880981,
0.22672945261001587,
0.6976756453514099,
0.5801339149475098,
0.36143970489501953,
0.41440853476524353,
... |
def _ handle _ scalar _ ops _ v2 ( self, wrapped _ scalar _ f, name, tensor, family = none, step = none ) : # pylint : disable = unused - argument vals = self. _ summary _ values ( step ) if vals : self. log. debug ( " summary values via scalar : % s ", vals ) for tag, val in vals. items ( ) : if val is not none : wrap... | [
0.30999046564102173,
-0.11089858412742615,
0.3064168691635132,
0.7951897978782654,
-0.40534940361976624,
-1.0156890153884888,
0.16083930432796478,
0.04550406336784363,
-0.7600404620170593,
0.16172319650650024,
0.0545266792178154,
0.41569578647613525,
1.5006706714630127,
0.37504902482032776... |
def trove _ dashboard _ git _ post _ install ( ) : # need to retrieve the python install dir from python juju _ log ('get _ python _ lib : { } '. format ( get _ python _ lib ( ) ) ) juju _ log ('getsitepackages : { } '. format ( site. getsitepackages ( ) [ 0 ] ) ) src _ dir = site. getsitepackages ( ) [ 0 ] copy _ tree... | [
0.5027733445167542,
0.44922277331352234,
0.8468422293663025,
0.37668147683143616,
0.1346377730369568,
-0.04322735592722893,
0.415740966796875,
0.44201964139938354,
-0.026970142498612404,
0.6162884831428528,
-0.1724412739276886,
-0.0648212805390358,
-0.5400951504707336,
0.000226659161853604... |
def name ( self ) : return self. ticker | [
-0.11764669418334961,
-0.8129534125328064,
0.3560420572757721,
-0.3019157946109772,
-0.7512311935424805,
0.9128357172012329,
0.5842915177345276,
-1.0967894792556763,
-0.1855688989162445,
0.3087197244167328,
-0.5485361218452454,
0.42355650663375854,
0.21244192123413086,
0.3898426294326782,
... |
def prepare _ request _ body ( self, username, password, body ='', scope = none, * * kwargs ) : return prepare _ token _ request ('password ', body = body, username = username, password = password, scope = scope, * * kwargs ) | [
-1.2927253246307373,
-0.09433939307928085,
0.6130893230438232,
0.05538053438067436,
-0.05214397981762886,
-0.8861292004585266,
-1.390427827835083,
-0.3092992901802063,
0.7395713329315186,
0.2772127687931061,
-0.5326054692268372,
1.1519231796264648,
-0.16245609521865845,
-0.2176557332277298... |
def custom _ method ( self, email ) : print ( self. first, " ", self. last ) self. print _ movies ( ) print ( ) | [
-0.8455411791801453,
-0.22635291516780853,
0.27091488242149353,
-0.20877914130687714,
0.622249960899353,
-0.3542761206626892,
0.15368402004241943,
-0.3068726360797882,
-0.9121493101119995,
-0.1392507553100586,
0.42237159609794617,
1.7976716756820679,
-0.4753672182559967,
1.0281144380569458... |
async def async _ reset _ code _ slot _ if _ pin _ unknown ( hass, lock _ name : str, code _ slots : int, start _ from : int ) - > none : for x in range ( start _ from, start _ from + code _ slots ) : pin _ state = hass. states. get ( f " input _ text. { lock _ name } _ pin _ { x } " ) if pin _ state and pin _ state. s... | [
-0.6935644745826721,
0.41325345635414124,
0.49127110838890076,
0.26319289207458496,
0.21663016080856323,
-0.004875020124018192,
0.1999814659357071,
0.2852901816368103,
-0.7004187107086182,
0.7182960510253906,
-0.36793217062950134,
0.910146176815033,
-0.48494333028793335,
-0.256022870540618... |
def cn _ createdilated ( self, scale ) : depr ('createdilated ', 1. 1,'obj. dilate ( scale )') return self. dilate ( scale ) | [
0.10449755936861038,
-0.05231928452849388,
0.30248892307281494,
0.28189876675605774,
-0.01583837904036045,
0.5943424701690674,
0.06719975918531418,
-1.5473830699920654,
0.23825064301490784,
-0.5863344669342041,
-0.44906333088874817,
-0.7455908060073853,
0.00369847915135324,
0.3196152448654... |
def test _ classifier _ svm ( self ) : try : clf = self. classifier [ - 1 ] except : print ('no classifier has been trained') self. test _ score. append ( clf. score ( self. x _ test, self. y _ test ) ) | [
-0.25619956851005554,
-0.10952125489711761,
0.4815146327018738,
0.07818249613046646,
1.8589874505996704,
-0.08403065800666809,
0.04081720858812332,
0.15015870332717896,
-0.047795768827199936,
-0.09266477823257446,
0.01616894081234932,
0.3904477059841156,
-0.41404977440834045,
-0.0766092762... |
def port ( self ) - > optional [ int ] : return self. _ _ port | [
1.0549542903900146,
0.4600556790828705,
0.40980738401412964,
-0.018093837425112724,
0.9499439597129822,
0.42558613419532776,
1.0838817358016968,
-0.5654947757720947,
0.4836250841617584,
-0.7647063136100769,
0.12188151478767395,
-0.34678682684898376,
-0.8933845162391663,
-0.4682893753051758... |
def service _ delete ( context, service _ id ) : return impl. service _ delete ( context, service _ id ) | [
0.2616725265979767,
-0.15753230452537537,
-0.04498031362891197,
-0.06668709218502045,
0.6665540337562561,
-0.5941206812858582,
-0.0949765220284462,
-0.22397467494010925,
1.3709256649017334,
-0.12455277144908905,
0.3771894574165344,
0.9541130065917969,
-0.3269077241420746,
0.321881055831909... |
def get _ friends _ of _ user ( self, user ) : if not self. logged _ in : self. fb _ login ( ) self. close _ dialogs ( ) # this is the list we will populate usernames = [ ] # navigate to friends url url ='{ } / { } / friends '. format ( base _ url, user ) self. log ('+ + getting friends for { } '. format ( url ) ) self... | [
-0.6701030731201172,
0.28334808349609375,
0.9606300592422485,
1.1666327714920044,
0.15713553130626678,
-0.7254648208618164,
0.29151269793510437,
-0.6046876311302185,
0.20965266227722168,
-0.400743305683136,
-0.45780518651008606,
-0.45249292254447937,
-0.3179333508014679,
0.7653612494468689... |
def launch _ from ( i ) : # adding final " / " if i. directory [ - 1 ]! = " / " : i. directory = i. directory + " / " i. path = i. directory + i. run _ name if i. path [ - 1 ]! = " / " : i. path = i. path + " / " # dealing with some stuff try : i. tcrit = i. tend except attributeerror : pass try : i. deltat = i. dt exc... | [
-0.10638966411352158,
-0.3727651536464691,
0.7141910791397095,
0.23419693112373352,
0.07252207398414612,
0.05951162800192833,
1.0788840055465698,
-0.15955688059329987,
-0.01782798022031784,
-0.7187837958335876,
-0.34748899936676025,
-0.11679847538471222,
0.23940399289131165,
0.214409574866... |
def testwriteread ( self ) : self. sf. produce ( [ self. e1 ] ) self. sf. addconsumer ('a') stream = self. sf. consume ('a') self. assertequal ( self. e1, stream. next ( ) ) | [
-0.008841314353048801,
-0.2606733441352844,
0.5133618116378784,
0.5258293747901917,
1.0122870206832886,
-0.5218573808670044,
0.36305272579193115,
-0.13601911067962646,
0.09173618257045746,
-0.5820031762123108,
0.289389967918396,
0.5697729587554932,
-0.3954389691352844,
-0.4913398027420044,... |
def get ( self, schedule _ name = none, schedule _ id = none, task _ id = none ) : schedule _ id = self. _ get _ schedule _ id ( schedule _ name, schedule _ id, task _ id ) if schedule _ id : return schedule ( self. class _ object, schedule _ id = schedule _ id, task _ id = self. schedules [ schedule _ id ] ['task _ id... | [
0.5473868250846863,
0.34818464517593384,
0.22784627974033356,
0.7955981492996216,
0.27750277519226074,
-1.224416971206665,
-0.9172674417495728,
-0.35714441537857056,
0.3117314279079437,
-0.22666588425636292,
0.3245924413204193,
0.9685373902320862,
0.3393334448337555,
-0.4567524790763855,
... |
def initialed _ name ( self, commas = true, periods = true ) : last = self. user. profile. last _ name first = self. user. profile. first _ names final _ string ='{ }, { } '. format ( last,''. join ('{ }. '. format ( i [ 0 ] ) for i in first. split ( ) ) ) if not commas : final _ string = final _ string. replace ( ', '... | [
0.09524480998516083,
-0.8277866244316101,
0.6873160600662231,
-0.5121888518333435,
-0.012130954302847385,
0.4536289572715759,
-0.40346452593803406,
-0.41532284021377563,
0.211318701505661,
0.026599537581205368,
0.04417646676301956,
0.34702926874160767,
0.022409137338399887,
-0.411627531051... |
def open ( self, infilename ) : fd = open ( infilename ) infile = fd. read ( ) et _ in = self. xmlparse ( infile ) # jsons = self. convert ( et _ in ) return et _ in | [
-0.9808096885681152,
-1.1167932748794556,
0.8477239012718201,
-0.5635897517204285,
-1.2449049949645996,
0.8899251222610474,
-0.5954815149307251,
1.0124554634094238,
-0.12166345119476318,
-0.5781611800193787,
-0.20289702713489532,
-0.3530375361442566,
-0.37445974349975586,
-1.43401348590850... |
def _ _ init _ _ ( self, cols = nominal ) : self. cols = cols | [
-0.055657584220170975,
0.045674748718738556,
0.4061267673969269,
-0.0050831204280257225,
-0.1459786295890808,
-0.10500528663396835,
-0.6003892421722412,
-0.2439507246017456,
0.208511084318161,
-0.4157090485095978,
-0.7697470188140869,
0.06350518763065338,
0.5209705233573914,
-0.36697196960... |
def checkpresence ( fields ) : if " location " not in fields : raise valueerror ( " location not found in the targeted device's m - search response " ) if " st " not in fields : raise valueerror ( " search target not found in the targeted device's m - search response " ) | [
-0.27585309743881226,
-0.3185931444168091,
0.5054238438606262,
-0.5189706683158875,
1.0999072790145874,
1.0106126070022583,
0.002163308672606945,
0.8260329961776733,
0.0008335042512044311,
0.5358473062515259,
0.953770637512207,
-0.1761886477470398,
-0.22725915908813477,
0.1348658800125122,... |
def save ( self ) : # checkpoint directory ( tensorflow assumes this directory already exists so we need to create it ) checkpoint _ dir = os. path. abspath ( os. path. join ( self. out _ dir, " checkpoints " ) ) checkpoint _ prefix = os. path. join ( checkpoint _ dir, " model " ) if not os. path. exists ( checkpoint _... | [
-0.0737098902463913,
0.31419017910957336,
0.49873340129852295,
0.5568540096282959,
0.6375089883804321,
0.4479104280471802,
1.022870421409607,
0.251320481300354,
-0.7942342758178711,
0.24006536602973938,
-0.6633919477462769,
-0.774371862411499,
-0.017824741080403328,
0.2443154752254486,
0... |
def test _ bstrap _ parallel ( ) : aln = load _ aligned _ seqs ( join ( data _ dir, " brca1. fasta " ), moltype = " dna " ) aln = aln. take _ seqs ( aln. names [ : 3 ] ) aln = aln. omit _ gap _ pos ( allowed _ gap _ frac = 0 ) opt _ args = dict ( max _ evaluations = 20, limit _ action = " ignore " ) m1 = evo _ app. mod... | [
0.32875725626945496,
0.5877780914306641,
0.8333622813224792,
0.575738251209259,
0.3344532251358032,
0.7512061595916748,
-0.23513847589492798,
0.32915374636650085,
-0.1196940690279007,
0.08902617543935776,
-0.4200916588306427,
0.31430724263191223,
-0.23952634632587433,
0.2553359568119049,
... |
def description ( self ) - > optional [ pulumi. input [ str ] ] : return pulumi. get ( self, " description " ) | [
1.0937169790267944,
0.1883128434419632,
0.43200504779815674,
0.3380596935749054,
0.9967341423034668,
1.1237096786499023,
-0.29752761125564575,
-0.2089764028787613,
0.8758289217948914,
0.2605397701263428,
0.6131468415260315,
0.8412667512893677,
-0.2670503258705139,
-0.9193298816680908,
-0... |
def bearing _ ll ( lat1, lon1, lat2, lon2 ) : # use average of two latitudes to approximate distance # ( not very significant at smaller distances ) lat _ len, lon _ len = len _ lat _ lon ( ( lat1 + lat2 ) / 2 ) x = ( lon2 - lon1 ) * lon _ len y = ( lat2 - lat1 ) * lat _ len b = 90 - math. degrees ( math. atan2 ( y, x ... | [
0.7729664444923401,
0.13190507888793945,
0.6358464360237122,
-0.31927552819252014,
-0.8817806243896484,
1.049573302268982,
-0.6070234775543213,
-0.18556219339370728,
-0.06635427474975586,
-0.2644480764865875,
-0.4056318998336792,
0.3160051107406616,
0.17524190247058868,
0.09850741922855377... |
def test _ list _ no _ token ( client, session, model ) : response = client. get ( " / models " ) assert response. status _ code = = 200 assert len ( response. json ) = = 0 | [
-0.8283089399337769,
-0.3158937692642212,
0.2659055292606354,
-0.5096091032028198,
1.251785397529602,
0.6985419392585754,
-0.761436402797699,
-0.44806864857673645,
0.2566576302051544,
-0.5491716265678406,
-1.4331119060516357,
-0.25360068678855896,
0.49454620480537415,
0.3286202847957611,
... |
def calculate _ heat _ zscores ( individual _ heats _ matrix, nodes, degrees, seed _ genes, num _ reps = 10, alpha = 0. 5, minimum _ bin _ size = 10, random _ seed = 1 ) : # set random seed for reproducibility np. random. seed ( random _ seed ) # calculate network propagation results given gene set seed _ genes = list ... | [
-0.35741302371025085,
0.6367467641830444,
0.6232404708862305,
-0.013466223143041134,
-0.28843486309051514,
-0.9553755521774292,
0.8459452390670776,
0.5271763205528259,
-0.183563232421875,
0.4088117480278015,
-0.23507016897201538,
0.31052717566490173,
0.08487620949745178,
0.0535344816744327... |
def global _ avg _ pool2d ( x ) : return torch. mean ( x. view ( x. size ( ) [ 0 ], x. size ( ) [ 1 ], - 1, 1 ), dim = 2, keepdim = true ) | [
-1.2146013975143433,
-0.12157180160284042,
0.551028311252594,
-0.38766443729400635,
-0.5336427092552185,
1.200577974319458,
0.8457480669021606,
-0.7365247011184692,
-0.916175365447998,
0.99741530418396,
-0.44032347202301025,
1.9446007013320923,
0.3288014829158783,
0.03916560485959053,
-0... |
def test _ valid _ user _ login ( self, client, proto _ user ) : response = client. post ( reverse ( " login " ), { " username " : proto _ user. username, " password " : " m = 9uak ^ c, tbq9n = t ", " robot " : true, }, follow = true, ) assert response. context [ " user " ]. is _ authenticated | [
0.19651445746421814,
0.42001771926879883,
0.3332585394382477,
1.0762065649032593,
-0.1260635107755661,
1.3530597686767578,
0.11661125719547272,
-0.08012609928846359,
0.5016750693321228,
-1.4811090230941772,
-0.8299940228462219,
0.17330534756183624,
-0.3216829001903534,
-0.8241356611251831,... |
def test _ list _ integer _ enumeration _ 2 _ nistxml _ sv _ iv _ list _ integer _ enumeration _ 3 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / integer / schema + instance / nistschema - sv - iv - list - integer - enumeration - 3. xsd ", instance = " nistdata / list / ... | [
-0.9832133054733276,
-0.7297559976577759,
0.4709210991859436,
0.3225303590297699,
-0.4445089101791382,
0.23624491691589355,
-0.7683943510055542,
0.5093945860862732,
1.25265634059906,
1.0453064441680908,
-0.9170877933502197,
-0.009756717830896378,
-0.13453754782676697,
0.46910881996154785,
... |
def _ _ str _ _ ( self ) : if self. node is none : return str ( self. attrs ) elif self. attrs is none : return str ( self. node ) return str ( self. plug ( ) ) | [
-0.6792136430740356,
-0.9831579923629761,
0.4978334605693817,
-1.477081537246704,
-0.20115728676319122,
-0.5704256296157837,
-0.7719645500183105,
0.0717030018568039,
0.3180088698863983,
-0.4226790964603424,
1.2267812490463257,
0.40878623723983765,
-0.34134843945503235,
-0.00317001668736338... |
def _ create _ individual _ show _ dict ( self ) : temp _ dict = {'venue _ id': self. venue _ id,'venue _ name': self. venue. name,'artist _ id': self. artist _ id,'artist _ name': self. artist. name,'artist _ image _ link': self. artist. image _ link,'start _ time': self. start _ time. strftime ( " % y - % m - % d % h... | [
-0.4839668571949005,
-0.5533407330513,
0.34967154264450073,
-1.3255493640899658,
-1.3928982019424438,
0.226069837808609,
0.08005770295858383,
0.4829126298427582,
-0.10227939486503601,
0.21366912126541138,
-0.4300439953804016,
0.562363862991333,
-0.042225662618875504,
0.549820065498352,
-... |
def display _ image _ from _ response ( response ) : image _ stream = io. bytesio ( response. content ) image _ stream. seek ( 0 ) file _ bytes = np. asarray ( bytearray ( image _ stream. read ( ) ), dtype = np. uint8 ) image = cv2. imdecode ( file _ bytes, cv2. imread _ color ) filename = " predictions. jpg " cv2. imw... | [
0.4085618555545807,
-0.996346116065979,
0.46619912981987,
-0.6017228960990906,
-0.357647567987442,
0.7017534375190735,
0.850025475025177,
0.03656938672065735,
0.14379478991031647,
0.2812522053718567,
0.29787567257881165,
1.097839117050171,
0.29630252718925476,
0.14738696813583374,
0.9404... |
def plug ( self ) : if self. attrs is none : return none elif self. node is none : return self. attrs elif isinstance ( self. attrs, ( list, tuple ) ) : return [ " { n }. { a } ". format ( n = self. node, a = a ) for a in self. attrs ] else : return " { n }. { a } ". format ( n = self. node, a = self. attrs ) | [
-1.2875927686691284,
-0.29848018288612366,
0.5417242646217346,
-1.4772355556488037,
0.13300159573554993,
-0.8266803622245789,
-0.8484384417533875,
0.5770063996315002,
0.5377066135406494,
-0.2806912958621979,
1.1335359811782837,
0.34314489364624023,
-0.23603273928165436,
0.12972892820835114... |
def reduce _ logsumexp ( input _ tensor, axis = none, keepdims = false, name = none ) : with ops. name _ scope ( name, " reducelogsumexp ", [ input _ tensor ] ) as name : raw _ max = reduce _ max ( input _ tensor, axis = axis, keepdims = true ) my _ max = array _ ops. stop _ gradient ( gen _ math _ ops. select ( gen _ ... | [
0.03630503639578819,
0.36307746171951294,
1.1482640504837036,
0.5365082621574402,
-0.6945376396179199,
-0.09379398077726364,
0.01586131379008293,
0.9210677742958069,
0.795780599117279,
0.3946561813354492,
-0.9319139719009399,
0.6735840439796448,
-0.020595204085111618,
-1.3018255233764648,
... |
def test _ atomic _ hex _ binary _ pattern _ 3 _ nistxml _ sv _ iv _ atomic _ hex _ binary _ pattern _ 4 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / hexbinary / schema + instance / nistschema - sv - iv - atomic - hexbinary - pattern - 4. xsd ", instance = " nistdata... | [
-0.10065009444952011,
-0.03982919454574585,
0.5678942203521729,
0.661223292350769,
0.13958516716957092,
0.3611312210559845,
-0.24752551317214966,
-0.07386818528175354,
-0.1573006808757782,
0.15918554365634918,
-0.4679485261440277,
-0.8674126863479614,
-0.39162176847457886,
0.01878842711448... |
def get _ limits ( self, time _ deriv : int ) - > tuple [ arraytype ] : assert ( time _ deriv in self. time _ derivs ), f " given time derivative time _ deriv = { time _ deriv } is not recognized, only allowed { self. time _ derivs } " assert ( time _ deriv in self. dlim. keys ( ) ), f " limit for time derivative time ... | [
-0.8841062784194946,
0.4282069206237793,
0.8978559970855713,
0.6659849882125854,
-0.1208563894033432,
0.1416824609041214,
-0.4520764946937561,
-0.5775084495544434,
-0.6516657471656799,
0.32148635387420654,
-0.19903410971164703,
0.11232264339923859,
-0.01782410778105259,
1.0702414512634277,... |
def _ p _ set _ par _ ( o, index, value ) : return o. setpar ( index, value ) | [
-0.43882763385772705,
0.10042888671159744,
0.4134993255138397,
-0.6480580568313599,
-1.2718740701675415,
0.5124939680099487,
-0.10520461201667786,
-0.4747789800167084,
0.21856722235679626,
0.8257192373275757,
0.5567896962165833,
0.5858872532844543,
-0.29420891404151917,
-1.3929349184036255... |
def forward ( self, response ) : logger. info ( " in forward. last url : % s ", response. url ) std _ category = utl. get _ std _ category ( self. student. get ( formkeys. std ( ) ) ) app _ id = response. xpath ( " / / * [ @ id ='% s'] / / text ( ) " % formkeys. first _ forward _ app _ id ( std _ category ) ) if self. ... | [
-0.7764374017715454,
0.4829358756542206,
0.8189571499824524,
-0.5949863791465759,
-0.2121267318725586,
0.46604689955711365,
0.5313153266906738,
-0.1591077297925949,
0.35084477066993713,
-0.1494135856628418,
0.2571459114551544,
0.25058093667030334,
1.0420597791671753,
0.3455495238304138,
... |
def send _ route _ refresh ( peer _ ip ) : log. debug ('try to send route refresh to peer % s ', peer _ ip ) json _ request = flask. request. get _ json ( ) if'afi'in json _ request and'safi'in json _ request : if'res'not in json _ request : res = 0 else : res = json _ request ['res'] result = api _ utils. send _ route... | [
-1.009972333908081,
-0.12133952230215073,
0.6432375311851501,
0.5841080546379089,
0.6396785974502563,
-0.4456697404384613,
-0.37601912021636963,
-0.779094398021698,
-0.07585886865854263,
1.176051139831543,
0.03908460587263107,
-0.5226861238479614,
-0.43600979447364807,
0.10878939181566238,... |
def _ humans _ to _ human _ segment _ message ( self, hx _ hs, h, batch _ size, dtype, device, direction : str, hh _ dists = none ) : hidden _ size = self. human _ segment _ rnn _ fcell. hidden _ size grab _ state _ fn = grab _ last _ state _ or _ zeros if direction = ='forward'else grab _ first _ state _ or _ zeros re... | [
-0.21527448296546936,
0.205856055021286,
0.6777739524841309,
-0.2505084276199341,
0.4384409487247467,
-0.19400276243686676,
0.6389485001564026,
-0.4484650194644928,
-0.3563835024833679,
0.3534908592700958,
-0.1856977343559265,
0.5564380288124084,
0.5327868461608887,
0.34133532643318176,
... |
def create _ new _ group ( db _ group : dict, new _ group _ employees : dict ) - > dict : #? rename input parameter'db _ group'to'prev _ group _ employees'#? rename output var to'modified _ group _ employees'# create sets prev _ group _ emp = _ get _ empoloyees ( db _ group ) new _ group _ emp = list ( new _ group _ em... | [
-0.7050846815109253,
0.4682263135910034,
0.6422396898269653,
-0.8868427276611328,
-0.6501200795173645,
0.42413529753685,
-0.09538190066814423,
-0.3375003933906555,
-0.844597578048706,
0.9829455614089966,
0.23609715700149536,
0.08048534393310547,
-0.6289384365081787,
0.6099030375480652,
0... |
def indent _ code ( self, line, code, editor ) : # automatically indent the string and replace \ t ( tab ) with the # correct number of spaces. code = core. pad _ string ( code, re. match ( r " \ s * ", line ). group ( ) ) if editor. get _ active _ view ( ). get _ insert _ spaces _ instead _ of _ tabs ( ) : code = code... | [
0.4116136431694031,
0.4399131238460541,
0.4235841631889343,
-0.1103438287973404,
-0.08735315501689911,
-0.22725991904735565,
0.282947301864624,
-0.003431600984185934,
-0.5814759731292725,
-0.06856727600097656,
0.3662073016166687,
0.05965779349207878,
0.09150732308626175,
0.0445880144834518... |
def from _ decimal ( cls, dec ) : from decimal import decimal if isinstance ( dec, numbers. integral ) : dec = decimal ( int ( dec ) ) elif not isinstance ( dec, decimal ) : raise typeerror ( " % s. from _ decimal ( ) only takes decimals, not % r ( % s ) " % ( cls. _ _ name _ _, dec, type ( dec ). _ _ name _ _ ) ) retu... | [
0.728891134262085,
0.30993640422821045,
0.5724001526832581,
-0.08752541989088058,
-1.2457139492034912,
0.38885822892189026,
-0.08448430895805359,
-0.927283763885498,
0.7623226046562195,
-0.9805930852890015,
0.37524333596229553,
-0.9858506321907043,
0.40558505058288574,
-0.3208506107330322,... |
def setup _ daemon _ env ( prog _ cfg, tmpdir ) : name = prog _ cfg ['name'] log = logging. getlogger ('deckard. daemon. % s. setup _ env'% name ) # set up child process env ( ) to use socket wrapper interface child _ env = os. environ. copy ( ) child _ env ['socket _ wrapper _ default _ iface'] = prog _ cfg ['iface'] ... | [
-0.2728801965713501,
-0.46787646412849426,
0.6645267605781555,
-1.391536831855774,
-0.33490198850631714,
0.6618657112121582,
0.8618653416633606,
-0.3275024890899658,
0.19731925427913666,
0.18624505400657654,
-0.3071710169315338,
0.717944860458374,
0.1347718983888626,
1.0436878204345703,
... |
def process _ dropdata ( fitting = 2, rotation = 0, reloads = 1, tempfluct = 2, texpcoeff = 0. 000214 ) : # load pendant drop data class dippingtest = pendantdropdata ( ) # get test conditions for each dipping experiment capimgs, needlediam, deltarho, heightres, widthres = dippingtest. load _ testconditions ( ) # load ... | [
-0.5345667004585266,
-0.31952524185180664,
0.7548038363456726,
-1.1302211284637451,
-0.7238186001777649,
0.5631645917892456,
1.585411548614502,
-0.8707180619239807,
-0.09200605005025864,
0.15490929782390594,
-0.3042721450328827,
-0.25574707984924316,
-0.6669473648071289,
0.5522953271865845... |
def main ( ) : if test : # test case # define planar shapes by thier verticies a = [ ( 2, 6 ), ( 4, 6 ), ( 4, 9 ), ( 2, 9 ), ( 2, 6 ) ] b = [ ( 6, 9 ), ( 7, 6 ), ( 9, 4 ), ( 9, 8 ), ( 7, 9 ), ( 6, 9 ) ] c = [ ( 1, 1 ), ( 5, 1 ), ( 5, 4 ), ( 3, 4 ), ( 1, 1 ) ] d = [ ( 6, 1 ), ( 10, 1 ), ( 7, 3 ), ( 6, 1 ) ] e = [ ( 4, 1... | [
0.4309956133365631,
-0.45979470014572144,
1.2490020990371704,
0.5081784725189209,
0.047432780265808105,
0.8283145427703857,
0.5460357069969177,
0.4002176821231842,
0.3428965210914612,
0.19204537570476532,
-1.0683097839355469,
-0.5123712420463562,
0.49081772565841675,
-0.2810492217540741,
... |
def animate _ scenes ( scenes : list [ str ] ) : for scene _ name in scenes : # read ground truth data points _ gt, colors _ gt = load _ predictions ( scene _ name,'groundtruth') v _ gt = pptk. viewer ( points _ gt, colors _ gt ) v _ gt. set ( point _ size = 0. 009, bg _ color = ( 1, 1, 1, 1 ), floor _ color = ( 1, 1, ... | [
-0.4493119418621063,
-0.01869719661772251,
0.7786731719970703,
0.1138102263212204,
-0.36572447419166565,
0.7940711975097656,
0.38220730423927307,
-0.1784145087003708,
-0.7307374477386475,
0.4033375084400177,
-0.0639955997467041,
0.4663209021091461,
-0.2142273336648941,
0.736414909362793,
... |
def loadpolicy ( self, filename ) : self. policy _ 0. loadpolicy ( filename +'p0') self. policy _ 1. loadpolicy ( filename +'p1') | [
-0.015556707046926022,
-0.3713218569755554,
0.26773932576179504,
-0.28166720271110535,
0.5843033790588379,
1.8475204706192017,
-0.34211868047714233,
0.8468758463859558,
-0.4473375976085663,
0.5385236144065857,
-0.2878156900405884,
-0.010623998939990997,
-0.20678062736988068,
0.570915699005... |
def _ get _ predictions _ from _ model ( model, features, original _ sequence _ lengths ) : features = variable ( features ) input = torch. nn. utils. rnn. pack _ padded _ sequence ( features, original _ sequence _ lengths, enforce _ sorted = false, batch _ first = true ). to ( device ) # type : packedsequence outputs ... | [
-0.5150765180587769,
0.15045098960399628,
0.4234674870967865,
0.780635416507721,
-1.0329840183258057,
-0.905537486076355,
-0.03548479452729225,
0.11037664115428925,
-0.8462101817131042,
0.33571627736091614,
-1.1272810697555542,
-0.1060706377029419,
0.742510199546814,
-0.3069041967391968,
... |
async def handle _ webhook ( self, request ) : json = await request. json ( ) if json [ " type " ] = = " transport - state " : if json [ " data " ] [ " roomname " ] = = self. sonos _ data. room : await self. sonos _ data. refresh ( json [ " data " ] [ " state " ] ) await self. callback ( ) return web. response ( text =... | [
-0.316836953163147,
0.19473057985305786,
0.637195348739624,
1.0131133794784546,
0.4899558424949646,
-0.25605273246765137,
-0.7197655439376831,
-0.21563194692134857,
1.1215866804122925,
0.239201620221138,
-0.11730083078145981,
-0.1098397895693779,
0.02057168446481228,
0.05778840184211731,
... |
def _ get _ blob ( self ) : if not self. _ _ blob : self. _ _ blob = self. repo. get _ object ( self. id ) return self. _ _ blob | [
0.7845701575279236,
-0.458030104637146,
0.7024044990539551,
-0.35899055004119873,
0.5876206159591675,
0.5935768485069275,
-0.24589161574840546,
-0.8781726360321045,
-0.0348651297390461,
-0.3502914011478424,
0.1490393728017807,
0.33445748686790466,
-0.5787758827209473,
-0.742911159992218,
... |
def on _ pushbutton _ ssdrwad _ clicked ( self ) : # todo : not implemented yet self. sendcmdssd _ rw _ ad ( ) # receive data global gsocketbufsize gsocketbufsize = 12 + 16 self. udpsocketclient. receivedata ( ) data = self. udpsocketclient. mdata # print ( " receive total length : ", len ( data ) ) data = data [ 16 + ... | [
0.24433420598506927,
0.8777590990066528,
0.7990853786468506,
-1.3710860013961792,
-0.24784792959690094,
0.9452463984489441,
-0.05373816937208176,
-0.19281236827373505,
0.7890299558639526,
-0.40728920698165894,
-0.1635482758283615,
1.393100619316101,
-0.2970294952392578,
0.28792697191238403... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.