text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def test _ atomic _ hex _ binary _ enumeration _ 2 _ nistxml _ sv _ iv _ atomic _ hex _ binary _ enumeration _ 3 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / hexbinary / schema + instance / nistschema - sv - iv - atomic - hexbinary - enumeration - 3. xsd ", instance ... | [
-0.5903375148773193,
-0.4583524763584137,
0.5380778908729553,
0.4953831434249878,
-0.2509060502052307,
0.6617817878723145,
-0.715399444103241,
0.14664269983768463,
0.0018524022307246923,
0.8197559714317322,
-0.588036298751831,
-0.13827015459537506,
0.07309383153915405,
0.15943428874015808,... |
def binned _ indexing ( triangle _ positions, triangle _ normals, binsize = 10000, epsilon = 1e - 12 ) : # xxxx don't compute normal correction for now tn = np. array ( triangle _ normals, dtype = np. float32 ) tp = np. array ( triangle _ positions, dtype = np. float32 ) tns = tn. shape tps = tp. shape assert tns = = t... | [
-0.4352811872959137,
-0.3197685182094574,
0.5678603649139404,
-0.3950106203556061,
-0.7496487498283386,
0.5143304467201233,
0.6669576168060303,
0.4582873284816742,
-0.3424313962459564,
1.0400022268295288,
-0.3689897060394287,
-0.39745524525642395,
-0.000329049420543015,
-0.4710783362388611... |
def drawdeck ( self, deck : deck, position ) : numberofcard = self. main _ font. render ( str ( deck. getnbcard ( ) ), true, configuration. main _ font _ black ) if position = = configuration. top : self. drawcard ( none, configuration. deck _ top _ position, false, true ) self. window. blit ( numberofcard, configurati... | [
-0.2796590328216553,
0.49196857213974,
0.622065544128418,
-0.4198870062828064,
-0.32647955417633057,
0.023529885336756706,
-0.5117941498756409,
0.5729485750198364,
0.33084237575531006,
-0.5448133945465088,
0.15998567640781403,
0.024775508791208267,
-0.27899929881095886,
0.908204972743988,
... |
def _ objects _ to _ object _ segment _ message ( self, hx _ os, objects _ mask, k, direction : str, oo _ dists = none ) : hidden _ size = self. human _ segment _ rnn _ fcell. hidden _ size batch _ size, dtype, device = objects _ mask. size ( 0 ), objects _ mask. dtype, objects _ mask. device grab _ state _ fn = grab _... | [
-0.7591641545295715,
0.05433753505349159,
0.7251951098442078,
-0.2759568691253662,
0.7425335049629211,
-0.2540969252586365,
0.6827802062034607,
-0.7504308223724365,
-0.11209655553102493,
0.7358514666557312,
-0.23850761353969574,
0.022648150101304054,
0.7235608696937561,
-0.2259735763072967... |
def boil _ size ( self ) : return self. water _ boiloff ( ) + float ( self. batch _ size ) + float ( self. boiler _ tun _ deadspace ) | [
-0.15561531484127045,
0.007650480605661869,
0.386862188577652,
-0.18005184829235077,
-0.054408859461545944,
0.6616936922073364,
0.17955221235752106,
0.4739793539047241,
-0.28636860847473145,
-0.30125847458839417,
-0.5861123204231262,
0.2803924083709717,
-0.37876108288764954,
0.559290885925... |
def update ( self ) : if self. mudpi. is _ prepared : try : if self. active : if not self. _ step _ complete : if not self. _ delay _ complete : if self. step _ delay is not none : if self. duration > self. step _ delay : self. _ delay _ complete = true self. _ delay _ actual = self. duration self. reset _ duration ( )... | [
-0.6906449198722839,
-0.8808728456497192,
0.6939108967781067,
0.19574947655200958,
-0.696813702583313,
-0.5929439663887024,
0.15352365374565125,
-0.06336444616317749,
-0.7761500477790833,
-0.03543580695986748,
-0.12121918797492981,
-0.3312316834926605,
-0.3673985004425049,
0.53514397144317... |
def textlines ( self, obj, offset = none ) : self. _ sayallisinterrupted = false try : text = obj. querytext ( ) except : self. _ insayall = false self. _ sayallcontexts = [ ] return self. _ insayall = true length = text. charactercount if offset = = none : offset = text. caretoffset # determine the correct " say all b... | [
-0.06876346468925476,
-0.5674105882644653,
0.8651475310325623,
-0.1346987783908844,
-0.6055883765220642,
-0.4515645205974579,
-0.7903412580490112,
-0.3455105721950531,
0.3425532579421997,
-0.08887483924627304,
0.19684751331806183,
-0.019771313294768333,
-0.03514711931347847,
0.093238145112... |
def test _ undirected _ edge _ is _ self _ edge ( self ) : v0 = undirectedvertex ( val ='v0') v1 = undirectedvertex ( val ='v1') e00 = undirectededge ( ( v0, v0 ) ) e01 = undirectededge ( ( v0, v1 ) ) self. asserttrue ( e00. is _ self _ edge ) self. assertfalse ( e01. is _ self _ edge ) with self. assertraises ( attrib... | [
-0.5881615281105042,
-0.3511647582054138,
0.3853544592857361,
0.24513660371303558,
0.029432388022542,
0.2810012400150299,
1.3106063604354858,
0.4063800275325775,
0.4422954320907593,
0.07139967381954193,
-0.6354954242706299,
0.4150383472442627,
-0.046734679490327835,
0.13506191968917847,
... |
def getduplicateitems ( iterable ) : return [ k for k, v in counter ( iterable ). items ( ) if v > 1 ] | [
-1.119017243385315,
0.11145874857902527,
0.4344044327735901,
1.4927678108215332,
0.49606645107269287,
0.45618492364883423,
0.1952381432056427,
-0.3047913610935211,
0.11668942868709564,
0.4651786983013153,
-1.0891835689544678,
-0.5492711663246155,
0.27148473262786865,
0.003579854965209961,
... |
def broadcast ( self, action, * data, target = none ) : mynick = self. server. env ['user'] mychan = self. server. env ['channel'] # validate within a channel, and / nick has been set, if not ( mychan or target ) and action! ='part': self. display _ text ('you must first { } a channel! '. format ( self. standout ('/ jo... | [
-0.25798141956329346,
0.09889394789934158,
0.8012536764144897,
-0.40892356634140015,
-0.05549139901995659,
0.09612808376550674,
0.6072202324867249,
0.046383555978536606,
-0.07816636562347412,
-0.1630953997373581,
-0.3263779878616333,
1.6894288063049316,
-0.9805466532707214,
-0.028625374659... |
def get _ bin _ edges ( grid ) : v0 = grid [ 0 ] - ( grid [ 1 ] - grid [ 0 ] ) / 2 edges = [ v0 ] for i in range ( len ( grid ) ) : v1 = grid [ i ] * 2 - v0 edges. append ( v1 ) v0 = v1 return np. asarray ( edges ) | [
-0.6836298704147339,
-0.45722150802612305,
0.6546369194984436,
0.8923631906509399,
0.9265856742858887,
0.23996569216251373,
-0.1788991242647171,
0.0413748100399971,
-0.12987501919269562,
0.6593326330184937,
-0.5061147809028625,
1.1621527671813965,
-0.6286506652832031,
0.9346192479133606,
... |
def forward ( self, action : agentaction ) - > torch. tensor : action _ list : list [ torch. tensor ] = [ ] if self. _ specs. continuous _ size > 0 : action _ list. append ( action. continuous _ tensor ) if self. _ specs. discrete _ size > 0 : flat _ discrete = torch. cat ( modelutils. actions _ to _ onehot ( torch. as... | [
-0.3741278350353241,
0.5928603410720825,
0.6313871741294861,
0.5143085718154907,
0.5884894132614136,
0.10269305109977722,
0.7030720710754395,
0.3360274136066437,
1.0271518230438232,
0.15780100226402283,
0.43647685647010803,
0.37714818120002747,
1.1130107641220093,
-0.15170849859714508,
-... |
def precip ( ) : results = session. query ( measurement. date, measurement. prcp ). all ( ) # convert list of tuples into normal list results = list ( np. ravel ( results ) ) return jsonify ( results ) | [
-0.7342201471328735,
0.2782222330570221,
0.5681204795837402,
-0.8424167037010193,
-0.2303663194179535,
-0.662224531173706,
-1.1344490051269531,
-0.24033145606517792,
0.08040929585695267,
0.8906753063201904,
0.4421948194503784,
-1.325787901878357,
0.0007074608001857996,
0.4434968829154968,
... |
def write _ new _ files ( data _ filename, sales _ filename ) : open _ new _ file ( data _ filename ) open _ new _ sales _ file ( sales _ filename ) | [
-0.38935360312461853,
-1.0422545671463013,
0.5059593915939331,
0.3458668887615204,
1.1043694019317627,
0.49205708503723145,
0.4163020849227905,
0.3998536467552185,
-1.2523880004882812,
-0.6602997779846191,
0.35810840129852295,
0.23685073852539062,
0.5212608575820923,
0.2705862820148468,
... |
def _ _ init _ _ ( self, capacity, operation, neutral _ element ) : assert capacity > 0 and capacity & ( capacity - 1 ) = = 0, " capacity must be positive and a power of 2. " self. _ capacity = capacity self. _ value = [ neutral _ element for _ in range ( 2 * capacity ) ] self. _ operation = operation | [
-0.7147404551506042,
-0.07562769204378128,
0.36371690034866333,
1.8352477550506592,
-0.4992177486419678,
-0.31573277711868286,
0.22541339695453644,
0.8851621747016907,
-0.6253741979598999,
-0.5740558505058289,
0.018386369571089745,
0.021425651386380196,
0.750435471534729,
0.020870240405201... |
def templateparams ( parameters ) : templateparams = { } if not parameters : return templateparams # evaluate parameters, sice they may contain templates, including the # symbol " = ". # { { # ifexpr : { { { 1 } } } = 1 } } for i, p in enumerate ( parameters ) : parameters [ i ] = expandtemplates ( p ) # parameters can... | [
-0.9582929015159607,
-0.1843007653951645,
0.7554239630699158,
-0.5159446001052856,
-0.94328373670578,
-1.3157929182052612,
0.6536471247673035,
0.08917749673128128,
0.02240031026303768,
0.8054315447807312,
-0.48975133895874023,
-0.41361913084983826,
0.22030287981033325,
0.9970021843910217,
... |
def instance _ messages ( self ) - > sequence ['outputs. instancemessageresponse'] : return pulumi. get ( self, " instance _ messages " ) | [
-0.511605978012085,
-0.029757041484117508,
0.2866136133670807,
0.05183544382452965,
1.1601617336273193,
0.7275269627571106,
0.4227859377861023,
-0.49108046293258667,
0.3216007947921753,
0.013082458637654781,
-1.0233421325683594,
0.4197033643722534,
-0.47669053077697754,
-0.2742710411548614... |
def find _ record ( artist _ name : str, song _ name : str ) - > str : db, connection = open _ db ( " lyrics. db " ) return connection. execute ( f " select * from songs where artist =? and name =? ", ( artist _ name, song _ name ) ) | [
0.7431613802909851,
-0.33039987087249756,
0.4496432840824127,
-0.725957989692688,
-0.6057494282722473,
-0.004207652527838945,
-0.6452211141586304,
-0.21184411644935608,
-1.499835729598999,
1.2028586864471436,
0.6243472099304199,
0.11688733100891113,
-0.6635440587997437,
0.02593322470784187... |
def priority _ garbage _ collect ( ) : # retrieve current data from inst current _ internal _ policy = inst. current _ internal _ policy current _ edge _ policy = inst. current _ edge _ policy active _ flows = inst. active _ flows # reset priority new _ priority = max _ priority # if active _ flows exist if active _ fl... | [
0.01755216158926487,
-1.0953457355499268,
0.6722506880760193,
-1.0211915969848633,
0.6964187026023865,
0.32524818181991577,
-0.1928265392780304,
0.5863965749740601,
0.7828691601753235,
0.3948400020599365,
0.4533742368221283,
0.21558183431625366,
-0.4500012695789337,
0.02387363463640213,
... |
def use ( sim ) : store _ sim _ info ( sim, env ='default') #'topology - 2lkx2'click. secho ('now using virl simulation { } '. format ( sim ) ) | [
0.4423115849494934,
0.47222134470939636,
0.3206314146518707,
1.0567734241485596,
0.025783386081457138,
-0.7434130311012268,
0.7125047445297241,
-0.29868969321250916,
0.5571521520614624,
-0.5488134622573853,
-0.6773523092269897,
0.3259960114955902,
0.06929151713848114,
-0.3270437717437744,
... |
def alpha _ schedule ( self, t, state, action ) : alpha = self. n [ state, action ] * * - 0. 8 assert 0 < alpha < = 1, " error, alpha = { } ". format ( alpha ) return alpha | [
-0.8817436099052429,
-0.8716620802879333,
0.47852620482444763,
-0.18913596868515015,
-0.3333655893802643,
0.5136185884475708,
-0.32059723138809204,
-0.011038818396627903,
-0.1985020488500595,
0.9533504247665405,
0.5394764542579651,
0.5774880051612854,
0.233085036277771,
0.1684350222349167,... |
def _ encode _ iq _ item ( self, interest, address ) : return json. dumps ( [ int ( interest ), str ( address ) ] ). encode ( self. encoding ) | [
-0.9259251952171326,
-0.8948375582695007,
0.34538424015045166,
-0.9989737868309021,
-0.0558406338095665,
-0.08126872777938843,
-1.2272181510925293,
-0.9313735365867615,
0.6788344979286194,
0.6240805983543396,
-0.6701228618621826,
1.2542108297348022,
-0.7218372225761414,
-1.2226148843765259... |
def coef _ tval ( clf, x, y ) : a = np. array ( clf. intercept _ / coef _ se ( clf, x, y ) [ 0 ] ) b = np. array ( clf. coef _ / coef _ se ( clf, x, y ) [ 1 : ] ) return np. append ( a, b ) | [
-0.1510552167892456,
-0.7014476656913757,
0.5054247975349426,
-1.0157963037490845,
0.2199036180973053,
-0.32303375005722046,
-0.532616376876831,
-0.3974996507167816,
-0.1257365196943283,
1.8944694995880127,
-0.2302291840314865,
0.9323812127113342,
1.1172364950180054,
-0.7206524014472961,
... |
def write _ grid ( self ) : self. fout = self. create _ savename ( ) ncout = dataset ( self. fout,'w') print'writing : % s'% self. fout # create dimensions xdim = ncout. createdimension ( self. xvar, self. nx ) ydim = ncout. createdimension ( self. yvar, self. ny ) zdim = ncout. createdimension ( self. zvar, self. nz )... | [
0.7616445422172546,
0.17424613237380981,
0.7746663689613342,
-0.2696773111820221,
0.3401866555213928,
-0.1883915364742279,
0.640605092048645,
-0.4020368456840515,
-0.5343199372291565,
0.1528853476047516,
-0.36638668179512024,
0.009218727238476276,
-0.25756651163101196,
1.0092246532440186,
... |
def fuels _ from _ ores ( formulae : sequence [ equation ], ore _ amount : int ) - > int : def enough _ ores ( fuel _ amount : int ) - > bool : required _ amounts = required _ amounts _ per _ target ( formulae, target = chemical ('fuel ', fuel _ amount ) ) return required _ amounts ['ore'] < = ore _ amount index = bina... | [
-0.8763846158981323,
-0.22314955294132233,
0.4511176347732544,
0.06525150686502457,
0.052020762115716934,
-1.1142253875732422,
0.10672538727521896,
0.2662303149700165,
-0.6424300074577332,
-0.2168063521385193,
1.0978947877883911,
0.13565362989902496,
0.5445317625999451,
-0.1868574917316436... |
def test _ add _ comment ( self ) : # login to prevent captcha self. login ( ) add _ url = self. text _ entry. get _ absolute _ url ( ) +'# comments'comment _ data = {'author':'mr test 2 ','body':'another - test - comment ','rendered _ content':'< p > another - test - comment < / p > ','csrfmiddlewaretoken': self. get ... | [
-0.10524150729179382,
-0.12887582182884216,
0.767848551273346,
0.015355811454355717,
1.2549493312835693,
0.8305249214172363,
-0.1628079116344452,
0.12230896204710007,
0.3953091502189636,
-1.1240822076797485,
-0.2607303261756897,
-0.4390788972377777,
-0.4347766041755676,
0.34703290462493896... |
async def addchar ( self, chartoadd : str ) : curstory = " " chartoadd = chartoadd [ 0 : 1 ] storyfile = open ( " data / story / story. txt ", " r + " ) # covers max discord message length case # if len ( curstory ) > 1990 : # storyfile. close ( ) # storyfile = open ( " cogs / story. txt ", " w " ) # await self. bot. s... | [
0.294474720954895,
-0.6025615930557251,
0.7133296132087708,
-0.22380799055099487,
0.17919392883777618,
0.7315673232078552,
0.3723933696746826,
-0.31892824172973633,
-0.09845060855150223,
-0.3963189721107483,
-0.11566442996263504,
0.9784628748893738,
-0.012493797577917576,
-0.11205556988716... |
def getschema ( self, name ) : response = self. session. get ( self. url + " / " + name + " / schema " ) raise _ for _ status ( response ) return response. json ( ) | [
-1.4643441438674927,
-0.029798440635204315,
0.6079457998275757,
0.5670072436332703,
-0.32284167408943176,
-1.1819145679473877,
-1.5969033241271973,
-0.771888017654419,
0.3529878854751587,
0.33228805661201477,
-0.8414372801780701,
0.5968343615531921,
-0.22485697269439697,
-0.494391560554504... |
def test _ get _ first _ blast _ hit _ per _ seq ( self ) : p = blasttaxonassigner ( { } ) blast _ hits = {'s1': [ ('blah ', 0. 0 ) ], \'s3': [ ('dsasd ', 1e - 42 ), ('rrr ', 1e - 12 ), ('qqq ', 0. 001 ) ], \'s2': [ ] } expected = {'s1': ('blah ', 0. 0 ), \'s3': ('dsasd ', 1e - 42 ), \'s2': none } actual = p. _ get _ f... | [
-0.08060932159423828,
-0.16438837349414825,
0.5077449083328247,
-0.17536433041095734,
0.2769638001918793,
-0.049648724496364594,
0.19609245657920837,
-0.05445343628525734,
-0.4135647714138031,
-0.35475945472717285,
-0.2862602770328522,
-0.8177165985107422,
-0.21658886969089508,
-0.28082165... |
def do ( self, event ) : cmd = " / system / library / privateframeworks / apple80211. framework / versions / current / resources / airport - i | grep ctl " rslt = list ( ( str ( runcommand ( cmd ),'utf - 8'). lstrip ( ) ). split ('\ n') ) sig _ value = int ( rslt [ 0 ]. split ( " : " ) [ 1 ] ) noise _ value = int ( rsl... | [
-0.05540775507688522,
-0.32916468381881714,
0.5870521068572998,
-0.076734259724617,
0.09176887571811676,
0.010571641847491264,
0.04828488081693649,
0.017357004806399345,
-0.3889528512954712,
0.4345288574695587,
-0.8277131915092468,
-0.14321966469287872,
-0.6824416518211365,
0.2457781136035... |
def fixpbc ( self, cid, cutoff, writegsd = none, bt = none ) : inds = np. where ( self. clusterids = = cid ) [ 0 ] positions = self. pos [ inds, : ] sz = np. shape ( positions ) box = self. box [ 0 : 3 ] fixedxyz = positions. copy ( ) potinds = range ( 1, int ( sz [ 0 ] ) ) # if bt is none : bt = balltree ( positions. ... | [
0.14737719297409058,
-0.5033368468284607,
0.9359233379364014,
0.32690009474754333,
-0.34964168071746826,
0.45814597606658936,
0.5287774205207825,
0.1379002332687378,
0.3858990967273712,
0.07799991965293884,
0.19630755484104156,
-0.24280571937561035,
-1.3128892183303833,
-0.0296969544142484... |
def configure _ file ( ) : return kvasirapi. api ( " test / test. yaml " ) | [
0.47872188687324524,
-0.3294820487499237,
0.21630240976810455,
0.09221746027469635,
0.21665813028812408,
-0.8248996138572693,
-0.4503211975097656,
0.709208607673645,
-1.1265374422073364,
-0.11294228583574295,
0.3342761993408203,
-0.7067539095878601,
0.8796306252479553,
0.2412482053041458,
... |
def uploads ( path ) : # first remove old files cmdline ( f " find { dir _ path } / uploads / - mmin + { app _ rm _ file _ time } " r " - type f \ ( - iname \ " * \ "! - iname \ ". gitkeep \ " \ ) " r " - exec rm - fv { } \ ; " ) return send _ from _ directory ('uploads ', path ) | [
0.42376989126205444,
0.5951493978500366,
0.8227601647377014,
-0.33503642678260803,
-0.2998957633972168,
-0.582907497882843,
0.23923079669475555,
-1.15606689453125,
-0.432135671377182,
1.04940927028656,
-0.16811124980449677,
-0.13718241453170776,
-0.3404456675052643,
0.32647210359573364,
... |
def test _ list _ rest _ objects ( self ) : self. _ test _ list ( rest _ objects = true ) | [
0.18244178593158722,
-0.6387205719947815,
0.35124483704566956,
0.9801588654518127,
0.9305816888809204,
0.6159642934799194,
0.29012882709503174,
-0.22459937632083893,
0.5163106322288513,
-0.46780914068222046,
-1.5301177501678467,
0.1964932680130005,
-0.37005311250686646,
-0.2840825021266937... |
def rta _ tdf _ mobility ( datadir, el _ df ) : enk = el _ df ['energy [ ev ]'] vels = el _ df ['vx [ m / s ]'] os. chdir ( datadir ) rates = np. load ('scattering _ rates. npy') * 36. 5 # arbitrary factor to test if i can get the mobility taus = 1 / rates * 1e - 12 # in seconds npts = 4000 # number of points in the kd... | [
0.2689143717288971,
-0.3282886743545532,
0.7905401587486267,
-0.5139976739883423,
0.03370269015431404,
0.05617057904601097,
-0.052642010152339935,
0.5191751718521118,
-0.14399562776088715,
0.397087037563324,
0.4385530352592468,
-0.1636098176240921,
0.17943218350410461,
0.3181397020816803,
... |
def main ( ) : parser = argparse. argumentparser ( formatter _ class = argparse. argumentdefaultshelpformatter ) parser. add _ argument ( " path ", type = path, help = " location of a recording " ) args = parser. parse _ args ( ) for topic in derp. util. topics : path = args. path / ( topic + '. bin') tmp _ path = args... | [
0.6183531880378723,
-0.07958023250102997,
0.6526702046394348,
0.008798486553132534,
0.6036533117294312,
0.3962137997150421,
0.39524173736572266,
0.2424367070198059,
-0.9183013439178467,
0.32514628767967224,
-0.06591130048036575,
0.45516473054885864,
-0.20634272694587708,
0.0389676019549369... |
def getsingleathleteactivities ( self, athlete = none ) : if athlete! = none : dirpath = self. path +'/'+ athlete else : dirpath = self. path gpxfiles = os. listdir ( dirpath ) try : gpxfiles. remove ( ". ds _ store " ) except : pass parsed _ gpx = self. parsegpx ( dirpath, gpxfiles ) dataframes = self. writedataframes... | [
-0.5373995900154114,
0.652529776096344,
0.5495160818099976,
0.624970555305481,
0.26414161920547485,
-0.2111913114786148,
0.6612197756767273,
0.2680497467517853,
0.91114741563797,
-0.6421084403991699,
0.6197527050971985,
0.4376700818538666,
-0.5200003385543823,
-0.8167240023612976,
-0.159... |
def winner ( board ) : return false | [
-0.3180405795574188,
0.7049542665481567,
0.24290193617343903,
2.2289953231811523,
-0.5395073294639587,
0.5479202270507812,
0.45497745275497437,
0.7618176341056824,
0.31565552949905396,
-0.2553895115852356,
-0.32957723736763,
-0.917553186416626,
-0.6294596195220947,
-0.49410486221313477,
... |
def generate _ frame _ filename ( frame _ idx : int, ext = config. frames _ output _ format ) - > str : # todo : low : move this func. writing to file likely won't happen much in future, but do not deprecate this. total _ num _ length = 6 leading _ zeroes = max ( total _ num _ length - len ( str ( frame _ idx ) ), 0 ) ... | [
-0.2746696472167969,
-0.37403780221939087,
0.6262869834899902,
-0.1477092206478119,
-0.23665891587734222,
-0.4927081763744354,
0.07730577886104584,
-0.2234617918729782,
0.4871547520160675,
0.21580015122890472,
-0.19604262709617615,
-0.4448324739933014,
0.334735244512558,
0.0519510582089424... |
def get _ direction _ turns _ and _ motion _ angles ( min _ distance, max _ distance, distances, position, direction, positions, directions ) : # order positions within interval according to shortest distance position _ indices = np. where ( ( min _ distance < distances ) & ( distances < max _ distance ) ) [ 0 ] ordere... | [
-0.43594980239868164,
-0.16615425050258636,
0.5532907247543335,
-0.22179272770881653,
-0.02698199823498726,
-0.07685071974992752,
-0.42088472843170166,
-0.3539813756942749,
-0.032151076942682266,
0.31685012578964233,
-0.41679632663726807,
0.6922733187675476,
0.5716543793678284,
-1.27776122... |
def md _ download ( self, download = true ) : if download : self. download _ data ('md') | [
0.21524876356124878,
-0.23639926314353943,
0.39770954847335815,
1.0279978513717651,
-0.6719972491264343,
0.698428213596344,
-0.6969588994979858,
0.33405211567878723,
0.24024909734725952,
-0.44879645109176636,
1.2716540098190308,
0.035786986351013184,
-0.05044475197792053,
1.037529110908508... |
def removevec ( self, vector ) : setprime = [ ] for i in range ( len ( self. set ) ) : if ( not equalvectors ( self. set [ i ], vector ) ) : setprime. append ( self. set [ i ] ) vvs = valuevectorset ( ) vvs. addall ( setprime ) return vvs | [
-1.1802185773849487,
0.06980091333389282,
0.47220495343208313,
0.033884063363075256,
-0.6416351199150085,
-0.234920471906662,
-0.4491260051727295,
-0.6698212623596191,
0.9285947680473328,
0.6694567799568176,
-0.6549798250198364,
0.3992030620574951,
-1.4345906972885132,
0.005922349635511637... |
def object ( self, name ) : for en in self. entities : if en. name = = name : return en for re in self. relationships : if re. name = = name : return re raise keyerror,'no such object : % s'% name | [
0.24848398566246033,
-1.2242029905319214,
0.5581804513931274,
-0.8646799325942993,
-0.633998453617096,
0.36964958906173706,
0.3166547417640686,
-1.1193017959594727,
-0.1753564178943634,
-0.4993026554584503,
0.7227712869644165,
0.11732953786849976,
0.15248370170593262,
-0.6352657675743103,
... |
def constant _ term _ check ( test _ coeff ) : test _ sum = np. sum ( np. abs ( test _ coeff ) ) if np. abs ( test _ coeff. flatten ( ) [ 0 ] ) * 2 > test _ sum : return false else : return true | [
0.35569390654563904,
-0.7268255352973938,
0.6701735258102417,
0.42420312762260437,
0.09915951639413834,
0.6993774771690369,
0.29962489008903503,
0.15530623495578766,
-0.15286827087402344,
-0.01547400001436472,
-0.33406487107276917,
-0.0019512234721332788,
-0.4048193097114563,
-0.4730991721... |
def network _ formatter ( from _ author : author, to _ authors : mapping [ author, int ] ) - > list [ dict ] : result = [ ] for k, v in to _ authors. items ( ) : result. append ( {'from': {'first': from _ author. first _ pref or from _ author. first,'last': from _ author. last _ pref or from _ author. last,'idfrontend'... | [
-0.7475889325141907,
-0.5597755312919617,
0.5645560026168823,
-0.506538987159729,
0.16661155223846436,
-0.6627321839332581,
-0.851317286491394,
0.36159777641296387,
-0.44603481888771057,
-0.14723744988441467,
0.11049845814704895,
0.18702368438243866,
0.5432929396629333,
0.2560303211212158,... |
def get _ flag _ tbl ( self, spark _ sql, flag ='[ truncate ]') : tbl _ sql = [ ] # flag ='[ truncate ]'replace _ sql ='' tmp _ flag = flag if'[ dropindex ]'= = tmp _ flag : flag ='[ dropindex -'if - 1! = spark _ sql. find ( flag ) : if'[ dropindex ]'= = tmp _ flag : begin _ idx = spark _ sql. find ( flag ) end _ idx =... | [
-0.2519131004810333,
0.05331118777394295,
0.9041025042533875,
0.5107394456863403,
-0.4301687180995941,
0.20434905588626862,
0.2443017065525055,
0.3218322694301605,
-0.8372454047203064,
0.5971369743347168,
-0.20106813311576843,
0.8913400769233704,
-0.3142063021659851,
-0.11054211854934692,
... |
def get _ y ( self ) : return _ y = none with self. lock : return _ y = self. _ _ get _ y _ _ ( ) return return _ y | [
-0.7504928112030029,
-0.4882065951824188,
0.82032310962677,
0.5564225912094116,
0.17816691100597382,
-1.079792857170105,
0.6217586398124695,
-1.3971374034881592,
-0.43083247542381287,
-1.6747537851333618,
-0.33764204382896423,
0.8495912551879883,
-0.5485060811042786,
-0.8205526471138,
0.... |
def _ _ init _ _ ( self, duration ) : self. _ duration = duration self. _ cache = dict ( ) self. _ cache _ lock = rlock ( ) | [
-0.44591253995895386,
0.24691063165664673,
0.40511879324913025,
0.9404800534248352,
-1.2369781732559204,
0.045172080397605896,
0.07292988896369934,
0.14694775640964508,
0.06597861647605896,
0.20784588158130646,
-1.320229411125183,
-0.08681779354810715,
0.15686430037021637,
0.45438241958618... |
def search ( query ) : query _ string ='% s [ au ] and vanderbilt university [ ad ]'% query handle = entrez. esearch ( db ='pubmed ', sort ='relevance ', retmax ='20 ', retmode ='xml ', term = query _ string ) try : results = entrez. read ( handle, validate = true ) except attributeerror : print ( " did not find any fo... | [
-0.6249912977218628,
-0.8203030824661255,
0.4888388216495514,
-0.9767779111862183,
0.47213873267173767,
-0.25364717841148376,
-0.8422503471374512,
0.816167950630188,
0.6917921900749207,
0.6003211140632629,
0.7092716693878174,
-0.20241989195346832,
-0.7320320010185242,
0.18380460143089294,
... |
def generate _ config _ file ( ) : repository ='git @ bitbucket. org / magnet - cl / keygen. git'remote _ config _ file ='ssh _ config'print ( green ('getting remote configuration file') ) local ('git archive - - remote = ssh : / / { } master { } | tar - x '. format ( repository, remote _ config _ file ) ) remote _ con... | [
0.3612074851989746,
0.02120445854961872,
0.7602736949920654,
-0.37174275517463684,
0.3761579096317291,
1.189753770828247,
-0.4544743299484253,
1.6813404560089111,
-1.548482894897461,
0.6185089945793152,
-1.1660404205322266,
-0.36362582445144653,
0.6835857033729553,
0.6940402388572693,
0.... |
def binned _ mean ( xvar, yvar, xbins ) : # the weighted average in each bin is sum [ w ( bin ) * x ( bin ) ] / sum [ w ( bin ) ] # this part only needs doing once : binnumber = np. digitize ( xvar, xbins ) # # says which bin each ( time, lat, lon ) points belongs in # define area - weights # wgt = np. cos ( np. radian... | [
0.000014140558960207272,
-0.20422494411468506,
0.5700026750564575,
0.020034879446029663,
-0.2654069662094116,
0.3023918867111206,
0.5418717861175537,
0.03629087656736374,
-0.3923375606536865,
0.7886654138565063,
0.1874064803123474,
1.2269985675811768,
-0.18143318593502045,
1.11860632896423... |
def _ _ ne _ _ ( self, other ) : if not isinstance ( other, loyaltyledgerentry ) : return true return self. to _ dict ( )! = other. to _ dict ( ) | [
-0.28249290585517883,
-0.26601967215538025,
0.7432265281677246,
-0.8359072804450989,
-0.08615591377019882,
0.41692158579826355,
-1.835810661315918,
-0.5132355093955994,
0.31332215666770935,
0.2904457151889801,
-0.9420765042304993,
0.40499570965766907,
-0.29210343956947327,
0.79419612884521... |
def _ extract _ magic _ tags ( self, tags ) : hostname = none device _ name = none # this implementation avoid list operations for the common case if tags : tags _ to _ remove = [ ] for tag in tags : if tag. startswith ('host :') : hostname = tag [ 5 : ] tags _ to _ remove. append ( tag ) elif tag. startswith ('device ... | [
-0.3779180645942688,
0.2448073923587799,
0.6546310186386108,
0.39717528223991394,
-0.09953565150499344,
-0.9069137573242188,
-0.9908716678619385,
0.028444945812225342,
-0.8801822662353516,
0.6735702157020569,
-0.40946486592292786,
-0.7841602563858032,
0.10440320521593094,
0.133847624063491... |
def on _ pushbutton _ stopreply _ clicked ( self ) : self. stopreplay ( ) | [
0.3889642357826233,
-0.2513130307197571,
0.2622048258781433,
-0.9920268058776855,
0.1310540735721588,
0.7504719495773315,
0.7050520181655884,
0.3145894408226013,
0.4433256983757019,
0.576413094997406,
0.169708251953125,
0.6155881285667419,
-1.0755352973937988,
-0.8381505012512207,
-0.351... |
def read _ adj ( ) : adj = raw _ input ('enter the adjective type ( の, な or い ). can be entered in english ( no, na, i ). these will be converted. if this isn \'t an adjective, just press return. \ n') if adj = ='exit': xml _ hand. save _ file ( ) print'ok, exiting.'sys. exit ( 1 ) else : # check if the adjective type ... | [
-0.5312737226486206,
0.19042618572711945,
0.4242422580718994,
0.11782272905111313,
-1.069759726524353,
0.6639071702957153,
0.21598699688911438,
-0.47076910734176636,
-0.3643041253089905,
0.24794815480709076,
1.0848678350448608,
0.4400962293148041,
-0.6405749917030334,
-0.2894458472728729,
... |
def xrmerge ( das, accept _ new = true ) : da = das [ 0 ] for new _ da in das [ 1 : ] : # expand both to have same dimensions, padding with nan da, new _ da = xr. align ( da, new _ da, join ='outer') # fill nans one way or the other re. accept _ new da = new _ da. fillna ( da ) if accept _ new else da. fillna ( new _ d... | [
-0.5282676815986633,
1.4846031665802002,
0.7636224031448364,
-0.09279721975326538,
-0.8375135064125061,
-0.0605660155415535,
-0.44925549626350403,
-0.11779283732175827,
0.28157496452331543,
-0.317225843667984,
0.8215477466583252,
-0.4806511402130127,
0.08491258323192596,
0.7088938355445862... |
def business _ type _ id ( self, business _ type _ id ) : self. _ business _ type _ id = business _ type _ id | [
0.3674122393131256,
-0.7295206785202026,
-0.18599280714988708,
1.1502479314804077,
0.787400484085083,
0.732948899269104,
0.33378875255584717,
0.638929545879364,
-0.4803089201450348,
0.29199379682540894,
-1.4823592901229858,
1.0217634439468384,
-0.920013427734375,
1.098783254623413,
0.695... |
def sum13 ( nums ) : # after _ 13 = false # res = 0 # for i in nums : # if i = = 13 : # after _ 13 = true # elif not i = = 13 and after _ 13 is true : # after _ 13 = false # else : # res + = i # return res i = 0 total = 0 while i < len ( nums ) : if nums [ i ]! = 13 : total + = nums [ i ] i + = 1 else : i + = 2 return ... | [
-0.10737257450819016,
-0.5260142683982849,
0.3729298710823059,
0.15846151113510132,
0.10481146723031998,
-0.28204575181007385,
0.7274618148803711,
0.08715199679136276,
1.0042080879211426,
0.768451988697052,
-1.241528868675232,
-0.04150114953517914,
-1.3140897750854492,
-0.23480463027954102... |
def test _ raise ( self, name : str, exc _ type : type [ baseexception ], func : functype, ) - > none : with pytest. raises ( exc _ type ) : func ( ndarray ) if sys. version _ info > = ( 3, 9 ) : with pytest. raises ( exc _ type ) : func ( ndarray _ ref ) | [
0.8870458006858826,
0.7998059988021851,
0.5928440093994141,
0.6287379264831543,
1.1003440618515015,
0.20816853642463684,
0.3307730257511139,
-0.6813476085662842,
0.558929443359375,
0.4261226952075958,
0.16502615809440613,
0.17859415709972382,
0.013403382152318954,
0.9502909779548645,
1.0... |
def findturns ( self, points, threshold = 20, minlength = 1 ) : turnstart = 0 turnlength = 0 prevanglediff = 0 turns = [ ] preceding _ slope = [ ] i = 0 while i < len ( points ) - 1 : turns. append ( [ ] ) preceding _ slope. append ( 0 ) sumangle = 0 if i < 2 : pass startpoint = 0 else : startpoint = i - 2 newpointstar... | [
-0.3735671639442444,
-0.38069286942481995,
0.8629395961761475,
-0.06789007037878036,
0.07459673285484314,
-0.3159136474132538,
0.9112016558647156,
-0.38672539591789246,
0.5167570114135742,
0.622187614440918,
-0.3684581220149994,
0.15650829672813416,
-0.1422221064567566,
-0.2718281149864197... |
def gettrackstats ( trackdias, curs ) : | [
-0.4139169156551361,
0.07117312401533127,
0.2152019590139389,
0.14335575699806213,
0.19743725657463074,
-0.292108416557312,
0.4432156980037689,
-0.6970165371894836,
-0.00515060406178236,
-0.7942368388175964,
0.3753529191017151,
-0.01290971040725708,
0.1994878500699997,
-0.06817206740379333... |
def bib _ title ( string ) : caps = re. compile ( " [ a - z ] " ) special = [ r'" ', r'{ ', r'}'] split _ string = string. split ( ) split _ string = [ escape _ special _ chars ( w, special ) for w in split _ string ] split _ string = [ " { { { } } } ". format ( w ) if re. search ( caps, w ) else w for w in split _ str... | [
-0.11530033499002457,
-0.7667092084884644,
0.7933092713356018,
0.3042575716972351,
-0.38215166330337524,
-0.4574666917324066,
-0.4319404661655426,
0.46193447709083557,
-0.27173277735710144,
1.1655043363571167,
-0.053355734795331955,
0.6623013615608215,
-0.7034529447555542,
-0.7395610809326... |
def absmovewait ( self, position ) : return self. run ( " absmovewait ", position ) | [
-0.8147486448287964,
-0.6191184520721436,
0.7066043019294739,
0.3647273778915405,
-0.4763166010379791,
0.7809563875198364,
-0.655311107635498,
-0.6664165258407593,
-0.535306453704834,
0.6940755248069763,
-0.3820700943470001,
-0.10713830590248108,
0.38255575299263,
-0.058755043894052505,
... |
def wait ( self ) : _ block ( self. have _ all _ finished ) | [
0.05954883247613907,
-0.5599789023399353,
0.3420428931713104,
0.3930613100528717,
0.6932721138000488,
0.9772481322288513,
0.4112420976161957,
-0.23971310257911682,
-1.4763215780258179,
-0.7577400803565979,
-1.0982683897018433,
-0.1940000057220459,
0.3437924385070801,
1.3583282232284546,
... |
def override ( type _ ) : if isinstance ( type _, callableinfo ) : func = type _ namespace = func. _ _ module _ _. rsplit ( '. ', 1 ) [ - 1 ] module = sys. modules [ " gi. repository. " + namespace ] def wrapper ( func ) : setattr ( module, func. _ _ name _ _, func ) return func return wrapper elif isinstance ( type _,... | [
-0.7296180725097656,
0.3854300081729889,
0.7852345705032349,
-0.7567415237426758,
0.5934295058250427,
-0.2414570301771164,
0.4178612530231476,
-1.115168571472168,
0.08025826513767242,
0.08608147501945496,
0.28690630197525024,
0.35289034247398376,
-0.26003769040107727,
0.04557647556066513,
... |
def _ get _ private _ token ( self ) : return decrypt _ password ( self. account. data ['private _ token'] ) | [
-0.5983065962791443,
0.01604505069553852,
0.2602119445800781,
-0.4183150827884674,
0.16181886196136475,
-0.9116774797439575,
-0.4250437319278717,
-0.1859174370765686,
0.05424293875694275,
-0.1982526183128357,
-0.8401368856430054,
1.2020232677459717,
-0.0028166002593934536,
-1.1751054525375... |
def get _ task ( self, task _ id ) : if self. zknodes : data _ conn = sync. zookeeperdata ( self. zknodes,'/ distci / tasks') else : data _ conn = sync. fsdata ( self. _ data _ dir ( ) ) task _ data = data _ conn. get ('/ % s'% task _ id ) if task _ data is none : data _ conn. close ( ) return webob. response ( status ... | [
-0.23561091721057892,
-0.17841285467147827,
0.6396558880805969,
0.4513285756111145,
0.05115024372935295,
0.0065113031305372715,
-0.21870742738246918,
-0.031017478555440903,
-0.47633853554725647,
0.8834934234619141,
-0.3084786832332611,
0.6365070343017578,
0.11065617948770523,
0.73309230804... |
def load ( self, filename, * * kwargs ) : if not os. path. exists ( filename ) : raise valueerror ( " orm data % s does not exist " % filename ) fmt = kwargs. get ( " format ", none ) if fmt = ='hdf5'or filename. endswith ( ". hdf5 " ) : self. _ load _ hdf5 ( filename, * * kwargs ) else : raise valueerror ( " format % ... | [
-0.37756046652793884,
0.15305925905704498,
0.7051162123680115,
0.21198126673698425,
-0.13838452100753784,
-0.300164133310318,
-0.42605963349342346,
0.033462632447481155,
-0.22531937062740326,
-0.32726016640663147,
0.5437101721763611,
0.029218683019280434,
-0.5161551833152771,
0.30785542726... |
def gather _ steps ( machine : machine, jobs : list [ list [ step ] ] ) - > list [ step ] : return list ( filter ( lambda s : s. machine = = machine, [ step for steps in jobs for step in steps ] ) ) | [
0.6527667045593262,
0.22246511280536652,
0.19575811922550201,
0.879938542842865,
-0.48511803150177,
0.8985478281974792,
-1.4129389524459839,
-0.19182388484477997,
-1.660251498222351,
0.046737175434827805,
-0.31920817494392395,
0.29950395226478577,
0.5636675953865051,
1.8569228649139404,
... |
def test _ query _ serialize _ multiple _ skip ( self ) : vg1, vol1 = self. create _ volume _ objects ( index = 1 ) vg2, vol2 = self. create _ volume _ objects ( index = 2 ) vgs = self. ep. search ( " volume _ groups ", name _ _ m _ eq = ", ". join ( [ vg1. name, vg2. name ] ) ) | [
-1.1813476085662842,
0.12147176265716553,
0.4380090534687042,
0.14993946254253387,
0.46420925855636597,
0.09446598589420319,
0.01045245211571455,
-1.4651108980178833,
-0.5030350685119629,
0.8168619871139526,
-0.15705817937850952,
-0.18902838230133057,
-0.761000394821167,
-0.696688652038574... |
def load _ dense _ embeddings ( path : str, words _ to _ keep = none, max _ words = - 1 ) : if path. endswith ( '. gz') : lines = gzip. open ( path,'rt') elif path. endswith ( '. zip') : myzip = zipfile ( path ) # we assume only one embedding file to be included in a zip file lines = myzip. open ( myzip. namelist ( ) [... | [
-0.2971029579639435,
-0.27382177114486694,
0.8530049920082092,
-0.15224474668502808,
-0.708101212978363,
-0.18295466899871826,
0.7399266362190247,
0.4554879367351532,
0.0021160917822271585,
0.1991553008556366,
-0.19098056852817535,
-0.07939312607049942,
-0.3406343460083008,
0.2724314630031... |
def _ createiksolvers ( self ) : ik _ grp = mc. group ( n = " { } _ { } _ ikhandles _ { } _ { } ". format ( self. side, self. name, self. suffix, self. instance _ num ), p = self. mod _ dict [ " notransform " ], em = 1 ) ikspring = mc. ikhandle ( sj = self. joint _ dict [ " hip " + " spring " ], ee = self. joint _ dict... | [
-0.4653981626033783,
0.030405716970562935,
0.7415965795516968,
-0.2478213906288147,
-0.0718054324388504,
0.19373202323913574,
1.1012285947799683,
-0.5401454567909241,
-1.0292012691497803,
-0.5686262249946594,
-0.3767249286174774,
-0.5177006721496582,
-0.3997405767440796,
0.3109174370765686... |
async def modcheck ( self, ctx, target ) : if target. tag = = 347513030516539393 : if target. level < 300 and not target. hasreborn ( ) : await ctx. send ( " hello trxsh. reach level 300 to achieve your true power " ) else : if not target. armour = = 4603 and not target. armour2 = = 4603 : target. weapon2 = 3603 target... | [
-0.3233838379383087,
-0.5741525888442993,
0.8168110847473145,
-0.05262196436524391,
0.21040670573711395,
-0.34758731722831726,
0.060267895460128784,
-0.5563935041427612,
-0.47269999980926514,
0.4930804669857025,
-0.4982713460922241,
0.9992930889129639,
-0.5978862643241882,
0.00430447561666... |
def update _ ssl _ listener ( self, blb _ id, listener _ port, backend _ port = none, scheduler = none, health _ check _ timeout _ in _ second = none, health _ check _ interval = none, unhealth _ threshold = none, health _ threshold = none, cert _ ids = none, ie6 _ compatible = none, encryption _ type = none, encryptio... | [
-0.21100065112113953,
-1.0723775625228882,
0.8963772654533386,
-0.024623870849609375,
-0.31615883111953735,
0.41322728991508484,
0.05149202421307564,
-0.515010416507721,
-0.13179931044578552,
0.7730417847633362,
-1.0461554527282715,
0.7914301156997681,
-0.9611126780509949,
-0.0980620309710... |
def available ( self ) - > bool : return self. _ available | [
-0.9034191370010376,
-0.1449088603258133,
0.128966823220253,
0.1406077891588211,
-0.3014943301677704,
1.4761357307434082,
0.20288223028182983,
0.755693256855011,
-0.12036559730768204,
0.4919120669364929,
0.05243845656514168,
0.22813934087753296,
-0.31187376379966736,
-0.034970153123140335,... |
def synthesize ( self, h, x, n ) : k, _ = x. shape m, _ = h. shape text ='' for n in range ( n ) : if n = = 0 : char = np. argmax ( x, axis = 0 ) [ 0 ] else : _, h _ new, _, prob = self. forward ( x, h, self. v, self. u, self. w, self. b, self. c ) char = np. random. choice ( k, 1, p = prob [ :, 0 ] ) [ 0 ] x = np. zer... | [
-0.40808841586112976,
0.6814103722572327,
0.4042668640613556,
-0.1172698363661766,
-0.6708132028579712,
-0.4918590486049652,
-0.23630300164222717,
-0.47343751788139343,
-0.45787039399147034,
0.23668992519378662,
-0.8983569741249084,
0.26523828506469727,
0.2982949912548065,
-0.5607411265373... |
def extract _ bias _ data ( today _ data, comp _ test ='' ) : stime _ list = [ ] for dfile in today _ data : # # - - - check whether file exists # chk = mcf. chkfile ( dfile ) if chk = = 0 : continue # # - - - extract time stamp # stime = bcf. extracttimepart ( dfile ) if stime < 0 : continue # # - - - extract ccd info... | [
0.029823675751686096,
-0.6145266890525818,
0.8570368885993958,
0.6409110426902771,
0.604966938495636,
0.14932222664356232,
0.33043238520622253,
0.39612630009651184,
-0.2707338035106659,
0.6674187779426575,
-0.5357890725135803,
0.1404419243335724,
-0.2998986840248108,
0.6558433175086975,
... |
def create _ project ( project _ name : str ) : # create folder os. makedirs ( os. path. join ( project _ dir, project _ name ), exist _ ok = true ) # add project info to _ append = {'project': [ project _ name ],'createdate': [ str ( datetime. now ( ) ). split ( '.') [ 0 ] [ : - 3 ] ],'description': ['add description ... | [
-0.7120042443275452,
0.46482864022254944,
0.6534895896911621,
0.28938359022140503,
0.692897379398346,
0.5364443063735962,
-0.10244178026914597,
-0.3113086521625519,
-0.49174290895462036,
0.28877177834510803,
0.4704332649707794,
-0.26810353994369507,
-0.07928895950317383,
0.4529849290847778... |
def error _ handler ( flask _ error ) : if " cannot identify " in str ( flask _ error ) : # unknow image format # cannot identify image file'uploads / xxx. jpg'_, * filename, _ _ = str ( flask _ error ). split ( "'" ) # recover filename filename =''. join ( filename ) os. remove ( filename ) # remove invalid file retur... | [
-0.04126293584704399,
-1.137993335723877,
0.6257086396217346,
0.6663190126419067,
-0.3637421131134033,
-0.3248341977596283,
0.24162551760673523,
0.5380741953849792,
-0.029490793123841286,
0.2889670729637146,
0.1640380322933197,
-0.5547958612442017,
0.8910598754882812,
-0.0874146819114685,
... |
def startns ( host = none, port = none, enablebroadcast = true, bchost = none, bcport = none, unixsocket = none, nathost = none, natport = none, storage = none, hmac = none ) : daemon = nameserverdaemon ( host, port, unixsocket, nathost = nathost, natport = natport, storage = storage ) daemon. _ pyrohmackey = hmac bcse... | [
-0.12379080057144165,
0.3892657160758972,
0.6616383194923401,
0.2043273150920868,
0.16648435592651367,
-0.6403250694274902,
-0.5552765130996704,
-0.19491936266422272,
0.9049004316329956,
-0.7869760990142822,
-0.7433685064315796,
1.1477837562561035,
-0.42635929584503174,
0.6229439973831177,... |
def transform ( self, corpus : corpus ) : assert'stem _ tokens'in next ( corpus. iter _ utterances ( ) ). meta for utt in corpus. iter _ utterances ( ) : if utt. meta ['valid'] : utt. meta ['num _ pol _ words'] = len ( self. key _ words. intersection ( utt. meta ['stem _ tokens'] ) ) utt. meta ['political'] = int ( utt... | [
0.0581226646900177,
-0.048675499856472015,
0.6997290849685669,
-0.7943771481513977,
0.5451886057853699,
0.32535457611083984,
-0.2852899432182312,
0.789883553981781,
0.2341979593038559,
0.2810211479663849,
0.2111109346151352,
0.10484148561954498,
-0.19027040898799896,
0.4797636568546295,
... |
def getversion ( self ) : self. send _ getversion ( ) return self. recv _ getversion ( ) | [
-0.29659774899482727,
-0.4738028049468994,
0.46644774079322815,
1.0683374404907227,
0.11193201690912247,
-0.016780104488134384,
0.27188965678215027,
-0.7669829726219177,
0.0863722637295723,
0.47014445066452026,
-1.3162678480148315,
0.7313255071640015,
-1.2268673181533813,
0.068823091685771... |
def _ _ init _ _ ( self, cursor, dx = 0. 01, xmin = 1, xmax = 50, two _ phase = false, * * kwargs ) : self. args = kwargs self. nprocesses = self. args. get ( " num _ processes " ) if self. nprocesses is none : self. nprocesses = 2 self. input _ file = self. args. get ( " file " ) self. cursor = list ( cursor ) self. d... | [
-0.3255499601364136,
-0.896124541759491,
0.7767375707626343,
0.10982276499271393,
-0.2174643576145172,
0.20901019871234894,
0.3264974057674408,
-0.06401064246892929,
-0.47050321102142334,
-0.4143836200237274,
0.21494518220424652,
-0.43042972683906555,
-0.058976296335458755,
0.7509679794311... |
def parse _ serial _ output ( ) : # define global varaibles to store the readings # call them in here because i don't want these # variables declared without using this function. global temp _ reading1 global temp _ reading2 global humd _ reading1 global humd _ reading2 global airp _ reading1 global rain _ reading1 glo... | [
-0.11877378076314926,
-0.693121075630188,
0.6195977926254272,
-0.08869141340255737,
-0.8434910178184509,
-0.22588104009628296,
0.44710326194763184,
-0.2545890212059021,
-0.3965051472187042,
-0.7352938055992126,
0.7860884070396423,
-0.08531633019447327,
-0.5703845024108887,
0.21735343337059... |
def get _ authorized _ keys ( remote _ keys _ path = none ) : if not remote _ keys _ path : remote _ keys _ path ='~ /. ssh / authorized _ keys'print ( green ('getting the remote list.') ) return get ( remote _ keys _ path ) [ 0 ] | [
-0.15007375180721283,
0.20950625836849213,
0.3283087909221649,
0.7013405561447144,
-0.24300245940685272,
0.07489224523305893,
-0.9375749230384827,
0.8734312057495117,
-0.4350212514400482,
0.5917215347290039,
-0.4769200086593628,
1.600746989250183,
-0.647555410861969,
-0.004155029077082872,... |
def getactiveviewport ( ) : panel = cmds. getpanel ( withfocus = true ) if cmds. getpanel ( typeof = panel ) = ='modelpanel': return panel return'' | [
1.0752995014190674,
-0.7538008689880371,
0.7074988484382629,
0.38181760907173157,
-0.22614705562591553,
-0.40845465660095215,
0.5128685832023621,
-1.1710890531539917,
0.4254347085952759,
-0.46119216084480286,
0.41903454065322876,
0.9183334112167358,
-0.8029343485832214,
-0.3843858540058136... |
def test _ get _ candidate _ drives ( self ) : with patch ( self. netapp _ request _ func ) as netapp _ request : netapp _ request. return _ value = ( 200, self. raid6 _ candidate _ drives ) with patch ( self. drives _ property, new _ callable = propertymock ) as drives : drives. return _ value = self. drives _ data st... | [
0.6345099806785583,
-0.9117284417152405,
0.7470345497131348,
-0.0728297233581543,
0.8190575242042542,
-0.28538280725479126,
0.22932292520999908,
0.22412976622581482,
-0.34332969784736633,
0.15211118757724762,
-0.30710524320602417,
0.32491543889045715,
-0.47352707386016846,
-0.0083680804818... |
def get _ guide _ object _ or _ none ( self ) - > optional [ guide ] : try : guide _ id = int ( self. _ guide _ id ) except ( valueerror, typeerror ) : return try : guide = guide. objects. get ( pk = guide _ id ) except guide. doesnotexist : return return guide | [
0.2318876087665558,
-0.03834935650229454,
0.39422836899757385,
0.4034731686115265,
0.5669928193092346,
-0.15575577318668365,
-0.03920530155301094,
-0.8584702610969543,
0.19545917212963104,
1.114446759223938,
0.5655931830406189,
0.6288321018218994,
-0.4814258813858032,
0.4217909872531891,
... |
def update _ archives ( self ) : # step 1 - update tabu tenure of points in tabu list and remove from list if tenure goes to zero for rec in self. tabu _ list : rec. ntabu - = 1 if rec. ntabu = = 0 : self. tabu _ list. remove ( rec ) # step 2 - add center to tabu list if failure count exceeds threshold for center in se... | [
0.12176312506198883,
-0.466065376996994,
0.4054730534553528,
-0.02262185327708721,
0.016502898186445236,
0.48553943634033203,
-0.03221215680241585,
0.46935445070266724,
-0.256753534078598,
0.19094052910804749,
-0.03826504200696945,
0.8178398609161377,
-0.2795826196670532,
0.579018294811248... |
def begin _ negotiation ( self ) : if self. _ closing : self. _ telopt _ negotiation. cancel ( ) return from telnetlib3. telopt import do, ttype self. stream. iac ( do, ttype ) self. _ loop. call _ soon ( self. check _ telopt _ negotiation ) self. display _ banner ( ) | [
0.19477319717407227,
0.3924276530742645,
0.6722109317779541,
0.34870073199272156,
-0.16619494557380676,
0.05891953781247139,
0.4688163995742798,
-0.13259677588939667,
0.27404332160949707,
0.19829784333705902,
0.8027006983757019,
0.12301585078239441,
-0.14048312604427338,
0.4164037108421325... |
def art _ last _ successful _ test ( request ) : valid, response = initrequest ( request ) if not valid : return response data = {'errors': [ ] } query = { } expected _ params = ['package ','branch ','testname'] for p in expected _ params : if p in request. session ['requestparams'] : if p = ='branch': query. update ( ... | [
-0.9760507345199585,
-0.09745800495147705,
0.7208678126335144,
-0.13892732560634613,
0.45453524589538574,
-0.005558963865041733,
0.27818068861961365,
-0.7982893586158752,
-0.044556502252817154,
0.5361603498458862,
-0.19538643956184387,
-0.303707480430603,
-0.001608634484000504,
0.468733638... |
def getbox ( self, lon, lat ) : return ( ( lon - self. minlon ) / self. steplon, ( lat - self. minlat ) / self. steplat ) | [
-0.41634008288383484,
-0.13429751992225647,
0.31351691484451294,
-0.695098340511322,
-0.3150648772716522,
-0.12769055366516113,
-1.23722243309021,
-0.8084077835083008,
-0.5543590784072876,
-0.8387033939361572,
-1.0896896123886108,
-0.13833583891391754,
-0.17760975658893585,
0.5219225287437... |
def not _ found ( error ) : return " 404 " | [
-0.9082353115081787,
-0.7035582661628723,
0.26351404190063477,
0.2419721633195877,
-0.19634909927845,
0.4908376932144165,
0.10905337333679199,
-0.02892645262181759,
0.5010294318199158,
0.01950652338564396,
0.13319559395313263,
-0.0835736021399498,
0.547619104385376,
-0.023389950394630432,
... |
def update _ url _ db ( self, url, classification ) : if not self. conn : raise valueerror ( " database not connected " ) url = url [ : 1024 ] if not classification : return if len ( classification ) > 32 : raise valueerror ('invalid classification') curtime = datetime. datetime. now ( ) cur = self. conn. cursor ( ) cu... | [
-1.353102445602417,
0.3495420813560486,
0.7321950793266296,
-0.33515167236328125,
-0.01063313614577055,
1.3461610078811646,
-0.1729079633951187,
1.0840646028518677,
-1.1307439804077148,
0.7964939475059509,
-0.6418695449829102,
0.1938382089138031,
-0.5547813773155212,
0.7170931696891785,
... |
def is _ older _ than ( self, bucket _ name : str, object _ name : str, seconds : int ) - > bool : blob _ update _ time = self. get _ blob _ update _ time ( bucket _ name, object _ name ) if blob _ update _ time is not none : from datetime import timedelta current _ time = timezone. utcnow ( ) given _ time = current _ ... | [
0.12050143629312515,
-0.8606764078140259,
1.0980045795440674,
0.6400038599967957,
-0.4661228358745575,
0.5780640840530396,
-0.9867795705795288,
-0.9911698698997498,
-0.5247741937637329,
0.0768464058637619,
-1.4289660453796387,
0.6942046880722046,
0.22292347252368927,
0.0011343740625306964,... |
def update _ cluster ( cluster _ dict, datacenter = none, cluster = none, service _ instance = none ) : # validate cluster dictionary schema = esxclusterconfigschema. serialize ( ) try : jsonschema. validate ( cluster _ dict, schema ) except jsonschema. exceptions. validationerror as exc : raise invalidconfigerror ( ex... | [
-0.6418320536613464,
0.27383601665496826,
0.7003132104873657,
-0.5258582830429077,
-0.8930367231369019,
0.2301962524652481,
-0.5764402151107788,
1.0176831483840942,
0.6229069828987122,
0.43144577741622925,
0.6216691136360168,
0.814734697341919,
0.10504382103681564,
-0.06423331052064896,
... |
def get _ base _ url ( scheme = " http " ) : if hasattr ( connection, " tenant " ) : hostname = connection. tenant. domain _ url # we have our own pattern of using the ` prepend _ www ` attribute so lets # check for it and stick it on the front. if getattr ( connection. tenant, " prepend _ www ", false ) : hostname = "... | [
0.13658343255519867,
0.00839284248650074,
0.641287624835968,
0.18288372457027435,
0.45559683442115784,
0.09007202833890915,
0.0749848261475563,
-0.000486797682242468,
-0.03181685879826546,
0.2343187779188156,
0.8233488202095032,
0.5997039079666138,
0.16384488344192505,
0.2410406470298767,
... |
def get _ matrices ( self ) : res = none if self. _ _ npmatrices is not none : res = self. _ _ npmatrices else : self. _ _ npmatrices = [ self. _ _ tmfunction ( lines, self. _ _ ignorespecialnoun ) \ for lines in self. list _ of _ works _ content ( ) ] res = self. _ _ npmatrices return res | [
-0.4470175802707672,
-0.31198975443840027,
0.2978720963001251,
-0.6898856163024902,
0.6680250763893127,
-0.7753845453262329,
0.7211006283760071,
-0.632898211479187,
0.16014191508293152,
-0.3176700472831726,
-0.08208411186933517,
-0.13593894243240356,
-0.5210124254226685,
0.0938374549150466... |
def layer _ norm ( input _ tensor, name = none ) : if input _ tensor. dtype = = tf. float16 : try : from modeling. fused _ layer _ norm import fused _ layer _ norm return fused _ layer _ norm ( inputs = input _ tensor, begin _ norm _ axis = - 1, begin _ params _ axis = - 1, scope = name, use _ fused _ batch _ norm = tr... | [
0.3544696271419525,
-0.4779036045074463,
0.5726824402809143,
1.1072553396224976,
-0.6692019701004028,
0.24293264746665955,
0.8290131688117981,
0.34721434116363525,
0.3144746422767639,
-0.10255254060029984,
0.05518205091357231,
0.3370358347892761,
-0.4187774658203125,
0.22488398849964142,
... |
def start _ running ( self ) : self. comp. warm _ up ( ) self. check _ runner ( ) self. running = true | [
0.13169512152671814,
-0.7188930511474609,
0.3117780089378357,
0.8308565616607666,
0.6659570932388306,
0.6181313991546631,
0.8853299617767334,
1.381958246231079,
0.01895618811249733,
-0.6913530826568604,
-0.8772286176681519,
0.48578548431396484,
-0.17560504376888275,
0.5641680359840393,
1... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.