text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def _ _ call _ _ ( self, pdbs, * * kwargs ) : self. logger. info ( " will group % i pdbs ", len ( pdbs ) ) ifes = self. all _ ifes ( pdbs ) self. logger. info ( " found % i ifes to cluster ", len ( ifes ) ) alignments = self. alignments ( ifes ) discrepancy = self. discrepancies ( ifes ) grouped = set ( ) groups = [ ] ... | [
-0.8002464175224304,
0.4779084324836731,
0.6234725117683411,
-0.10402130335569382,
1.0535517930984497,
0.12367464601993561,
0.5889319181442261,
-0.3827241063117981,
0.16430167853832245,
-0.050321586430072784,
0.4762362837791443,
-0.1482226699590683,
-0.7522019147872925,
0.21110928058624268... |
def _ check _ pickle ( toafilename, picklefilename = none ) : if picklefilename is none : for ext in ( ". pickle. gz ", ". pickle " ) : testfilename = toafilename + ext if os. path. isfile ( testfilename ) : picklefilename = testfilename break # it it's still none, no pickles were found if picklefilename is none : retu... | [
-0.09527857601642609,
-0.5526516437530518,
0.8732993602752686,
-0.13706646859645844,
-0.45019686222076416,
-0.02436596341431141,
0.8058672547340393,
-0.002013539196923375,
0.022243211045861244,
0.1451512724161148,
1.2609643936157227,
-1.330301284790039,
0.45746859908103943,
-0.165995314717... |
def configuredparameters ( self ) : # note : [ aziroshin ] this is a bit hacky. x _ x configuredparametersdict = { } for oneofourattributes in self. _ _ dict _ _. keys ( ) : attributevalue = self. _ _ dict _ _ [ oneofourattributes ] if type ( attributevalue ) = = configoptionparameter : if attributevalue. configured : ... | [
-0.7193974256515503,
-0.31458747386932373,
0.22649051249027252,
-0.26634401082992554,
-0.0789065733551979,
-0.7078167796134949,
0.31081974506378174,
-0.0862264335155487,
-0.3621917963027954,
0.8379098176956177,
-0.6596357822418213,
-0.0035773850977420807,
0.03952771797776222,
1.25729775428... |
def validation _ docker _ compose ( example _ folder _ path ) : services = get _ services ( example _ folder _ path ) # checks if the services are present. if not services : print ( " the services in the docker - compose are not specified. please specify them. " ) return false # checks if the services have the " build ... | [
-0.4424048662185669,
-0.09983295202255249,
0.6971259713172913,
0.4434158205986023,
-0.06978952884674072,
1.1696267127990723,
0.5325541496276855,
0.21465370059013367,
-0.8104897141456604,
0.0014062859117984772,
0.13811804354190826,
0.15600962936878204,
0.1148386001586914,
0.8393370509147644... |
def min _ max _ hessian _ eigs ( net, dataloader, criterion, rank = 0, use _ cuda = false, verbose = false ) : params = [ p for p in net. parameters ( ) if len ( p. size ( ) ) > 1 ] n = sum ( p. numel ( ) for p in params ) def hess _ vec _ prod ( vec ) : hess _ vec _ prod. count + = 1 # simulates a static variable vec ... | [
0.40099427103996277,
0.20699341595172882,
0.8042625784873962,
0.3356018364429474,
0.047313347458839417,
0.02532247081398964,
-0.3259742856025696,
0.39984649419784546,
-0.04764886572957039,
0.32162153720855713,
0.8550857901573181,
0.49960997700691223,
0.2955087721347809,
1.3661744594573975,... |
def layers ( vgg _ layer3 _ out, vgg _ layer4 _ out, vgg _ layer7 _ out, num _ classes ) : # todo : implement function # https : / / people. eecs. berkeley. edu / ~ jonlong / long _ shelhamer _ fcn. pdf # https : / / github. com / marvinteichmann / tensorflow - fcn / blob / master / fcn8 _ vgg. py # todo # 1 ) define f... | [
0.030972620472311974,
-0.19598005712032318,
0.5896263718605042,
0.5760595202445984,
0.17064359784126282,
-0.626761794090271,
0.7965505719184875,
0.15073369443416595,
-0.39777660369873047,
0.12454821169376373,
-0.28023478388786316,
-0.07063991576433182,
0.45533984899520874,
-0.1955290883779... |
def on _ activation ( self, user, quota _ dict = none, * * kwargs ) : pass | [
-0.29826509952545166,
-0.5765867829322815,
0.32134783267974854,
0.8672735691070557,
-0.6095123291015625,
-0.3526790142059326,
-0.10102241486310959,
0.22909724712371826,
0.32177427411079407,
0.3464318513870239,
-1.3526068925857544,
0.6400021314620972,
1.0992554426193237,
-0.9084922671318054... |
def test _ detect _ peak _ sequence _ cwt _ no _ results ( rugr _ wav _ str ) : rugr _ audio = audio. from _ file ( rugr _ wav _ str ). trim ( 0, 1 ) detections = sp. detect _ peak _ sequence _ cwt ( rugr _ audio, sample _ rate = 400, window _ len = 10, center _ frequency = 50, wavelet = " morl ", peak _ threshold = 0.... | [
-0.02800222672522068,
-0.24449925124645233,
0.5304366946220398,
0.6168240308761597,
0.7282435894012451,
0.6890058517456055,
0.8603536486625671,
-0.21725352108478546,
0.09309607744216919,
-0.6405511498451233,
-0.7790674567222595,
-0.026316292583942413,
-0.26147323846817017,
0.62236267328262... |
def open _ mills _ 2 ( self, player ) : hero _ semimills = [ ] villain _ semimills = [ ] for l in range ( state. board _ size ) : for r in range ( state. board _ size ) : for c in range ( state. board _ size ) : # - - - - - - - - - - - - - - - - - - - - - - - [ hero ] - - - - - - - - - - - - - - - - - - - - - - - # # c... | [
-0.418382853269577,
-0.7353509664535522,
1.038100242614746,
-0.33871763944625854,
0.08935990929603577,
-0.06388439238071442,
1.0316368341445923,
0.6410785913467407,
0.04418005794286728,
0.2135128229856491,
-0.5258342623710632,
0.09799318760633469,
-0.1443212479352951,
0.27660027146339417,
... |
def get _ javascripts ( self, template _ vars ) : if not hasattr ( self,'javascripts') : return template _ vars scripts _ dict = getmethattr ( self,'javascripts') js _ tmp = " " for script _ d in scripts _ dict : for script _ src in scripts _ dict [ script _ d ] ['src'] : js _ tmp = js _ tmp + " < script type = \ " tex... | [
-0.7412391901016235,
0.15459883213043213,
0.46029162406921387,
-0.9737908840179443,
-0.3244297206401825,
-0.9508293271064758,
-0.5064577460289001,
-0.5833133459091187,
0.29085293412208557,
0.5025478601455688,
-0.36185136437416077,
0.6105703711509705,
0.22640779614448547,
1.2837231159210205... |
def fetchohlc ( ticker, interval, duration ) : instrument = instrumentlookup ( instrument _ df, ticker ) data = pd. dataframe ( kite. historical _ data ( instrument, dt. date. today ( ) - dt. timedelta ( duration ), dt. date. today ( ), interval ) ) data. set _ index ( " date ", inplace = true ) return data | [
0.43120720982551575,
0.6339629292488098,
0.5413994789123535,
0.38493090867996216,
-0.05079739913344383,
0.22245006263256073,
-0.488897442817688,
-0.6234862804412842,
-1.3604239225387573,
-0.26863589882850647,
0.969307541847229,
0.42522358894348145,
0.4155512750148773,
-0.0401601605117321,
... |
def test _ helpful _ error _ message _ for _ many2many _ not _ iterable ( self ) : test _ string = ('{ " pk " : 1, " model " : " serializers. m2mdata ", " fields " : { " data " : null } }') expected = " ( serializers. m2mdata : pk = 1 ) field _ value was'none'" with self. assertraisesmessage ( deserializationerror, exp... | [
-0.3418888449668884,
0.02663438394665718,
0.49757981300354004,
-0.6101477146148682,
-0.4778568744659424,
-0.4920317828655243,
-0.5756000280380249,
-0.1962808519601822,
-0.7553128600120544,
-0.09574735909700394,
-0.11821150779724121,
-0.1743912398815155,
-0.24651414155960083,
0.578259229660... |
def driving _ in _ violation _ cycle ( self ) : return self. _ driving _ in _ violation _ cycle | [
-0.19481725990772247,
-0.3450773060321808,
0.5078093409538269,
0.5156590342521667,
0.7611395120620728,
0.47647982835769653,
1.0596930980682373,
0.05583171173930168,
-0.20651008188724518,
0.3962850868701935,
0.7050346732139587,
0.13273249566555023,
-1.6352112293243408,
0.3373339772224426,
... |
def change _ permissions ( ) : s ='chmod - r a + w / usr / local / % s / data _ dir / www'% geoserver run ( s, verbose = true ) makedir ( webdir ) s ='chown - r www - data : www - data % s'% webdir run ( s, verbose = true ) s ='chmod - r a + w % s'% webdir run ( s, verbose = true ) | [
0.19166067242622375,
0.6051830649375916,
0.6752966642379761,
-0.05965666100382805,
0.0017237706342712045,
0.7052669525146484,
0.8328579664230347,
0.48644542694091797,
-0.07285014539957047,
-0.6559551954269409,
0.16923131048679352,
1.6502388715744019,
0.30681881308555603,
1.3197225332260132... |
def filtro _ temporal ( self, df, inicio, final ) : fecha _ inicial = datetime. strptime ( inicio, " % y - % m - % d " ) fecha _ final = datetime. strptime ( final, " % y - % m - % d " ) criterio = df. index. map ( lambda x : ( x > fecha _ inicial ) and ( x < fecha _ final ) ) return df [ criterio ] | [
-0.2723008990287781,
-0.4533542990684509,
0.7490681409835815,
0.3795550763607025,
-0.3167136609554291,
-0.43087416887283325,
-0.8610910773277283,
0.3169330358505249,
-1.551284670829773,
0.3023602068424225,
0.8456004858016968,
1.3116270303726196,
0.5114336013793945,
-1.4143688678741455,
0... |
def sgf _ properties ( self, * * xargs ) - > dict : return copy. deepcopy ( self. properties ) | [
-0.5034472942352295,
-0.5300912857055664,
0.33167994022369385,
0.43697217106819153,
-0.6433046460151672,
0.05990368872880936,
-0.09092334657907486,
-0.08156828582286835,
-0.5631457567214966,
-0.1794298142194748,
-0.9793205261230469,
0.09617657214403152,
-0.5847058892250061,
-1.282616972923... |
def get _ block _ votes ( self, id, order _ by = false ) : if order _ by : return self. bigchain. connection. run ( r. table ('votes ', read _ mode = self. read _ mode ). filter ( r. row ['vote'] ['voting _ for _ block'] = = id ). order _ by ( index = r. asc ( " vote _ timestamp " ) ) ) else : return self. bigchain. co... | [
-0.1796557754278183,
0.6176915168762207,
0.743281900882721,
0.6488227844238281,
0.3205271065235138,
-0.8580681085586548,
-1.2284955978393555,
-0.6730641722679138,
-0.3003999888896942,
0.8868073225021362,
0.025700420141220093,
0.35788556933403015,
-0.3303285539150238,
0.3136002719402313,
... |
def test _ writes _ response ( self ) : req _ id, mock _ rsp = self. register _ request ( 5 ) sleep ( 1 ) requestresponsebroker. write _ response ( req _ id, status = 123, body ='body ', headers = {'header _ name':'header _ value'} ) mock _ rsp. set _ body. assert _ called _ once _ with ('body') mock _ rsp. set _ statu... | [
-0.7307006120681763,
-0.12893441319465637,
0.4838862419128418,
0.4801417589187622,
1.1057833433151245,
-0.2797570526599884,
0.6691291332244873,
0.051981694996356964,
0.9117687940597534,
-0.8158722519874573,
-0.9827969074249268,
-0.6616607308387756,
-0.4280552566051483,
-0.06040926650166511... |
def get _ suggestion _ boxes ( self ) : items = filter ( lambda x : x. attribute = = self. suggestion _ box _ attr, self. boxes ) return list ( items ) | [
-0.977924644947052,
-0.6125060319900513,
0.43660515546798706,
0.7012977004051208,
-0.059323083609342575,
-0.013348488137125969,
-0.39396852254867554,
-0.7890514135360718,
-0.3654835522174835,
0.3569556176662445,
-0.3238062262535095,
0.6686643362045288,
0.14462025463581085,
0.37555283308029... |
def _ _ repr _ _ ( self ) - > str : return f'chatmsg ( { self. _ _ dict _ _ } ) ' | [
-0.7126846313476562,
-1.1199504137039185,
0.5030165314674377,
-1.4545377492904663,
-0.8726308345794678,
0.6171998381614685,
-0.265129029750824,
-0.11234775930643082,
-0.5742201209068298,
0.007477052044123411,
0.21833021938800812,
0.7234982252120972,
0.666943371295929,
0.7907019853591919,
... |
def aam ( self ) : return self. _ model | [
0.10662350058555603,
-0.9634087681770325,
0.10354077816009521,
-0.2198343276977539,
0.40908217430114746,
0.9712002873420715,
0.5579016208648682,
-0.9198731780052185,
1.3733776807785034,
-0.06165188178420067,
1.278610348701477,
0.36970460414886475,
0.4592539370059967,
-0.31004250049591064,
... |
def _ _ init _ _ ( self, s, idf, conf, avglen ) : self. w = dict ( ) for w, c in counter ( s ). items ( ) : if w = ='' : continue if conf ['freq _ mode'] = ='tf': x = c elif conf ['freq _ mode'] = ='bm25': x = ( c * ( conf ['k1'] + 1 ) ) / ( c + conf ['k1'] * ( 1 - conf ['b'] + conf ['b'] * len ( s ) / avglen ) ) if id... | [
0.5521239638328552,
0.3902488648891449,
0.4241720139980316,
0.4059246778488159,
-0.15349391102790833,
-0.776292622089386,
0.8585938215255737,
0.2714456021785736,
-0.4012630879878998,
0.43370532989501953,
-0.22358141839504242,
-0.056785859167575836,
-0.22535933554172516,
0.5986835360527039,... |
def parint2ppna ( self, par _ int _ serie, eur ) : setattr ( self, " ppna _ % s _ % s " % ( par _ int _ serie, " 05 " ), getattr ( self, par _ int _ serie ) * eur ) return none | [
-0.483750581741333,
-0.47922849655151367,
0.5192098617553711,
-0.9704012870788574,
-0.17080001533031464,
-0.02578493021428585,
-0.33544865250587463,
-0.9054706692695618,
0.6016680598258972,
0.2710505425930023,
-0.42394453287124634,
0.3126973509788513,
-0.020929155871272087,
-0.475201129913... |
def show _ score ( self ) : i = 0 print ( " game word status bad guess missed letters score \ n " ) print ( " - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ n " ) finalscore = 0. 0 while i < len ( self. game _ list ) : finalscore = finalscore + self. game _ list [ i ]. final _ sco... | [
0.3425770103931427,
-0.33951568603515625,
0.7511540055274963,
-0.09449722617864609,
0.16090607643127441,
0.5171546339988708,
0.23786556720733643,
0.16333213448524475,
-0.5053325891494751,
1.2916418313980103,
-0.01957808993756771,
0.7895313501358032,
-0.68378746509552,
1.0391786098480225,
... |
def ipv6 _ address _ count ( self ) - > optional [ pulumi. input [ int ] ] : return pulumi. get ( self, " ipv6 _ address _ count " ) | [
0.23423156142234802,
0.18081270158290863,
0.29049137234687805,
0.14726100862026215,
0.5312120914459229,
0.4593068063259125,
0.8050790429115295,
0.4143966734409332,
1.1517778635025024,
0.19077344238758087,
-0.7851538062095642,
0.39559662342071533,
-0.000956210249569267,
-2.0974042415618896,... |
async def test _ get _ events _ entities _ filtered _ away ( recorder _ mock : recorder, hass : homeassistant, hass _ ws _ client : websocketgenerator ) - > none : now = dt _ util. utcnow ( ) await asyncio. gather ( * [ async _ setup _ component ( hass, comp, { } ) for comp in ( " homeassistant ", " logbook " ) ] ) awa... | [
-0.04329342767596245,
0.09666834771633148,
0.8764932155609131,
0.11930298060178757,
0.14304377138614655,
0.23860684037208557,
-0.3031395971775055,
-0.012284139171242714,
-0.1677655726671219,
-0.17405101656913757,
-0.24397112429141998,
1.228341817855835,
0.22527502477169037,
0.4742800891399... |
def player _ profile ( self, profile _ path = none, player _ name = none, profile _ id = none ) : if profile _ path : url = " http : / / www. nfl. com / player / { } / profile ". format ( profile _ path ) elif player _ name and profile _ id : url = " http : / / www. nfl. com / player / { } / { } / profile ". format ( p... | [
-0.19723564386367798,
-0.14395485818386078,
0.632250964641571,
0.5458031892776489,
0.7521825432777405,
-0.7115575671195984,
-1.1651489734649658,
-0.7970095872879028,
0.20444728434085846,
0.609929084777832,
-0.03434319794178009,
0.3213999271392822,
-0.9825398921966553,
-0.6152599453926086,
... |
def dist _ closest _ robot ( self, node _ id : int, priority : int ) - > float : distances = [ ] for connection in filter ( lambda conn : conn. priority > priority, self. graph [ node _ id ]. outgoing _ connections ) : num _ incoming _ connections = 0 for conn in self. graph [ connection. node _ id ]. incoming _ connec... | [
0.27004075050354004,
-0.3782733082771301,
0.9268476366996765,
-0.9214858412742615,
-0.16507473587989807,
-0.20371410250663757,
-0.8065590262413025,
-0.0772363618016243,
0.10463179647922516,
0.20606108009815216,
0.5506485104560852,
0.4248182475566864,
-0.6953242421150208,
1.2548496723175049... |
def bst ( self ) - > tuple [ np. ndarray, np. ndarray, np. ndarray, np. ndarray ] : queue = [ ( self. root, np. zeros ( self. depth + 1 ), 0 ) ] visited = [ ] labels _ visited = [ ] values _ clones = [ ] labels _ clones = [ ] while len ( queue ) > 0 : current _ node, current _ label, current _ depth = queue. pop ( 0 ) ... | [
-0.819612979888916,
0.5745700597763062,
1.0335854291915894,
0.1580771505832672,
-0.2936968505382538,
0.09407594054937363,
0.8089077472686768,
-1.187752604484558,
-0.3047863245010376,
0.7787237763404846,
0.19782237708568573,
0.8407639265060425,
-0.2077934741973877,
0.5653126835823059,
-0.... |
def validate _ driver _ configuration ( self, driver _ config ) : if not'oms _ uri'in driver _ config : log. error ( "'oms _ uri'not present in driver _ config = % s ", driver _ config ) raise platformdriverexception ( msg = " driver _ config does not indicate'oms _ uri'" ) | [
0.0814439207315445,
0.17250850796699524,
0.3396589159965515,
0.449659526348114,
-0.482816606760025,
0.5461908578872681,
0.15188023447990417,
1.318892240524292,
0.09506845474243164,
0.6425411105155945,
0.6947826147079468,
-0.6305018663406372,
-0.5686672329902649,
1.0125799179077148,
0.451... |
def main ( ) : " " " start gus bot! " " " log _ config = {'format':'[ % ( asctime ) s ] % ( message ) s ','datefmt':'% m / % d / % y % h : % m : % s ','level': logging. debug if settings. debug else logging. info,'stream': sys. stdout, } logging. basicconfig ( * * log _ config ) logging. getlogger ('requests. packages.... | [
0.26036718487739563,
-0.3238057792186737,
0.9768359065055847,
0.3555566072463989,
0.9529828429222107,
0.5541523098945618,
-0.041905470192432404,
0.3782217800617218,
-1.0748896598815918,
-0.5308481454849243,
-0.5909251570701599,
1.0888384580612183,
-0.17835897207260132,
-0.20131099224090576... |
def xavier _ init ( fan _ in, fan _ out, constant = 1 ) : # https : / / stackoverflow. com / questions / 33640581 / how - to - do - xavier - initialization - on - tensorflow low = - constant * np. sqrt ( 6. 0 / ( fan _ in + fan _ out ) ) high = constant * np. sqrt ( 6. 0 / ( fan _ in + fan _ out ) ) return tf. random _... | [
0.7495396733283997,
0.08878739178180695,
0.4526563882827759,
-0.32111847400665283,
0.03904742747545242,
0.41957584023475647,
-0.024469459429383278,
0.43612781167030334,
-0.5639855861663818,
-0.5463219285011292,
-1.1472536325454712,
0.48697495460510254,
0.03974427282810211,
-1.3054304122924... |
def test _ create _ ebom ( self ) : mbom = operations. operation ( constants. koperationnew, items. item, operations. system _ args ( cdb _ create _ mbom = " 1 ", question _ copy _ stl _ relship _ 1st _ level = message _ box. messageboxmixin. messagebox. kmsgboxresultyes, item _ object _ id = self. ebom. cdb _ object _... | [
0.09500154107809067,
0.03585066273808479,
0.7367265820503235,
0.21141774952411652,
0.6557660102844238,
0.8468298316001892,
0.658759355545044,
-0.254498153924942,
0.5498312711715698,
-0.07030907273292542,
-0.8739829659461975,
-0.6866492033004761,
-0.22416527569293976,
0.09034879505634308,
... |
async def detect _ custom _ emojis ( client, message ) : emojis = parse _ custom _ emojis ( message. content ) if emojis : content _ lines = [ ] for x, emoji in zip ( range ( 1, 21 ), emojis ) : content _ lines. append ( f'{ x }. : { emoji }') truncated = len ( emojis ) - 20 if truncated > 0 : content _ lines. append (... | [
0.6199526190757751,
0.2605273127555847,
0.5917196273803711,
-0.7768757343292236,
-0.19365909695625305,
-1.1944632530212402,
0.2446923702955246,
-0.41592392325401306,
-0.19473591446876526,
0.28699707984924316,
-0.9206423759460449,
1.130118489265442,
-0.4623337686061859,
0.4594985544681549,
... |
def get _ panoramic _ raster ( dnight, set, band, raster, k = 25 ) : filter = {'v': " ",'b': " / b " } path = {'gal': " / gal / galtopmags ",'zod': " / zod / zodtopmags ",'median': filter [ band ] + " / median / skybrightmags " } import arcpy file = filepath. griddata + dnight + " / s _ 0 " + str ( set ) + path [ raste... | [
-0.26514750719070435,
0.091862253844738,
0.5936213731765747,
-0.029224660247564316,
-0.5662292838096619,
-0.16507861018180847,
-0.7811524868011475,
-0.27207839488983154,
0.27156153321266174,
0.6828094124794006,
0.615755021572113,
0.5175158381462097,
0.10115083307027817,
-0.3687051832675934... |
def pop ( self ) : if self. top! = none : item = self. top. data self. top = self. top. next return item else : return none | [
-0.24106614291667938,
0.20617859065532684,
0.6279968619346619,
0.05330105125904083,
-0.8714080452919006,
0.0031604634132236242,
-0.4800233840942383,
-0.5625982284545898,
0.1463879495859146,
0.2695448696613312,
0.1571953147649765,
-0.09208154678344727,
-1.0772502422332764,
-0.63919365406036... |
def _ _ getdatafromhtmlcontent ( shtmlcontent ) : import json oparser = cparser ( ) shtmlcontent = oparser. abparse ( shtmlcontent,'window. _ _ nuxt _ _ = ','; < / script > ', 16 ) datas = json. loads ( shtmlcontent ) datas = datas [ " data " ] [ 0 ] return datas | [
0.1549641489982605,
-0.41445788741111755,
0.7400522828102112,
-0.4345555007457733,
-0.9317137002944946,
-0.02017325907945633,
0.04080964997410774,
-0.4189226031303406,
0.20409390330314636,
0.006574535276740789,
-0.9829278588294983,
0.13256344199180603,
-0.2797257602214813,
0.30264559388160... |
def multi _ winnow2 ( dataset, nb _ features ) : train _ total = 0 test _ total = 0 # split up dataset attributes = dataset. iloc [ :, : nb _ features ] classes = dataset. iloc [ :, nb _ features : ] # encode both attributes and classes attributes _ encoded = pd. get _ dummies ( attributes, columns = attributes. column... | [
-0.3642864227294922,
-0.5655070543289185,
0.8057463765144348,
0.306275337934494,
-0.08085955679416656,
-0.140269473195076,
0.4104837477207184,
0.3283204734325409,
-0.29720017313957214,
0.3086661994457245,
-0.38110730051994324,
0.20389293134212494,
0.2530067563056946,
0.8889509439468384,
... |
def transform _ list ( string _ list = " " ) : chars _ to _ remove = [ " - " ] string _ list = " ". join ( i for i in string _ list if i not in chars _ to _ remove ). strip ( ) return " < li > { } < / li > \ n ". format ( string _ list ) | [
0.11503490805625916,
-0.23887664079666138,
0.6557328104972839,
-0.36350804567337036,
-0.1182398870587349,
-0.15749473869800568,
-0.7777621150016785,
1.9711710214614868,
0.4552901089191437,
0.02965218760073185,
-1.267712950706482,
0.19937123358249664,
0.2810652554035187,
0.4892871379852295,... |
def largest _ non _ adj ( nums ) : max _ num = np. max ( nums ) max _ index = np. argmax ( nums ) nums. pop ( max _ index ) # num try : nums. pop ( max _ index - 1 ) # num behind nums. pop ( max _ index - 1 ) # num in front ( no where num behind was ) except exception : # # incase num is at end not to choke none ans = ... | [
-0.0238418597728014,
-0.20424078404903412,
0.6883108019828796,
-0.15976238250732422,
-0.03810648247599602,
0.7921953201293945,
0.5930992364883423,
-0.07493413984775543,
0.832188606262207,
0.2753441631793976,
0.41264617443084717,
0.7849177122116089,
-0.7266642451286316,
0.2824915945529938,
... |
def _ is _ cpo _ int _ interval ( val ) : return isinstance ( val, tuple ) and ( len ( val ) = = 2 ) and _ is _ cpo _ int ( val [ 0 ] ) and _ is _ cpo _ int ( val [ 1 ] ) and ( val [ 1 ] > = val [ 0 ] ) | [
-0.4825044870376587,
0.11823879182338715,
0.4695171117782593,
0.9174550175666809,
-0.8464457988739014,
1.0715761184692383,
0.3869142234325409,
-1.1881734132766724,
-0.6150524616241455,
0.8517934083938599,
-0.43481093645095825,
-0.4012937545776367,
-1.5865206718444824,
0.06528019160032272,
... |
def missing _ data _ percent ( data ) : result = data. isna ( ). sum ( ) / data. shape [ 0 ] return result | [
0.18295878171920776,
0.16637876629829407,
0.3388468325138092,
-0.24712462723255157,
0.2525259256362915,
0.8654648661613464,
0.37046822905540466,
0.1835227757692337,
0.48875918984413147,
0.2613341808319092,
-0.19798342883586884,
-0.0640258714556694,
0.26922839879989624,
0.48448920249938965,... |
def test _ polarized _ source _ visibilities ( time _ location ) : time0, array _ location = time _ location ha _ off = 1 / 6. 0 ha _ delta = 0. 1 time _ offsets = np. arange ( - ha _ off, ha _ off + ha _ delta, ha _ delta ) zero _ indx = np. argmin ( np. abs ( time _ offsets ) ) # make sure we get a true zenith time t... | [
-0.3398270010948181,
-0.1334768682718277,
0.7515416741371155,
-1.1222641468048096,
0.4162867069244385,
0.5723406076431274,
0.7858459949493408,
0.2843566834926605,
0.7987699508666992,
0.4976271688938141,
-0.09623008966445923,
-0.22562739253044128,
0.3809005320072174,
0.3641614019870758,
0... |
def diag ( diag _ ele ) : return np. diag ( diag _ ele ) | [
-0.5205419063568115,
0.39402496814727783,
0.1489860862493515,
0.8428497314453125,
-0.03927690163254738,
0.734402596950531,
0.7992106676101685,
0.647922694683075,
0.5830274224281311,
-0.1314009428024292,
0.7751008868217468,
-0.27835583686828613,
0.5456615686416626,
0.010001682676374912,
1... |
def cleanup ( image _ list ) : if ( not image _ list ) : return 0 print ( " \ nsunt sterse imaginile descarcate. " ) for image in image _ list : if os. path. exists ( image ) : os. remove ( image ) else : print ( " \ nnu exista imaginea de la adresa : " + image ) | [
-0.4679190218448639,
0.23411007225513458,
0.4991568922996521,
0.33537083864212036,
0.7128968238830566,
-0.09996850788593292,
0.03578322008252144,
0.572705090045929,
0.1735721230506897,
0.7577059268951416,
-0.08957275003194809,
-0.3688999116420746,
-0.3954702317714691,
1.1973820924758911,
... |
def _ truncate _ seq _ pair ( self, tokens _ a, tokens _ b, max _ num _ tokens, rng ) : while true : total _ length = len ( tokens _ a ) + len ( tokens _ b ) if total _ length < = max _ num _ tokens : break trunc _ tokens = tokens _ a if len ( tokens _ a ) > len ( tokens _ b ) else tokens _ b assert len ( trunc _ token... | [
-0.003909111022949219,
0.009847654029726982,
0.5288152694702148,
-1.0311591625213623,
-0.17216981947422028,
-0.44844260811805725,
-0.43745774030685425,
0.6552675366401672,
0.19369041919708252,
0.6540823578834534,
0.4418340027332306,
0.5533666610717773,
-0.19643142819404602,
-0.507033944129... |
def quiz2 ( ) : return render _ template ('quiz2. html') | [
0.2084691822528839,
-0.5652667284011841,
0.3009263277053833,
0.7796192169189453,
-1.0446646213531494,
0.20555536448955536,
0.37162813544273376,
0.08315500617027283,
-0.509010374546051,
-0.257138729095459,
-0.04489470273256302,
0.004060966894030571,
-0.2856825292110443,
-0.3664180040359497,... |
def calc _ infiltration _ ss _ transport _ iso _ kernel ( state ) : vs = state. variables # isotope ratio of infiltration vs. c _ inf _ pf _ ss = update ( vs. c _ inf _ pf _ ss, at [ 2 : - 2, 2 : - 2 ], npx. where ( vs. inf _ pf _ ss [ 2 : - 2, 2 : - 2 ] > 0, vs. c _ in [ 2 : - 2, 2 : - 2 ], 0 ) * vs. maskcatch [ 2 : -... | [
-0.5099340081214905,
-0.6345468759536743,
0.7642685770988464,
0.21642564237117767,
-0.7415486574172974,
-0.05118550360202789,
0.7329064607620239,
0.14590753614902496,
-0.29678747057914734,
0.8593817353248596,
-0.6328359842300415,
-0.46529653668403625,
1.0983846187591553,
-0.039683457463979... |
def _ arguments _ types ( cls ) : return {'name': co. basicoption ( str, none ),'grid _ name': co. basicoption ( str ),'cont _ name': co. basicoption ( str ),'what': co. basicoption ( str ), } | [
-0.36056700348854065,
-0.31329941749572754,
0.36784547567367554,
-1.2980831861495972,
0.71542888879776,
-0.4367658197879791,
-0.8326408267021179,
-0.9546557068824768,
-1.0797955989837646,
1.0711817741394043,
-0.6249232888221741,
-0.11289086192846298,
-0.1469758003950119,
0.3671874105930328... |
def get _ stadium _ coordinates ( stadium _ name ) : wikipedia _ url = " https : / / en. wikipedia. org / wiki / " stadium _ name = stadium _ name. replace ( " ", " _ " ) r = requests. get ( wikipedia _ url + stadium _ name ) stadium _ soup = beautifulsoup ( r. content, " lxml " ) location _ html = stadium _ soup. sele... | [
-1.0402896404266357,
-0.9813986420631409,
0.6573421359062195,
-0.6075729131698608,
-0.4302699565887451,
-0.6051285266876221,
-0.014366674236953259,
0.5628915429115295,
-0.01610604301095009,
0.7262026071548462,
-0.6725108027458191,
-0.6848194599151611,
-0.06716015934944153,
0.04407147318124... |
def stats _ for ( self, dt ) : # todo - this would be nicer if we formatted the stats if not isinstance ( dt, datetime ) : raise typeerror ( " stats _ for requires a datetime object! " ) return self. _ client. get ( " { } / stats / { } ". format ( instance. api _ endpoint, parse. quote ( dt. strftime ( " % y / % m " ) ... | [
-0.8972027897834778,
0.5113463997840881,
0.4305393099784851,
-0.7464827299118042,
0.2502376139163971,
-0.19616426527500153,
-1.0768609046936035,
-1.8113442659378052,
-0.29922008514404297,
-0.39434993267059326,
-0.08234190195798874,
0.110643669962883,
0.7429646253585815,
0.2119433730840683,... |
def install ( self, ssh _ client : paramiko. client. sshclient, cluster _ info : clusterinfo ) : # todo : allow users to specify the spark " distribution ". distribution ='hadoop1'print ( " [ { h } ] installing spark... ". format ( h = ssh _ client. get _ transport ( ). getpeername ( ) [ 0 ] ) ) try : # todo : figure o... | [
0.4439876079559326,
-0.42648598551750183,
0.48188918828964233,
0.09102391451597214,
0.543945848941803,
0.30080968141555786,
-0.054228514432907104,
0.8198246955871582,
-0.8660736083984375,
-0.21950863301753998,
-0.08463844656944275,
0.0608113668859005,
0.21262657642364502,
0.782304525375366... |
def _ _ init _ _ ( self ) : self. a = [ ] self. b = [ ] | [
-0.16244164109230042,
-0.5137185454368591,
0.3840574324131012,
-0.28928428888320923,
0.8143972158432007,
0.07215844839811325,
0.13233555853366852,
0.6632700562477112,
-0.097366563975811,
-0.1693749874830246,
-0.6443987488746643,
0.4506113529205322,
0.0057637691497802734,
1.0449720621109009... |
def _ _ init _ _ ( _ _ self _ _, resource _ name : str, args : targetargs, opts : optional [ pulumi. resourceoptions ] = none ) :... | [
-0.006310777273029089,
0.039215490221977234,
0.5818138122558594,
-0.5255997180938721,
0.6092199683189392,
-0.11462219804525375,
-0.49366673827171326,
0.49932408332824707,
0.4292925298213959,
0.20368711650371552,
0.46528100967407227,
0.9518721699714661,
0.5666051506996155,
-1.45863330364227... |
def fitted ( self ) : return self. intent _ classifier is not none \ and self. intent _ classifier. fitted \ and all ( slot _ filler is not none and slot _ filler. fitted for slot _ filler in itervalues ( self. slot _ fillers ) ) | [
0.5655640959739685,
-0.8765960931777954,
0.32739728689193726,
-0.15581515431404114,
0.385750412940979,
0.507658839225769,
0.1139165610074997,
0.37853410840034485,
0.1401064693927765,
-0.8364244103431702,
0.016025645658373833,
1.0574105978012085,
-0.5666792392730713,
1.5911790132522583,
-... |
def renderer ( render ) : return query. maps ( doc. renderer ( render ) ) | [
-0.10316773504018784,
-0.5474844574928284,
0.4927356243133545,
0.249837726354599,
-0.9238222241401672,
-0.816501259803772,
-1.3564231395721436,
0.38306745886802673,
-0.016904443502426147,
-0.9509943723678589,
0.6363198161125183,
-1.1554538011550903,
-0.6715445518493652,
0.547683596611023,
... |
def visititems ( self, func, _ root = none ) : _ root = self. _ handle if _ root is none else _ root for name, obj in self. items ( ) : # the name needs to be relative to the root object visititems was called on name = _ root. relative _ path ( obj. _ handle ) func _ ret = func ( name, obj ) if func _ ret is not none :... | [
-0.8062015771865845,
0.24527128040790558,
0.8312584757804871,
0.49931201338768005,
-0.42471230030059814,
-0.5653588175773621,
1.2617522478103638,
-0.866163969039917,
-0.6123257279396057,
-0.7576377391815186,
0.30024707317352295,
0.6369333863258362,
0.15845981240272522,
0.0992162898182869,
... |
def calculate _ teams _ points ( ) : if points = = { } : create _ team _ list ( rounds [ " 1 " ], points ) if plays = = { } : create _ team _ list ( rounds [ " 1 " ], plays ) for match _ round in rounds : for match in rounds [ match _ round ] : plays [ match [ " host " ] ] [ i _ total ] + = 1 plays [ match [ " host " ]... | [
-0.03453937917947769,
0.15934781730175018,
0.8686428666114807,
-0.532778799533844,
0.08829890936613083,
0.04474471136927605,
0.6947597861289978,
0.14480836689472198,
-0.013711171224713326,
1.129113793373108,
-0.3669331967830658,
-0.5048276782035828,
0.39266437292099,
-0.7212501168251038,
... |
def text _ analyzer ( text = none ) : if text is none : text = input ( " what is the text to analyse? " ) nb _ char = sum ( 1 for c in text if c. isalpha ( ) ) nb _ upper = sum ( 1 for c in text if c. isupper ( ) ) nb _ lower = sum ( 1 for c in text if c. islower ( ) ) nb _ punc = sum ( 1 for c in text if c = = "! " ) ... | [
0.2728515863418579,
0.2781921625137329,
0.7756137251853943,
0.11491502076387405,
-0.24821901321411133,
-0.18936605751514435,
0.3371952772140503,
0.2140234261751175,
0.0336146280169487,
-0.6940759420394897,
-0.6325228810310364,
0.44993314146995544,
-0.7564529776573181,
1.1718720197677612,
... |
def find _ first _ adjacent _ target ( self, map _, targets ) : adjacent = map _. find _ adjacent _ squares ( self. y, self. x ) in _ range = [ t for t in targets if ( t. y, t. x ) in adjacent ] if not in _ range : return none min _ hp = min ( [ t. hp for t in in _ range ] ) return sorted ( [ t for t in in _ range if t... | [
-0.17222408950328827,
-1.177677869796753,
0.7365469336509705,
0.23037594556808472,
-0.4086581766605377,
0.18437330424785614,
-0.3055231273174286,
-1.0363613367080688,
-0.7807185053825378,
-0.12516257166862488,
0.7935711145401001,
0.2452416568994522,
-0.6870278120040894,
0.3142276108264923,... |
def move _ to ( self, x, y ) : self. x = x self. y = y | [
-1.3595050573349,
-0.7838642597198486,
0.4513392448425293,
-1.1224113702774048,
0.4110557734966278,
-0.12486252188682556,
-0.9118114709854126,
-0.8357934951782227,
-0.7611548900604248,
0.5395921468734741,
-0.918001115322113,
1.2603665590286255,
0.6822389364242554,
-1.568963646888733,
-0.... |
def compute _ observed _ model ( self, ) : a, h, e = self. parameters ['a'], self. parameters ['h'], self. parameters ['e'] airglow _ nl = self. compute _ airglow _ brightness ( a, h ) # [ nl ] airglow _ mag = nl _ to _ mag ( airglow _ nl ) # [ mag ] extinction _ total = e * self. extinction * self. airmass # [ mag ] a... | [
0.0781395435333252,
-0.5432009696960449,
0.6276715397834778,
-0.5711223483085632,
0.13011658191680908,
1.1049902439117432,
-0.4311704933643341,
0.16807259619235992,
-0.33127066493034363,
0.13779215514659882,
0.1259767860174179,
0.5757929682731628,
0.3657229244709015,
0.8540723323822021,
... |
def version ( self ) - > optional [ pulumi. input [ str ] ] : return pulumi. get ( self, " version " ) | [
0.7144004702568054,
-0.26099422574043274,
0.3730250895023346,
0.6198242902755737,
1.2062549591064453,
1.6926711797714233,
0.5647932291030884,
0.11546039581298828,
0.6611335873603821,
0.4473687410354614,
-0.17868302762508392,
0.5587174892425537,
-0.06349585205316544,
-1.1284496784210205,
... |
def test _ import _ v1 _ rollback ( self, mock _ import _ dataset ) : num _ databases = db. session. query ( database ). count ( ) # raise an exception when importing the dataset, after the database has # already been imported mock _ import _ dataset. side _ effect = exception ( " a wild exception appears! " ) contents... | [
0.787960946559906,
1.3518568277359009,
0.5600637197494507,
-0.010356931947171688,
0.9008835554122925,
0.7892001867294312,
1.0480084419250488,
0.55438232421875,
0.6088590025901794,
0.4919671416282654,
-0.6219849586486816,
0.6673113107681274,
-0.8367805480957031,
-0.5649374127388,
0.334023... |
def mpr _ wnetgetnetworkinformation ( jitter, get _ str, set _ str ) : ret _ ad, args = jitter. func _ args _ stdcall ( [ " lpprovider ", " lpnetinfostruct " ] ) raise runtimeerror ('api not implemented') jitter. func _ ret _ stdcall ( ret _ ad, ret _ value ) | [
-0.6883699297904968,
-0.02229076810181141,
0.3174193203449249,
-0.9212175011634827,
-0.4813874065876007,
0.307769238948822,
-0.34029605984687805,
-0.9651398062705994,
0.3883812129497528,
-0.4745294153690338,
-0.18711645901203156,
-0.48660650849342346,
-0.6121559143066406,
0.372357040643692... |
def set _ location ( self, latitude, longitude, altitude ) : data = { " location " : { " latitude " : float ( latitude ), " longitude " : float ( longitude ), " altitude " : float ( altitude ) } } self. execute ( command. set _ location, data ) return self | [
-0.38829249143600464,
-0.47832953929901123,
0.3680015802383423,
0.31273651123046875,
0.46691566705703735,
0.8195784091949463,
-0.5342837572097778,
0.5160564184188843,
-0.9862527847290039,
0.12114861607551575,
0.12429353594779968,
0.5764856338500977,
-0.016711756587028503,
-0.15635830163955... |
def daemonconn ( func ) : def wrapper ( args ) : context = zmq. context ( ) socket = context. socket ( zmq. pub ) socket. connect ('ipc : / / % s'% args. ipc ) return func ( socket, args ) return wrapper | [
-0.3719981610774994,
-0.6402982473373413,
0.508726954460144,
-0.9020274877548218,
-0.2964003384113312,
-0.6581208109855652,
-0.01539613213390112,
-0.10488665848970413,
0.08783215284347534,
-0.6007905006408691,
0.7069985866546631,
0.7650988698005676,
-0.4095427691936493,
-0.5459431409835815... |
def password _ reset _ confirm ( * args, * * kwargs ) : kwargs ['set _ password _ form'] = setpasswordformaccounts return password _ reset _ confirm _ base ( * args, * * kwargs ) | [
0.27026060223579407,
-0.04343561828136444,
0.3847905099391937,
0.3835265040397644,
0.5036270022392273,
-1.0737217664718628,
0.03761743754148483,
-0.01891934871673584,
-0.8325303196907043,
1.3215091228485107,
-0.16376733779907227,
1.0458184480667114,
-0.2888699471950531,
0.02491933479905128... |
def freeze _ params ( model : nn. module ) - > none : for par in model. parameters ( ) : par. requires _ grad = false | [
-0.580202579498291,
-0.47690653800964355,
0.38090959191322327,
-0.37711474299430847,
0.18698987364768982,
1.4798928499221802,
0.2769771218299866,
-0.3947526812553406,
-1.3571693897247314,
1.4537761211395264,
-0.7212271094322205,
0.28905555605888367,
-0.6481618285179138,
1.615954875946045,
... |
def dcgan _ arg _ scope ( weight _ decay = 0. 00004, use _ batch _ norm = true, batch _ norm _ decay = 0. 9997, batch _ norm _ epsilon = 0. 001 ) : batch _ norm _ params = { # decay for the moving averages.'decay': batch _ norm _ decay, # epsilon to prevent 0s in variance.'epsilon': batch _ norm _ epsilon, # collection... | [
0.016147252172231674,
-0.34166285395622253,
0.8399341106414795,
0.11790347099304199,
-0.2721554636955261,
-0.5214083790779114,
0.2953011989593506,
0.5186492800712585,
-0.0034897865261882544,
0.26803651452064514,
0.6126216650009155,
0.23802298307418823,
0.5344436764717102,
0.803647100925445... |
def extract _ vector _ coords ( self, x1, y1, x2, y2, h, w ) : length = int ( np. hypot ( x2 - x1, y2 - y1 ) ) x = np. linspace ( x1, x2, length ) x = np. rint ( x ). astype ( int ) y = np. linspace ( y1, y2, length ) y = np. rint ( y ). astype ( int ) pix _ coords = y, x return pix _ coords | [
-0.22481846809387207,
-0.6435443162918091,
0.6614946722984314,
-0.37793657183647156,
-0.21729117631912231,
-0.4900597631931305,
-0.14468923211097717,
-0.41732755303382874,
0.08381238579750061,
0.02726280689239502,
-0.3637337386608124,
0.2612515091896057,
0.34740957617759705,
0.344834268093... |
def convert _ query ( query ) : converted _ query = [ ] for element in query : if element = = 1 : converted _ query. append ( " yes " ) else : converted _ query. append ( " no " ) return converted _ query | [
-1.3498690128326416,
-0.29357779026031494,
0.6434646248817444,
0.47135475277900696,
-0.19791752099990845,
0.4528654217720032,
-1.143377423286438,
0.7384162545204163,
0.7878113985061646,
1.0231997966766357,
-0.4131389260292053,
0.18455764651298523,
0.04984408989548683,
1.1484183073043823,
... |
def on _ exit _ record ( self ) : logger. info ( " recording finished ", extra = dict ( event ='record _ end') ) self. stop _ recording ( ) | [
0.24282173812389374,
-0.3424689471721649,
0.3407760262489319,
-0.16934150457382202,
0.5442993640899658,
0.04517247527837753,
-0.283200740814209,
0.906485378742218,
-1.067617416381836,
1.131798505783081,
-0.8600484132766724,
0.16539622843265533,
0.10883446782827377,
0.7904062867164612,
1.... |
def update _ cupcake ( id ) : cupcake = cupcake. query. get _ or _ 404 ( id ) db. session. query ( cupcake ). filter _ by ( id = id ). update ( request. json ) db. session. commit ( ) return jsonify ( cupcake = cupcake. serialize ( ) ) | [
-2.0429415702819824,
-0.38681450486183167,
0.4775543212890625,
-0.245330810546875,
-0.8418511748313904,
0.04435703158378601,
-0.45454704761505127,
0.20669473707675934,
-0.3393422067165375,
0.9059441089630127,
-0.6572239995002747,
-0.7738362550735474,
-0.48863348364830017,
-0.85271257162094... |
def save _ done _ status ( cnab _ import _ id, len _ import _ data ) : cnab _ import = cnabimport. objects. filter ( id = cnab _ import _ id ). first ( ) if cnab _ import : cnab _ import. done = true cnab _ import. done _ date = timezone. now ( ) cnab _ import. rows _ imported = len _ import _ data cnab _ import. save ... | [
-0.049939077347517014,
0.015071307308971882,
0.5839108824729919,
0.34688806533813477,
1.0263850688934326,
1.158180594444275,
0.30817338824272156,
0.37293335795402527,
-0.07806209474802017,
0.80055832862854,
-2.3974502086639404,
-0.6775721311569214,
-0.43150055408477783,
0.671572208404541,
... |
def create _ empty _ model ( ) : # create the storage try : storage = rdf. memorystorage ( ) except : print " failed to create rdf. storage " return none # create the model using the above storage try : model = rdf. model ( storage ) except : print " failed to create rdf. model. " return none return model | [
0.4209887683391571,
-0.16872669756412506,
0.3601325452327728,
0.07314513623714447,
1.1130491495132446,
0.4006737172603607,
-0.28080159425735474,
-0.8579917550086975,
0.04410523921251297,
-0.07702234387397766,
-0.45984435081481934,
-0.33897665143013,
-0.4937911331653595,
-0.6818958520889282... |
def test _ invalid _ timestamp ( self ) : invalid = self. at _ policy invalid _ dates = ['','junk'] for invalid _ date in invalid _ dates : invalid ['args'] ['at'] = invalid _ date self. assertraises ( validationerror, validate, invalid, group _ schemas. policy ) | [
-0.3830902576446533,
0.7502427697181702,
0.487003892660141,
-0.3134167492389679,
0.5156418085098267,
1.2333574295043945,
-0.9265305995941162,
0.23280464112758636,
0.41524234414100647,
0.16017809510231018,
-0.0918116346001625,
-0.11679943650960922,
0.5202333331108093,
0.5661439299583435,
... |
def testgetlateststickyrelease ( self ) : arbitrary _ url ='http : / / src. chromium. org / svn'test _ data ='\ n '. join ( ['7. 0. 222. 1 / ','8. 0. 224. 2 / ','8. 0. 365. 5 / ','latest. txt'] ) self. mox. stuboutwithmock ( cros _ build _ lib,'runcommand') cros _ build _ lib. runcommand ( ['svn ','ls ', arbitrary _ ur... | [
0.06246880814433098,
0.01469455473124981,
0.802912175655365,
0.3927852213382721,
1.259507656097412,
-0.011458062566816807,
-0.07179368287324905,
-0.5761570930480957,
0.25796541571617126,
-0.3474416434764862,
-0.4633055329322815,
0.23349891602993011,
-0.3420058786869049,
-0.0732334554195404... |
def auto _ recording ( self, auto _ recording ) : allowed _ values = [ " local ", " cloud ", " none " ] # noqa : e501 if auto _ recording not in allowed _ values : raise valueerror ( " invalid value for ` auto _ recording ` ( { 0 } ), must be one of { 1 } " # noqa : e501. format ( auto _ recording, allowed _ values ) )... | [
-0.5813077092170715,
0.8365075588226318,
-0.06226086989045143,
0.8614333271980286,
0.06987277418375015,
0.28739720582962036,
0.27698808908462524,
0.6106435656547546,
-1.021122694015503,
0.5191556215286255,
-1.0344237089157104,
-0.2816048264503479,
-0.2133747637271881,
0.02790311723947525,
... |
def is _ valid _ csv ( filename ) : if not filename. endswith ( ". csv " ) : raise argparse. argumenttypeerror ( " file does not seems to be a csv. " ) return filename | [
0.14202645421028137,
-0.12511542439460754,
0.756149172782898,
1.1411287784576416,
-0.10966510325670242,
1.5084620714187622,
0.33873942494392395,
0.29379764199256897,
0.06276162713766098,
0.08049674332141876,
1.1410781145095825,
-0.07196253538131714,
-0.13377290964126587,
0.6334152221679688... |
def test _ types ( self ) : mod = self. import _ extension ('foo ', [ ('get _ names ','meth _ noargs ','''/ * xxx in tests, the c type is not correct * / # define name ( type ) ( ( pytypeobject * ) & type ) - > tp _ name return py _ buildvalue ( " sssss ", name ( pycell _ type ), name ( pymodule _ type ), name ( pyprop... | [
0.06340309977531433,
0.4492122232913971,
0.5005089044570923,
0.40668153762817383,
0.9496285319328308,
0.2301456779241562,
-0.056889552623033524,
-1.1362049579620361,
0.030145538970828056,
0.1604682058095932,
-0.9671449661254883,
0.26166224479675293,
0.38269129395484924,
0.48995208740234375... |
def get _ pvp _ games ( self, * ids, token = none ) : matches = ', '. join ( str ( id ) for id in ids ) return self. _ request ( " pvp / games ", access _ token = token, ids = matches ) if token else self. _ request ( " pvp / games ", ids = matches ) | [
-1.147845983505249,
0.5856059789657593,
0.5607981085777283,
0.3503858149051666,
0.9349579215049744,
0.001863584271632135,
-2.0070912837982178,
-0.8174657225608826,
0.2516465187072754,
1.6660082340240479,
0.47164618968963623,
0.30278676748275757,
-1.4891241788864136,
-0.8654841184616089,
... |
def _ _ init _ _ ( self, arg _ robot _ name ) : self. _ robot _ ns ='/'+ arg _ robot _ name self. _ planning _ group = " manipulator " self. _ commander = moveit _ commander. roscpp _ initialize ( sys. argv ) self. _ robot = moveit _ commander. robotcommander ( robot _ description = self. _ robot _ ns + " / robot _ des... | [
-0.35998326539993286,
-0.273734450340271,
0.6223214864730835,
-0.016444820910692215,
0.22391632199287415,
-0.1062878891825676,
0.4368140399456024,
-0.22628635168075562,
-0.5039347410202026,
0.22688472270965576,
-0.1456921398639679,
0.12230592221021652,
0.036745138466358185,
0.7328897714614... |
def exit _ enable _ mode ( self, * args, * * kwargs ) : pass | [
-0.3660385310649872,
-0.5697727203369141,
0.5147473812103271,
0.28315091133117676,
0.5163198709487915,
1.0930925607681274,
0.3101333975791931,
0.9238935112953186,
-0.9682608246803284,
0.7701094746589661,
-0.6910372376441956,
-0.21187284588813782,
-1.211269497871399,
-0.21318288147449493,
... |
def transfer ( ) : data = request. get _ json ( force = true ) target = data. get ('target ','' ) series _ list = data. get ('data ','' ) app. logger. info ( " transfer called and sending to % s ", target ) t = [ t for t in transfer _ targets if t ['display _ name'] = = target ] if t : destination = t [ 0 ] ['ae _ titl... | [
-1.3618654012680054,
-0.40046820044517517,
0.9169756770133972,
0.10831101983785629,
-0.1514449417591095,
-0.3528706133365631,
-1.039396047592163,
-0.905637800693512,
0.21165145933628082,
1.131334900856018,
0.011531377211213112,
1.179187536239624,
0.06555160880088806,
0.14097175002098083,
... |
def map _ local ( cmds, thread _ per _ cmd = 1, cpu _ num = 0, gpu = false ) : map _ func ( robust _ exec, cmds, thread _ per _ cmd = thread _ per _ cmd, cpu _ num = cpu _ num, gpu = gpu ) | [
0.4129527807235718,
-0.13144773244857788,
0.5311569571495056,
0.8605706095695496,
-0.5003002882003784,
-0.3533060848712921,
0.07757491618394852,
0.28771159052848816,
0.07850915193557739,
-0.5233585834503174,
0.5476021766662598,
0.1429540067911148,
0.18777517974376678,
-0.20083653926849365,... |
def updateroot ( self, thestate ) : if self. thebackingmachine = = none : return try : self. thebackingmachine. updateroot ( thestate ) return except exception as e : self. failgracefully ( e, none ) except threaddeath as d : raise d except outofmemoryerror as e : raise e except error as e : self. failgracefully ( none... | [
0.387614369392395,
0.3426152467727661,
0.7937797904014587,
0.044514089822769165,
0.21486695110797882,
-0.29626157879829407,
-0.04344482719898224,
-0.8804457187652588,
0.9486533403396606,
0.2602640688419342,
0.6358290910720825,
0.9061594605445862,
-0.8905354142189026,
0.3183968961238861,
... |
def vpnvserver _ vpneula _ bindings ( self ) : try : return self. _ vpnvserver _ vpneula _ binding except exception as e : raise e | [
-0.7541481852531433,
0.0585046261548996,
0.3733008801937103,
1.0678999423980713,
-0.8556181788444519,
1.455173134803772,
0.015794869512319565,
0.25924772024154663,
0.5089647769927979,
0.10826187580823898,
-1.0096344947814941,
0.6303496956825256,
-0.7985846996307373,
0.39413419365882874,
... |
def handle _ removed _ file ( event ) : event. object. remove _ blob _ reference ( ) | [
2.0731453895568848,
-1.334385871887207,
0.5395340919494629,
-0.0866968035697937,
0.408990740776062,
0.6001973152160645,
0.8721854090690613,
0.382887065410614,
-0.5797203779220581,
0.3254213333129883,
-0.27148401737213135,
-0.43044936656951904,
-0.1670093983411789,
0.6828119158744812,
0.4... |
def update _ ancestors _ of ( self, node, ancestors ) : if ancestors is none : ancestors = { } frontier = [ node, ] while frontier : n = frontier. pop ( ) ancestors [ n. state ] = n for parent _ state in n. parent _ states : if parent _ state in ancestors : continue parent _ node = self. states _ to _ nodes [ parent _ ... | [
-0.4986536204814911,
0.5243390798568726,
0.6719202995300293,
-0.5900211930274963,
-0.819362461566925,
-0.7734231948852539,
-0.8543433547019958,
0.3015473186969757,
0.06701362878084183,
1.1292884349822998,
0.39765724539756775,
0.6218801140785217,
0.5929700136184692,
0.7381646037101746,
-0... |
def rings ( self ) : return self. _ rings | [
-0.278389036655426,
0.4554433822631836,
0.30558401346206665,
0.03373264893889427,
1.0076924562454224,
0.786949872970581,
0.8444435596466064,
-1.321593165397644,
0.6252973079681396,
-0.20322751998901367,
-1.0061829090118408,
-0.09369883686304092,
-0.47921988368034363,
-0.28918641805648804,
... |
def assembly ( l, i, t ) : return ( l +': \ t'if l else'\ t') + i + ( ','+ t if t else'' ) | [
-0.07921341061592102,
-0.8885901570320129,
0.5070533752441406,
-0.6292547583580017,
-0.21297632157802582,
0.6103807091712952,
-1.441676139831543,
0.02745082788169384,
-0.9452829957008362,
0.6888894438743591,
-0.2530755400657654,
-0.7650158405303955,
0.37879037857055664,
-0.5210874676704407... |
def get _ feedback _ class ( action ) : msg _ type = get _ feedback _ type ( action ) # verify message type was found. if not msg _ type : return none return roslib. message. get _ message _ class ( msg _ type ) | [
-0.0670928806066513,
-0.5322372913360596,
0.42122870683670044,
0.7289845943450928,
0.7913062572479248,
-0.5166735649108887,
0.5325530767440796,
-2.1274824142456055,
1.1236846446990967,
-0.8178824782371521,
0.7819127440452576,
1.3678150177001953,
-0.2520848214626312,
1.140466570854187,
0.... |
def to _ bytes ( self ) : # grab the chunks we needs out = [ png _ sign ] # fixme : it's tricky to define " other _ chunks ". honeyview stop the # animation if it sees chunks other than fctl or idat, so we put other # chunks to the end of the file other _ chunks = [ ] seq = 0 # for first frame png, control = self. fram... | [
-0.5383242964744568,
-0.06776657700538635,
0.8538309335708618,
-0.6430966258049011,
-0.2436201572418213,
-0.5406541228294373,
0.18135102093219757,
-0.751806914806366,
0.14377988874912262,
-0.5275478959083557,
-0.39867180585861206,
-0.31963786482810974,
0.24055904150009155,
0.21265468001365... |
def get _ synopsis ( self ) : synopsis _ df = database _ helper. select _ query ( " synopsis ", { " movieid " : int ( self. movieid ) } ) self. synopsis _ df = synopsis _ df self. synopsis ='' if ( not synopsis _ df. empty ) : self. synopsis = synopsis _ df. iloc [ 0 ]. summary # get synopsis return | [
-0.4028327763080597,
0.9960953593254089,
0.4250854253768921,
0.6593059301376343,
0.13241657614707947,
-1.3567774295806885,
-0.5296742916107178,
0.45344120264053345,
-0.42193078994750977,
0.8540076613426208,
-0.24652525782585144,
0.3481365144252777,
-0.03232717514038086,
0.03859156370162964... |
def make _ ctf ( parameters, discretize, table _ size = none ) : ctf = vtkdiscretizablecolortransferfunction ( ) interp _ space = parameters ['color _ map _ details']. get ('interpolationspace ', none ) if interp _ space : interp _ space = interp _ space. lower ( ) if interp _ space = ='hsv': ctf. setcolorspacetohsv ( ... | [
0.5148712396621704,
-0.037961166352033615,
0.7629103064537048,
-0.3133188784122467,
0.452664315700531,
-0.634157657623291,
0.22953446209430695,
-0.00908089242875576,
-0.6292540431022644,
-0.18793518841266632,
-0.43433383107185364,
0.5597975850105286,
0.2129894644021988,
0.25325605273246765... |
def check _ content _ directory _ exists _ and _ writable ( ) : content _ directory = options [ " paths " ] [ " content _ dir " ] # check if the content directory exists if not os. path. exists ( content _ directory ) : try : os. makedirs ( content _ directory ) except oserror : logger. error ( " the content directory ... | [
-0.24508428573608398,
-0.2094888985157013,
0.6021564602851868,
-0.18437837064266205,
1.2540286779403687,
0.38964369893074036,
1.0458658933639526,
0.20727121829986572,
-0.5066108107566833,
0.2750406265258789,
1.0154731273651123,
0.5347152352333069,
-0.17165301740169525,
-0.1592337191104889,... |
def makemove ( self, row, col ) : if self. islegalmove ( row, col ) : self. _ grid [ row, col ] = self. _ currentplayer probing _ now = 0 print self. _ currenttruthlist, " < - truth list in makemove method " for truthvalue in self. _ currenttruthlist : if truthvalue : a, b = self. _ probing _ range [ probing _ now ] fo... | [
-0.8600485324859619,
0.31758028268814087,
0.730219841003418,
0.41580891609191895,
-0.15688449144363403,
0.5711419582366943,
0.4044238328933716,
-0.1968977451324463,
-0.20260590314865112,
1.05143404006958,
0.34781453013420105,
-0.2346705049276352,
-0.9358277320861816,
-0.5075694918632507,
... |
def getruntime ( self ) : dif = self. endtime - self. starttime ; return dif. total _ seconds ( ) * 1000 | [
-0.14664889872074127,
-0.30194464325904846,
0.6040010452270508,
0.3730277419090271,
0.0648650974035263,
-0.1630343198776245,
0.13507698476314545,
0.33873939514160156,
-0.6046280860900879,
-0.04322674870491028,
-0.38055720925331116,
0.48608922958374023,
-1.144061803817749,
0.637313842773437... |
def copyinitialstructures ( initialstructures, tmpinitialstructurestemplate, iteration ) : for i, name in enumerate ( initialstructures ) : shutil. copyfile ( name, tmpinitialstructurestemplate % ( iteration, i ) ) | [
-0.7307211756706238,
-0.2847526967525482,
0.42318302392959595,
0.051076438277959824,
-0.42612871527671814,
1.2600940465927124,
1.4487006664276123,
-0.7052424550056458,
0.31527242064476013,
0.804361879825592,
-0.6153427362442017,
-0.8416321873664856,
-0.38456061482429504,
0.1832292824983596... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.