text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def get _ config ( ) : config = api _ settings. static _ endpoint _ config if callable ( config ) : return config ( ) assert _ correct _ config _ syntax ( config ) return config | [
-0.4771736264228821,
0.29411453008651733,
0.4001319110393524,
1.0068014860153198,
0.1374405324459076,
-0.7136200070381165,
0.08511315286159515,
0.03230544179677963,
-0.18928514420986176,
0.21246524155139923,
0.03159281611442566,
-0.2340964674949646,
-0.06776652485132217,
0.2402554154396057... |
def check _ arguments ( cls, args : namespace ) : for arg in cls. args : if not hasattr ( args, arg ) : setattr ( args, arg, none ) | [
-0.24759617447853088,
-0.5162505507469177,
0.3446415662765503,
-0.6869428753852844,
1.2373324632644653,
-0.3656258285045624,
-0.5468485355377197,
-0.5861082673072815,
-0.6539905071258545,
0.8010100722312927,
-0.24371670186519623,
0.4326125979423523,
-0.311386376619339,
1.9446258544921875,
... |
def set _ arguments ( ) : parser = argparse. argumentparser ( description ='get the status of the target website. send results to kafka.') parser. add _ argument ('- c ', dest ='config ', type = str, help ='path to the configuration file. mandatory') parser. add _ argument ('- v ', dest ='debug ', action ='store _ true... | [
0.10237568616867065,
-0.5055835247039795,
0.5677016377449036,
-0.3722529709339142,
0.6090413928031921,
-0.38838133215904236,
-0.2365303784608841,
0.6866333484649658,
-0.8574079871177673,
0.42107436060905457,
-0.3150852918624878,
0.3307022452354431,
-0.5518501996994019,
0.8541201949119568,
... |
def annotategenome ( infile, outfile ) : # this could case problems if source collumn have changed # need to add in a check that this is acessing the right info # maybe make more explicit so that it can know the right gtf attribute to access # add in ability to output some stats on how many annotations, how many are pt... | [
0.3408716320991516,
-0.5397924780845642,
0.6084027886390686,
0.3538886308670044,
0.11034741252660751,
0.2617059648036957,
0.4608457386493683,
0.6627047657966614,
-0.9381814002990723,
-0.17048589885234833,
0.4631411135196686,
0.527209997177124,
0.18049491941928864,
-0.020914891734719276,
... |
def infection _ free ( self ) : if self. ever _ infected = = true and self. infected = = 0 : return true else : return false | [
-0.6272038817405701,
-0.6240319013595581,
0.7148622274398804,
0.27872607111930847,
-0.8107478022575378,
-0.2088492214679718,
0.23700593411922455,
-0.28611981868743896,
0.3622324764728546,
0.08714001625776291,
0.039146650582551956,
-0.3304271697998047,
-1.723665714263916,
-0.086871832609176... |
def dict _ ind _ img ( train _ ds, val _ ds, test _ ds ) : label _ tmp = [ y. numpy ( ) for x, y in train _ ds ] train _ dict = dict ( ( x, duplicates ( label _ tmp, x ) ) for x in set ( label _ tmp ) ) label _ tmp = [ y. numpy ( ) for x, y in val _ ds ] val _ dict = dict ( ( x, duplicates ( label _ tmp, x ) ) for x in... | [
-0.8933603167533875,
0.36477917432785034,
0.44544991850852966,
-1.5342973470687866,
-0.6269155740737915,
0.14774999022483826,
0.5293596386909485,
0.3207402229309082,
-0.5896393656730652,
0.14023466408252716,
-0.04323254153132439,
0.02735772356390953,
1.0147438049316406,
-0.2243942618370056... |
def format _ mtime ( mtime ) : return str ( datetime. fromtimestamp ( mtime ) ) [ : 19 ] | [
0.9102573394775391,
-1.0387184619903564,
0.3361138105392456,
-1.602186918258667,
-0.33892714977264404,
0.0148104727268219,
-0.6260136365890503,
-0.6148681640625,
0.9640459418296814,
1.079243540763855,
0.5016279816627502,
-0.6295228600502014,
-0.572015643119812,
-0.15932899713516235,
0.44... |
def _ writefieldvalues ( self, output _ mediator, field _ values ) : for column _ index, field _ name in enumerate ( self. _ field _ names ) : field _ value = field _ values. get ( field _ name, none ) if field _ name = ='datetime'and field _ value : self. _ sheet. write _ datetime ( self. _ current _ row, column _ ind... | [
-0.9969802498817444,
0.07031212747097015,
0.26259952783584595,
-0.13475444912910461,
0.5426071882247925,
-0.9283586144447327,
-0.15347802639007568,
0.05802205950021744,
-0.6154211163520813,
-0.6360766887664795,
0.09714675694704056,
-0.518810510635376,
0.6179541349411011,
0.5787402987480164... |
def error ( update, context ) : logger. warning ('update " % s " caused error " % s " ', update, context. error ) | [
0.2776670455932617,
-1.181739330291748,
0.6052141189575195,
0.17687846720218658,
-0.6995801329612732,
-0.062298715114593506,
-0.758475661277771,
0.09662681072950363,
1.1500003337860107,
0.7759217023849487,
-0.06319975852966309,
0.6940879821777344,
0.46760615706443787,
-0.12261072546243668,... |
def _ _ init _ _ ( self, * * options ) : super ( ). _ _ init _ _ ( normalizerenum. space, 120, * * options ) | [
0.7152122259140015,
1.4225332736968994,
0.3596351444721222,
0.38656800985336304,
-0.31735002994537354,
0.045722752809524536,
0.41623884439468384,
0.30373525619506836,
1.5207265615463257,
-0.8272988796234131,
-0.4671109616756439,
-0.7274541854858398,
-0.4644310772418976,
1.0029544830322266,... |
def enc ( pub, m ) : if isinstance ( m, int ) : m = bn ( m ) o = pub. group. order ( ) k = o. random ( ) # print " k : " + str ( k ) g = pub. group. generator ( ) a = k * g b = k * pub + ecpt. from _ binary ( binascii. unhexlify ( _ n _ table [ str ( ( o + m ) % o ) ] ), g ) # m * g return ct ( pub, a, b, k, m ) else :... | [
0.7924678921699524,
0.2988049387931824,
0.4302108883857727,
0.6272664666175842,
-0.9303773045539856,
0.039040181785821915,
0.34905102849006653,
-0.13278871774673462,
-0.01909777894616127,
-0.18379060924053192,
0.44290950894355774,
-0.05576141178607941,
-0.9729434847831726,
-0.0144468434154... |
def target _ design _ member _ id ( self, target _ design _ member _ id ) : self. _ target _ design _ member _ id = target _ design _ member _ id | [
-0.5592767000198364,
-0.47091785073280334,
-0.386283278465271,
0.3115687966346741,
0.36455273628234863,
1.4053499698638916,
0.14631205797195435,
-0.25775280594825745,
0.4850345849990845,
-0.6921010613441467,
-0.3663084805011749,
1.0794658660888672,
0.9300227165222168,
-0.04000271111726761,... |
def position ( self ) : return self. _ _ position | [
-0.5556521415710449,
-1.121161937713623,
0.16019012033939362,
-0.07228200882673264,
0.40676942467689514,
0.8510614037513733,
1.014572262763977,
0.11460340023040771,
0.1715833693742752,
-0.6256494522094727,
-0.24444381892681122,
-0.90452641248703,
-0.6691553592681885,
-0.7147741317749023,
... |
def server _ status _ init ( log, workspace, server _ status, field _ names ) : # pylint : disable = unused - argument return server _ status. bssc _ init _ fields ( log, field _ names ) | [
0.19888164103031158,
-0.11196521669626236,
0.20527921617031097,
-0.5316347479820251,
0.10915707051753998,
-0.3732559382915497,
-0.3640241026878357,
-0.12819072604179382,
-0.4438180923461914,
-0.07466404139995575,
-1.481036901473999,
0.4091295897960663,
0.3495592772960663,
0.339200377464294... |
def init _ weight ( * dims, low = - 0. 3, high = 0. 3 ) : weights = uniform ( low = low, high = high, size = dims ) var = shared ( weights. astype ( np. float32 ), name = " w { 0 } x { 1 } ". format ( * dims ) ) return var | [
0.30839070677757263,
0.37634894251823425,
0.6266451478004456,
-0.30942296981811523,
-0.13955509662628174,
0.19942602515220642,
0.5969417095184326,
-0.35063791275024414,
-0.42629432678222656,
-0.34260955452919006,
-0.6910059452056885,
1.2173446416854858,
-0.1326909363269806,
0.4727310836315... |
def create _ dummy _ computation _ tensorflow _ add ( ) : type _ spec = tf. float32 with tf. graph ( ). as _ default ( ) as graph : parameter _ 1 _ value, parameter _ 1 _ binding = tensorflow _ utils. stamp _ parameter _ in _ graph ('x ', type _ spec, graph ) parameter _ 2 _ value, parameter _ 2 _ binding = tensorflow ... | [
-0.2633785903453827,
-0.22216683626174927,
0.8856788277626038,
-0.02545948140323162,
0.5078158378601074,
0.052609413862228394,
0.5439077019691467,
-0.8338485360145569,
-0.31178340315818787,
0.5380052924156189,
-0.4993896484375,
0.6353551149368286,
-0.1866925060749054,
0.03154449164867401,
... |
def tag _ body ( node, context ) : word = word _ from _ file ('data / bodyparts') return word | [
0.5721791386604309,
0.3171776533126831,
0.297796368598938,
-1.147942066192627,
0.38415446877479553,
0.7598146796226501,
-0.9011743068695068,
-0.7975767850875854,
-0.4669301211833954,
0.3826200067996979,
-0.1787063479423523,
0.22411134839057922,
-0.587446928024292,
0.4737718105316162,
-1.... |
def _ _ init _ _ ( self, text ='', font _ name = none, font _ size = none, bold = false, italic = false, stretch = false, color = ( 255, 255, 255, 255 ), x = 0, y = 0, z = 0, width = none, height = none, anchor _ x ='left ', anchor _ y ='baseline ', align ='left ', multiline = false, dpi = none, batch = none, group = n... | [
0.826324462890625,
0.1446397751569748,
0.7196749448776245,
-0.18652355670928955,
-1.3963124752044678,
-0.1881718635559082,
-0.08921349048614502,
0.6000981330871582,
0.5715301632881165,
-0.15115393698215485,
-0.5163061618804932,
0.0469791516661644,
-0.009155808947980404,
-0.3933098018169403... |
def is _ isogram ( text ) : if not text : return true if has _ number ( text ) : return false text = text. lower ( ) return len ( text ) = = len ( set ( text ) ) if text else false | [
0.21356160938739777,
0.5983335971832275,
0.3141045868396759,
0.5435736775398254,
-0.6886255741119385,
0.3373635411262512,
-0.4901229739189148,
0.5185965895652771,
1.4742801189422607,
0.995029628276825,
-0.663189709186554,
-0.6033539175987244,
-1.330747365951538,
-0.04221159964799881,
-1.... |
def _ dispatch ( self, method, params, config = none ) : config = config or self. json _ config func = none try : # look into registered methods func = self. funcs [ method ] except keyerror : if self. instance is not none : # try with the registered instance try : # instance has a custom dispatcher return getattr ( se... | [
-0.21743665635585785,
0.3476194143295288,
0.83689945936203,
-0.3070332109928131,
-0.19706200063228607,
-0.7868380546569824,
-0.17849814891815186,
-0.40532344579696655,
0.5651983022689819,
0.031275276094675064,
-0.12189440429210663,
0.6269952654838562,
-0.08463335037231445,
0.71290057897567... |
def is _ enabled ( self, explicit = false ) : if not explicit : return self. _ is _ enabled return self. _ explicit _ is _ enabled | [
-0.2962896227836609,
-0.09439526498317719,
0.5669856071472168,
0.9337232708930969,
0.2173248827457428,
0.4581172466278076,
-0.4527130722999573,
0.7025959491729736,
0.2905198931694031,
-0.07015326619148254,
-0.4598308801651001,
0.5126070976257324,
-0.008536971174180508,
0.35537073016166687,... |
def gen _ next _ floats ( self, amount ) : samples = np. zeros ( amount ) for i in range ( amount ) : samples [ i ] = self. gen _ next _ float ( ) return samples | [
-0.47899797558784485,
0.3200659453868866,
0.58802330493927,
0.2102414071559906,
0.22485235333442688,
0.028281982988119125,
0.5216160416603088,
-1.1723613739013672,
0.18706972897052765,
-0.5996599793434143,
0.09117533266544342,
0.08538991212844849,
-0.3814067840576172,
1.1243208646774292,
... |
def attach ( self, instance _ id, delete _ with _ instance = none ) : if instance _ id and instance _ id! = self. instance _ id : return self. connection. attach _ disk ( disk _ id = self. id, instance _ id = instance _ id, delete _ with _ instance = delete _ with _ instance ) return false | [
-0.489067941904068,
-0.11587975919246674,
0.7184381484985352,
-0.34683409333229065,
-0.18596360087394714,
0.4551900625228882,
-0.10884110629558563,
0.31069132685661316,
0.6905384063720703,
-0.1236424669623375,
0.3054959177970886,
0.6534568667411804,
-1.176750659942627,
0.9041642546653748,
... |
async def handle _ event _ manager _ application ( self, guild, payload ) - > none : emoji = str ( payload. emoji ) if emoji = ='' : # gets the teacher app and does the magic event _ manager _ app = await self. get _ event _ manager _ app _ by _ message ( payload. message _ id ) if not event _ manager _ app : return # ... | [
0.48587924242019653,
-0.5018093585968018,
0.7769672274589539,
-0.09961707890033722,
-0.19437305629253387,
-0.07731333374977112,
-0.23166176676750183,
-0.10289762914180756,
-0.013703504577279091,
0.19792813062667847,
0.3423241972923279,
-0.057145752012729645,
-0.8428810834884644,
1.45830011... |
def mixed ( s ) : m = _ mixed _ format. match ( s ) if not m : return fraction ( s ) d = m. groupdict ( ) result = int ( d ['whole'] ) + fraction ( int ( d ['num'] ), int ( d ['denom'] ) ) if d ['sign'] = ='-': return - result else : return result | [
0.11492007225751877,
-0.28834420442581177,
0.5006645917892456,
-0.059315845370292664,
-1.0352320671081543,
-0.4455623924732208,
0.39341598749160767,
-0.2797301709651947,
0.8746207356452942,
-1.7487632036209106,
0.18964050710201263,
-1.1223043203353882,
-0.4003760516643524,
0.19043725728988... |
def test _ nfc _ wps _ handover _ chan14 ( dev, apdev ) : hapd = none try : ssid = " test - wps - nfc - handover " params = ap _ wps _ params ( ssid ) params [ " country _ code " ] = " jp " params [ " hw _ mode " ] = " b " params [ " channel " ] = " 14 " hapd = hostapd. add _ ap ( apdev [ 0 ], params ) logger. info ( "... | [
-0.034778252243995667,
0.46896475553512573,
0.845298171043396,
-0.4395250082015991,
0.8171140551567078,
0.1286657154560089,
0.5114235877990723,
-0.14583216607570648,
0.22343194484710693,
-0.5243440866470337,
0.46624985337257385,
-0.08338631689548492,
-0.4625774323940277,
0.2871281206607818... |
def test _ trivial _ employee _ list _ return ( self ) : resp = self. client. get ('/ employee /') self. assertequal ( resp. json ( ), [ ] ) | [
-1.0805926322937012,
-0.07970953732728958,
0.40018078684806824,
-0.43203797936439514,
0.5319220423698425,
1.292944073677063,
-1.0838711261749268,
0.29016923904418945,
0.23579533398151398,
-0.42231112718582153,
-0.7776815891265869,
-0.28664809465408325,
-0.5479093790054321,
-0.0853256657719... |
def setloglevelstr ( level ) : if not hasattr ( logging, level ) : raise exception ( f'unknown / invalid loglevel " { level } "') logconfig. setloglevel ( getattr ( logging, level ) ) | [
-0.2470078021287918,
-0.29661834239959717,
0.4433627724647522,
-0.46013376116752625,
-0.5412434339523315,
0.46746909618377686,
-0.2207551896572113,
-0.21806234121322632,
-0.3614337146282196,
0.264361172914505,
-0.7506235241889954,
-0.09287457913160324,
-0.13080188632011414,
0.3393131792545... |
def tile _ label _ to _ file ( root, tile, palette, label ) : out _ path = os. path. join ( os. path. expanduser ( root ), str ( tile. z ), str ( tile. x ) ) os. makedirs ( out _ path, exist _ ok = true ) if len ( label. shape ) = = 3 : # h, w, c - > h, w assert label. shape [ 2 ] = = 1 label = label. reshape ( ( label... | [
-0.494473934173584,
-0.2576640248298645,
0.8282353281974792,
-0.5464896559715271,
-0.42434564232826233,
1.0892839431762695,
0.2793041467666626,
-0.3411048352718353,
-0.12478930503129959,
1.0630778074264526,
-0.9304328560829163,
0.02327236719429493,
-0.1490623652935028,
-0.48190632462501526... |
def handle _ success ( sys _ args, cmd ) : out _ str = render _ email _ template ('cronwrap ran command successfully : ', sys _ args, cmd ) if sys _ args. verbose : if sys _ args. emails : send _ email ( sys _ args, sys _ args. emails,'host % s : cronwrap ran command successfully!'% platform. node ( ). capitalize ( ), ... | [
0.5735387802124023,
0.1535142958164215,
0.5197086930274963,
0.22997000813484192,
0.01213271263986826,
0.39283400774002075,
-0.3114255666732788,
0.478681355714798,
-0.34911012649536133,
0.2684425413608551,
0.5488508939743042,
1.6648776531219482,
-0.02712966315448284,
-0.12637224793434143,
... |
def execute _ sp _ singleton1 ( self, sql : str, * params ) - > any : cursor = self. _ _ conn. cursor ( ) cursor. execute ( sql, params ) rows = cursor. fetchall ( ) cursor. close ( ) n = len ( rows ) if n! = 1 : raise resultexception ('1 ', n, sql ) return rows [ 0 ] [ 0 ] | [
-0.1368541270494461,
0.6671351790428162,
0.7223408222198486,
1.1728116273880005,
0.14047138392925262,
-0.2369702160358429,
0.19462603330612183,
-0.4829366207122803,
0.3767627775669098,
0.1126546785235405,
0.698954164981842,
0.6827741861343384,
-1.0211267471313477,
0.360321044921875,
-0.4... |
def deploy _ app _ container ( ) : uid, err = get _ oemid ( request = request ) if err is not none : return jsonify ( unauth _ result ) check _ json ( request ) # tested : this is on the dev server to support to start task deploy = get _ json ( request ). get ( " deploy ", { } ) app _ id = deploy. get ('application _ i... | [
-0.652290403842926,
0.04682900756597519,
1.1649088859558105,
1.6098674535751343,
0.624923050403595,
-0.5470107197761536,
0.5575568675994873,
-0.36339354515075684,
-0.5596380233764648,
0.9985719919204712,
0.6855403184890747,
0.06323251128196716,
0.17667798697948456,
0.7941769361495972,
0.... |
def fit _ generator ( model, data _ bunch, callbacks, return _ best _ model = false, * * kwargs ) : train _ iterator = data _ bunch. train. features. underlying valid _ iterator = data _ bunch. valid. features. underlying try : model. fit _ generator ( generator = train _ iterator, validation _ data = valid _ iterator,... | [
-0.005077872890979052,
0.1817600429058075,
0.5923629403114319,
1.2494356632232666,
-0.327640175819397,
0.9035019278526306,
-0.19570080935955048,
0.23569941520690918,
-0.8721786737442017,
-0.6960321068763733,
0.27519237995147705,
-0.8138357996940613,
-0.8276727199554443,
0.49757033586502075... |
def form _ csv ( self, sensor _ type ) : this _ year _ measures = bdhandler. get _ this _ year _ measures ( sensor _ type ) csv _ string = ', '. join ( ['tipo _ sensor ','valor ','fecha ','id - lisandra _ ( ubicacion )'] ) # title headers csv _ string + ='\ n'for sensor _ entity in this _ year _ measures : csv _ string... | [
-0.1665925830602646,
-1.1566998958587646,
0.731476902961731,
-0.5331107974052429,
0.1827506422996521,
0.28521111607551575,
-1.2061183452606201,
-1.3397964239120483,
0.03189815208315849,
-0.4017338752746582,
0.46224546432495117,
0.4249844551086426,
0.6819667816162109,
0.7165624499320984,
... |
def find _ city _ score ( city _ name, soup ) : # need to get the city name and score # inside the table, under < tr > and under middle < td align = " left " class = " ttcontent " > ( how to get it below ) l = soup. table. tr. td. find _ all ( " tr " ) # because the city name starts only at 4, and goes + 10 for i in ra... | [
0.16458328068256378,
-0.3306629955768585,
1.1146554946899414,
-0.8389668464660645,
-0.5773749947547913,
-0.6251202821731567,
0.22896519303321838,
0.5240304470062256,
0.3389091193675995,
0.7608263492584229,
-0.10333121567964554,
-0.7258905172348022,
-0.47855809330940247,
0.31918227672576904... |
def my _ hist ( data, bins, err _ type ='poisson ', * * kwargs ) : y, bin _ edges = np. histogram ( data, bins = bins ) width = bin _ edges [ 1 : ] - bin _ edges [ 0 : - 1 ] normalization = width [ 0 ] * sum ( y ) if err _ type = ='poisson': yerr = np. sqrt ( y ) / normalization elif err _ type = ='binomial': yerr = np... | [
0.43514612317085266,
0.3530465364456177,
0.5891781449317932,
0.0398368313908577,
-0.22976209223270416,
0.38224107027053833,
-0.022343819960951805,
0.5060744285583496,
0.15864507853984833,
-0.5617212653160095,
0.4387679696083069,
0.9066146612167358,
-0.5916611552238464,
0.1304597407579422,
... |
def encrypt ( self, data : bytearray ) - > bytearray : if not isinstance ( data, ( bytes, bytearray ) ) : self. clear ( ) raise gostciphererror ('invalid plaintext data') gamma = bytearray ( ) result = bytearray ( ) for i in range ( get _ num _ block ( data, self. block _ size ) ) : gamma = self. _ cipher _ obj. encryp... | [
-0.6004735231399536,
0.8692682981491089,
0.6496198773384094,
0.25947606563568115,
0.05468997359275818,
-0.22778542339801788,
0.8208655714988708,
-0.8951876759529114,
0.589608907699585,
0.28787294030189514,
-0.9193626642227173,
-0.094957634806633,
-1.6144651174545288,
0.2371116280555725,
... |
def ico ( chain, beneficiary, team _ multisig, preico _ starts _ at, preico _ ends _ at, flat _ pricing, preico _ cap, preico _ funding _ goal, preico _ token _ allocation, token ) - > contract : args = [ token. address, flat _ pricing. address, team _ multisig, beneficiary, preico _ starts _ at, preico _ ends _ at, pr... | [
0.22035843133926392,
0.39407625794410706,
0.5140156149864197,
-0.1316508948802948,
-0.157535582780838,
-0.7053272128105164,
0.28352174162864685,
0.12732090055942535,
-0.41968005895614624,
0.8731020092964172,
-0.4687933325767517,
0.2816321551799774,
-0.19323967397212982,
-1.2046380043029785... |
def find _ files ( config : config ) - > list : files = [ ] for glob _ pattern in config. input _ glob : files. extend ( glob. glob ( glob _ pattern, recursive = true ) ) return files | [
0.5051167011260986,
0.4669291377067566,
0.5494303703308105,
1.0986818075180054,
0.6838623881340027,
0.5806799530982971,
1.1283773183822632,
0.08308839797973633,
-0.7331862449645996,
0.13140764832496643,
-0.1196078434586525,
-0.4072993993759155,
-0.5130433440208435,
1.4260563850402832,
-0... |
def postprocess _ y ( self, y : np. ndarray ) - > np. ndarray : # when allowing overlap, multiple speakers can be active at once. # hence, y sticks to shape ( n _ samples, n _ speakers ) if self. allow _ overlap : return y # when overlap is not allowed, reshape y to ( n _ samples, 1 ) else : # if speech / non - speech ... | [
-1.0868589878082275,
-0.7155723571777344,
1.0004208087921143,
-0.0007177074439823627,
-0.2822059094905853,
0.12906022369861603,
0.9603512287139893,
-0.1605423241853714,
0.8628689646720886,
0.026452071964740753,
0.574198305606842,
0.2581249177455902,
-0.3581598103046417,
0.5943245887756348,... |
def _ build _ net _ assn _ dict ( net _ assns ) : log. debug ('enter _ build _ net _ assn _ dict') if not net _ assns : log. debug ('exit _ build _ net _ assn _ dict, no networkassociations') return { } ret _ dict = { } for net _ assn in net _ assns : # we only care about networkassociations that have an sea if net _ a... | [
-0.7942444086074829,
-0.858423113822937,
0.24770312011241913,
-0.9404990673065186,
-0.8409120440483093,
0.07963643223047256,
0.5089206695556641,
-0.25861477851867676,
0.5961897373199463,
-0.07839803397655487,
-0.13514861464500427,
-0.23705248534679413,
0.18399681150913239,
1.22953104972839... |
def chord _ at ( self, t, maxnotes = none, minamp = - 50 ) : data = [ ] minamp = db2amp ( minamp ) for p in self. partials _ at ( t ) : amp = p. amp ( t ) if amp > = minamp : data. append ( ( f2m ( p. freq ( t ) ), amp ) ) data. sort ( reverse = true, key = _ operator. itemgetter ( 1 ) ) if maxnotes is not none : data ... | [
-0.3678361177444458,
-0.767924964427948,
0.6181601285934448,
-0.8090945482254028,
-0.6612199544906616,
-0.294717013835907,
-0.3827407956123352,
-1.110673189163208,
-0.17005304992198944,
0.31879734992980957,
0.07946336269378662,
0.5816816687583923,
0.03662737086415291,
-0.8970502018928528,
... |
def get _ bbox ( shapefile ) : driver = ogr. getdriverbyname ('esri shapefile') # 0 means read, 1 means write data _ source = driver. open ( shapefile, 0 ) # check to see if shapefile is found. if data _ source is none : failure ('could not open % s'% ( shapefile ) ) else : layer = data _ source. getlayer ( ) shape _ b... | [
-0.20161817967891693,
-0.8831425309181213,
0.8314440846443176,
-0.010439164936542511,
0.9900264143943787,
0.3141113519668579,
0.4113653600215912,
0.15152913331985474,
0.16862107813358307,
0.45213431119918823,
-0.367850661277771,
0.9024269580841064,
0.39236190915107727,
-0.5529484748840332,... |
def _ displays2mask ( displays ) : mask = 0 for d in displays : mask + = ( 1 < < _ displaystr2num ( d ) ) return mask | [
-1.5532654523849487,
-0.18618080019950867,
0.35981932282447815,
0.5120167136192322,
0.05091539025306702,
0.1682530641555786,
1.6376131772994995,
-0.9709250330924988,
0.8903038501739502,
-0.5749221444129944,
-0.15898652374744415,
-0.09177255630493164,
0.06090840324759483,
0.9614516496658325... |
def run ( nofposes, csvfile ) : highscores = { } errorscores = { } keycounts = { } linenumber = 0 scorescsv = csv. reader ( csvfile, delimiter ='; ', quotechar ='"') for fields in scorescsv : linenumber + = 1 if fields [ 0 ] [ 0 ] = ='#': fields [ 0 ] = fields [ 0 ] [ 1 : ] columntitles = fields continue keyfield = fie... | [
-0.3812097907066345,
-0.07177864015102386,
0.786538302898407,
0.07045518606901169,
-0.36029669642448425,
0.19224722683429718,
-0.18484114110469818,
-0.4403492510318756,
-1.1893610954284668,
0.011268801987171173,
-0.6044214367866516,
-0.3197280168533325,
0.28457415103912354,
0.2660335302352... |
def test _ mixed _ bidir _ rebalance ( self ) : super ( xrebalancetests, self ). test _ mixed _ bidir ( ) | [
0.08307500183582306,
-0.0657939612865448,
0.5687127709388733,
0.9598410725593567,
1.2168883085250854,
0.48541998863220215,
0.7314188480377197,
-0.6077655553817749,
0.9330277442932129,
-0.897326648235321,
-0.21517086029052734,
0.3066755533218384,
-0.2528354525566101,
0.34104838967323303,
... |
def enabled ( self ) - > optional [ pulumi. input [ bool ] ] : return pulumi. get ( self, " enabled " ) | [
0.5884978771209717,
0.4282594323158264,
0.28737500309944153,
0.9568070769309998,
1.0741441249847412,
1.4563788175582886,
-0.3638530671596527,
1.1037753820419312,
0.7918198108673096,
0.04904778674244881,
-0.29427453875541687,
0.852506160736084,
-0.9559610486030579,
-0.9562786817550659,
-0... |
def index ( self, point, origin, width ) : if not self. contains ( point, origin, width ) : raise valueerror ( " point is not contained in node " ) return ( 1 if point [ 0 ] > = origin [ 0 ] + width / 2 else 0 ) + \ ( 2 if point [ 1 ] > = origin [ 1 ] + width / 2 else 0 ) + \ ( 4 if point [ 2 ] > = origin [ 2 ] + width... | [
-0.4352863132953644,
-0.7917983531951904,
0.3495624363422394,
0.030332449823617935,
-0.34016895294189453,
0.24506041407585144,
0.3738625645637512,
0.47870856523513794,
0.5258464813232422,
0.1872963309288025,
0.5507897138595581,
0.05888611450791359,
-0.564418375492096,
-0.4434593915939331,
... |
def arr ( self ) : if self. _ arr is not none : return self. _ arr self. _ arr = functools. partial ( ytarray, registry = self. unit _ registry ) return self. _ arr | [
-0.20232151448726654,
-1.0924712419509888,
0.5125772953033447,
-0.18018484115600586,
0.31296536326408386,
-0.10615593940019608,
1.1691371202468872,
-1.0628111362457275,
0.773847222328186,
-1.3664298057556152,
-0.28540101647377014,
0.8505935668945312,
0.3697255551815033,
1.1159878969192505,... |
def searchcallin ( self, method ) : callinidlist = [ ] if method not in self. invokedir. keys ( ) : return [ ] else : callinidlist = self. invokedir [ method ] return callinidlist | [
-1.3607693910598755,
-0.09288716316223145,
0.6493040919303894,
0.3243741989135742,
0.13547661900520325,
-0.06992823630571365,
-0.6125196814537048,
-0.28104251623153687,
1.0246195793151855,
-0.08919434249401093,
0.05120747536420822,
0.5120982527732849,
-1.0176447629928589,
1.193242192268371... |
def model ( data, model _ path ) : model = word2vec. word2vec ( data, sg = 0, hs = 1, min _ count = 2, window = 5, size = 300 ) # word2vec. word2vec ( self. x _ train, min _ count = 1, size = 200, window = 5, negative = 3, sample = 0. 001, # sg = 1, hs = 1 ) # self. model = model # # gensim. models. word2vec. load ( ) ... | [
-0.03435789421200752,
-0.2522074282169342,
0.6776387095451355,
0.2262052595615387,
-0.023260755464434624,
0.7544144988059998,
0.7101736068725586,
-0.06822510808706284,
-0.09633979946374893,
0.31149810552597046,
-0.8261839747428894,
0.2218085378408432,
-0.028971664607524872,
-0.157164797186... |
def do _ select _ all ( self, * * kwargs ) : _ revision _ id = kwargs ['revision _ id'] for _ node in self. dtm _ hardware. do _ select _ all ( revision _ id = _ revision _ id ). all _ nodes ( ) [ 1 : ] : _ data = { } _ hardware _ id = _ node. data. hardware _ id _ data = _ node. data. get _ attributes ( ) try : _ elec... | [
0.10721976310014725,
0.468821257352829,
0.9190847277641296,
0.18986274302005768,
0.5789341330528259,
-0.07773786038160324,
0.19026531279087067,
-0.3277740478515625,
-0.6736971735954285,
0.26714155077934265,
-0.23040570318698883,
0.06749211996793747,
0.1893387734889984,
0.6747682094573975,
... |
def build _ right _ most _ path ( dfs _ codes ) : path = [ ] prev _ iid = - 1 for idx, code in reversed ( list ( enumerate ( dfs _ codes ) ) ) : if code [ 0 ] < code [ 1 ] and ( len ( path ) = = 0 or prev _ iid = = code [ 1 ] ) : prev _ iid = code [ 0 ] path. append ( code ) # print path return path | [
-1.2250797748565674,
-0.3198341131210327,
0.8518885374069214,
0.4727153778076172,
0.5075368285179138,
-0.5884984135627747,
0.18908365070819855,
-0.3350805938243866,
-0.05805583298206329,
0.24348264932632446,
0.9279353022575378,
-0.33231157064437866,
-1.2328180074691772,
0.5278798341751099,... |
def _ _ update _ text ( self ) - > noreturn : self. settooltip ( translator. tr ( " entfernen " ) ) | [
-0.8903365135192871,
-0.3931950628757477,
0.21501050889492035,
-0.6094356775283813,
-0.498116672039032,
-0.07196381688117981,
-0.6161952018737793,
0.48446980118751526,
-0.8045523166656494,
1.1988991498947144,
0.4231145977973938,
-0.7299352288246155,
0.8372177481651306,
-0.5975550413131714,... |
def _ createwelcomepage ( self ) : self. nametaggroup = none page = directframe ( self. frame ) page. setname ( " partyplannerwelcomepage " ) self. welcometitlelabel = directlabel ( parent = page, relief = none, text = ttlocalizer. partyplannerwelcometitle, pos = self. gui. find ( " * * / title _ locator " ). getpos ( ... | [
0.2152857482433319,
-0.1965222954750061,
0.5142438411712646,
-1.091968059539795,
-0.6438665986061096,
0.49498751759529114,
-0.914823591709137,
-0.23460887372493744,
-0.5158304572105408,
0.5522584319114685,
-0.030926570296287537,
-0.7564858198165894,
-0.2751905024051666,
0.5442367196083069,... |
def test _ setup _ template _ name _ and _ pattern _ on _ ilm _ disabled ( self ) : self. render _ config ( ) exit _ code = self. run _ beat ( logging _ args = [ " - v ", " - d ", " * " ], extra _ args = [ " setup ", self. cmd, " - e ", " setup. ilm. enabled = false ", " - e ", " setup. template. name = " + self. custo... | [
-0.2715401351451874,
-0.5381741523742676,
0.612878143787384,
-0.900321364402771,
-0.2395496815443039,
0.9992550015449524,
0.5192863941192627,
1.005346655845642,
0.2264256775379181,
0.4219854474067688,
-0.7486575841903687,
0.005127868615090847,
-0.5824098587036133,
-0.026405544951558113,
... |
def test _ replace _ triggers ( self ) : pass | [
0.7914366126060486,
0.5630639791488647,
0.32005545496940613,
0.566288948059082,
0.48442909121513367,
-0.7979654669761658,
1.5770617723464966,
1.2006421089172363,
0.6247888207435608,
-1.5963027477264404,
-1.639248013496399,
-0.013414312154054642,
-1.093409776687622,
-0.34992754459381104,
... |
def mcgroupcountcustom ( self ) : if self. force _ auto _ sync : self. get ('mcgroupcountcustom') return self. _ mcgroupcountcustom | [
0.0526120699942112,
0.2953053414821625,
0.5381867289543152,
-0.03292590379714966,
-0.7316475510597229,
-0.3710269629955292,
1.2674388885498047,
0.01222022995352745,
-0.1435249000787735,
-0.0686444640159607,
-0.8439018726348877,
1.341742753982544,
-0.26880380511283875,
-0.10825738310813904,... |
def step ( self ) - > float : return super ( ). _ static _ info. step | [
0.24299463629722595,
0.9260570406913757,
0.10534343868494034,
1.0632555484771729,
0.5368377566337585,
0.8018767237663269,
0.23440811038017273,
-0.23272356390953064,
-1.7461116313934326,
-1.2958910465240479,
-0.8109286427497864,
-0.2183733880519867,
0.2218758761882782,
1.2048556804656982,
... |
def _ global _ data ( self, parent _ data ) : parent _ data [ interpretdata. names ] = self. features parent _ data [ interpretdata. scores ] = self. global _ importance _ values return parent _ data | [
0.1856621354818344,
0.4788101315498352,
0.3574325144290924,
-1.8588169813156128,
0.034967754036188126,
1.1747236251831055,
-0.25315606594085693,
0.46231701970100403,
-0.4645228981971741,
0.3475850522518158,
-0.6790333986282349,
0.7041440010070801,
-0.3792997896671295,
0.04048144817352295,
... |
def data _ for _ centroids ( radar, lapse _ rate = - 6. 5, refl _ field = none, zdr _ field = none, rhv _ field = none, kdp _ field = none, temp _ field = none, iso0 _ field = none, temp _ ref ='temperature ', nsamples _ max = 20000 ) : # parse the field parameters if refl _ field is none : refl _ field = get _ field _... | [
0.33895137906074524,
-0.18307402729988098,
0.7866899371147156,
-0.38166362047195435,
-0.10120074450969696,
0.4901267886161804,
-0.40078213810920715,
0.3135663568973541,
-0.45029643177986145,
0.836946427822113,
0.1369052231311798,
-0.4977264404296875,
-0.291705846786499,
0.6693739891052246,... |
def config _ digest _ canonical ( request ) - > formattedsha256 : return formattedsha256. parse ( get _ test _ data ( request, _ _ name _ _, " config _ canonical. json. digest ", " r " ) ) | [
-0.9173678159713745,
-0.8854588866233826,
0.44862404465675354,
-0.11241530627012253,
0.002948987763375044,
-0.29675304889678955,
0.027791554108262062,
-0.18629716336727142,
-0.17010116577148438,
0.539918065071106,
0.900667667388916,
0.6162241697311401,
0.6337916851043701,
0.111511588096618... |
def reset _ weights ( self ) : # todo : add pytorch support model = self. model if self. backup is none : raise runtimeerror ( " you must store the ` backup ` before ` reset _ weights `. " " ` backup ` will be automatically stored when the model is built. " ) for w, wb in zip ( model. weights, self. backup ) : w. assig... | [
-0.030278153717517853,
0.3036912679672241,
0.35564354062080383,
0.7031750679016113,
0.8697457313537598,
-0.546326220035553,
0.7566431760787964,
-0.009299787692725658,
-0.6379794478416443,
0.46833640336990356,
-1.2842117547988892,
0.5290356278419495,
-0.4563961923122406,
0.14170844852924347... |
def madds _ compute ( self, x ) : hook _ list = [ ] self. madds = [ ] for layer in self. model. modules ( ) : if isinstance ( layer, nn. conv2d ) : hook _ list. append ( layer. register _ forward _ hook ( self. _ madds _ conv _ hook ) ) elif isinstance ( layer, nn. linear ) : hook _ list. append ( layer. register _ for... | [
-0.8086881041526794,
0.10530295222997665,
0.5566820502281189,
-0.5564048886299133,
-0.12238624691963196,
0.3770657181739807,
0.18264277279376984,
-0.43565112352371216,
0.5303841233253479,
0.12477269768714905,
0.5881021022796631,
0.8765566945075989,
0.4655833840370178,
1.3470112085342407,
... |
def _ _ init _ _ ( self, input _ size, num _ first _ filters, num _ conv _ nets, kernel _ size = ( 2, 2, 2 ), pool _ size = ( 2, 2, 2 ), ) : self. input _ size _ = input _ size self. num _ first _ filters _ = num _ first _ filters self. num _ conv _ nets _ = num _ conv _ nets self. kernel _ size _ = kernel _ size self.... | [
0.031620919704437256,
0.3477226495742798,
0.5140037536621094,
0.7518071532249451,
0.3282560408115387,
-0.3300315737724304,
0.687786340713501,
-0.3198540210723877,
0.09862805157899857,
-0.595437228679657,
-0.7483707666397095,
0.36214855313301086,
0.30045071244239807,
0.3976501226425171,
-... |
def audit _ street _ type ( street _ types, street _ name ) : m = street _ type _ re. search ( street _ name ) if m : street _ type = m. group ( ) if street _ type not in expected : street _ types [ street _ type ]. add ( street _ name ) | [
0.3683420419692993,
0.4260348975658417,
0.554393470287323,
0.011074104346334934,
0.4634692370891571,
0.2950546443462372,
0.2687082588672638,
0.1130317971110344,
0.19653262197971344,
0.269500195980072,
0.45115333795547485,
0.7601085901260376,
-1.0890878438949585,
1.0515992641448975,
0.570... |
def unispeech _ sat _ local ( ckpt, * args, * * kwargs ) : assert os. path. isfile ( ckpt ) return _ upstreamexpert ( ckpt, * args, * * kwargs ) | [
0.614590585231781,
-0.31903600692749023,
0.40345999598503113,
-0.5554856061935425,
-0.25133565068244934,
0.28583499789237976,
-0.06305171549320221,
0.1612248420715332,
0.17910782992839813,
0.48816752433776855,
-0.15429817140102386,
0.1753634512424469,
0.15237699449062347,
0.108530946075916... |
def test _ error _ reporting _ on _ blueprint _ joblib _ error ( self, mock _ rd ) : pipe = mock. magicmock ( ) sw = secureworker ( worker _ request, pipe ) with mock. patch. multiple ( sw, accept _ job _ request = mock. default, api = mock. default ) as mocks : joblib _ task _ error = mk _ joblib _ exception ( taskerr... | [
-0.07955098897218704,
0.539752185344696,
0.5179107785224915,
0.04256695508956909,
1.0887408256530762,
0.5533321499824524,
0.24214252829551697,
0.8669975996017456,
-0.5280647873878479,
-0.3804575502872467,
-0.6999372839927673,
-0.3628198802471161,
-0.2934630513191223,
0.24499404430389404,
... |
def _ _ init _ _ ( self, pat ) : self. pat = pat m = len ( pat ) r = 256 self. dfa = [ [ 0 for c in range ( 0, m ) ] for r in range ( 0, r ) ] self. dfa [ ord ( pat [ 0 ] ) ] [ 0 ] = 1 x = 0 for j in range ( 1, m ) : # compute dfa [ ] [ j ] for c in range ( 0, r ) : self. dfa [ c ] [ j ] = self. dfa [ c ] [ x ] # copy ... | [
-0.6005989909172058,
0.6623852849006653,
0.5868620276451111,
-0.3500194549560547,
-0.8296935558319092,
-0.9020100831985474,
0.930014431476593,
0.29181426763534546,
1.3801155090332031,
0.12855374813079834,
-0.5393528938293457,
-0.0855034813284874,
-0.1407524049282074,
-0.870703399181366,
... |
def display _ data ( self ) : plt. figure ( ) plt. scatter ( self. data [ :, 0 ], self. data [ :, 1 ] ) plt. show ( ) | [
0.5389921069145203,
0.33006715774536133,
0.5505985617637634,
-0.9628784656524658,
-0.25504446029663086,
1.17179274559021,
0.4775352478027344,
0.35435160994529724,
-0.20959368348121643,
-0.005627117585390806,
0.6944168210029602,
2.414937973022461,
0.8895870447158813,
-0.3357117772102356,
... |
def max _ pool _ 2x2 ( x ) : return tf. nn. max _ pool ( x, ksize = [ 1, 2, 2, 1 ], strides = [ 1, 2, 2, 1 ], padding ='same') | [
0.061649877578020096,
-0.477637380361557,
0.5579636096954346,
0.8183759450912476,
-0.9917995929718018,
0.20251502096652985,
-0.38430914282798767,
-0.5829976201057434,
0.27915769815444946,
0.03224806860089302,
-1.0961121320724487,
0.6590511798858643,
0.9237855672836304,
-0.44742661714553833... |
def testgettaginstancewithintvalue ( self ) : result = tagapi ( self. user ). create ( [ ( u'username / tag ', u'description') ] ) [ ( objectid, path ) ] = result tagvalueapi ( self. user ). set ( { objectid : { u'username / tag': 42 } } ) self. store. commit ( ) with login ( u'username ', uuid4 ( ), self. transact ) a... | [
-0.06704168021678925,
0.3591548204421997,
0.4680194556713104,
-0.34864914417266846,
0.1803848147392273,
0.45098915696144104,
-0.026580672711133957,
-0.8575912117958069,
-0.4897446930408478,
-0.39809638261795044,
-0.7154263854026794,
-0.34040001034736633,
0.07115097343921661,
0.265191555023... |
def preprocess _ external _ request ( req ) : # augment vls with source - destination information for v in req [ " nsd " ] [ " vnfs " ] : if not " cp " in v : continue for c in v [ " cp " ] : if " vnflink " in c : vlid = c [ " vnflink " ] [ " id " ] for vl in req [ " nsd " ] [ " vnflinks " ] : if vl [ " id " ] = = vlid... | [
-1.097929835319519,
0.2620817720890045,
0.7791381478309631,
-0.5182692408561707,
-0.5139366388320923,
-0.5745589733123779,
-0.6941397786140442,
-0.25528380274772644,
0.919593334197998,
0.4093892276287079,
0.07614360004663467,
0.3975663483142853,
0.40758460760116577,
0.4770657420158386,
0... |
def _ _ init _ _ ( self, entity _ id, position = none, label = none ) : self. entity _ id = entity _ id self. position = position self. label = label | [
0.4602620303630829,
-1.3614546060562134,
0.5727099776268005,
-0.3063610792160034,
0.8675292134284973,
0.19821470975875854,
-1.4116109609603882,
0.7659420967102051,
0.43449100852012634,
0.01716986484825611,
-0.1621505171060562,
-0.004837499465793371,
0.3526094853878021,
0.5770893096923828,
... |
def inference ( self, x ) : pre _ trained _ embeddings = np. load ('datasets / clinicalts / basefiles / mort / w2v / final _ embeddings. npy') vocab _ length, embedding _ dimension = pre _ trained _ embeddings. shape print ('embedding matrix dimensions, ', vocab _ length, embedding _ dimension ) embeddings = tf. get _ ... | [
0.15205752849578857,
0.6215895414352417,
0.7956911325454712,
0.5992839932441711,
-0.31930476427078247,
-0.3012755215167999,
1.3440266847610474,
-0.14254401624202728,
-0.4792889356613159,
0.6740838885307312,
-0.40895262360572815,
0.20059506595134735,
0.4216841757297516,
1.1395888328552246,
... |
def calculate _ hash ( filepath, hash _ name ) : hash _ name = hash _ name. lower ( ) if not hasattr ( hashlib, hash _ name ) : raise exception ('hash algorithm not available : { }'\. format ( hash _ name ) ) with open ( filepath,'rb') as f : checksum = getattr ( hashlib, hash _ name ) ( ) for chunk in iter ( lambda : ... | [
1.2241783142089844,
-0.21483227610588074,
0.5787069201469421,
0.16503524780273438,
-0.20844793319702148,
0.5141112804412842,
0.1593770533800125,
0.5696238279342651,
-0.5413268208503723,
0.6178572773933411,
-0.6237919330596924,
-0.10343465209007263,
0.018214523792266846,
0.08541922271251678... |
def process _ parameters ( self, arguments ) : # pylint : disable = too - many - locals arguments _ id = self. create _ ast _ component ( arguments, component. arguments ) self. create _ composition ( arguments _ id, * self. composition _ edge ) arg _ list = [ ] for index, arg in enumerate ( arguments. args ) : self. c... | [
-0.7112633585929871,
0.03945281729102135,
0.6637300848960876,
-0.23655924201011658,
0.7423080205917358,
-1.0628455877304077,
-0.1846476048231125,
0.6583535075187683,
-0.11298823356628418,
0.6971156597137451,
0.09979276359081268,
-0.6338312029838562,
0.07071208208799362,
0.3527938425540924,... |
def resetsession ( self, csdfilename = none ) : if csdfilename and os. path. exists ( csdfilename ) : self. csd = csdfilename if self. csd : self. stopperformance ( ) self. startthread ( ) | [
0.3719654083251953,
-0.5366212725639343,
0.41120028495788574,
0.4611290395259857,
0.35033494234085083,
0.4666329324245453,
0.8690908551216125,
0.2677341103553772,
0.0022714557126164436,
0.18174895644187927,
0.20365218818187714,
0.5726656913757324,
-0.9279292821884155,
-0.2737990915775299,
... |
def remove ( self, val : int ) - > bool : if val not in self. hash _ map : return false index = self. hash _ map [ val ] key = self. queue [ - 1 ] self. queue [ index ] = key self. hash _ map [ key ] = index self. queue. pop ( ) del self. hash _ map [ val ] return true | [
-0.702039361000061,
0.48079997301101685,
0.7510179877281189,
-0.6087613701820374,
-1.2448112964630127,
0.013716847635805607,
-0.091029092669487,
-0.2956288754940033,
0.15850389003753662,
0.6143099665641785,
-0.9339445233345032,
-0.9143223762512207,
-0.7592895030975342,
0.3323800265789032,
... |
def api _ genes ( ) : query = request. args. get ('query') json _ out = controllers. genes _ to _ json ( store, query ) return jsonify ( json _ out ) | [
-1.543288230895996,
-0.07987477630376816,
0.3307623863220215,
-0.40490856766700745,
-0.716381847858429,
-0.6159862279891968,
-0.5947899222373962,
-0.2539699077606201,
-0.5012731552124023,
0.4844581186771393,
-0.22120602428913116,
0.7335100769996643,
0.12074901908636093,
0.1940755695104599,... |
def create _ tf _ transform ( x ) : # make training data xcontent = multithreadmap ( extract _ component, x, component = " content " ) tf = robustscaler ( ). fit ( np. vstack ( xcontent ) ) return ( tf ) | [
0.346571147441864,
0.0402873158454895,
0.16928435862064362,
-0.7720329165458679,
-0.3166236877441406,
-0.46210283041000366,
-0.2864208221435547,
-0.7344448566436768,
-0.24218492209911346,
-0.10366016626358032,
-1.0806866884231567,
-1.1399977207183838,
-0.3405727744102478,
-1.10044240951538... |
def create _ connection ( sqlite _ file ) : try : conn = sqlite3. connect ( sqlite _ file ) return conn except sqlite3. error as error : raise ( " an error has occurred while connecting to the database : ", error. args [ 0 ], ) | [
0.4814142882823944,
0.2513342499732971,
0.23109833896160126,
-0.22021828591823578,
0.001437474857084453,
0.2003811150789261,
-0.5673743486404419,
-0.2074662446975708,
-0.6225491166114807,
0.4579891562461853,
0.834662914276123,
-1.0970979928970337,
-0.713919997215271,
-0.48012444376945496,
... |
def getincrementindex ( self ) : return _ itkimageserieswriterpython. itkimageserieswriterid3id2 _ getincrementindex ( self ) | [
0.06774070858955383,
-0.13796596229076385,
0.2135300487279892,
0.07332752645015717,
-0.18694530427455902,
0.282829612493515,
-0.09788695722818375,
-0.3494167923927307,
-0.2091340571641922,
0.29937300086021423,
-0.7821295857429504,
0.5280643701553345,
-0.3466375172138214,
-0.077382020652294... |
def call ( self, method, * args, * * kwargs ) : def _ call _ method ( ) : self. _ update _ nauth _ token ( method ) method _ to _ call = getattr ( self. _ client ( ), method ) return self. loop. run _ in _ executor ( none, functools. partial ( method _ to _ call, * args, * * kwargs ) ) # do login if no login has been d... | [
-1.1477850675582886,
0.6530274152755737,
0.7882237434387207,
0.24049104750156403,
-0.8405798673629761,
-0.14924508333206177,
-0.8824282884597778,
-1.197860598564148,
0.7177256345748901,
0.19516749680042267,
0.2813495397567749,
0.4052754342556,
-0.38225024938583374,
0.11583109945058823,
0... |
def process _ master ( self, fieldname ) : master = create _ json _ hgf _ record ( self. curdir ) master. add _ jsondict ( fieldname ) master. write _ json ( fieldname ) | [
-0.8518131375312805,
-0.03957502171397209,
0.587020993232727,
-0.8270615339279175,
0.18306775391101837,
-0.32598981261253357,
0.3654624819755554,
0.8553363084793091,
-0.6724940538406372,
-0.28646886348724365,
-1.053663969039917,
0.02572542428970337,
-0.027807055041193962,
0.067190654575824... |
def end _ time ( self ) - > optional [ pulumi. input [ str ] ] : return pulumi. get ( self, " end _ time " ) | [
0.4915730357170105,
0.30011454224586487,
0.3553318977355957,
0.28353068232536316,
1.1673959493637085,
1.4202420711517334,
-0.5531660318374634,
0.21632428467273712,
0.4297885596752167,
0.861047625541687,
-0.08173388987779617,
0.5593971014022827,
-0.5985883474349976,
-0.4403495788574219,
-... |
def plot ( month : str, year : int ) - > none : df = pd. dataframe ( fire _ data _ by _ month ( year, month ) ) # store the fire data map = gpd. read _ file ('ca _ counties. shp') # read the shape file of california in project folder using geopandas fig, ax = plt. subplots ( figsize = ( 8, 8 ) ) # set the size of the f... | [
0.9164375066757202,
-0.10882523655891418,
0.8148592114448547,
-0.3509954810142517,
-0.8032354116439819,
0.8835973739624023,
0.12900260090827942,
0.977760374546051,
-0.200011745095253,
-0.374894380569458,
0.4823235869407654,
1.762208342552185,
0.10248139500617981,
-0.013417381793260574,
1... |
def parse _ title ( title : str ) : fixed = whitespace _ regex. sub ( " ", title. strip ( ) ) if fixed : return fixed else : raise valueerror ( " posttitle cannot contain only whitespace. " ) | [
0.6379507780075073,
0.3423171937465668,
0.45462143421173096,
-0.1144537553191185,
-0.8116979598999023,
0.2756427228450775,
-0.6600111722946167,
0.9077425003051758,
-0.24023385345935822,
-0.028832174837589264,
0.13068297505378723,
-0.10322175174951553,
-0.8766342401504517,
-0.23062463104724... |
def isacceptablesize ( image, blocksize ) : height = len ( image ) width = len ( image [ 1 ] ) if ( width / blocksize ) > = 2 and ( height / blocksize ) > = 2 : return true return false | [
-0.1676623374223709,
0.1344025880098343,
0.9341200590133667,
0.5699357986450195,
-1.9183706045150757,
-0.1574873924255371,
-0.19442233443260193,
0.00013412369298748672,
-0.215054452419281,
1.026612639427185,
0.18625929951667786,
0.4927193820476532,
-0.6506829261779785,
0.6278817653656006,
... |
def has _ item ( self, item ) : return item in self. items | [
-0.19447755813598633,
-0.2869519591331482,
0.17315688729286194,
0.14252084493637085,
0.7101450562477112,
0.7655556201934814,
-0.6032081246376038,
0.30001991987228394,
-0.12125860154628754,
-0.5189275741577148,
-0.796475887298584,
-0.453715980052948,
-0.2118818312883377,
-0.2306694686412811... |
def status _ unreblog ( self, id : union [ status, idtype ] ) - > status : id = self. _ _ unpack _ id ( id ) return self. _ _ api _ request ('post ', f'/ api / v1 / statuses / { id } / unreblog') | [
-0.7154625058174133,
0.26416847109794617,
0.23204217851161957,
0.023336568847298622,
-0.2590886354446411,
-0.5798769593238831,
-0.23811066150665283,
0.7827276587486267,
0.58226478099823,
0.08554787188768387,
-1.2751821279525757,
0.5024707317352295,
-0.3284543454647064,
-0.4125727713108063,... |
def get _ or _ create ( self, * args, * * kwargs ) : # real signature unknown pass | [
-0.35376912355422974,
-0.007556285709142685,
0.4230896830558777,
0.5073080658912659,
2.0352401733398438,
-0.022263946011662483,
-0.3029707074165344,
-0.8203378319740295,
0.12211152911186218,
-0.301879346370697,
-0.3221713602542877,
-0.3376763164997101,
-0.0054196929559111595,
0.24563236534... |
def custom _ api _ call ( self, text, channel ) : try : self. webhooksetting ( ) if len ( channel ) = = 0 : channel = self. defchannel var = self. sc. api _ call ( " channels. list " ) length = len ( var ['channels'] ) for iterator in range ( 0, length ) : # getting rid of # for comparison if channel [ 1 : ] = = var ['... | [
-0.05161212012171745,
-0.22696851193904877,
0.5868783593177795,
-0.1332542896270752,
-0.07654336839914322,
-0.38029977679252625,
-1.0894498825073242,
0.4763619899749756,
-0.00270379357971251,
0.9912071824073792,
-0.15115277469158173,
1.0491310358047485,
-1.0931330919265747,
0.8285355567932... |
def install _ code _ on _ cloud ( package _ name : str, # project package name, e. g. metagentools or git + https : / / github. com / repo. git @ main quiet : bool = false # install quietly with trud ) : machine = currentmachine ( ) if machine. is _ colab : cloud = true print ('the notebook is running on colab. ', end ... | [
-0.049294404685497284,
0.9939191341400146,
0.6465314626693726,
0.6122635006904602,
0.8737098574638367,
0.5110994577407837,
-0.4266347885131836,
0.33133742213249207,
-1.1855288743972778,
1.1165845394134521,
0.1840047985315323,
0.20328351855278015,
-0.441842257976532,
0.36614465713500977,
... |
def test _ is _ ending _ soon _ with _ project _ not _ ending _ soon ( self ) : project = project ( end _ date = timezone. now ( ) + datetime. timedelta ( days = 30 ) ) self. assertequal ( project. is _ ending _ soon ( ), false, " soon is a relative concept anyway... " ) | [
-0.6748080849647522,
0.568264901638031,
0.3407902419567108,
0.23511584103107452,
0.22712431848049164,
1.5655338764190674,
-0.8447466492652893,
-0.2761581540107727,
-0.3115770220756531,
-0.4437488615512848,
0.24745917320251465,
-0.17032845318317413,
-0.5457680821418762,
1.2058277130126953,
... |
def test _ query _ single _ realtime _ db ( self ) : def mock _ get _ realtime _ db _ config ( db ) : return { " bar _ size " : " 15 min ", " fields " : [ " lastclose ", " lastopen ", " lasthigh ", " lastlow ", " volumeclose " ] } def mock _ download _ market _ data _ file ( code, f, * args, * * kwargs ) : prices = pd.... | [
0.27442580461502075,
0.1324896365404129,
0.8129008412361145,
-0.00016256033268291503,
0.2672293782234192,
-0.000531001656781882,
0.6465123891830444,
-0.133133664727211,
0.30973726511001587,
-0.1351316273212433,
-0.44032394886016846,
-0.6053969860076904,
-0.6483675241470337,
0.1913255900144... |
def show _ yolo _ detection ( image _ path, predict _ output, imdb, object _ thresh = 0. 5 ) : im = np. array ( image. open ( image _ path ), dtype = np. uint8 ) im _ h, im _ w, _ = im. shape # create figure and axes fig, ax = plt. subplots ( 1 ) ax. imshow ( im ) num _ class = imdb. num _ class offset = cfg. yolo _ gr... | [
0.20057256519794464,
-0.3341006934642792,
1.0524039268493652,
0.39350730180740356,
-0.4820351302623749,
-0.06637615710496902,
1.2680623531341553,
0.1407434195280075,
-0.5159043669700623,
0.1687317192554474,
0.1504327356815338,
0.9448441863059998,
0.8419652581214905,
0.45970019698143005,
... |
def average _ lifetime ( obs, traj _ cols = ['replicate'] ) : true _ ends = obs [ ~ np. isclose ( obs ['end _ time'], obs ['window _ size'] ) ] # the number of start times of each state are highly # correlated estimators of the total number of " start times " # of the full process that cycles. we combine them all to # ... | [
-0.3108313977718353,
0.586654007434845,
0.7386348247528076,
-0.9959765672683716,
-0.3423723876476288,
-0.2338254451751709,
0.47801700234413147,
-0.22779881954193115,
-0.14887748658657074,
1.1949920654296875,
-0.03119480237364769,
1.0219135284423828,
0.6507256627082825,
-0.05981450155377388... |
def _ assertallcommandswererunproperly ( cls ) : # stdout and stderr must be closed for cmd in cls. _ finished _ commands : assert not cmd. stdout or cmd. stdout. closed, ('stdout was not closed for'' command : % s'% ( cmd. _ cmd, ) ) assert not cmd. stderr or cmd. stderr. closed, ('stderr was not closed for'' command ... | [
-0.9313216209411621,
-0.7342448234558105,
0.6645197868347168,
-0.4517105221748352,
0.2851998507976532,
0.8179821372032166,
0.5038109421730042,
0.1320524513721466,
-0.09314028173685074,
-0.8916680812835693,
0.3853147029876709,
0.30533477663993835,
-0.19771504402160645,
0.9640375375747681,
... |
def _ _ del _ _ ( self ) : if self. _ lock. acquire ( true, 10 ) : try : for key in self. _ variables : del self. _ variables [ key ] except : return false finally : self. _ lock. release ( ) del self. _ variables del self. _ lock | [
0.17989017069339752,
0.26743143796920776,
0.7126592993736267,
-1.3538618087768555,
0.03785618767142296,
-0.4441504180431366,
-0.05660102143883705,
-0.3360200524330139,
-0.03136812523007393,
0.03589021414518356,
-0.35017621517181396,
-0.5406821370124817,
-1.2285706996917725,
-0.193853288888... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.