text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def _ tfbatchnormv1bw ( self, x, m, v, beta, gamma, epsilon, scale _ after _ normalization ) : return nn _ impl. batch _ norm _ with _ global _ normalization ( x, m, v, beta, gamma, epsilon, scale _ after _ normalization ) | [
0.8200575113296509,
-0.3590679168701172,
0.4887736141681671,
1.3394924402236938,
-0.5951921939849854,
0.005065174773335457,
0.29344475269317627,
-0.12755680084228516,
-0.7926293611526489,
1.3634204864501953,
-0.5637519359588623,
-0.06055019795894623,
-1.2334989309310913,
0.6982695460319519... |
def profile ( ) : user = session ['user'] setting = db. hgetall ( " profile : { } ". format ( user [ " id " ] ) ) return render _ template ('profile. html ', user = user, setting = setting ) | [
0.2392745465040207,
0.8862751722335815,
0.3432372808456421,
0.979849636554718,
0.10553178936243057,
-0.012965227477252483,
-0.5620669722557068,
-0.25737419724464417,
-0.2895432412624359,
0.9538795948028564,
-0.20860375463962555,
-0.7687869668006897,
-0.05201281979680061,
0.2907024323940277... |
def test _ get _ trigger _ setting ( self ) : pass | [
0.04894799739122391,
1.1135185956954956,
0.33819201588630676,
1.0176653861999512,
0.503267228603363,
-1.005998134613037,
1.1911174058914185,
-0.5113375186920166,
-0.12594737112522125,
-0.929985761642456,
-1.335688829421997,
-0.06861770153045654,
-1.239376187324524,
-0.24604223668575287,
... |
def _ default _ saml _ config _ dict ( self, required _ attributes : set [ str ], optional _ attributes : set [ str ] ) - > jsondict : import saml2 if self. saml2 _ grandfathered _ mxid _ source _ attribute : optional _ attributes. add ( self. saml2 _ grandfathered _ mxid _ source _ attribute ) optional _ attributes - ... | [
-0.4320882260799408,
-0.674936830997467,
0.2604450583457947,
-0.6482295393943787,
-1.1937006711959839,
-0.09014014899730682,
-1.0595195293426514,
0.32317015528678894,
0.032691244035959244,
0.5489212274551392,
-0.5210176706314087,
0.5381049513816833,
0.20693570375442505,
0.8432273864746094,... |
def select _ by _ visible _ text ( self, * items ) : if len ( items ) > 1 and not self. is _ multiple : raise valueerror ( f " the bootstrapselect { self. locator } does not allow multiple selections " ) self. open ( ) for item in items : if isinstance ( item, partial _ match ) : item = item. item self. logger. info ( ... | [
-0.45381057262420654,
-0.6958925724029541,
0.7513660192489624,
0.3769689202308655,
-0.388710081577301,
0.16858024895191193,
0.1840306967496872,
-0.2507549524307251,
0.7467631697654724,
0.5963544845581055,
-0.5110671520233154,
-0.7841231226921082,
-0.276329904794693,
0.08783528208732605,
... |
def get _ destination _ port ( self, destination _ ip ) : if self. topology. switch _ host _ access _ table : if isinstance ( self. topology. switch _ host _ access _ table. values ( ) [ 0 ], tuple ) : for values in self. topology. switch _ host _ access _ table. keys ( ) : if destination _ ip = = self. topology. switc... | [
0.14925538003444672,
0.40388575196266174,
0.6665796637535095,
0.6134217381477356,
0.13421538472175598,
-0.4660893976688385,
1.04667067527771,
-1.0303243398666382,
-0.31929779052734375,
0.743082582950592,
1.0277187824249268,
-0.2676599323749542,
0.2970992624759674,
-0.3499418795108795,
0.... |
def _ prefixed _ types ( self ) : return [ t for t in self. arg _ types if t. prefix is not none ] | [
0.2854439914226532,
-0.4862692058086395,
0.4565636217594147,
-0.43730875849723816,
1.2800829410552979,
0.07673263549804688,
-0.7103711366653442,
-0.26383548974990845,
0.22287191450595856,
0.6602234244346619,
-0.26219573616981506,
1.1323132514953613,
-0.16071800887584686,
1.2798916101455688... |
def cmd ( self ) : return''. join ( self. _ args ) | [
0.21378059685230255,
-0.8423253297805786,
0.5078538656234741,
-0.36375752091407776,
1.2133073806762695,
1.205518364906311,
-0.6193515658378601,
-0.4667859375476837,
-0.29926347732543945,
-0.5511667728424072,
1.0115506649017334,
0.13034571707248688,
-0.19483411312103271,
0.24433740973472595... |
def testboost ( ) : def makep4 ( mass, * p ) : return momentum ( sqrt ( mass * mass + p [ 0 ] * p [ 0 ] + p [ 1 ] * p [ 1 ] + p [ 2 ] * p [ 2 ] ), * p ) theb = makep4 ( 5. 1207628250, 0. 3115499020, 0. 1814490259, 2. 9952230453 ) thelambda = makep4 ( 1. 1199678183, - 0. 7292688489, - 0. 6621993780, 1. 4447448254 ) thep... | [
0.6275883316993713,
0.053289711475372314,
0.7645301818847656,
-0.1029878482222557,
0.8856135606765747,
0.4412176012992859,
0.36785629391670227,
-0.040090162307024,
0.2283351868391037,
-1.2975289821624756,
-0.8121917247772217,
-0.26016631722450256,
-1.1163865327835083,
0.18971796333789825,
... |
def test _ key _ check _ type ( self ) : self. assertraises ( notimplementederror, xutil. _ key _ check, * ['foo ', [ ] ] ) | [
-0.247425839304924,
0.9802888631820679,
0.2882537841796875,
0.5447668433189392,
0.052266597747802734,
0.40962904691696167,
-0.07841894775629044,
0.034053340554237366,
-0.777384877204895,
0.5086316466331482,
-0.3388005495071411,
0.2522086799144745,
-0.373197466135025,
1.0516318082809448,
... |
def _ run _ nanny ( self ) : try : self. logger. debug ( " running batched nanny " ) in _ progress = self. channel. in _ progress ( self. max _ batch _ size ) if len ( in _ progress ) = = 0 : self. logger. debug ( " no metrics found in progress. " ) batch = [ m for m in in _ progress if _ should _ republish ( m, self. ... | [
0.27219751477241516,
-0.5651995539665222,
0.5523738861083984,
0.3635869026184082,
0.3316248059272766,
-0.22957579791545868,
-0.08914722502231598,
-0.12701094150543213,
-1.0617061853408813,
-0.3958142399787903,
0.005724641028791666,
0.5122155547142029,
-0.12464839220046997,
1.02986252307891... |
def get _ mask ( tscale ) : # mask. shape : duration * start time mask = np. zeros ( [ tscale, tscale ], np. float32 ) # the proposals whose ending boundaries exceed the range of video are left ( mask = 0 ). for i in range ( tscale ) : for j in range ( i, tscale ) : mask [ i ] [ j ] = 1 return torch. tensor ( mask ) | [
-0.8543802499771118,
0.16260786354541779,
0.522101104259491,
0.3414333760738373,
0.4622328281402588,
-0.08978241682052612,
-0.38746628165245056,
-0.35522741079330444,
-0.18576039373874664,
1.2410593032836914,
-0.2618345022201538,
0.33349674940109253,
-0.2656836211681366,
-0.551005303859710... |
def _ set _ lim _ and _ transforms ( self ) : # get the standard transform setup from the axes base class axes. _ set _ lim _ and _ transforms ( self ) # need to put the skew in the middle, after the scale and limits, # but before the transaxes. this way, the skew is done in axes # coordinates thus performing the trans... | [
0.4338926374912262,
-0.06647515296936035,
0.6155902147293091,
-0.8385570645332336,
-0.2884587347507477,
0.09867861866950989,
0.003214132273569703,
0.1739443987607956,
0.8978797793388367,
-0.031334444880485535,
-0.3610098659992218,
-0.08861660212278366,
0.10296528786420822,
-0.0243822298943... |
def set _ rows ( self, value ) : super ( addrowinputset, self ). _ set _ input ('rows ', value ) | [
-0.6990607380867004,
1.5727181434631348,
0.3669314384460449,
-0.3358563482761383,
-0.15458452701568604,
0.2943187654018402,
0.5768063068389893,
-0.4959120452404022,
0.8349248170852661,
-0.6079723834991455,
0.13403423130512238,
-0.3969248831272125,
0.17299139499664307,
0.8708140850067139,
... |
def _ distances ( x, z ) : dim = x. shape [ 1 ] def _ diff ( x, y ) : return ( x - y ) * * 2 # ufunc are a way to vectorize python functions so that they execute efficiently on numpy arrays. ufunc _ diff = np. frompyfunc ( _ diff, 2, 1 ) ufunc _ sqrt = np. frompyfunc ( lambda a : np. sqrt ( a ), 1, 1 ) d = none for d i... | [
0.34137654304504395,
0.011253781616687775,
0.4800466299057007,
0.06421257555484772,
-0.24539974331855774,
-0.7207291722297668,
0.16819822788238525,
0.1489693969488144,
0.4826781451702118,
0.27279603481292725,
-0.4947785437107086,
0.4796104431152344,
0.4065092206001282,
-0.197318896651268,
... |
def generate _ triplets ( images, filenames, triplet _ names ) : list _ a = [ ] list _ p = [ ] list _ n = [ ] _, h, w, c = images. shape names = [ [ name [ 0 ] + '. jpg ', name [ 1 ] + '. jpg ', name [ 2 ] + '. jpg'] for name in triplet _ names ] for name in names : flaga, flagp, flagn = ( 0, 0, 0 ) a _ name, p _ name,... | [
-0.33662864565849304,
-0.46673691272735596,
0.815418004989624,
-0.5816212296485901,
0.5972943902015686,
0.119255430996418,
-0.1768970936536789,
0.8258363604545593,
-0.10340970754623413,
1.0517722368240356,
-0.4707563817501068,
-0.4703332781791687,
0.1569250524044037,
0.8533603549003601,
... |
def remove _ service ( service, provider ) : if service not in _ external _ services : return false if provider not in _ external _ services [ service ] : return false _ external _ services [ service ]. remove ( provider ) # in this case, check if some components must stop for name in _ component _ info : if _ componen... | [
-1.3911758661270142,
-0.5347653031349182,
0.7316982746124268,
-0.5061994791030884,
-0.7232531905174255,
0.3312380015850067,
-0.09385860711336136,
0.2487008273601532,
0.2475898414850235,
0.24210965633392334,
-0.2039048969745636,
-0.40822455286979675,
-0.7292681932449341,
0.4392799735069275,... |
def asset _ class ( self, asset _ class ) : self. _ asset _ class = asset _ class | [
-0.4226243197917938,
-0.7153238654136658,
-0.13931593298912048,
-1.0525131225585938,
-0.41688811779022217,
1.411264419555664,
0.18891416490077972,
0.8266329169273376,
-0.6782417297363281,
-0.4989839792251587,
0.2159641832113266,
0.5888655185699463,
0.5297011733055115,
0.16017462313175201,
... |
def load _ state ( self, filename ) : if self. comm _ rank = = 0 : with open ( filename, " rb " ) as in _ file : isles, pareto, age = pickle. load ( in _ file ) self. isle = isles [ 0 ] self. age = age self. pareto _ isle = pareto for i in range ( 1, self. comm _ size ) : if i < len ( isles ) : isle _ to _ send = isles... | [
-0.24395395815372467,
0.17067378759384155,
0.5193538665771484,
-0.7285508513450623,
0.3989161252975464,
0.6488215923309326,
-0.15992023050785065,
0.7770827412605286,
-0.18884848058223724,
0.13406464457511902,
-0.499422550201416,
0.1422697901725769,
-0.3137856721878052,
0.6141951680183411,
... |
def get _ data _ for _ legends ( self, * legends ) : self. hide _ all _ legends ( ) self. display _ legends ( * legends ) return self. _ get _ data ( self. _ elements. values ( ) ) | [
-0.5798631310462952,
0.49058297276496887,
0.16779246926307678,
0.1538349986076355,
-0.7351371049880981,
0.39983001351356506,
-0.7653701901435852,
-0.5863307118415833,
0.07607854902744293,
-0.7368428707122803,
-0.04999127238988876,
0.1424974799156189,
0.4247458279132843,
0.2416570633649826,... |
def test _ get _ constant _ value ( self ) : # setup x = np. array ( [ 1, 1, 1, 1 ] ) expected _ result = 1 # run result = univariate. _ get _ constant _ value ( x ) # check assert result = = expected _ result | [
-0.14027142524719238,
0.9861152172088623,
0.36308029294013977,
1.2507891654968262,
0.047082915902137756,
0.09671996533870697,
0.3291088044643402,
0.8374518156051636,
-0.3296957314014435,
-0.34927093982696533,
-0.19735494256019592,
0.4038500487804413,
0.0518953837454319,
-0.7399494647979736... |
def set _ environment _ variables ( args, mainworkdir ) : # working directory as set with a pilot option ( e. g... ) environ ['pilot _ work _ dir'] = args. workdir # todo : replace with singleton # main work directory ( e. g. / scratch / panda _ pilot2 _ 3908 _ 1537173670 ) environ ['pilot _ home'] = mainworkdir # todo... | [
-0.29805052280426025,
-0.20134635269641876,
0.8532206416130066,
-0.3964090049266815,
0.7366847395896912,
0.3362409472465515,
0.0067845843732357025,
-0.3284305930137634,
-0.095668263733387,
0.3177908658981323,
0.02154967561364174,
0.5471547842025757,
-0.335735559463501,
0.7398145198822021,
... |
def calc _ iffilt _ bw _ reg ( self, model ) : bw _ dig = model. vars. bandwidth _ actual. value # find smallest bandwidth setting that is larger than bw _ dig for bw _ reg, bw _ ana in self. iffilt _ bw. iteritems ( ) : if bw _ ana > bw _ dig : break self. _ reg _ write ( model. vars. rac _ iffiltctrl _ bandwidth, bw ... | [
0.27760279178619385,
0.45776280760765076,
0.5073172450065613,
0.6793473362922668,
0.7004220485687256,
-0.33400261402130127,
1.3548340797424316,
-0.6531412601470947,
-0.5935112833976746,
-0.1703253835439682,
-0.32044801115989685,
0.31557729840278625,
-1.2416954040527344,
0.9174581170082092,... |
def test _ gf _ write _ step _ with _ doc _ string _ without _ data _ table ( given _ rule _ type, expected _ indentation, disabled _ colors, capsys, mocker ) : # given step = mocker. magicmock ( spec = step ) step. keyword = " given " step. used _ keyword = " given " step. text = " there is a step " step. doc _ string... | [
0.23797854781150818,
-0.12813153862953186,
0.43922358751296997,
-0.05534970760345459,
0.6882140636444092,
0.09120340645313263,
0.08135837316513062,
-0.07011003792285919,
-1.2807942628860474,
-0.5164214372634888,
-0.31759563088417053,
0.18658816814422607,
0.15630467236042023,
0.636478006839... |
def radau ( alpha, beta, xr ) : from scipy. linalg import solve _ banded n = len ( alpha ) - 1 f = np. zeros ( n ) f [ - 1 ] = beta [ - 1 ] a = np. vstack ( ( np. sqrt ( beta ), alpha - xr ) ) j = np. vstack ( ( a [ :, 0 : - 1 ], a [ 0, 1 : ] ) ) delta = solve _ banded ( ( 1, 1 ), j, f ) alphar = alpha alphar [ - 1 ] =... | [
0.14009131491184235,
-0.19139662384986877,
0.6357003450393677,
-1.0687282085418701,
0.4248591363430023,
-0.19735224545001984,
0.1453264206647873,
0.10186891257762909,
0.06453603506088257,
0.14284005761146545,
-0.019219782203435898,
0.18601667881011963,
-0.6227474212646484,
0.52488130331039... |
def _ _ init _ _ ( self, hostname, port ) : # create a tcp objet socket and bind it to a port mysocket = socket. socket ( socket. af _ inet, socket. sock _ stream ) mysocket. setsockopt ( socket. sol _ socket, socket. so _ reuseaddr, 1 ) mysocket. bind ( ( hostname, port ) ) # queue a maximum of 5 tcp connection reques... | [
0.4025779068470001,
0.10415085405111313,
0.8902087211608887,
-0.4024823307991028,
-0.015652498230338097,
-0.050247758626937866,
-0.6463989615440369,
-0.46703407168388367,
-1.0342916250228882,
-0.6163399815559387,
0.26228296756744385,
0.28275686502456665,
-0.21972396969795227,
-0.0137085113... |
def test _ nfc _ wps _ er _ handover _ pk _ hash _ mismatch _ sta ( dev, apdev ) : try : _ test _ nfc _ wps _ er _ handover _ pk _ hash _ mismatch _ sta ( dev, apdev ) finally : dev [ 0 ]. request ( " wps _ er _ stop " ) dev [ 1 ]. request ( " set ignore _ old _ scan _ res 0 " ) | [
-0.21868793666362762,
0.2808527648448944,
0.5839685797691345,
0.7954211235046387,
0.26577848196029663,
0.8194847702980042,
0.48550423979759216,
-0.6776329874992371,
0.4108993411064148,
-0.8556346297264099,
0.14561273157596588,
-1.3144867420196533,
0.6324490904808044,
0.09239904582500458,
... |
def do _ select _ all ( self, * * kwargs ) : _ hardware _ id = kwargs ['hardware _ id'] # don't use the ramstkdatamodel. do _ select _ all ( ) method because we don't # want to clear the tree or we'll only be left with the last hardware # id passed. _ session = self. dao. ramstk _ session ( bind = self. dao. engine, au... | [
0.2971859872341156,
0.17989124357700348,
0.6222185492515564,
0.16133548319339752,
0.20253287255764008,
-0.37248024344444275,
0.12363292276859283,
-0.451216459274292,
-0.03532467409968376,
0.5176413655281067,
-0.3290194571018219,
0.0778803825378418,
-0.9532197117805481,
0.7328444123268127,
... |
def write _ loop ( self ) : # if there is anything to write from stdout or stderr, then write it if not self. err _ queue. empty ( ) : self. write ( self. err _ queue. get ( ) ) if not self. out _ queue. empty ( ) : self. write ( self. out _ queue. get ( ) ) # run this method again after 10ms if self. alive : self. aft... | [
-0.34833255410194397,
-1.3606843948364258,
0.5845734477043152,
-0.5193296670913696,
0.9897738695144653,
0.09026648849248886,
-0.22986993193626404,
-0.20002669095993042,
-0.644999086856842,
0.6019241809844971,
0.6036728620529175,
0.27317026257514954,
-0.6091479659080505,
0.853644073009491,
... |
async def listxproles ( self, ctx ) : server = ctx. message. server channel = ctx. message. channel # get the array promoarray = self. settings. getserverstat ( server, " promotionarray " ) # sort by xp first, then by name # promosorted = sorted ( promoarray, key = itemgetter ('xp ','name') ) promosorted = sorted ( pro... | [
-0.41018691658973694,
-0.5028764605522156,
0.9112560153007507,
-0.31108343601226807,
-0.05383654683828354,
-0.10330427438020706,
-0.8750916123390198,
-0.3169849216938019,
0.5793400406837463,
0.917073667049408,
-0.08570560067892075,
1.2280349731445312,
-1.1446524858474731,
0.575441658496856... |
def run ( self ) : with self. output ( ). open ('w') as outfile : print ( " data 0 200 10 50 60 ", file = outfile ) print ( " data 1 190 09 52 60 ", file = outfile ) print ( " data 2 200 10 52 60 ", file = outfile ) print ( " data 3 195 01 52 60 ", file = outfile ) | [
-0.23209866881370544,
-1.0304924249649048,
0.6655377745628357,
-0.40048089623451233,
0.06353498250246048,
0.1587342619895935,
1.018890619277954,
0.1564253717660904,
-0.8590836524963379,
-0.5064747333526611,
-0.48646458983421326,
0.24917195737361908,
0.09303555637598038,
0.18731407821178436... |
def environment ( self ) - > optional [ pulumi. input [ str ] ] : return pulumi. get ( self, " environment " ) | [
0.6368868947029114,
0.22335267066955566,
0.4031863808631897,
0.32503730058670044,
0.8961098194122314,
1.6259108781814575,
0.703342616558075,
-0.22648122906684875,
0.658298134803772,
0.198152095079422,
0.6040258407592773,
0.7420464754104614,
-0.08981878310441971,
-0.8646539449691772,
-0.6... |
def test _ melts _ phases ( self ) : result = melts _ phases ( self. dict ) | [
-0.7888646125793457,
0.30610042810440063,
0.09344522655010223,
-1.3541648387908936,
0.21435190737247467,
-0.4869302213191986,
-0.6214848756790161,
-0.08423967659473419,
1.0756616592407227,
-0.04486475884914398,
-0.765500545501709,
-0.30894964933395386,
-0.7329983115196228,
0.41855558753013... |
async def test _ str _ percent ( self ) : xknx = xknx ( ) expose _ sensor = exposesensor ( xknx, " testsensor ", group _ address = " 1 / 2 / 3 ", value _ type = " percent " ) await expose _ sensor. process ( telegram ( destination _ address = groupaddress ( " 1 / 2 / 3 " ), payload = groupvaluewrite ( dptarray ( ( 0x40... | [
0.24238932132720947,
0.5387306809425354,
0.46677327156066895,
-0.13697507977485657,
0.12682031095027924,
0.5456888675689697,
-0.5206186771392822,
-0.6387930512428284,
0.2026321440935135,
0.4135165512561798,
0.01688113436102867,
-0.39854007959365845,
-0.633671224117279,
-0.6884597539901733,... |
def _ _ init _ _ ( self, global _ importance _ values = none, global _ importance _ rank = none, ranked _ global _ names = none, ranked _ global _ values = none, * * kwargs ) : super ( globalexplanation, self ). _ _ init _ _ ( * * kwargs ) self. _ logger. debug ('initializing globalexplanation') self. _ global _ import... | [
0.37782564759254456,
1.2313470840454102,
0.5693895816802979,
0.31907570362091064,
0.20547044277191162,
0.9960787892341614,
0.49215447902679443,
1.4956445693969727,
-0.5208466053009033,
0.843835175037384,
-0.8276005983352661,
1.0432226657867432,
-0.8718648552894592,
1.2528163194656372,
1.... |
def testsettaginstancewithimplicittag ( self ) : self. store. commit ( ) with login ( u'username ', uuid4 ( ), self. transact ) as session : thriftvalue = createthriftvalue ( 42 ) objectid = uuid4 ( ) yield self. facade. settaginstance ( session, u'username / unknown ', str ( objectid ), thriftvalue ) value, tagvalue =... | [
-0.2284221202135086,
0.2681224048137665,
0.4102481007575989,
-0.629857063293457,
0.3135858476161957,
0.6085265278816223,
0.51095050573349,
-0.128944993019104,
0.13318610191345215,
-0.009004970081150532,
-1.1621052026748657,
0.1998344212770462,
0.032761964946985245,
0.5083398222923279,
0.... |
def test _ writeoutput ( rootdir, intercompartylist ) : writefile = os. path. join ( rootdir, writefile ) with open ( writefile,'w') as f : f. truncate ( 0 ) f. write ( " gibberish \ n " ) intercompartylist. writeoutput ( writefile, tuples ) f = open ( writefile,'r') verify _ answer ( f. read ( ),'5 nora dempsey \ n4 i... | [
0.056995049118995667,
-0.5715098977088928,
0.5167635679244995,
0.04946949705481529,
0.4443325996398926,
0.2956288158893585,
0.5589293837547302,
0.2799313962459564,
-0.5151886343955994,
-0.2341417819261551,
-0.10917098820209503,
-1.2494996786117554,
-1.0415724515914917,
-0.28592756390571594... |
def _ _ init _ _ ( self, amsn _ core, parent ) : raise notimplementederror | [
0.9048922061920166,
0.19352926313877106,
0.46011483669281006,
0.20704558491706848,
-0.5412461161613464,
0.3618801236152649,
-0.05903460457921028,
-0.21505843102931976,
1.1786233186721802,
0.03067968599498272,
-0.8421057462692261,
0.31035277247428894,
0.8092069029808044,
0.5289487242698669,... |
def downvotes ( question _ id ) : question = questions. getone _ question ( question _ id ) if question : downvote = questions ( ). downvotes ( question _ id ) return jsonify ( { " status " : 201, " data " : downvote,'message':'question downvoted'} ) return make _ response ( jsonify ( {'message':'question not found'} )... | [
0.46682870388031006,
-0.618986964225769,
0.6299434304237366,
0.25887051224708557,
0.4389663338661194,
-0.0004923404194414616,
-0.7780138850212097,
-0.266763836145401,
0.7487152814865112,
-0.38273176550865173,
0.22173239290714264,
0.6726480722427368,
-0.9529731869697571,
0.3733203709125519,... |
def local _ off _ diag _ stiffness _ matrix ( xk, xk1, beta ) : # calculate the length of the inteval h = xk1 - xk # the matrix will be 2x2 ak = np. zeros ( ( 2, 2 ) ) # build each value for the matrix for i in range ( 2 ) : for j in range ( 2 ) : # since we are takin h out the basis functions become + / - 1 this # fig... | [
-0.022046416997909546,
-0.7984577417373657,
0.37905484437942505,
-0.4093124568462372,
-0.1787896603345871,
-0.3698002099990845,
0.746116578578949,
0.39658114314079285,
-0.8529777526855469,
-0.15023168921470642,
0.0705811083316803,
0.39790380001068115,
-0.4845236837863922,
0.128755569458007... |
def is _ valid _ symb ( self ) : if self. is _ valid _ var ( ) or self. is _ valid _ int ( ) or self. is _ valid _ bool ( ) or self. is _ valid _ string ( ) or self. is _ valid _ float ( ) : return true elif self. datatype = = " nil " and self. value = = " nil " : return true return false | [
-0.639525830745697,
0.32747167348861694,
0.49307841062545776,
0.2514649033546448,
-0.07593565434217453,
-0.46988222002983093,
0.47753092646598816,
-0.025377439334988594,
0.1811344474554062,
-0.6039631962776184,
-0.016830723732709885,
0.6014320254325867,
-0.18884144723415375,
1.259848356246... |
def compute _ color _ for _ labels ( label ) : color = [ int ( ( p * ( label * * 2 - label + 1 ) ) % 255 ) for p in palette ] return tuple ( color ) | [
-1.5578336715698242,
0.16920563578605652,
0.43282049894332886,
-0.4876270294189453,
0.4098863899707794,
0.7047165036201477,
-0.9678894281387329,
0.045778539031744,
-0.14378826320171356,
0.9559599161148071,
-0.6448558568954468,
-0.19648832082748413,
-0.09809762239456177,
-0.4351693987846374... |
def motif ( self, scope, search _ text, max _ genes = 500, context = 25 ) : if self. aa _ group _ codes _ re. search ( search _ text ) : processed _ search _ text = self. substitute _ group _ codes ( search _ text ) else : processed _ search _ text = search _ text patt = regex. compile ( processed _ search _ text, rege... | [
-0.503677487373352,
-0.436924546957016,
0.7937747240066528,
-1.144444227218628,
-0.19680333137512207,
-1.259080410003662,
-0.6909093260765076,
0.7872462868690491,
0.08956864476203918,
0.8199200630187988,
-0.2326037436723709,
0.16178302466869354,
-0.2720591425895691,
-0.00911482609808445,
... |
def target _ portal _ id ( self ) : return self. _ target _ portal _ id | [
0.5214956998825073,
-1.503368854522705,
0.22346411645412445,
-0.6624505519866943,
0.5305774807929993,
1.7256602048873901,
0.34072619676589966,
0.11981143802404404,
1.4378374814987183,
0.6648191213607788,
0.4913799464702606,
1.8541382551193237,
-0.032562386244535446,
-1.1023218631744385,
... |
def load _ data ( database _ uri : str, input _ data : dict ) - > pandas. dataframe : if'query'not in input _ data : error ( " no query in the input specified. exiting... " ) query = input _ data ['query'] return sparqldockerwrapper. _ query _ triplestore ( database _ uri, query ) | [
-0.2806048095226288,
1.0762189626693726,
0.08528080582618713,
-0.32296693325042725,
-0.31158876419067383,
-0.0015082071768119931,
-0.8842538595199585,
0.36531078815460205,
0.6405510306358337,
-0.4243544638156891,
0.6190610527992249,
0.49696770310401917,
-1.5000661611557007,
-0.946149647235... |
def setsearchpath ( self, searchpath ) : pass | [
-1.0724858045578003,
-0.4246925711631775,
0.21845492720603943,
1.1830235719680786,
0.6821450591087341,
1.1506932973861694,
0.6738265156745911,
-0.5064953565597534,
-0.04619114100933075,
-0.151264488697052,
-0.8145893812179565,
0.2626360058784485,
-0.9461343288421631,
-0.2422206997871399,
... |
def tree _ shap ( self, tree, x, algo, data = none, n = 50000 ) : if type ( data )! = type ( self. data ) : data = self. data if tree is none : tree _ model = decisiontreeregressor ( ) tree _ model = self. fit _ model ( tree _ model ). tree _ else : tree _ model = tree. tree _ m = len ( x ) va _ id = list ( range ( m )... | [
0.13175179064273834,
0.7468885779380798,
0.7266671657562256,
0.36730995774269104,
-0.6262635588645935,
0.06596875935792923,
-0.7951699495315552,
1.1719396114349365,
0.33054041862487793,
0.838166356086731,
-0.13317565619945526,
0.40693655610084534,
-0.6648963689804077,
1.0344932079315186,
... |
def test _ srv _ inner _ product ( self ) : curves _ ab = self. l2 _ metric _ s2. geodesic ( self. curve _ a, self. curve _ b ) curves _ bc = self. l2 _ metric _ s2. geodesic ( self. curve _ b, self. curve _ c ) curves _ ab = curves _ ab ( self. times ) curves _ bc = curves _ bc ( self. times ) srvs _ ab = self. srv _ ... | [
-0.30434301495552063,
0.3690706193447113,
0.6908748745918274,
-0.31630587577819824,
0.4300558865070343,
0.841086208820343,
0.3959428071975708,
-0.8148214221000671,
0.26048359274864197,
0.06644503772258759,
-0.2960624694824219,
0.28680258989334106,
-0.7212141156196594,
-0.7055609822273254,
... |
def cond _ exp _ linear _ gmm ( self, x, s ) : x _ in = x. copy ( ) if len ( s )! = len ( x _ in ) : # if not condition on all variable cat _ va = [ ca for ca in s if ca in self. cat _ index ] # get categorical index s = [ cu for cu in s if cu not in self. cat _ index ] # get numerical index cond _ exp = 0 if cat _ va ... | [
0.5670000314712524,
-0.8373810052871704,
0.5934098958969116,
-0.3354065716266632,
-0.6587693095207214,
0.07323461771011353,
0.0838104709982872,
0.7351681590080261,
0.14406660199165344,
0.79167240858078,
-0.2321193963289261,
0.26375529170036316,
0.1612876057624817,
0.42494237422943115,
-0... |
def httpgetnofail ( url ) : try : if not url : return " " log _ nouser ( " trying an http get to % s " % url, 4 ) response = urllib2. urlopen ( url, none, 4 ) # a 4 second timeout is enough result = response. read ( ) if result : return result else : return " " except exception : log _ nouser ( traceback. format _ exc ... | [
-0.6735799908638,
0.47619351744651794,
0.5233140587806702,
0.020429933443665504,
-0.7184127569198608,
-0.08135318011045456,
-0.6858240962028503,
-0.6232594847679138,
-0.4023052453994751,
-0.5394982695579529,
0.15443630516529083,
-0.09409260749816895,
-0.6828266978263855,
-0.654968976974487... |
def _ load _ cdll ( name, add _ extension _ suffix = true ) : # our custom defined part of the extension file name libname = _ get _ lib _ name ( name, add _ extension _ suffix = add _ extension _ suffix ) libdir = os. path. join ( os. path. dirname ( _ _ file _ _ ), os. pardir,'lib') libpath = os. path. join ( libdir,... | [
0.8485971689224243,
-0.43500569462776184,
0.6902742981910706,
-0.1918216049671173,
-1.2518831491470337,
0.4962146282196045,
0.574529230594635,
0.23483499884605408,
0.29258233308792114,
0.7813657522201538,
-0.5218755602836609,
-0.4785976707935333,
-0.2700710594654083,
-0.037813927978277206,... |
def _ rollbacktransaction ( self, conn, callback, thread _ state = none ) : conn. rollback ( ) self. _ ioloop. add _ callback ( partial ( self. _ releaseconnectioninvokecallback, conn, callback ) ) | [
0.73103928565979,
-0.4006558060646057,
0.6776285767555237,
-0.4732856750488281,
0.21675193309783936,
-0.6163379549980164,
-0.35809358954429626,
0.8237915635108948,
-0.023418793454766273,
0.6078711748123169,
0.04588301107287407,
-0.42987170815467834,
-0.753663957118988,
-1.1640270948410034,... |
def test _ set _ setting ( parse _ conf ) : with patch. dict ( logrotate. _ _ salt _ _, { " file. replace " : magicmock ( return _ value = true ) } ), patch ( " salt. modules. logrotate. _ parse _ conf ", magicmock ( return _ value = parse _ conf ) ) : assert logrotate. set _ ( " / var / log / wtmp ", " rotate ", " 2 "... | [
0.4254388213157654,
0.6285402178764343,
0.5430349111557007,
-0.7135390043258667,
0.91010582447052,
-0.5186689496040344,
-0.0765492171049118,
-0.26917174458503723,
-0.13527311384677887,
0.5382013320922852,
-0.7447620630264282,
0.18788225948810577,
-0.5536418557167053,
-0.5912062525749207,
... |
def test _ edit _ editform _ post ( self ) : with patch ('user _ auth. views. editform') as form : request = magicmock ( ) request. method ='post'request. user = magicmock ( ) request. user. is _ authenticated = magicmock ( return _ value = true ) form. return _ value. is _ valid = magicmock ( return _ value = true ) f... | [
-0.46493351459503174,
0.4263678193092346,
0.5687892436981201,
0.15520349144935608,
0.35383597016334534,
0.8322934508323669,
-0.05671302601695061,
0.68865966796875,
0.526326060295105,
-0.9221678972244263,
-0.5750663876533508,
0.2589055299758911,
0.07890152186155319,
-0.2461964190006256,
0... |
def _ _ call _ _ ( self, current _ file : protocolfile, hypothesis : annotation, debugging : bool = false, ) - > annotation : # make sure current _ file is not modified current _ file = dict ( current _ file ) current _ file [ " annotation " ] = hypothesis current _ file [ " features " ] = self. feature _ extraction ( ... | [
-0.4481244385242462,
-0.40207529067993164,
0.7790766358375549,
0.641606330871582,
0.2937171459197998,
-0.26100432872772217,
0.7481029033660889,
0.3368378281593323,
-1.1907087564468384,
0.254248708486557,
-0.11782827973365784,
0.1896670162677765,
0.17288503050804138,
0.792479395866394,
0.... |
def resize ( video, output, size ) : return [ " ffmpeg ", " - i ", video, " - vf ", " scale = % d : % d " % ( res [ 0 ], res [ 1 ] ), output ] | [
-0.1865679919719696,
-0.14989009499549866,
0.5735311508178711,
0.8684952855110168,
0.25294074416160583,
-1.6370409727096558,
-0.7101958394050598,
-0.456115186214447,
-0.21526816487312317,
0.5903463363647461,
-0.3621835708618164,
-0.4786857068538666,
0.08058024197816849,
0.3139181137084961,... |
def get _ groups _ for _ learner ( self, svc, course : course, group _ set _ id ) - > optional [ list ] : # pragma : nocover return none | [
-0.13642533123493195,
0.3564784526824951,
0.15705464780330658,
-0.08699654787778854,
0.524263858795166,
-0.5558612942695618,
-0.578463613986969,
-1.6169087886810303,
-0.0867636576294899,
-0.4184107184410095,
0.206613227725029,
0.46510013937950134,
0.016644038259983063,
0.26978906989097595,... |
def test _ unit _ register _ with _ invalidpost ( self ) : with patch ('user _ auth. views. registerform') as reg : request = magicmock ( ) request. method = " post " request. post = " some input " # make input to registerform reg. return _ value = mock ( ) reg. return _ value. is _ valid = mock ( return _ value = fals... | [
-0.4176909625530243,
1.2646504640579224,
0.6045541167259216,
0.6527518033981323,
0.8461570143699646,
0.41135087609291077,
-0.2885989546775818,
-0.14915688335895538,
0.2785959541797638,
-1.3226042985916138,
-0.5844831466674805,
-0.01642433926463127,
-0.538591742515564,
0.21315911412239075,
... |
def writesettings ( self, qsettings, str _ prefix = none ) : # real signature unknown ; restored from _ _ doc _ _ return false | [
-1.0290908813476562,
0.7454849481582642,
0.47470587491989136,
0.15037158131599426,
0.04094519838690758,
-0.3457386791706085,
0.30899566411972046,
-0.791561484336853,
-0.07085820287466049,
-0.1634041965007782,
-0.9874586462974548,
-0.7183701992034912,
-1.0876343250274658,
-0.025647625327110... |
def rotate _ character ( char, rot ) : if char. isupper ( ) : return upper [ ( ( upper. index ( char ) + int ( rot ) ) % 26 ) ] elif char. islower ( ) : return lower [ ( ( lower. index ( char ) + int ( rot ) ) % 26 ) ] else : return char | [
-0.6681712865829468,
-1.0019264221191406,
0.4435104429721832,
-0.738040566444397,
0.16216786205768585,
-0.7608852386474609,
0.17172566056251526,
-0.5036632418632507,
0.41529786586761475,
-0.2831585705280304,
0.17343370616436005,
0.8276504874229431,
-1.7520055770874023,
-1.8308156728744507,... |
def set _ int _ attribute ( self, target, display _ mask, attr, value ) : reply = nvctrlsetattributeandgetstatusreplyrequest ( display = self. display, opcode = self. display. get _ extension _ major ( extname ), target _ id = target. id ( ), target _ type = target. type ( ), display _ mask = display _ mask, attr = att... | [
-0.7031550407409668,
-0.15317383408546448,
0.6165999174118042,
-0.4966399669647217,
-0.648022472858429,
0.3166447877883911,
0.2850542366504669,
-1.251853108406067,
0.43223854899406433,
0.7379468083381653,
-0.12061893194913864,
0.5811322331428528,
-0.5181286931037903,
0.03313354402780533,
... |
def is _ waiting ( self ) : return np. any ( [ self. _ is _ rung _ waiting ( i ) > 0 for i, _ in enumerate ( self. budgets ) ] ) | [
-1.2105931043624878,
0.13661576807498932,
0.5820070505142212,
1.2700949907302856,
0.5041011571884155,
0.84076327085495,
-0.4136539697647095,
0.38263964653015137,
-0.20464371144771576,
-0.062087591737508774,
0.08611370623111725,
0.3629688620567322,
-0.6404135227203369,
1.182892918586731,
... |
async def create _ stage ( tournament _ id : int, stages : list [ stagecreate ], tournament : tournament = depends ( alterable _ tournament ), db : session = depends ( get _ db ), ) : if not tournament : raise httpexception ( status _ code = status. http _ 404 _ not _ found, detail = f'no tournament found with id { tou... | [
-1.1466597318649292,
-0.36407604813575745,
0.419696182012558,
0.693670928478241,
0.9324524998664856,
0.20283041894435883,
-0.4645683765411377,
-0.3437753915786743,
-0.18480733036994934,
0.9003816843032837,
-0.3696545958518982,
-0.8887982368469238,
0.03228794410824776,
0.353270560503006,
... |
def test _ replace _ artifact _ dep ( self ) : pass | [
0.5735562443733215,
-0.36248132586479187,
0.03455851599574089,
0.29403671622276306,
0.19881868362426758,
0.06491407006978989,
2.173459529876709,
0.5799447298049927,
0.805324912071228,
-0.7287853956222534,
-1.289520502090454,
0.03724530711770058,
0.45058298110961914,
-0.5104689598083496,
... |
def value ( self ) - > float | none : if math. isnan ( self. _ state. state ) : return none if self. _ state. missing _ state : return none return self. _ state. state | [
0.3628808856010437,
-0.23168917000293732,
0.3576960861682892,
0.20032857358455658,
0.16258180141448975,
-0.09299077093601227,
-0.06271012127399445,
-0.3970487713813782,
0.00737858796492219,
-0.6719483137130737,
0.4181467890739441,
0.2252970188856125,
0.16333602368831635,
0.3711330890655517... |
def writebuildfile ( self, tasklist, buildfilepath, output ='ant') : writer = none buildfiledir = os. path. dirname ( buildfilepath ) if len ( buildfiledir ) > 0 and not os. path. exists ( buildfiledir ) : os. makedirs ( buildfiledir ) writer = get _ writer ( output, open ( buildfilepath,'w') ) writer. write ( tasklist... | [
-0.20391766726970673,
-0.7123862504959106,
0.39412739872932434,
0.9114158153533936,
0.7399436831474304,
1.065759301185608,
1.1514068841934204,
0.3074493408203125,
-0.9113617539405823,
-0.2547588050365448,
-0.9830323457717896,
-0.6939378976821899,
-0.06990452855825424,
-0.0912240669131279,
... |
def freeze ( self ) : clusters = clustergroup ( ) for i in self : if isinstance ( i, partialcluster ) : cluster = cluster ( i. exprs, i. stencil ) clusters. append ( cluster ) clusters. atomics [ cluster ] = self. atomics [ i ] else : clusters. append ( i ) return clusters | [
-0.9203330874443054,
-0.13672912120819092,
0.4388968050479889,
0.32815128564834595,
0.2163919359445572,
-0.03290402889251709,
0.3632320463657379,
-1.6177127361297607,
0.062101393938064575,
0.19470103085041046,
0.24009649455547333,
0.24473446607589722,
-1.6002957820892334,
-0.30167403817176... |
def http _ middleware ( self, middleware : t ) - > t : self. _ http _ middlewares. append ( middleware ) return middleware | [
-0.8731082081794739,
0.11368830502033234,
0.4386400580406189,
0.2589057981967926,
-0.3042943775653839,
1.0386089086532593,
-1.442590355873108,
-0.48523369431495667,
0.45965877175331116,
-1.1038031578063965,
-0.3367566764354706,
0.16017486155033112,
-0.8334305286407471,
0.6246715784072876,
... |
def plot _ xyz _ points ( hostname : str, lidar _ port : int = 7502 ) - > none : import matplotlib. pyplot as plt # type : ignore # get single scan metadata, sample = client. scans. sample ( hostname, 1, lidar _ port ) scan = next ( sample ) [ 0 ] # set up figure plt. figure ( ) ax = plt. axes ( projection ='3d') r = 3... | [
0.6087012887001038,
1.0275834798812866,
0.46389317512512207,
-0.10370950400829315,
-0.7832602262496948,
0.25288644433021545,
-0.20739640295505524,
0.46822381019592285,
0.21931453049182892,
0.44423338770866394,
-0.12658488750457764,
1.088297963142395,
0.30430296063423157,
-0.972928881645202... |
def unique _ values _ as _ string ( data = none, column _ name = none, array = none, separator = ', ', list _ shaped = false, unique = true ) : value = none if array is not none : value = np. unique ( array ) if unique else array if data is not none : value = data [ column _ name ]. unique ( ) if unique else data [ col... | [
-0.2006298005580902,
0.17013856768608093,
0.6221227049827576,
0.030342355370521545,
-0.02810925617814064,
-0.17125920951366425,
-0.757205605506897,
-0.3191181719303131,
0.36945316195487976,
0.389650821685791,
0.2812761962413788,
1.0793206691741943,
0.3349282443523407,
0.21712099015712738,
... |
def test _ conversion _ to _ default _ timezone ( self ) : report _ saver = reportformsaver ( self. report _ form _ sample _ timezone _ daily ) report _ saver. extract _ report _ data _ into _ airflow ( report _ exists = false ) report _ airflow _ variable = variable. get ( " rb _ status _ " + self. report _ form _ sam... | [
-0.039330169558525085,
0.0965808629989624,
0.4721777141094208,
0.22014771401882172,
0.9271493554115295,
-0.0765184685587883,
0.23600515723228455,
-0.22647826373577118,
0.16049163043498993,
0.27059638500213623,
-0.42320653796195984,
-0.2041321098804474,
-0.7795554995536804,
-0.1438509672880... |
def compare ( b _ val, r _ val, b _ eps, r _ eps ) : b _ val = [ b _ val - b _ eps, b _ val + b _ eps, b _ val ] r _ val = [ r _ val - r _ eps, r _ val + r _ eps, r _ val ] flux = func ( b _ val, r _ val ) assert np. allclose ( np. mean ( flux [ : 2 ] ), flux [ 2 ] ) | [
0.4687974452972412,
0.1634201854467392,
0.6357359886169434,
0.4220510423183441,
0.46190300583839417,
0.57058185338974,
0.7977908253669739,
-0.360836923122406,
-0.13509829342365265,
-0.7665914297103882,
-0.045962002128362656,
0.5444521903991699,
0.26975080370903015,
0.22410719096660614,
-... |
def run ( self ) : # show the dialog self. dlg. show ( ) | [
1.079093098640442,
-0.13573355972766876,
0.2626173496246338,
-0.35774898529052734,
-0.3437964916229248,
0.3861219882965088,
0.5184057950973511,
1.771571159362793,
0.33676910400390625,
-0.04865555837750435,
0.08745814859867096,
0.9896194338798523,
0.21458540856838226,
0.5896657705307007,
... |
def set _ pad _ mode _ 3 ( data : bytearray, block _ size : int ) - > bytearray : if get _ pad _ size ( data, block _ size ) = = 0 : result = data else : result = data + b'\ x80'+ b'\ x00'* ( get _ pad _ size ( data, block _ size ) - 1 ) return result | [
0.17284856736660004,
0.17429307103157043,
0.7880378365516663,
0.2167349010705948,
-0.39160606265068054,
0.5207021236419678,
-1.0674757957458496,
-0.3423837423324585,
0.4415617883205414,
0.5613823533058167,
-0.21783898770809174,
0.47683122754096985,
-0.2962328791618347,
0.510179340839386,
... |
def _ process _ in _ session _ tcp _ message ( self, pdu ) : if pdu. type = = messagetype. destination _ up _ message : log. debug ( " - - > got destination up message " ) new _ dib = destinationinformationbase ( ) self. process _ data _ items ( pdu. data _ items, new _ dib ) self. destination _ information _ base. app... | [
-0.4295356273651123,
-0.3438943326473236,
0.8559984564781189,
-0.06565912812948227,
0.691627025604248,
-0.4438630938529968,
0.612126350402832,
-0.5652267336845398,
-0.23793210089206696,
0.052169326692819595,
0.23639459908008575,
-0.5190213322639465,
-0.4352165162563324,
0.2413272261619568,... |
def query _ string _ attribute ( self, target, display _ mask, attr ) : reply = nvctrlquerystringattributereplyrequest ( display = self. display, opcode = self. display. get _ extension _ major ( extname ), target _ id = target. id ( ), target _ type = target. type ( ), display _ mask = display _ mask, attr = attr ) if... | [
-0.31918299198150635,
-0.5623270869255066,
0.44992178678512573,
-0.7137112617492676,
-0.6422117352485657,
-0.3483993411064148,
-0.36622437834739685,
-1.6051511764526367,
1.0677045583724976,
0.3973030149936676,
0.7881242632865906,
1.0608975887298584,
-0.5662437081336975,
-0.8877854347229004... |
def finalize ( self, pixel _ dimensions, pixel _ location = ( 0, 0 ), depth = 0 ) : self. validate ( ) self. absolute _ location = pixel _ location self. absolute _ size = pixel _ dimensions self. depth = depth self. grid _ size = ( pixel _ dimensions [ 0 ] / self. dimensions [ 0 ], pixel _ dimensions [ 1 ] / self. dim... | [
-0.25069740414619446,
0.43760770559310913,
0.5127596855163574,
-0.32746055722236633,
-0.24890653789043427,
-0.0395987406373024,
0.5458771586418152,
-0.2886916399002075,
-0.37438076734542847,
-0.5874860286712646,
0.2062850147485733,
0.010961131192743778,
0.22598564624786377,
1.2545924186706... |
def crea _ usuario _ admin ( ) : from os import environ from cacao _ accounting. auth import proteger _ passwd from cacao _ accounting. auth. registros import registrousuario log. info ( " creando usuario administrador " ) usuario = registrousuario ( ) user = environ. get ( " cacao _ user ", none ) or " cacao " pwd = e... | [
0.7251977324485779,
0.5176393389701843,
0.6006953120231628,
0.9723421335220337,
-0.17668291926383972,
0.4842356741428375,
0.6304795742034912,
-0.5290401577949524,
0.09077370911836624,
-0.03061121515929699,
-0.0750214233994484,
0.6091533303260803,
0.3270656168460846,
0.20490123331546783,
... |
def profile ( func ) : def inner ( * args, * * kwargs ) : pr = cprofile. profile ( ) pr. enable ( ) retval = func ( * args, * * kwargs ) pr. disable ( ) s = io. stringio ( ) sortby ='cumulative'ps = pstats. stats ( pr, stream = s ). sort _ stats ( sortby ) ps. print _ stats ( ) print ( f'{ func. _ _ qualname _ _ }. txt... | [
1.2436968088150024,
-0.6456272602081299,
0.8468473553657532,
-0.14254067838191986,
-0.15780840814113617,
0.3265836536884308,
0.9068630337715149,
-0.3471638262271881,
-0.2582569420337677,
-0.24405677616596222,
0.23338046669960022,
0.2779099941253662,
-0.3492964208126068,
-0.2581784427165985... |
def get _ disks ( self ) : return self. storage. disks | [
-0.6305655241012573,
0.20331232249736786,
0.3766435980796814,
0.6074531674385071,
0.6288976669311523,
0.03727981075644493,
-0.24073712527751923,
-0.602810263633728,
0.19473998248577118,
-1.013146996498108,
-0.1995665282011032,
-0.12667861580848694,
-0.1336597204208374,
-0.4746856689453125,... |
def getstartindex ( self ) : return _ itkimageserieswriterpython. itkimageserieswriterirgbus3irgbus2 _ getstartindex ( self ) | [
-0.17898201942443848,
-0.47997140884399414,
0.2879308760166168,
0.39533907175064087,
0.5979993343353271,
0.3117050528526306,
0.27317240834236145,
0.3879433572292328,
-0.0685916617512703,
0.052435752004384995,
-0.8396875262260437,
1.42137610912323,
-0.958989143371582,
-1.1909104585647583,
... |
def name ( self ) - > str : return self. _ name | [
-0.404328852891922,
-1.072009801864624,
0.10539824515581131,
-0.45077598094940186,
-0.8229008316993713,
1.146654725074768,
-0.17474815249443054,
-0.32431599497795105,
-0.0291740782558918,
0.37083619832992554,
-0.08448516577482224,
0.2760368585586548,
0.5119032263755798,
-0.4964417815208435... |
def plot _ corr ( data ) : corr = data. corr ( ) mask = np. zeros _ like ( corr, dtype = bool ) mask [ np. triu _ indices _ from ( mask ) ] = true palette = sns. diverging _ palette ( 20, 220, n = 256 ) fig = plt. figure ( figsize = ( 16, 16 ) ) sns. heatmap ( corr, mask = mask, cmap = palette, annot = true ) plt. tigh... | [
0.8053454756736755,
0.537060022354126,
0.6458415985107422,
-0.5232059955596924,
0.052309051156044006,
0.43415698409080505,
1.2011855840682983,
0.8940104842185974,
0.7327423095703125,
-0.42968088388442993,
0.24422411620616913,
0.9700712561607361,
-0.2068183571100235,
-0.06874529272317886,
... |
def get _ literal _ choices ( tp : type ) - > typing. list [ typing. union [ str, bytes, int, bool, none ] ] : # a literal type may contain other literals, so need to unnest those. this doesn't happen automatically like it # happens for unions. for more details, see # https : / / www. python. org / dev / peps / pep - 0... | [
-0.17695662379264832,
0.058266449719667435,
0.41323143243789673,
-0.5855578780174255,
0.7842345237731934,
0.6595280766487122,
-0.8506714105606079,
-0.36922797560691833,
-0.5203647613525391,
0.8716824650764465,
-0.024002566933631897,
0.16935062408447266,
-0.2614305019378662,
1.1046543121337... |
def type ( self ) : return self. _ dict. get ('type') | [
-0.27689608931541443,
0.7298322319984436,
0.16527272760868073,
-0.017313292250037193,
1.3391555547714233,
0.7794620990753174,
0.5028413534164429,
-0.23670823872089386,
0.7942696809768677,
-0.312320351600647,
-0.13068030774593353,
0.5626200437545776,
-0.8544672727584839,
-0.4426721632480621... |
def _ proto _ timestamp _ from _ epoch _ nanos ( nsec : int ) - > timestamp : nsec _ time = nsec / 1e9 seconds = int ( nsec _ time ) nanos = int ( ( nsec _ time - seconds ) * 1e9 ) return timestamp ( seconds = seconds, nanos = nanos ) | [
0.563578188419342,
0.720353901386261,
0.08848634362220764,
-0.28129833936691284,
-0.5007729530334473,
-0.06074532866477966,
-0.7804715633392334,
-0.9288440942764282,
0.08835339546203613,
0.19875642657279968,
-0.5493667125701904,
-0.497901052236557,
1.0154966115951538,
0.021463127806782722,... |
def confidence _ to _ weights ( x, k ) : return np. power ( 1 - x, k ) | [
0.1750870943069458,
-0.2723381519317627,
0.37628546357154846,
0.908952534198761,
0.6219297647476196,
-0.1449200063943863,
-1.2683491706848145,
0.6213840246200562,
-0.6391071081161499,
1.2211904525756836,
-0.23109769821166992,
0.515483021736145,
-0.17938247323036194,
0.2827601134777069,
-... |
def post ( self, request, project ) : return upload _ from _ request ( request, project = project ) | [
-1.0653349161148071,
0.21843987703323364,
0.36554884910583496,
0.7720799446105957,
0.19310855865478516,
0.4237583577632904,
-0.17768673598766327,
-0.8134293556213379,
-0.7828738689422607,
-0.38148412108421326,
0.2360154241323471,
-0.06343210488557816,
-0.9037179946899414,
0.524099111557006... |
def forward ( self, x ) : # # # # # # # # # # # # # # # # # # # # # # # # # put your code here # # # # # # # # # # # # # # # # # # # # # # # # out = self. conv ( x ) out = self. linear ( out. view ( out. data. shape [ 0 ], - 1 ) ) # # # # # # # # # # # # # # # # # # # # # # # # # end of your code # # # # # # # # # # # ... | [
0.3194167912006378,
-0.09123691916465759,
0.9606121182441711,
-0.14580360054969788,
-0.7457718849182129,
0.0034659423399716616,
0.277712345123291,
-0.1314317286014557,
0.49073368310928345,
-1.1263141632080078,
-0.8726911544799805,
0.7159581780433655,
-0.5303419232368469,
0.0137836579233407... |
def load _ articles ( language, dump _ path, wikidata _ mapping _ path ) : # get article to wikidata _ item mapping wikidata _ mapping = sc. textfile ( wikidata _ mapping _ path ) \. map ( lambda line : line. split ('\ t') ) \. filter ( lambda x : x [ 1 ] = = language ) \. map ( lambda x : ( x [ 1 ] + " | " + x [ 2 ]. ... | [
-0.6371023058891296,
-0.5285323858261108,
0.7711478471755981,
-1.3725963830947876,
-0.6794388294219971,
0.13473762571811676,
-0.9428641200065613,
0.5191544890403748,
-0.6779732704162598,
0.7468302249908447,
-0.5858633518218994,
-0.6228120923042297,
-0.1725381761789322,
-0.5073181390762329,... |
def _ _ init _ _ ( self, inobj ) : # derive ra / dec in degrees, and galactic coordinates. if ( hasattr ( inobj,'raj') and hasattr ( inobj,'decj') ) : sc = skycoord ( inobj. raj +'' + inobj. decj, unit = ( u. hourangle, u. deg ) ) setattr ( self,'rajdeg ', sc. ra. deg ) setattr ( self,'decjdeg ', sc. dec. deg ) setattr... | [
-0.26256248354911804,
-0.26446929574012756,
0.7988442778587341,
-0.4391254186630249,
-0.3430422842502594,
0.5529218316078186,
-0.10575443506240845,
-0.15706008672714233,
-0.2009964883327484,
-0.8875319957733154,
-0.0715237483382225,
0.11716428399085999,
0.8927074670791626,
0.63756704330444... |
def target _ design _ id ( self ) : return self. _ target _ design _ id | [
0.31301334500312805,
-0.16549533605575562,
0.2167447805404663,
0.6073287725448608,
0.6176188588142395,
1.073049545288086,
0.2571380138397217,
0.4727579355239868,
1.1719759702682495,
-0.7222837209701538,
0.5798372626304626,
1.4201561212539673,
1.138802409172058,
-0.33507251739501953,
-0.0... |
def deleteindex ( self, annid, resolutions ) : # delete index table for each resolution for res in resolutions : sql = " delete from " + self. proj. getidxtable ( res ) + " where annid = " + str ( annid ) try : self. cursor. execute ( sql ) except mysqldb. error, e : logger. error ( " error deleting the index % d : % s... | [
-0.08792842924594879,
0.09600793570280075,
0.2851758599281311,
0.5419327616691589,
0.10998354107141495,
0.6020095348358154,
0.17004430294036865,
-0.28006187081336975,
-0.14704880118370056,
0.33165186643600464,
0.2934792935848236,
-0.6903108358383179,
-0.8595671057701111,
-0.050776105374097... |
def readfile ( path ) : fileobj = open ( path,'r') try : alllines = fileobj. readlines ( ) finally : fileobj. close ( ) return alllines | [
0.7688732743263245,
-1.06528902053833,
0.5864004492759705,
0.21256591379642487,
-0.4363797605037689,
0.7999342083930969,
-0.8538055419921875,
-0.22578801214694977,
-0.38171184062957764,
-0.44305741786956787,
0.5181246399879456,
-0.3598853647708893,
-0.026033438742160797,
-0.158055871725082... |
def _ _ iter _ _ ( self ) : for w, i in sorted ( iteritems ( self. word _ id ), key = lambda wc : wc [ 1 ] ) : yield w | [
0.05876218527555466,
-0.4945712387561798,
0.17666739225387573,
-0.4474201202392578,
0.11536693572998047,
0.6484911441802979,
0.043314095586538315,
-1.1894148588180542,
-0.5624215006828308,
0.5449186563491821,
0.5182473063468933,
0.7746189832687378,
-0.7458116412162781,
0.6527349352836609,
... |
def get _ self _ follows ( self ) : url = self. client. me +'/ follows'return self. client. get ( url, bucket = _ func _ ( ) ) | [
-0.7324254512786865,
0.6432162523269653,
0.41725078225135803,
1.0247986316680908,
-0.6970434188842773,
0.4371521472930908,
-0.2734920084476471,
-1.246167778968811,
-0.12130024284124374,
-1.7748836278915405,
-1.0218465328216553,
1.249385118484497,
-0.5715699791908264,
0.23614288866519928,
... |
def setup ( self ) : super ( ). setup ( ) self. vulnerabilities _ json = { " total " : " 2 ", " issues " : [ { " key " : " vulnerability1 ", " message " : " message1 ", " component " : " component1 ", " severity " : " info ", " type " : " vulnerability ", " creationdate " : " 2020 - 08 - 30t22 : 48 : 52 + 0200 ", " upd... | [
0.3417116701602936,
-0.998677134513855,
0.8982693552970886,
-0.33518701791763306,
0.8543369174003601,
0.4475683867931366,
-0.3961840569972992,
0.5793983936309814,
0.11445850878953934,
0.2708510458469391,
-0.7366282939910889,
-0.29135167598724365,
0.2563708424568176,
0.4261637330055237,
0... |
def full _ text _ search ( ) : documents = [ ] produce = produce. query. all ( ) for p in produce : name = p. prod _ name p _ type = p. prod _ type p _ describe = p. describe p _ date = p. avail _ date p. id = str ( p. prod _ id ) body = dict ( type = p _ type, name = name, date = p _ date ) lunr _ ready = dict ( id = ... | [
-1.1536885499954224,
-0.940862774848938,
0.7201735377311707,
-0.5893709063529968,
-0.590979814529419,
-0.5477105379104614,
-1.2878878116607666,
-0.3566453456878662,
-0.29156434535980225,
0.325761616230011,
-0.6380056738853455,
-0.07667958736419678,
0.2915259599685669,
-0.23011146485805511,... |
def collect _ tests ( self ) : self. _ load _ default _ tests ( ) self. _ load _ json _ tests ( ) self. _ load _ py _ tests ( ) self. _ tests _ collected = true | [
0.014674779027700424,
-0.008578871376812458,
0.48562178015708923,
0.08596361428499222,
1.1632295846939087,
0.8579403758049011,
0.40045931935310364,
-1.1592246294021606,
-0.15767595171928406,
-0.13954056799411774,
-0.47662243247032166,
0.025697296485304832,
-0.27627503871917725,
0.710418224... |
def _ build _ replay _ buffer ( self, use _ staging ) : if self. _ replay _ scheme not in ['uniform ','prioritized'] : raise valueerror ('invalid replay scheme : { } '. format ( self. _ replay _ scheme ) ) return prioritized _ replay _ buffer. wrappedprioritizedreplaybuffer ( observation _ shape = self. observation _ s... | [
-0.40281566977500916,
0.21008896827697754,
0.3653212785720825,
0.13179317116737366,
0.6101354360580444,
-0.1023569330573082,
0.12412451207637787,
-0.043798696249723434,
0.7523574233055115,
-0.24756290018558502,
-0.06998485326766968,
0.8758687973022461,
0.019023951143026352,
-0.411038547754... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.