text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def make _ spatial ( table _ name ) : " " " " delete from { } where longitude = 0 or latitude = 0 ", " " " commands = ( " delete from { } where longitude = 0 or latitude = 0 ", " alter table { } add column geom geometry ( point, 4326 ) ", " update { } set geom = st _ setsrid ( st _ makepoint ( longitude, latitude ), 43... | [
0.4709935784339905,
0.355287104845047,
0.8533981442451477,
0.19558361172676086,
-0.20891281962394714,
0.47419387102127075,
-0.07016521692276001,
0.29976972937583923,
-0.8506641387939453,
0.49453094601631165,
0.12535174190998077,
0.3862351179122925,
0.05954774096608162,
-0.3103596568107605,... |
def edit _ vorogenlist ( self, vorogenp, frac ) : xgen, ygen, snrgen = vorogenp flag = n. zeros ( len ( xgen ) ) coord = n. array ( [ xgen, ygen ] ). transpose ( ) tile _ list = [ ] tile _ coord = [ ] ; tile _ snr = [ ] for i in range ( len ( xgen ) ) : dist = n. array ( map ( lambda t : func. dist _ 2pt ( coord [ i ],... | [
-0.06470328569412231,
0.19845977425575256,
0.7904124855995178,
-0.24421904981136322,
-0.7200419306755066,
0.04484200105071068,
1.245021939277649,
0.4946037530899048,
0.07279239594936371,
0.4930975139141083,
-0.3769422471523285,
-0.5102145671844482,
-0.37975746393203735,
0.24834676086902618... |
def make _ eagle _ symbol _ for _ openjson _ body ( self, name, body ) : symbol = g. symbol ( name = name ) for shape in body. shapes : if shape. type = ='line': wire = g. wire ( x1 = self. make _ length ( shape. p1. x ), y1 = self. make _ length ( shape. p1. y ), x2 = self. make _ length ( shape. p2. x ), y2 = self. m... | [
-1.1609665155410767,
-0.4609162211418152,
0.7744081616401672,
-1.7886179685592651,
-0.23514969646930695,
0.4085598587989807,
-0.39831486344337463,
-0.897788941860199,
0.11773956567049026,
0.6889153718948364,
-0.848332405090332,
0.4821726083755493,
1.0123902559280396,
-0.02772214263677597,
... |
def test _ listdomain _ is _ in _ domain _ manual _ set ( ) : dom _ params = namespace ( ) domain _ list = [ 1. 0,'cat ', ( 5, 5 ) ] pts = ['cat ', ( 5. 0, 5. 0 ), 1,'1 ', ( 5, 6 ),'dog'] bool _ list = [ true, true, true, false, false, false ] listdom = listdomain ( params = dom _ params ) listdom. set _ domain _ list ... | [
-0.2839474678039551,
0.22596944868564606,
0.34577876329421997,
0.5487585067749023,
-0.04779510200023651,
0.2556854486465454,
-0.46737244725227356,
-0.11186722666025162,
0.02094876766204834,
-0.01853037066757679,
-1.2037713527679443,
1.4790042638778687,
0.11934943497180939,
0.80817246437072... |
def _ _ str _ _ ( self ) - > str : return'unknownnode ( { } ) '. format ( self. yaml _ node ) | [
-0.05251938849687576,
-1.4294527769088745,
0.46229657530784607,
-1.3386709690093994,
0.23680469393730164,
0.4302166700363159,
-0.3561650812625885,
0.7986000776290894,
-0.18262875080108643,
-0.012896997854113579,
0.702069878578186,
1.8000231981277466,
0.5562215447425842,
0.00406776135787367... |
def sanitise _ files _ expression ( self, files ) : # if there is nothing to do, leave if files is none : return # tokenise tokens = self. _ tokenise _ files _ expression ( files ) # reformat files files = " " for token in tokens : # if the annex description contains a white space, add around it'' if'' in token : token... | [
0.6301014423370361,
-0.646560549736023,
0.6454434990882874,
-1.054503321647644,
-0.1299688071012497,
-0.6500861048698425,
-0.41402989625930786,
0.6181060671806335,
-0.14870935678482056,
0.9491342902183533,
1.1607424020767212,
0.8002634048461914,
-0.5570241212844849,
0.42313218116760254,
... |
def selecton _ key _ manipulation ( self, options : str, payload : str ) : # # todo when we strip a single byte from a byte string, do we automatically # # get type conversion to an int? curious about this, seems odd if options [ 0 ] = = 1 : keymgmt _ wipe ( ) elif options [ 0 ] = = 2 : keymgmt _ select ( options [ 1 ]... | [
-1.0555204153060913,
-0.3865286111831665,
0.4379173815250397,
0.38557350635528564,
0.19645115733146667,
-0.8383142948150635,
-0.10869603604078293,
-0.6443215608596802,
0.291959285736084,
0.14654655754566193,
0.37418800592422485,
0.03575581684708595,
-1.1588819026947021,
-0.2669332921504974... |
def _ get _ poisson _ likelihood ( self, * * kwargs ) : # generate the expected number of electron counts given the current spectral # models expected _ electron _ counts = self. get _ expected _ electron _ counts ( self. electron _ fit _ function, self. time, * * kwargs ) * self. scale # and do the same for protone if... | [
-0.36631160974502563,
-0.568304717540741,
0.9144296646118164,
-0.7634304761886597,
0.22509369254112244,
-0.4276289939880371,
-0.5731679797172546,
0.616016685962677,
-0.5896618366241455,
0.08704649657011032,
-0.2802426218986511,
0.030667925253510475,
-0.35788169503211975,
-0.018919525668025... |
def get _ inner _ points ( self ) - > set [ point ] : wall _ points : dict [ tuple [ int, int ], point ] = self. coordinates _ dict ( self. wall _ points ) inner _ points : set [ point ] = set ( ) # get a start point for the algorithm start _ point = self. get _ start _ point ( ) # a set of all points seen already seen... | [
0.7774917483329773,
-0.01291657518595457,
0.7459503412246704,
-0.2871757745742798,
-0.01631740853190422,
-0.3719017803668976,
0.29968881607055664,
-0.1419638693332672,
-0.4664934575557709,
-0.1575569361448288,
-0.4826580882072449,
1.1990759372711182,
-0.6990070939064026,
-0.146234184503555... |
def get _ create _ instance _ func ( self, _ type : str ) - > callable [..., basenode ] : return self. _ get _ func ( _ type, self. _ create _ instance _ funcs ) | [
-1.336369276046753,
-0.1946994662284851,
0.49184149503707886,
-0.1907941699028015,
0.857071042060852,
-0.01620522513985634,
0.7768903374671936,
-0.89130699634552,
-0.6842662692070007,
0.37008556723594666,
-0.3963913321495056,
1.3162728548049927,
-0.006158960983157158,
-0.5742936134338379,
... |
def get _ movie _ data ( filename, args ) : if path. isfile ( json _ path. format ( filename ) ) : data = json _ to _ df ( filename ) else : data = get _ filtered _ wikidata ('wikidata - movies ', args. category, args. score, args. movies, args. influencers, args. year ) data = explode _ dataframe _ by _ column ( data,... | [
-1.379784107208252,
-0.27851003408432007,
0.6693534255027771,
0.3529500961303711,
0.43987324833869934,
0.0401679202914238,
-1.1611264944076538,
0.5142378211021423,
-1.0066174268722534,
0.4309055209159851,
0.12105663865804672,
1.1116507053375244,
0.03410978242754936,
0.28624847531318665,
... |
def execute _ log ( self, sql : str, * params ) - > int : cursor = self. _ _ conn. cursor ( ) cursor. execute ( sql, params ) n = 0 next _ set = true while next _ set : stamp = strftime ('% y - % m - % d % h : % m : % s ', gmtime ( ) ) for row in cursor : print ( stamp, end ='' ) for field in row : print ('% s'% field,... | [
-0.4917978346347809,
0.6607103943824768,
1.064357876777649,
0.23294462263584137,
-0.0292553398758173,
-0.43854963779449463,
-0.672123908996582,
-0.18953469395637512,
-0.9303789734840393,
0.23980498313903809,
-0.15749022364616394,
0.2585122287273407,
-0.08246123045682907,
0.4161608219146728... |
def auroc ( preds, labels ) : fpr, tpr, _ = roc _ curve ( labels, preds ) return auc ( fpr, tpr ) | [
0.5587112903594971,
-0.671805739402771,
0.3283863961696625,
-0.7248667478561401,
-0.037303391844034195,
-0.2770368754863739,
0.25512635707855225,
0.851688802242279,
-0.700198233127594,
0.28327837586402893,
1.469171404838562,
1.2600553035736084,
1.1434649229049683,
-1.5156707763671875,
0.... |
def _ _ init _ _ ( self, func, farg, invoke ) : self. func = func self. farg = farg self. invoke = invoke | [
0.412740021944046,
-0.02327212505042553,
0.44742411375045776,
-0.10292918235063553,
0.6213527321815491,
-0.5496487021446228,
-0.641334593296051,
0.92769455909729,
-1.0153262615203857,
-1.243725299835205,
0.4763496518135071,
1.265088677406311,
-0.42718735337257385,
0.5822945237159729,
0.8... |
def test _ replace _ snapshot _ deps ( self ) : pass | [
-0.7987714409828186,
0.5275534391403198,
0.16343460977077484,
0.043910298496484756,
-0.48663195967674255,
-0.01342010498046875,
1.2302387952804565,
0.8205968141555786,
1.496990442276001,
-1.206447720527649,
-1.8369346857070923,
-0.4911577105522156,
0.5311093926429749,
-0.016026370227336884... |
def delete ( self, rows : union [ namedtuple, iterable [ namedtuple ] ] ) - > none : self. tuples - = set ( rows ) | [
-0.9393402934074402,
1.1823991537094116,
0.322769433259964,
-0.049462657421827316,
0.2644832730293274,
0.31905436515808105,
0.2964151203632355,
0.4100625813007355,
0.6092138290405273,
0.18055185675621033,
-0.3667294681072235,
-0.45182791352272034,
-0.32963645458221436,
0.27748697996139526,... |
def handle _ scene _ msg ( self, msg ) : with self. lock : self. _ handle _ scene _ msg ( msg ) | [
-0.413798987865448,
0.034284088760614395,
0.23531389236450195,
-0.06964121758937836,
0.3351788818836212,
-0.34930557012557983,
0.48538723587989807,
-0.854088544845581,
0.14041897654533386,
-0.681542158126831,
-0.24235527217388153,
0.12303656339645386,
-1.1053720712661743,
0.490730792284011... |
def _ generate ( module ) : n = [ ] c = [ ] o = [ ] for name, obj in inspect. getmembers ( module ) : if not name [ 0 ] = = " _ " : if inspect. isclass ( obj ) : c. append ( obj ) n. append ( name ) o. append ( obj ) return n, o, c | [
-1.4383141994476318,
-0.03309134021401405,
0.6799681186676025,
-0.7767213582992554,
0.14005762338638306,
0.47160908579826355,
0.28205227851867676,
-0.7142590880393982,
-0.8364045023918152,
0.4974099099636078,
-1.7084197998046875,
-0.4015140235424042,
0.416717529296875,
1.0246299505233765,
... |
def clean ( self ) : cd = self. cleaned _ data if'senha'in cd and'senha _ verifica'in cd : if self. cleaned _ data ['senha']! = self. cleaned _ data ['senha _ verifica'] : self. _ errors ['senha'] = forms. util. errorlist ( [ " senhas incompativeis! " ] ) else : self. _ errors ['senha'] = forms. util. errorlist ( [ " c... | [
0.30102473497390747,
0.4629027247428894,
0.4335811734199524,
0.4762207865715027,
-0.18575909733772278,
0.4637836813926697,
0.23330141603946686,
0.3556942343711853,
-0.6649787425994873,
0.5463084578514099,
0.34840986132621765,
0.2545416057109833,
0.18485234677791595,
0.9819689393043518,
0... |
def log ( self ) : self. _ mlflow _ exp = mlflow. set _ experiment ( self. name ) mlflow. start _ run ( ) mlflow. log _ params ( {'sim _ n _ steps': self. sim. n _ steps,'pop _ total _ population _ example': self. reference _ env. sds _ env. total _ population, # can vary if not deterministic!'pop _ name': self. refere... | [
0.6009312272071838,
0.08923999220132828,
0.9132537245750427,
-0.16753609478473663,
-0.033071160316467285,
-0.011619494296610355,
0.36615025997161865,
-0.026819953694939613,
-0.05669110640883446,
-0.11834859102964401,
0.021985184401273727,
1.3975024223327637,
0.5745052099227905,
0.423361927... |
def malfunction ( self ) : if self. health > = 50 : self. body. angular _ velocity = 0 return false return true | [
-0.6038439273834229,
-0.4430995285511017,
0.3396991789340973,
0.28310325741767883,
0.10063599050045013,
0.934224009513855,
-0.5666674375534058,
-0.4926183521747589,
0.021016346290707588,
-0.3255298435688019,
0.44247108697891235,
0.3117853105068207,
-0.23382709920406342,
0.16553153097629547... |
def handle _ timeout ( sys _ args, cmd ) : err _ str = render _ email _ template ( " cronwrap detected a timeout on following command : ", sys _ args, cmd ) if sys _ args. emails : send _ email ( sys _ args, sys _ args. emails,'host % s : cronwrap detected a timeout!'% platform. node ( ). capitalize ( ), err _ str ) el... | [
0.6658198237419128,
-0.15348736941814423,
0.4771217107772827,
-0.16739965975284576,
0.030881522223353386,
0.32455047965049744,
-0.30332282185554504,
0.4919593632221222,
0.08952414244413376,
0.6213775277137756,
0.6140519976615906,
1.2563620805740356,
0.002468374790623784,
0.2213199138641357... |
def loglikelihood ( self, k ) : return self. m * gammaln ( k + 1 ) + k * self. c2 - sum ( gammaln ( k - self. y + 1 ) ) + self. c3 | [
0.34838399291038513,
-0.4919452369213104,
0.46167439222335815,
-0.6285271644592285,
-0.6514702439308167,
1.0673277378082275,
-0.5923060178756714,
-0.3976799249649048,
0.4343574047088623,
-0.09509769082069397,
-0.6763052940368652,
-0.513787567615509,
-0.41322872042655945,
-0.218277782201766... |
def set _ sleep _ time _ on _ iter _ none ( self, sleep _ time _ s : union [ int, float ] = 0. 001 ) : self. _ sleep _ time _ on _ iter _ none _ s = sleep _ time _ s | [
-0.22760586440563202,
-0.41780513525009155,
0.399555504322052,
0.4728505313396454,
-0.4510698616504669,
0.4195192754268646,
0.5423967242240906,
-0.8999356627464294,
-0.05429855361580849,
0.05390697717666626,
-0.3873049020767212,
0.26326674222946167,
-0.8524813055992126,
0.6461476683616638,... |
def test _ send ( self ) : events = [ ] fn = lambda obj : events. append ( obj ) message = domish. element ( ( none,'message') ) self. router. route = fn self. component. startservice ( ) self. component. send ( message ) self. assertequals ( [ message ], events ) | [
0.058311667293310165,
0.2630006968975067,
0.39627474546432495,
0.2980995178222656,
1.1090878248214722,
-0.35273417830467224,
0.1559465080499649,
0.03285885229706764,
0.05000993609428406,
-0.8215099573135376,
-0.5589770078659058,
0.328898161649704,
0.09168566018342972,
0.7446905970573425,
... |
def _ build _ block ( orientation, gradient, nbins, cell _ size, block _ size ) : histograms = _ build _ hist ( orientation, gradient, nbins, cell _ size ) nbr _ y, nbr _ x, _ = histograms. shape dim = reduce ( lambda x, y : x * y, block _ size ) hog _ matrix = np. zeros ( ( ( nbr _ y - 1 ) * ( nbr _ x - 1 ), dim * nbi... | [
-0.1484798789024353,
0.40607374906539917,
0.6746001839637756,
0.3614446520805359,
0.0404369980096817,
0.12657788395881653,
0.873815655708313,
-0.21149614453315735,
-0.7220990657806396,
0.3709910213947296,
-0.08431653678417206,
0.29723647236824036,
-0.39422017335891724,
-0.03594620525836944... |
def autocommit ( self, status : bool ) - > none : self. _ _ conn. autocommit ( status ) | [
0.12344273179769516,
-0.35904669761657715,
0.5497008562088013,
0.5494193434715271,
0.5333179831504822,
-0.14877870678901672,
0.2638789415359497,
1.5369960069656372,
-1.0495718717575073,
0.10237377882003784,
-0.1234816163778305,
0.20233361423015594,
-0.4882410168647766,
-0.05594835430383682... |
def plot ( self, timestep, show = true, save = false, savename ='file ', xlabel ='lateral ( mm ) ', ylabel ='axial ( mm ) ', title = none ) : import matplotlib. pyplot as plt fig, axes = plt. subplots ( ) axes. pcolormesh ( self. lat, self. axial, self. arfidata [ :, :, timestep ] ) axes. set _ aspect ('equal') axes. s... | [
0.3875241279602051,
0.25184184312820435,
0.5872081518173218,
-0.4333932101726532,
-0.1850600242614746,
0.4780629873275757,
0.06716370582580566,
0.36487072706222534,
-0.6288896799087524,
0.1364022195339203,
0.19170808792114258,
0.31805694103240967,
0.8862832188606262,
0.35964536666870117,
... |
def _ handle _ callback ( self, exit _ code ) : if exit _ code = = 0 : self. succeed ( ) else : self. fail ( exit _ code ) return exit _ code | [
-0.30848973989486694,
0.5041227340698242,
0.5610291361808777,
0.49718746542930603,
0.05362516641616821,
0.21274739503860474,
-0.14728300273418427,
0.5216629505157471,
0.3477194011211395,
-0.38473665714263916,
0.5847319960594177,
-1.145172357559204,
-0.10282866656780243,
0.6897096633911133,... |
def loc ( self ) : return self. _ loc | [
0.21843937039375305,
-1.4119890928268433,
0.29087889194488525,
-0.47685718536376953,
0.24463115632534027,
0.9035149812698364,
2.6280062198638916,
0.48329970240592957,
0.379390686750412,
-1.2077113389968872,
0.6810368895530701,
0.774911642074585,
0.9142723083496094,
-0.9422053098678589,
-... |
def parse _ bds ( self ) : # # open file and apply first treatment # the original bds file is on one line # the first substitution is to locate end of line # _ reg exp is locating the following sequence : # a4xleacdt. 1 021186 154046 # var _ name some _ number some _ number # it replaces this sequence in line1 variable... | [
-0.415697306394577,
-0.5032757520675659,
0.8454414010047913,
-0.127560555934906,
0.41530928015708923,
0.2590348720550537,
0.6138925552368164,
0.36204367876052856,
0.3179577887058258,
0.6417620182037354,
0.018385982140898705,
0.2925945818424225,
-0.13495907187461853,
0.8137035965919495,
0... |
def debug _ message ( * args, * * kwargs ) : level = kwargs. get ('level ', 0 ) mode = debug _ mode ( raw = true ) if mode! = 0 and len ( args ) > 0 : stream = sys. stdout if mode < 0 : stream = logfiles. file ( name = " main " ) text = [ ] stamp = " asterstudy : " if getattr ( debug _ message,'timestamp ', true ) : st... | [
-0.5078332424163818,
-0.055466800928115845,
0.9310518503189087,
-0.3772687315940857,
-0.00829403568059206,
0.1489919126033783,
-0.3680848181247711,
-0.6100348234176636,
-0.5702744722366333,
-0.0875847190618515,
0.5852213501930237,
0.36143386363983154,
-0.2854233980178833,
0.712378919124603... |
def getphonecom ( self ) : self. print _ message ( " get phone com port " ) try : # initial phone self. phone = qcom _ phone ( ) self. phone. initial _ qmsl ( buseqpst ) phonelist = self. phone. get _ phone _ port _ list ( ) if ( len ( phonelist )! = 0 ) : self. comboboxcom. additem ( " disconnect " ) for i in phonelis... | [
0.03724773973226547,
-0.48629796504974365,
0.6115254759788513,
0.4839721918106079,
0.40878477692604065,
0.25231707096099854,
0.48787203431129456,
-0.11858366429805756,
0.5803399682044983,
-0.3166615068912506,
-0.4868054687976837,
-1.1025712490081787,
-0.8230412602424622,
0.5135224461555481... |
def gen _ data _ y ( self, y ='a ', n = 10000 ) : data _ gen = st. multivariate _ normal ( self. mean [ y ], self. cov [ y ] ) data = data _ gen. rvs ( n ) y _ train = linear _ regression ( self. coefs [ y ], data ) return data, y _ train | [
-0.8670276403427124,
0.1315113604068756,
0.5747509002685547,
-0.18105320632457733,
-0.05741686001420021,
-0.21319396793842316,
-0.40955850481987,
0.20057204365730286,
-0.04017999395728111,
-0.47760656476020813,
-0.9581052660942078,
0.7121851444244385,
0.5307580828666687,
0.1846319586038589... |
def _ update _ pending _ client ( self, remote _ gateway, concert _ client ) : # it disappeared if remote _ gateway is none : self. _ transition ( concert _ client, state. gone ) ( self. _ local _ gateway ) return true # check for locally flipped handles platform _ info _ msg = concert _ client. platform _ info _ proxy... | [
-0.18752127885818481,
-0.8980875611305237,
0.6236079335212708,
-0.6169322729110718,
-0.4555659294128418,
1.051789402961731,
0.1761995255947113,
0.34894171357154846,
-0.47777703404426575,
0.9155117273330688,
-0.2750801146030426,
0.15160802006721497,
-1.1161240339279175,
0.9227910041809082,
... |
def test _ add _ available _ languages ( self, mock _ sync ) : org = factories. org ( available _ languages = ['en ','es'], language ='en ', ) self. data ['available _ languages'] = ['en ','es ','fr'] form = self. form _ class ( data = self. data, instance = org ) self. asserttrue ( form. is _ valid ( ), form. errors )... | [
-0.032476816326379776,
0.7138151526451111,
0.566853404045105,
-0.4879922866821289,
0.5606918334960938,
0.939152181148529,
-0.5608168840408325,
0.7938897609710693,
-0.3059362769126892,
0.057915832847356796,
-1.2196885347366333,
-0.7377825975418091,
0.25214359164237976,
-0.12603934109210968,... |
def _ update _ volume _ stats ( self, refresh = false ) : data = { } pools = self. _ get _ pools ( ) data ['volume _ backend _ name'] = ( self. configuration. safe _ get ('volume _ backend _ name') ) location _ info ='% ( driver ) s : % ( host ) s : % ( volume ) s'% {'driver': self. _ _ class _ _. _ _ name _ _,'host': ... | [
-0.8143731951713562,
-0.2687280476093292,
0.6767321825027466,
-0.8997122645378113,
-0.06396594643592834,
-0.30648767948150635,
-0.6284114122390747,
-1.1671217679977417,
-0.4105638861656189,
0.12154046446084976,
-0.3619075417518616,
0.06879416108131409,
-0.33155906200408936,
0.1242771297693... |
def legend _ is _ displayed ( self, leg ) : if isinstance ( leg, str ) : leg = self. _ legends. get ( leg, none ) if leg : return " c3 - legend - item - hidden " not in self. browser. classes ( leg ) else : return false | [
0.010962426662445068,
0.10253562033176422,
0.41817229986190796,
-0.2326337844133377,
-0.5730552077293396,
0.9312251806259155,
-0.4339422881603241,
0.09897822886705399,
0.5516197681427002,
0.5323832035064697,
-0.34280675649642944,
-0.01293608546257019,
-0.19323879480361938,
0.42113366723060... |
def _ _ init _ farm _ job ( self, output, ass _ file _ path, session _ id ) : output. job _ ids = list ( ) distribute = output. ui. distribute x _ res, y _ res, x _ reg, y _ reg, r _ reg, t _ reg = self. _ _ get _ resolution ( output ) if self. _ _ region _ changed ( ) : x _ res = r _ reg - x _ reg y _ res = t _ reg - ... | [
0.3724361062049866,
-0.4868805408477783,
0.7483299970626831,
0.15187586843967438,
-0.116856649518013,
-0.3187194764614105,
1.31273353099823,
-0.239598348736763,
-0.29784896969795227,
-0.2867310643196106,
-0.3644461929798126,
-0.04889286309480667,
0.17682524025440216,
0.2926411032676697,
... |
def linear _ gmm _ shap ( self, x, monte _ carlo = false, n = 50000 ) : m = len ( x ) va _ id = list ( range ( m ) ) if self. c [ 0 ]! = [ ] : for c in self. c : m - = len ( c ) va _ id = list ( set ( va _ id ) - set ( c ) ) m + = len ( self. c ) for c in self. c : va _ id + = [ c ] phi = np. zeros ( len ( x ) ) for p ... | [
0.48994362354278564,
0.5387439727783203,
0.728532612323761,
0.268253892660141,
-0.6403877139091492,
0.38850870728492737,
-0.29036518931388855,
0.6923558115959167,
0.85014408826828,
0.6938880085945129,
-0.38537338376045227,
-0.05270354077219963,
-0.7798689603805542,
0.6671780943870544,
-0... |
def match _ source ( self, semantic _ type, sources ) : if len ( self. vocabulary [ semantic _ type ] ) > 2 : required _ sources1 = self. vocabulary [ semantic _ type ] [ 1 ] required _ sources2 = self. vocabulary [ semantic _ type ] [ 2 ] matched _ sources1 = [ source for source in sources if source in required _ sour... | [
-0.7253705263137817,
-0.5973522067070007,
0.7591318488121033,
-0.3064614236354828,
-0.2809548079967499,
-0.5300028920173645,
-0.5781880617141724,
0.37463903427124023,
0.483511358499527,
0.2794080972671509,
-0.1994013488292694,
-0.056388743221759796,
-0.8214641809463501,
0.7058162689208984,... |
def test _ api _ video _ initiate _ upload _ by _ organization _ admin ( self ) : user = factories. userfactory ( ) organization = factories. organizationfactory ( ) factories. organizationaccessfactory ( role = models. administrator, organization = organization, user = user ) playlist = factories. playlistfactory ( or... | [
0.2960067093372345,
0.0695512592792511,
0.7943854331970215,
0.054855674505233765,
0.6800060868263245,
0.3521716594696045,
-0.07690361142158508,
-0.28807976841926575,
0.4338580071926117,
0.16766102612018585,
-1.1207938194274902,
1.234033226966858,
0.045444928109645844,
0.08721856772899628,
... |
def linearize ( f : applyfn, params : pytree ) - > applyfn : def f _ lin ( p, * args, * * kwargs ) : dparams = _ sub ( p, params ) f _ params _ x, proj = jvp ( lambda param : f ( param, * args, * * kwargs ), ( params, ), ( dparams, ) ) return _ add ( f _ params _ x, proj ) return f _ lin | [
0.5127483010292053,
0.482358455657959,
0.5962091088294983,
-0.35891297459602356,
-0.3351840674877167,
-0.1339610368013382,
-0.8634399771690369,
0.5338994860649109,
-0.3246731460094452,
0.09562576562166214,
0.008635847829282284,
0.06732571870088577,
0.15863053500652313,
-0.14890460669994354... |
def plot _ r _ elements ( dataframe, xaxis _ column, color _ column, filename, x _ units ='', color _ units ='arcseconds') : fig, axs = plt. subplots ( 2, 2, figsize = ( 8, 8 ) ) # fixing plotting scales diagmax = np. max ( [ np. max ( dataframe ['r _ 11'] ), np. max ( dataframe ['r _ 22'] ) ] ) # print ( diagmax ) dia... | [
-0.11538143455982208,
-0.0209296103566885,
0.9746687412261963,
0.12075315415859222,
-0.1679299771785736,
0.05063357576727867,
0.21227745711803436,
0.19209587574005127,
-0.06634034216403961,
0.8121907711029053,
0.014222292229533195,
1.0316699743270874,
0.383796364068985,
-0.3832636773586273... |
def report ( list, vlan ) : print " * * * * * * * * * * * * * * * " print _ paper = [ ] for ip in list : ipaddress = ip ['ipaddress'] print ipaddress dict = {'_ id': ipaddress,'exists': 1,'empty': 1,'service': " ",'vlan': vlan } add _ ip _ db ( dict ) print _ paper. append ( ipaddress ) file = raw _ input ( " specify o... | [
-0.09233588725328445,
0.2779289782047272,
0.592664361000061,
0.14686712622642517,
0.07745575159788132,
0.4280814528465271,
0.06758076697587967,
0.8476645350456238,
-0.33877891302108765,
0.3553512394428253,
-0.441419392824173,
-0.6797888278961182,
-0.4567539095878601,
0.594118058681488,
-... |
def unbuild ( cls ) : for scene in cls. scene : scene. unbuild ( ) | [
-0.03197037801146507,
-1.8261350393295288,
0.497114360332489,
0.17594245076179504,
0.7120594382286072,
0.5393649935722351,
1.3271645307540894,
0.32839828729629517,
-0.22745180130004883,
-0.6513277292251587,
-0.8209765553474426,
0.5790824890136719,
-0.5449487566947937,
0.9071902632713318,
... |
def run ( ) : main ( sys. argv [ 1 : ] ) | [
-0.5370553135871887,
-0.17995640635490417,
0.36356469988822937,
0.8560469150543213,
0.9136409759521484,
0.8878728151321411,
0.8580105900764465,
0.2347079962491989,
-0.8879703879356384,
-0.2665306031703949,
-0.6504384279251099,
1.2243067026138306,
-0.5514675974845886,
0.02204442210495472,
... |
def create _ databases ( self, db _ names ) : for db _ name in db _ names : sql = " create database if not exists { } ". format ( db _ name ) self. exe _ sql ( sql ) | [
0.2568938136100769,
0.6338558793067932,
0.3618949353694916,
1.1542116403579712,
1.2534681558609009,
0.916670024394989,
-0.10020032525062561,
-0.23596346378326416,
-0.2913512885570526,
0.3399294316768646,
-0.48461031913757324,
-0.6811037063598633,
-0.4441109597682953,
1.1590633392333984,
... |
def test _ grpc _ 03 _ server _ stream ( self ) : for key in self. exp _ friends : pe = personemail ( ) pe. email = key friends = [ ] for friend in self. grpc _ stub. listfriends ( pe ) : friends. append ( friend. email ) assert ( all ( f in self. exp _ friends [ key ] for f in friends ) ) assert ( all ( f in friends f... | [
-0.4390278160572052,
-0.14957833290100098,
0.45492976903915405,
-0.04979012534022331,
0.6743025183677673,
0.6864017844200134,
-0.014572081156075,
-0.3055746257305145,
-0.3814714848995209,
-0.02301974780857563,
0.06599292159080505,
0.662532389163971,
-1.2395952939987183,
0.1283130794763565,... |
def make _ plot ( counts ) : positives = [ ] negatives = [ ] for i in counts : for j in i : if j [ 0 ] = = " positive " : positives. append ( j [ 1 ] ) else : negatives. append ( j [ 1 ] ) x _ ticks = range ( 0, 12 ) linep = plt. plot ( positives ) plt. setp ( linep, color ='b ', marker ='o ', label = " positive " ) li... | [
1.0173118114471436,
0.5365056395530701,
0.5326792001724243,
-0.5800473093986511,
-0.3496449887752533,
0.9381402730941772,
-0.4865458309650421,
0.011354845948517323,
-0.7684563994407654,
0.0025813512038439512,
0.6622423529624939,
0.4793297350406647,
0.46840596199035645,
0.9125733971595764,
... |
def loadrepeats ( infile, outfile ) : # scrum note - why are we access ing ucsc here # is this a legacy thing? andreas? would it be better to access biomart? load _ statement = p. build _ load _ statement ( tablename = " repeats ", options = " - - add - index = class " " - - header - names = contig, start, stop, class ... | [
-0.26035812497138977,
0.6490508913993835,
0.5772658586502075,
0.3701883852481842,
-0.18702855706214905,
-0.14012613892555237,
0.5729413628578186,
-0.5878614783287048,
-0.7536067366600037,
0.037406954914331436,
-0.37486356496810913,
0.3383138179779053,
0.08759795129299164,
-0.18488493561744... |
def randomize ( jet ) : jet = copy. deepcopy ( jet ) leaves = np. where ( jet [ " tree " ] [ :, 0 ] = = - 1 ) [ 0 ] nodes = [ n for n in leaves ] content = [ jet [ " content " ] [ n ] for n in nodes ] nodes = range ( len ( nodes ) ) tree = [ [ - 1, - 1 ] for n in nodes ] pool = [ n for n in nodes ] next _ id = len ( no... | [
-0.7090503573417664,
-0.2756466269493103,
0.7543493509292603,
-1.2501194477081299,
-0.44105014204978943,
0.27786388993263245,
0.44203752279281616,
-0.87528395652771,
0.21674738824367523,
0.46989038586616516,
-0.32429975271224976,
-0.17481504380702972,
-0.626201331615448,
0.8228307962417603... |
def getboi ( ) : reviews = getreviews ( ) boi _ reviews = [ ] for review in reviews : food _ item _ list = review ['food _ item'] hindi _ review = review ['hindi'] [ 0 ] # food _ items = dict ( ( food _ item, 1 ) for food _ item in food _ item _ list ) food _ items = createfooddict ( food _ item _ list ) review _ words... | [
-0.5265087485313416,
-0.1764618158340454,
0.8541774153709412,
-0.32919183373451233,
0.7277194857597351,
-0.3052407503128052,
-0.7099147439002991,
0.8295714855194092,
-0.9468275308609009,
1.0148602724075317,
-0.527382493019104,
0.45931851863861084,
-0.6385239362716675,
0.09488550573587418,
... |
def test _ api _ video _ initiate _ upload _ by _ organization _ instructor ( self ) : user = factories. userfactory ( ) organization = factories. organizationfactory ( ) factories. organizationaccessfactory ( role = models. instructor, organization = organization, user = user ) playlist = factories. playlistfactory ( ... | [
-0.11425633728504181,
0.36732301115989685,
0.721013605594635,
0.5336678624153137,
0.5793166756629944,
0.5005221366882324,
0.5558913350105286,
-0.06727627664804459,
0.20009273290634155,
0.3341435492038727,
-0.7258779406547546,
0.9305917024612427,
-0.05633625015616417,
-0.21768727898597717,
... |
def setseriesformat ( self, * args ) : return _ itkimageserieswriterpython. itkimageserieswriteriul3iul2 _ setseriesformat ( self, * args ) | [
-0.7937152981758118,
0.199075847864151,
0.3216571509838104,
-0.053633831441402435,
-0.6421589255332947,
0.1358182281255722,
-0.47205474972724915,
-0.010470514185726643,
0.3116374611854553,
-0.21242626011371613,
-0.5901501774787903,
1.2199174165725708,
-0.08269049972295761,
-0.3333694040775... |
def test _ bad _ request ( self, test _ client ) : response = test _ client. post ( " / quote " ) assert response. status _ code = = 405 assert response. status = = " 405 method not allowed " | [
-0.25149357318878174,
-0.052128151059150696,
0.6182040572166443,
0.4055301249027252,
1.1117907762527466,
0.922217607498169,
0.10491456836462021,
-0.956565797328949,
-0.5360302329063416,
-0.4006352424621582,
-0.22221453487873077,
0.3825455904006958,
-0.4331904351711273,
0.5058544278144836,
... |
def fix _ rtetrp _ qry ( table _ name, service ) : " " " this method is used select the records to update tripd numbers " " " conn = none try : params = config ( ) conn = psycopg2. connect ( * * params ) cur = conn. cursor ( ) cur. execute ( sql. sql ( " select time, vel _ comp, route _ name, rte _ strt, rte _ end, tri... | [
0.21847578883171082,
-0.5628928542137146,
0.7909701466560364,
-0.4738306403160095,
-0.36227741837501526,
-0.40644001960754395,
-0.5043515563011169,
0.06080405414104462,
-0.1526419073343277,
0.8442721366882324,
0.6451651453971863,
0.06344389170408249,
-0.8251739144325256,
0.5288876295089722... |
def all _ are _ pairs _ of _ types ( argument, first _ type, second _ type ) : try : return all ( ( len ( _ ) = = 2 and isinstance ( _ [ 0 ], first _ type ) and isinstance ( _ [ 1 ], second _ type ) ) for _ in argument ) except ( keyerror, typeerror ) : return false | [
-1.0105607509613037,
-0.6834760308265686,
0.7580571174621582,
0.8944703340530396,
0.21578527987003326,
0.5222991704940796,
0.26352694630622864,
-0.6175798177719116,
-0.7624406218528748,
0.23245534300804138,
-0.49335581064224243,
0.4853844940662384,
-0.7081831693649292,
1.4115331172943115,
... |
def _ _ init _ _ ( self, name, weight ) : self. name = name self. weight = weight | [
0.8570929765701294,
-1.136159062385559,
0.6822689175605774,
-0.002912917174398899,
-0.8185023665428162,
0.27196717262268066,
-1.3103736639022827,
0.13708019256591797,
-0.6880468726158142,
0.6546387672424316,
-0.6294753551483154,
0.14134618639945984,
0.07874394953250885,
0.7080652713775635,... |
def edit _ subject _ by _ id ( self, subject _ id, unit _ name ) : self. curr. execute ( " " " update subjects set unit ='{ }'where subject _ id = { } returning unit " " ". format ( subject _ id, unit _ name ) ) response = self. curr. fetchone ( ) self. conn. commit ( ) self. curr. close ( ) return response | [
-0.6264860033988953,
-1.147208333015442,
0.4062623679637909,
-0.9399301409721375,
-0.1056734248995781,
-0.2191556692123413,
0.04423616826534271,
-0.5674654245376587,
-0.2702047526836395,
0.6318729519844055,
0.12271520495414734,
0.8637616634368896,
-0.6904168128967285,
-0.6910470724105835,
... |
def forward ( self, encoder _ inputs : torch. tensor, encoder _ seq _ length : torch. tensor, decoder _ inputs : torch. tensor, decoder _ seq _ length : torch. tensor ) - > torch. tensor : decoder _ inputs = decoder _ inputs. transpose ( 0, 1 ) # [ max _ seq _ len _ dec, batch _ size ] batch _ size = decoder _ inputs. ... | [
-0.29634422063827515,
-0.015703685581684113,
0.5394764542579651,
0.05657925456762314,
-0.33017975091934204,
-0.11699382215738297,
0.28268951177597046,
0.1868998259305954,
-0.1498786211013794,
-0.35246995091438293,
-0.17700526118278503,
0.0374864861369133,
0.5817267298698425,
0.385693579912... |
def from _ ccd ( cls, quadrant _ letter, parallel _ size = 2068, serial _ size = 2072, serial _ prescan _ size = 24, parallel _ overscan _ size = 20, ) : if quadrant _ letter = = " b " or quadrant _ letter = = " c " : return cls. left ( parallel _ size = parallel _ size, serial _ size = serial _ size, serial _ prescan ... | [
0.9572804570198059,
-0.20584282279014587,
0.5280171036720276,
-0.5439221262931824,
-0.5721531510353088,
-0.6543691158294678,
-0.10587141662836075,
-0.9096065163612366,
1.3374526500701904,
-0.9834579229354858,
-0.3410831689834595,
0.5389143228530884,
0.29961615800857544,
-0.0260046403855085... |
def _ _ contains _ _ ( self, element ) : return true if self [ element ] else false | [
-0.2546394169330597,
-0.08121128380298615,
0.41532933712005615,
0.13726824522018433,
-0.5106582641601562,
0.8322058320045471,
-0.7086549401283264,
0.07294879108667374,
0.22324591875076294,
-0.7696912884712219,
-0.614163875579834,
0.22994036972522736,
-0.531059205532074,
0.19844739139080048... |
def text ( self ) : return self. title | [
-0.15283358097076416,
-1.2556787729263306,
0.4942948818206787,
-0.2822006940841675,
-0.9532123804092407,
0.49789199233055115,
-0.9011654853820801,
-0.3549742102622986,
0.5924926400184631,
0.09123070538043976,
-0.02932141348719597,
0.03591276332736015,
-0.6494870781898499,
-1.02071630954742... |
def _ _ setitem _ _ ( self, index, value : countattribute ) : if not isinstance ( value, countattribute ) : raise typeerror ('item to set is not a countattribute') self. _ item _ dict [ index ] = value try : setattr ( self, index, value ) except : print ( f'warning - could not set dynamic property'f'for question : { in... | [
-0.2971941828727722,
-0.27855464816093445,
0.44841504096984863,
0.15352824330329895,
-0.38176587224006653,
0.6981161832809448,
0.5277862548828125,
-0.8051085472106934,
-0.41351667046546936,
-0.004062909632921219,
0.2310924232006073,
-0.40747666358947754,
0.44570520520210266,
-0.66976141929... |
def dim ( self ) : return notimplementederror ( " return dimension of feature generated " ) | [
-0.2746857702732086,
-0.02713739685714245,
0.5141016244888306,
1.163190484046936,
0.11344345659017563,
1.1894092559814453,
1.4743441343307495,
0.907594621181488,
-0.43550795316696167,
-1.399739146232605,
-1.042715311050415,
-0.11426965147256851,
0.24586723744869232,
0.1218191459774971,
-... |
def sparql _ wrapper ( module : str, use _ new _ client : bool = false, log _ traceback : bool = false ) - > none : wrapper = sparqldockerwrapper ( ) wrapper. wrap _ algorithm ( module, use _ new _ client, log _ traceback ) | [
0.5656756162643433,
0.1126680076122284,
0.40503767132759094,
0.1305919587612152,
-0.6886378526687622,
0.5185939073562622,
-0.22282181680202484,
-0.016467150300741196,
0.4108673334121704,
0.846613347530365,
0.1473015993833542,
1.0142308473587036,
-0.5268451571464539,
0.1805620789527893,
0... |
def setsavepoints ( self, savedpoints, boundsforpoints ) : for sp in savedpoints : self. _ storepoint ( sp ['discrete'], sp ['world'], sp ['value'], sp ['name'], sp ['locktosurface'], boundsforpoints ) | [
-0.7503686547279358,
-0.37826481461524963,
0.19144687056541443,
0.6673588752746582,
0.5901519656181335,
1.1935101747512817,
0.07802735269069672,
0.272616446018219,
0.4731752574443817,
0.29733866453170776,
-1.0705935955047607,
-0.2923312485218048,
0.1869315207004547,
0.021516095846891403,
... |
def _ _ init _ _ ( self, features = none, num _ features = none, is _ raw = false, is _ engineered = false, * * kwargs ) : super ( featureimportanceexplanation, self ). _ _ init _ _ ( * * kwargs ) self. _ logger. debug ('initializing featureimportanceexplanation') self. _ features = features self. _ num _ features = nu... | [
0.00902332179248333,
1.332336187362671,
0.46494096517562866,
0.5727016925811768,
0.14091244339942932,
-0.3865746259689331,
0.3192293643951416,
1.48200523853302,
0.4531301259994507,
0.32708999514579773,
-0.8170595169067383,
0.012309898622334003,
0.2185855507850647,
0.244781956076622,
0.41... |
def contains _ whitespace ( x ) : return ( sum ( [ " " in i for i in x if isinstance ( i, str ) ] ) ) | [
0.15116269886493683,
0.23056849837303162,
0.4312411844730377,
-0.32036128640174866,
-0.11431092023849487,
-0.23278413712978363,
-0.5065077543258667,
-0.287528932094574,
0.6642800569534302,
-0.16943882405757904,
-0.9474219083786011,
0.5834338665008545,
-0.224491685628891,
0.7046700716018677... |
def select ( self, text = none, * * kwargs ) : if text : # select an item based on the text of that item if isinstance ( text, partial _ match ) : text = text. item link = self. browser. element ( self. partial _ text. format ( txt = quote ( text ) ), parent = self ) self. logger. info ( " selecting by partial matching... | [
-0.043726179748773575,
-0.19812311232089996,
0.4386395215988159,
0.2677462100982666,
-0.5455763339996338,
-0.08303344994783401,
0.02106289565563202,
0.2779292166233063,
0.42517364025115967,
-0.9363903999328613,
0.17420394718647003,
-0.07747381180524826,
-0.738724946975708,
-0.1935279071331... |
def _ _ init _ _ ( self, src _ dir, build _ dir, common _ construct _ vars, bt _ cv _ pairs ) : self. src _ dir = src _ dir self. build _ dir = build _ dir self. static _ lib _ dirs, self. app _ main _ srcs = fs. dirs _ c _ cpp _ sources ( src _ dir ) self. common _ env = environment ( * * common _ construct _ vars ) s... | [
-0.6395013332366943,
-0.5855661630630493,
0.6015971899032593,
0.3597959578037262,
0.1352057307958603,
0.8058019280433655,
0.7482280135154724,
0.2922223210334778,
-0.3221266567707062,
0.18606406450271606,
0.14984560012817383,
-0.26641514897346497,
0.3120046555995941,
0.7622431516647339,
0... |
def _ is _ rung _ pending ( self, rung ) : if self. sh _ bracket [ self. budgets [ rung ] ] > 0 : return true return false | [
-1.4256324768066406,
-0.0951496958732605,
0.44969043135643005,
-0.24726586043834686,
-0.23502375185489655,
-0.07439428567886353,
-0.7905486822128296,
0.047403015196323395,
0.2246689349412918,
-0.348198801279068,
-0.196636363863945,
0.5343503952026367,
-0.594429612159729,
1.5233774185180664... |
def test _ pass _ args _ correctly _ multi _ db ( self, mock _ download _ bundle _ file, mock _ download _ history _ file, mock _ download _ market _ data _ file, mock _ get _ bundle _ config, mock _ get _ history _ db _ config, mock _ get _ realtime _ db _ config, mock _ list _ bundles, mock _ list _ history _ databas... | [
-0.20281760394573212,
0.7953879833221436,
0.9458590745925903,
0.5397531986236572,
1.0493985414505005,
0.3742852210998535,
0.9959246516227722,
-0.12985485792160034,
-0.6782704591751099,
0.23134100437164307,
0.025830505415797234,
-0.34470024704933167,
-0.09043226391077042,
0.7228406071662903... |
def test _ _ array _ delete ( self ) : arr = array ( 10 ) arr [ 0 ] = 10 arr [ 1 ] = 20 arr [ 2 ] = 30 arr [ 3 ] = 40 # print ( arr ) delete ( arr, 20 ) # print ( arr ) res = arr [ 1 ] # print ( res ) self. assertequal ( res, 30 ) | [
0.21788522601127625,
-0.7897829413414001,
0.6046118140220642,
-0.25160855054855347,
0.32119494676589966,
0.4088481068611145,
0.4984404444694519,
0.32988613843917847,
1.0559601783752441,
0.33311355113983154,
-0.3137289881706238,
0.531597375869751,
-0.8033708930015564,
0.2587779760360718,
... |
def jy2mag ( wavelengths, flux, filt ='' ) : from scipy. interpolate import interp1d from numpy import log10, array, ones wavelengths = array ( wavelengths ) flux = array ( flux ) # ; values for a 0 mag star. note that i've doctored the b filter a # ; little for cubic spline interpolation, maitaining the mean flux # ; ... | [
-0.7520085573196411,
-0.717434287071228,
0.9820729494094849,
-0.9768725633621216,
-0.7228304743766785,
-0.7757768034934998,
0.18670104444026947,
-0.06674221903085709,
0.38189697265625,
0.4057912528514862,
-0.33696261048316956,
0.8311165571212769,
0.29252809286117554,
1.197051763534546,
0... |
def archive _ path ( dest, src, excludes = none, verbose = false ) : assert dest and dest. endswith ( '. tar') and not os. path. isdir ( dest ) and \ os. path. isdir ( os. path. dirname ( dest ) ) assert src and os. path. exists ( src ) cmd = ['tar'] cmd. append ('- - create') if verbose : print'\ narchive _ path ( % s... | [
0.09353217482566833,
0.5013257265090942,
0.832891047000885,
-0.3024608790874481,
-0.3879697024822235,
0.7544054985046387,
0.011439823545515537,
-0.012700807303190231,
-0.5438644289970398,
0.1013382226228714,
0.4928802251815796,
0.7153753042221069,
0.5770326256752014,
-0.2058933824300766,
... |
def _ _ init _ _ ( self, modifier : str, color : str ) - > none : self. modifier = modifier self. color = color _ colors [ ( modifier, color ) ] = self | [
-0.6676291823387146,
-0.2673972249031067,
0.41106635332107544,
-0.8712925910949707,
0.25361672043800354,
-0.31520336866378784,
-1.0005477666854858,
0.741725504398346,
0.24925880134105682,
-0.18646782636642456,
-0.6696312427520752,
1.3918339014053345,
0.369141161441803,
0.8224303722381592,
... |
def three _ agents ( testerchain ) : " " " launch all nucypher ethereum contracts " " " origin, * everybody _ else = testerchain. interface. w3. eth. accounts token _ deployer = nucyphertokendeployer ( blockchain = testerchain, deployer _ address = origin ) token _ deployer. arm ( ) token _ deployer. deploy ( ) token _... | [
0.5054110884666443,
-0.7521909475326538,
0.6476789712905884,
-0.45539411902427673,
0.7870371341705322,
0.14540188014507294,
-0.44560667872428894,
0.17408642172813416,
0.886106550693512,
0.14002864062786102,
-1.1048595905303955,
-0.09728124737739563,
-0.16797222197055817,
-0.060767129063606... |
def tetrode _ nrs ( self ) : return sorted ( sum ( [ self. channel _ map [ key ] ['tetrode _ nrs'] for key in self. channel _ map ], [ ] ) ) | [
-0.2885317802429199,
-0.02663932554423809,
0.3514832556247711,
-1.4205213785171509,
0.4578802287578583,
-0.4454728364944458,
-0.45097312331199646,
-0.6513201594352722,
-0.03145798668265343,
0.8685137629508972,
-0.5022284388542175,
-0.4498751163482666,
-0.1746331751346588,
0.704484105110168... |
def repeats ( arr : list ) - > int : no _ repeats = [ ] for i in sorted ( arr ) : if arr. count ( i ) = = 1 : no _ repeats. append ( i ) return ( sum ( no _ repeats ) ) | [
-0.5657427310943604,
1.1885818243026733,
0.639330267906189,
1.0463110208511353,
-0.6802156567573547,
0.3716127574443817,
1.3679221868515015,
0.3592928946018219,
0.727198600769043,
0.34104397892951965,
-1.3047727346420288,
0.08923886716365814,
-0.43214529752731323,
0.9150956869125366,
-0.... |
def sfc _ srsetrestorepointa ( jitter ) : ret _ ad, args = jitter. func _ args _ stdcall ( [ " prestoreptspec ", " psmgrstatus " ] ) raise runtimeerror ('api not implemented') jitter. func _ ret _ stdcall ( ret _ ad, ret _ value ) | [
-0.781043291091919,
-0.26063528656959534,
0.4210263192653656,
-0.6370272040367126,
0.27375251054763794,
-0.09694673866033554,
0.890467643737793,
-0.2752539813518524,
0.3125517666339874,
0.0718752071261406,
-0.08563534170389175,
0.36377808451652527,
-1.0898305177688599,
0.7777721881866455,
... |
def register _ player ( self, name : str, pw _ hash : str ) : player = player ( name = name, score = 0, hash = pw _ hash ) self. _ session. add ( player ) self. commit ( ) | [
-0.14890435338020325,
0.332210898399353,
0.4997360408306122,
0.3340400755405426,
1.2365803718566895,
0.3491867184638977,
-1.208496332168579,
-0.13876426219940186,
-0.507291853427887,
0.2806377410888672,
-1.2655670642852783,
-0.7469103336334229,
-0.6679980754852295,
-0.09696558117866516,
... |
def test _ maybe _ pass _ timezone _ to _ realtime _ db ( self, mock _ download _ market _ data _ file ) : def mock _ get _ realtime _ db _ config ( db ) : return { " bar _ size " : " 1 day ", " fields " : [ " lastclose ", " lastopen ", " volumeclose " ], " tick _ db _ code " : " demo - stk - taq " } def _ mock _ downl... | [
0.030422529205679893,
0.21861910820007324,
0.709758460521698,
0.4562249481678009,
0.560492992401123,
0.1415342092514038,
0.5831311345100403,
-0.3115157186985016,
0.07709142565727234,
0.520134449005127,
-0.3894500732421875,
-0.8679617047309875,
-0.572048008441925,
0.6569749116897583,
-0.1... |
def phones ( self ) - > sequence [ text ] : return [ phone for word in self. words for phone in word. pf. phones ] | [
-0.14603491127490997,
-0.6073399186134338,
0.4414826035499573,
0.8286324739456177,
0.20854182541370392,
0.9839996695518494,
-1.3279165029525757,
0.3804413676261902,
-0.13877074420452118,
0.2623227834701538,
-0.3933079242706299,
-1.0117377042770386,
-0.5546033382415771,
0.9599802494049072,
... |
def install _ flows ( self, path, flow _ info, msg, queue _ set ) : self. logger. info ( " \ n installing flows in datapaths...... " ) in _ port = flow _ info [ 3 ] # # # # # # here installing flows for internal switches # # in _ port is the port of switch from which data is coming # # out _ port is the port of switch ... | [
-0.17489062249660492,
-0.8350205421447754,
0.8218326568603516,
-0.5039586424827576,
0.25419554114341736,
0.3195449411869049,
0.8505342602729797,
0.20842278003692627,
-0.19759739935398102,
-0.2617318630218506,
-0.15043340623378754,
0.08514384925365448,
-0.23615163564682007,
0.29341533780097... |
def on _ intent ( intent _ request, session ) : print ( " on _ intent requestid = " + intent _ request ['requestid'] + ", sessionid = " + session ['sessionid'] ) intent = intent _ request ['intent'] intent _ name = intent _ request ['intent'] ['name'] # dispatch to your skill's intent handlers if intent _ name = = " te... | [
-0.03611396253108978,
-1.8186396360397339,
0.6510306596755981,
0.10425207018852234,
-0.4188845157623291,
0.18723884224891663,
0.05294268578290939,
-0.904438316822052,
1.390683650970459,
0.18283753097057343,
-0.09311337023973465,
0.26094233989715576,
0.3357524275779724,
-0.8852654099464417,... |
def test _ check _ input _ single _ mask _ error ( ) : # call checker function with pytest. raises ( typeerror, match = r'cannot input a mask. *') : chmap, landmap, basevalues, time _ window, dim0 = mob. check _ inputs ( chmask [ 0 ], basevalues _ idx = [ 0 ], window _ idx = 1, landmap = landmask [ 0 ] ) | [
-0.13099634647369385,
0.11419636011123657,
0.4271000325679779,
1.4749054908752441,
0.7938423752784729,
1.1467052698135376,
0.87889164686203,
-0.20127072930335999,
0.20076043903827667,
-0.5816597938537598,
0.3276599049568176,
0.524966835975647,
-0.758033812046051,
0.8402000665664673,
0.57... |
def get _ from _ db ( name ) : return list ( map ( lambda record : ( record ['name'], record ['age'] ), client. name _ age. customers. find ( {'name': name } ) ) ) | [
-0.8270277976989746,
-0.1508876085281372,
0.45667633414268494,
-0.6087144017219543,
-0.6548469066619873,
-0.1269637495279312,
-1.3239556550979614,
0.1360706239938736,
-0.5409084558486938,
1.4689786434173584,
-1.0579869747161865,
-0.7738395929336548,
0.6237722039222717,
1.1093485355377197,
... |
def index _ grid ( self, x, y ) : xvalues = { } for m in self. models : xvalues [ m. params [ x ] ] = true xvalues = sorted ( xvalues. keys ( ) ) yvalues = { } for m in self. models : yvalues [ m. params [ y ] ] = true yvalues = sorted ( yvalues. keys ( ) ) ivalues = [ [ 0 for a in xrange ( len ( xvalues ) ) ] for b in... | [
-0.9300040006637573,
0.1377536952495575,
0.36672863364219666,
-0.3616894483566284,
0.2698611617088318,
0.008335848338901997,
0.15953461825847626,
-0.33286362886428833,
-1.5479397773742676,
0.9602839946746826,
-0.06924931704998016,
0.2562572956085205,
-0.36139580607414246,
0.210237994790077... |
def test _ invalid _ primitive _ key ( self ) : with pytest. raises ( keyerror ) : get ( 5, ('hello ', ) ) | [
-0.3644980490207672,
1.016115665435791,
0.2524161636829376,
0.22372768819332123,
-0.2872299253940582,
0.6877647042274475,
-1.507791519165039,
0.13672253489494324,
-1.003265619277954,
-0.6068544387817383,
-0.6659199595451355,
0.9177142381668091,
-0.4976319372653961,
0.2138485610485077,
0.... |
def lease _ tasks _ async ( self, lease _ seconds, max _ tasks, rpc = none ) : lease _ seconds = self. _ validateleaseseconds ( lease _ seconds ) self. _ validatemaxtasks ( max _ tasks ) request = taskqueue _ service _ pb2. taskqueuequeryandowntasksrequest ( ) response = taskqueue _ service _ pb2. taskqueuequeryandownt... | [
0.10838436335325241,
0.49370864033699036,
0.7412673234939575,
0.3626813292503357,
-0.3467811048030853,
0.015892086550593376,
-0.6027549505233765,
0.11498952656984329,
0.2035132795572281,
-0.5175347924232483,
-0.4407203495502472,
0.5427517294883728,
-0.35980352759361267,
0.24197238683700562... |
def _ reconcile _ vea ( db _ vea, server _ vea, db _ vio _ server, context, db _ session ) : msg = ( ras. vif _ get _ msg ('info ','reconcile _ vea _ start') % {'host': db _ vio _ server. get _ host _ name ( ),'vios': db _ vio _ server. lpar _ id,'adpt': server _ vea. name } ) ras. trace ( log, _ _ name _ _, ras. trace... | [
0.25427716970443726,
-1.0560208559036255,
0.8074928522109985,
-0.33657777309417725,
0.8306533694267273,
-0.34040093421936035,
0.1412903219461441,
0.8111947178840637,
-0.041599154472351074,
0.9812285304069519,
-0.43537554144859314,
0.20254898071289062,
0.08540654927492142,
0.497254639863967... |
def set _ params _ from _ array ( self, params ) : if len ( params )! = 3 : raise valueerror ( " the length of the parameter array must be 3 " ) self. amplitude = params [ 0 ] self. mean = params [ 1 ] self. stddev = params [ 2 ] | [
-0.07393788546323776,
-0.04647369682788849,
0.46742692589759827,
0.4356499910354614,
0.21980641782283783,
1.2058545351028442,
-0.523279070854187,
-0.17028257250785828,
-0.2085183709859848,
1.3775967359542847,
0.011462531983852386,
1.0549935102462769,
-0.8869792222976685,
0.7031705975532532... |
def item _ select ( self, item, handle _ alert = none ) : self. logger. info ( " selecting % r ", item ) try : self. open ( ) if not self. item _ enabled ( item ) : reason = self. item _ title ( item ) raise dropdownitemdisabled ('item " { item } " of dropdown " { dropdown } " is disabled due to \ n'" { reason } " " th... | [
0.007359277922660112,
-0.44864365458488464,
0.562122106552124,
1.3015064001083374,
0.4152558445930481,
0.5918381810188293,
0.6619532704353333,
0.17223796248435974,
0.9397444128990173,
0.21354950964450836,
0.3653084635734558,
-0.6578360795974731,
-0.8738849759101868,
-0.22697652876377106,
... |
def convert _ to _ cudf ( result : cp. ndarray ) - > tuple [ cudf. dataframe, float ] : cupy _ vertex, cupy _ partition, modularity = result df = cudf. dataframe ( ) df [ " vertex " ] = cupy _ vertex df [ " partition " ] = cupy _ partition return df, modularity | [
-0.31081825494766235,
0.3673977553844452,
0.25005125999450684,
0.3172815442085266,
-0.01245064102113247,
-0.6817633509635925,
0.27419325709342957,
-0.1125340685248375,
-0.09963008016347885,
0.15460583567619324,
0.20368126034736633,
-0.13558094203472137,
-0.20492397248744965,
-0.84865605831... |
def _ converttonumpy ( self, imagemsg ) : bridge = cvb. cvbridge ( ) try : cv _ image = bridge. imgmsg _ to _ cv ( imagemsg, self. format ) except cvb. cvbridgeerror, e : print e img = numpy. asarray ( cv _ image ) return img | [
-1.2012441158294678,
-0.35540682077407837,
0.6503085494041443,
-0.039007529616355896,
0.9375131130218506,
-0.3686702847480774,
0.4441087245941162,
-0.7194432020187378,
0.3875705301761627,
0.3514755368232727,
-0.01078054215759039,
0.29202020168304443,
-0.34822678565979004,
1.200453877449035... |
def _ _ init _ _ ( self, per _ class _ values = none, per _ class _ rank = none, ranked _ per _ class _ names = none, ranked _ per _ class _ values = none, * * kwargs ) : super ( perclassmixin, self ). _ _ init _ _ ( * * kwargs ) self. _ per _ class _ values = per _ class _ values self. _ per _ class _ rank = per _ cla... | [
-0.5400164723396301,
0.1387019157409668,
0.8516176342964172,
0.6499401926994324,
-0.2153804898262024,
0.8664994835853577,
-0.07195107638835907,
0.41166502237319946,
0.36103904247283936,
-0.6660586595535278,
-0.3892761170864105,
-0.3382321894168854,
-0.4097867012023926,
0.6932687759399414,
... |
def test _ grpc _ 01 _ unary ( self ) : for key in self. name _ email : name = key mail = self. name _ email [ key ] p = self. create _ person ( name, mail ) assert p is not none | [
-0.44510945677757263,
0.7343190312385559,
0.318265438079834,
-0.7790875434875488,
1.0591800212860107,
0.7043137550354004,
-0.8567088842391968,
-0.16014525294303894,
-0.516167402267456,
0.008214365690946579,
-0.6784347891807556,
-0.37320831418037415,
-0.9673399925231934,
-0.3027569055557251... |
async def _ load _ lip _ devices ( self ) : _ log. debug ( " loading lip devices " ) try : device _ json = await self. _ request ( " readrequest ", " / server / 2 / id " ) except bridgeresponseerror : # only the pro and raselect2 hubs support getting the lip devices return devices = device _ json. body. get ( " lipidli... | [
-1.0502212047576904,
-0.4262896478176117,
0.4055841565132141,
0.12888124585151672,
-0.041431546211242676,
0.4416528046131134,
-0.9530178904533386,
-0.20719830691814423,
0.4731863737106323,
-0.021832844242453575,
-0.17817294597625732,
0.01060792338103056,
-0.471698135137558,
0.7141956686973... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.