text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def test _ gf _ write _ tag _ after _ an _ at _ sign ( disabled _ colors, capsys, mocker ) : # given tag = mocker. magicmock ( spec = tag ) tag. name = " tag - a " # when write _ tagline ( tag ) # then stdout = capsys. readouterr ( ). out assert stdout = = " @ tag - a \ n " | [
0.5290667414665222,
-0.7197102904319763,
0.28153935074806213,
0.2515290081501007,
0.8230799436569214,
0.04709229990839958,
0.2460625320672989,
-0.6171757578849792,
-0.5660714507102966,
-0.49014198780059814,
-0.5554872155189514,
-0.6015421152114868,
0.6203428506851196,
0.6932026147842407,
... |
def time _ slot ( self ) - > timeslot : return self. _ time _ slot | [
-0.012970099225640297,
0.5320168733596802,
0.22118110954761505,
-0.5592615008354187,
-0.9219587445259094,
0.3020494878292084,
0.5084167718887329,
-0.35538098216056824,
-0.6043540835380554,
0.24092242121696472,
0.7670633792877197,
-0.022667651996016502,
0.04719594866037369,
-0.1409976035356... |
def doaftersessionends ( self ) : pass | [
-0.12178246676921844,
-1.7012640237808228,
0.4125511348247528,
0.36329275369644165,
-0.36159130930900574,
0.4717569351196289,
0.6366147398948669,
-0.6955143809318542,
1.048067569732666,
0.2683763802051544,
-0.898003339767456,
0.10370197892189026,
0.28362247347831726,
-0.15647196769714355,
... |
def _ confirm _ persistence ( self, resource : str, renamed _ resource : str ) - > dict : # prior to loading from the filesystem, remove any associated cache entry ( likely on updates ) # so that _ load _ resource ( ) hits the filesystem - then adds the item to the cache. self. cache. remove _ item ( resource ) try : m... | [
0.6366367340087891,
-0.23429514467716217,
0.5866644382476807,
-0.4932778775691986,
-0.7207778692245483,
-0.47631722688674927,
-0.9604331851005554,
-0.2379571497440338,
0.28868991136550903,
1.2676427364349365,
0.216016948223114,
0.07162245362997055,
-0.09922057390213013,
-0.0135860228911042... |
def test _ reviewrating _ to _ pure _ activity ( self, * _ ) : status = models. reviewrating. objects. create ( rating = 3. 0, user = self. local _ user, book = self. book, ) activity = status. to _ activity ( pure = true ) self. assertequal ( activity [ " id " ], status. remote _ id ) self. assertequal ( activity [ " ... | [
-0.4472249746322632,
-0.5107871890068054,
0.6111718416213989,
-0.4795304238796234,
0.17146533727645874,
1.005405068397522,
-0.32970091700553894,
-0.025899095460772514,
0.377233624458313,
0.2132333368062973,
-0.4715263247489929,
0.25684449076652527,
-0.5924848914146423,
-0.8754080533981323,... |
def genspace ( start, stop, num, fn = none ) : fn = fn or ( lambda x : x ) # linspace between the curved start and stop values. t = jnp. linspace ( 0., 1., num ) s = fn ( start ) * ( 1. - t ) + fn ( stop ) * t if fn = = ( lambda x : x ) : inv _ fn = fn else : # ask oryx for the inverse of ` fn `. inv _ fn = oryx. core.... | [
-0.30105289816856384,
0.422079473733902,
0.6375979781150818,
0.05904190614819527,
-0.6328434348106384,
-0.3138108551502228,
-0.17639563977718353,
0.16405747830867767,
-0.09871313720941544,
-0.43269115686416626,
-0.013505090959370136,
0.625012218952179,
0.5385727286338806,
-1.40479326248168... |
def to _ list _ schema ( self, * args, * * kwargs ) : return { } | [
-1.4055585861206055,
-0.8261860013008118,
0.3055846691131592,
-0.760260283946991,
0.37346938252449036,
-0.531648576259613,
-1.2173986434936523,
0.9218440651893616,
0.6731407046318054,
0.10712390393018723,
-1.5635795593261719,
0.001246171654202044,
0.18353255093097687,
0.5344782471656799,
... |
def asserttagsequal ( self, actual, expected ) : empty _ tags = { ea. graph : false, ea. meta _ graph : false, ea. run _ metadata : [ ], ea. tensors : [ ], } # verifies that there are no unexpected keys in the actual response. # if this line fails, likely you added a new tag type, and need to update # the empty _ tags ... | [
0.06794728338718414,
-0.016384989023208618,
0.4481200873851776,
-0.07238282263278961,
1.543850064277649,
0.3728207051753998,
-0.2590920329093933,
-0.3958151936531067,
-0.36675941944122314,
0.12810035049915314,
-0.6898389458656311,
0.4289410412311554,
0.10679183900356293,
0.6533306837081909... |
def size ( self ) - > int : return self. _ get _ detail ( " size " ) | [
0.15783068537712097,
1.7124284505844116,
0.3579370975494385,
0.3834409713745117,
1.0817326307296753,
0.03585879132151604,
0.812035322189331,
0.19070526957511902,
0.3148864507675171,
-1.1547472476959229,
-0.34247520565986633,
0.6421716809272766,
-0.3012092709541321,
-0.38238149881362915,
... |
def least _ squares ( y, tx, computeloss = true ) : a = tx. t. dot ( tx ) b = tx. t. dot ( y ) w = np. linalg. solve ( a, b ) if computeloss : loss = compute _ loss ( y, tx, w ) return w, loss else : return w | [
0.2883497178554535,
-0.5785011649131775,
0.7055217623710632,
-0.4726988673210144,
-0.6560822129249573,
-1.1849448680877686,
-0.34404680132865906,
-0.7093197703361511,
0.3782788813114166,
0.7234951257705688,
0.4096381664276123,
0.2837981879711151,
0.42742884159088135,
-0.1402140110731125,
... |
def cholesky _ solve ( a, b, half _ bandwidth = none ) : if not a. is _ symmetric ( ) : raise valueerror ( " matrix is not symmetric " ) if not a. is _ square ( ) : raise valueerror ( " matrix is not square : { } ". format ( a. shape ) ) n = a. rows a = a. clone ( ) l = sparsematrix2d. zeros ( n, n ) y = b. clone ( ) f... | [
0.7638304233551025,
-0.44538813829421997,
0.943148136138916,
-0.14591601490974426,
-0.42757201194763184,
-0.787697434425354,
0.061444833874702454,
-0.0513216108083725,
0.46115389466285706,
0.6406736373901367,
0.3351086676120758,
0.211822509765625,
-0.32803472876548767,
0.09212440997362137,... |
def setproctitle ( title ) : if setproctitle _ mod is none : return enabled = _ enabled if not enabled : try : enabled = int ( os. environ. get ( " dask _ parent ", " " ) )! = os. getpid ( ) except valueerror : # pragma : no cover pass if enabled : setproctitle _ mod. setproctitle ( title ) | [
0.2115371972322464,
0.4262453317642212,
0.690022349357605,
0.6393678188323975,
-0.4398365318775177,
0.48943987488746643,
-0.11591937392950058,
-0.305304616689682,
0.03577949106693268,
-0.12010034173727036,
0.452504962682724,
0.2774297297000885,
-0.519853949546814,
0.10127075761556625,
-0... |
def get _ likelihood ( self, parameter _ distribution, time, fit _ function _ electrons, parameters _ electron, fit _ function _ proton = none, parameters _ proton = none, energy _ range = none ) : # load everything into the class self. electron _ fit _ function = fit _ function _ electrons self. proton _ fit _ functio... | [
-0.035686999559402466,
-0.9375455379486084,
0.7542322278022766,
-0.4173407554626465,
0.6564894914627075,
-0.04376121237874031,
-2.0118677616119385,
0.7040890455245972,
-0.8409637808799744,
0.15353940427303314,
-0.37585172057151794,
0.29775312542915344,
-0.544172465801239,
0.118726775050163... |
def set ( self, var _ name, var _ value ) : if self. _ lock. acquire ( true, 1 ) : try : if not var _ name in self. _ variables : self. _ logger. debug ( f " variable { var _ name } not found in globals " ) return false else : self. _ variables [ var _ name ] = var _ value return true except exception as e : self. _ lo... | [
-0.6772027611732483,
0.3381998538970947,
0.838612973690033,
-1.0693944692611694,
-0.18434976041316986,
0.3499488830566406,
-0.29926279187202454,
-0.6414352655410767,
-0.4840990900993347,
0.8032957315444946,
-0.4971765875816345,
0.19137941300868988,
-1.2515413761138916,
0.0900423526763916,
... |
def create ( cls, enabled, batch _ prediction _ job, name = none, schedule = none, ) : batchpredictionjob. _ job _ spec. check ( batch _ prediction _ job ) job _ spec = to _ api ( batch _ prediction _ job ) payload = { " name " : name, " enabled " : enabled, " schedule " : to _ api ( schedule ), } payload. update ( * *... | [
0.40670865774154663,
-0.2810341417789459,
0.4710395038127899,
1.0142077207565308,
-0.6418730020523071,
0.8684966564178467,
-1.4167548418045044,
0.5801243782043457,
-1.002201795578003,
0.3045790493488312,
-1.258771300315857,
0.5771461725234985,
-0.806149959564209,
0.054483506828546524,
-0... |
def dependencies ( ) : return [ {'dependency':'setuptools ','version': setuptools. _ _ version _ _ } ] | [
-1.1166585683822632,
-1.198379397392273,
0.41707706451416016,
-0.18320459127426147,
0.14902976155281067,
-0.18764613568782806,
0.21208713948726654,
0.05143694579601288,
-0.5461674928665161,
1.1631674766540527,
-2.008166551589966,
-1.022773027420044,
1.2961584329605103,
0.5882208943367004,
... |
def parse _ checksums ( digest = none ) : def _ parse _ checksums ( data ) : url = data ['url'] urlsplit = url. split ('/') topurl ='/ '. join ( urlsplit [ : - 1 ] ) if digest is none : # deduce from url's file extension filename = urlsplit [ - 1 ] base, ext = splitext ( filename ) digest _ = ext if ext else digest con... | [
0.18912480771541595,
-0.7009826898574829,
0.7822937965393066,
-0.6100566387176514,
-0.2191348373889923,
-0.5931490659713745,
-0.068654865026474,
0.2362111657857895,
0.6294692158699036,
-1.006826639175415,
-0.3839588761329651,
-0.9794416427612305,
0.95914626121521,
0.3883572816848755,
-0.... |
def logpdf _ link ( self, link _ f, y, y _ metadata = none ) : return - link _ f + y * np. log ( link _ f ) - special. gammaln ( y + 1 ) | [
-0.13422420620918274,
-1.1098339557647705,
0.5460675358772278,
-0.011117110960185528,
1.0851284265518188,
-0.04257958009839058,
-0.42563995718955994,
0.5432100296020508,
-0.34312179684638977,
-1.3382054567337036,
1.127968668937683,
1.0394787788391113,
0.4251887798309326,
-0.764972209930419... |
def is _ too _ deviated ( percentage _ change, mean, std ) : diff = percentage _ change - mean return diff > 2 * std | [
0.206601083278656,
0.19436128437519073,
0.6081178784370422,
1.0034654140472412,
-1.131714105606079,
0.7423771023750305,
0.006438609212636948,
-0.3749743103981018,
-0.5351352095603943,
-0.1593296378850937,
-0.22160707414150238,
1.6166791915893555,
0.32114654779434204,
0.034318894147872925,
... |
def calc _ color _ cos ( current _ time, start, end, min _ val, max _ val ) : if current _ time < = start or current _ time > = end : return min _ val period = end - start offset _ time = current _ time - start return int ( ( math. cos ( float ( offset _ time ) / period * 2 * math. pi ) * - 1 + 1 ) * ( max _ val - min ... | [
-0.019822848960757256,
-0.6456988453865051,
0.5620316863059998,
-0.0340416356921196,
-0.9389849901199341,
-0.00021865119924768806,
-0.36407119035720825,
0.28091442584991455,
-1.1464735269546509,
0.5604757070541382,
0.33807602524757385,
1.0516414642333984,
0.05113108828663826,
-0.0573590621... |
def publish ( self, topic, message, properties ) : for session in self. iter _ subscribers ( topic ) : session. client. publish ( topic, message, false, properties ) | [
0.1380530297756195,
-1.1227649450302124,
0.2238987684249878,
0.6766775846481323,
0.7060671448707581,
-0.08983314037322998,
-0.21979305148124695,
-0.5891801714897156,
-1.030585527420044,
0.34343987703323364,
1.480349063873291,
-0.17371279001235962,
-1.2411366701126099,
0.8180973529815674,
... |
def test _ category _ length ( self ) : response = self. app. post ('/ api / v1 / category ', data = json. dumps ( self. data3 ), content _ type ='application / json') result = json. loads ( response. data. decode ( ) ) self. assertequal ( result [ " message " ], " input a category name that is atleast 6 characters " ) | [
-0.015685636550188065,
0.975602924823761,
0.31155022978782654,
-0.7029826641082764,
0.010769818909466267,
0.17619507014751434,
-0.5213998556137085,
-0.3553287982940674,
-0.04804788529872894,
-0.6303709745407104,
-1.0162938833236694,
-0.09928116947412491,
-0.06673120707273483,
0.05407821759... |
def test _ ground _ cancellation ( self ) : ( nrg, naz, data _ stack _ dict, wave _ number _ dict, multi _ master _ flag, enhanced _ forest _ height, equalization _ flag, resolution _ m _ slant _ rg, off _ nadir _ angle, slope, ) = self. initial _ values ( ) notched _ pol _ dict = ground _ cancellation ( data _ stack _... | [
0.7053682208061218,
-0.2435069978237152,
0.46100249886512756,
0.12011433392763138,
0.00999353639781475,
1.2928826808929443,
0.7091631889343262,
0.2447785884141922,
-0.4694560170173645,
-0.2010572999715805,
-0.38411837816238403,
-0.18220782279968262,
-0.5925887823104858,
1.1947396993637085,... |
async def _ subscribe _ to _ button _ status ( self ) : _ log. debug ( " subscribing to button status updates " ) try : for button in self. buttons : response, _ = await self. _ subscribe ( f " / button / { button } / status / event ", self. _ handle _ button _ status, ) _ log. debug ( " subscribed to button % s status... | [
0.021938838064670563,
-0.27147459983825684,
0.3736734986305237,
0.6739187836647034,
0.42722365260124207,
0.21843388676643372,
-0.47296589612960815,
-0.06406258046627045,
0.5089744925498962,
-0.45457643270492554,
-0.8643127083778381,
-0.28264349699020386,
0.3270462155342102,
0.8068693876266... |
def transform ( self, x, y = none ) : x ['hour'] = x. index. hour # x ['weekday name'] = x. index. weekday _ name x ['weekday'] = x. index. weekday x ['weekofyear'] = x. index. weekofyear x ['month'] = x. index. month x ['quarter'] = x. index. quarter x ['year'] = x. index. year x ['dom'] = x. index. day x ['weekend'] ... | [
-1.0947463512420654,
0.5219174027442932,
0.6527249813079834,
-1.1782541275024414,
-0.13982617855072021,
-0.4136577248573303,
-0.6275575757026672,
-0.3534110188484192,
0.467400461435318,
-0.4064987003803253,
-0.4471566379070282,
0.4628458619117737,
0.7434331178665161,
-0.5503623485565186,
... |
def _ _ init _ _ ( self, n _ components = 2, perplexity = 30. 0, early _ exaggeration = 12. 0, learning _ rate = 200. 0, n _ iter = 1000, n _ iter _ without _ progress = 300, min _ grad _ norm = 1e - 7, metric = " euclidean ", init = " random ", verbose = 0, random _ state = none, method = " exact ", angle = 0. 5, n _ ... | [
0.6516816020011902,
0.18947085738182068,
0.7760383486747742,
0.07319413870573044,
-0.14509999752044678,
0.34849080443382263,
0.346867173910141,
0.4930126368999481,
0.3903654217720032,
-0.12209567427635193,
-0.06931562721729279,
-0.270783931016922,
0.04485045745968819,
0.856212854385376,
... |
def test _ devicemanager _ get _ service ( name, device _ manager ) : device _ manager. scan ( ) # should not raise a keyerror service = device _ manager. services [ name ] assert service. name = = name | [
-0.5592414140701294,
0.3279758393764496,
-0.04086397588253021,
0.0035258508287370205,
-0.5400555729866028,
-0.33956366777420044,
-0.19227509200572968,
-0.9063654541969299,
0.2631843388080597,
-1.193945050239563,
0.2233705073595047,
0.1260455995798111,
-0.49544471502304077,
0.20684891939163... |
def move ( self, direction ) : if self. sector. movepossible ( direction ) : newsector = self. sector. neighbors [ direction ] self. sector = newsector ev = charactermoveevent ( self ) self. evmananger. post ( ev ) | [
-0.4089721739292145,
-0.6211477518081665,
0.5490413308143616,
-0.43391695618629456,
0.5489552617073059,
0.5528132915496826,
-0.092222198843956,
-0.9434183835983276,
0.4207998216152191,
-0.0672990009188652,
-0.8241391777992249,
0.28744837641716003,
0.10303833335638046,
0.6642574071884155,
... |
def _ writemetadata ( self, logdir, summary _ metadata, nonce = " " ) : summary = summary _ pb2. summary ( ) summary. value. add ( tensor = tensor _ util. make _ tensor _ proto ( [ " po ", " ta ", " to " ], dtype = tf. string ), tag = " you _ are _ it ", metadata = summary _ metadata, ) writer = test _ util. filewriter... | [
0.031339019536972046,
-0.13048337399959564,
0.6432259678840637,
-0.22679942846298218,
0.909479022026062,
0.7735781669616699,
-0.11399495601654053,
0.34816277027130127,
-0.5601515769958496,
0.7478926181793213,
0.24359002709388733,
0.5279461145401001,
0.3261916935443878,
-0.6278008222579956,... |
async def test _ all _ security _ warnings ( self ) : self. set _ source _ parameter ( " security _ types ", [ " vulnerability ", " security _ hotspot " ] ) show _ component _ json = { } response = await self. collect ( get _ request _ json _ side _ effect = [ show _ component _ json, self. vulnerabilities _ json, self... | [
0.45633018016815186,
-0.3175755739212036,
0.42580634355545044,
0.5579237341880798,
1.0823339223861694,
1.0504865646362305,
-0.18243995308876038,
-0.2919507920742035,
0.2237434834241867,
-0.26946574449539185,
-0.2220168113708496,
-0.2627163827419281,
0.6044967174530029,
0.8058196306228638,
... |
def _ _ init _ _ ( self ) : name = " ensure redshift clusters use enhanced vpc routing " id = " ckv _ aws _ 321 " supported _ resources = ['aws _ redshift _ cluster'] categories = [ checkcategories. general _ security ] super ( ). _ _ init _ _ ( name = name, id = id, categories = categories, supported _ resources = sup... | [
0.8025732040405273,
0.6471144556999207,
0.6265967488288879,
0.9954647421836853,
0.5833919644355774,
0.4178282916545868,
-0.34270256757736206,
-0.16407938301563263,
0.2288469523191452,
0.2269616574048996,
-0.7652497291564941,
0.19330839812755585,
0.021568646654486656,
0.890317976474762,
0... |
async def search _ for _ game ( self, ctx : ctx, mode : parse _ gamemode, main _ thinking _ time : parse _ td, fixed _ extra _ time : parse _ td, time _ increment _ per _ turn : parse _ td ) : ctx. session. find _ game ( main _ thinking _ time, fixed _ extra _ time, time _ increment _ per _ turn, mode ) await ctx. send... | [
-0.6175606846809387,
0.5322546362876892,
0.6822385787963867,
0.2944352328777313,
0.7006832361221313,
0.1811012178659439,
-1.1284502744674683,
-0.8631653189659119,
-0.4949531555175781,
0.1886231154203415,
0.01721061021089554,
0.48152631521224976,
-1.0170544385910034,
-0.20485690236091614,
... |
def test _ list _ alumno _ admin ( self ) : self. client. force _ authenticate ( user = self. user _ admin ) response = self. client. get ( " / api / alumnos / list / " ) self. assertequal ( response. status _ code, status. http _ 200 _ ok ) self. assertequal ( response. data. get ( " count " ), 4 ) | [
0.4633585512638092,
0.3450048267841339,
0.39831942319869995,
0.008334540762007236,
0.9133015275001526,
1.2471532821655273,
-0.8360457420349121,
-0.07331354916095734,
0.19109344482421875,
-0.36062389612197876,
-1.291405439376831,
1.6142085790634155,
0.9550850987434387,
-0.01892523653805256,... |
def _ _ init _ _ ( self, map _ proxy : mapproxy, game _ object _ proxy : gameobjectproxy, game _ uncertainty _ proxy : gameuncertaintyproxy, player : playertag ) : super ( ). _ _ init _ _ ( map _ proxy, game _ object _ proxy, game _ uncertainty _ proxy, player ) | [
-0.278919517993927,
-0.6802130341529846,
0.6811033487319946,
-0.17329387366771698,
-0.03442405164241791,
0.4750623106956482,
-0.7101098299026489,
0.7303401827812195,
-0.5607156753540039,
-0.04868903383612633,
0.018217986449599266,
-0.39731308817863464,
-0.023700058460235596,
-0.59342038631... |
def publish ( sensors ) : # check if mqtt is not connected to a broker or the sensor list is empty if'mqtt _ client'not in local _ vars or not sensors : return # separate out the sensor dictionaries for original _ sensor in sensors : sensor = original _ sensor. copy ( ) if'topic'not in sensor : logger. warning ( f "'to... | [
-0.5239646434783936,
-0.8059509992599487,
0.3267555236816406,
-0.04823945462703705,
-0.025317488238215446,
0.16196833550930023,
-0.4555518925189972,
-0.16120260953903198,
-0.22689545154571533,
0.30688855051994324,
-0.05347444862127304,
-0.06393752992153168,
-0.7624219059944153,
1.311480283... |
def static _ lib _ srcs ( self, lib _ dir _ path ) : return self. _ _ static _ lib _ srcs _ map [ lib _ dir _ path ] | [
-0.9342381358146667,
-1.0543248653411865,
0.3268836736679077,
-0.11027112603187561,
0.17102503776550293,
0.07391957193613052,
-0.4199163317680359,
-0.5501088500022888,
0.36052176356315613,
-0.32672545313835144,
-0.32165083289146423,
0.09351052343845367,
-0.12429537624120712,
0.176043808460... |
async def upload ( self, stream, path, conflict ='replace ', * * kwargs ) : path, exists = await self. handle _ name _ conflict ( path, conflict = conflict ) stream. add _ writer ('md5 ', streams. hashstreamwriter ( hashlib. md5 ) ) headers = {'content - length': str ( stream. size ) } # this is usually set in boto. s3... | [
-0.5667124390602112,
0.16877339780330658,
1.0071736574172974,
0.39278146624565125,
0.009923284873366356,
0.07034116983413696,
-0.15072646737098694,
-0.5746238827705383,
-0.3891545236110687,
0.8189026713371277,
-1.2548209428787231,
-0.361661434173584,
-0.6887110471725464,
-0.745705187320709... |
def test _ login _ required ( self ) : url = reverse ('booking : booking _ history') resp = self. client. get ( url ) self. assertequal ( resp. status _ code, 302 ) | [
-0.6167863011360168,
0.6345857977867126,
0.5190091133117676,
0.7153475880622864,
0.26978492736816406,
2.0191617012023926,
0.5451781153678894,
0.8846895098686218,
-0.3685827851295471,
-1.2260857820510864,
-0.14010852575302124,
0.6482027769088745,
0.24311615526676178,
-0.23152126371860504,
... |
def append ( self :'linked _ list ', element : any ) - >'linked _ list': return self. insert ( lambda x : false, element ) | [
-0.04489987716078758,
1.0335131883621216,
0.3293400704860687,
0.536007285118103,
-0.39057457447052,
0.649579644203186,
-0.6999654769897461,
0.3961334824562073,
0.5759532451629639,
-0.4693931043148041,
-0.8313195109367371,
0.12805035710334778,
-1.139268398284912,
0.6476477384567261,
0.276... |
def add _ object ( self, index ='', new _ object _ list = none, # the displayed text of note new _ object _ list2 = none, # full text of note l _ prop = none, # keyset x _ prop = none, y _ pos = 0, x _ pos = 0, use _ second = false, for _ show = false ) : index = str ( index ) if l _ prop is none : l _ prop = set ( ) i... | [
-0.5044000744819641,
-0.3453492224216461,
1.1957095861434937,
-0.8291273713111877,
-0.46905624866485596,
0.08423970639705658,
0.45453161001205444,
0.03085952252149582,
0.062253039330244064,
0.7230793237686157,
-0.6754873394966125,
0.13915187120437622,
0.19973784685134888,
-0.50979739427566... |
def iv ( self ) - > bytearray : return self. _ init _ vect [ len ( self. _ init _ vect ) - self. block _ size : : ] | [
-0.35686159133911133,
-0.5880782008171082,
0.7435373067855835,
0.825343906879425,
0.28534576296806335,
0.2520231604576111,
0.9833196401596069,
-0.6114655137062073,
-0.20317891240119934,
-0.45898622274398804,
-0.8713354468345642,
1.1718939542770386,
-0.9611773490905762,
-0.427469402551651,
... |
def server ( cls, ip _ port, app _ name, log _ file ) : logger = logging. getlogger ( app _ name ) logger. setlevel ( logging. debug ) # logging. error fh = logging. filehandler ( log _ file ) fh. setlevel ( logging. debug ) log _ format ='% ( asctime ) - 15s - % ( name ) s - % ( levelname ) - 8s - % ( message ) s'form... | [
0.6026272177696228,
-0.988127589225769,
0.8378071784973145,
-0.19767843186855316,
-0.43679872155189514,
0.8236878514289856,
-0.4606388807296753,
-0.06684522330760956,
-0.3772374093532562,
-0.2315225601196289,
-0.1581730991601944,
-0.2723357081413269,
-0.6399869322776794,
-0.018121356144547... |
def _ generate _ evolution _ contents ( self, evolution _ label = none ) : evolution _ contents = self. evolver. iter _ evolution _ content ( ) if evolution _ label : # we're writing the hinted evolution files to disk. notify the user # and begin writing. verbosity = self. verbosity if verbosity > 0 : self. stdout. wri... | [
-0.006684177555143833,
0.46070006489753723,
0.79543137550354,
0.8626416325569153,
0.7480219602584839,
0.24269483983516693,
0.10819588601589203,
-0.22063758969306946,
-0.690832257270813,
0.5865203142166138,
0.20190203189849854,
-0.16667822003364563,
0.6637934446334839,
0.44416534900665283,
... |
def test _ stopserviceremoveroute ( self ) : self. component. startservice ( ) self. component. stopservice ( ) self. assertnotin ('component ', self. router. routes ) | [
-0.08322592079639435,
-0.631333589553833,
0.32578402757644653,
-0.1565934717655182,
0.7519903779029846,
0.38051795959472656,
0.0708354189991951,
0.39989373087882996,
0.027919569984078407,
-0.6876773834228516,
0.05258554592728615,
-0.7564181089401245,
-0.9488176107406616,
0.377462238073349,... |
def flipin _ it ( cake _ list, idx ) : for i, side in enumerate ( cake _ list [ : idx ] ) : cake _ list [ i ] = ( side + 1 ) % 2 return cake _ list | [
-1.2946640253067017,
0.5605345964431763,
0.35508400201797485,
-0.28893187642097473,
-0.2177361100912094,
0.3644483685493469,
-0.06180942431092262,
1.5379409790039062,
0.18505831062793732,
0.16033759713172913,
-1.5372415781021118,
0.15166383981704712,
-0.34545591473579407,
0.696175217628479... |
def generate _ log _ normal _ shocks ( vol, num _ shocks = 780 ) : rand _ norm _ vector = np. random. normal ( loc = 0, scale = 1, size = num _ shocks ) shock _ vector = np. exp ( vol * rand _ norm _ vector ) return shock _ vector | [
-0.5366287231445312,
-0.5665414929389954,
0.6517826914787292,
-0.6031708717346191,
-0.6139301061630249,
0.5677422881126404,
-0.11697260290384293,
0.13600270450115204,
1.279395341873169,
0.2677023708820343,
-0.14160318672657013,
0.6174331307411194,
-0.8669390678405762,
-0.5556625723838806,
... |
def issue _ request ( device, commands ) : auth = httpbasicauth ('admin ','admin') url ='http : / / { } / command - api '. format ( device ) payload = { " jsonrpc " : " 2. 0 ", " method " : " runcmds ", " params " : { " format " : " json ", " timestamps " : false, " autocomplete " : false, " expandaliases " : false, " ... | [
-1.6688416004180908,
0.36061641573905945,
0.8897733092308044,
-0.16229228675365448,
-0.3123359978199005,
-0.6121442317962646,
-0.8425894975662231,
-0.6775604486465454,
0.43680909276008606,
0.07803108543157578,
0.1502181589603424,
0.48018714785575867,
-1.019398808479309,
0.3223203718662262,... |
def generate _ ismn _ upscaling _ validation ( ) : run = validationrun ( ) run. start _ time = datetime. now ( tzlocal ( ) ) run. save ( ) # here ref and non ref switch places ref _ c = datasetconfiguration ( ) ref _ c. validation = run ref _ c. dataset = dataset. objects. get ( short _ name = default _ non _ reference... | [
-0.2675779461860657,
-0.3598646819591522,
0.6766818761825562,
-0.35175251960754395,
-0.05345318466424942,
0.45165905356407166,
-0.3218475580215454,
0.12646685540676117,
-0.16645555198192596,
0.6556915640830994,
-0.5029882788658142,
-0.019090687856078148,
0.17382177710533142,
0.954388916492... |
def test _ readfile ( rootdir, intercompartylist ) : test _ file = os. path. join ( rootdir, datafile ) result = intercompartylist. readfile ( test _ file ) verify _ answer ( result, nolist ) | [
0.6508615016937256,
0.11034731566905975,
0.3671312928199768,
-0.10710534453392029,
0.5113255977630615,
1.0915521383285522,
0.11077969521284103,
0.8591713905334473,
-0.8855546712875366,
-0.9941967725753784,
0.006200571544468403,
-0.4517294466495514,
-1.4328714609146118,
-0.10255510360002518... |
def query _ int _ attribute ( self, target, display _ mask, attr ) : reply = nvctrlqueryattributereplyrequest ( display = self. display, opcode = self. display. get _ extension _ major ( extname ), target _ id = target. id ( ), target _ type = target. type ( ), display _ mask = display _ mask, attr = attr ) if not repl... | [
-0.4805904030799866,
-0.07708479464054108,
0.5545861721038818,
-0.729335606098175,
-0.7329690456390381,
-0.3813580274581909,
0.31658074259757996,
-1.4834554195404053,
0.8109244108200073,
0.21164484322071075,
0.42403560876846313,
0.8293643593788147,
-0.9665093421936035,
-0.45183390378952026... |
def _ _ locator _ _ ( self ) : if self. id is not none : return ('/ / div [ normalize - space ( @ id ) = " { } " and'' contains ( @ class, " modal " ) and'' contains ( @ class, " fade " ) and''. / / div [ contains ( @ class, " about - modal - pf " ) ] ] '. format ( self. id ) ) else : return self. root _ loc | [
-0.2286427915096283,
-1.0286122560501099,
0.5157309174537659,
0.16118048131465912,
-0.4130649268627167,
-0.4715154469013214,
0.4911399781703949,
-0.14244258403778076,
0.9623106718063354,
-0.45534756779670715,
0.8908731341362,
0.19764214754104614,
-0.12704524397850037,
1.3044804334640503,
... |
def connect _ to _ database ( self ) : engine = create _ engine ( " sqlite : / / / books. db ", echo = true ) session = sessionmaker ( bind = engine ) session = session ( ) return session | [
-0.5124983787536621,
-0.702247679233551,
0.3088524043560028,
0.07495347410440445,
0.3006046712398529,
0.40253520011901855,
-0.2761620581150055,
-0.6923777461051941,
-0.698322594165802,
0.162932887673378,
0.5825479626655579,
-0.9063642024993896,
-0.1168208047747612,
-0.5604665279388428,
0... |
def test _ get _ quote ( self, test _ client ) : response = test _ client. get ( " / quote " ) assert response. status _ code = = 200 assert json. loads ( response. data. decode ( " utf - 8 " ) ) [ " quote " ] # quote is random, can't check for specific one assert response. headers. get ( " content - type " ) = = " app... | [
-0.30084583163261414,
-0.20286314189434052,
0.4583876132965088,
0.32897046208381653,
1.492491364479065,
-0.16796551644802094,
-0.8080695271492004,
-0.28782978653907776,
0.23785750567913055,
-0.5409476161003113,
0.15851303935050964,
0.47270914912223816,
-0.392930269241333,
0.013909619301557... |
def opt _ lmfit ( pars, myinput = none, x = none, err = none, data = none ) : p = _ extract _ gh _ params ( pars, parnames ) gh = np. concatenate ( ( [ 1. 0 ], p ) ) ufit = gausshermite ( x, gh ) gh [ 0 ] = _ solve _ amplitude ( data, ufit, err ) if err is none : res = _ fitgh _ residuals ( gh, x, data ) else : res = _... | [
0.3571073114871979,
0.05373315513134003,
0.7627614140510559,
-0.48863598704338074,
-0.06981270760297775,
0.4500724673271179,
-1.1534013748168945,
0.3240140378475189,
-0.18913793563842773,
0.02919839136302471,
-0.05583652853965759,
0.6286174654960632,
-1.5868271589279175,
-0.032081685960292... |
def _ pari _ modulus ( self ) : f = pari ( str ( self. modulus ( ) ) ) return f. subst ('x ','a') * pari ( " mod ( 1, % s ) " % self. characteristic ( ) ) | [
-0.48987215757369995,
-0.6335180401802063,
0.4641524851322174,
-0.8392943143844604,
-0.45885592699050903,
0.2901392877101898,
-0.4769382178783417,
0.6353442668914795,
0.3935356140136719,
-0.14989587664604187,
0.6447902917861938,
0.11476892232894897,
-0.7085869312286377,
-0.7933008670806885... |
def _ reconcile _ sea ( db _ sea, server _ sea, db _ vio _ server, context, db _ session ) : msg = ( ras. vif _ get _ msg ('info ','reconcile _ sea _ start') % {'host': db _ vio _ server. get _ host _ name ( ),'vios': db _ vio _ server. lpar _ id,'adpt': db _ sea. name } ) ras. trace ( log, _ _ name _ _, ras. trace _ d... | [
-0.0884295254945755,
-0.741088330745697,
0.6234170198440552,
-0.30667340755462646,
0.5384970903396606,
-0.42450234293937683,
0.39340803027153015,
0.2386431246995926,
0.5750728845596313,
0.9587848782539368,
-0.2723441421985626,
0.7603545784950256,
0.25008708238601685,
0.5837854743003845,
... |
def do _ final _ plots ( self, make _ plots ) : # gather all populations to a single island s _ pop, p _ pop, t _ pop = self. isle. dump _ populations ( ) s _ pop = self. comm. gather ( s _ pop, root = 0 ) p _ pop = self. comm. gather ( p _ pop, root = 0 ) t _ pop = self. comm. gather ( t _ pop, root = 0 ) if self. com... | [
0.4186510741710663,
0.09578882157802582,
0.6545217633247375,
-0.1231151670217514,
0.41633540391921997,
0.9452936053276062,
0.9791315793991089,
0.2546914517879486,
-0.5293187499046326,
-0.16426044702529907,
0.37636688351631165,
0.43537437915802,
0.4077069163322449,
0.28113171458244324,
0.... |
def user ( name = none ) : if name is none : rabbit _ env [ " user " ] = get _ user ( ) rabbit _ env [ " password " ] = get _ password ( ) local ( " { rabbitmqctl } { user } { password } ". format ( * * rabbit _ env ) ) | [
-0.2210889458656311,
-0.25470051169395447,
0.5337035655975342,
0.6029371619224548,
-0.4106615483760834,
-0.2998369634151459,
-0.32596275210380554,
0.37540531158447266,
-0.09049312025308609,
0.007485847920179367,
-1.5063914060592651,
1.1594504117965698,
-0.3920474648475647,
0.47430005669593... |
def contador _ divisores ( numero : int ) - > int : cont = 0 for i in range ( 1, numero + 1 ) : if numero % i = = 0 : cont + = 1 return cont | [
-0.15071053802967072,
0.5487024188041687,
0.5300905108451843,
0.3764389753341675,
-0.6924367547035217,
-0.011439826339483261,
0.7074969410896301,
0.22289738059043884,
-0.4450714886188507,
-0.1320258527994156,
0.3547797203063965,
-0.027598757296800613,
-0.9102714657783508,
0.641008019447326... |
def test _ _ constant _ percent _ point ( self ) : # setup instance = univariate ( ) instance. constant _ value = 3 x = np. array ( [ 0. 0, 0. 1, 0. 2, 0. 3, 0. 4, 0. 5 ] ) expected _ result = np. array ( [ 3, 3, 3, 3, 3, 3 ] ) # run result = instance. _ constant _ percent _ point ( x ) # check compare _ nested _ itera... | [
0.29891955852508545,
0.36036935448646545,
0.5934635400772095,
0.6242842674255371,
-0.017416788265109062,
1.1305583715438843,
0.3732413947582245,
0.41109806299209595,
-0.33898162841796875,
0.7018064856529236,
-0.3790229856967926,
-0.6279813647270203,
-0.6382609605789185,
-0.4066888689994812... |
def test _ copy _ weights ( m1, m2 ) : m1 _ state _ dict = m1. state _ dict ( ) m2 _ state _ dict = m2. state _ dict ( ) weight _ copy _ flag = 1 for name, param in m1 _ state _ dict. items ( ) : if name in m2 _ state _ dict : if not torch. all ( torch. eq ( param. data, m2 _ state _ dict [ name ]. data ) ) : print ( "... | [
-0.20557191967964172,
-0.8583998084068298,
0.8715838193893433,
0.6488193273544312,
-0.2843306362628937,
0.8367378115653992,
0.15471211075782776,
-0.23636843264102936,
-0.7608152627944946,
0.7836883664131165,
-0.06567781418561935,
0.5831963419914246,
0.3017364740371704,
0.7537500262260437,
... |
def status _ post ( self, status : str, in _ reply _ to _ id : optional [ union [ status, idtype ] ] = none, media _ ids : optional [ list [ union [ mediaattachment, idtype ] ] ] = none, sensitive : bool = false, visibility : optional [ str ] = none, spoiler _ text : optional [ str ] = none, language : optional [ str ]... | [
-1.221136450767517,
-0.8476318717002869,
0.6212945580482483,
-0.11430075019598007,
-0.2861292064189911,
-0.5661577582359314,
-0.5711841583251953,
0.3265831470489502,
0.9669173955917358,
0.07908126711845398,
-0.8308693766593933,
0.6991473436355591,
-0.8122156858444214,
0.05185363441705704,
... |
def test _ show _ conf ( ) : with patch ( " salt. modules. logrotate. _ parse _ conf ", magicmock ( return _ value = true ) ) : assert logrotate. show _ conf ( ) | [
1.1677535772323608,
0.5644793510437012,
0.33034250140190125,
-0.43091681599617004,
-0.09347287565469742,
-0.21767501533031464,
0.614920437335968,
0.4421685039997101,
0.21659034490585327,
0.11215326935052872,
-0.5072624087333679,
0.4204643666744232,
-0.016442883759737015,
-0.157830357551574... |
def notifications ( self ) : try : notes = self. browser. elements ( self. notification, parent = self. _ body ) except nosuchelementexception : return [ ] return [ statusnotification ( parent = self, note _ element = note, logger = self. logger ) for note in notes ] | [
-0.09041387587785721,
-0.22772449254989624,
0.3525349497795105,
1.4554548263549805,
0.8484595417976379,
0.38251447677612305,
0.2745514214038849,
0.2812051773071289,
0.904550313949585,
0.0764073058962822,
-1.0292149782180786,
-0.024615708738565445,
0.05656454712152481,
1.020844578742981,
... |
async def cancel _ pending _ offers ( self, trades : list [ bytes32 ], tx _ config : txconfig, fee : uint64 = uint64 ( 0 ), secure : bool = true, # cancel with a transaction on chain trade _ cache : dict [ bytes32, traderecord ] = { }, # optional pre - fetched trade records for optimization extra _ conditions : tuple [... | [
0.2056719809770584,
0.2643757462501526,
0.6637397408485413,
0.0013306860346347094,
-0.4124053418636322,
-0.5776426196098328,
0.025018034502863884,
0.4362727105617523,
0.12162750959396362,
1.1268678903579712,
-0.0554150827229023,
0.08251886069774628,
0.12429802864789963,
0.19503270089626312... |
def _ _ init _ _ ( self, env, preprocess _ callbacks = ( ), replay _ memory _ size = 0, agent _ history _ size = 4, action _ repeat = 4, pkfile = none, logfile = none ) : # function ( s ) to apply to each frame before passing to model self. preprocess _ frame = self. get _ frame _ preprocessor ( preprocess _ callbacks ... | [
0.7353934645652771,
-0.14255200326442719,
0.8812342286109924,
0.2386239469051361,
0.3638933598995209,
-0.25976210832595825,
0.6295534372329712,
-0.18567216396331787,
0.1913997083902359,
-0.3339994251728058,
-0.12263616174459457,
-0.06555737555027008,
0.1891455203294754,
0.8656660318374634,... |
def read _ annotations ( pdf _ path ) : path _ name = os. path. splitext ( pdf _ path ) [ 0 ] base _ name _ with _ ext = os. path. basename ( pdf _ path ) base _ name = os. path. splitext ( base _ name _ with _ ext ) [ 0 ] annotation _ file _ name = os. path. join ( path _ name, base _ name +'- annotation. txt') if not... | [
0.8370533585548401,
-0.8814622759819031,
0.8318480253219604,
-0.07797471433877945,
-0.033506326377391815,
-0.2151549756526947,
0.48682501912117004,
0.6769382953643799,
-0.2771855592727661,
0.44463345408439636,
0.01304513681679964,
0.05242137983441353,
-0.22606690227985382,
0.25723782181739... |
def loghs ( self, i ) : # if ( isinstance ( i, int ) ) : # does not work with self. l _ range [ i ]! if ( ( i > = self. prior _ range [ 0 ] ) and ( i < = self. prior _ range [ - 1 ] ) ) : return 1. 0 else : return - inf # else : # return - inf | [
-0.6583660840988159,
-0.2524653673171997,
0.6289929151535034,
-0.07173484563827515,
-0.4843175709247589,
0.9413567185401917,
-0.48103412985801697,
-0.3051969110965729,
0.4393225312232971,
-0.5804694294929504,
0.12186875194311142,
0.3898536264896393,
-1.3285343647003174,
0.3499520421028137,... |
def process _ features ( df ) : # fetch the first and last gps coordinates coords = np. row _ stack ( df ['polyline']. apply ( first _ last _ k ) ) # standardize latitudes ( odd columns ) and longitudes ( even columns ) latitudes = coords [ :, : : 2 ] coords [ :, : : 2 ] = scale ( latitudes ) longitudes = coords [ :, 1... | [
-0.3633716404438019,
-0.036325886845588684,
0.6971948742866516,
-0.5667822360992432,
0.3538472354412079,
-0.4779324531555176,
-0.45622923970222473,
0.08624722063541412,
0.14971020817756653,
-0.18400037288665771,
-0.09290102124214172,
-0.28405842185020447,
0.7310505509376526,
-0.26817017793... |
def _ check _ stopped ( self ) : return self. stopped | [
-1.5440934896469116,
-0.34159427881240845,
0.45070287585258484,
-0.5577054023742676,
-0.48192641139030457,
0.42770564556121826,
-0.16913579404354095,
-0.11391003429889679,
-0.5173437595367432,
0.3337143361568451,
-0.450711190700531,
0.022811638191342354,
-0.8258628845214844,
-0.22875362634... |
def _ remove _ sea ( db _ sea, db _ vio _ server, context, db _ session ) : msg = ( ras. vif _ get _ msg ('info ','reconcile _ sea _ del _ start') % {'host': db _ vio _ server. get _ host _ name ( ),'vios': db _ vio _ server. lpar _ id,'adpt': db _ sea. name } ) ras. trace ( log, _ _ name _ _, ras. trace _ debug, msg )... | [
0.23832127451896667,
-0.2863307595252991,
0.5461535453796387,
-0.49553927779197693,
0.17785590887069702,
-0.5797159671783447,
0.37945419549942017,
0.46692582964897156,
0.9754784107208252,
1.0608958005905151,
0.06480392813682556,
0.5610312223434448,
-0.31623566150665283,
0.2527272701263428,... |
def set _ major ( self ) : self. _ call ('set _ major') | [
-0.20232783257961273,
0.628660261631012,
0.47577014565467834,
0.9189382791519165,
0.7026277184486389,
1.034602165222168,
0.18877555429935455,
0.26929301023483276,
-0.510801374912262,
-0.7937366962432861,
0.34668657183647156,
1.3191646337509155,
-0.43680325150489807,
0.8065874576568604,
0... |
def _ check _ diameter ( self, d ) : if d > 50 or d < 0. 1 : raise pumperror ( " % s : diameter % s mm is out of range " % ( self. name, d ) ) | [
-0.5794439315795898,
0.4329809844493866,
0.4661775827407837,
0.09360437840223312,
-1.246995210647583,
1.0326213836669922,
0.12543365359306335,
-0.1875481754541397,
0.6431630849838257,
0.11728806048631668,
1.2619764804840088,
0.6016597151756287,
-0.23066845536231995,
0.5226762890815735,
0... |
def do _ delete ( self, node _ id ) : _ error _ code, _ msg = ramstkdatamodel. do _ delete ( self, node _ id ) # pylint : disable = attribute - defined - outside - init # it is defined in ramstkdatamodel. _ _ init _ _ if _ error _ code! = 0 : _ error _ code = 2005 _ msg = _ msg +'ramstk error : attempted to delete non ... | [
0.35714787244796753,
0.4638731777667999,
0.7769473195075989,
-0.2210860550403595,
1.0097055435180664,
-0.4434725046157837,
0.20648661255836487,
0.2600697875022888,
-0.23686586320400238,
0.9760054349899292,
0.15423202514648438,
0.5094622373580933,
-0.26477646827697754,
0.8966519236564636,
... |
def getnumberfkvshiftspeeds ( ) : andor _ solis. getnumberfkvshiftspeeds. restype = ctypes. c _ uint number = ctypes. c _ int ( ) result = andor _ solis. getnumberfkvshiftspeeds ( ctypes. byref ( number ) ) check _ status ( result ) return int ( number. value ) | [
0.05944621562957764,
0.5510158538818359,
0.649951696395874,
0.48966875672340393,
-0.2247992902994156,
-0.9726701378822327,
0.801469624042511,
-0.3301291763782501,
0.5294361710548401,
-0.8199712634086609,
-0.689784586429596,
0.14721642434597015,
-0.8322380185127258,
0.6448974609375,
0.398... |
def http ( self, path : str, *, name : str = " ", method : literal [ " ", lower _ http _ methods ] = " ", ) - > typing. callable [ [ t ], t ] : def register ( endpoint : t ) - > t : self. append ( httproute ( path, endpoint, name, method ) ) return endpoint return register | [
-0.6554399132728577,
0.27254918217658997,
0.7326955199241638,
0.008990400470793247,
0.052314434200525284,
-0.45815637707710266,
-0.8186550140380859,
-0.35312941670417786,
-0.3675801455974579,
-0.12489510327577591,
-0.5705557465553284,
0.46432435512542725,
-0.33219125866889954,
-0.051650967... |
def grouped _ parallel _ split _ combine ( args, split _ fn, group _ fn, parallel _ fn, parallel _ name, combine _ name, file _ key, combine _ arg _ keys, split _ outfile _ i = - 1 ) : grouped _ args = group _ fn ( args ) split _ args, combine _ map, finished _ out, extras = _ get _ split _ tasks ( grouped _ args, spli... | [
-0.4391741156578064,
-0.07055444270372391,
0.6616876125335693,
0.7087668180465698,
0.2479347437620163,
-0.688011884689331,
1.2274112701416016,
1.1426010131835938,
-1.3385015726089478,
0.6100288033485413,
-0.31592419743537903,
-0.19865113496780396,
-0.04711503908038139,
-0.6058166027069092,... |
def convert _ results ( self, results ) : books = [ ] for record in results : author = " % s % s " % ( record. person. first _ name, record. person. last _ name ) book = olvbook ( record. id, record. title, author, record. isbn, record. publisher, record. person. last _ name, record. person. first _ name ) books. appen... | [
-0.5014801621437073,
-0.8957089185714722,
0.6196755170822144,
0.6882041096687317,
0.4215809404850006,
0.7120348215103149,
-0.297859787940979,
-0.4140207767486572,
0.2063656598329544,
-0.0631764829158783,
0.019797347486019135,
-0.2610916495323181,
-0.5235305428504944,
-0.06130978837609291,
... |
def _ _ init _ _ ( self, window _ size = ( 1000, 1000 ) ) : self. window _ size = window _ size self. world = world ( ) self. world. gen _ random _ scene ( 1, 3 ) # self. world. add _ item ( [ item ('teapot. stl ', ( 0, 0, 0 ), ( 0, 0, 0 ), 1, color = ( 255, 255, 0 ) ) ] ) # self. world. add _ item ( [ item ('cube. stl... | [
-0.2953445315361023,
0.050830401480197906,
1.0986289978027344,
0.5508176684379578,
-0.7820192575454712,
0.6045513153076172,
0.9511107206344604,
0.3120100498199463,
0.26875489950180054,
0.47137996554374695,
-0.43462350964546204,
0.2917364835739136,
-0.5781040191650391,
1.2933908700942993,
... |
def sampler _ beam _ search ( self, images, beam _ size, max _ len = 25 ) : # data parallelism if multiple gpus if torch. cuda. device _ count ( ) > 1 : device _ ids = range ( torch. cuda. device _ count ( ) ) encoder _ parallel = torch. nn. dataparallel ( self. encoder, device _ ids = device _ ids ) v, v _ g = encoder... | [
0.29919883608818054,
-0.9457927942276001,
0.8342491984367371,
0.6109219193458557,
-0.5888715386390686,
-0.5666249990463257,
0.22307993471622467,
-0.15037916600704193,
-0.0943463072180748,
0.0882992148399353,
-0.36302652955055237,
-0.21143130958080292,
-0.3166252672672272,
0.445832282304763... |
def name ( self ) : return self. _ _ name | [
-0.5544419884681702,
-1.5308524370193481,
0.36766934394836426,
-0.6031354665756226,
-0.8398609161376953,
0.8944740891456604,
0.24553172290325165,
-0.5552502274513245,
0.38800764083862305,
-0.0727342739701271,
-0.2974352240562439,
0.34633299708366394,
0.45151981711387634,
-0.381514549255371... |
def z _ rotation ( vector, theta ) : r = np. array ( [ [ np. cos ( theta ), - np. sin ( theta ), 0 ], [ np. sin ( theta ), np. cos ( theta ), 0 ], [ 0, 0, 1 ] ] ) return np. dot ( r, vector ) | [
-0.6866722106933594,
-0.26108232140541077,
0.1997557133436203,
0.07949080318212509,
-0.09178964793682098,
-0.6373807787895203,
0.6524224877357483,
-0.18750326335430145,
0.1193666085600853,
0.7111964821815491,
-0.2553027272224426,
0.2552015483379364,
-0.18320946395397186,
-0.785427570343017... |
def test _ 505 _ kruskal _ matched _ just _ above _ min _ size ( self ) : np. random. seed ( 987654321 ) x _ parms = [ 1. 7 ] x _ input _ array = st. weibull _ min. rvs ( * x _ parms, size = 3 ) y _ input _ array = st. weibull _ min. rvs ( * x _ parms, size = 3 ) z _ input _ array = st. weibull _ min. rvs ( * x _ parms... | [
0.47447359561920166,
-0.49436676502227783,
0.6413829326629639,
-0.3749837577342987,
-0.9725671410560608,
0.8935858011245728,
0.4024672210216522,
-0.5772084593772888,
0.31648218631744385,
-0.2577405571937561,
-0.07303338497877121,
0.6196396350860596,
-0.7465793490409851,
0.7292969822883606,... |
def validate _ datasets ( dataframes : list [ dataframe ] ) : if len ( dataframes ) = = 0 : print ('no dataframes were created.') exit ( ) queries = get _ queries ( dataframes [ 0 ] ) for df in dataframes : if get _ queries ( df )! = queries : print ('not all dataframes contain the same set of queries!') exit ( ) | [
-0.34481847286224365,
0.6149988174438477,
0.2653390169143677,
0.45256778597831726,
0.8847554326057434,
0.6369901299476624,
0.7071051597595215,
-0.5265207886695862,
0.3671497702598572,
-0.4194422662258148,
0.5038016438484192,
-0.05378091335296631,
-0.5478017926216125,
0.5270689129829407,
... |
def first _ digit _ of _ pan ( self, first _ digit _ of _ pan ) : self. _ first _ digit _ of _ pan = first _ digit _ of _ pan | [
0.008078675717115402,
-0.9111621379852295,
-0.282486230134964,
0.7328248620033264,
-0.012211536057293415,
0.894085705280304,
0.6519732475280762,
-0.5190978646278381,
0.21147334575653076,
-0.9323287606239319,
-0.4257180094718933,
-0.3334832489490509,
0.07986956089735031,
0.7659280896186829,... |
def _ _ load _ wrapper ( self, end ) : max _ retries = 10 for _ in xrange ( max _ retries ) : try : return du. pick _ load ( const. dumps [ end ] ) except : continue return [ ] | [
-1.320959448814392,
0.21548305451869965,
0.3765251040458679,
-0.6251514554023743,
0.2831539213657379,
-0.7892774939537048,
-0.5908243060112,
-0.28881600499153137,
-0.35285696387290955,
0.4232342839241028,
-0.10705326497554779,
-0.004554194863885641,
-0.18435586988925934,
-1.016742825508117... |
def do _ delete ( self, node _ id ) : _ error _ code, _ msg = ramstkdatamodel. do _ delete ( self, node _ id ) # pylint : disable = attribute - defined - outside - init # it is defined in ramstkdatamodel. _ _ init _ _ if _ error _ code! = 0 : _ error _ code = 2005 _ msg = _ msg +'ramstk error : attempted to delete non ... | [
0.4900822341442108,
0.5578640699386597,
0.7970263361930847,
-0.5565565824508667,
1.149106502532959,
-0.5950706005096436,
-0.05311915650963783,
0.23884505033493042,
-0.1476590633392334,
0.7197800874710083,
0.1473758965730667,
0.6391880512237549,
-0.01967572420835495,
0.45788824558258057,
... |
def check _ ingredients ( self, drink ) : drink _ ingredient = self. menu [ drink ] ['ingredients'] for ingredient in self. resource : if drink _ ingredient [ ingredient ] > self. resource [ ingredient ] : print ( f'lack of { ingredient }') return false return true | [
-0.7972142696380615,
-1.145944356918335,
0.4070625603199005,
-0.16122254729270935,
0.19051077961921692,
0.09152611345052719,
-0.7498607039451599,
-0.03822625055909157,
-0.6222888827323914,
0.05215659365057945,
0.5734913945198059,
-0.3639078438282013,
-0.2446770817041397,
1.003722071647644,... |
def class _ to _ path ( cls ) : return': '. join ( [ cls. _ _ module _ _, cls. _ _ name _ _ ] ) | [
-0.5186944007873535,
-1.3866324424743652,
0.6208188533782959,
-0.25107479095458984,
-0.008567889221012592,
0.9472678303718567,
0.8340646624565125,
0.30477580428123474,
0.40034720301628113,
1.2282794713974,
-0.4469013214111328,
-0.07660873979330063,
0.38600507378578186,
-0.29175272583961487... |
def test _ cancel _ booking _ from _ shopping _ basket _ with _ block _ voucher _ code ( self ) : event = baker. make _ recipe ('booking. future _ ev') booking = baker. make _ recipe ('booking. booking ', event = event, user = self. user, paid = true ) self. assertequal ( booking. objects. all ( ). count ( ), 1 ) self.... | [
0.39805856347084045,
0.8917163014411926,
0.7180576324462891,
1.8046029806137085,
-0.16658411920070648,
0.48330849409103394,
-0.07996360212564468,
0.9042922258377075,
0.23603738844394684,
0.6112923622131348,
-0.2789839804172516,
-0.14105086028575897,
0.12171859294176102,
1.1651893854141235,... |
def test _ create _ customer ( self ) : test _ customer = { " name " : " alex mical ", " user _ name " : " ajmical ", " password " : " password ", } resp = self. app. post ( " / customers ", json = test _ customer, content _ type = " application / json " ) self. assertequal ( resp. status _ code, status. http _ 201 _ c... | [
-0.17087428271770477,
-0.8122885823249817,
0.7661713361740112,
0.41244447231292725,
0.6805964708328247,
0.7246037125587463,
0.08762473613023758,
0.28400564193725586,
-0.6609110832214355,
-0.11754671484231949,
-0.6951847076416016,
-0.29250991344451904,
0.37740015983581543,
0.280012100934982... |
def ticket _ info ( services, tid ='inticketinfo') : q = " " " match ( n : node ) < - [ : uses ] - ( u : node ) where n. handle _ id in $ handle _ ids return distinct ( u. name ) as uses " " " d = nc. query _ to _ list ( nc. graphdb. manager, q, handle _ ids = [ s ['handle _ id'] for s in services ] ) impacted _ users ... | [
0.18280330300331116,
-0.07212907820940018,
0.6467217206954956,
-1.2296531200408936,
-0.828493595123291,
0.06920131295919418,
0.3085683286190033,
-0.7094911932945251,
-1.1493014097213745,
-0.10713758319616318,
0.1145235076546669,
-0.2760154902935028,
0.1835283637046814,
0.6124881505966187,
... |
def testgetvaluesforquerywithoutreturntags ( self ) : securetagapi ( self. user ). create ( [ ( u'username / bar ', u'description') ] ) objectid = uuid4 ( ) # fixme replace this with securetagvalueapi once the index is # integrated values = { objectid : { u'username / bar': 42 } } securetagvalueapi ( self. user ). set ... | [
-0.4446309804916382,
0.4938723146915436,
0.4762182831764221,
-0.102391317486763,
0.4677976667881012,
0.532907247543335,
-0.3258182108402252,
-0.8053128123283386,
-0.25461870431900024,
-1.1416161060333252,
-0.6630752682685852,
-0.16093827784061432,
-0.0726168155670166,
-0.09606793522834778,... |
def load _ data ( city, month, day ) : # converting name to numerical correspondent. month = strptime ( month,'% b'). tm _ mon day = strptime ( day,'% a'). tm _ mon file = city _ data. get ( city ) df = pd. read _ csv ( file ) df ['start time'] = pd. to _ datetime ( df ['start time'], infer _ datetime _ format = true )... | [
-0.13670311868190765,
-0.23243069648742676,
0.8169369101524353,
-0.33744460344314575,
-0.9337948560714722,
0.43044331669807434,
-1.084187626838684,
0.7293919920921326,
-0.6406557559967041,
-0.15899547934532166,
0.46367186307907104,
0.5059071779251099,
-0.03819786384701729,
-0.2023167461156... |
def create _ dict _ tree ( self, documents : list [ str ] ) : tree = benedict ( ) max _ depth = 0 for document in documents : path = " " words = document. split ( ) max _ depth = max ( max _ depth, len ( words ) ) for node in words : path + = f ". { node } " tree [ path + ". counter " ] = tree. get ( path + ". counter ... | [
0.29238665103912354,
0.2049519270658493,
0.5565352439880371,
-0.6124921441078186,
-0.6939401626586914,
0.5118008255958557,
-0.0004114213224966079,
-0.20423540472984314,
-1.059082269668579,
0.16051791608333588,
0.4447356164455414,
-0.23098260164260864,
-0.44594135880470276,
0.70773065090179... |
def _ take _ action ( self, action ) : return self. handeye. take _ action ( action ) | [
-0.9099535942077637,
-0.16066351532936096,
0.07963597774505615,
0.04828193783760071,
0.3264271318912506,
-0.4305965304374695,
0.2108866423368454,
-0.5028891563415527,
0.9672136902809143,
0.3749432861804962,
0.053687386214733124,
-0.5238643288612366,
0.05693094804883003,
-0.2279044836759567... |
async def async _ set _ preset _ mode ( self, preset _ mode : str ) - > none : if self. preset _ modes and preset _ mode not in self. preset _ modes : _ logger. error ( " received invalid preset _ mode : % s for entity % s. expected : % s ", preset _ mode, self. entity _ id, self. preset _ modes, ) return self. _ prese... | [
-0.9634218215942383,
0.4479164779186249,
0.4118787944316864,
-0.4966587722301483,
0.5826060771942139,
-0.004112360533326864,
0.8036817312240601,
-0.2323193997144699,
0.05317450687289238,
0.45344096422195435,
-0.25504955649375916,
0.37051746249198914,
0.5579726696014404,
0.4953837990760803,... |
def main ( argv ) : import argparse import codecs # have to be ready to deal with utf - 8 names out = codecs. getwriter ('utf - 8') ( sys. stdout ) description ='''takes a series of at least 2 ott ids and reports the ott of their least inclusive taxonomic ancestor and that taxon's ancestors.'''parser = argparse. argume... | [
0.6970923542976379,
-1.0965962409973145,
0.9257862567901611,
-0.48889586329460144,
-0.09635689109563828,
-0.39897188544273376,
0.8507966995239258,
-0.23621022701263428,
-0.22869329154491425,
0.7861159443855286,
0.21722383797168732,
1.1110163927078247,
0.28893569111824036,
0.140331372618675... |
def parse ( self, source ) : if type ( source ) = = type ( u'' ) : source = source. encode ('utf8') if type ( source ) = = type ('' ) : from xml. dom import minidom tree = minidom. parsestring ( source ) else : tree = source # try just using it as dom self. unknown _ tags = [ ] self. unknown _ types = [ ] res = self. _... | [
-0.47805261611938477,
0.35515108704566956,
0.41292187571525574,
-0.37067851424217224,
-1.7122958898544312,
-0.5806888937950134,
-0.117529958486557,
0.27030840516090393,
0.8222057223320007,
-0.8571467399597168,
-1.0554288625717163,
0.45214083790779114,
-0.5503663420677185,
-0.26860582828521... |
def decompose _ plant _ data _ frame _ into _ areas ( df, areas, grid ) : _ check _ data _ frame ( df, " pg " ) plant _ id = set ( df. columns ) _ check _ plants _ are _ in _ grid ( plant _ id, grid ) areas = _ check _ areas _ are _ in _ grid _ and _ format ( areas, grid ) df _ areas = { } for k, v in areas. items ( ) ... | [
-0.3189648389816284,
-0.3586459755897522,
0.5122988224029541,
-0.40179184079170227,
-0.5471610426902771,
-0.6413165926933289,
0.1766725778579712,
0.005238130688667297,
-0.07449281215667725,
0.2119608372449875,
-0.09652514010667801,
-0.037871621549129486,
0.35812121629714966,
-0.28795206546... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.