text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def volume _ type _ destroy ( context, name ) : return impl. volume _ type _ destroy ( context, name ) | [
-0.6239994764328003,
-0.9425097107887268,
0.41725224256515503,
0.05073225870728493,
0.032351426780223846,
-0.8079091310501099,
-0.04997273534536362,
-0.9226191639900208,
0.1591702252626419,
1.11599862575531,
-0.062311165034770966,
-0.17265765368938446,
-0.5650287866592407,
-0.4639312326908... |
def set _ width ( self, width, * connectors ) : # use this method sparingly. it would be good practice to keep bus # objects of fixed size. if width < = 0 : raise exception ( " error : enter non - negative width " ) if width = = self. _ width : return elif width < self. _ width : self. bus = self. bus [ : width ] elif ... | [
-1.7368496656417847,
0.191996768116951,
0.6523926854133606,
1.2319293022155762,
-0.07981526851654053,
0.11854368448257446,
0.3318858742713928,
-0.3294212520122528,
1.0796689987182617,
-1.365814447402954,
-0.16571976244449615,
-0.5663389563560486,
-1.1699703931808472,
0.5163913369178772,
... |
def downsample ( self, by : str, rule : str, n : int ) - > " groupby " : return groupby ( self. _ df, by, downsample = true, rule = rule, downsample _ n = n ) | [
0.030007561668753624,
0.4857533574104309,
0.5509979724884033,
-0.2503913640975952,
-0.24425776302814484,
-0.6022442579269409,
0.33567488193511963,
-0.13498733937740326,
-0.37596583366394043,
-0.5609678626060486,
1.06046724319458,
0.9095870852470398,
-1.078595519065857,
-0.3292105495929718,... |
def todaytoxml ( statusopenonly = true ) : things = thingsapp ( ) xml = xml ( ) with xml. things ( xmlns ='http : / / things. ivonet. nl') : _ _ printtoday ( things [ " today " ], statusopenonly, xml ) return str ( xml ) | [
-1.0400108098983765,
-0.2076258659362793,
0.23842519521713257,
0.15100573003292084,
-0.4890013337135315,
0.5296177268028259,
-1.2996296882629395,
-0.6010383367538452,
-0.3000864088535309,
-0.899756669998169,
0.15379361808300018,
-0.36553898453712463,
0.19523781538009644,
-0.223161861300468... |
def sparse ( self ) : self. is _ sparse = true self. edge _ indices = np. stack ( list ( map ( lambda x : np. stack ( sparse. csr _ matrix ( x ). nonzero ( ) ), self. dist + 1 # no zeros allowed to avoid shape mismatch ) ) ) # ineffective, but acceptable self. edge _ weights = np. stack ( list ( map ( lambda x : sparse... | [
0.20927207171916962,
0.03587401285767555,
0.41359052062034607,
-0.2812846601009369,
0.2642008364200592,
0.03822212293744087,
0.38093382120132446,
0.7561987638473511,
0.23796090483665466,
0.1506500542163849,
0.26137492060661316,
0.8359795808792114,
-0.24223460257053375,
-0.29318737983703613... |
def main ( ) : max _ floor = initialize _ system ( ) elevator = elevator ( ) elevator. set _ max _ floor ( max _ floor ) # this method get's the user input and let it run till user presses exit print _ and _ get _ user _ choice ( elevator, max _ floor ) | [
-0.2792319655418396,
-0.4107989966869354,
0.43985632061958313,
2.2371160984039307,
0.5046489238739014,
0.7349823117256165,
0.6706110835075378,
-0.13272802531719208,
-0.32391247153282166,
-0.1978166699409485,
-0.1087491437792778,
0.11386217176914215,
0.04063569754362106,
1.1223117113113403,... |
def decrypt ( self, data : bytearray ) - > bytearray : if not isinstance ( data, ( bytes, bytearray ) ) : self. clear ( ) raise gostciphererror ('invalid ciphertext data') result = bytearray ( ) for i in range ( get _ num _ block ( data, self. block _ size ) ) : result = ( result + self. _ cipher _ obj. decrypt ( data ... | [
-0.4931005537509918,
0.78666090965271,
0.5795671939849854,
0.15193641185760498,
-0.3234180212020874,
-0.7674583196640015,
0.8674749135971069,
-0.907802939414978,
0.9620109796524048,
0.27151185274124146,
-1.038899302482605,
0.1346888691186905,
-1.891608476638794,
0.21382388472557068,
-0.5... |
def cnn _ features ( image, layername, fraction = 1. 0 ) : output _ layer = [ cnn. layers [ layer _ id [ layername ] ]. output ] cnn _ map = k. function ( [ cnn. layers [ 0 ]. input ], output _ layer ) t = image _ tensor ( image ) out = cnn _ map ( [ t ] ) [ 0 ] n _ channels = out. shape [ 1 ] n _ points = out. shape [... | [
-0.31987327337265015,
-0.8305232524871826,
0.45446598529815674,
0.42332765460014343,
-0.7622882127761841,
-0.5248636603355408,
0.40390169620513916,
0.12166759371757507,
-0.04010748490691185,
0.1620786190032959,
-0.06824450939893723,
-0.2515362799167633,
0.19015946984291077,
0.3771631419658... |
def _ _ init _ _ ( self ) : self. utils = utils. searchutils ( ) self. logger = self. utils. logger # create coordinate and places search objects self. _ coordinate = coordinate _ search _ handler. coordinatesearch ( ) self. _ geplaces = geplaces _ search _ handler. placessearch ( ) # get style information from places ... | [
-0.7324537634849548,
0.14392109215259552,
0.31624269485473633,
-0.021817930042743683,
0.6159458756446838,
1.1117243766784668,
0.7708544731140137,
-0.16253097355365753,
0.2848396599292755,
-0.9785926938056946,
-0.47787609696388245,
-0.35479238629341125,
0.672295331954956,
0.6167750954627991... |
def get _ plot _ decor ( self, kind ) : return self. plot _ decor _ d [ kind ] | [
-0.5840334296226501,
0.25267937779426575,
0.2233111709356308,
-0.16530165076255798,
-0.8376808166503906,
-0.13265766203403473,
0.08864668011665344,
-0.80193692445755,
0.10586618632078171,
0.1137968972325325,
1.0521807670593262,
2.3171122074127197,
0.5308149456977844,
-0.26079127192497253,
... |
def calculate _ gae ( self, buffer : memory, q _ val : torch. tensor ) - > torch. tensor : obs = buffer. norm _ obs next _ obs = buffer. norm _ next _ obs ends = torch. tensor ( buffer. end, dtype = torch. float32, device = self. device ) dones = torch. tensor ( buffer. done, dtype = torch. float32, device = self. devi... | [
0.0067880116403102875,
0.7017296552658081,
0.789667010307312,
-0.2747299075126648,
-0.24859489500522614,
0.5621696710586548,
0.844350278377533,
-0.5996408462524414,
-0.21285037696361542,
0.3431253731250763,
-0.19505080580711365,
0.7673856616020203,
-0.34321531653404236,
0.10893609374761581... |
def modify _ symmetrical ( self, min = - 0. 01, max = 0. 01 ) : var = random. uniform ( 1. 00 + min, 1. 00 + max ) for i, row in enumerate ( self. struct _ dict [ " lattice " ] [ " matrix " ] ) : for j, column in enumerate ( row ) : column * = var self. struct _ dict [ " lattice " ] [ " matrix " ] [ i ] [ j ] = column ... | [
-1.204071044921875,
0.2397167682647705,
0.4509587287902832,
-0.6892121434211731,
-0.17169316112995148,
-0.31088289618492126,
0.24257244169712067,
0.12567977607250214,
-0.19922153651714325,
-0.14591503143310547,
-1.3435922861099243,
0.7522791028022766,
-0.03903570771217346,
-0.0810970887541... |
def _ get _ endpoint ( self, sub _ domain ) : storage _ parameters = self. _ storage _ parameters or dict ( ) account _ name = storage _ parameters. get ( " account _ name " ) if not account _ name : raise valueerror ('" account _ name " is required for azure storage') suffix = storage _ parameters. get ( " endpoint _ ... | [
0.30887073278427124,
-0.36105307936668396,
0.6178931593894958,
0.32690611481666565,
-0.03351441025733948,
0.14271318912506104,
0.42308178544044495,
0.41890770196914673,
-0.35606691241264343,
0.5801669955253601,
-0.08092580735683441,
0.9717580080032349,
0.32955995202064514,
0.22573569416999... |
def _ provider _ config ( self, context ) : http _ resp = self. provider. providerinfo _ endpoint ( ) if not isinstance ( http _ resp, response ) : return http _ resp provider _ config = providerconfigurationresponse ( ). deserialize ( http _ resp. message, " json " ) del provider _ config [ " token _ endpoint _ auth _... | [
-1.4057451486587524,
0.10358797013759613,
0.4386650621891022,
-0.1001676395535469,
-0.7269701361656189,
-0.8652071952819824,
-0.6044617295265198,
-0.08983255177736282,
0.5011973977088928,
0.92222660779953,
-0.45150479674339294,
-0.09220549464225769,
-0.3427186608314514,
-0.2471361011266708... |
def findtimes ( timevalue, timeserie ) : import warnings warnings. simplefilter ('default') warnings. warn ('findtimes will be deleted in future version, use find _ times instead. ', deprecationwarning ) return find _ times ( timevalue, timeserie ) | [
-0.520922064781189,
0.24022039771080017,
0.4042262136936188,
0.5194284915924072,
-0.6276853084564209,
-1.3426645994186401,
-0.5973089337348938,
-1.6322181224822998,
-0.030484076589345932,
1.412790060043335,
0.09911142289638519,
-0.5979242920875549,
0.15641048550605774,
1.2771905660629272,
... |
def next _ lesson _ due _ date ( self ) : record = date. max for assignment in self. get _ current _ assignments ( ) : if assignment. end _ date < record : record = assignment. end _ date if record = = date. max : return none return record | [
0.40602532029151917,
-0.3240153193473816,
0.7939321398735046,
-0.15121039748191833,
-0.7909549474716187,
0.7761936783790588,
-0.38802817463874817,
-0.8213499784469604,
-0.9344248175621033,
0.058350563049316406,
1.390745997428894,
0.407563716173172,
-0.36937522888183594,
0.5298091769218445,... |
def load _ descriptors ( descriptors _ type : str, input _ path : str, tar _ handler : optional [ tarcollection ], image _ name : str, dtype, dsize ) : descriptors _ path = get _ descriptors _ fullpath ( descriptors _ type, input _ path, image _ name, tar _ handler ) return image _ descriptors _ from _ file ( descripto... | [
-0.40502122044563293,
0.35390612483024597,
0.2594963610172272,
-0.7762584686279297,
-0.5977469086647034,
-0.5447520017623901,
-0.8250714540481567,
0.4124101400375366,
-0.5726180672645569,
0.4810958206653595,
0.4646974205970764,
0.7494032382965088,
0.7892140746116638,
-0.18260200321674347,
... |
def putmemop ( op, a, b, c ) : if b = = r0 : putinstr ( op +'' + a + ','+ str ( c ) ) else : putinstr ( op +'' + a + ','+ str ( c ) +'('+ b +')') | [
-0.16015510261058807,
0.1111767515540123,
0.6053403615951538,
-1.1614493131637573,
0.5611465573310852,
0.05298798158764839,
0.2143058329820633,
0.15900371968746185,
0.3842383027076721,
0.7156761288642883,
-0.10901909321546555,
0.005295646842569113,
-0.9044899940490723,
-0.7567907571792603,... |
def reconstitute ( self, descriptor _ proto ) : for field in descriptor _ proto. field : if field. type = = fielddescriptorproto. type _ message : self. _ fields _ to _ resolve [ field. name ] = field. type _ name descriptor = makedescriptor ( descriptor _ proto, self. _ package ) self. _ resolve _ composite _ schemas ... | [
-0.0501406192779541,
0.5670822858810425,
0.4572959542274475,
-0.4231298863887787,
0.7877405285835266,
-0.37735113501548767,
0.008805794641375542,
0.14244788885116577,
-0.38260704278945923,
-0.3034621775150299,
-0.5204278230667114,
-0.22458037734031677,
-0.27153193950653076,
-0.292528599500... |
def edit ( self, identifier _ type, identifier ) : # todo : it would be nice to use the metadata layer for this, but # this code handles empty values differently than other metadata # sources. when a staff member deletes a value, that indicates # they think it should be empty. this needs to be indicated in the # db so ... | [
-0.5351260900497437,
-0.2942671775817871,
0.6953044533729553,
-0.4262576401233673,
0.08714991807937622,
0.324856162071228,
0.38877779245376587,
0.14720122516155243,
-0.6427989602088928,
-0.2095826119184494,
-0.43170398473739624,
0.07117199897766113,
-0.2623582184314728,
0.3114068806171417,... |
def convert _ lineload _ to _ input ( n, q, n _ symb, q _ symb, length ) : if isinstance ( n, float ) or isinstance ( n, int ) : n _ start = n n _ end = n else : n _ start = symb2float ( n. subs ( n _ symb, 0 ) ) n _ end = symb2float ( n. subs ( n _ symb, length ) ) if isinstance ( q, float ) or isinstance ( q, int ) :... | [
-0.34676218032836914,
-0.8060036301612854,
0.44115716218948364,
-1.5007184743881226,
0.4486410319805145,
0.06211979687213898,
-0.3951040208339691,
-0.8292961120605469,
-0.05419586971402168,
-0.337909460067749,
-1.034898281097412,
0.4173257052898407,
-0.23095795512199402,
0.3941602408885956... |
def get _ raid _ arrays ( root _ helper ) : # cat array list cmd = ['cat ','/ proc / mdstat'] try : ( out, _ err ) = putils. execute ( * cmd, root _ helper = root _ helper, run _ as _ root = true ) # log. debug ('[ mra ] mdstat out : % ( out ) s'% {'out': out } ) except putils. processexecutionerror as err : log. excep... | [
0.5896844267845154,
-0.37673917412757874,
0.6280621886253357,
0.17338278889656067,
0.05655466020107269,
0.23860031366348267,
0.03700098767876625,
-0.7139745354652405,
0.36125126481056213,
0.4600277543067932,
0.48842379450798035,
0.931030809879303,
-0.1061629056930542,
1.2746371030807495,
... |
def score _ week ( self, season, week ) : url = " http : / / www. nfl. com / scores / { 0 } / reg { 1 } " return self. get ( url. format ( season, week ) ) | [
-1.0560179948806763,
0.9508613348007202,
0.566312849521637,
-0.9392040967941284,
1.01533842086792,
-1.2025337219238281,
-0.47521039843559265,
-1.0476750135421753,
0.2313825935125351,
0.23234231770038605,
0.3863687515258789,
0.10119009017944336,
-0.7046809792518616,
-0.6098259091377258,
0... |
def transform _ p ( p ) : # delete the non - homogeneous expressions and store only the coefficients of the expression # the order in the if clause is important, the equality ( = ) has to be in the last instantiation ple = [ ] for p in p : if p! ='true': if'> ='in p : expr, cte = split _ expression ( p,'> =') elif'< ='... | [
-0.3994429111480713,
-0.17720645666122437,
0.6632969975471497,
0.20176178216934204,
0.14024804532527924,
0.1829216629266739,
-0.15402743220329285,
0.9158218502998352,
0.5102524161338806,
0.8682646751403809,
-0.6704737544059753,
-0.2824894189834595,
-0.9999337792396545,
-0.47425100207328796... |
def test _ glm _ prepare _ controller _ l2 _ old _ config ( old _ glm _ config _ file : path ) : # monkeypatch helper function so that controller can be tested in isolation glm _ prepare. _ glm _ l2 _ propagate = _ old _ glm _ l2 _ propagate _ return with pytest. raises ( systemexit ) as e : glm _ prepare. glm _ prepar... | [
0.7936984300613403,
-0.48658111691474915,
0.5854611396789551,
0.11215375363826752,
-0.10947958379983902,
0.3709365427494049,
0.062483545392751694,
-0.13444466888904572,
-0.44651058316230774,
0.3570680618286133,
-0.6084314584732056,
0.32621634006500244,
0.2523718476295471,
0.975019931793212... |
def decay _ times ( self, peak _ ind = none, knee _ point _ ind = none, noise _ floor = none, window _ size = none ) : if peak _ ind is none or knee _ point _ ind is none or noise _ floor is none : peak _ ind, knee _ point _ ind, noise _ floor, window _ size = self. decay _ params ( ) t = np. linspace ( 0, self. durati... | [
0.04495236277580261,
-0.2033839225769043,
0.9137385487556458,
-0.26285478472709656,
-0.360221803188324,
-0.5760387182235718,
-0.09673981368541718,
0.18582473695278168,
0.07008438557386398,
0.6850274801254272,
-0.1220407783985138,
0.5858368277549744,
0.05099416524171829,
0.38777250051498413... |
def collapseup ( self ) : retval = false for cstartind in range ( self. rowlen ) : lst = self. get _ column ( cstartind ) lst, tmp = self. collapserow ( lst ) x = 0 for i in range ( cstartind, self. length, self. rowlen ) : # self. set _ cell ( i, lst [ x + + ] ) self. set _ cell ( i, lst [ x ] ) x + = 1 retval = retva... | [
-1.392366647720337,
0.7848055362701416,
0.7276372909545898,
0.5626344084739685,
-0.5611050128936768,
-0.4586385190486908,
0.729338526725769,
0.5679371356964111,
-0.08771129697561264,
0.5198291540145874,
-0.6531493067741394,
-1.1520602703094482,
-1.1025660037994385,
0.40792250633239746,
-... |
def do _ select ( self, cmd, params ) : data = self. cur. execute ( cmd, params ) return data | [
-0.622451663017273,
-0.692467987537384,
0.23537178337574005,
0.2457987517118454,
0.27576568722724915,
-0.10283307731151581,
-1.072648286819458,
-0.7843934297561646,
-0.5854567289352417,
0.29310065507888794,
0.8224017024040222,
0.4473329186439514,
-0.5426781177520752,
-0.615365207195282,
... |
def test _ cli _ treesync _ push _ no _ targets ( monkeypatch ) - > none : script = treesync ( ) testargs = ['treesync ','push'] with monkeypatch. context ( ) as context : validate _ script _ run _ exception _ with _ args ( script, context, testargs, exit _ code = 1 ) | [
0.10973113775253296,
0.8861660361289978,
0.6269007921218872,
0.5127207040786743,
1.3774949312210083,
-0.11269295960664749,
0.10399261862039566,
-0.14798884093761444,
-0.1822899878025055,
0.11471368372440338,
-0.07208769023418427,
1.3141306638717651,
0.12457913905382156,
0.44897451996803284... |
async def test _ get _ systems ( v3 _ server, v3 _ subscriptions _ response, v3 _ settings _ response ) : v3 _ server. post ( " https : / / api. simplisafe. com / v1 / api / token ", status = 200, body = load _ fixture ( " api _ token _ response. json " ), ) v3 _ server. get ( " https : / / api. simplisafe. com / v1 / ... | [
-0.05828334391117096,
0.4974974989891052,
0.6359637975692749,
-0.1583758443593979,
1.3032925128936768,
0.08007340878248215,
-0.23192435503005981,
-0.763431191444397,
1.3823329210281372,
-1.247754693031311,
-0.7364749908447266,
0.5665190815925598,
0.050928983837366104,
-0.23628976941108704,... |
def testdeletevaluesforqueryonlyconsidersspecifiedtags ( self ) : objectid = uuid4 ( ) values = securetagvalueapi ( self. user ) values. set ( { objectid : { u'username / bar': 42, u'username / foo': 123 } } ) rundataimporthandler ( self. client. url ) self. store. commit ( ) with login ( u'username ', uuid4 ( ), self.... | [
0.23842476308345795,
0.6013543605804443,
0.4107486605644226,
-0.10638168454170227,
0.2590067982673645,
0.52275151014328,
-0.44848179817199707,
-0.007222398184239864,
-0.1453554630279541,
-0.9309639930725098,
-0.4344816505908966,
0.06994082778692245,
0.5125000476837158,
0.4987645447254181,
... |
def on _ qam _ name _ activated ( self, p0 ) : # todo : not implemented yet def testconnection ( ip, port, service _ name ) : url _ origin = u'http : / /'+ ip + u':'+ port + u'/ ws - gateway / gateway / ws /'+ service _ name + '? wsdl'url = str ( url _ origin ) auth = httpauthenticated ( username ='administrator ', pas... | [
-0.2781621515750885,
-0.4214478135108948,
0.644920289516449,
-0.6692084670066833,
-1.0759066343307495,
-0.45664942264556885,
0.034329164773225784,
-1.0080070495605469,
0.14238254725933075,
0.32709789276123047,
-0.37137672305107117,
0.21811620891094208,
-0.29619142413139343,
0.2920395135879... |
def setup ( self ) : # create hash object self. hash _ obj = hash ( ) | [
1.3413336277008057,
-0.7853856086730957,
0.3183709979057312,
0.41763630509376526,
0.8189436793327332,
1.006085991859436,
0.7629151344299316,
0.2934125065803528,
-0.2667912244796753,
-0.9872962832450867,
-0.8331364393234253,
0.22504445910453796,
0.05165370553731918,
-0.08351771533489227,
... |
def search _ manipulative _ ballot ( rule, incomplete _ profile, favourite _ alternative ) : manipulative _ ballot = [ favourite _ alternative ] other _ alternatives = list ( range ( len ( incomplete _ profile [ 0 ] ) ) ) other _ alternatives. remove ( favourite _ alternative ) while other _ alternatives : # while we s... | [
0.04435911402106285,
-0.25349512696266174,
0.8984165787696838,
-0.6790993213653564,
-0.18075451254844666,
0.5144790410995483,
-0.47917744517326355,
-0.20283949375152588,
-0.33203259110450745,
-0.26981109380722046,
-0.08524700999259949,
0.1821766495704651,
-0.16482388973236084,
-0.486486852... |
def _ create _ class _ name ( module _ name : str, class _ type : str ) : class _ name = f " {''. join ( word. title ( ) for word in module _ name. split ('_') ) } { class _ type. title ( ) } " return class _ name | [
-0.4941357672214508,
-0.9280826449394226,
0.5845006704330444,
-0.7422909736633301,
-0.18456116318702698,
0.38321664929389954,
-1.635308027267456,
-0.35575926303863525,
-0.4901903569698334,
0.9591543078422546,
0.5568247437477112,
0.5931157469749451,
0.27693498134613037,
0.3934159278869629,
... |
def test _ carn _ ttest _ with _ feeding ( self ) : samples _ herbivores = [ ] samples _ carnivores = [ ] for seed in range ( 1, 20 ) : sim = biosim ( self. geogr, self. ini _ herbs, seed = seed, vis _ years = 0 ) sim. simulate ( 50 ) sim. add _ population ( self. ini _ carns ) herbivores, carnivores = sim. simulate ( ... | [
0.6670240163803101,
-0.16881072521209717,
0.24617919325828552,
0.23090606927871704,
0.1478133499622345,
-0.29370105266571045,
-0.551774263381958,
-0.5751627683639526,
-0.7421298027038574,
0.24972619116306305,
-0.032852426171302795,
0.48988038301467896,
-0.13787320256233215,
-0.540701627731... |
def network _ update ( context, network _ id, values ) : return impl. network _ update ( context, network _ id, values ) | [
-1.2253130674362183,
-0.47379812598228455,
0.038213152438402176,
0.14165335893630981,
0.8219730854034424,
-0.0648755207657814,
-0.7240248918533325,
-0.27959734201431274,
0.5000467896461487,
-0.3262232840061188,
-0.45730265974998474,
-0.7211022973060608,
-0.519827127456665,
-0.0575279705226... |
def axis _ colors ( ax, plot ) : labels _ c = " white " ticks _ c = " white " spines _ c = " white " if plot = = " blue " : ax. set _ facecolor ( " # 2b3e50 " ) if plot = = " gray " : ax. set _ facecolor ( " # dbdee1 " ) if plot = = " white " : ax. set _ facecolor ( " white " ) ax. xaxis. label. set _ color ( labels _ ... | [
0.1552504301071167,
-0.28404700756073,
0.775175154209137,
-0.6721013784408569,
0.28093525767326355,
0.4869033098220825,
0.19331657886505127,
-0.06928402930498123,
-0.2593248784542084,
0.6861091256141663,
0.2833022475242615,
1.4181337356567383,
0.6623678207397461,
0.18847794830799103,
0.8... |
def run _ assignment _ on _ 4x4 _ matrix ( ) : num _ sources = 4 num _ targets = 4 cost = [ [ 90, 76, 75, 80 ], [ 35, 85, 55, 65 ], [ 125, 95, 90, 105 ], [ 45, 110, 95, 115 ] ] expected _ cost = cost [ 0 ] [ 3 ] + cost [ 1 ] [ 2 ] + cost [ 2 ] [ 1 ] + cost [ 3 ] [ 0 ] assignment = linear _ sum _ assignment. simplelinea... | [
-0.3927919864654541,
0.03705395758152008,
0.8571619987487793,
-0.10409890860319138,
0.23373912274837494,
-0.45529237389564514,
0.6958436965942383,
-0.21373380720615387,
-0.20372632145881653,
0.34191974997520447,
-0.2598845660686493,
-0.21576917171478271,
-0.18031629920005798,
-0.7635059356... |
def model _ loss ( input _ real, input _ z, out _ channel _ dim ) : label _ smoothing = 0. 9 g _ model, _ = generator ( input _ z, out _ channel _ dim ) d _ model _ real, d _ logits _ real, _ = discriminator ( input _ real ) d _ model _ fake, d _ logits _ fake, _ = discriminator ( g _ model, reuse = true ) d _ loss _ r... | [
-0.9505552053451538,
-0.28000307083129883,
0.5921251177787781,
-0.2979075610637665,
-0.34831324219703674,
0.4087730050086975,
0.8354531526565552,
0.08144571632146835,
-0.17613695561885834,
0.6052019596099854,
-0.4015117287635803,
0.37319257855415344,
0.7672913074493408,
-0.0114300176501274... |
def post _ process _ dictionaries ( self ) : # copy a possible'iss'fields into the user info if it does not exist # this is useful if someone extracts only the user _ info dictionary from us if " iss " not in self. user _ info and self. has _ key ( " iss " ) : self. user _ info [ " iss " ] = self [ " iss " ] # striping... | [
-0.2504403293132782,
-0.4446704387664795,
0.5237878561019897,
-1.1694626808166504,
-0.8290615081787109,
0.7319052815437317,
-0.09859474003314972,
-0.02160557359457016,
0.46769440174102783,
-0.18519873917102814,
-0.29969558119773865,
-0.44956669211387634,
0.2795526683330536,
0.3071609437465... |
def asc2sac ( asciifile, sacfile = none ) : # based on the c code by dennis o'neill, lupei zhu, # et. al. ( 1988 - 1996 ). from struct import pack if sacfile is none : sacfile = asciifile + ". sac " stream = open ( asciifile, " r " ) data ='' t = [ ] for i in range ( 0, 2 ) : line = stream. readline ( ) time, amp = lin... | [
0.7370869517326355,
-0.6477526426315308,
0.7186686992645264,
-0.6662732362747192,
-0.6444084048271179,
-0.399087518453598,
0.7224053144454956,
-0.34771403670310974,
0.099776491522789,
0.8349123597145081,
-0.46839791536331177,
0.37914586067199707,
0.7136527895927429,
0.006093252450227737,
... |
def raw _ version _ data ( self, allow _ experimental = false, allow _ deprecated = true, allow _ unknown = false ) : versions = [ ] for v in self. _ data : try : status = v ['status'] except keyerror : _ logger. warning ('skipping over invalid version data.'' no stability status in version.') continue status = status.... | [
-0.7104640603065491,
-0.8429490327835083,
0.40029436349868774,
0.3506665527820587,
-0.5979210138320923,
1.2968974113464355,
-1.57142174243927,
0.11130116134881973,
-0.37051406502723694,
0.9393650889396667,
-0.20689019560813904,
0.3847721815109253,
0.2873559594154358,
-0.12331166118383408,
... |
def dirpaths ( self ) : return [ path for path in self. allpaths if os. path. isdir ( path ) ] | [
-0.0639130100607872,
-0.5559067130088806,
0.5258675813674927,
2.0372941493988037,
-0.3813599646091461,
0.7542183995246887,
0.28709036111831665,
0.6904760599136353,
0.8698782324790955,
-0.6461409330368042,
0.0005292546120472252,
-0.294365257024765,
-0.2211424559354782,
0.8850898742675781,
... |
def convert _ external _ derivative _ to _ internal ( external _ derivative, internal _ values, fixed _ values, pre _ replacements, transformations, post _ replacements = none, pre _ replace _ jac = none, post _ replace _ jac = none, ) : dim _ in = len ( internal _ values ) pre _ replaced = pre _ replace ( internal _ v... | [
-0.42216208577156067,
0.5980297923088074,
0.8515139222145081,
-0.46005454659461975,
-0.89613276720047,
-0.31996309757232666,
0.17497782409191132,
0.3397054672241211,
-0.9482895135879517,
-0.5059747695922852,
-0.2428421527147293,
0.4622281491756439,
0.2924709916114807,
0.8224406838417053,
... |
def initialize _ logging ( log _ level = logging. info ) : if not app. debug : print'setting up logging...'# set up default logging for submodules to use stdout # datefmt ='% m / % d / % y % i : % m : % s % p'fmt ='[ % ( asctime ) s ] % ( levelname ) s in % ( module ) s : % ( message ) s'logging. basicconfig ( stream =... | [
0.3738005459308624,
-0.5871306657791138,
0.7489921450614929,
0.3087189197540283,
0.16053244471549988,
-0.2850741147994995,
-0.22754579782485962,
-0.23462919890880585,
-0.48089635372161865,
-1.1694391965866089,
-0.23895412683486938,
0.35931524634361267,
0.17845141887664795,
0.76908612251281... |
def get _ beam _ stress _ strain ( model, key, is _ stress, vm _ word, itime, oxx, max _ principal, min _ principal, ovm, is _ element _ on, header _ dict, keys _ map, eid _ map ) : if is _ stress : beams = model. cbeam _ stress else : beams = model. cbeam _ strain if key in beams : case = beams [ key ] if case. is _ c... | [
-0.3663640022277832,
-0.1646108329296112,
0.6190151572227478,
0.6316165328025818,
-0.6407454013824463,
-0.2494688481092453,
0.15925487875938416,
0.05918247625231743,
0.2429891973733902,
0.9832440614700317,
-0.42707598209381104,
-0.13391999900341034,
-0.4254814386367798,
0.10651892423629761... |
def get _ hotel _ data ( self, name ) : # get the hotel data hotel _ data = self. dataset. get _ group ( name ) # prepare the json object data = { constants. hotel _ name : str ( name ), constants. hotel _ address : str ( hotel _ data [ constants. hotel _ address ]. iloc [ 0 ] ), constants. hotel _ city : str ( hotel _... | [
-0.8712605834007263,
-0.17072388529777527,
0.7204209566116333,
-0.858874499797821,
-0.5553225874900818,
-0.017470356076955795,
0.01357863936573267,
0.3770394027233124,
-0.8895661234855652,
0.7832940816879272,
-0.5264636278152466,
0.5345889329910278,
-0.2808290719985962,
0.21665245294570923... |
def contains ( polyx, polyy, linex, liney ) : # check type, dimensions of polyx, polyy try : # check that polyx, polyy are iterable iter ( polyx ) iter ( polyy ) except typeerror : raise typeerror ( " polyx, polyy must be iterable " ) if len! = len ( polyy ) : raise valueerror ( " polyx, poly must be of same size " ) i... | [
0.5828824639320374,
-1.1539297103881836,
0.9375235438346863,
0.15961726009845734,
-0.19831906259059906,
0.900882363319397,
-0.352481484413147,
-0.826083779335022,
-0.12620295584201813,
0.18646682798862457,
0.08085726201534271,
-0.12353350967168808,
0.14693211019039154,
-0.5433707237243652,... |
def instance _ get _ active _ by _ window _ joined ( context, begin, end = none, project _ id = none, host = none ) : return impl. instance _ get _ active _ by _ window _ joined ( context, begin, end, project _ id, host ) | [
0.019085247069597244,
-0.5707805156707764,
0.642548680305481,
0.8709840178489685,
-0.40633970499038696,
0.5088610649108887,
0.6537779569625854,
-0.011793721467256546,
-0.6472636461257935,
0.08180182427167892,
0.5791031718254089,
1.6072567701339722,
-1.5156413316726685,
-0.35539939999580383... |
def get _ devices _ by _ type ( self, type _ : str ) - > list [ dict ] : return [ device for device in self. devices. values ( ) if device [ " type " ] = = type _ ] | [
-1.0754352807998657,
0.22431457042694092,
0.3736657202243805,
0.49137207865715027,
0.2503833472728729,
-0.8183184862136841,
-0.39460498094558716,
-0.28694918751716614,
-0.17142044007778168,
0.9490809440612793,
-0.001575135043822229,
0.3705521523952484,
0.22862094640731812,
1.11194455623626... |
def tophat _ bandpass ( nu _ c, delta _ nu, samples = 50 ) : freqs = np. linspace ( nu _ c - delta _ nu / 2., nu _ c + delta _ nu / 2., samples ) weights = np. ones _ like ( freqs ) / ( freqs. size * delta _ nu / samples ) return ( freqs, weights ) | [
0.5714110732078552,
-0.4763004183769226,
0.6503528952598572,
-0.45262396335601807,
-0.20694950222969055,
0.5785871744155884,
0.44229671359062195,
-1.0025383234024048,
0.22126825153827667,
-0.3389161229133606,
0.2790556252002716,
0.03549547120928764,
0.21875454485416412,
0.01653221622109413... |
def testgettaginstancewithsetvalue ( self ) : result = tagapi ( self. user ). create ( [ ( u'username / tag ', u'description') ] ) [ ( objectid, path ) ] = result tagvalueapi ( self. user ). set ( { objectid : { u'username / tag': [ u'foo ', u'bar'] } } ) self. store. commit ( ) with login ( u'username ', uuid4 ( ), se... | [
-0.1618771106004715,
0.23629318177700043,
0.43015700578689575,
-0.1374213993549347,
0.34157055616378784,
0.3386935293674469,
-0.19297027587890625,
-0.6576896905899048,
-0.6409732699394226,
-0.2559756934642792,
-0.7834911346435547,
0.08270701766014099,
0.2502044141292572,
0.1259597688913345... |
def toggle _ image _ warnings _ collapse ( n, is _ open ) : if n : return not is _ open return is _ open | [
-1.3266385793685913,
0.47363027930259705,
0.3838430345058441,
0.7618710994720459,
0.2737218737602234,
0.04103732481598854,
0.21086913347244263,
-0.26038241386413574,
0.03162706643342972,
0.24901069700717926,
0.27413633465766907,
-0.28807714581489563,
-0.30350226163864136,
0.171639725565910... |
def get _ flight _ levels ( self ) : return [ int ( self. tablewidget. item ( row, 0 ). text ( ) ) for row in range ( self. tablewidget. rowcount ( ) ) ] | [
-0.1498255431652069,
0.0710182785987854,
0.7221841812133789,
0.7065162658691406,
-0.10230744630098343,
0.3038524389266968,
-0.321568101644516,
-0.6662401556968689,
-0.19157898426055908,
0.081536665558815,
-0.9420636296272278,
-0.768628716468811,
0.20094749331474304,
1.1592644453048706,
0... |
def _ dict _ to _ statslist ( bach _ dict ) : m = person. data _ size ( ) bachelor _ stats = np. zeros ( ( len ( bach _ dict ), m ) ) i = 0 for person in bach _ dict. values ( ) : bachelor _ stats [ i, : ] = person. to _ array ( ) i = i + 1 return bachelor _ stats | [
-0.13163548707962036,
-0.12048548460006714,
0.45023635029792786,
-0.939446747303009,
0.6184436082839966,
1.1124858856201172,
-0.38390597701072693,
-0.08958399295806885,
0.35498982667922974,
0.6225205063819885,
-0.5385516881942749,
0.5033133625984192,
0.5576246380805969,
0.3058425486087799,... |
def display ( values ) : width = 1 + max ( len ( values [ s ] ) for s in boxes ) line ='+ '. join ( ['-'* ( width * 3 ) ] * 3 ) for r in rows : print (''. join ( values [ r + c ]. center ( width ) + ('|'if c in'36'else'' ) for c in cols ) ) if r in'cf': print ( line ) return pass | [
0.5170694589614868,
0.1847638040781021,
0.7418918609619141,
0.16763506829738617,
-0.8072026968002319,
0.4675431251525879,
-0.23644080758094788,
-0.44718843698501587,
-0.20132435858249664,
-0.06621173024177551,
0.6682676672935486,
-0.4096144139766693,
-0.01217735931277275,
0.545891225337982... |
def plot _ benchmark _ file ( filename ) : with open ( filename ) as f : content = f. readlines ( ) # every line is a dictionary all _ dicts = [ ast. literal _ eval ( line ) for line in content ] plot _ benchmark _ dicts ( all _ dicts ) | [
0.751470685005188,
0.5158873796463013,
0.3289855122566223,
-0.9050437211990356,
-0.30036771297454834,
0.5304636359214783,
0.48558077216148376,
1.5490928888320923,
-1.7446255683898926,
0.4166724383831024,
0.14221236109733582,
0.32118988037109375,
0.5239953398704529,
0.6877095103263855,
-0... |
def fec _ encode ( x ) : assert x. bit _ length ( ) < = 84 d = cyclic _ encode ( x & 0x1fffff ) c = cyclic _ encode ( x > > 21 & 0x1fffff ) b = cyclic _ encode ( x > > 42 & 0x1fffff ) a = cyclic _ encode ( x > > 63 & 0x1fffff ) return interleave ( a < < 93 | b < < 62 | c < < 31 | d, 124 ) | [
0.8707486391067505,
0.49764588475227356,
0.543645441532135,
0.04843895137310028,
0.05986378714442253,
-0.4972693920135498,
0.1300671100616455,
-1.080277919769287,
0.5554468631744385,
-0.7355818152427673,
-0.4715108275413513,
0.3224784731864929,
-0.09051734209060669,
0.19101399183273315,
... |
def entry _ id ( self, entry _ id ) : self. _ entry _ id = entry _ id | [
1.0676432847976685,
-1.0147784948349,
-0.48197507858276367,
0.4624446928501129,
1.2591239213943481,
0.7888538837432861,
0.48255959153175354,
1.2432384490966797,
0.8165276050567627,
0.11750516295433044,
-0.13370834290981293,
0.7393266558647156,
0.2789074182510376,
1.49898099899292,
-0.369... |
def to _ dataframe ( msdf : mappingsetdataframe ) - > pd. dataframe : data = [ ] doc = to _ mapping _ set _ document ( msdf ) if doc. mapping _ set. mappings is none : raise typeerror for mapping in doc. mapping _ set. mappings : mdict = mapping. _ _ dict _ _ m = { } for key in mdict : if mdict [ key ] : m [ key ] = md... | [
-0.8369203209877014,
0.20192937552928925,
0.3395160138607025,
-0.6750203967094421,
-1.0235754251480103,
-0.4158053696155548,
0.06181574985384941,
0.052923209965229034,
0.5730814933776855,
-1.045150637626648,
0.546795129776001,
0.5524275302886963,
0.3434966802597046,
0.14626191556453705,
... |
def switch _ to _ borrowers _ portfolio ( self ) : self. mainwindow. bp _ controller. setup _ view ( ) self. mainwindow. stackedwidget. setcurrentwidget ( self. mainwindow. bp _ page ) | [
0.8782946467399597,
0.4629576802253723,
0.45722195506095886,
-0.12143976241350174,
0.5904175043106079,
0.26720836758613586,
1.2339019775390625,
0.6740075349807739,
-0.28555673360824585,
0.5310969948768616,
0.17060551047325134,
1.752498984336853,
-1.2969962358474731,
0.29691174626350403,
... |
def instance _ fault _ create ( context, values ) : return impl. instance _ fault _ create ( context, values ) | [
-0.4716638922691345,
0.5541611909866333,
0.17477700114250183,
0.28020110726356506,
0.3619694411754608,
0.572266161441803,
-0.03665570169687271,
-0.6609734296798706,
0.2324967086315155,
-0.6726630330085754,
-1.2120323181152344,
0.12523217499256134,
-0.21675869822502136,
-0.6067491173744202,... |
def normalizetext ( originalvalue _ str ) : try : iscorrectformat, result _ str = _ _ check _ formatting ( originalvalue _ str ) if ( iscorrectformat ) : return true, result _ str else : return false, result _ str except exception as err : return false, err | [
-0.3858669400215149,
-0.7343063354492188,
0.7889516353607178,
0.8732426762580872,
-1.576920747756958,
0.5010765790939331,
0.6490883231163025,
0.23244187235832214,
0.22385531663894653,
0.4423309862613678,
0.4723210334777832,
-0.2883167862892151,
-1.3063106536865234,
0.04882177710533142,
0... |
def compute _ individual _ treatment _ effect ( self, df, paths, g, query, options, bug _ val, config, cfg, variable _ types ) : from causality. estimation. nonparametric import causaleffect from causality. estimation. adjustments import adjustfordirectcauses from networkx import digraph ite = [ ] objectives = options.... | [
0.16395506262779236,
0.09149233251810074,
0.5930615067481995,
0.6047424077987671,
0.3899540603160858,
-0.3104400038719177,
1.0682892799377441,
1.0108319520950317,
0.179782435297966,
0.39622223377227783,
0.05460498109459877,
0.22437062859535217,
-0.5156684517860413,
-0.2929558753967285,
0... |
def get _ current _ price ( fsyms, tsyms, e ='all ', try _ conversion = true, full = false, format ='raw') : # select api function based on'full'parameter value if not full : func ='pricemulti'else : func ='pricemultifull'# convert single fsym and tsym input to single element lists if not isinstance ( fsyms, list ) : f... | [
-1.3516724109649658,
-0.19847935438156128,
0.7084245085716248,
-0.24064357578754425,
-0.1877593845129013,
-0.8226573467254639,
-0.6712046265602112,
0.2869041860103607,
-0.38774749636650085,
0.5962923169136047,
0.1806906759738922,
0.4865436553955078,
0.4372391104698181,
0.37614020705223083,... |
def breed _ population ( population ) : # create an empty list for new population new _ population = [ ] population _ size = population. shape [ 0 ] # create new population generating two children at a time for _ in range ( int ( population _ size / 2 ) ) : parent _ 1 _ loc = rn. randint ( 0, population _ size - 1 ) pa... | [
-0.3809152841567993,
0.30739548802375793,
0.9207252860069275,
1.0291043519973755,
0.4808393120765686,
0.6913772225379944,
1.3474324941635132,
-0.3630326986312866,
0.7768609523773193,
0.44372478127479553,
-0.6611137986183167,
-0.12844276428222656,
-0.40241843461990356,
0.18055833876132965,
... |
def fileid _ from _ url ( url ) : raw _ fileid = re. findall ( " ~ [ a - z. ] + / [ 0 - 9 ] + ", url ) [ 0 ] [ 1 : ] return raw _ fileid. replace ('/ ',':') | [
0.0687011107802391,
-1.2320506572723389,
0.5838553309440613,
-0.04654882848262787,
-0.403141587972641,
0.8852147459983826,
0.33442482352256775,
1.1352181434631348,
0.45761728286743164,
0.496043860912323,
-0.4853968918323517,
-0.23822364211082458,
-0.11103297770023346,
-0.378587931394577,
... |
def paste _ server ( app, gcfg = none, host = " 127. 0. 0. 1 ", port = none, * args, * * kwargs ) : from gunicorn. app. pasterapp import pasterserverapplication pasterserverapplication ( app, gcfg = gcfg, host = host, port = port, * args, * * kwargs ). run ( ) | [
-0.13965919613838196,
-0.38280603289604187,
0.6139394044876099,
-0.2525118887424469,
-0.285596638917923,
0.6633713245391846,
-0.3054531514644623,
0.09197726845741272,
0.14319147169589996,
1.052653431892395,
-0.7223391532897949,
0.7451579570770264,
-0.7553618550300598,
0.13057225942611694,
... |
def _ scan _ titles ( keyfile, title1, title2, title3, results = 0, _ only _ episodes = 0 ) : se = 0 if _ only _ episodes : se = 1 else : if title3 and title3 [ - 1 ] = ='}': se = 1 return scan _ titles ( _ readtitleskeyfile ( keyfile, searchingepisode = se ), title1, title2, title3, results, onlyepisodes = _ only _ ep... | [
-1.1403158903121948,
0.4136063754558563,
0.5130760669708252,
0.6958030462265015,
-0.8912714719772339,
0.02422347292304039,
-1.116304636001587,
-0.18178556859493256,
-0.8398043513298035,
-0.05098608881235123,
0.32044583559036255,
-0.9846190214157104,
-0.9309812784194946,
-0.7374588251113892... |
def _ _ init _ _ ( self, body, author ) : self. body = body self. author = author | [
0.6841264367103577,
-0.6990153789520264,
0.6567838788032532,
0.5326996445655823,
0.29853346943855286,
0.666271984577179,
-1.32195246219635,
0.828676700592041,
0.20019713044166565,
-0.4059768617153168,
0.04675330966711044,
1.3727563619613647,
-0.2333148568868637,
0.38696783781051636,
0.69... |
def create _ usage ( self, integration _ id, asset _ id, query : dict = none ) : if query is none : query = { } query ['integration _ id'] = integration _ id query ['asset _ id'] = asset _ id return self. bynder _ request _ handler. post ( endpoint ='/ api / media / usage / ', payload = query ) | [
-0.5438839793205261,
0.0692601352930069,
0.5674725770950317,
-0.6958949565887451,
0.890972375869751,
-0.7797774076461792,
0.19703304767608643,
-0.9337763786315918,
-0.18754993379116058,
0.8036825060844421,
0.7403784990310669,
0.8756435513496399,
-0.4716818332672119,
0.4567132294178009,
0... |
def in _ place ( sorting _ algorithm ) : @ wraps ( sorting _ algorithm ) def wrapper ( arr, * args, * * kwargs ) : arr [ : ] = sorting _ algorithm ( arr, * args, * * kwargs ) return wrapper | [
0.00699491985142231,
-0.3643264174461365,
0.45466089248657227,
-0.11247582733631134,
-0.5678078532218933,
0.7047401666641235,
-0.34241941571235657,
0.3215833604335785,
0.6362007260322571,
1.0979872941970825,
0.25633201003074646,
0.9732670187950134,
0.2770790457725525,
1.202236294746399,
... |
def _ on _ keyboard _ down ( self, keyboard : keyboard, key _ code : tuple, text : str, modifiers : list ) - > none : self. pressed _ keys. add ( key _ code [ 1 ] ) | [
-0.5634520649909973,
0.5103411674499512,
0.3567579686641693,
0.26293429732322693,
0.8176336884498596,
-0.03320315480232239,
-0.5053882002830505,
0.8931054472923279,
-0.16445045173168182,
0.7449036240577698,
-0.8439655900001526,
0.41292908787727356,
-0.7588402628898621,
0.4495319724082947,
... |
def count ( self ) : return self. _ count | [
0.3598795235157013,
-0.2063908576965332,
0.19591960310935974,
-0.16590912640094757,
0.5791688561439514,
1.2227230072021484,
0.7719603180885315,
0.17495541274547577,
-0.3653114140033722,
-1.1340256929397583,
-0.664782702922821,
-0.3649803102016449,
0.06562656164169312,
-0.2979464530944824,
... |
def collapsible ( self ) : rlen = self. rowlen selength = self. length # sleezy way to align the two conditions below for i in self. range : cell = self. get _ cell ( i ) if ( cell = = 0 ) \ or ( ( i % rlen < rlen - 1 ) and ( cell = = self. get _ cell ( i + 1 ) ) ) \ or ( ( i + rlen < selength ) and ( cell = = self. ge... | [
-0.04970654100179672,
-0.172178253531456,
0.7520794868469238,
0.6181084513664246,
-0.8861894011497498,
0.26326805353164673,
0.40007656812667847,
0.5727447867393494,
-0.02201889082789421,
0.35920920968055725,
0.23432831466197968,
-0.8504677414894104,
-1.0222012996673584,
0.561813473701477,
... |
def _ _ init _ _ ( self, backlog _ filepaths _ folders = none ) : self. cwd = os. getcwd ( ) if not ( backlog _ filepaths _ folders ) : backlog _ filepaths _ folders = [ " sites ", " handler _ classification _ failed ", " handler _ regexpreclassified ", " handler _ relevant " ] self. backlog _ html _ filepaths _ list =... | [
0.03146899491548538,
-0.48871809244155884,
0.7515447735786438,
0.377774178981781,
-0.00034249437157996,
0.9104565978050232,
1.518786072731018,
0.11775309592485428,
-0.8929429054260254,
-0.7955718040466309,
-0.4430139362812042,
0.42122602462768555,
0.2188272774219513,
0.8447005152702332,
... |
async def loop _ game ( self ) : if not self. first _ tick : await self. send ( action ='greet ', name ='python') self. first _ tick = true if self. start : action = randint ( 0, 2 ) if action = = 0 : # set speed speed = randint ( 0, 2 ) await self. send ( action ='set _ speed ', speed = speed ) elif action = = 1 : # s... | [
-0.9042421579360962,
0.5214346051216125,
0.6725306510925293,
0.8214417695999146,
0.8169548511505127,
0.4232451915740967,
-0.11662677675485611,
-1.401441216468811,
0.08610383421182632,
0.7869294881820679,
-0.2933032810688019,
0.5652152895927429,
-0.48749902844429016,
0.7048897743225098,
-... |
def searchclassdefxml ( srcdir ) : # compile necessary re statements classnamere = re. compile ( r'class \ s + name \ s * = \ s * " ( [ ^ " ] * ) "') spacesre = re. compile ( r'\ s +') stdre = re. compile ( r'std : :') srcclassnamere = re. compile ( r'( \ w + ) / src / classes _ def. xml') braketre = re. compile ( r'<.... | [
-0.6621705293655396,
-0.02776883728802204,
0.7761735320091248,
-0.4624477028846741,
-0.24190562963485718,
-0.9624255299568176,
0.08815059065818787,
-0.048682697117328644,
-0.14119456708431244,
0.1592661738395691,
-0.002987008076161146,
-0.3982631266117096,
0.023329688236117363,
1.321733117... |
def check _ distribution ( distribution ) : err ='output needs to be of type : { } '. format ( distribution _ list ) if distribution not in distribution _ list : raise nameerror ( err ) | [
-0.4773422181606293,
0.03532719239592552,
0.3592161536216736,
0.6747249364852905,
-0.2539553642272949,
0.44668281078338623,
-0.015927301719784737,
-0.0803912878036499,
0.7996405959129333,
0.5119379758834839,
0.3028903007507324,
0.04710206389427185,
-0.167462557554245,
1.4107080698013306,
... |
def save _ speech ( self, data ) : filename ='audio'# writes data to wav file data =''. join ( data ) wf = wave. open ( filename + '. wav ','wb') wf. setnchannels ( self. channels ) wf. setsampwidth ( self. width ) wf. setframerate ( self. rate ) wf. writeframes ( data ) wf. close ( ) return filename + '. wav ' | [
-0.05714062973856926,
-0.819979727268219,
0.6023644208908081,
-0.16951528191566467,
0.25649359822273254,
0.01595485210418701,
-0.35802215337753296,
-0.6323794722557068,
0.5361708998680115,
0.020879477262496948,
-0.4846891760826111,
0.2312868982553482,
-0.680610179901123,
0.4572396874427795... |
def eeg _ to _ matrix ( eeg ) : kept _ electrodes = [ " fp1 ", " f3 ", " f7 ", " c3 ", " t3 ", " p3 ", " t5 ", " o1 ", " pz ", " fp2 ", " fz ", " f4 ", " f8 ", " cz ", " c4 ", " t4 ", " p4 ", " t6 ", " o2 ", ] # different labels for the same electrodes kept _ electrodes. extend ( [ " t7 ", " p7 ", " t8 ", " p8 " ] ) # ... | [
-0.9870768785476685,
-0.6587355136871338,
0.7045542001724243,
-0.41040945053100586,
0.11711146682500839,
0.1109648123383522,
0.14278529584407806,
0.2719759941101074,
0.5905713438987732,
0.8835227489471436,
0.10713595151901245,
-0.05965575575828552,
-0.13479338586330414,
-0.0294452924281358... |
def load _ object ( self, save = true, object _ type = none ) : pass | [
-0.6231173276901245,
-0.31109851598739624,
0.6180822253227234,
0.9971466064453125,
0.48677897453308105,
0.45495644211769104,
0.45131412148475647,
0.03345029056072235,
0.1833980828523636,
0.2551823556423187,
-1.0020700693130493,
0.09909243881702423,
-0.2107207179069519,
0.05613059177994728,... |
def updatelines ( self, n, p ) : o = self. othernumber ( n ) for line in self. linesforpoint ( p ) : values = self. linetovalues ( line ) playermoves = values. count ( n ) othermoves = values. count ( o ) # print line, playermoves, othermoves # if we just removed a point ( it's currently 0 ) if self. pointtovalue ( p )... | [
-0.046214502304792404,
-0.9921247959136963,
0.7538425922393799,
-0.03653822839260101,
0.26218611001968384,
0.18950273096561432,
-0.4110189378261566,
0.22122164070606232,
0.42805734276771545,
0.5280518531799316,
0.4767422080039978,
-0.5795915722846985,
-0.43284371495246887,
0.79226839542388... |
def get _ node _ count ( self ) : return get _ node _ count ( self ) | [
-0.9862176775932312,
0.5988487601280212,
0.41699719429016113,
-0.057469259947538376,
0.6848216652870178,
-0.166465163230896,
0.16109465062618256,
0.42379137873649597,
-0.741553008556366,
-0.14651593565940857,
-0.818545937538147,
0.8352239727973938,
0.13264122605323792,
-0.03033149801194667... |
def make _ shard _ prefix ( key, prefix _ len = 6 ) : # in order to shard effectively, we want to avoid any patterns # with a regularized increment or decrement assert prefix _ len < len ( key ), key prefix ='' for i in range ( - prefix _ len, 0 ) : if i % 2 = = 0 : prefix = prefix + key [ i ] else : prefix = key [ i ]... | [
0.2719250023365021,
0.2916948199272156,
0.5859108567237854,
-0.1994417905807495,
-0.15563558042049408,
-0.14659902453422546,
-0.11472811549901962,
-0.7783986330032349,
0.9794896841049194,
0.7662777304649353,
-0.22851824760437012,
0.22012007236480713,
-0.18473878502845764,
-0.46622037887573... |
def get _ weather _ site _ by _ coordinates ( x : float, y : float ) - > dict : # build up array of [ x, y ] coordinates. features = list ( get _ weather _ site _ collection ( ) ) points = np. asarray ( [ feat ['geometry'] ['coordinates'] for feat in features ] ) # construct a k - d tree. tree = kdtree ( points ) query... | [
0.011372160166501999,
0.26566821336746216,
0.36713743209838867,
-0.24876241385936737,
-0.830833911895752,
-0.3522719740867615,
-0.21614214777946472,
-0.8039587736129761,
-0.8280489444732666,
-0.02190760150551796,
0.07990940660238266,
0.8790005445480347,
0.10975509881973267,
-0.441875696182... |
def get ( self, agentml, user = none, key = none ) : pass | [
-0.6614977121353149,
-0.27725207805633545,
0.25880300998687744,
1.1542820930480957,
-0.7826064229011536,
-0.659861147403717,
-1.2738467454910278,
0.1718403697013855,
-0.14879070222377777,
-0.15642482042312622,
0.5965259075164795,
0.4622648060321808,
-0.16192349791526794,
-0.123893938958644... |
def check _ condition ( self, condition, device _ name = none ) : if condition is none : return true if condition = ='device _ back _ online': if device _ name is none : error _ msg = ('device _ name required to check if'' device _ back _ online') raise sungrow. configurationerror ( error _ msg ) bus = self. _ device _... | [
-0.017337674275040627,
0.07740367203950882,
0.6396986842155457,
1.274926781654358,
-0.16090025007724762,
0.36410602927207947,
0.47773221135139465,
0.8907527327537537,
-0.30153006315231323,
0.6130862236022949,
0.33211737871170044,
-0.08581884205341339,
-0.5806332230567932,
0.212307348847389... |
def point _ in _ poly ( i, j, poly ) : return path ( poly ). contains _ point ( [ i, j ] ) | [
0.40145620703697205,
-1.1744587421417236,
0.1159995049238205,
0.6707278490066528,
-0.3790317475795746,
0.24942700564861298,
-0.00012375513324514031,
-0.19569873809814453,
-0.1916181594133377,
0.715426504611969,
0.021621016785502434,
-0.38131219148635864,
-0.8951243162155151,
-1.72458267211... |
def set _ health _ decrement ( self, num ) : self. health - = num | [
-0.019389746710658073,
-0.1802557408809662,
0.6635630130767822,
0.35292693972587585,
0.5276408195495605,
1.4313756227493286,
0.6227096319198608,
0.3163074553012848,
-0.22779126465320587,
-1.1052615642547607,
0.005916806869208813,
0.1198170855641365,
-0.6427160501480103,
-0.1051494106650352... |
def visittree ( tree, cdesc, docmap ) : nm = tree. _ _ class _ _. _ _ name _ _ if nm in [ " module " ] : # tree. body is a list for k in tree. body : cdesc = visittree ( k, cdesc, docmap ) elif nm in [ " classdef " ] : assert cdesc is none # create the componentdesc object cdesc = componentdesc ( tree. name ) for k in ... | [
0.08349587023258209,
-0.12628954648971558,
0.8557730317115784,
-0.8117897510528564,
-0.5454062819480896,
0.0812508761882782,
-0.25321483612060547,
-0.23300081491470337,
0.3037033975124359,
0.47588446736335754,
0.42604100704193115,
0.8816125988960266,
0.09407991915941238,
1.2922437191009521... |
def experiment ( self, scoring _ rule, n _ alternatives, n _ voters, n _ samples ) : n _ manipulable = 0 n _ nonmanipulable = 0 for i _ sample in range ( n _ samples ) : sample _ profile = generate _ profile ( n _ alternatives, n _ voters ) # generate random sample profile if self. manipulable ( scoring _ rule, sample ... | [
-0.10960420221090317,
0.5243005156517029,
0.7786497473716736,
0.3859010636806488,
0.9971420764923096,
0.986219048500061,
0.5508051514625549,
0.16375906765460968,
-1.0268970727920532,
0.8610647320747375,
-0.05423646420240402,
-0.5517779588699341,
-0.2569228410720825,
0.897261381149292,
0.... |
def vervang ( regel, begintekst, eindtekst, vervangtekst ) : verv = " " locatie1 = regel. find ( begintekst ) if ( locatie1 > - 1 ) : locatie2 = regel. find ( eindtekst, locatie1 ) verv = regel [ locatie1 : locatie2 ] regel = regel. replace ( verv, vervangtekst ) return regel | [
0.00020123265858273953,
-0.39671048521995544,
0.48098519444465637,
0.08146774023771286,
-0.31718209385871887,
-0.052449192851781845,
0.9131352305412292,
0.37469881772994995,
0.01787826418876648,
0.985907793045044,
-0.32031330466270447,
0.515299379825592,
-0.6001831293106079,
-0.40426042675... |
def raw _ match _ statistics ( ) : matches = getdata. get _ all _ matches ( ) print ( matches. isnull ( ). sum ( ) ) print ('columns : ', len ( matches. columns ) ) print ('rows with nans : ', len ( matches ) - len ( matches. dropna ( ) ) ) matches. isnull ( ). sum ( ). to _ csv ('/ users / vegardhaneberg / desktop / i... | [
0.585681140422821,
0.3950829803943634,
0.694576621055603,
0.008070802316069603,
-0.19326014816761017,
-0.134240061044693,
0.6556267142295837,
-0.06307371705770493,
0.2882722020149231,
-0.47006523609161377,
-0.30801114439964294,
0.8582074642181396,
1.5907694101333618,
0.056858766824007034,
... |
def all _ cards ( disjoint ) : # flat _ disjoints = [ flatten ( sets ) for sets in disjoint ] used _ cards = [ ] for subset in disjoint : for card in subset : if card not in used _ cards : used _ cards + = [ card ] return used _ cards | [
-0.5881109237670898,
-0.6944307088851929,
0.69456547498703,
0.05446863919496536,
-0.13303978741168976,
0.1923063099384308,
-0.3711536228656769,
0.24835555255413055,
-0.3571443259716034,
0.09952149540185928,
-0.38329461216926575,
-0.1566828042268753,
-0.09770984947681427,
0.2950332760810852... |
def download _ withdrawn _ patent _ numbers ( destination _ folder ) : # download url ='https : / / www. uspto. gov / sites / default / files / documents / withdrawn. zip'filepath = os. path. join ( destination _ folder,'withdrawn. zip') print ( " destination : { } ". format ( filepath ) ) if not os. path. exists ( des... | [
0.12020616978406906,
-0.6197927594184875,
0.7079270482063293,
-0.23076799511909485,
-0.4407843053340912,
0.2908362150192261,
0.6516912579536438,
1.3438962697982788,
0.23523475229740143,
0.03892511874437332,
-0.09880668669939041,
-0.5813698768615723,
-0.5652036070823669,
-0.2525683045387268... |
def set _ investor _ navigation ( self ) : self. mainwindow. navigation _ pushbutton _ 1. settext ('profile') self. mainwindow. navigation _ pushbutton _ 1. clicked. connect ( self. switch _ to _ profile ) self. mainwindow. navigation _ pushbutton _ 2. settext ('portfolio') self. mainwindow. navigation _ pushbutton _ 2... | [
-0.7088096737861633,
0.47069135308265686,
0.675398588180542,
0.4499668776988983,
0.3115546703338623,
0.20501285791397095,
0.875112771987915,
0.16570203006267548,
0.34234142303466797,
0.2523532807826996,
-0.10330434143543243,
-0.3412925899028778,
-0.3463432490825653,
0.15454870462417603,
... |
def buildstructuralrepresentation ( ) : | [
-0.9666910171508789,
-0.9428592920303345,
0.1853892058134079,
-0.16028425097465515,
-0.18294891715049744,
0.25915631651878357,
0.5735432505607605,
0.483318030834198,
0.8379687070846558,
-0.8502687215805054,
-0.18815776705741882,
-0.1393575817346573,
0.1458885371685028,
-0.36430075764656067... |
def root _ mean _ square _ error ( actual, forecast ) : with warnings. catch _ warnings ( ) : warnings. simplefilter ( " ignore ", category = runtimewarning ) rmse _ result = np. sqrt ( np. nanmean ( ( ( actual - forecast ) * * 2 ), axis = 0 ) ) return rmse _ result | [
0.028488805517554283,
-0.45176130533218384,
0.29485592246055603,
0.27745404839515686,
-0.287173867225647,
-0.28918755054473877,
-0.5646527409553528,
-0.4369930028915405,
-0.3962262272834778,
0.5491713285446167,
0.5412922501564026,
1.0341099500656128,
0.4180850386619568,
0.4782838225364685,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.