text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def serialize ( self, input _ ) : return self. parse ( input _ ). value | [
-0.6861721277236938,
-0.0023129440378397703,
0.3152727782726288,
-0.4701993465423584,
-0.6494390368461609,
-0.026266276836395264,
-0.19859431684017181,
-0.5958386063575745,
0.110354945063591,
-1.4135545492172241,
-1.198053002357483,
0.05560365319252014,
-0.376981645822525,
-0.1829166859388... |
def test _ no _ ref _ parsing ( self ) : self. create _ volume _ objects ( ) self. ep. parse _ references = false vol = self. ep. search ( " volumes ", id _ _ gt = 1 ). hits [ 0 ] vol. volume _ group self. assertisinstance ( vol. volume _ group, dict ) | [
0.006806090474128723,
0.2331002950668335,
0.33051273226737976,
-1.2114613056182861,
0.6595594882965088,
-0.15897057950496674,
-0.17758259177207947,
-0.8221709728240967,
-0.4617999196052551,
-0.9198609590530396,
0.6408780813217163,
-0.2089594602584839,
-0.6764625906944275,
0.781419396400451... |
def _ some ( table : arrable, col _ name : str ) : result = 0 for i, row in enumerate ( table. get _ rows ( ) ) : result + = int ( row [ col _ name ] ) return float ( result ) | [
-0.05821023881435394,
0.2422952502965927,
0.607727587223053,
0.2504204213619232,
0.07038862258195877,
-1.23627507686615,
-0.14961719512939453,
-0.657434344291687,
-0.8785863518714905,
0.5274040102958679,
-0.2678285837173462,
-0.5763859748840332,
0.5922266840934753,
-0.019792595878243446,
... |
def test _ get _ vivo _ disambiguation _ data _ from _ csv ( self ) : expected = { 0 : {'last': ['uri _ 1 ','uri _ 2'],'b': ['uri _ 3'], }, 1 : {'last | f': ['uri _ 1 ','uri _ 2'],'b | a': ['uri _ 3'] }, 2 : {'last | first': ['uri _ 1 ','uri _ 2'],'b | aww': ['uri _ 3'] }, 3 : {'last | f | m': ['uri _ 1'],'last | f | x... | [
-0.11145831644535065,
-0.28599613904953003,
0.8463021516799927,
0.43085041642189026,
0.2985950708389282,
0.336483895778656,
0.47633421421051025,
0.4747025966644287,
-0.056536074727773666,
-0.5051299333572388,
-0.46102964878082275,
-0.2216145247220993,
-0.15817293524742126,
-0.4775924384593... |
def calccomvelocityoverc ( self, direction ) : momentum _ in _ direction = [ ] energy = [ ] for particle in self : momentum _ in _ direction. append ( getattr ( particle. p, direction ) ) energy. append ( particle. getenergy ( ) ) mean _ momentum = np. mean ( momentum _ in _ direction ) mean _ energy = np. energy ( ene... | [
0.2019483894109726,
-0.4420884847640991,
0.39237815141677856,
-0.38969653844833374,
-0.2815244495868683,
0.2510257065296173,
0.2639443874359131,
0.7787192463874817,
-0.16080701351165771,
0.7806747555732727,
0.2725469768047333,
0.005768556147813797,
-0.3197934925556183,
1.4945615530014038,
... |
def _ lookup _ user _ batch ( t, usrbatch ) : screennamelist = ", ". join ( usrbatch ) incomplete = true waitperiod = 2. while incomplete : try : responses = t. users. lookup ( screen _ name = screennamelist ) userdata = { r ['screen _ name'] : r for r in responses } incomplete = false except twitter. api. twitterhttpe... | [
-0.3744412064552307,
-0.23375195264816284,
0.8801894783973694,
-0.12354060262441635,
-0.818854570388794,
0.2822713255882263,
-0.15442299842834473,
-0.7316590547561646,
-0.17158780992031097,
0.6621843576431274,
-0.38280099630355835,
0.09938652068376541,
-0.3794119656085968,
-0.2528655529022... |
def lastresponsestatus ( ) - > int : return _ _ responsestatuscode | [
0.9579933285713196,
-1.5533875226974487,
0.7101922035217285,
-0.9887096285820007,
0.64217609167099,
0.08168264478445053,
0.8267741203308105,
-0.07068903744220734,
1.199061393737793,
-0.6523573994636536,
-0.27074092626571655,
-0.4621818959712982,
-0.2595842778682709,
-0.723791241645813,
0... |
def train ( self, values _ scores ) : raise notimplementederror ( ) | [
-0.8763643503189087,
0.02868649922311306,
0.32694992423057556,
0.6972559094429016,
0.9539428949356079,
0.3719765245914459,
0.4495852589607239,
-0.1457056701183319,
-0.42875877022743225,
-0.3327163755893707,
-0.33206990361213684,
-0.4453554153442383,
0.172657310962677,
0.06396706402301788,
... |
def publish ( self, msg ) : self. channel. basic _ publish ( exchange = self. exchange _ name, routing _ key = self. reply _ to, body = msg ) | [
-0.060887932777404785,
0.8915131688117981,
0.4822840690612793,
-0.920018196105957,
0.8059722781181335,
-0.20212490856647491,
-0.3593381643295288,
0.5262324213981628,
0.206996887922287,
-0.13369345664978027,
0.44619494676589966,
1.2664880752563477,
-0.7997310757637024,
0.5440552830696106,
... |
def testtypes ( self ) : ssd = self. original ( ) op = iecorescene. addsmoothskinninginfluencesop ( ) self. assertequal ( type ( op ), iecorescene. addsmoothskinninginfluencesop ) self. assertequal ( op. typeid ( ), iecorescene. typeid. addsmoothskinninginfluencesop ) op. parameters ( ) ['input']. setvalue ( iecore. in... | [
-0.07359232008457184,
0.698207676410675,
0.6194183826446533,
0.13891024887561798,
0.4319189786911011,
-0.02894018590450287,
0.8847556710243225,
-0.17494970560073853,
0.7191812992095947,
-0.015705281868577003,
-0.5153679251670837,
0.4503159523010254,
-0.7723249793052673,
0.4735199809074402,... |
def get _ target _ addresses ( lf, addresses = [ ], prefix = [ ] ) : if isinstance ( lf, dict ) : for k in lf. keys ( ) : subtree = lf [ k ] p = copy. copy ( prefix ) p. append ( k ) if isinstance ( subtree, dict ) and'xtarget'in subtree : addresses. append ( ( subtree ['xtarget'], p ) ) addresses = get _ target _ addr... | [
-0.7675504684448242,
0.33474308252334595,
0.7067557573318481,
-0.1403283178806305,
-0.07141092419624329,
-0.6491082906723022,
-0.8151996731758118,
0.8774699568748474,
0.1966049075126648,
0.02500905469059944,
0.13467836380004883,
0.5458844304084778,
-0.13650278747081757,
-0.0857231169939041... |
def oortb ( self ) : gm = self. params. get ('gm') r = self. grid. r r _ in = ( self. grid. r _ edge [ 1 ] + self. grid. r _ edge [ 2 ] ) / 2 r _ out = ( self. grid. r _ edge [ - 2 ] + self. grid. r _ edge [ - 3 ] ) / 2 omega = self. omega ( ) domegadr = utility. d _ dr ( self. grid, omega, arr _ start = np. sqrt ( gm ... | [
-0.2505754828453064,
0.2800861597061157,
0.7901414632797241,
-0.45573100447654724,
-0.1505422443151474,
0.2294279932975769,
0.6447589993476868,
-0.2217550128698349,
0.09978047758340836,
0.5443159341812134,
0.9942150115966797,
0.2127372920513153,
-0.8207386136054993,
0.0112968310713768,
0... |
def get _ value ( self, name ) : # detect if the requested name is a list type. names = set ( i [ 0 ] for i in self. _ items ) if'% s [ 0 ]'% name in names : out = [ ] i = 0 namei ='% s [ % d ]'% ( name, i ) while namei in names : out. append ( self. get _ value ( namei ) ) i + = 1 namei ='% s [ % d ]'% ( name, i ) ret... | [
-1.0636318922042847,
-0.27696794271469116,
0.7027913928031921,
-0.1669006645679474,
-0.28924107551574707,
-0.6606723666191101,
-0.8002779483795166,
-0.4289919435977936,
-0.21153564751148224,
0.45573756098747253,
-0.8552407622337341,
-0.30875054001808167,
-0.29049500823020935,
1.26828026771... |
def test _ alt _ hyp _ fail _ error ( self ) : _ data = { " human " : " atgcggctcgcggaggccgcgctcgcgga ", " mouse " : " atgcccggcgccaaggcagcgctggcgga ", " opossum " : " tgaccagtgaaagtggcggcggtggctga ", } aln = make _ aligned _ seqs ( data = _ data, moltype = " dna " ) tree = " ( mouse, human, opossum ) " m1 = evo _ app.... | [
0.007195676676928997,
-0.5425066947937012,
0.517486572265625,
0.1662524789571762,
0.7511165142059326,
1.146376371383667,
-0.5108920335769653,
0.1857023388147354,
-0.6748281121253967,
0.30408257246017456,
-0.2059527486562729,
0.9399787783622742,
0.38412046432495117,
-0.09307761490345001,
... |
def clearcell ( ) : clear _ output ( wait = true ) | [
1.253597378730774,
0.5597649812698364,
0.2598022222518921,
1.5429896116256714,
-0.16683797538280487,
-0.23571282625198364,
1.1151492595672607,
-0.8611916899681091,
-0.8984704613685608,
0.1956174671649933,
0.7723149657249451,
0.6536430716514587,
0.18236151337623596,
-0.20173613727092743,
... |
def deposit ( self, account _ name, amount ) : if self. account _ exists ( account _ name ) : self. accounts [ account _ name ]. deposit ( amount ) note = " deposit of { } to { } accepted " self. report ( note. format ( amount, account _ name ) ) return true else : note = " deposit of { } rejected. no account named { }... | [
0.3949410319328308,
0.674939751625061,
0.7515490651130676,
-0.32623764872550964,
-0.2356998473405838,
0.6264822483062744,
0.7912101745605469,
0.0981883630156517,
0.30004748702049255,
-0.05316438525915146,
-0.02044425718486309,
-0.2255118191242218,
-0.614957332611084,
0.6504127979278564,
... |
def load _ from _ dict ( self, d ) : self. title = d. get ('title ','' ) self. notes = d. get ('notes ','' ) self. is _ population = d. get ('is _ population ', none ) self. mean = d. get ('mean ', none ) self. orig _ mean = d. get ('orig _ mean ', none ) self. sd = d. get ('sd ', none ) self. orig _ sd = d. get ('orig... | [
-0.8129116892814636,
-0.14005734026432037,
0.5199885964393616,
-1.0201324224472046,
-0.7749119400978088,
0.4132555425167084,
-0.6036853194236755,
-0.3874744772911072,
0.2328280508518219,
0.22259463369846344,
-0.36013153195381165,
0.32426917552948,
0.25877851247787476,
0.1623983234167099,
... |
def computepca ( x, n _ components = none, whiten = true ) : n, m = x. shape if n _ components! = none : n = n _ components x - = x. mean ( 1, keepdims = true ) ux, sx = eig ( np. cov ( x ) ) if whiten : k = np. sqrt ( inv ( np. diag ( ux ) ) ). dot ( sx. conj ( ). t ) [ : n ] else : k = sx. conj ( ). t [ : n ] x = k. ... | [
-1.0011776685714722,
0.46322736144065857,
0.8717330694198608,
0.28619641065597534,
-0.20174351334571838,
-0.12603384256362915,
-0.11569664627313614,
0.840086817741394,
1.1921836137771606,
1.2438979148864746,
0.4725607931613922,
-0.3534916043281555,
-0.02136029675602913,
-0.1329270005226135... |
def node _ except _ new ( node : list, _ except, except _ part ) - > none : node. append ( [ " node _ except ", _ except, except _ part ] ) | [
-0.2802005112171173,
0.5027183890342712,
0.3929368555545807,
-0.7420505285263062,
-0.22369292378425598,
0.6146795153617859,
-0.8481951951980591,
0.6868107914924622,
-0.7305582761764526,
0.2561861574649811,
-1.1410531997680664,
0.460416704416275,
-0.08885098993778229,
0.7642742395401001,
... |
def convert _ context ( self, context, progress = progress ( ) ) : context _ type = context [ " type " ] if context _ type = = " artist " : return self. get _ artist _ from _ context ( context ) elif context _ type = = common. all _ artist _ tracks _ context _ type : return self. get _ artist _ from _ context ( context... | [
-0.8822301030158997,
-0.5739021897315979,
0.7036486268043518,
0.05210321396589279,
0.09514699131250381,
-0.028426291421055794,
0.0969357118010521,
-1.1586213111877441,
0.8329626321792603,
0.35342171788215637,
-0.19217780232429504,
0.22032390534877777,
-0.7438141703605652,
-0.20902526378631... |
def upload _ files ( self, s3, buck _ name, script _ folder, app _ dir, tarfile _ name ) : # shell file : setup ( download s3 files to local machine ) s3. object ( buck _ name, script _ folder +'/ setup. sh') \. put ( body = open ( app _ dir +'/ setup. sh ','rb'), contenttype ='text / x - sh') # shell file : terminate ... | [
0.5013624429702759,
-0.22697556018829346,
0.9411380290985107,
-0.13579455018043518,
1.0847054719924927,
0.23025910556316376,
-0.2060658037662506,
-0.26500245928764343,
-0.40690502524375916,
1.1732540130615234,
-0.8643075823783875,
-0.28730151057243347,
0.16827943921089172,
-0.0181207302957... |
def l2 _ distance ( vector _ 1, vector _ 2 ) : return numpy. linalg. norm ( vector _ 1 - vector _ 2 ) | [
0.3630058467388153,
-2.117987632751465,
0.4266345202922821,
-0.17546173930168152,
-0.6839205622673035,
0.5484315156936646,
-0.9168404936790466,
0.2691434323787689,
-0.8025553226470947,
0.36784419417381287,
0.23378364741802216,
1.5075098276138306,
0.5349915027618408,
0.3667179048061371,
0... |
def _ method _ to _ execute ( self, argument ) : raise exception ( " abstractmethod " ) | [
-0.6565365195274353,
0.7449029684066772,
0.4952225983142853,
-0.39094334840774536,
-0.057160232216119766,
0.37162184715270996,
0.16465556621551514,
0.06886191666126251,
-0.024100719019770622,
1.1487812995910645,
0.9398984313011169,
0.24072441458702087,
0.661456286907196,
0.4148154556751251... |
def target _ db _ server _ resource _ id ( self ) - > str : return pulumi. get ( self, " target _ db _ server _ resource _ id " ) | [
-0.10424277931451797,
0.09946822375059128,
0.4232476055622101,
-0.4498071074485779,
1.1599074602127075,
1.2653387784957886,
-0.3295634686946869,
0.23238098621368408,
1.3865604400634766,
0.5868072509765625,
0.19186151027679443,
1.6527019739151,
-0.5572445392608643,
-0.46761614084243774,
-... |
def hardware _ demod _ en ( self ) : if self. module. device : self. _ settings. hardware _ demod _ en = self. module. device. sequencers [ self. input _ sequencer _ number ]. get ( f " demod _ en _ acq " ) return self. _ settings. hardware _ demod _ en | [
-0.09192124009132385,
0.5485245585441589,
0.5433368682861328,
0.8911134600639343,
0.09608650207519531,
0.5612825155258179,
0.7629260420799255,
-0.4719838798046112,
0.20301803946495056,
-0.3682170510292053,
0.19525693356990814,
0.6900630593299866,
0.30747923254966736,
0.8208134174346924,
... |
def update _ towns _ on _ tick ( self ) : for player in self. players. values ( ) : if player. town. product < player. town. population : player. town. population = max ( player. town. population - 1, 0 ) player. town. product = max ( player. town. product - player. town. population, 0 ) if player. town. population = =... | [
-0.5602173209190369,
-1.006955623626709,
0.6783693432807922,
-0.10998760908842087,
0.06244715675711632,
0.6049915552139282,
0.2125365436077118,
-0.7711874842643738,
-0.06257953494787216,
0.8949178457260132,
-0.23736883699893951,
0.01198040135204792,
0.657095193862915,
0.34566551446914673,
... |
def convert _ circle _ to _ rectangle ( point, radius _ m ) : # reverse the lng, lat order to convert to geopy point format center = reverse _ coordinate _ order ( point ) # create a geopy coordinate calculator for the given distance calculator = vincenty ( meters = radius _ m ) # calculate points at the given distance... | [
0.1120244637131691,
-0.5407050848007202,
0.8153826594352722,
-0.45512884855270386,
-0.3150210976600647,
-0.27655234932899475,
-0.5808548331260681,
0.13206492364406586,
0.487905353307724,
0.6657953858375549,
0.24181526899337769,
0.5879642367362976,
-0.3355902433395386,
-0.3239537477493286,
... |
def getruleforlogicalinterface ( self, logicalinterfaceid, ruleid, draft = false ) : if draft : req = apiclient. oneruleforlogicalinterfaceurl % ( self. host, " / draft ", logicalinterfaceid, ruleid ) else : req = apiclient. oneruleforlogicalinterfaceurl % ( self. host, " ", logicalinterfaceid, ruleid ) resp = requests... | [
0.28647392988204956,
-0.055776722729206085,
0.2430286854505539,
-1.2363858222961426,
0.34352049231529236,
0.38734763860702515,
-0.9616842865943909,
-0.3947509825229645,
0.3471812605857849,
0.1441371738910675,
0.32763203978538513,
0.9441404342651367,
-1.8202544450759888,
0.42277488112449646... |
def get _ selects ( self ) : queries = { } for group, groupby in self. groups. items ( ) : columns = [ make _ sql _ clause ( groupby, ex. text ) ] columns + = self. _ get _ aggregates _ sql ( group ) gb _ clause = make _ sql _ clause ( groupby, ex. literal _ column ) query = ex. select ( columns = columns, from _ obj =... | [
-0.35290825366973877,
0.2712620198726654,
0.40355005860328674,
-0.37123993039131165,
-0.2808081805706024,
-0.12376923859119415,
0.24749299883842468,
-0.8505061864852905,
-0.8299922943115234,
0.46555033326148987,
0.08932061493396759,
-0.015227231197059155,
-0.1022583618760109,
0.04282051697... |
def _ init _ esim _ weights ( module ) : if isinstance ( module, nn. linear ) : nn. init. xavier _ uniform _ ( module. weight. data ) nn. init. constant _ ( module. bias. data, 0. 0 ) elif isinstance ( module, nn. lstm ) : nn. init. xavier _ uniform _ ( module. weight _ ih _ l0. data ) nn. init. orthogonal _ ( module. ... | [
0.532850444316864,
0.740951657295227,
0.9116697311401367,
-0.23459267616271973,
0.5788316130638123,
0.4149985909461975,
-0.12806318700313568,
0.48214998841285706,
-0.11576702445745468,
0.5449678301811218,
-1.354785442352295,
0.6251670122146606,
0.13439489901065826,
0.7708190679550171,
0.... |
def health _ change ( self, n ) : self. health + = n | [
-0.4742189049720764,
0.1682545691728592,
0.339122474193573,
0.12507958710193634,
0.32945239543914795,
0.9351532459259033,
-0.690619945526123,
-0.6348170042037964,
-0.0663510411977768,
-0.36072927713394165,
-0.5355455279350281,
0.5312909483909607,
0.5116032958030701,
0.36923253536224365,
... |
def get _ currently _ playing ( self ) : playing = self. get _ api _ v1 ( " me / player / currently - playing " ) if playing : track = playing ['item'] if track : playing. update ( track ) return track ( playing ) else : return nonetrack else : return nonetrack | [
-0.2949373722076416,
-0.7927414178848267,
0.5084366798400879,
1.1379058361053467,
0.16077600419521332,
0.0818132758140564,
-0.7201581597328186,
-0.5995577573776245,
0.055471450090408325,
-0.5170153379440308,
0.7716897130012512,
0.4251343011856079,
-1.3907722234725952,
-1.1463526487350464,
... |
def window _ transform _ series ( series, window _ size = 2 ) : l = len ( series ) steps = l - window _ size x = [ series [ i : i + window _ size ] for i in range ( steps ) ] y = [ series [ i + window _ size ] for i in range ( steps ) ] # reshape each x = np. asarray ( x ) x. shape = ( np. shape ( x ) [ 0 : 2 ] ) y = n... | [
-0.5466641187667847,
-0.32024261355400085,
0.7009186148643494,
0.007121730130165815,
-0.6005039811134338,
-0.5433868765830994,
0.4826333820819855,
0.18962423503398895,
0.8705160617828369,
0.3836110532283783,
-0.529654324054718,
1.452171802520752,
0.0898732915520668,
0.49757853150367737,
... |
def gmm _ cluster ( x ) : gmm = gaussianmixture ( n _ components = 10 ) gmm. fit ( x ) y _ pred = gmm. predict ( x ) print ( metrics. calinski _ harabasz _ score ( x, y _ pred ) ) return y _ pred | [
-0.0707165077328682,
0.06424600630998611,
0.32908114790916443,
0.2890123724937439,
-0.23131948709487915,
0.639404296875,
-0.135030597448349,
0.017828796058893204,
0.5586685538291931,
-0.2748793959617615,
0.09554395824670792,
0.6949173212051392,
0.1015542671084404,
-0.0911332368850708,
0.... |
def deconv _ hyperlap _ breg ( y, h, lam = 1000., gamma = 5., niter = 10, n _ threads = 6, logged = false ) : alpha = 1. # make everything scale invariant y _ mean = np. mean ( y ) y = y / y _ mean dshape = y. shape fftw = myfftw ( dshape, unitary = false, n _ threads = n _ threads ) h = fftw. rfftn ( h ) y = fftw. rff... | [
0.09572547674179077,
0.6547845602035522,
0.9810065627098083,
0.4135684669017792,
-0.7907055616378784,
-0.14000728726387024,
-0.009493947960436344,
-0.16632330417633057,
-0.8903017640113831,
0.0030804891139268875,
-0.19958505034446716,
-0.12061429023742676,
-0.3345678448677063,
0.4965107440... |
def resolve ( resolve _ value : s ) - >'promise [ s ]': def executor _ func ( resolve _ fn : resolvefunc [ s ] ) - > none : resolve _ fn ( resolve _ value ) return promise ( executor _ func ) | [
-0.04405593127012253,
0.43873360753059387,
0.17468670010566711,
0.3404925465583801,
0.08499053120613098,
-1.9387686252593994,
-0.9254799485206604,
-0.007650962099432945,
-0.3461381793022156,
-0.6952089667320251,
-0.8873893022537231,
-0.4522263705730438,
0.6085023283958435,
-0.4108372628688... |
def get _ container _ options ( self, container _ name, headers = none, requestslib _ kwargs = none ) : url ='{ 0 } / { 1 } '. format ( self. storage _ url, container _ name ) response = self. options ( url, headers = headers, requestslib _ kwargs = requestslib _ kwargs ) return response | [
-0.8955438733100891,
0.09128160774707794,
0.7124282717704773,
0.17927460372447968,
0.992803156375885,
-1.2380616664886475,
-0.7696763277053833,
-1.6152634620666504,
0.3686508238315582,
0.22338815033435822,
-0.1106785237789154,
0.2806057631969452,
-0.2547900378704071,
0.03196774050593376,
... |
def array2patches ( arr, patch _ size = ( 64, 64 ), step _ size = 64 ) : logging. info ('array2patches, arr. shape : { }, patch _ size : { } '. format ( arr. shape, patch _ size ) ) return np. array ( [ arr [ i : i + patch _ size [ 0 ], j : j + patch _ size [ 1 ] ] for i in range ( 0, arr. shape [ 0 ] - patch _ size [ ... | [
0.12705351412296295,
-0.845238983631134,
0.6769261360168457,
-0.18615928292274475,
-1.1442315578460693,
0.6533889770507812,
0.34596583247184753,
0.2999011278152466,
0.8571377992630005,
0.19670814275741577,
-0.05690185725688934,
0.48415374755859375,
0.5650025606155396,
0.6018548607826233,
... |
def fixtures _ info _ fun ( self ) : raise notimplementederror ('should be implemented in subclass') | [
0.19109627604484558,
-0.7420268654823303,
0.7094452977180481,
0.10239442437887192,
0.31665605306625366,
0.21112526953220367,
1.392778992652893,
-0.39105358719825745,
-0.5071267485618591,
-0.5488850474357605,
-0.601155161857605,
-0.6149038076400757,
0.8959263563156128,
0.15169695019721985,
... |
def getavailablemethods ( ) : return methods | [
-0.6581375598907471,
-0.3823653757572174,
0.2938488721847534,
0.9608210921287537,
0.17154349386692047,
-0.23862525820732117,
-0.44199320673942566,
-0.4621567726135254,
0.2829514741897583,
0.2352810800075531,
-0.9647872447967529,
-0.0032554222270846367,
-0.010286019183695316,
0.444554179906... |
def get _ useful _ data ( self ) : data = super ( ). get _ useful _ data ( exclude = {'csrf _ token ', * self. special _ fields. keys ( ) } ) data ['email'] = data ['email'] or none data ['mother _ tongues'] = self. mother _ tongues data ['spoken _ languages'] = self. spoken _ languages data ['written _ languages'] = s... | [
-0.11623257398605347,
0.2918056547641754,
0.2829916179180145,
-0.7389147877693176,
0.16273245215415955,
-0.04150668531656265,
-1.087849497795105,
-0.30093392729759216,
-0.05181955546140671,
-0.25812777876853943,
-0.9557763338088989,
0.5509377121925354,
-0.16297230124473572,
0.4389411807060... |
def left _ join ( table _ a, table _ b, test ) : assert ( sum ( isinstance ( table, tuple ) for table in ( table _ a, table _ b ) ) > 0 ), " at least one table must be given a name! " ta, pa = table _ a if isinstance ( table _ a, tuple ) else ( table _ a, " _ " ) tb, pb = table _ b if isinstance ( table _ b, tuple ) el... | [
0.13852252066135406,
0.17280060052871704,
0.7037855386734009,
0.09075453132390976,
-0.34983208775520325,
0.4340226948261261,
0.04274620860815048,
-0.1374068260192871,
-0.29561910033226013,
0.3307301104068756,
0.5634119510650635,
-0.3651081323623657,
-0.9426590204238892,
-0.0967938974499702... |
def super _ circle ( self, circle2 ) : new _ circle _ center = ( self. center. halfway _ to ( circle2. center ) ) new _ circle _ radius2 = new _ circle _ center. distance _ from ( pt. point ( ( circle2. center. x + circle2. radius ), ( circle2. center. y + circle2. radius ) ) ) new _ circle _ radius1 = new _ circle _ c... | [
0.37415170669555664,
-0.9249725341796875,
0.7878821492195129,
0.09342362731695175,
-0.8812724947929382,
0.1396619826555252,
0.0683341920375824,
-1.091286063194275,
-0.35790419578552246,
0.10271307080984116,
-0.5669875741004944,
0.8912677764892578,
-0.24218149483203888,
-0.1879439800977707,... |
def image _ reference ( self, image _ id ) : info = self. image _ info [ image _ id ] if info [ " source " ] = = " coco " : return info [ " path " ] else : super ( self. _ _ class _ _, self ). image _ reference ( image _ id ) | [
-0.059399932622909546,
0.5148385763168335,
0.20564687252044678,
-0.06819958239793777,
0.10162153095006943,
-0.231596440076828,
0.3475782573223114,
-0.07988307625055313,
0.13473224639892578,
0.49068695306777954,
0.8177823424339294,
0.13192106783390045,
0.3552284836769104,
1.7893486022949219... |
def plot _ flow ( x, t, phi, grid _ size, t _ sample ) : # i'm doing the input here so you don't crash if you never use this function and don't have opengl import open3d with torch. no _ grad ( ) : mesh _ samples = embed _ 3d ( torch. from _ numpy ( meshgrid _ vertices ( grid _ size ) ). to ( x ), t [ 0, 2 ] ) mesh _ f... | [
1.0913059711456299,
0.32150083780288696,
1.0314730405807495,
0.1794288456439972,
-0.048961054533720016,
0.9211996793746948,
0.4922546148300171,
0.3474484980106354,
0.008887385949492455,
0.4024701416492462,
-0.1991415023803711,
1.074535608291626,
0.04881837218999863,
0.22032712399959564,
... |
def _ find _ common _ roots ( paths ) : paths = [ x. split ( os. path. sep ) for x in paths ] root = { } for chunks in sorted ( paths, key = len, reverse = true ) : node = root for chunk in chunks : node = node. setdefault ( chunk, { } ) node. clear ( ) rv = set ( ) def _ walk ( node, path ) : for prefix, child in iter... | [
0.7878500819206238,
0.6175475716590881,
0.9592064619064331,
-0.09322156012058258,
-0.4408940076828003,
-0.07255616784095764,
1.261520266532898,
-0.612960159778595,
-0.3415016531944275,
0.17073176801204681,
0.11724239587783813,
-0.5831958651542664,
-0.5744337439537048,
0.6214669942855835,
... |
def is _ closed ( self ) - > bool : return self. _ zone [ " state " ] = = advantage _ air _ state _ close | [
-0.4904463291168213,
-0.09624926000833511,
0.5624233484268188,
0.7873403429985046,
-0.23235881328582764,
1.380940318107605,
-0.4294142425060272,
-0.4338902533054352,
0.8512247204780579,
-0.08357676863670349,
0.5632435083389282,
0.5286608934402466,
-0.5377990007400513,
0.2779337763786316,
... |
def find _ thug _ landmarks ( self, img _ path, show _ result = false ) : | [
-0.1654238998889923,
0.22831258177757263,
0.03799678385257721,
0.9281476140022278,
0.015589535236358643,
-0.14559467136859894,
1.5608164072036743,
0.1314551830291748,
-0.29353654384613037,
0.3704509139060974,
0.0251484252512455,
-0.9685476422309875,
0.25846612453460693,
1.2218347787857056,... |
def _ _ lt _ _ ( self, other ) : if type ( self ) is not type ( other ) : return notimplemented return other. _ is _ greater _ than _ same _ type ( self ) | [
-0.20932328701019287,
-0.2672633230686188,
0.8738789558410645,
0.08116232603788376,
0.4398835301399231,
0.5583089590072632,
-0.10588841885328293,
-2.0203731060028076,
0.12566633522510529,
0.03265396133065224,
-0.948936939239502,
0.3409329950809479,
-0.37636250257492065,
1.2117908000946045,... |
def get _ layer ( layername ) : return qgsproject. instance ( ). maplayersbyname ( layername ) [ 0 ] | [
-0.4570392668247223,
-0.14211753010749817,
0.09689512103796005,
-0.11061694473028183,
-0.010141444392502308,
0.30699506402015686,
0.17967581748962402,
-1.0215363502502441,
0.07462498545646667,
-0.5211642384529114,
0.22143849730491638,
0.3687499463558197,
-0.7676720023155212,
-0.09180545806... |
def xyfrombot _ locuc ( self, xy, noblock = false ) : self. logger. debug ( " xyfrombot _ locuc translated { } to { } ". format ( xy, 0. 0254 * float ( xy ) ) ) return 0. 0254 * float ( xy ) | [
0.2772037088871002,
-0.10913980007171631,
0.25868284702301025,
-1.0075041055679321,
-0.5562732219696045,
-0.7380504012107849,
-0.0955142080783844,
-0.0926230400800705,
-0.08901520818471909,
-0.04658530279994011,
-0.3272242248058319,
0.4123079478740692,
-0.14270572364330292,
-0.573408901691... |
def _ project _ repartition ( s _ obj, v, radius, contribute = false ) : # check inputs : xyz, _, v, xsign = _ check _ projection ( s _ obj, v, radius, contribute ) logger. info ( proj _ str % ( xyz. shape [ 0 ],'repartition') ) index _ faced = v. shape [ 1 ] # corticale repartition : repartition = np. ma. zeros ( ( v.... | [
0.1841161996126175,
-0.1494995504617691,
0.6339253783226013,
-1.1350517272949219,
-0.12818866968154907,
-0.5114330649375916,
1.0746760368347168,
0.27872925996780396,
0.6684724688529968,
1.3175488710403442,
0.1644873172044754,
-0.14647707343101501,
-0.17924240231513977,
-0.3507733643054962,... |
def node _ build _ in _ func _ call _ new ( node : list, var, func _ name, args ) - > none : node. append ( [ " node _ bcall ", var, func _ name, args ] ) | [
0.04982360079884529,
0.2370864599943161,
0.5459288358688354,
0.11553052812814713,
0.8422641754150391,
-0.4251687526702881,
-0.604543149471283,
0.5736729502677917,
-0.6244626641273499,
-0.13185454905033112,
-0.44795745611190796,
1.1846237182617188,
-0.06260328739881516,
0.9093970060348511,
... |
def interlocked ( self ) : return not bool ( self. interlock. get ( ) ) | [
-0.7307091355323792,
-0.041739869862794876,
0.49843740463256836,
0.4470462501049042,
0.6897586584091187,
0.5192277431488037,
0.44475582242012024,
0.2617975175380707,
-0.23056459426879883,
-0.2634570300579071,
-0.37599584460258484,
0.1221761479973793,
-2.4818978309631348,
-0.277369320392608... |
def check _ events ( ship, bullets, ai _ settings, screen, play _ button, stats, aliens, sb ) : for event in pygame. event. get ( ) : if event. type = = pygame. quit : save _ high _ score ( stats ) sys. exit ( ) elif event. type = = pygame. keydown : check _ keydown _ events ( event, ship, bullets, ai _ settings, scree... | [
0.014347370713949203,
-0.2543955147266388,
1.019232153892517,
1.031636118888855,
0.809228241443634,
-0.22835208475589752,
0.15110161900520325,
-1.5633774995803833,
0.5928353667259216,
0.8064473867416382,
-0.46663492918014526,
0.009411130100488663,
0.44571927189826965,
0.9213401079177856,
... |
def add _ post _ sync _ ops ( model ) : for param _ info in model. getoptimizationparaminfo ( model. getparams ( ) ) : if param _ info. blob _ copy is not none : model. param _ init _ net. halftofloat ( param _ info. blob, param _ info. blob _ copy [ core. datatype. float ] ) | [
0.2968481183052063,
-0.24179141223430634,
0.6954975128173828,
0.4886733591556549,
0.9447817206382751,
0.12019463628530502,
0.7319316267967224,
-0.6729530692100525,
-1.1283162832260132,
1.0054553747177124,
-1.2673996686935425,
-0.5392462611198425,
0.2467954009771347,
0.9789301753044128,
-... |
def test _ hyp _ split _ codon _ select _ models ( self ) : _ data = { " human " : " atgcggctcgcggaggccgcgctcgcggag ", " mouse " : " atgcccggcgccaaggcagcgctggcggag ", " opossum " : " atgccagtgaaagtggcggcggtggctgag ", } aln = make _ aligned _ seqs ( data = _ data, moltype = " dna " ) opt _ args = dict ( max _ evaluation... | [
-0.29973360896110535,
0.11587494611740112,
0.5199835300445557,
-0.07652802765369415,
1.1898037195205688,
0.26815035939216614,
0.599902868270874,
-0.07115525752305984,
-0.0765652284026146,
0.22744865715503693,
-0.9458892345428467,
0.6239048838615417,
-0.3456977307796478,
-0.3132768571376800... |
def random _ image ( nbpix ) : # ratio of black pxls over white pixels cut = 0. 5 nbpix = int ( nbpix ) # generating the random grid with numpy rmd _ img = np. random. choice ( [ 0, 1 ], size = ( nbpix, nbpix ), p = [ 1 - cut, cut ] ) # transform the np array to a flat list rmd _ lst = arraytolist ( rmd _ img ) return ... | [
-0.8811113834381104,
-0.04377176612615585,
0.42845016717910767,
-0.2568335235118866,
0.17307910323143005,
-0.0743696466088295,
-0.35212910175323486,
-0.3960261642932892,
1.2571637630462646,
0.6819067597389221,
0.3314603865146637,
0.14094583690166473,
-0.3685912787914276,
1.337667465209961,... |
def displays2 ( img, rects, color = ( 255, 255, 0 ) ) : img _ dst = img. copy ( ) contours = [ np. array ( [ [ r [ 0 ], r [ 1 ] ], [ r [ 0 ] + r [ 2 ] - 1, r [ 1 ] ], [ r [ 0 ] + r [ 2 ] - 1, r [ 1 ] + r [ 3 ] - 1 ], [ r [ 0 ], r [ 1 ] + r [ 3 ] - 1 ] ] ) for r in rects ] cv2. drawcontours ( img _ dst, contours, - 1, c... | [
0.08040563762187958,
-0.29441124200820923,
0.7417691349983215,
0.0036793039180338383,
-0.45080652832984924,
0.18857602775096893,
0.3714424967765808,
-0.9117739796638489,
0.40443459153175354,
0.031133873388171196,
0.4187793731689453,
-0.08219902962446213,
0.797572672367096,
0.03262462839484... |
def check _ message _ box _ space ( redirect _ to = none ) : if get _ message _ count ( current _ user ) > = flaskbb _ config [ " message _ quota " ] : flash ( _ ( " you cannot send any messages anymore because you have " " reached your message limit. " ), " danger ", ) return redirect ( redirect _ to or url _ for ( " ... | [
0.14766818284988403,
0.30289918184280396,
0.6572495102882385,
0.6915603280067444,
0.21230454742908478,
-0.1620902419090271,
0.363952100276947,
-0.48096054792404175,
0.28928977251052856,
-0.504594087600708,
0.2949700951576233,
0.8678982257843018,
-0.15431617200374603,
0.46078190207481384,
... |
def test _ list _ decimal _ max _ length _ 3 _ nistxml _ sv _ iv _ list _ decimal _ max _ length _ 4 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / decimal / schema + instance / nistschema - sv - iv - list - decimal - maxlength - 4. xsd ", instance = " nistdata / list / ... | [
-0.3645736277103424,
0.27580514550209045,
0.3906412720680237,
0.9235144853591919,
-0.10166952013969421,
0.2671496272087097,
-0.6264843344688416,
0.5343104600906372,
0.9693763852119446,
0.2361600697040558,
-0.9951916933059692,
-0.6551311016082764,
0.004650297109037638,
-0.10093483328819275,... |
def jwt _ encode ( payload ) : try : key = settings. login _ secret encoded _ bytes = jwt. encode ( payload, key, algorithm ='hs256') encoded = bytes. decode ( encoded _ bytes ) except exception : logging. error ( " jwt encode error, for payload = { } ". format ( payload ) ) return none return encoded | [
-0.00884748250246048,
0.18487340211868286,
0.4156233072280884,
0.3222172260284424,
-0.522773265838623,
-0.39540302753448486,
-1.0408796072006226,
-0.9132278561592102,
0.6186249256134033,
0.441911906003952,
-0.39779630303382874,
0.6707266569137573,
-0.23662638664245605,
-0.6562947630882263,... |
def get _ standard _ args ( self ) : args = [ ] if self. homedir is not none : args. extend ( ['- - homedir ', self. homedir ] ) if self. options is not none : args. extend ( ['- - options ', self. options ] ) if self. comment is not none : args. extend ( ['- - comment ', self. comment ] ) if self. compress _ algo is n... | [
-0.5229918956756592,
-0.23570525646209717,
0.7931147217750549,
-0.32690057158470154,
0.50941401720047,
0.6509771347045898,
-0.6642305254936218,
-0.17342709004878998,
-0.25961998105049133,
0.8484907746315002,
-0.5117044448852539,
0.6568858623504639,
-1.0040264129638672,
0.8724679946899414,
... |
def cpt _ struct ( df : pd. dataframe ) - > pd. dataframe : cmpt _ struc = df [ [ " uo _ lib ", " siren ", " identifiant _ interne " ] ]. drop _ duplicates ( ) cmpt _ struc = cmpt _ struc. loc [ cmpt _ struc [ " siren " ]. notna ( ) ] cmpt _ struc = cmpt _ struc. sort _ values ( " siren " ) cmpt _ struc = cmpt _ struc ... | [
0.23351098597049713,
-0.23639041185379028,
0.2887905240058899,
-1.029799222946167,
0.1760028451681137,
0.1927589327096939,
0.6735529899597168,
-0.2102288007736206,
0.11228429526090622,
-0.46592843532562256,
0.00880325585603714,
0.20282317698001862,
-0.12157928198575974,
-0.7097199559211731... |
def main ( ) : my _ taxi = taxi ( " prius 1 ", 100 ) my _ taxi. drive ( 40 ) print _ fare _ details ( my _ taxi ) my _ taxi. start _ fare ( ) my _ taxi. add _ fuel ( 40 ) my _ taxi. drive ( 100 ) print _ fare _ details ( my _ taxi ) | [
0.029772909358143806,
0.05247756093740463,
0.6163358092308044,
0.534755289554596,
0.7824996113777161,
-0.33637428283691406,
-0.5120232105255127,
0.4097174108028412,
-0.8352417945861816,
-0.9494733214378357,
-0.6329687833786011,
0.0028339915443211794,
0.1415875405073166,
0.40951770544052124... |
def traverse _ tree _ pre _ order ( self ) - > generator : position = self. get _ root ( ) if position is not none : for i in self. traverse _ subtree _ pre _ order ( position ) : yield i | [
-0.396514892578125,
0.47816166281700134,
0.8344362378120422,
0.6292069554328918,
-0.3869604766368866,
-0.47693562507629395,
0.15987879037857056,
-0.4293860197067261,
-0.01752300187945366,
-0.24053090810775757,
-0.23722784221172333,
-0.22791768610477448,
0.018043875694274902,
0.803326964378... |
def search ( self ) - > none : self. _ _ retrieve _ users _ id ( ) if len ( self. _ _ users _ to _ search ) < = 0 : self. log. info ( " nothing to search " ) return if len ( self. _ _ users _ to _ search ) > 100 : # in case of more request to send we disable the info log to print # a bar that shows the progress. self. ... | [
-1.4125102758407593,
0.42584073543548584,
0.5526748299598694,
-0.068097785115242,
1.008289098739624,
0.012183024547994137,
0.4592249393463135,
-0.6118303537368774,
-0.25160324573516846,
-0.07408925145864487,
0.13737741112709045,
-0.17113478481769562,
-0.44083648920059204,
0.760710060596466... |
def _ createfootfkhierarchy ( self ) : prev _ control = none fk _ master _ grp = mc. group ( n = " { } _ { } _ footfk _ { } _ { } ". format ( self. side, self. name, self. suffix, self. instance _ num ), p = self. mod _ dict [ " fkcontrol " ], em = 1 ) for i, joint in enumerate ( [ " pelvis ", " hip ", " knee ", " foot... | [
0.05544741079211235,
0.8485654592514038,
0.9103643894195557,
-0.06457071006298065,
0.10402265936136246,
-0.7388840317726135,
1.4090259075164795,
-0.536938488483429,
-0.36639565229415894,
-0.7521565556526184,
-0.1064472571015358,
-0.4436795711517334,
-0.033372700214385986,
0.257647514343261... |
def installscipy ( self ) : # get directories exec ( self. findkeywordoption ('scipy _ src') ) scipy _ src = os. path. expanduser ( scipy _ src ) scipy _ setup = scipy _ src +'/ setup. py'scipy _ home = self. salome _ home +'/ prerequisites /'+ self. findprogram ('scipy') +'/'# clean up subprocess. call ( [ self. pytho... | [
-0.05085817724466324,
-0.9312888383865356,
0.671754777431488,
-0.036801304668188095,
0.7554090023040771,
0.12191298604011536,
0.2852412760257721,
0.38201263546943665,
0.4830467998981476,
0.5246263146400452,
0.005115222651511431,
-0.0954902172088623,
-0.10230492055416107,
0.1031505465507507... |
def rear _ seat _ heaters ( self ) - > int : return self. _ car. get ( " vehicle _ config ", { } ). get ( " rear _ seat _ heaters " ) | [
-0.2763550281524658,
-0.5915466547012329,
0.5412532091140747,
0.26757311820983887,
0.36049318313598633,
-0.3607940673828125,
-0.4305534362792969,
-0.04076032340526581,
-0.6103899478912354,
-0.21849972009658813,
-1.3473683595657349,
0.9369997382164001,
-0.7951943874359131,
-0.27027672529220... |
def check _ full _ solver ( finesse _ folder ) : data _ filename = join ( finesse _ folder,'finesse _ input. h5') data = io. h5 _ 2 _ dict ( data _ filename ) ix = data ['fit _ ix'] ['0'] r = data ['r'] [ ix ] sig = data ['sig'] [ ix ] error = data ['sig _ sd'] [ ix ] # n _ params = 8 n _ params = 7 # n _ params = 6 an... | [
0.17993004620075226,
-0.29972702264785767,
1.1471550464630127,
0.4733968675136566,
-0.03516998142004013,
-0.35555464029312134,
0.8944659233093262,
-0.07447216659784317,
-0.11917175352573395,
0.043611541390419006,
-0.4857533872127533,
-0.056315116584300995,
-0.08464166522026062,
0.683432817... |
def make _ periodic _ embedding ( x, hidden _ size : int ) : assert ( hidden _ size % 2 ) = = 0,'hidden _ size must be even.'w = torch. tensor ( [ 1e4 ], dtype = x. dtype, device = x. device ) exponent = torch. linspace ( 0, 1, hidden _ size / / 2, dtype = x. dtype, device = x. device ) w = w * * exponent sines = torch... | [
0.5366060733795166,
0.1338922381401062,
0.558207631111145,
0.3771224617958069,
-1.2622430324554443,
0.6007735133171082,
-0.10225343704223633,
0.0927344560623169,
0.7049787044525146,
-0.3591783046722412,
-0.1406611055135727,
0.03761713206768036,
0.20323330163955688,
-0.6396118402481079,
0... |
def test _ atomic _ any _ uri _ length _ 2 _ nistxml _ sv _ iv _ atomic _ any _ uri _ length _ 3 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / anyuri / schema + instance / nistschema - sv - iv - atomic - anyuri - length - 3. xsd ", instance = " nistdata / atomic / any... | [
-0.05627823993563652,
-0.08173882961273193,
0.48778095841407776,
1.0881423950195312,
-0.16497176885604858,
0.28389546275138855,
-0.4242887496948242,
0.25090301036834717,
0.19859598577022552,
0.39683690667152405,
0.17748306691646576,
-0.0929691344499588,
-0.0601857453584671,
-0.154917046427... |
def run ( self ) - > none : logger. debug ( " starting threaded asyncio loop... " ) asyncio. set _ event _ loop ( self. _ loop ) self. _ loop. run _ forever ( ) logger. debug ( " asyncio loop has been stopped. " ) | [
-0.4577035903930664,
-0.7573526501655579,
0.3689963221549988,
-0.07639466971158981,
1.3949170112609863,
0.29760509729385376,
0.28763267397880554,
0.2597094774246216,
-0.7107148170471191,
0.043772730976343155,
-0.35129594802856445,
0.9336414337158203,
0.060534872114658356,
-0.48603245615959... |
def simple _ dfs ( adjacency _ list, node _ key ) : assert ( node _ key in adjacency _ list ), " specified node key not in adjacency list " b = { } q = deque ( ) q. append ( node _ key ) num = 1 while q : current _ key = q. pop ( ) if current _ key not in b : b. update ( { current _ key : num } ) num + = 1 for i in adj... | [
-0.5684044361114502,
0.8542515635490417,
0.48858076333999634,
-0.08888962119817734,
-0.3478565216064453,
-0.8996126055717468,
0.27404212951660156,
0.18175232410430908,
-0.14424805343151093,
0.24048557877540588,
-0.4805728495121002,
-0.5578588843345642,
-0.43850183486938477,
0.4964254200458... |
def dbedituser ( user ) : err = [ ] syserr = [ ] try : dbaccessconnection. con. execute ( dbaccessconnection. userinfo. update ( dbaccessconnection. userinfo. c. userid = = user. userid ), emailaddress = user. emailaddress, password = user. password, name = user. name, location = user. location, dateofbirth = user. dat... | [
-0.48668190836906433,
-0.23331032693386078,
0.5275676250457764,
0.028559541329741478,
-0.14983554184436798,
0.4098722040653229,
0.9495143294334412,
-0.4361184239387512,
0.3029305934906006,
-0.271292120218277,
-0.6593325138092041,
-0.40051621198654175,
0.02906080149114132,
0.843839466571807... |
def replace ( pattern, replacement, path, recursive = false, regex = false, extension ='' ) : if regex : operation = lambda contents : re. sub ( pattern, replacement, contents ) else : operation = lambda contents : contents. replace ( pattern, replacement ) return update ( operation, path, recursive, false, extension ) | [
0.346194863319397,
-0.3391859531402588,
0.5110156536102295,
-0.012795216403901577,
-1.0666290521621704,
-0.6437754034996033,
-0.16080312430858612,
1.7254164218902588,
0.4756790101528168,
-0.35184594988822937,
0.22415772080421448,
-0.4420980215072632,
-0.43477845191955566,
-1.17731225490570... |
def _ _ there _ is _ a _ gap ( self, ir _ activations ) : already _ found _ activation = false for sensor in range ( 8 ) : if ir _ activations [ sensor ] = = 1 : if already _ found _ activation and sensor > 0 and ir _ activations [ sensor - 1 ] = = 0 : return true already _ found _ activation = true return false | [
-0.8500266075134277,
-0.3478964865207672,
0.531741201877594,
0.5720749497413635,
0.4543011486530304,
0.18258994817733765,
0.798589825630188,
0.6668394804000854,
0.8682379126548767,
0.06142313778400421,
0.6867799162864685,
-0.24034033715724945,
-0.8584359288215637,
1.0089894533157349,
-0.... |
def prepare _ params ( params : list [ _ param ] ) - > list [ _ param ] : res = [ ] for param in params : res. append ( dict ( parameterkey = param ['parameterkey'], usepreviousvalue = true ) ) return res | [
-0.8813284039497375,
0.22503599524497986,
0.4771512746810913,
0.1659432351589203,
0.6118124127388,
-0.704204261302948,
-0.29268571734428406,
0.32145971059799194,
-0.5198757648468018,
1.6136554479599,
-0.40526098012924194,
-0.2637219727039337,
0.5411397814750671,
1.572262167930603,
-1.065... |
def compare _ test _ scores _ plot ( df : dataframe ) : df. index = _ labels ['dataset _ sizes'] fig, axes = plt. subplots ( nrows = 1, ncols = 2, figsize = ( 12. 8, 4. 8 ) ) for i in range ( 2 ) : sns. lineplot ( data = df [ compare _ test _ scores _ columns [ i ] ], markers = ['o ','o'], ax = axes [ i ] ) axes [ i ].... | [
0.8002222180366516,
0.19698448479175568,
0.78025883436203,
-0.5792810320854187,
0.24796682596206665,
0.364012748003006,
1.3345494270324707,
-0.7665576934814453,
0.07721391320228577,
-0.19362324476242065,
-0.02169990725815296,
0.8994491696357727,
0.30984652042388916,
-0.29524511098861694,
... |
def number _ of _ lines ( filename = " " ) : with open ( filename ) as f : line = f. readlines ( ) return len ( line ) | [
0.46914196014404297,
-0.1315067708492279,
0.4606635868549347,
-0.13784024119377136,
0.38824695348739624,
0.644891083240509,
0.01960373856127262,
1.2175334692001343,
-0.6311886310577393,
-0.6708656549453735,
-0.5722742080688477,
-0.43616989254951477,
0.5550875067710876,
0.33834636211395264,... |
def mock _ tmpdir ( ) : with temporarydirectory ( ) as td : yield td | [
-0.5762069225311279,
-0.6331954598426819,
0.6378067135810852,
-0.7995131015777588,
-0.25583794713020325,
0.1273343861103058,
0.4753548204898834,
-0.45354166626930237,
0.42760878801345825,
-0.7828951478004456,
-0.08552511036396027,
-0.8578881025314331,
-0.10147447139024734,
0.63745963573455... |
def read _ partial _ map ( filenames, column, fullsky = true, * * kwargs ) : import fitsio # make sure that pixel is in columns # kwargs ['columns'] = ['pixel ', column ] kwargs ['columns'] = ['pixel'] + np. atleast _ 1d ( column ). tolist ( ) filenames = np. atleast _ 1d ( filenames ) header = fitsio. read _ header ( ... | [
-0.516408383846283,
-0.3012497127056122,
0.9745979905128479,
-0.16585008800029755,
-0.7866373658180237,
0.07898258417844772,
-0.18436768651008606,
-0.14264199137687683,
-0.3971980810165405,
0.03932281956076622,
-0.531566321849823,
-0.11094952374696732,
-0.11778382211923599,
0.6573513150215... |
def adddiagnosticlog ( self, typeid, deviceid, logs ) : devicediagnostics = apiclient. devicediaglogs % ( self. host, typeid, deviceid ) r = requests. post ( devicediagnostics, auth = self. credentials, data = json. dumps ( logs ), headers = {'content - type':'application / json'}, verify = self. verify ) status = r. s... | [
-0.9130600094795227,
0.09587442874908447,
0.9487708806991577,
0.22484886646270752,
-0.298148512840271,
0.6692798137664795,
-0.3139735758304596,
-0.32435038685798645,
-0.04849379509687424,
0.35004371404647827,
0.33594053983688354,
0.4620247483253479,
-0.6700451374053955,
0.15665332973003387... |
def checksymmetry ( csr ) : symyes = not ( csr! = csr. transpose ( ) ). max ( ) return symyes | [
-0.18197152018547058,
0.7412909269332886,
0.21083232760429382,
0.9244809746742249,
0.18763963878154755,
-0.2650910019874573,
0.0857275128364563,
-0.13508941233158112,
0.9692232608795166,
0.26527124643325806,
-0.05630927532911301,
-0.9265289306640625,
0.17837834358215332,
1.0368590354919434... |
def _ get _ schedules ( self ) : flag, response = self. _ commcell _ object. _ cvpysdk _ object. make _ request ('get ', self. _ schedules ) if flag : if response. json ( ) and'taskdetail'in response. json ( ) : subtask _ dict = { } for schedule in response. json ( ) ['taskdetail'] : task _ id = schedule ['task'] ['tas... | [
0.023691149428486824,
0.3512595295906067,
0.9159922003746033,
0.12987104058265686,
-0.8798153400421143,
-0.20150357484817505,
-0.6385608911514282,
-0.04358085244894028,
-0.32321733236312866,
0.39036646485328674,
-0.9503952264785767,
0.46404579281806946,
0.16667118668556213,
0.5228897333145... |
def getbysymbol ( symbol ) : s = symbol. strip ( ). upper ( ) return element. _ elements _ by _ symbol [ s ] | [
-0.6885122656822205,
0.07492887228727341,
0.01122418511658907,
-0.18226027488708496,
0.11187868565320969,
-0.9924885034561157,
0.9085783362388611,
-0.45941057801246643,
0.5284066796302795,
-0.5753744840621948,
-0.054117005318403244,
1.093183994293213,
0.2788371443748474,
0.0642158240079879... |
def _ bottomleftalien ( self ) : for i in self. _ aliens : if i is not none : for alien in i : if alien is not none : return alien | [
0.7613735198974609,
-1.2443718910217285,
0.7795163989067078,
-0.8096036314964294,
0.7103315591812134,
0.17949768900871277,
-0.648678183555603,
-0.5009973049163818,
-0.5784968137741089,
-0.08597027510404587,
0.3253810405731201,
0.568587064743042,
-1.282823920249939,
0.5147805213928223,
0.... |
def validatelogicalinterfaceconfiguration ( self, logicalinterfaceid ) : req = apiclient. onelogicalinterfaceurl % ( self. host, " / draft ", logicalinterfaceid ) body = { " operation " : " validate - configuration " } resp = requests. patch ( req, auth = self. credentials, headers = { " content - type " : " applicatio... | [
-0.8520617485046387,
-0.5249959230422974,
0.3819234371185303,
-1.0082423686981201,
-1.0478945970535278,
0.248772531747818,
0.011759012937545776,
-0.7533249258995056,
0.4671536684036255,
0.6634190082550049,
-0.7086809873580933,
-0.1470041275024414,
-1.5687083005905151,
0.9108111262321472,
... |
def getuniquevaluesforindex ( self, index ) : if not self. solr _ enabled or not has _ solr _ collection : pc = gettoolbyname ( self, " portal _ catalog " ) return pc. uniquevaluesfor ( index ) else : return solruniquevaluesfor ( index, portal _ type = " bando " ) | [
0.00011364115925971419,
0.31071895360946655,
0.41719862818717957,
-0.22885489463806152,
0.7224226593971252,
0.46577802300453186,
-0.11017429828643799,
-1.2761812210083008,
1.1263306140899658,
-0.4601898789405823,
-0.4073174297809601,
0.684675931930542,
0.058111656457185745,
-0.142232164740... |
def short _ name ( orig _ name ) : if len ( orig _ name ) < 41 : new _ name = orig _ name else : new _ name = orig _ name [ 0 : 32 ] + "... " + orig _ name [ - 5 : ] return new _ name | [
1.071779727935791,
-0.32923799753189087,
0.7922930717468262,
-0.4615854024887085,
-0.9811808466911316,
0.9796465635299683,
-0.05881708860397339,
-1.0348316431045532,
0.19793574512004852,
0.4590054452419281,
0.0029021850787103176,
0.6518465280532837,
0.28722846508026123,
-0.8105555176734924... |
def test _ example _ input _ one _ delete _ close _ entity ( self, ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper, add _ input _ one ) : input _ page = inputpage ( ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) self. assert _ util ( input _ page. table. delete _ row, true, left _ args ... | [
-0.07253769040107727,
0.7494768500328064,
0.6051196455955505,
0.7378625273704529,
0.512666642665863,
0.8911336064338684,
0.2336653769016266,
0.21044881641864777,
0.6904636025428772,
0.1909123808145523,
0.44389697909355164,
-0.5733383297920227,
-0.2899317443370819,
0.7910266518592834,
0.3... |
def push ( self, item ) : self. _ items. append ( item ) | [
-0.4907192587852478,
0.7157622575759888,
0.22463610768318176,
0.33801567554473877,
0.7640542984008789,
1.214210033416748,
-0.946135401725769,
-0.41638919711112976,
0.12287885695695877,
0.15380200743675232,
-1.066021203994751,
0.5816813707351685,
-0.07423175126314163,
-0.20603273808956146,
... |
def getx ( self ) : return self. proj. getx ( ) | [
-0.015636619180440903,
0.6015210747718811,
0.24479243159294128,
0.4723626375198364,
0.06052904948592186,
0.8226444721221924,
-0.7719599604606628,
0.36444592475891113,
-0.14217984676361084,
-0.7627227902412415,
0.277694970369339,
0.22946719825267792,
-0.6066527366638184,
-0.7460871338844299... |
def aver ( self, result : str ='all') - > pd. dataframe : now = time. time ( ) df = self. _ invoke _ sqobj ( self. sqobj. aver, namespace = self. namespace, hostname = self. hostname, columns = self. _ add _ result _ columns ( self. columns ), result = result, * * self. lvars, ) self. ctxt. exec _ time = " { : 5. 4f } ... | [
-0.32553714513778687,
0.5494951605796814,
0.42839786410331726,
0.38151296973228455,
-0.6715167164802551,
-0.49116823077201843,
0.731549084186554,
-0.5773860812187195,
-0.8900061845779419,
-0.5764317512512207,
0.2140742838382721,
0.7040840983390808,
-1.018929123878479,
-0.1435486227273941,
... |
def fitfornode ( datain, randomstate = none ) : # ensure our filter matches our data _ ls. if len ( datain ['interval _ filter'] )! = datain ['node _ data']. shape [ 0 ] : raise valueerror ('given bad time filter or start / stop times!') # filter data _ ls by time. d = datain ['node _ data']. loc [ datain ['interval _ ... | [
-0.6460754871368408,
0.1451873779296875,
0.4042935073375702,
-0.29157698154449463,
0.04346992447972298,
-0.47218120098114014,
0.19787687063217163,
0.2556256651878357,
-0.36932599544525146,
-0.25977587699890137,
0.5887441635131836,
1.0810415744781494,
0.6266664862632751,
0.01875016093254089... |
def _ readmarkdownsection ( self, fin, firstline ) : # a regular expression to match lines that start with an escaped'- '. escp _ re = re. compile ( r'^ \ \ + -') section _ ended = false sectionstr = firstline while not ( section _ ended ) : line = fin. readline ( ) if line = ='' : section _ ended = true elif line. sta... | [
0.3171708881855011,
-1.1927506923675537,
0.6287086009979248,
0.09920654445886612,
-0.4023173153400421,
-0.3719911575317383,
-0.4716399013996124,
-0.0037324957083910704,
-0.6450719833374023,
-0.12035772204399109,
1.2942925691604614,
0.03061443567276001,
0.678677499294281,
0.5281029939651489... |
def get ( name, filename ) : # logging. info ( " writing {! r } : {! r } to {! r } ". format ( name, filename ) ) logging. debug ( " openning file " ) with open ( filename ) as f : reader = csv. dictreader ( f, delimiter = ',') logging. debug ( " reading snippet from file " ) for line in reader : if name = = line ['csv... | [
-0.02728712558746338,
-0.8789226412773132,
0.8241895437240601,
0.06651698797941208,
-0.16058729588985443,
-0.35280048847198486,
-0.359880268573761,
0.6601449847221375,
-0.31524986028671265,
0.9023271799087524,
0.04517186060547829,
0.382369726896286,
-0.031603049486875534,
-0.66599583625793... |
def _ is _ light _ red _ us _ style ( self, lights _ list ) : # pylint : disable = too - many - branches ego _ vehicle _ location = self. _ vehicle _ location ego _ vehicle _ waypoint = self. get _ waypoint ( ego _ vehicle _ location ) if not ego _ vehicle _ waypoint : if not rospy. is _ shutdown ( ) : rospy. logwarn (... | [
-1.2283159494400024,
-0.3528270125389099,
0.6707502603530884,
-0.08167687058448792,
0.05074828490614891,
-0.601296067237854,
-0.14906030893325806,
-0.1917721927165985,
0.7701097726821899,
0.7592698931694031,
-0.18644580245018005,
-0.25534820556640625,
0.04671303182840347,
0.438559919595718... |
def _ generate _ async ( self, generator ) : first _ value _ future = self. _ workers. submit ( next, generator ) def get _ first _ element ( future = first _ value _ future ) : " " " get first element value from future. args : future ( concurrent. futures. _ base. future ) : first value future. returns : evaluated val... | [
-1.1246126890182495,
0.7553859353065491,
0.5234552621841431,
-0.22213377058506012,
0.13591521978378296,
-0.48927393555641174,
-0.49649831652641296,
0.1918029487133026,
-0.8531678915023804,
-0.657315731048584,
0.09317364543676376,
-0.12355366349220276,
-0.07533903419971466,
0.82279038429260... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.