text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def quick _ blog ( context ) : context [ " form " ] = blogpostform ( ) return context | [
1.0629913806915283,
0.9091172814369202,
0.1447630077600479,
-0.0185855682939291,
0.4746232330799103,
-0.32029488682746887,
-0.049047671258449554,
-0.07334418594837189,
0.27331361174583435,
-1.5855987071990967,
-1.1019104719161987,
-0.34477511048316956,
0.6784183382987976,
-0.24179115891456... |
def has _ fix ( self, pos ) : if " lat " in pos and self. is _ nan ( pos [ " lat " ] ) = = false : return true else : return false | [
-0.024216393008828163,
-0.34440916776657104,
0.36381733417510986,
0.0921425148844719,
-0.6333670020103455,
0.5493420362472534,
-1.311075210571289,
1.1642568111419678,
-0.8664120435714722,
-0.0877096951007843,
-0.5963631868362427,
-1.0174932479858398,
0.16161301732063293,
1.3889249563217163... |
def _ _ eq _ _ ( self, other ) : return self. _ equality ( self, other ) | [
-0.9736896753311157,
-0.30306804180145264,
0.43733498454093933,
-0.023640446364879608,
0.38506409525871277,
0.14637506008148193,
-0.1649097055196762,
-0.8775890469551086,
0.4930559992790222,
-0.04131687059998512,
-1.180959939956665,
-0.16285564005374908,
0.12285337597131729,
-0.27104243636... |
def _ field _ arg _ with _ prev _ check _ trigger _ function ( self, outer _ self, * args, * * kwargs ) : trigger = false if self. _ plain _ field _ arg _ check _ trigger _ function ( outer _ self ) : prev _ value = outer _ self. get _ prev _ value ( self. field ) if prev _ value = = self. prev : trigger = true return ... | [
-0.789438784122467,
0.31742730736732483,
0.712236225605011,
-0.07966026663780212,
0.12792949378490448,
-0.1934029757976532,
0.6319224834442139,
0.010240969248116016,
-0.42309820652008057,
-0.06586603075265884,
-0.5448188185691833,
0.26332056522369385,
-0.6255459189414978,
-0.03696311265230... |
def available ( self ) - > bool : return self. processor. coordinator. sleepy _ device or super ( ). available | [
-0.5280864238739014,
0.5508962869644165,
0.6182399988174438,
0.8938118815422058,
-0.498102605342865,
0.8775473833084106,
-0.23131921887397766,
0.34620997309684753,
0.25610604882240295,
0.32204166054725647,
0.3300361633300781,
0.31290656328201294,
-0.13592806458473206,
1.1450501680374146,
... |
def underconstruction ( name ) : return type ( name, ( underconstruction, ), { } ) | [
-0.32521340250968933,
-0.9760458469390869,
0.49344784021377563,
-1.3798178434371948,
-1.659079670906067,
-0.5536061525344849,
0.5580219030380249,
-0.6385107636451721,
-0.13794122636318207,
-1.2034971714019775,
-1.0974328517913818,
-0.5694571137428284,
0.3177683353424072,
0.1878914982080459... |
def getcroppingregionplanes ( self ) :... | [
-0.046788107603788376,
0.46874257922172546,
0.4639444053173065,
1.2405731678009033,
-0.5413219332695007,
1.0024232864379883,
0.4366963803768158,
-0.9697889685630798,
0.13813312351703644,
-0.1094379797577858,
-0.26860570907592773,
0.025449786335229874,
-0.31188079714775085,
0.27534493803977... |
def open _ file _ read ( filename, offset = none ) : filename = os. path. expanduser ( filename ) mt = os. path. getmtime ( filename ) at = os. path. getatime ( filename ) fm = stat. s _ imode ( os. stat ( filename ) [ stat. st _ mode ] ) fp = open ( filename,'rb') if offset! = none : fp. seek ( offset ) return mt, at,... | [
-0.938506007194519,
-0.7037596702575684,
0.964959442615509,
-0.8513765335083008,
-0.9042575359344482,
0.414474219083786,
0.09560985118150711,
0.36473527550697327,
-0.9409219026565552,
0.2887677550315857,
-0.14684844017028809,
-0.35353565216064453,
0.6133500933647156,
-0.7585869431495667,
... |
def simannealing ( startstate, inittemp = 100. 0 ) : currtemp = inittemp currstate = startstate currstate. setprintmode ( full = false ) currvalue = currstate. getvalue ( ) maxvalue = currstate. getmaxvalue ( ) count = 0 if verbose : print ( " = = = = = = = = = = = = = = = = = = = = = start = = = = = = = = = = = = = = ... | [
0.5033623576164246,
-0.17943695187568665,
0.6990094184875488,
0.699803352355957,
-0.897537887096405,
0.22894155979156494,
0.42888936400413513,
0.15792173147201538,
-0.5988840460777283,
-0.08314752578735352,
-0.3910294473171234,
-0.2985418140888214,
-0.3002783954143524,
0.43209972977638245,... |
def taskflow _ downstream ( task, task _ downstream, only _ complete = false ) : tasks = luigi. tools. deps. find _ deps ( task _ downstream, task. task _ family ) if only _ complete : tasks = { t for t in tasks if t. complete ( ) } return tasks | [
0.46033549308776855,
-0.004734457470476627,
0.5134007334709167,
0.26952609419822693,
-0.7902938723564148,
0.019770260900259018,
0.245660662651062,
0.5174911618232727,
-0.785468339920044,
0.08674441277980804,
-0.20771455764770508,
-0.35447558760643005,
0.5930080413818359,
0.4984336197376251... |
def make _ file _ name _ v2 ( self, final _ sweep, starttime ) : outstring = output _ prefix + " ta0 " + str ( self. target _ area ) \ + " _ std0 " + str ( self. target _ std ) + " _ i0 " \ + str ( self. current _ sweep ) \ + " _ f0 " + str ( final _ sweep ) \ + " _ started " + str ( starttime ) return outstring | [
-0.16208867728710175,
-1.7784103155136108,
0.6419292092323303,
-0.8203606605529785,
-0.9098910689353943,
0.1881672739982605,
0.09253636002540588,
0.3049432337284088,
-0.7812151908874512,
0.30482158064842224,
0.5318684577941895,
0.7903814315795898,
1.453656554222107,
-0.1303461492061615,
... |
def get _ deeplabv3 ( backbone, classes, aux = false, model _ name = none, pretrained = false, root = os. path. join ( " ~ ", ". chainer ", " models " ), * * kwargs ) : net = deeplabv3 ( backbone = backbone, classes = classes, aux = aux, * * kwargs ) if pretrained : if ( model _ name is none ) or ( not model _ name ) :... | [
-0.1584630310535431,
0.6184335350990295,
0.6458282470703125,
0.5836171507835388,
-0.1633283495903015,
0.670365571975708,
0.38219979405403137,
-0.09486229717731476,
0.1131296455860138,
-0.506001889705658,
-0.1469534933567047,
0.6340595483779907,
-0.46447184681892395,
-0.05510738864541054,
... |
def checksamedataarrays ( comment, resultedda, expectedda, update = true ) : res = resultedda. identical ( expectedda ) if update : if res : results [ " pass " ] + = 1 else : print ( " checking string ", comment,'| ', resultedda, "! = ", expectedda ) results [ " fail " ] + = 1 return res | [
-0.4821220636367798,
-0.6779316663742065,
0.5518282651901245,
0.15497919917106628,
0.31116876006126404,
0.6773648262023926,
0.5119008421897888,
0.06264680624008179,
0.07239128649234772,
0.4608076214790344,
-0.33871400356292725,
0.43600818514823914,
-0.6552214622497559,
-0.15374942123889923... |
def password ( self, password ) : self. _ _ dict _ _ [ " password " ] = md5 ( password. encode ('utf - 8') ). hexdigest ( ) | [
-0.2025168389081955,
-0.3284173607826233,
0.35227203369140625,
-0.8434376120567322,
-0.038772162050008774,
0.3365946114063263,
0.205253005027771,
1.121616005897522,
0.44922181963920593,
0.27809473872184753,
-1.1491836309432983,
-0.5495633482933044,
0.10169580578804016,
0.3707980215549469,
... |
def extend _ results _ extrapoling _ relations ( helper ) : if not helper. bucket _ dry : return # no need. tokens = set ( helper. meaningful + helper. common ) for relation in _ extract _ manytomany _ relations ( tokens ) : helper. add _ to _ bucket ( [ t. db _ key for t in relation ] ) if helper. bucket _ overflow : ... | [
0.25240349769592285,
1.8580565452575684,
0.4701596200466156,
-0.40705442428588867,
0.7362357378005981,
0.14990223944187164,
0.11586374044418335,
-0.5071539282798767,
-0.22699514031410217,
-0.5408547520637512,
-0.15274377167224884,
-0.32109376788139343,
0.06662637740373611,
0.13321799039840... |
def bonded _ beads _ distance _ whole _ backbone ( simname, first _ only = false, coord _ loc = [ 3, 6 ], save = false, root _ mean _ square = false ) : bonded _ beads _ distance _ list = [ ] if first _ only : df, bs = extract. extract _ unwrapped ( simname, first _ only = true, boxsize = true ) else : df, boxsize _ wh... | [
0.14988093078136444,
-0.3694703280925751,
0.9371524453163147,
-0.11318254470825195,
0.5357186198234558,
-0.02108452469110489,
0.9816616177558899,
0.041029948741197586,
0.3483263850212097,
0.7073937654495239,
-0.6979504227638245,
0.4533972144126892,
-0.5204449892044067,
0.7202476263046265,
... |
def env _ task ( * args, * * kwargs ) : wrapper _ function = task ( * args, * * kwargs ) wrapper _ function. decorated _ env _ task = true return wrapper _ function | [
-0.11625378578901291,
-0.370412677526474,
0.6108992695808411,
0.4111822545528412,
0.2642112672328949,
0.6874470114707947,
-0.11292433738708496,
0.4192628860473633,
-0.8940228819847107,
1.0281214714050293,
-0.5163722634315491,
1.2855256795883179,
1.2354393005371094,
0.22669781744480133,
0... |
def get _ shape _ and _ channels _ from _ json ( example _ info _ json ) : if not tf. io. gfile. exists ( example _ info _ json ) : logging. warning ('starting from v1. 4. 0, we expect % s to'' include information for shape and channels. ', example _ info _ json ) return none, none with tf. io. gfile. gfile ( example _... | [
0.06808185577392578,
-1.4682369232177734,
0.5346677303314209,
-1.8191841840744019,
-0.1663360893726349,
-0.11967816203832626,
-0.32698917388916016,
-0.8598997592926025,
-0.14452138543128967,
0.8470589518547058,
-0.9521641731262207,
0.23018001019954681,
0.7340631484985352,
0.388025760650634... |
def test _ get _ user _ skills ( self ) : self. assertsetequal ( set ( self. user1. get _ user _ skills ( ) ), { self. skill1, self. skill3 } ) | [
0.4103037714958191,
0.12471327930688858,
0.320023775100708,
0.6847377419471741,
0.7404452562332153,
1.0451014041900635,
0.8088741898536682,
-0.8718134164810181,
-0.4828144907951355,
-0.5222305059432983,
-0.7607823014259338,
-0.08816499263048172,
-0.014173365198075771,
-1.1297142505645752,
... |
def test _ sudo _ prompt _ display _ directly ( self ) : testnetwork. _ prompt _ display ( false ) | [
0.06839050352573395,
0.11551368981599808,
0.14248043298721313,
0.5437657237052917,
-0.1259078085422516,
1.453244686126709,
1.273119568824768,
-0.5137113332748413,
-0.2671803832054138,
-0.8604736328125,
-0.11060145497322083,
0.5790655612945557,
0.6699954271316528,
-0.1514727622270584,
-0.... |
def build _ cpo _ expr _ array ( val ) : def normalize _ value ( val ) : assert not is _ string ( val ), " impossible to build an array expression from a string " assert not isinstance ( val, dict ), " impossible to build an array expression from a dictionary. select values ( ) or keys ( ). " try : return _ cachekeytup... | [
-0.37443462014198303,
-0.1139795333147049,
0.33736833930015564,
0.5231242775917053,
-0.7990265488624573,
-0.15216295421123505,
0.36397984623908997,
0.025569088757038116,
0.00939722266048193,
0.8257235288619995,
-0.169979065656662,
0.7375918030738831,
-0.5671669840812683,
0.0907706245779991... |
def pyop _ field ( self, name ) : return notimplemented | [
-1.2626069784164429,
0.02921130321919918,
0.6745246052742004,
-0.8957917094230652,
-0.4182506799697876,
0.7293068170547485,
-0.17217972874641418,
-1.2215903997421265,
0.7777931094169617,
-0.026736324653029442,
-1.0741386413574219,
-1.268359899520874,
0.27945494651794434,
-0.716603040695190... |
def print _ times ( results, stds = false ) : print ('mean function times') print ('= = = = = = = = = = = = = = = = = = =') for dataset _ name in results ['mean _ times']. keys ( ) : print ( ) print ( dataset _ name ) print ('-'* len ( dataset _ name ) ) for f _ name in results ['mean _ times'] [ dataset _ name ] : mea... | [
-0.3729318380355835,
0.8912422060966492,
0.7469016909599304,
-1.0257482528686523,
-0.1971006542444229,
0.09625862538814545,
-0.5501318573951721,
-0.8096657395362854,
-0.8252291083335876,
1.2628074884414673,
-0.09530313313007355,
0.8854719996452332,
0.3043743968009949,
0.9790371656417847,
... |
def load _ and _ prec ( ) : df _ train = pd. read _ csv ( ".. / input / train. csv " ) df _ test = pd. read _ csv ( ".. / input / test. csv " ) # # fill up the missing values train _ x = df _ train [ " question _ text " ]. fillna ( " _ # # _ " ). values test _ x = df _ test [ " question _ text " ]. fillna ( " _ # # _ "... | [
-0.34184035658836365,
-0.0293071698397398,
0.7690854668617249,
-0.7969177961349487,
-0.3201513886451721,
-0.46428531408309937,
-0.5631251931190491,
0.28534838557243347,
-0.8310157060623169,
-0.040149953216314316,
0.008359290659427643,
0.18020926415920258,
0.1532709002494812,
-0.66032117605... |
def plotsegmentations ( self, show _ figure : bool = true ) - > none : if self. segm _ channel is none : raise runtimeerror ( " segmentation - related function called before segmentation " ) segmentations = [ ] # get time points from " frame " script from _ frame = self. frames [ self. segm _ channel ] [ 0 ]. time _ po... | [
-0.36874261498451233,
0.4234716594219208,
0.6186954975128174,
0.40304452180862427,
1.092665433883667,
-1.0339899063110352,
1.2767267227172852,
-0.00979295838624239,
0.1397196501493454,
0.32549822330474854,
-0.37162911891937256,
0.42998194694519043,
0.19528786838054657,
1.3858366012573242,
... |
def _ cursor _ set _ implementation ( self ) - > none : return | [
-0.5949086546897888,
-0.30345988273620605,
0.2928081452846527,
-0.6067154407501221,
0.17303146421909332,
-0.3652207553386688,
0.9968708157539368,
0.031495675444602966,
0.000991968554444611,
0.736206591129303,
-0.004403100349009037,
0.5068660974502563,
0.12712162733078003,
0.112832225859165... |
def _ get _ multiplier ( self, x ) : last _ dim = x. shape [ - 1 ] def big _ relatively _ prime ( n ) : # the longest possible cycle is achieved iff log2 ( multiplier ) and # log2 ( dimension _ size ) are relatively prime. we choose the biggest such # number smaller than sqrt ( dimension _ size ). for i in range ( n / ... | [
-0.6877239942550659,
0.6937593817710876,
0.7781983017921448,
0.38145479559898376,
-1.1661041975021362,
-0.05761464685201645,
0.3324072062969208,
-0.8252614736557007,
0.2458944320678711,
-0.21487699449062347,
-0.20390650629997253,
0.16477438807487488,
0.10424833744764328,
0.3485884368419647... |
def _ glm _ l1 _ propagate _ return ( l1 _ block, task _ name, reference _ image, logger ) : assert l1 _ block [ " fsfprototype " ] = = " set prototype path " assert l1 _ block [ " imageexcludelist " ] = = " " assert l1 _ block [ " imageincludelist " ] = = " " assert task _ name = = " set task name " assert reference _... | [
-0.007993476465344429,
-0.2926563322544098,
0.4998927116394043,
0.12364697456359863,
-0.16636362671852112,
0.5653786659240723,
0.5126807689666748,
0.12692631781101227,
-0.20611268281936646,
0.6520719528198242,
0.3607604205608368,
0.35754629969596863,
-0.7005963325500488,
0.772820770740509,... |
def create _ connection ( self ) : try : connection = sqlite3. connect ( self. db _ file ) logger. info ( " connected to database successfully " ) return connection except error as e : logger. error ( " connect failed " ) return none | [
0.05197974666953087,
-0.18469050526618958,
0.4452792704105377,
-0.06341596692800522,
0.365963876247406,
0.5657842755317688,
-0.8291821479797363,
-0.3392467796802521,
-0.6526506543159485,
0.17466121912002563,
0.5515003800392151,
-0.9470643401145935,
-0.8781854510307312,
-0.5396053194999695,... |
def encode ( self, inputs, categories, attention _ bias, training ) : with tf. name _ scope ( " encode " ) : attention _ bias = tf. cast ( attention _ bias, self. params [ " dtype " ] ) encoder _ inputs = inputs if training : encoder _ inputs = tf. nn. dropout ( encoder _ inputs, rate = self. params [ " layer _ postpro... | [
0.10778690874576569,
0.4470588266849518,
0.20258794724941254,
1.0335960388183594,
0.09208724647760391,
0.031888000667095184,
0.5548481941223145,
-0.6477237343788147,
-0.6120571494102478,
0.5050947666168213,
0.2535206079483032,
0.2913517355918884,
-0.06895454227924347,
0.11758916079998016,
... |
def recursive _ map ( value, func ) : if isinstance ( value, tuple ) : return tuple ( recursive _ map ( v, func ) for v in value ) if isinstance ( value, list ) : return list ( recursive _ map ( v, func ) for v in value ) if isinstance ( value, dict ) : return dict ( [ ( k, recursive _ map ( v, func ) ) for k, v in vie... | [
-0.3963175117969513,
0.7447858452796936,
0.668877363204956,
0.44011807441711426,
-1.4809142351150513,
-0.3272542953491211,
0.2598186135292053,
0.02932027168571949,
0.807464063167572,
-0.9785038828849792,
0.014775056391954422,
0.08530265092849731,
0.8661873936653137,
0.23382499814033508,
... |
def chunked ( cls, iterable, n, * args, * * kwargs ) : if hasattr ( iterable,'_ _ aiter _ _') : it = achunked ( iterable, n ) elif hasattr ( iterable,'_ _ iter _ _') : it = chunked ( iterable, n ) else : raise typeerror ( f'{ iterable! r } is not an iterable or an async - iterable') return cls ( it, * args, * * kwargs ... | [
-0.3909590542316437,
0.41415321826934814,
0.4261144697666168,
0.15387549996376038,
0.3700729310512543,
-0.1771097481250763,
-0.141848623752594,
-0.2535663843154907,
-0.2405814230442047,
-0.33598247170448303,
0.7557439208030701,
0.3927795886993408,
-0.09766663610935211,
0.46297967433929443,... |
def get _ component ( self, component _ class ) : assert isinstance ( component _ class, type ) assert issubclass ( component _ class, component ) try : return self. _ components [ component _ class. unique _ id ( ) ] except keyerror : result = component _ class ( ) self. _ components [ component _ class. unique _ id (... | [
-0.529438853263855,
-0.1386059820652008,
0.19341544806957245,
-0.3036938011646271,
1.308844804763794,
0.4036294221878052,
-0.027033032849431038,
-0.33801302313804626,
1.3115246295928955,
-0.6318359971046448,
0.5127196907997131,
0.3465178310871124,
-0.2164471596479416,
-0.3162515163421631,
... |
def close _ connection ( self ) : try : self. db _ connection. close ( ) except exception : logging. error ( " something went wrong when tried to close connection " ) logging. error ( " { } : { } ". format ( sys. exc _ info ( ) [ 0 ], sys. exc _ info ( ) [ 1 ] ) ) logging. error ( " ". join ( traceback. format _ tb ( s... | [
-0.19676488637924194,
-0.29505154490470886,
0.885047197341919,
0.4824102818965912,
0.09180637449026108,
0.8420276045799255,
-0.11409428715705872,
-0.12273354083299637,
-1.0230239629745483,
0.07718539983034134,
1.27763831615448,
-0.3104076683521271,
-0.890076220035553,
0.7425917983055115,
... |
def cal _ prob ( evi, node ) : true _ flag = true # default = true when it's literal like c or notc # cal _ prob ( { }, ['1 ','2'] ) # [ 0. 48, 0. 32000000000000006, 0. 12, 0. 08000000000000002 ] all _ prime = [ ] for x in l. keys ( ) : if int ( x ) < = node : all _ prime. append ( l [ x ] ) # here should have all the ... | [
0.6073026061058044,
0.026120290160179138,
0.8996915221214294,
-0.24575579166412354,
-0.07989869266748428,
0.5504831075668335,
-0.5076895952224731,
0.7960250973701477,
-0.14017203450202942,
0.7401691675186157,
-0.41845616698265076,
-0.8170762062072754,
-0.39750200510025024,
1.25207650661468... |
def getgriddatasetmetas ( self ) : return self. griddatasetmetas | [
-0.984985888004303,
1.059064507484436,
0.3252863585948944,
-0.7320938110351562,
0.6198840737342834,
-0.4409577250480652,
-1.2765055894851685,
-0.9870479106903076,
-0.4112859070301056,
-0.6197421550750732,
0.43550369143486023,
1.0839190483093262,
0.7725256085395813,
-0.09184293448925018,
... |
def load _ config ( file _ name : str ) - > configuration : config _ path = os. path. join ( _ dir _ path, " test _ data ", file _ name ) return configuration. from _ yaml ( config _ path ) | [
0.6575020551681519,
-0.29798391461372375,
0.42532309889793396,
-0.5130986571311951,
-0.7046461701393127,
-0.25374817848205566,
0.5151857733726501,
0.8546561002731323,
-0.6003437638282776,
0.5236520171165466,
-0.9495108723640442,
-0.03271322697401047,
0.042349670082330704,
0.561692059040069... |
def query _ all _ pts ( observation _ window _ hours ) : query = " " " with admissions as ( select admits. subject _ id, admits. hadm _ id, admits. admittime, admits. deathtime, ( admits. admittime + interval % ( time _ window _ hours ) s hour + interval'1'hour ) charttime, ( admits. admittime + interval % ( time _ win... | [
-0.1933455616235733,
0.1498725861310959,
0.6281234622001648,
-0.2586717903614044,
-0.6088468432426453,
0.547515869140625,
0.05508757010102272,
-0.7490876913070679,
0.11572833359241486,
0.6410018801689148,
0.7433170676231384,
1.018178105354309,
-0.25334206223487854,
0.7218703627586365,
-0... |
def space _ group ( self ) : return crystal. sgtbx. space _ group ('p1') | [
1.0276564359664917,
1.5267232656478882,
0.11785703897476196,
0.3585211932659149,
-0.7659947872161865,
1.739720344543457,
0.07008030265569687,
-0.0052435435354709625,
-0.05372472107410431,
-0.0610697977244854,
0.4204881489276886,
0.5878791213035583,
-0.31070271134376526,
0.52834552526474,
... |
def get _ user _ rankings ( self, request ) : users = user. query ( ). order ( - user. win _ ratio ) return rankforms ( items = [ user. rank _ form ( ) for user in users ] ) | [
-0.6185532212257385,
0.5480419993400574,
0.4010729193687439,
0.9437589049339294,
-0.1341702938079834,
-0.2892899811267853,
-0.050909917801618576,
-0.5840352773666382,
-0.1462775319814682,
-0.6929603219032288,
-0.3270169496536255,
0.10912522673606873,
0.2595159709453583,
0.13431225717067719... |
def createentitylistfromresponse ( self, response, detail ) : thelist = [ ] data = response [ " images " ] for jsonobj in data : img = image ( " " ) img. initfromresultdict ( jsonobj ) thelist. append ( img ) return entitylist ( thelist, detail, self ) | [
-0.6343629956245422,
-1.055414080619812,
0.2973674535751343,
-0.702854573726654,
0.5769870281219482,
-0.2832874655723572,
-0.17143680155277252,
0.8552715182304382,
1.234252691268921,
0.17436034977436066,
-0.6689206957817078,
-0.7040350437164307,
0.5093550086021423,
1.047371506690979,
-0.... |
def test _ stateless _ result _ raises _ on _ state _ access ( self ) : result = result ( np. array ( [ [ 1, 2 ], [ 3, 4 ] ] ), is _ stateful = false ) with pytest. raises ( attributeerror, match = " the state is undefined for a stateless computation. " ) : result. state | [
0.4963967204093933,
0.5729318857192993,
0.33243289589881897,
0.13472160696983337,
0.03195757418870926,
-0.4177370071411133,
0.43391552567481995,
-0.36231979727745056,
-0.045818835496902466,
-0.3733617961406708,
-0.374462753534317,
0.10791949927806854,
0.3037526607513428,
0.5917448997497559... |
async def edit _ message ( self :'telegramclient ', entity :'typing. union [ hints. entitylike, types. message ] ', message :'hints. messagelike'= none, text : str = none, *, parse _ mode : str = ( ), attributes :'typing. sequence [ types. typedocumentattribute ]'= none, formatting _ entities : typing. optional [ typin... | [
-0.6432633996009827,
0.23848359286785126,
0.8530973792076111,
-0.09832911193370819,
0.2637380063533783,
-0.14135389029979706,
0.13492538034915924,
0.1429067850112915,
-0.04938900098204613,
-0.395499050617218,
0.22486503422260284,
1.133090615272522,
-0.27708303928375244,
0.4630632698535919,... |
def city _ by _ country ( country ) : # perform the sql query query = db. session. query ( globaltemperaturebymajorcity. city ). filter ( globaltemperaturebymajorcity. country = = country ). group _ by ( globaltemperaturebymajorcity. city ). order _ by ( globaltemperaturebymajorcity. city ) cities = [ row. city for row... | [
0.037996988743543625,
0.09070734679698944,
0.6750444769859314,
-0.4683138430118561,
-0.6629136204719543,
-0.13850553333759308,
0.4082717299461365,
0.4227977991104126,
-0.6165704131126404,
1.3375409841537476,
-0.5638316869735718,
-0.6849440336227417,
-0.9276992678642273,
0.7431497573852539,... |
def run ( self, args ) : instance _ ref = args. concepts. instance. parse ( ) client = filestore _ client. filestoreclient ( self. _ api _ version ) labels _ diff = labels _ util. diff. fromupdateargs ( args ) orig _ instance = client. getinstance ( instance _ ref ) try : if args. file _ share : client. makenfsexportop... | [
-0.38220739364624023,
-0.3844417631626129,
0.8245096802711487,
-0.5195943117141724,
-0.062006670981645584,
0.21839004755020142,
0.19860710203647614,
0.13022767007350922,
0.04895606264472008,
0.6898571252822876,
0.00768998684361577,
-0.13957615196704865,
-0.8076611161231995,
-0.145019590854... |
def enabled _ in _ conf ( self ) - > bool : return self. _ conf. enabled | [
0.1343296468257904,
-0.549609899520874,
0.2834368944168091,
0.28848257660865784,
0.053888674825429916,
0.36337071657180786,
-0.11111132055521011,
1.5625,
-0.6007760763168335,
0.42320799827575684,
-1.049562692642212,
-0.00824128556996584,
-0.9218129515647888,
0.2128829061985016,
-0.001094... |
def prepare _ msg _ recv _ return ( state, lifecycle _ cmd _ id, invoke _ cmd _ id, param _ types, params ) : state. globals [ " lifecycle _ cmd _ id " ] = lifecycle _ cmd _ id state. globals [ " invoke _ cmd _ id " ] = invoke _ cmd _ id shm _ params _ memref = state. mem [ securestorage. shared _ mem _ base ]. tc _ ns... | [
-0.10007990151643753,
-0.25193721055984497,
0.6840167045593262,
-0.6329033374786377,
0.5113487839698792,
-0.11046025156974792,
0.6911701560020447,
-0.21558985114097595,
0.41953298449516296,
0.22465874254703522,
-0.36012154817581177,
0.37655338644981384,
-0.06706702709197998,
0.917433440685... |
def deletematches ( ) : # simple statement. query = " delete from scores ; " connect ( query ) | [
0.8684184551239014,
0.03508111834526062,
0.5147258639335632,
1.0135241746902466,
0.34885191917419434,
0.2861746549606323,
0.8336294293403625,
0.12551189959049225,
-0.014167804270982742,
0.17692694067955017,
-0.2605803608894348,
-0.9172345995903015,
-1.0124785900115967,
-0.7706605792045593,... |
def instrumentlist ( excludes = [ ] ) : instruments = { } from.. instruments import _ _ all _ _ as all _ instruments for f in all _ instruments : if f = = " _ _ init _ _ " : continue module = importlib. import _ module ( ". instruments. " + f, " stips " ) for name, obj in inspect. getmembers ( module ) : if inspect. is... | [
-0.8195611834526062,
-0.6229978203773499,
0.8364484906196594,
-0.31899628043174744,
-1.7086405754089355,
0.6750708222389221,
0.2285783886909485,
0.13939116895198822,
-0.13322186470031738,
0.6017330288887024,
-0.5871126651763916,
-0.22773568332195282,
-0.44557827711105347,
0.674237430095672... |
def exists ( path ) : try : posix. stat ( path ) except posix. error : return false return true | [
0.17124155163764954,
-0.182064950466156,
0.5092424750328064,
-0.07419063150882721,
0.2121795415878296,
1.040998101234436,
-0.9205648899078369,
0.3758600950241089,
-0.4688974618911743,
-0.9276771545410156,
-0.06896693259477615,
-1.2119990587234497,
0.22388455271720886,
-0.2407943606376648,
... |
def _ _ channel _ conv ( self, feature _ map, kernel ) : # conv for each dimension conv = np. sum ( [ self. _ _ conv2d ( feature _ map [ :, :, i ], kernel [ :, :, i ] ) for i in range ( self. previous _ channels ) ], axis = 0 ) return conv | [
-0.21604201197624207,
-0.4914330542087555,
0.6063469648361206,
-0.04793962091207504,
0.11810038238763809,
-0.7155736088752747,
-0.053188156336545944,
0.41784268617630005,
-1.2588735818862915,
0.42677515745162964,
0.431698739528656,
0.442474901676178,
0.32390886545181274,
0.2993676066398620... |
def vocabcoursetype ( self ) : return course _ type | [
-0.005583159159868956,
-0.41680845618247986,
0.35007208585739136,
0.5120329856872559,
1.4338643550872803,
0.40720078349113464,
0.38634976744651794,
-0.8774766325950623,
1.0745575428009033,
0.5297686457633972,
-0.2561661899089813,
0.7012559771537781,
-0.32445335388183594,
0.3944196105003357... |
def true _ angle ( self ) : return self. angle | [
-0.0400235652923584,
0.17125625908374786,
0.36895227432250977,
-0.31024032831192017,
0.0030357588548213243,
0.7099176049232483,
-0.03709939122200012,
1.001692533493042,
0.19786159694194794,
0.5852184295654297,
0.03912504389882088,
-0.3319084942340851,
-1.0272401571273804,
-0.91993886232376... |
def winning _ configuration ( self, player ) : if self. game _ over ( ) : if self. winner = = player : return 1 else : return - 1 if len ( self. expand _ states ( ) ) = = 0 : if self. player _ to _ move = = player : return - 1 else : return 1 return 0 if np. sum ( self. board = = player ) + self. cows [ player - 1 ] or... | [
-1.4578981399536133,
0.5083594918251038,
0.7971721887588501,
0.5669968128204346,
-0.5858359932899475,
-0.1774781495332718,
0.9980172514915466,
0.023483319208025932,
-0.11132758110761642,
0.5129768252372742,
0.000296453625196591,
-0.9779186248779297,
-0.17238004505634308,
0.0741096138954162... |
def conv3x3 ( in _ planes, out _ planes, stride = 1, groups = 1, dilation = 1 ) : return nn. conv2d ( in _ planes, out _ planes, kernel _ size = 3, stride = stride, padding = dilation, groups = groups, bias = false, dilation = dilation ) | [
0.751173198223114,
0.3234400451183319,
0.3745567500591278,
0.22451305389404297,
-1.4694559574127197,
1.0457452535629272,
-1.1139520406723022,
-0.011763549409806728,
-0.16540075838565826,
0.5452169179916382,
0.19115522503852844,
-0.020335013046860695,
-0.13911305367946625,
-1.17195165157318... |
def to _ ipc ( self, file : union [ binaryio, str, path ] ) : if isinstance ( file, path ) : file = str ( file ) self. _ df. to _ ipc ( file ) | [
-0.686934232711792,
0.21934273838996887,
0.34171104431152344,
-0.2509296238422394,
0.290738582611084,
-0.5171917080879211,
0.5119313597679138,
0.1140948235988617,
-1.1546776294708252,
-0.24034333229064941,
0.2787151634693146,
0.5263352990150452,
-0.5591199994087219,
-0.9488739371299744,
... |
def test _ match _ only _ searches _ after _ position ( self, basic _ logfile ) : matcher = logmatcher ( log _ path = basic _ logfile ) second _ string = re. compile ( r " second " ) match = matcher. match ( regex = second _ string ) # it should find this string. assert match is not none assert match. group ( 0 ) = = "... | [
1.2473528385162354,
0.2735792398452759,
0.48254260420799255,
0.18288366496562958,
0.006692185532301664,
0.5533123016357422,
-0.0370933972299099,
-0.5502280592918396,
-0.6570361256599426,
-0.752720296382904,
-0.5754438638687134,
-0.42836135625839233,
-0.20589247345924377,
0.0016072334256023... |
def map _ moments ( circuit : circuit _ type, map _ func : callable [ [ ops. moment, int ], union [ ops. moment, sequence [ ops. moment ] ] ], ) - > circuit _ type : return _ create _ target _ circuit _ type ( ( map _ func ( circuit [ i ], i ) for i in range ( len ( circuit ) ) ), circuit ) | [
-0.729493260383606,
-0.09671468287706375,
0.5142682790756226,
-0.2809962332248688,
-0.35939839482307434,
-0.38711410760879517,
0.23101074993610382,
-0.3013113737106323,
0.7134717702865601,
0.14745479822158813,
0.01917720027267933,
0.8488485813140869,
0.3193482756614685,
0.46150660514831543... |
def identify ( self, environ ) : request = request ( environ ) if self. _ is _ request _ to _ token _ url ( request ) : return self. _ process _ vep _ assertion ( request ) return self. _ identify _ oauth ( request ) | [
-0.9041928052902222,
-0.05018680915236473,
0.4351055324077606,
1.5814611911773682,
1.3535566329956055,
-0.3268119990825653,
-0.12093643844127655,
-0.7742958664894104,
1.0557708740234375,
-0.023729972541332245,
0.5527589917182922,
0.041295040398836136,
-0.25343871116638184,
0.20813791453838... |
def scene ( id, value ) : return put _ state ( id, { " scene " : value } ) | [
-0.7671449184417725,
0.38863280415534973,
0.25998935103416443,
-1.027847170829773,
-0.06382644921541214,
-0.39484256505966187,
-0.9915874600410461,
-0.2040385603904724,
0.7181795239448547,
0.40304067730903625,
-1.0247676372528076,
0.18263988196849823,
-0.34988337755203247,
-0.7490183115005... |
def mkdef ( n ) : return re. sub ( r'\ w ','_ ', n. upper ( ) ) | [
-0.3719097077846527,
0.15630753338336945,
0.2641010284423828,
-1.0901403427124023,
-0.6327996253967285,
-0.24952715635299683,
-0.27375176548957825,
-0.2338133454322815,
-0.23476091027259827,
-0.6600861549377441,
-0.9242580533027649,
-0.1332605481147766,
1.138791799545288,
0.573880076408386... |
def _ caller _ name ( skip = 2 ) : stack _ list = stack ( ) start = 0 + skip if len ( stack _ list ) < start + 1 : return'' parentframe = stack _ list [ start ] [ 0 ] name = [ ] module = getmodule ( parentframe ) # ` modname ` can be none when frame is executed directly in console # todo ( techtonik ) : consider using ... | [
-0.6893007755279541,
0.029520761221647263,
1.1764863729476929,
0.4772954285144806,
-0.6134938597679138,
-0.25450313091278076,
0.6159344911575317,
-0.8151835203170776,
-0.07989107817411423,
0.5431175231933594,
0.11129800975322723,
0.013462322764098644,
0.3336462080478668,
0.8883388638496399... |
def test _ profile _ returns _ email ( authn _ policy, user _ model ) : request = dummyrequest ( ) authn _ policy. authenticated _ userid. return _ value = " acct : foo @ bar. com " user _ model. get _ by _ userid. return _ value = fakeuser ( email = " foo @ bar. com " ) result = profilecontroller ( request ). profile ... | [
0.4962174594402313,
0.2696665823459625,
0.17829662561416626,
0.17505614459514618,
0.19257402420043945,
0.8942602276802063,
0.2994881272315979,
-0.6051154732704163,
0.04424421116709709,
-0.24107913672924042,
-0.788570761680603,
0.23607002198696136,
-0.3342583179473877,
-1.0341757535934448,
... |
def load _ config ( config _ path = ". / config / config. yml " ) : with open ( config _ path ) as f : config = yaml. safe _ load ( f ) return config | [
0.5428346991539001,
-0.5600546598434448,
0.16210554540157318,
0.20741406083106995,
-0.8652791380882263,
-0.29481908679008484,
0.1904219388961792,
0.7726847529411316,
-0.0597665049135685,
0.7259442806243896,
-0.8519009351730347,
-0.05879596993327141,
-0.055258940905332565,
0.223625078797340... |
def find _ packages ( path, base = " " ) : packages = { } for item in os. listdir ( path ) : dir = os. path. join ( path, item ) if is _ package ( dir ) : if base : module _ name = " % ( base ) s. % ( item ) s " % vars ( ) else : module _ name = item packages [ module _ name ] = dir packages. update ( find _ packages (... | [
-0.4215586185455322,
-0.0971992239356041,
0.626866340637207,
0.1324215531349182,
-0.5846782326698303,
-0.7525149583816528,
0.22769711911678314,
-0.8701490163803101,
0.17893913388252258,
0.19406715035438538,
-0.9928097724914551,
-0.8030957579612732,
-0.020795507356524467,
1.1222633123397827... |
def get _ parameter _ names ( self, target _ scale : str ='prior') : parameter _ df = petab. normalize _ parameter _ df ( self. petab _ problem. parameter _ df ) # scale if target _ scale = = c. lin : target _ scales = { key : c. lin for key in self. prior _ scales } elif target _ scale = ='prior': target _ scales = se... | [
-1.063002109527588,
-0.7505655884742737,
0.9169690012931824,
-0.5356225371360779,
0.057103224098682404,
-0.16218703985214233,
-1.0557221174240112,
-0.7499223947525024,
-0.8582795262336731,
1.4553008079528809,
0.2742253541946411,
0.3542531132698059,
0.3144112527370453,
0.7770985960960388,
... |
def from _ dict ( cls, dikt ) - >'weather': return deserialize _ model ( dikt, cls ) | [
-0.6102975606918335,
-0.012422097846865654,
0.18227222561836243,
-0.6756706237792969,
-1.0211818218231201,
0.7032980918884277,
-0.4305698871612549,
0.3101527690887451,
0.0993245467543602,
-0.38773202896118164,
-0.32161325216293335,
-1.0149866342544556,
0.4270815849304199,
-0.26013135910034... |
def _ _ exit _ _ ( self, type _, value _, trackback _ ) : self. connection. close ( ) | [
-0.3407544791698456,
-0.7768412232398987,
0.7040072679519653,
0.2288220226764679,
-0.24043519794940948,
0.480545312166214,
0.5261805057525635,
-0.7099284529685974,
-1.0724982023239136,
0.17512699961662292,
0.6529679298400879,
-0.32186177372932434,
-0.5251002311706543,
0.44176051020622253,
... |
def setschemaidexcludelist ( self, schemaidlist ) : try : self. _ _ schemaidexcluded = { sid : true for sid in schemaidlist } return true except exception as e : logger. exception ( " failing with % s ", str ( e ) ) return false | [
-0.9199910759925842,
0.44371360540390015,
0.4835375249385834,
-0.03208145126700401,
-1.1403453350067139,
1.0801670551300049,
-0.359662264585495,
0.5131425857543945,
1.1222206354141235,
0.5367128849029541,
-1.7425165176391602,
-0.5386029481887817,
-1.9024384021759033,
0.6192836165428162,
... |
def injuries ( self, content, season, week ) : players = [ ] away _ patt = re. compile ( r " dataaway. *? ( \ [. *? \ ] ) ; ", re. multiline | re. ignorecase | re. dotall ) home _ patt = re. compile ( r " datahome. *? ( \ [. *? \ ] ) ; ", re. multiline | re. ignorecase | re. dotall ) awayabbr _ patt = re. compile ( r "... | [
-0.7443180084228516,
-0.38406118750572205,
0.9307144284248352,
-0.9941875338554382,
-0.018323570489883423,
-0.781306803226471,
0.3147335946559906,
0.004896806553006172,
0.5825091600418091,
1.0199556350708008,
0.39196041226387024,
0.271157830953598,
0.20290233194828033,
-0.6214955449104309,... |
def get _ by ( self, layer _ name ) : # se definie el query de la consulta. sql _ string = " " " select id _ muestra, layer _ name, fecha from layers where layer _ name = % ( layer _ name ) s " " " print layer _ name # se construye el diccionario que contiene los parametros del query. cursor = self. db. query ( sql _ s... | [
-0.30602797865867615,
0.12497185915708542,
0.39011043310165405,
-0.01174109522253275,
-0.8960449695587158,
-0.6025367975234985,
-0.6298540830612183,
-0.49410223960876465,
-1.1425533294677734,
0.5094205141067505,
-0.0933222696185112,
-0.02210410311818123,
-0.5605521202087402,
0.867374002933... |
def get _ derivatives ( independent _ param, fun ) : # define a sympy symbol. " " " defining a sympy symbol will be useful to tell the function with respect to which parameter should the function compute the derivative. " " " sym _ ind _ param = sp. symbol ( independent _ param ) # transform the string with the functio... | [
0.18338963389396667,
0.1646673083305359,
0.70674729347229,
0.09286649525165558,
0.3138746917247772,
-0.35089752078056335,
-0.22550885379314423,
0.5717145800590515,
-0.38132771849632263,
-0.30217042565345764,
-0.4910944104194641,
1.3898358345031738,
-0.028771061450242996,
0.2872028350830078... |
def get _ ring _ coords ( resn _ list, matrix, chain, model ) : matrix _ coords = [ ] for state in range ( 1, cmd. count _ states ( ) + 1 ) : coords = [ ] for i, resi in enumerate ( resn _ list ) : stored. coords = [ ] try : cmd. iterate _ state ( state,'model % s and chain % s and resi % s and name % s'% ( model, chai... | [
-0.7042988538742065,
-0.21716414391994476,
0.39162153005599976,
0.2150477170944214,
0.8891114592552185,
-0.26461061835289,
0.41356557607650757,
-0.2550378739833832,
-0.13440439105033875,
-0.0626756101846695,
-0.7861536145210266,
-1.1236449480056763,
-0.44369813799858093,
-0.078436888754367... |
def filter _ from _ errors ( self ) : # real signature unknown ; restored from _ _ doc _ _ pass | [
0.022283559665083885,
-0.011098260059952736,
0.319540411233902,
0.5174165964126587,
-0.7416896224021912,
0.9206061959266663,
0.7541268467903137,
-0.3112260699272156,
0.5781616568565369,
-0.8314950466156006,
0.10996206849813461,
0.10043803602457047,
-0.5345126390457153,
0.04257223755121231,... |
def cat _ multi _ encode _ onerow ( self, data, var, regroup _ dict ) : def find _ newcat ( category, dict ) : for key, value _ lst in dict. items ( ) : if category in value _ lst : return key else : # print ('cannot find the \'{ } \'in the value list \'{ } \ '! '. format ( category, value _ lst ) ) pass cat _ lst = da... | [
-1.1215288639068604,
0.6497930884361267,
0.4845217764377594,
-0.10943680256605148,
0.06919967383146286,
-1.0167982578277588,
-0.15514561533927917,
-0.22377121448516846,
-0.369134783744812,
-0.10667530447244644,
0.03546074777841568,
0.19937664270401,
0.08193007111549377,
0.9750245809555054,... |
def promjeni _ marker _ stil ( self ) : marker = self. combomarkerstil. currenttext ( ) msg ='zahtjev za promjenom stila markera. novi stil = { 0 } '. format ( str ( marker ) ) logging. debug ( msg ) self. defaultgraf [ 4 ] = marker | [
-0.6027113795280457,
-0.060979388654232025,
0.21881061792373657,
0.5688983201980591,
0.2544679343700409,
-0.1323409378528595,
1.6272881031036377,
0.7624998092651367,
-0.7933290004730225,
0.2565622329711914,
-0.9113147854804993,
0.5436913371086121,
-0.6336943507194519,
0.9707499742507935,
... |
def _ _ iter _ _ ( self ) : yield self. r yield self. g yield self. b | [
-0.5272574424743652,
-0.13208337128162384,
0.38907429575920105,
-0.8083372712135315,
0.811332643032074,
0.4579754173755646,
0.5092342495918274,
-1.4095228910446167,
-0.5340460538864136,
-0.4704364836215973,
0.35501015186309814,
0.03407357633113861,
-0.5155820846557617,
-0.1654234528541565,... |
def get _ cv _ tbest ( args, clip, r, score ) : c = args. clip _ y [ clip ] a _ cv = r ['train _ mode'] # mean across folds t _ cv = np. mean ( a _ cv ['t _ train _ % s'% score ] [ c ], axis = 0 ) v _ cv = np. mean ( a _ cv ['t _ val _ % s'% score ] [ c ], axis = 0 ) if score = ='mse': tbest = np. argmin ( v _ cv ) els... | [
-0.4833396077156067,
-0.5285745859146118,
0.705316424369812,
-0.03326045721769333,
-0.10577191412448883,
0.0578630194067955,
0.33712083101272583,
-0.19402854144573212,
-0.3656252324581146,
1.601327896118164,
0.4563426971435547,
-0.07875698059797287,
1.0478887557983398,
-0.5877425074577332,... |
def case14 ( ) : ppc = { " version " :'2'} # # - - - - - power flow data - - - - - # # # # system mva base ppc [ " basemva " ] = 100. 0 # # bus data # bus _ i type pd qd gs bs area vm va basekv zone vmax vmin ppc [ " bus " ] = array ( [ [ 1, 3, 0, 0, 0, 0, 1, 1. 06, 0, 0, 1, 1. 06, 0. 94 ], [ 2, 2, 21. 7, 12. 7, 0, 0, ... | [
0.8357197046279907,
-0.7673764824867249,
1.5311999320983887,
0.23481854796409607,
-0.33629053831100464,
-0.10814458131790161,
1.193315863609314,
0.2089938372373581,
-0.03528720885515213,
0.2169933021068573,
-0.061928585171699524,
0.27986958622932434,
-0.10659589618444443,
0.314943909645080... |
def rank ( self ) : # request ranking for given year, isolate conference and ranking, and reformat conference into # abbrev format. url ='https : / / www. sports - reference. com / cfb / years / { }. html '. format ( self. year1 ) rank = pd. read _ html ( url ) [ 0 ] rank. columns = rank. columns. get _ level _ values ... | [
-1.1249830722808838,
0.6020957827568054,
0.5374911427497864,
0.028875499963760376,
0.7358623743057251,
-0.3697715997695923,
0.1565273106098175,
0.14115414023399353,
-0.3010377585887909,
0.23150873184204102,
0.4139569401741028,
1.0007929801940918,
-0.332978755235672,
-0.47102129459381104,
... |
def _ global _ batch _ size ( self ) : return false | [
-0.15215127170085907,
0.9289780855178833,
0.4835314452648163,
1.1413516998291016,
-0.33243781328201294,
1.7146111726760864,
0.8394910097122192,
0.5376318097114563,
-0.8248403072357178,
-0.3719356954097748,
-1.4266682863235474,
0.21576516330242157,
-1.1897180080413818,
0.8833646178245544,
... |
def compute _ pressure ( self ) : pressure = self. pressure _ sl * ( self. compute _ temperature ( ) / \ self. temperature _ sl ) * * ( - self. g / ( self. r * self. a ) ) return pressure | [
0.4580678343772888,
-0.3781660497188568,
0.18146467208862305,
-0.34718069434165955,
0.30172231793403625,
0.0894957110285759,
0.47231850028038025,
0.515996515750885,
0.018007146194577217,
1.2561132907867432,
0.5651523470878601,
-0.3348584771156311,
-1.1629507541656494,
-0.03672308102250099,... |
def descendent _ by _ id ( self, childid ) : for child in self. children : if child. id = = childid : return child child = child. descendent _ by _ id ( childid ) if child is not none : return child | [
1.7373331785202026,
-0.48181357979774475,
0.5424569249153137,
0.5567016005516052,
-0.5509024262428284,
-0.7386135458946228,
0.15011844038963318,
-0.645322859287262,
-0.03361721336841583,
-0.1961575448513031,
-0.5223215818405151,
0.15381242334842682,
-0.19080659747123718,
0.7863905429840088... |
def add _ aliases ( self, alias, original ) : for name, data in list ( self. _ raw. items ( ) ) : if name. endswith ( original ) : self. _ raw [ name. replace ( original, alias ) ] = data | [
-0.49166807532310486,
-0.26424089074134827,
0.5215232968330383,
-1.0940605401992798,
-1.228467583656311,
0.4886389374732971,
-1.7322441339492798,
1.4547384977340698,
-1.028308629989624,
0.23307214677333832,
-0.8401322960853577,
0.8045285940170288,
0.40643230080604553,
0.25473955273628235,
... |
def _ unmangle _ name ( mangled _ name, class _ name ) : return mangled _ name. replace ( " _ % s " % class _ name. lstrip ('_'), " " ) | [
-0.8403772711753845,
-0.3292303681373596,
0.6867773532867432,
-1.307083249092102,
-1.1957273483276367,
-0.08736461400985718,
-1.4235237836837769,
0.6917293667793274,
-0.36421024799346924,
0.23066198825836182,
-0.4366135597229004,
-0.08944859355688095,
-0.09427595138549805,
-0.0593837797641... |
def make _ idx _ data ( revs, word _ idx _ map, maxlen = 120 ) : x _ train, x _ test, x _ dev, y _ train, y _ dev, = [ ], [ ], [ ], [ ], [ ] for rev in revs : sent = get _ idx _ from _ sent ( rev ['text'], word _ idx _ map ) y = rev ['y'] if rev ['split'] = = 1 : x _ train. append ( sent ) y _ train. append ( y ) elif ... | [
-0.8613452315330505,
0.2132306694984436,
0.5706827044487,
-0.7825340032577515,
-0.36572927236557007,
-0.059334393590688705,
-0.013154195621609688,
0.34531980752944946,
0.23516888916492462,
0.09519591927528381,
0.11407945305109024,
0.5796458721160889,
-0.015057472512125969,
-0.7043717503547... |
def add _ end ( station, year, df ) : ffname = get _ filename ( station, year, 1 ) heads = df. columns. tolist ( ) clength = len ( heads ) dframe = pd. dataframe ( np. array ( [ ['end _ of _ yearly _ data'] * clength, ['-'] * clength, [ months [ 0 ] ] * clength ] ), columns = heads ) dframe = dframe. append ( pd. read ... | [
-0.18827247619628906,
0.028642786666750908,
0.9194123148918152,
0.1734829545021057,
0.1307307481765747,
0.4286334216594696,
-0.26460808515548706,
0.193243607878685,
-0.3184049725532532,
-0.004561331123113632,
0.773517906665802,
0.4074286222457886,
0.08195478469133377,
0.0303107351064682,
... |
def temperature _ by _ city _ country ( city, country, period ) : # perform the sql query query = db. session. query ( globaltemperaturebymajorcity. date, func. avg ( globaltemperaturebymajorcity. land _ average _ temperature ). label ('avg _ temperature') ). filter ( globaltemperaturebymajorcity. city = = city and glo... | [
-0.11497852951288223,
-0.11044968664646149,
0.5323823690414429,
-0.13912402093410492,
-0.9915859699249268,
-0.24374441802501678,
-0.07121078670024872,
0.6682530641555786,
-1.1788238286972046,
1.7602447271347046,
0.024540061131119728,
0.32289454340934753,
-0.22705306112766266,
0.75422674417... |
def type _ handlers ( ) : return [ snowflakepandastypehandler ( ), snowflakepysparktypehandler ( ) ] | [
0.33925455808639526,
0.1406065970659256,
0.3975774049758911,
0.9961491227149963,
0.4957243502140045,
0.4359670579433441,
0.44846591353416443,
-0.43309444189071655,
0.09344035387039185,
-0.2427869290113449,
-1.279427409172058,
0.4954574406147003,
-0.08523941040039062,
-0.13933366537094116,
... |
def comment ( id, * * repeatable ) : res = idaapi. get _ struc _ cmt ( id, repeatable. get ('repeatable ', true ) ) return utils. string. of ( res ) | [
-1.0096843242645264,
-0.34792670607566833,
0.48385560512542725,
-0.7863080501556396,
0.06255117058753967,
-0.7863441705703735,
0.42004624009132385,
-1.0129716396331787,
-0.2654918432235718,
0.44111719727516174,
-0.5797492861747742,
-0.14562863111495972,
-0.30959850549697876,
-0.97364044189... |
def get _ grouped _ tweets ( self, cinema _ run = false, critical _ period = false, group _ size = 3 ) : # get tweets according to timeframe tweets = self. get _ geotweets _ by _ dates ( ) if cinema _ run else database _ helper. select _ geo _ tweets ( self. movieid ) tweets = database _ helper. select _ geo _ tweets (... | [
-0.6154420971870422,
0.7638434171676636,
0.4673914909362793,
-1.4750466346740723,
-0.25721120834350586,
0.16583120822906494,
0.3720441162586212,
-0.42949068546295166,
-0.7472594380378723,
0.7534130811691284,
0.7115750312805176,
0.7321352362632751,
0.1477573961019516,
0.34458184242248535,
... |
def with _ columns ( self, exprs : " list [ expr ] " ) - > " dataframe " : return ( self. lazy ( ). with _ columns ( exprs ). collect ( no _ optimization = true, string _ cache = false ) ) | [
-0.20327652990818024,
0.5184727907180786,
0.3452146351337433,
-0.21659094095230103,
-0.16532205045223236,
-1.3709492683410645,
-0.24084870517253876,
-0.45572760701179504,
-0.8240807056427002,
-0.3263978958129883,
-0.28059157729148865,
0.36607372760772705,
0.20694877207279205,
-0.7172874212... |
def _ _ init _ _ ( self, outputs _ folder = ". / outputs ", ssim _ basic = 1. 0, format _ image = " png ", tesseract _ path = r " c : \ program files \ tesseract - ocr \ tesseract. exe ", ) : super ( ). _ _ init _ _ ( outputs _ folder, ssim _ basic, format _ image, tesseract _ path ) | [
0.6647093892097473,
-0.635384738445282,
0.5302019119262695,
1.1663559675216675,
-0.6567604541778564,
-0.38829946517944336,
0.6451126933097839,
0.39175209403038025,
-0.09185600280761719,
-0.48568058013916016,
0.7973117232322693,
-0.29034218192100525,
1.0143921375274658,
0.08004047721624374,... |
def optimizealignment ( self, maxiterations = 50, runs = 3 ) : print ( " start finding motif " ) # initlialiser la valeur de f et la liste des positions bestf = 0 beststartingpos = [ ] # boucle mere for m in range ( runs ) : # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #... | [
0.5225460529327393,
-0.06654803454875946,
0.9412748217582703,
-0.8318548798561096,
-0.10158978402614594,
-0.31602686643600464,
0.38926243782043457,
0.3116755485534668,
-0.7440787553787231,
0.4049341678619385,
-0.338437557220459,
-0.3710996210575104,
-0.6268556714057922,
0.40634337067604065... |
def write _ to _ netcdf ( lon1, lat1, dep1, vs3d, vp3d, rho3d, output _ path ) : with dataset ( output _ path,'w') as f : f. createdimension ('depth ', len ( dep1 ) + 1 ) f. createdimension ('latitude ', len ( lat1 ) ) f. createdimension ('longitude ', len ( lon1 ) ) longitude = f. createvariable ('longitude ','f4 ', (... | [
0.12504814565181732,
-0.2483547478914261,
0.8897472620010376,
-0.5277099609375,
0.525618851184845,
0.6167325377464294,
0.2745889723300934,
0.15066596865653992,
-0.6970663666725159,
-0.47540482878685,
-0.26494279503822327,
0.06747926771640778,
0.3456342816352844,
0.04869743064045906,
-0.0... |
def validatefusion ( filepath ) : print ( " validating fusion file " ) total _ error = " " warning = " " fusiondf = pd. read _ csv ( filepath, sep = " \ t ", comment = " # " ) fusiondf. columns = [ col. upper ( ) for col in fusiondf. columns ] required _ headers = ['hugo _ symbol ','entrez _ gene _ id ','center ','tumo... | [
-0.3685961663722992,
-0.5452868342399597,
0.8407838940620422,
0.10046544671058655,
0.0278888251632452,
-0.24089351296424866,
-0.0640154480934143,
0.6707955002784729,
-0.8491507768630981,
-0.14680266380310059,
-0.2958579659461975,
0.30996307730674744,
0.03691697120666504,
0.2987541854381561... |
def test _ shift _ to _ rest _ galaxy ( ) : z = 5 rest _ line _ wls = [ 5007, 6563 ] * u. angstrom observed _ spc = spectralcoord ( rest _ line _ wls * ( z + 1 ), redshift = z ) rest _ spc = observed _ spc. to _ rest ( ) # alternatively : # rest _ spc = observed _ spc. with _ observer ( observed _ spec. target ) # alth... | [
0.07294211536645889,
-0.10570409893989563,
0.652651846408844,
-0.14447246491909027,
0.48924729228019714,
0.3458227813243866,
0.771847665309906,
-0.3418640196323395,
0.5868416428565979,
-1.077760100364685,
-0.1972050666809082,
0.40529537200927734,
-0.3498601019382477,
0.5543199777603149,
... |
def patch ( self, request, pk = none ) : return response ( {'method':'patch'} ) | [
-0.7202746272087097,
-0.3526603877544403,
0.3401101231575012,
-0.5227766036987305,
-0.35765570402145386,
-0.008082614280283451,
0.138101726770401,
0.35754284262657166,
0.9455353021621704,
-0.665023922920227,
0.2722776532173157,
-0.4006735384464264,
-0.3407483398914337,
0.04139667749404907,... |
def test _ get _ _ not _ author ( self ) - > none : self. client. force _ login ( self. other _ user ) response = self. client. get ( reverse ('question - update ', kwargs = dict ( pk = self. question. pk ) ), ) assert httpstatus. forbidden = = response. status _ code | [
-0.15651755034923553,
-0.05734249949455261,
0.49118009209632874,
1.3404572010040283,
-0.2118866890668869,
1.3983933925628662,
-0.02528311312198639,
-0.9420239329338074,
0.013209355063736439,
-0.6807746291160583,
0.609504222869873,
0.17269638180732727,
-0.1854242980480194,
-0.45533227920532... |
def numatoms ( self ) : return self. _ traj. numatoms ( ) | [
-0.3421488404273987,
0.40637174248695374,
0.3732573688030243,
-0.18636371195316315,
0.36018458008766174,
0.12172020971775055,
0.5849060416221619,
0.12098689377307892,
0.18204805254936218,
-0.7859968543052673,
-0.667251467704773,
-0.5032113790512085,
1.1253353357315063,
-0.18528150022029877... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.