text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def test _ undirected _ edge _ vertices ( self ) : v0 = undirectedvertex ( val ='v0') v1 = undirectedvertex ( val ='v1') e01 = undirectededge ( ( v0, v1 ) ) self. assertequal ( e01. vertices, frozenset ( [ v0, v1 ] ) ) with self. assertraises ( attributeerror ) : e01. vertices = frozenset ( ) | [
-0.03874662518501282,
0.5243431925773621,
0.30336976051330566,
-0.1954825222492218,
-0.17535191774368286,
1.00141441822052,
0.7074950337409973,
0.10296155512332916,
0.17360346019268036,
-0.27735477685928345,
0.0875059962272644,
-0.07770838588476181,
0.3591402471065521,
0.682269275188446,
... |
def test _ atomic _ hex _ binary _ pattern _ 1 _ nistxml _ sv _ iv _ atomic _ hex _ binary _ pattern _ 2 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / hexbinary / schema + instance / nistschema - sv - iv - atomic - hexbinary - pattern - 2. xsd ", instance = " nistdata... | [
-0.3527853786945343,
-0.16706955432891846,
0.6053722500801086,
0.9677374362945557,
-0.0026098729576915503,
0.6032596230506897,
-0.4718042314052582,
0.26820090413093567,
-0.22470638155937195,
0.18250150978565216,
-0.63734370470047,
-0.2850916087627411,
0.09534753859043121,
0.361454129219055... |
def join ( tablea : arrable, a _ name : str, tableb : arrable, b _ name : str, where : str ) : renamed _ cols _ tablea, renamed _ cols _ tableb = _ get _ converted _ col _ tables _ for _ join ( tablea, a _ name, tableb, b _ name ) joined _ cols = renamed _ cols _ tablea. get _ col _ names ( ) + renamed _ cols _ tableb.... | [
0.03766956925392151,
-0.5634533762931824,
0.9726889133453369,
0.8757906556129456,
-1.1982214450836182,
-0.6955025792121887,
-0.5983062386512756,
-0.41300639510154724,
-0.7608349919319153,
0.5716866850852966,
0.04584452882409096,
0.2626751661300659,
0.2683109939098358,
0.4255721867084503,
... |
def load _ stimuli ( stimulidates, foldernames, rewardtraj, foldername ) : stimuli = [ ] stimuliinfile = [ ] foldernames _ dummy = numpy. round ( foldernames / 100 ) - 20000000 # change foldernames array to cope with stimuli date style for i, d in enumerate ( stimulidates ) : stimulifile = [ f for f in os. listdir ( fo... | [
-0.020459914579987526,
0.40646374225616455,
0.9720867276191711,
-0.4907604157924652,
0.1629984825849533,
0.16125832498073578,
0.7093079686164856,
0.0589045025408268,
-0.027675185352563858,
0.31545907258987427,
0.2883533835411072,
0.3222782015800476,
0.35295984148979187,
0.2634693384170532,... |
def main _ part _ 2 ( ) : graph = graph _ from _ tsv ('data / pkmn _ graph _ data. tsv') output _ path ='data / output. tsv'# list of alpha values we will investigate damping _ factors = [ 0. 95, 0. 9, 0. 85, 0. 8, 0. 75, 0. 7, 0. 65, 0. 6, 0. 55, 0. 5, 0. 45, 0. 4, 0. 35, 0. 3, 0. 25, 0. 2, 0. 15, 0. 1, 0. 05 ] # set ... | [
1.050769329071045,
0.23641617596149445,
0.7165319323539734,
0.23224911093711853,
0.5155187249183655,
-0.6438950300216675,
0.36850616335868835,
0.5797939300537109,
-1.0799320936203003,
-0.17916828393936157,
0.10269735753536224,
0.5470937490463257,
0.4732169806957245,
0.26490169763565063,
... |
def predict ( self, x _ test ) : y _ predicted = [ ] # initialize empty list # for each instance in x _ test for instance in x _ test : # get the predicted target y valeus with helper function y _ prediction = myutils. y _ pred ( instance, self. tree ) y _ predicted. append ( y _ prediction ) # append to list return y ... | [
-0.7757482528686523,
-0.4707803726196289,
0.47480422258377075,
-0.05203918367624283,
0.5068023800849915,
-0.016335172578692436,
-0.7189751267433167,
0.7781172394752502,
-0.28400513529777527,
-0.11646939069032669,
-0.16312621533870697,
0.6839872598648071,
0.14229843020439148,
0.468563199043... |
def test _ atomic _ hex _ binary _ max _ length _ 1 _ nistxml _ sv _ iv _ atomic _ hex _ binary _ max _ length _ 2 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / hexbinary / schema + instance / nistschema - sv - iv - atomic - hexbinary - maxlength - 2. xsd ", instance ... | [
-0.06543589383363724,
0.053007498383522034,
0.4337180256843567,
1.097366452217102,
-0.13931885361671448,
0.5888224840164185,
-0.873274028301239,
0.3177220821380615,
0.01234600879251957,
0.13315215706825256,
-0.6582816243171692,
-0.43395471572875977,
0.11474413424730301,
0.4409407079219818,... |
def setup ( self ) : from ampscan. core import ampobject stl _ path = get _ path ( " stl _ file. stl " ) self. amp = ampobject ( stl _ path ) | [
0.845741868019104,
-1.1725783348083496,
0.3489112854003906,
-0.18539944291114807,
-0.9826388955116272,
0.6814781427383423,
1.326658010482788,
-0.09594712406396866,
0.0449700653553009,
0.5423072576522827,
-0.5271801352500916,
0.38625505566596985,
0.023266468197107315,
-0.36888739466667175,
... |
def testmerge ( self ) : conf = xml _ configuration. configuration. emptyconfiguration ( ) other _ conf = xml _ configuration. configuration. emptyconfiguration ( ) conf. setproperty ('key1 ','value1') conf. setproperty ('key2 ','value2') other _ conf. setproperty ('key2 ','foobar') other _ conf. setproperty ('key3 ','... | [
-0.32707932591438293,
0.375134140253067,
0.7413988709449768,
0.5623061060905457,
0.7718887329101562,
0.36547356843948364,
-0.7494468092918396,
-0.13897304236888885,
-0.4988822937011719,
-0.6859139204025269,
-0.8935682773590088,
-1.2068099975585938,
-0.8685353398323059,
-0.26344308257102966... |
def test _ atomic _ hex _ binary _ min _ length _ 1 _ nistxml _ sv _ iv _ atomic _ hex _ binary _ min _ length _ 2 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / hexbinary / schema + instance / nistschema - sv - iv - atomic - hexbinary - minlength - 2. xsd ", instance ... | [
0.20439453423023224,
-0.5909515619277954,
0.433614581823349,
0.724220871925354,
-0.11632797122001648,
0.08104243129491806,
-0.5830308198928833,
-0.35742345452308655,
-0.2026231586933136,
-0.23710252344608307,
-0.5164420008659363,
-0.28354740142822266,
-0.32625702023506165,
0.67810863256454... |
def _ step _ forward ( self, inputs, y, mode ='w') : self. cur _ batch _ target = y if self. decay _ temperature : tbs _ input = {'temperature': self. temperature } else : tbs _ input = none _ outputs = self. mod ( x = inputs, y = y, mode = mode, tbs _ input = tbs _ input ) if len ( self. gpus ) > 1 : _ outputs = map (... | [
-1.0259312391281128,
-0.09647725522518158,
0.48202431201934814,
-0.11918433755636215,
-0.21370096504688263,
-0.09906885772943497,
0.5908318758010864,
-0.2143397033214569,
-0.3569970428943634,
-0.6717289686203003,
0.7948817014694214,
0.09185630828142166,
-0.03047356568276882,
0.370291113853... |
def is _ group _ name _ exists ( self, group _ name ) : groups = self. m [ " groups " ] for g in groups : if ( g [ " group _ name " ] = = group _ name ) : return true return false | [
-0.9927577972412109,
0.3498128652572632,
0.15619564056396484,
-0.08854878693819046,
0.3680157959461212,
-0.3055691719055176,
-0.7759271264076233,
-0.07872374355792999,
-0.7331578135490417,
0.7139818668365479,
0.1275404840707779,
-0.24261492490768433,
-0.3474928140640259,
0.5314569473266602... |
def test _ atomic _ base64 _ binary _ pattern _ nistxml _ sv _ iv _ atomic _ base64 _ binary _ pattern _ 1 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / base64binary / schema + instance / nistschema - sv - iv - atomic - base64binary - pattern - 1. xsd ", instance = " ... | [
-0.16090184450149536,
-0.14069180190563202,
0.5286536812782288,
1.244461178779602,
0.20626291632652283,
0.3784194588661194,
0.28141310811042786,
0.02708546631038189,
0.43871524930000305,
0.6477128267288208,
-0.22764816880226135,
-0.03639891743659973,
-0.7007244229316711,
-0.098046705126762... |
def onlyfolders ( self ) : return path ( * ( folder for folder in self. parts [ : - 1 ] ) ) | [
-0.1284431368112564,
-0.3114413619041443,
0.5694147348403931,
0.9570825099945068,
-0.020004402846097946,
0.662738025188446,
0.2971498668193817,
-0.26850369572639465,
0.13537383079528809,
-0.39095306396484375,
1.1702486276626587,
-0.49915191531181335,
-1.3095649480819702,
-0.657226204872131... |
def _ is _ team _ member ( self, team _ id, username ) : url = " % s / teams / % s / memberships / % s " % ( self. _ api _ url, team _ id, username ) response = self. get ( url, log = false ) if not self. _ bad _ response and response : data = response. json ( ) if data ['state'] = ='active': return true return false | [
-0.4242468476295471,
-0.26463404297828674,
0.30725187063217163,
0.01455663237720728,
0.42615798115730286,
-0.4033358693122864,
-1.441180944442749,
-0.5664221048355103,
-0.4689669907093048,
0.18665355443954468,
-0.18561558425426483,
0.33783209323883057,
-0.6207690238952637,
-0.9782858490943... |
def from _ checkpoint ( checkpoint _ file : optional [ str ], obj : types. moduleoroptimizer, map _ location : optional [ types. device ] = " cpu ", dataparallel : bool = false, ) - > types. moduleoroptimizer : if checkpoint _ file is none : return obj if not system. is _ file ( checkpoint _ file ) : logger. warning ( ... | [
0.6705002784729004,
-0.1433260291814804,
0.5542727112770081,
0.5948718786239624,
-0.17601287364959717,
-0.024482207372784615,
0.16666078567504883,
0.5179768800735474,
0.29430344700813293,
0.2087188959121704,
0.06730080395936966,
-0.3775251507759094,
0.47266310453414917,
-0.6958261132240295... |
def sample ( self, batch _ size ) : if len ( self. buffer ) < = batch _ size : return self. buffer # warning : replace = false makes random. choice o ( n ) keys = np. random. choice ( len ( self. buffer ), batch _ size, replace = true ) return [ self. buffer [ key ] for key in keys ] | [
-0.14654132723808289,
-0.42717990279197693,
0.787655234336853,
-0.3473162055015564,
-0.7498877644538879,
0.2108285129070282,
-0.44454097747802734,
-0.08237046003341675,
1.037559986114502,
0.2600693702697754,
-0.7247297763824463,
0.2345142364501953,
-0.668687105178833,
0.15499484539031982,
... |
def concordance _ correlation _ coefficient ( y _ true, y _ pred, sample _ weight = none, multioutput ='uniform _ average') : cor = np. corrcoef ( y _ true, y _ pred ) [ 0 ] [ 1 ] mean _ true = np. mean ( y _ true ) mean _ pred = np. mean ( y _ pred ) var _ true = np. var ( y _ true ) var _ pred = np. var ( y _ pred ) ... | [
1.0132107734680176,
-0.7346813678741455,
0.7191399931907654,
0.43171530961990356,
-1.0326288938522339,
-0.6843791604042053,
1.1209917068481445,
0.9683699011802673,
-0.3260839283466339,
0.37979406118392944,
0.5177851915359497,
0.633207380771637,
0.7371105551719666,
0.8274775743484497,
0.0... |
def get _ indexes ( self ) : return self. indexes | [
-0.524583637714386,
-0.5275828838348389,
0.2638549506664276,
0.8841976523399353,
0.42755672335624695,
0.42833131551742554,
0.4702451527118683,
0.4655815660953522,
0.33351999521255493,
-0.910217821598053,
-0.56695955991745,
0.6633544564247131,
-0.41330644488334656,
-0.2053510844707489,
0.... |
def lucls ( self, factor = 3. 0 ) : fs, m = factor * self. std ( ), self. mean ( ) return m - fs, m + fs, factor | [
0.3623983561992645,
-0.8198947310447693,
0.28756192326545715,
-0.9613443613052368,
-0.901759684085846,
0.5787791609764099,
-0.19077672064304352,
-0.17507916688919067,
0.37429895997047424,
-0.1712680459022522,
0.02083219774067402,
0.5919444561004639,
0.3473529815673828,
0.44286468625068665,... |
def test _ engine ( ) : cks = pg. chunk _ library ( ) chunk _ map = pg. chunkmap ( 50, 50, 5, cks ) chunk _ map. generate ( 80, 80 ) chunk _ map. place _ tiles _ from _ chunk _ map ( ) dungeon = wm. worldmap ( 50, 50 ) dungeon. load _ transparent _ map ( chunk _ map. tile _ map _ transparency ) dungeon. load _ walk _ m... | [
-0.5673443675041199,
-0.38607707619667053,
0.6143643260002136,
-0.32578638195991516,
0.343060165643692,
0.6625109314918518,
1.3203169107437134,
-0.022404080256819725,
-0.502700686454773,
-0.14933659136295319,
0.045599471777677536,
0.5779700875282288,
-0.22528643906116486,
-0.12304174154996... |
def test _ call _ output _ to _ file ( self ) : result _ path = get _ tmp _ filename ( prefix ='rtaxtaxonassignertests _ ', suffix = '. fasta') self. _ paths _ to _ clean _ up. append ( result _ path ) p = rtaxtaxonassigner ( {'reference _ sequences _ fp': self. reference _ seqs _ fp,'id _ to _ taxonomy _ fp': self. id... | [
-0.024451063945889473,
-1.002770185470581,
0.591096818447113,
-0.007374548353254795,
0.23091068863868713,
0.18568384647369385,
0.8846933245658875,
-0.05088844895362854,
-0.38453859090805054,
-0.11765683442354202,
0.5423362255096436,
-0.5899450182914734,
-0.27486518025398254,
-0.16305777430... |
def call _ function ( self, function _ id, kwargs = none ) : return self. _ request ('post ','/ functions / { } '. format ( function _ id ), body = {'kwargs': kwargs } ) | [
-0.3887535035610199,
0.828215479850769,
0.37780407071113586,
-0.08982151746749878,
0.6920101642608643,
-0.5059125423431396,
-1.8667315244674683,
-0.8058388829231262,
0.008336372673511505,
-0.06760315597057343,
-0.42395755648612976,
0.9823957085609436,
-1.1124345064163208,
0.561741590499877... |
def _ read _ btsnoop _ packet _ records ( f, zero _ based _ index = false ) : seq _ nbr = 1 if zero _ based _ index : seq _ nbr = 0 while true : pkt _ hdr = f. read ( 4 + 4 + 4 + 4 + 8 ) if not pkt _ hdr or len ( pkt _ hdr )! = 24 : # eof break orig _ len, inc _ len, flags, drops, time64 = struct. unpack ( " > iiiiq ",... | [
-0.4465593993663788,
0.18007995188236237,
0.7543962597846985,
-0.6134483814239502,
-0.07413095980882645,
0.2794642746448517,
-0.10002294182777405,
-0.4535754919052124,
-0.4558650851249695,
-0.3950914442539215,
-0.017595618963241577,
-0.46367329359054565,
0.01640855334699154,
-0.69436198472... |
def drawcheckers ( self, surface ) : for checker in self. checkers : checker. draw ( surface ) | [
-0.6199870705604553,
-0.6127902269363403,
0.20252090692520142,
0.6629081964492798,
0.8780905604362488,
1.2617133855819702,
0.48479118943214417,
0.1521322876214981,
-0.2757315933704376,
-0.8589309453964233,
0.3754112124443054,
0.630327582359314,
-0.7783631086349487,
1.8907785415649414,
-1... |
def serialize _ numpy ( self, buff, numpy ) : try : _ x = self buff. write ( _ struct _ 2d3f4h7bif. pack ( _ x. latitude, _ x. longitude, _ x. mapxy. x, _ x. mapxy. y, _ x. mapxy. z, _ x. id. seg, _ x. id. lane, _ x. id. pt, _ x. index, _ x. is _ entry, _ x. is _ exit, _ x. is _ goal, _ x. is _ lane _ change, _ x. is _... | [
-0.46551015973091125,
-0.5616066455841064,
0.7334434390068054,
-0.7632527351379395,
0.750315248966217,
0.3669041097164154,
0.04084917530417442,
-1.0329910516738892,
0.7284334301948547,
-0.16277693212032318,
-0.9857807159423828,
0.5854280591011047,
-0.5278573036193848,
-0.27440065145492554,... |
def transform _ gpsloc ( self, value ) : if value is not none : gps _ data = value. split ('' ) geolocation = self. get _ geolocation ( gps _ data [ 0 ], gps _ data [ 1 ] ) altitude = self. get _ altitude ( gps _ data [ 2 ] ) hdop = self. get _ hdop ( gps _ data [ 3 ] ) pnt = [ float ( gps _ data [ 1 ] ), float ( gps _... | [
-0.6226984858512878,
-0.6404975652694702,
0.793217658996582,
0.21637777984142303,
0.30330681800842285,
-0.10891267657279968,
-0.05683334544301033,
0.1513359248638153,
0.3828907012939453,
0.5714338421821594,
-0.15159957110881805,
-0.6476261019706726,
0.07412901520729065,
-0.3279353678226471... |
def test _ get _ spiders ( self ) : def is _ spider ( spider _ class ) : " " " handles basic checks if a class is a valid spider class. " " " assert inspect. isclass ( spider _ class ) assert issubclass ( spider _ class, torvend. spiders. _ common. basespider ) # test will all available spiders with client _ manager ( ... | [
0.15978288650512695,
0.08453266322612762,
0.3932070732116699,
0.11363809555768967,
1.0324618816375732,
0.8034701943397522,
0.44085702300071716,
0.26181966066360474,
0.41052281856536865,
-0.7751027941703796,
-0.2549363672733307,
1.281793236732483,
-0.4466710686683655,
0.6521481275558472,
... |
def test _ computermove ( ) : gc = gamecontroller ( width, height ) board = board ( grid _ col _ row _ count, cell _ w _ h, width, height, gc ) pm = playermanager ( board, gc, more _ difficult ) assert gc. computer _ score = = 0 pm. humanmove ( 200, 300 ) assert gc. computer _ score = = 1 assert gc. human _ score = = 4... | [
-0.002031968906521797,
0.42345136404037476,
0.6100205183029175,
0.36389753222465515,
0.5932407379150391,
0.5093162059783936,
0.6792174577713013,
-0.05828896537423134,
-0.7524339556694031,
-0.5246939659118652,
-0.5121585726737976,
-0.49942630529403687,
-0.4061325788497925,
0.538131475448608... |
def calculate _ polygon _ radius _ km ( polygon ) : if not isinstance ( polygon, polygon ) : # pragma : no cover raise typeerror ('object is not a polygon') target = polygon. centroid points = polygon. exterior _ ring return calculate _ farthest _ dist _ km ( points, target ) | [
0.29939624667167664,
-0.6437676548957825,
0.2988554537296295,
0.1651388257741928,
-0.210976704955101,
-0.05643492937088013,
0.08375352621078491,
0.41928747296333313,
0.6822523474693298,
0.9186439514160156,
-0.49440744519233704,
0.178715318441391,
-0.4619831144809723,
-0.403068482875824,
... |
def get _ character _ len ( self, file _ path ) : chars = words = lines = 0 with open ( file _ path,'r') as in _ file : for line in in _ file : if line [ 0 ] = ='>': pass else : lines + = 1 words + = len ( line. split ( ) ) chars + = len ( line ) # logger. info ( " chars count : { } ". format ( chars ) ) return chars | [
0.38019299507141113,
-0.5562112331390381,
0.6700329184532166,
-0.9969934225082397,
0.23532935976982117,
-0.029594039544463158,
0.5540356636047363,
1.2916516065597534,
-0.39770954847335815,
0.2063317745923996,
-0.7840127944946289,
0.06765245646238327,
0.6869253516197205,
0.175279900431633,
... |
def sample _ powerlaw ( x _ min, x _ max, gamma, size = none, random _ state = " random - seed " ) : random _ state = get _ random _ state ( random _ state ) size = int ( size ) exp = - gamma base = random _ state. uniform ( x _ min * * exp, x _ max * * exp, size ) x = base * * ( 1 / exp ) return x | [
0.6302265524864197,
-0.536359429359436,
0.3257702589035034,
-0.7167408466339111,
-0.27237945795059204,
-0.27049288153648376,
-1.0864086151123047,
0.696345865726471,
0.4262286424636841,
0.7701544761657715,
-0.5308748483657837,
0.3137364089488983,
0.12304355949163437,
-0.8046211004257202,
... |
def get ( self, key ) : try : if key : return self. cache _ data [ key ] except keyerror : return none | [
-0.4316929876804352,
0.3753865361213684,
0.423201322555542,
0.7389720678329468,
-0.37096893787384033,
-0.3358798623085022,
-1.3943026065826416,
-0.66689133644104,
-0.16653262078762054,
0.3056331276893616,
0.4282386004924774,
0.4079264998435974,
-0.28812554478645325,
-0.2742937207221985,
... |
def pbm _ plot _ pie ( data, title ='', divid ='plot ', startdate ='', enddate ='', \ colors = [ ], plotid ='', \ template ='pbm / templatetags / pbm _ plot _ pie. html ', * args, * * kwargs ) : returndata = { \'data': data, \'title': title, \'divid': divid, \'startdate': startdate, \'enddate': enddate, \'colors': colo... | [
-0.4003032147884369,
0.3713783323764801,
0.5048111081123352,
-0.1927296370267868,
-1.1223266124725342,
0.5788410305976868,
-0.5466636419296265,
0.2825872600078583,
-0.43841639161109924,
-0.024705838412046432,
-0.08613811433315277,
-0.19426771998405457,
-0.8396742939949036,
0.01501843519508... |
def preprocessing ( sample ) : result = [ ] rule = re. compile ( " [ ^ a - za - z \ s \ d ] " ) for i in sample : i = rule. sub ('', i ) if ( len ( i ) > 1 ) : result. append ( i ) return result | [
-0.5695749521255493,
0.4128298759460449,
0.4750320315361023,
-0.1435888260602951,
-0.6878951191902161,
-0.13479399681091309,
0.6260594129562378,
1.293245792388916,
0.8321492671966553,
0.6070942282676697,
-1.0191258192062378,
0.29251620173454285,
-0.5140957832336426,
0.44969481229782104,
... |
def test _ atomic _ qname _ length _ nistxml _ sv _ iv _ atomic _ qname _ length _ 1 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / qname / schema + instance / nistschema - sv - iv - atomic - qname - length - 1. xsd ", instance = " nistdata / atomic / qname / schema + ... | [
0.1421019583940506,
-0.5439054369926453,
0.35311225056648254,
0.03446384146809578,
-0.4811990559101105,
0.13418395817279816,
-0.2855623960494995,
-0.3525646924972534,
0.05259912833571434,
0.5703147053718567,
-0.7229198813438416,
-0.1131696105003357,
0.3038349151611328,
0.20965127646923065,... |
def _ gaussians _ fit ( self, idx _ exclude = - 1, save = false ) : # logger. debug ('excluded : % d'% idx _ exclude ) for k in range ( self. _ k ) : gmm = gaussianmixture ( n _ components = self. _ q, covariance _ type ='full ', max _ iter = 150, random _ state = opt. seed, reg _ covar = opt. reg _ cov ) total _ index... | [
-0.6824929118156433,
-0.2706941068172455,
0.8260620832443237,
0.23375046253204346,
0.5291584134101868,
0.04636622592806816,
0.19487792253494263,
0.27342164516448975,
0.564472496509552,
0.10238374024629593,
-0.5150293111801147,
1.0729384422302246,
-1.2736378908157349,
0.6033068895339966,
... |
def get _ ttree _ branch _ sets ( ttree1, ttree2 ) : t1 _ branches = set ( [ k. getname ( ) for k in ttree1. getlistofbranches ( ) ] ) t2 _ branches = set ( [ k. getname ( ) for k in ttree2. getlistofbranches ( ) ] ) shared _ branches = t1 _ branches & t2 _ branches unique1 _ branches = t1 _ branches - t2 _ branches un... | [
0.03150501102209091,
0.11945052444934845,
0.8224668502807617,
-0.4960630536079407,
-0.3224499523639679,
0.5375276207923889,
0.27090510725975037,
-0.4804348647594452,
-1.1958204507827759,
1.015356421470642,
-0.4660335183143616,
-0.28535640239715576,
-0.18208086490631104,
0.3078939914703369,... |
def formatted _ seo _ data ( self, title ='', description ='', keywords ='' ) : from django. utils. safestring import mark _ safe from django. utils. html import escape escaped _ data = tuple ( map ( escape, ( getattr ( self, self. seo. seo _ title, title ), getattr ( self, self. seo. seo _ description, description ), ... | [
-0.027045495808124542,
0.41539791226387024,
0.5746440887451172,
-0.3175719380378723,
-0.41249969601631165,
0.34849536418914795,
-1.5087308883666992,
-0.4243617057800293,
-0.3974003493785858,
0.4416521489620209,
0.31348851323127747,
0.4237641394138336,
0.7701369524002075,
0.2183557450771331... |
def update _ translation _ status ( self ) : self. translation _ status = self. determine _ translation _ status ( ) | [
-0.13058024644851685,
-1.046412706375122,
0.04280022159218788,
0.18929050862789154,
-0.21347278356552124,
-0.026524104177951813,
-1.104917287826538,
0.7515488266944885,
-0.5812057256698608,
0.4861559569835663,
-1.3891226053237915,
0.16577953100204468,
0.5606104135513306,
0.1523334532976150... |
def stop ( nova _ client, * * kwargs ) : if is _ external _ resource ( ctx ) : ctx. logger. info ('not stopping server since an external server is'' being used') return server = get _ server _ by _ context ( nova _ client ) if server. status! = server _ status _ shutoff : nova _ client. servers. stop ( server ) else : ... | [
-1.3865965604782104,
-0.24184982478618622,
0.23960576951503754,
0.012343850918114185,
-0.09103335440158844,
0.6946185827255249,
-0.6996549367904663,
0.10771147906780243,
0.12434040755033493,
0.6711582541465759,
-0.12986651062965393,
0.8534945249557495,
-0.5369812250137329,
0.34802198410034... |
def test _ 02 _ volume _ max _ snapshot ( self ) : if self. hypervisor. lower ( ) not in [ " kvm ", " vmware " ] : self. skiptest ( " skip test for hypervisor other than kvm and vmware " ) # step 1 self. testdata [ " recurring _ snapshot " ] [ " intervaltype " ] ='hourly'self. testdata [ " recurring _ snapshot " ] [ " ... | [
-0.13329756259918213,
0.01032157801091671,
0.8195626139640808,
0.5003443956375122,
0.2906685173511505,
0.49164751172065735,
-0.9492397308349609,
0.5399487018585205,
0.7255348563194275,
0.09881937503814697,
-0.4889174997806549,
-0.10046996176242828,
-0.15738137066364288,
0.20811569690704346... |
def unlink ( self, cr, uid, ids, context = { } ) : for rec in self. browse ( cr, uid, ids, context ) : idss = self. pool. get ('fuel. distance. amount'). search ( cr, uid, [ ('fuel _ distance _ id ','= ', rec. id ) ] ) if idss : raise osv. except _ osv ( _ ('error'), _ ('you can not delete this record, there are distin... | [
-0.14814090728759766,
-0.4946648180484772,
0.6070412993431091,
-0.3427485227584839,
-0.07525251060724258,
-0.48305743932724,
0.43052664399147034,
0.9028611779212952,
-0.10508324950933456,
-0.25387299060821533,
0.8230627775192261,
-0.38843387365341187,
0.3174439072608948,
0.7477966547012329... |
def triangulatepolygon ( polygon ) : try : return triangulatepolygon _ mapbox ( polygon ) except importerror : pass raise runtimeerror ( " no triangulation libraries installed " " ( did you uninstall mapbox _ earcut? ) " ) | [
0.1790999472141266,
-0.2148657739162445,
0.28955507278442383,
-0.16830472648143768,
0.173225998878479,
0.08024577796459198,
0.2536134123802185,
-0.4803524315357208,
1.376391053199768,
-0.9321032166481018,
-0.09814158082008362,
-0.5710753202438354,
-0.5388739109039307,
-0.9066421389579773,
... |
def user ( self ) : return self. _ user | [
-0.34661605954170227,
-0.5505598187446594,
0.024556463584303856,
0.5249627232551575,
0.009391882456839085,
1.0212078094482422,
1.4897255897521973,
-0.5265188813209534,
0.44459864497184753,
-2.008004665374756,
-0.33950018882751465,
0.6549864411354065,
0.6727523803710938,
-1.0134230852127075... |
def table ( t, padding ='' ) : print ( render ( t, padding = padding ) ) | [
1.0458147525787354,
0.40519970655441284,
0.29926007986068726,
-0.6832051277160645,
-0.16266606748104095,
0.5200404524803162,
-0.6989114880561829,
-0.4123374819755554,
-1.1142325401306152,
-0.08304731547832489,
-0.22234958410263062,
0.15075021982192993,
-0.005346147809177637,
0.117092944681... |
def get _ migrated _ apps ( ) : for mapp in models. get _ apps ( ) : app = get _ app ( mapp ) if app : yield app | [
0.1418798565864563,
-0.44375669956207275,
0.662318229675293,
2.068587064743042,
-0.1469510793685913,
1.073538899421692,
-1.1692272424697876,
-0.8225343227386475,
-0.1106923297047615,
0.6705111861228943,
-0.3416074812412262,
-0.4402627646923065,
0.6727321147918701,
0.7373116612434387,
-0.... |
def is _ updated _ before ( self, bucket _ name : str, object _ name : str, ts : datetime ) - > bool : blob _ update _ time = self. get _ blob _ update _ time ( bucket _ name, object _ name ) if blob _ update _ time is not none : if not ts. tzinfo : ts = ts. replace ( tzinfo = timezone. utc ) self. log. info ( " verify... | [
0.12316274642944336,
-1.0571892261505127,
0.9372682571411133,
0.4594440758228302,
-0.15183037519454956,
0.5767812132835388,
-1.4056968688964844,
-0.7042838931083679,
0.13013549149036407,
0.5849452614784241,
-1.1753605604171753,
0.5575025081634521,
0.20639246702194214,
-0.5844258666038513,
... |
def lookupindb ( self ) : if not self. have _ firewall _ db : return # open the database fwdb = fwdb ( self. cf, createdb = false ) for rec in self. records : if not self. cf. skiprecord ( rec ) \ and rec ['is _ auto'] : rec ['in _ nftfwdb'] = fwdb. lookup _ by _ ip ( rec ['ip'] ) fwdb. close ( ) | [
-0.6150625944137573,
0.21167252957820892,
0.4082489013671875,
-0.09589283913373947,
0.25717437267303467,
-0.027593307197093964,
0.7188217639923096,
0.13955624401569366,
-0.8420910239219666,
-0.25021615624427795,
0.16104179620742798,
-1.204592227935791,
-1.3899286985397339,
0.81940066814422... |
def write _ one _ seq _ entry _ to _ disk _ immune ( self, data _ entry, fileout ) : other _ headers = [ ] for i in data _ entry ['other'] : if type ( data _ entry ['other'] [ i ] ) is list : value = ', '. join ( [ str ( j ) for j in data _ entry ['other'] [ i ] ] ) else : value = data _ entry ['other'] [ i ] other _ h... | [
0.143253356218338,
-0.9754445552825928,
0.982702910900116,
-0.685513973236084,
0.4202914237976074,
-0.09460664540529251,
-0.1980803906917572,
0.37770596146583557,
-0.05065884068608284,
0.45341452956199646,
-0.4283255934715271,
0.4103776514530182,
-0.006156458519399166,
0.2650068998336792,
... |
def test _ cartocontext _ map _ geom _ type ( self ) : from cartoframes import layer, querylayer cc = cartoframes. cartocontext ( base _ url = self. baseurl, api _ key = self. apikey ) # baseid1 = dark, labels1 = labels on top in named map name labels _ polygon = cc. map ( layers = layer ( self. test _ read _ table ) )... | [
-0.018022920936346054,
-0.7443765997886658,
0.7241690754890442,
0.4415741562843323,
0.10592259466648102,
0.4529579281806946,
-0.1997324675321579,
-1.1565324068069458,
0.3840619921684265,
-0.19144532084465027,
-0.568435788154602,
0.21149851381778717,
0.6452532410621643,
0.03258517384529114,... |
def make _ dataset _ iterator ( self, context _ file _ path, question _ file _ path, span _ file _ path, batch _ size = 10, epoch _ size = 2 ) : def build _ mask ( x ) : return tf. ones _ like ( x, dtype = tf. int32 ) def make _ dataset ( filenames, with _ mask = false ) : dataset = tf. contrib. data. textlinedataset (... | [
0.028290078043937683,
0.22506080567836761,
0.5543310046195984,
-0.6801907420158386,
-0.4035285413265228,
0.6418545246124268,
0.3909327983856201,
-0.2814004123210907,
-0.19630862772464752,
-0.37120169401168823,
0.21335606276988983,
0.1251366287469864,
0.4101475179195404,
-0.7496567368507385... |
def amount ( self, amount ) : if self. local _ vars _ configuration. client _ side _ validation and amount is none : # noqa : e501 raise valueerror ( " invalid value for ` amount `, must not be ` none ` " ) # noqa : e501 self. _ amount = amount | [
0.24962718784809113,
-0.22599174082279205,
0.05653424188494682,
0.12442483752965927,
0.23108352720737457,
0.5825259685516357,
0.6351303458213806,
0.25384533405303955,
0.29358574748039246,
0.3253987729549408,
-0.3723508417606354,
-0.050443217158317566,
-0.10328123718500137,
0.65242034196853... |
def _ load _ dependencies ( ) - > typing. dict [ str, ctypes. cdll ] : # load libraries error _ message = ( " resource { 0 } was not found. provide a list of paths in " " pynegf. settings ['dependencies'] ['negf'] ['paths'] " " and run > > > pynegf. load _ runtime _ environment ( ). " ) dependencies = { } for key, val ... | [
-0.5944686532020569,
-0.4769154191017151,
0.31392574310302734,
-0.3057023882865906,
-0.2812846601009369,
-0.12836553156375885,
0.1963742971420288,
-0.45709848403930664,
-0.5599943995475769,
1.056070327758789,
-0.629414439201355,
-1.335333228111267,
0.16740448772907257,
1.0857999324798584,
... |
def model _ 1 ( seq _ length, embedding _ layer, num _ categories ) : model _ input = input ( shape = ( seq _ length, ), dtype ='int32') embed = embedding _ layer ( model _ input ) fc = timedistributed ( dense ( 100, activation = " relu " ) ) ( embed ) rnn = bidirectional ( lstm ( units = 100, return _ sequences = fals... | [
0.6390144228935242,
0.04926331713795662,
0.5718746185302734,
0.7363404035568237,
-0.18434998393058777,
0.2828848361968994,
0.19088737666606903,
0.3096901774406433,
0.013759530149400234,
0.21460126340389252,
-0.8565417528152466,
-0.0762997642159462,
0.8401978015899658,
0.16908323764801025,
... |
def get _ module _ fqdn _ for _ path ( module _ path ) : # type : ( str ) - > str index = module _ path. find ( " scalyr _ agent " ) if index! = - 1 : module _ path = module _ path [ module _ path. find ( " scalyr _ agent " ) : ] index = module _ path. find ( " tests / unit " ) if index! = - 1 : module _ path = module ... | [
0.1289224475622177,
-1.2244888544082642,
0.5353337526321411,
-0.26705288887023926,
0.5175372362136841,
0.012879107147455215,
1.0839649438858032,
-0.31455668807029724,
0.5845628976821899,
-0.03015807271003723,
0.4245106279850006,
0.4235790967941284,
0.15129457414150238,
0.21575184166431427,... |
def print _ sequences ( sequences : np. ndarray, joint _ names, frame _ rate : int = 15, positions = true, frames = false, quaternions = false, prefix = " ", flush = true ) : for sequence in sequences : print _ sequence ( sequence, joint _ names, frame _ rate, positions, frames, quaternions, prefix, flush ) | [
0.20805972814559937,
-0.2515513300895691,
0.42156946659088135,
-0.21590563654899597,
-0.28813961148262024,
-0.645792543888092,
-0.28111764788627625,
-1.0955299139022827,
0.5093207955360413,
0.47433996200561523,
0.1368502974510193,
-0.0040464806370437145,
-0.09676200896501541,
0.38329902291... |
def plot _ coords ( ax, ob ) : x, y = ob. xy ax. plot ( x, y,'o ', color ='# 999999 ', zorder = 1 ) | [
0.29028502106666565,
0.6125972867012024,
0.5643234848976135,
-0.2544150650501251,
-0.27754533290863037,
0.5079569220542908,
0.44645246863365173,
-0.12611068785190582,
0.06911060214042664,
-0.26548680663108826,
0.5733048319816589,
1.4708967208862305,
1.1584328413009644,
-1.0732288360595703,... |
def _ _ init _ _ ( self, username, password ) : self. username = username self. password = password | [
-0.1131160631775856,
-1.1362806558609009,
0.5197939872741699,
0.18696093559265137,
-0.40555548667907715,
0.2260902374982834,
-0.3889450430870056,
1.0118781328201294,
-0.5246633887290955,
0.045821718871593475,
-0.2605496346950531,
0.58336341381073,
0.0898631140589714,
0.3805353343486786,
... |
def _ alientime ( self, dt ) : self. _ time = self. _ time + dt if self. _ time > self. _ speed : self. _ time = 0 if self. _ aliendirection = ='right': alien = self. _ bottomrightalien ( ) if alien. x + 1 / 2 * alien _ width > game _ width - alien _ h _ sep : self. _ aliendirection ='left'self. _ shiftaliendown ( ) el... | [
-0.7124586701393127,
0.12313932925462723,
0.882167637348175,
-0.18685193359851837,
-0.16066022217273712,
0.2726587653160095,
-0.3302704989910126,
-0.8849131464958191,
-0.11472795903682709,
0.666094958782196,
-0.018353667110204697,
-0.8581200242042542,
0.4960117042064667,
0.5348270535469055... |
def discount ( self ) : return self. _ discount | [
1.5025763511657715,
-0.5940355658531189,
0.23179322481155396,
0.9007074236869812,
0.22383131086826324,
1.5673397779464722,
0.9673948884010315,
-0.1751815676689148,
0.55008864402771,
-1.4084073305130005,
0.15467198193073273,
-0.037212979048490524,
0.09095951914787292,
0.11375699192285538,
... |
def loggedin ( ) : # fixme a better way would be to use api, but i don't know how to request status # alternatively, might as well just login anyway if you're going to touch the network. if not dict ['authentication'] : resetauthinfo ( ) try : req = http. request ( url = " https : / / www. crunchyroll. com / acct /? ac... | [
-0.4423287510871887,
-0.10823741555213928,
0.8291010856628418,
0.8104844689369202,
-0.5724486112594604,
-0.5206770896911621,
0.07037050276994705,
-0.45397570729255676,
0.27436694502830505,
-0.4920520484447479,
-0.7731507420539856,
0.7345964908599854,
-0.7253581881523132,
-0.127297312021255... |
def testloadfromfile ( self ) : with open ( self. _ test _ filename,'w') as f : f. write ( self. _ empty _ conf ) conf = xml _ configuration. configuration. fromfile ( self. _ test _ filename ) self. assertequal ( self. _ empty _ conf, conf. toxml ( ) ) os. remove ( self. _ test _ filename ) | [
0.5306025147438049,
-0.008406184613704681,
0.38076215982437134,
-0.519770622253418,
0.28916043043136597,
0.1382683962583542,
0.22527927160263062,
0.5383664965629578,
-0.7062933444976807,
-0.4286406636238098,
-1.1098662614822388,
-1.0039339065551758,
0.03133502975106239,
-0.4075021147727966... |
def _ _ str _ _ ( self ) : if self. schedules : representation _ string ='{ : ^ 5 } \ t { : ^ 20 } \ n \ n '. format ('s. no. ','schedule') for index, schedule in enumerate ( self. schedules ) : sub _ str ='{ : ^ 5 } \ t { : 20 } \ n '. format ( index + 1, schedule ) representation _ string + = sub _ str else : represe... | [
0.3716903328895569,
-0.364304780960083,
0.6091060638427734,
-1.1290053129196167,
-0.17739665508270264,
0.407470166683197,
-0.256796658039093,
-0.7566491365432739,
0.15296636521816254,
0.4100896120071411,
0.34538835287094116,
0.09083431959152222,
-0.21420739591121674,
-0.11723798513412476,
... |
def _ clean _ relative ( item ) : try : p = path ( item ) c = f ".. / { p. stem } " except : c = item return c | [
1.1053540706634521,
-0.6444414258003235,
0.62548828125,
0.5715052485466003,
-0.8018520474433899,
0.6519106030464172,
0.9997880458831787,
-1.0697091817855835,
-0.2918534576892853,
0.2633484899997711,
0.5890595316886902,
-0.2624669075012207,
-0.17164331674575806,
-1.734493374824524,
0.1941... |
def extract _ text _ from _ html ( input _, pre _ strip _ urls = false ) : if isinstance ( input _, bs4. beautifulsoup ) : bs = input _ elif isinstance ( input _, basestring ) : bs = parse _ html ( input _ ) else : raise valueerror ( " unknown input _ - expected str or " " bs4. beautifulsoup got'% s'" % ( type ( input ... | [
0.11137066781520844,
0.6470800638198853,
0.5137028694152832,
0.32111313939094543,
-0.996303379535675,
-0.25420454144477844,
0.15032842755317688,
0.2900692820549011,
0.7637969851493835,
-0.025765277445316315,
-0.1404232680797577,
0.19327668845653534,
-0.27251961827278137,
0.2838687002658844... |
def get _ details _ from _ php _ variable ( cls, php _ variable, doc = " " ) : php _ variable _ stripped = \ php _ variable [ 1 : ] if php _ variable [ 0 ] = = " $ " else php _ variable # see, if we have some $ irowcount or similar php variable name hungarian _ match = re. match ('( [ a - z ] ) ( [ a - z ]. + ) ', php ... | [
-0.6735106706619263,
-0.550477147102356,
0.6790481209754944,
-0.5855129957199097,
-0.25771409273147583,
-0.524416983127594,
0.008304624818265438,
-0.8601474761962891,
-0.15330886840820312,
0.25957053899765015,
-0.7495260238647461,
0.15619207918643951,
0.1542261391878128,
1.2601256370544434... |
def integrated _ grad ( x, model, baseline, num _ steps = 25, class _ index : int = none, func = tf. math. reduce _ mean, ) : def integral _ approximation ( gradients ) : # riemann _ trapezoidal grads = ( gradients [ : - 1 ] + gradients [ 1 : ] ) / tf. constant ( 2. 0 ) integrated _ gradients = tf. math. reduce _ mean ... | [
0.19130311906337738,
0.86085045337677,
0.7872883081436157,
-0.0811181515455246,
-0.5619966983795166,
0.6017734408378601,
0.1582460105419159,
0.2416670173406601,
-0.5001764893531799,
0.31986114382743835,
-0.8379639983177185,
0.23120515048503876,
0.07889790087938309,
-0.5073553323745728,
-... |
def test _ multiple _ versions ( self ) : feature = self. create ( feature, slug ='feature') browser = self. create ( browser, slug ='browser ', name = {'en':'browser'} ) version1 = self. create ( version, browser = browser, status ='current ', version ='1. 0') version2 = self. create ( version, browser = browser, stat... | [
-0.5725422501564026,
0.034185271710157394,
0.5874813795089722,
0.3320486545562744,
0.07553625106811523,
0.4421214759349823,
-0.06832702457904816,
0.8813474178314209,
-0.011095559224486351,
0.1504836082458496,
-1.0067726373672485,
-0.5897318720817566,
0.0001213932191603817,
0.21134588122367... |
def set _ salary ( self, value ) : self. salary = value logging. debug ( " user's salary received " ) | [
0.5432752966880798,
0.15734682977199554,
0.30200323462486267,
0.01041768305003643,
-0.5626607537269592,
0.370551198720932,
-0.01891917549073696,
-0.29409176111221313,
0.36045876145362854,
0.043526433408260345,
-1.3269171714782715,
0.3773832619190216,
0.4361061155796051,
0.6954795718193054,... |
def _ configure _ headers _ from _ metadata ( self ) : meta _ data = self. _ get _ meta _ data ( ) configuration _ token = meta _ data. get ('configuration _ token') if configuration _ token is none : return none header _ value = " bearer " + configuration _ token headers = {'authorization': header _ value } return hea... | [
-0.44837331771850586,
-0.0766322985291481,
0.3501741886138916,
0.25763440132141113,
0.07906004041433334,
-0.9288545250892639,
-0.9832602739334106,
-0.41910991072654724,
-0.6479897499084473,
0.9414752125740051,
0.348520427942276,
-0.24516835808753967,
0.5724072456359863,
-0.4464792907238006... |
def test _ nonce _ form _ on _ failure ( tforms ) - > none : tforms. emoji _ form. process ( formdata = multidict ( {'emoji':'not - emoji ','form _ nonce': tforms. emoji _ form. form _ nonce. data } ) ) assert tforms. emoji _ form. validate ( ) is false assert not tforms. emoji _ form. form _ nonce. errors formdata = m... | [
-0.21471160650253296,
0.27868974208831787,
0.5258628129959106,
-0.5451234579086304,
0.015501820482313633,
0.30719900131225586,
-0.24040651321411133,
-0.4415875971317291,
-0.41470253467559814,
-0.5162173509597778,
-1.3199694156646729,
-0.6661009788513184,
-0.41636258363723755,
0.57838112115... |
def test _ atomic _ any _ uri _ max _ length _ 1 _ nistxml _ sv _ iv _ atomic _ any _ uri _ max _ length _ 2 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / anyuri / schema + instance / nistschema - sv - iv - atomic - anyuri - maxlength - 2. xsd ", instance = " nistdata... | [
-0.08405036479234695,
-0.2755562663078308,
0.43629834055900574,
1.1552047729492188,
-0.33663225173950195,
0.14742478728294373,
-0.6035496592521667,
0.2083529233932495,
0.10018595308065414,
-0.22357477247714996,
0.06542561203241348,
-0.14200587570667267,
-0.06581004709005356,
0.227311432361... |
def com ( vol : ndarray, axes : optional [ arraylike ] = none ) - > ndarray : if axes is none : axes = np. arange ( len ( vol. shape ) ) else : axes = np. array ( axes, ndmin = 1 ) coords = [ np. linspace ( - ( s - 1 ) / 2, ( s - 1 ) / 2, s ) for s in np. array ( vol. shape ) [ list ( axes ) ] ] num _ dims = len ( vol.... | [
0.8481658101081848,
-0.9018665552139282,
1.0941976308822632,
-0.1912812441587448,
0.15684884786605835,
-0.14389920234680176,
0.4117322564125061,
0.1990441083908081,
0.6100224256515503,
0.8171126842498779,
1.0678024291992188,
-0.02682235650718212,
-0.06587469577789307,
-0.8352233171463013,
... |
def displaysensordata ( self, qidatasensorobject ) : if self. _ displayed _ object is not none : if qidatasensorobject is not none \ and isinstance ( self. _ displayed _ object, qidatasensorobject ) \ and self. _ displayed _ object. name = = qidatasensorobject. name : # if the displayed object is the same as the one we... | [
0.29782211780548096,
-0.22415336966514587,
0.623508870601654,
-0.676446259021759,
-0.5005929470062256,
-0.0795833021402359,
0.18575645983219147,
-1.0102183818817139,
1.8883624076843262,
-0.6790372729301453,
-0.40274667739868164,
0.5500659942626953,
0.045401036739349365,
0.157658189535141,
... |
def speedfrommovequc ( self, speed ) : return 0. 0254 * float ( speed ) | [
1.1004574298858643,
-0.6502160429954529,
0.2334011346101761,
0.6423165798187256,
0.06830102205276489,
-0.42561256885528564,
0.05316556617617607,
-0.6371732354164124,
-0.33378100395202637,
0.1475670486688614,
-0.07910319417715073,
-0.49203452467918396,
-0.24761979281902313,
-0.1391679644584... |
def temphum _ pointdata ( ) : arduino = serial. serial ('/ dev / serial / by - id / usb - gravitech _ arduino _ nano _ 13bp1066 - if00 - port0 ', 115200 ) humi = eval ( arduino. readline ( ). strip ( ) ) temp = eval ( arduino. readline ( ). strip ( ) ) st = time. strftime ( " % y - % m - % dt % h : % m : % s " ) data =... | [
-0.2946983277797699,
-0.18658898770809174,
0.7192748785018921,
-0.07659539580345154,
0.5199565887451172,
0.17604371905326843,
-0.8217644095420837,
0.3448928892612457,
-0.4956621825695038,
0.5030032396316528,
-1.0118999481201172,
-0.27974411845207214,
0.0804605558514595,
-0.3206299245357513... |
def set _ group _ multi _ salesteams ( self, cr, uid, ids, context = none ) : def ref ( xml _ id ) : mod, xml = xml _ id. split ( '. ', 1 ) return self. pool ['ir. model. data']. get _ object ( cr, uid, mod, xml, context ) for obj in self. browse ( cr, uid, ids, context = context ) : config _ group = ref ('base. group ... | [
-1.163545846939087,
0.27469998598098755,
0.5196228623390198,
0.2616848945617676,
0.005449764896184206,
0.45307937264442444,
0.3888687491416931,
-0.22496385872364044,
-0.48525363206863403,
-0.20959855616092682,
-0.04458809643983841,
-0.008008883334696293,
-0.2777928113937378,
0.324695318937... |
def init _ task ( result _ queue ) : global queue queue = result _ queue | [
-0.20814937353134155,
-0.6047685146331787,
0.2896592319011688,
0.3687833547592163,
0.3843526840209961,
-0.25489431619644165,
0.38867801427841187,
0.5371443033218384,
-0.4940827190876007,
0.22075213491916656,
-1.944343090057373,
0.3971654176712036,
0.1770852655172348,
1.2169870138168335,
... |
def travelall ( graph, edgelist, fillfunction = isfilledge ) : edgestodraw = list ( edgelist ) ; # a copy allpaths = [ ] nextfilledge = getnextedge ( graph, edgestodraw ) ; while nextfilledge! = none : path = findpath ( graph, [ nextfilledge [ 0 ], nextfilledge [ 1 ] ], fillfunction ) ; allpaths. append ( path ) ; next... | [
-0.3130001127719879,
0.48268944025039673,
0.6853510737419128,
0.9121861457824707,
0.2011147141456604,
0.0935840755701065,
0.1220938041806221,
0.6247361302375793,
0.5714112520217896,
0.4473648965358734,
-0.8140347599983215,
-0.22453758120536804,
-0.13197776675224304,
0.809963583946228,
-1... |
def num _ active _ cameras ( self ) : return len ( [ x for x in self. cameras if x. initialized ( ) ] ) | [
-0.42878618836402893,
-0.9864387512207031,
0.2819674015045166,
0.48242542147636414,
0.8767554759979248,
-0.36225152015686035,
0.045323070138692856,
-0.18289802968502045,
0.8116874694824219,
-0.13971218466758728,
-1.9300411939620972,
0.0806853324174881,
-0.30058953166007996,
0.6012689471244... |
def test _ list _ decimal _ min _ length _ 1 _ nistxml _ sv _ iv _ list _ decimal _ min _ length _ 2 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / decimal / schema + instance / nistschema - sv - iv - list - decimal - minlength - 2. xsd ", instance = " nistdata / list / ... | [
-0.40487074851989746,
-0.8287588953971863,
0.4966422915458679,
0.6090284585952759,
-0.2705952823162079,
-0.30880996584892273,
-0.5538889765739441,
-0.12395308911800385,
0.5458377003669739,
-0.5053749084472656,
-1.142593264579773,
0.15816046297550201,
0.06058978661894798,
0.6525872349739075... |
def gettestfiles ( self, path ) : imlist = { } count = 0 word = self. folder print ( " leyendo carpeta de test : ", word ) imlist [ word ] = [ ] for imagefile in glob. glob ( path + " / " + self. folder + " / * " ) : print ( " leyendo imagen : ", imagefile ) im = cv2. imread ( imagefile, 0 ) imlist [ word ]. append ( i... | [
-0.24620087444782257,
-0.824914813041687,
0.5787131190299988,
-0.4133566915988922,
-0.26996421813964844,
-0.28694871068000793,
0.6648126244544983,
0.2551955282688141,
-0.05044487863779068,
0.4419686794281006,
-0.32387012243270874,
-0.01059715449810028,
-0.8210268020629883,
1.43735575675964... |
def set _ random _ free _ energy ( self ) : self. eps = random _ matrix ( [ self. mm ], [ self. mu _ eps, self. sigma _ eps ], seed = self. seed _ eps ) | [
0.220193549990654,
0.6728370785713196,
0.4035155773162842,
-0.6182510256767273,
-0.683016300201416,
0.22669251263141632,
0.6271101832389832,
0.2535630762577057,
0.48541340231895447,
-0.13966703414916992,
-0.24684832990169525,
0.5135840773582458,
-0.19190794229507446,
0.25795453786849976,
... |
def chain ( fs : sequence [ ghostcellsetter ], inner : ghostcellsetter = none ) - > ghostcellsetter : first, rest = fs [ 0 ], fs [ 1 : ] if inner is none : @ register _ jitable def wrap ( data _ all : np. ndarray, args = none ) - > none : first ( data _ all, args = args ) else : @ register _ jitable def wrap ( data _ a... | [
-0.6053080558776855,
0.4559943377971649,
0.388823926448822,
0.3986207842826843,
0.1213209480047226,
-0.8194023966789246,
-0.4209187924861908,
-0.43054479360580444,
-0.6125880479812622,
-0.7376551628112793,
0.024554448202252388,
0.5398604273796082,
-0.10936810076236725,
0.6186728477478027,
... |
def save ( self, * args, * * kwargs ) : if not self. steam _ url : self. steam _ url = self. generate _ unique _ steam _ url ( ) super ( game, self ). save ( * args, * * kwargs ) | [
-1.2013758420944214,
0.5526867508888245,
0.5404232740402222,
0.2069764882326126,
0.979905903339386,
0.16155429184436798,
-0.19466927647590637,
0.9249788522720337,
-0.4923229515552521,
0.3562394380569458,
-1.1210346221923828,
-0.24129870533943176,
0.25158101320266724,
0.9020286202430725,
... |
def delete ( self, position : _ position ) - > none : self. _ length - = 1 if not position. is _ owned _ by ( self ) : raise valueerror ( " position doesn't belong to this tree " ) def insert _ node ( node _ to _ insert, is _ node _ left _ child, parent _ node ) : if node _ to _ insert is not none : node _ to _ insert.... | [
-0.1343567669391632,
0.3642401695251465,
0.9227967858314514,
0.05530786141753197,
-0.16070406138896942,
-0.46053236722946167,
0.20278748869895935,
0.026674620807170868,
0.14248520135879517,
0.2989623546600342,
-0.6435618996620178,
-0.4613722264766693,
-0.9165995121002197,
0.502703428268432... |
def run ( self, text ) : # strip all non letter characters letters _ only = letters _ only _ uppercase ( text ) # all the possible lengths to test lengths = list ( range ( 2, min ( 50, len ( letters _ only ) ) ) ) # set the number of possibilities self. set _ total _ possibilities ( len ( lengths ) ) # pre - calculate ... | [
-0.865097165107727,
0.13870202004909515,
0.753538966178894,
0.674628496170044,
-0.09702503681182861,
-0.8606536984443665,
-0.009350180625915527,
-0.05710079148411751,
-0.28467437624931335,
0.6004751324653625,
-1.2748414278030396,
-0.2986694276332855,
-0.8355632424354553,
0.4675782322883606... |
def teardown ( self ) : storage. close ( ) | [
0.6156506538391113,
-0.9380063414573669,
0.28361275792121887,
-0.16409030556678772,
0.47003141045570374,
1.1233934164047241,
1.7064632177352905,
0.042495280504226685,
0.23003381490707397,
-0.571430504322052,
0.558544933795929,
-0.1687285155057907,
-0.6430597305297852,
-0.19172458350658417,... |
def test _ list _ decimal _ enumeration _ 4 _ nistxml _ sv _ iv _ list _ decimal _ enumeration _ 5 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / decimal / schema + instance / nistschema - sv - iv - list - decimal - enumeration - 5. xsd ", instance = " nistdata / list / ... | [
-0.798101007938385,
-0.7663898468017578,
0.5099472403526306,
0.4692387878894806,
-0.0729128047823906,
-0.47282567620277405,
0.3909634053707123,
-0.14506058394908905,
0.4367965757846832,
0.2635261118412018,
-1.3161906003952026,
-0.5829105973243713,
-0.3863805830478668,
0.6561036705970764,
... |
def test _ init _ default _ parameters ( initialize, attribute _ dict ) : if initialize : transformer = drophighpsifeatures ( * * attribute _ dict ) else : transformer = drophighpsifeatures ( ) for attribute, value in attribute _ dict. items ( ) : assert getattr ( transformer, attribute ) = = value | [
-0.18847821652889252,
0.2728487253189087,
0.34111833572387695,
0.7186089754104614,
1.5384917259216309,
-0.012545430101454258,
-0.009971932508051395,
0.33156824111938477,
-0.11722365766763687,
0.05950522422790527,
-0.42536023259162903,
-0.6012914776802063,
0.030092913657426834,
1.5713278055... |
def test _ atomic _ qname _ pattern _ 3 _ nistxml _ sv _ iv _ atomic _ qname _ pattern _ 4 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / qname / schema + instance / nistschema - sv - iv - atomic - qname - pattern - 4. xsd ", instance = " nistdata / atomic / qname / sc... | [
0.042051050812006,
-0.3602268695831299,
0.4491252303123474,
0.06663462519645691,
-0.2511316239833832,
0.29506203532218933,
-0.2792838215827942,
-0.7136637568473816,
0.16144584119319916,
0.30151185393333435,
-0.25638657808303833,
-0.544999361038208,
-0.23457597196102142,
-0.6674253344535828... |
def filterduplicates ( self, lines : referencelineset ) - > none : _, indices = np. unique ( lines. wavelength, return _ index = true ) reject = np. full ( len ( lines ), true, dtype = bool ) reject [ indices ] = false lines. status [ reject ] | = referencelinestatus. blend | [
0.002088421257212758,
0.04496188089251518,
0.4670431315898895,
0.0634656623005867,
0.6406962871551514,
0.8155258297920227,
0.5201119780540466,
-0.2710970938205719,
1.0599889755249023,
0.20554959774017334,
0.1668953001499176,
0.49686864018440247,
-0.46352556347846985,
0.8398737907409668,
... |
def load _ train _ data ( ) - > ( pd. dataframe, dict, dict ) : df = pd. read _ csv ( config. data _ path ) id2lable = joblib. load ( config. id2label _ path ) label2id = joblib. load ( config. label2id _ path ) before = len ( id2lable ) f = len ( label2id ) for i in df ['category _ id'] : if i not in label2id : label2... | [
-1.360265851020813,
-0.08527475595474243,
0.6535242199897766,
-0.33249786496162415,
0.3392751216888428,
0.3056371510028839,
0.22725750505924225,
0.2570958137512207,
-1.072519063949585,
-0.4500831067562103,
-0.8976370692253113,
-0.2750101387500763,
0.17097541689872742,
-0.5433011054992676,
... |
def test _ atomic _ hex _ binary _ pattern _ 1 _ nistxml _ sv _ iv _ atomic _ hex _ binary _ pattern _ 2 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / hexbinary / schema + instance / nistschema - sv - iv - atomic - hexbinary - pattern - 2. xsd ", instance = " nistdata... | [
-0.42100784182548523,
-0.5705268979072571,
0.6182356476783752,
1.2522128820419312,
-0.06739327311515808,
0.3971870541572571,
-0.18217366933822632,
0.45371314883232117,
-0.5573447942733765,
0.32290107011795044,
-0.5327687859535217,
0.07178269326686859,
0.4122711420059204,
0.5042502880096436... |
def qifint ( v _ exit _ s1, v, exit0, eta _ 0, s _ 0, noise0, tiempo, number, dn, dt, tau, vpeak, refr _ tau, tau _ peak ) : d = 1 * v _ exit _ s1 # these steps are necessary in order to use numba ( don't ask why... ) t = tiempo * 1. 0 for n in xrange ( number ) : d [ n, 2 ] = 0 if t > = exit0 [ n ] : d [ n, 0 ] = v [ ... | [
0.19811014831066132,
0.30145278573036194,
0.41319042444229126,
-0.47912585735321045,
0.2462790161371231,
-0.44137293100357056,
-0.07868427783250809,
0.3695398271083832,
-0.40024277567863464,
0.6113608479499817,
-0.19835257530212402,
-0.14042900502681732,
-0.4143657684326172,
0.277297347784... |
def test _ block _ templated _ message _ body _ same _ as _ html ( app ) : with app. app _ context ( ) : blank = blocktemplatedmessage ( " tests / subject _ body. html " ) assert blank. subject = = " test subject. " assert blank. body = = " test body. " assert blank. html = = " test body. " | [
0.5054727792739868,
0.3552654981613159,
0.4371260106563568,
0.757431149482727,
0.279964417219162,
0.5024974346160889,
0.2769486904144287,
-0.9619613289833069,
0.44783616065979004,
0.006444271188229322,
-0.4443105459213257,
1.4809136390686035,
-0.4618140459060669,
1.1617337465286255,
-0.7... |
def tree _ walk _ bfs ( tree ) : if tree is none : return [ ] discovered = [ tree, none ] while len ( discovered ) > 1 : # take first element current = discovered. pop ( 0 ) if current is none : discovered. append ( none ) continue # add its descendants to the discovered pile for i in [ 1, 2 ] : if current [ i ] is not... | [
-0.10345388203859329,
0.201337069272995,
0.9136711359024048,
0.4661921560764313,
0.6163976192474365,
-0.39952826499938965,
-0.3918007016181946,
-0.33899566531181335,
0.2141801416873932,
-0.45957815647125244,
-0.34774792194366455,
0.6179247498512268,
-0.25637730956077576,
1.312113642692566,... |
def at ( self, s, col, * * kwargs ) : if s < self. _ twtable [ 0, 0 ] or s > self. _ twtable [ - 1, 0 ] : raise valueerror ( " s = { } is outside of range ( { }, { } ) ". format ( s, self. _ twtable [ 0, 0 ], self. _ twtable [ - 1, 0 ] ) ) dat = [ ] for i in range ( 1, len ( self. _ twtable ) ) : if self. _ twtable [ i... | [
-0.35345301032066345,
-0.29042404890060425,
0.5620818734169006,
-0.303173303604126,
-0.2174053192138672,
-0.7401176691055298,
0.18865495920181274,
-1.195326566696167,
-0.8145241141319275,
0.721780002117157,
-0.8329042196273804,
0.5813400149345398,
0.4699598550796509,
-0.42272159457206726,
... |
def test _ atomic _ id _ enumeration _ 4 _ nistxml _ sv _ iv _ atomic _ id _ enumeration _ 5 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / id / schema + instance / nistschema - sv - iv - atomic - id - enumeration - 5. xsd ", instance = " nistdata / atomic / id / schem... | [
-0.3068958520889282,
-0.431242436170578,
0.4374859035015106,
0.19864150881767273,
-0.45787373185157776,
0.13851380348205566,
0.19630448520183563,
-0.8131256699562073,
0.4308125674724579,
0.893047571182251,
-0.4496501684188843,
-0.12823115289211273,
-0.5256789922714233,
-0.10656964033842087... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.