text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def reset ( self ) : logging. info ( " keithley. reset ( ) called. " ) self. keithley. reset ( ) logging. info ( " keithley. reset ( ) done. " ) return true | [
-0.4027000963687897,
0.6208577156066895,
0.5660517811775208,
0.35887280106544495,
0.7925597429275513,
-0.7926806807518005,
-0.22039902210235596,
-0.25396862626075745,
-0.6236512064933777,
0.46715736389160156,
-0.9636127352714539,
-0.19667163491249084,
-0.5963817834854126,
-0.15548062324523... |
def update _ bootstrap ( tag = none ) : repo ='https : / / github. com / twitter / bootstrap'with settings ( warn _ only = true ) : # delete bootstrap from the tmp location if not files. exists ('~ / src') : print " file doesn't exist " run ('mkdir ~ / src') if not files. exists ('~ / src / bootstrap') : run ('cd ~ / s... | [
0.5095646977424622,
-0.7322202920913696,
0.5574558973312378,
0.01538696140050888,
-0.13219031691551208,
0.31733378767967224,
0.39455270767211914,
0.4038614332675934,
0.28078246116638184,
0.49858543276786804,
-0.5970495343208313,
0.004555920138955116,
-0.5812906622886658,
0.5490120649337769... |
def _ _ init _ _ ( self, env _ args : easydict, train _ args : easydict, algo _ args : easydict ) : self. env _ args = env _ args self. train _ args = train _ args self. algo _ args = algo _ args set _ global _ seeds ( self. train _ args. seed ) # env self. env = make _ env ( self. env _ args ) # logger. info ( self. e... | [
0.16167591512203217,
-0.3021585941314697,
0.7407115697860718,
0.1301112174987793,
0.33375033736228943,
0.1745467334985733,
0.33854296803474426,
0.5811654329299927,
-0.2007710486650467,
0.990778386592865,
0.007977710105478764,
0.7357288599014282,
0.33626753091812134,
0.4836256206035614,
0... |
def posterior _ cont _ type _ decode _ corpus ( self, dataset, rep _ dataset, logger = none ) : if self. posttypes is none : if self. dirname is not none : assert len ( dataset. wordrep _ dict ) = = len ( rep _ dataset. x _ dict ) posttype _ f = " { } posttype. npy ". format ( self. dirname ) self. posttypes = np. load... | [
-0.6204202175140381,
-0.5669084787368774,
0.5104026198387146,
-0.9936898350715637,
-0.20551584661006927,
-0.10877632349729538,
0.022761985659599304,
0.9315773844718933,
-0.40935036540031433,
0.5876377820968628,
-0.32181864976882935,
0.6579368710517883,
-0.40442028641700745,
0.6344358325004... |
def _ image _ getcorrelatednoise ( image ) : depr ('getcorrelatednoise ', 1. 1,'noise = galsim. correlatednoise ( image )') return correlatednoise ( image ) | [
0.9297425150871277,
-0.24966365098953247,
0.15101797878742218,
-0.2142464965581894,
-0.043587200343608856,
-0.3054371178150177,
0.45066797733306885,
-1.2580960988998413,
0.18931080400943756,
-0.23466163873672485,
0.31482917070388794,
-0.11179863661527634,
-0.4299754500389099,
0.23168613016... |
def _ list _ notes ( text : str, user : karmauser ) - > str : notes = _ get _ notes _ for _ user ( user ) if not notes : return ( f " sorry { user. username }, you don't have any notes so far! " f " just start adding notes via the'note add'command. " ) msg = " \ n ". join ( f " { i + 1 }. note { str ( note ) } " for i,... | [
0.1925453394651413,
-0.13563601672649384,
0.474035382270813,
-0.0036527689080685377,
0.07123462110757828,
-0.46192798018455505,
-0.4724915325641632,
-0.6449542045593262,
0.2222449630498886,
0.4901467263698578,
0.31143325567245483,
1.2301902770996094,
-0.2755908668041229,
0.0424697957932949... |
def test _ list _ integer _ max _ length _ 3 _ nistxml _ sv _ iv _ list _ integer _ max _ length _ 4 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / integer / schema + instance / nistschema - sv - iv - list - integer - maxlength - 4. xsd ", instance = " nistdata / list / ... | [
-0.4644341468811035,
0.07689505815505981,
0.2038085013628006,
0.8732971549034119,
-0.49655136466026306,
0.4417276978492737,
-0.7174204587936401,
0.44879859685897827,
1.1192212104797363,
0.8909063339233398,
-0.909835159778595,
-0.5868675708770752,
-0.5164738893508911,
0.18862871825695038,
... |
def remove _ policy ( self, sec, ptype, rule ) : raise runtimeerror ( " not implemented " ) | [
0.2454347461462021,
0.0936579555273056,
0.23733729124069214,
0.6166070699691772,
0.6458370685577393,
1.2761530876159668,
-0.0843963772058487,
0.3725498914718628,
0.044364672154188156,
0.991948664188385,
0.017785072326660156,
0.29436975717544556,
-1.2094172239303589,
0.09083421528339386,
... |
def extra _ state _ attributes ( self ) : return self. _ attributes | [
-0.7811419367790222,
-0.41974952816963196,
0.41452351212501526,
-0.2150101661682129,
-0.9456098675727844,
0.6652616858482361,
-0.11001851409673691,
0.49101442098617554,
0.744428813457489,
-0.31703421473503113,
-1.0567506551742554,
-0.44710007309913635,
-0.3649580776691437,
0.06734744459390... |
def test _ atomic _ base64 _ binary _ min _ length _ 3 _ nistxml _ sv _ iv _ atomic _ base64 _ binary _ min _ length _ 4 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / base64binary / schema + instance / nistschema - sv - iv - atomic - base64binary - minlength - 4. xsd ... | [
0.5207497477531433,
-0.23674176633358002,
0.38600680232048035,
0.7549095749855042,
0.06329125165939331,
0.015131148509681225,
-0.1390495002269745,
-0.5700634121894836,
0.26760920882225037,
0.09534445405006409,
-0.4597611427307129,
-0.254917711019516,
-1.05430269241333,
-0.24668006598949432... |
def remove _ words _ start _ with ( text, starts _ with _ char ) : urls = re. finditer ( starts _ with _ char + r'[ a - za - z0 - 9 \ w ] * ', text ) for i in urls : text = re. sub ( i. group ( ). strip ( ),'', text ) return text. strip ( ) | [
0.6806704998016357,
-1.0540987253189087,
0.4154256284236908,
-0.905994713306427,
-0.722620964050293,
-0.3963034451007843,
-0.07327739894390106,
0.9999289512634277,
0.5171477794647217,
0.7249520421028137,
-0.5597456693649292,
0.8034920692443848,
-0.6877541542053223,
0.13678590953350067,
-... |
def do _ get _ server _ by _ id ( self, sid ) : if sid is not none : global token global pp headers = { " region " : datacenter, " x - auth - token " : token } custom _ url = dct [ datacenter ] +'/ servers /'+ sid r = requests. get ( custom _ url, headers = headers ) if r. status _ code = = 200 : global pp # pp. pprint... | [
-0.46840354800224304,
-0.3243677318096161,
1.0113909244537354,
-0.6429467797279358,
0.19853080809116364,
-0.48973390460014343,
-0.21539342403411865,
0.03344959765672684,
0.9486575722694397,
-0.10703813284635544,
-0.5001481771469116,
1.2373017072677612,
-0.6541382670402527,
0.70813167095184... |
def test _ example _ input _ one _ delete _ valid _ title ( self, ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper, add _ input _ one ) : input _ page = inputpage ( ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) input _ page. table. delete _ row ( " dummy _ input _ one ", prompt _ msg = ... | [
0.2690921723842621,
0.49796247482299805,
0.6002176403999329,
0.8380890488624573,
-0.12949804961681366,
0.4962310194969177,
-0.4311895966529846,
0.1048860028386116,
0.9495856761932373,
0.19123436510562897,
0.35682785511016846,
-0.33544182777404785,
-0.15524570643901825,
0.2958701550960541,
... |
def media _ artist ( self ) - > str | none : if self. _ currently _ playing. get ( " item " ) is none : return none return ", ". join ( artist [ " name " ] for artist in self. _ currently _ playing [ " item " ] [ " artists " ] ) | [
-0.5234750509262085,
-1.870680570602417,
0.24236854910850525,
-0.5167076587677002,
0.3033621907234192,
-0.25257956981658936,
-0.7743496894836426,
-0.2862282991409302,
0.6863874793052673,
0.7838413119316101,
0.6260267496109009,
0.3957637548446655,
-0.6131041646003723,
-0.13116666674613953,
... |
def update ( self ) : self. node _ to _ qnode ( self. db. nodes. values ( ) ) | [
-1.0338549613952637,
-0.2732904553413391,
0.054489996284246445,
-1.249442219734192,
0.1599511057138443,
0.34283795952796936,
-0.446433424949646,
0.2593080401420593,
-0.2365792840719223,
0.824783205986023,
-0.11652488261461258,
0.896604597568512,
0.1142788827419281,
-0.11617526412010193,
... |
def function4 ( a, b ) : # this is not comment, example of docstring average = ( a + b ) / 2 # print ( " average is ", average ) return average | [
-0.11650611460208893,
-0.9431359767913818,
0.3644372820854187,
0.7167208790779114,
-0.2956116795539856,
0.08828447759151459,
0.4128093123435974,
-0.5698414444923401,
-0.18055081367492676,
0.4259103536605835,
-0.07456221431493759,
1.4987417459487915,
-0.3766203224658966,
0.02752874605357647... |
def test _ returns _ densest ( self, graph, monkeypatch ) : adj = ( ( 0, 1, 0, 1, 1, 0 ), ( 1, 0, 1, 1, 1, 0 ), ( 0, 1, 0, 1, 0, 0 ), ( 1, 1, 1, 0, 1, 0 ), ( 1, 1, 0, 1, 0, 0 ), ( 0, 0, 0, 0, 0, 0 ), ) graph = nx. graph ( 0. 5 * np. array ( adj ) ) # multiply by 0. 5 to follow weightings of adj fixture optimal _ densit... | [
-0.08976023644208908,
0.6740787625312805,
0.6613667011260986,
0.4820854365825653,
0.5171731114387512,
-0.26986241340637207,
0.30251604318618774,
-0.729705274105072,
0.4872616231441498,
-0.15907366573810577,
-0.13913460075855255,
-0.12865275144577026,
-0.33185452222824097,
-0.24737326800823... |
def create _ db ( ) : db. create _ all ( ) | [
0.5662270784378052,
0.9787799119949341,
0.33674389123916626,
1.271219253540039,
1.893252968788147,
1.1204925775527954,
-0.40610164403915405,
0.05247454717755318,
-0.48267173767089844,
-0.27229705452919006,
-0.43902450799942017,
-0.2428051084280014,
-0.2675739824771881,
0.9380408525466919,
... |
def img2img _ transformer _ base _ tpu ( ) : hparams = img2img _ transformer _ base ( ) update _ hparams _ for _ tpu ( hparams ) hparams. batch _ size = 2 hparams. num _ heads = 4 # heads are expensive on tpu hparams. num _ decoder _ layers = 8 hparams. num _ encoder _ layers = 4 hparams. shared _ embedding _ and _ sof... | [
-0.7122195959091187,
-0.15715225040912628,
0.5406503081321716,
-0.18300361931324005,
0.21722601354122162,
-0.666637122631073,
0.00587649317458272,
0.21026812493801117,
-1.0096533298492432,
0.30275824666023254,
-0.21510402858257294,
-0.564275324344635,
-0.3098817765712738,
0.673879325389862... |
def singleton ( cls ) : factory = singletonfactory ( cls, _ threading. rlock ( ) ) return factory ( ) | [
-0.3111521899700165,
-0.19339855015277863,
0.21124820411205292,
0.1539241522550583,
0.21039673686027527,
-0.2382081300020218,
1.3169745206832886,
-0.1418280303478241,
0.9723791480064392,
-1.3405996561050415,
-0.15909717977046967,
0.13112019002437592,
-0.9891062378883362,
-0.729911804199218... |
def update ( self, direction, dt, game ) : if self. _ generate : self. _ randomfire ( ) self. _ generate = false self. _ moveship ( direction ) self. _ alientime ( dt ) self. _ createbolt ( game ) self. _ movebolts ( ) self. _ aliencollison ( ) self. _ shipcollison ( ) self. _ alienbelowdefense ( ) self. _ aliengone ( ... | [
-1.2191754579544067,
-0.09368124604225159,
0.5020018815994263,
0.2475828379392624,
0.2747247815132141,
-0.006003418006002903,
-0.6458483338356018,
-0.8976771831512451,
-0.4959068298339844,
0.2572624385356903,
-0.22426852583885193,
-0.6271936893463135,
0.332368940114975,
0.5437116026878357,... |
def _ key _ in _ set ( key, keys, keys _ regex = false ) : if keys _ regex : return any ( re. compile ( k ). match ( key ) for k in keys ) else : return key in keys | [
-0.5648540258407593,
0.10051038861274719,
0.2990504801273346,
-0.5911393761634827,
-0.17785215377807617,
-0.6898264288902283,
-1.5980218648910522,
0.7064281105995178,
-1.3598096370697021,
0.681479811668396,
0.33008015155792236,
-0.14801529049873352,
-0.6453481912612915,
-0.3275407552719116... |
def test _ list _ decimal _ max _ length _ 2 _ nistxml _ sv _ iv _ list _ decimal _ max _ length _ 3 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / decimal / schema + instance / nistschema - sv - iv - list - decimal - maxlength - 3. xsd ", instance = " nistdata / list / ... | [
-0.000038176316593308,
0.08812861144542694,
0.44516506791114807,
0.657855212688446,
0.08327621966600418,
0.15954603254795074,
-0.9124103784561157,
0.22757963836193085,
1.076013445854187,
0.18837833404541016,
-1.007602334022522,
-0.3932836353778839,
0.08048605918884277,
0.04549221321940422,... |
def get _ component _ info ( instance _ name ) : component _ info = none xpath = ( " d, / rw - base : vcs " " / info " " / components " " / component _ info [ instance _ name ='{ }'] ". format ( instance _ name ) ) iter _ resp = yield from self. _ dts. query _ read ( xpath = xpath, flags = rwdts. xactflag. merge ) for ... | [
-0.3224351406097412,
-0.6073052287101746,
0.6652707457542419,
-1.172525405883789,
0.44689875841140747,
-0.15430404245853424,
0.042705126106739044,
-0.8859872221946716,
0.01659616082906723,
-0.1212775707244873,
-0.1106347069144249,
-0.28751257061958313,
0.11378471553325653,
0.14732474088668... |
def remove _ s3 _ files ( self, s3, buck _ name, script _ folder ) : bucket = s3. bucket ( buck _ name ) bucket. objects. filter ( prefix = script _ folder ). delete ( ) | [
0.2817467153072357,
-0.2776980698108673,
0.5290322303771973,
-0.027602028101682663,
-0.14212675392627716,
-0.1612403690814972,
0.10303805023431778,
0.4427242577075958,
0.1924816370010376,
1.2346538305282593,
-0.9921482801437378,
0.5021432638168335,
-0.26151251792907715,
0.04063934460282326... |
def test _ graph _ size _ has _ div _ 0 _ error ( self ) : graph = nx. graph ( ) for i in xrange ( 5 ) : graph. add _ node ( i ) # nodes, no edges self. assertraises ( exception, uis _ wr. estimate _ size, graph ) | [
0.22003772854804993,
1.8171329498291016,
0.48132118582725525,
0.24792684614658356,
0.35401543974876404,
0.5983201861381531,
0.8880096077919006,
-0.3966600298881531,
-0.23996062576770782,
-0.2781260013580322,
-0.15714630484580994,
-0.1066722422838211,
-0.8427098393440247,
0.9980480074882507... |
def eval _ to _ ast ( self, e, n, extra _ constraints = ( ), exact = none ) : return self. _ solver. eval _ to _ ast ( e, n, extra _ constraints = self. _ adjust _ constraint _ list ( extra _ constraints ), exact = exact ) | [
-1.4264516830444336,
-0.031040163710713387,
0.4576537609100342,
-0.9865914583206177,
-0.20041963458061218,
-0.6154400110244751,
-0.2998378276824951,
0.17746926844120026,
0.5676097869873047,
0.950238823890686,
-0.9183984398841858,
-0.01512040663510561,
0.5041307806968689,
-0.115807831287384... |
def go _ forward ( self ) : if self. month < 12 : self. month + = 1 else : self. month = 1 self. year + = 1 # self. selected = ( self. month, self. year ) self. reset ( ) self. setup ( self. year, self. month ) | [
-0.2674280107021332,
0.20513635873794556,
0.3442995548248291,
-0.33677375316619873,
-0.09043675661087036,
0.32623395323753357,
0.9824365377426147,
0.012661640532314777,
0.46443885564804077,
-0.8994179964065552,
0.13929738104343414,
0.9908642172813416,
-0.036429088562726974,
0.0085326367989... |
def getresults ( this ) : output = [ ] for n in this. network [ - 1 ] : # output layer'''optional if threshold is desired if n > 0. 5 : output. append ( 1. 0 ) else : output. append ( 0. 0 )'''output. append ( n ) return list ( output ) | [
-0.4847332835197449,
-0.3992883861064911,
0.5132400989532471,
0.8699643015861511,
0.9088269472122192,
-0.634563148021698,
0.03687005862593651,
-0.7734571099281311,
-0.5978506803512573,
-0.30520981550216675,
-0.46252545714378357,
-0.6858665943145752,
-0.7810978293418884,
1.0443750619888306,... |
def update _ products _ in _ shopify ( self, instance, templates, is _ set _ price, is _ set _ images, is _ publish, is _ set _ basic _ detail ) : common _ log _ obj = self. env [ " common. log. book. ept " ] common _ log _ line _ obj = self. env [ " common. log. lines. ept " ] model = " shopify. product. product. ept ... | [
-1.3470553159713745,
-0.3658425807952881,
0.649316132068634,
0.2984238862991333,
0.41507259011268616,
0.6259506940841675,
-0.03597563877701759,
-0.6280904412269592,
0.0949043333530426,
0.9033530950546265,
-1.0691936016082764,
-0.33750754594802856,
-0.10222739726305008,
0.6289578080177307,
... |
def init _ hook ( conduit ) : global verbose, socket _ timeout, dl _ timeout, max _ threads global servers _ per _ repo, threads _ per _ server if hasattr ( conduit,'registerpackagename') : conduit. registerpackagename ( " yum - plugin - multithread " ) verbose = conduit. confbool ('main ','verbose ', default = false )... | [
0.6429608464241028,
0.49102362990379333,
0.6928017139434814,
-0.205100417137146,
0.9617540240287781,
-0.13300766050815582,
-0.34746673703193665,
0.5081523060798645,
0.4985891878604889,
0.14278997480869293,
-0.6977424621582031,
0.7503102421760559,
-0.2471321076154709,
0.8642510175704956,
... |
def to _ lower ( doc : str ) - > str : return str ( doc ). lower ( ) | [
0.693790078163147,
-0.6627175807952881,
0.24748624861240387,
-0.5748763680458069,
-0.3242521286010742,
0.1314016878604889,
-0.33183401823043823,
-1.0924584865570068,
0.06282266974449158,
0.027753977105021477,
0.21679683029651642,
0.1347685009241104,
-1.3207987546920776,
-0.402883917093277,... |
def get _ list _ of _ each _ commit ( list _ of _ commit _ strings ) : list _ of _ each _ commit = [ ] for commit _ string in list _ of _ commit _ strings : commits = commit _ string. split ( " \ n " ) commits [ : ] = [ item for item in commits if item! ='' ] commits [ : ] = [ item for item in commits if item! ='- - - ... | [
0.5488646626472473,
-1.5979764461517334,
0.7037264108657837,
-0.004195891786366701,
0.39702069759368896,
0.2910582721233368,
-0.49698901176452637,
1.0260893106460571,
-0.4101363718509674,
0.5483585596084595,
0.03584824502468109,
0.23578903079032898,
-0.9123472571372986,
0.7049505114555359,... |
def packagename ( namespace ) : dot = namespace. rfind ( ". " ) if dot = = - 1 : return none else : return namespace [ 0 : dot ] | [
-0.5196643471717834,
-0.26073798537254333,
0.33757728338241577,
0.10807348042726517,
-0.4554907977581024,
-1.1636515855789185,
-0.4297949969768524,
-0.9837239384651184,
1.277673602104187,
0.6357935070991516,
0.5893884897232056,
-0.352631151676178,
0.2490873634815216,
-0.23172810673713684,
... |
def draw _ top _ left ( x = 1, y = 1 ) : print ( " { } { } ; { } ". format ( csi, y, x ), end = " ", flush = true ) | [
0.82598477602005,
-0.20141802728176117,
0.5909203290939331,
-0.6751078963279724,
-0.38711783289909363,
0.6766647696495056,
-0.6845155954360962,
-0.5995782017707825,
0.5343196392059326,
-0.028499120846390724,
0.08611692488193512,
0.6675612330436707,
-0.17629952728748322,
0.1715681254863739,... |
def createunostruct ( ctypename ) : ocorereflection = getcorereflection ( ) # get the idl class for the type name oxidlclass = ocorereflection. forname ( ctypename ) # create the struct. oreturnvalue, ostruct = oxidlclass. createobject ( none ) return ostruct | [
-0.8671854734420776,
-0.28081580996513367,
0.5139337182044983,
-0.8277328014373779,
-0.11905479431152344,
-0.11245967447757721,
0.7993555068969727,
-0.8873692750930786,
1.0473480224609375,
-0.8616117238998413,
-0.5834001898765564,
-0.4898300766944885,
-0.9149261116981506,
-1.09205651283264... |
async def async _ added _ to _ hass ( self ) - > none : await super ( ). async _ added _ to _ hass ( ) # conduct the initial update. await self. async _ update ( ) | [
0.2812247574329376,
0.3057665228843689,
0.581753134727478,
0.31595271825790405,
1.2915817499160767,
-0.32292068004608154,
-0.8046804070472717,
0.3413022756576538,
0.9709893465042114,
-0.2858034670352936,
-0.3682319223880768,
0.8510157465934753,
0.863638162612915,
0.43535417318344116,
0.1... |
def get _ ext _ input ( i _ max, i _ period, current _ type, t _ total, input _ length ) : if current _ type = = " constant " : return i _ max elif current _ type = = " sine " : time = np. linspace ( 0, t _ total, input _ length ) return i _ max * np. sin ( 2 * np. pi * time * ( 1. 0 / i _ period ) ) elif current _ typ... | [
-0.17500413954257965,
-0.2989928424358368,
0.909849226474762,
0.1525600403547287,
-0.6963099837303162,
0.43269503116607666,
0.007047079503536224,
-0.2430179864168167,
0.43763992190361023,
0.9770954847335815,
-0.1592482030391693,
0.6028276681900024,
-0.5757797956466675,
-0.7132244110107422,... |
def get _ fbvs _ max _ size ( self, graph : graph, k : int ) - > set : pass | [
0.6470476984977722,
0.9770165681838989,
0.44768646359443665,
1.7098121643066406,
0.059365276247262955,
-0.814906656742096,
-0.5662025809288025,
-0.4667662978172302,
-0.4811205565929413,
-0.16361841559410095,
0.05222942307591438,
-0.01951226405799389,
-0.4585984945297241,
-0.206815317273139... |
def _ clear _ read _ buffer ( self ) : # type : ( ) - > none self. _ read _ position = 0 self. _ read _ buffer. seek ( 0 ) self. _ read _ buffer. truncate ( 0 ) | [
0.5680165886878967,
-0.644853949546814,
0.4823172986507416,
-0.664423942565918,
0.3456824719905853,
0.6005342602729797,
0.3602043688297272,
0.06753243505954742,
-0.2764451205730438,
-0.645526647567749,
0.7015136480331421,
0.8167102932929993,
-0.05374148488044739,
-0.7369267344474792,
0.7... |
def stop ( self ) : self. _ stop _ event. set ( ) | [
-0.18017315864562988,
-0.028065072372555733,
0.08145950734615326,
-0.012513875961303711,
0.4080083668231964,
0.6304792761802673,
0.5045675039291382,
0.874537467956543,
-1.3023755550384521,
0.1956086903810501,
-0.9704470634460449,
1.100278615951538,
-0.0032880157232284546,
-0.06820814311504... |
def _ _ init _ _ ( self, xx, yy, * * params ) : param. parameterized. _ _ init _ _ ( self, * * params ) assert numpy. shape ( xx ) [ 0 ] = = numpy. shape ( yy ) [ 0 ] ( self. num _ pres, self. kernel _ size ) = numpy. shape ( xx ) ( self. num _ pres, self. num _ neurons ) = numpy. shape ( yy ) self. x = theano. shared ... | [
0.15094250440597534,
0.19037331640720367,
1.2473729848861694,
0.6979303956031799,
-0.11245444416999817,
-0.28224626183509827,
0.383319616317749,
0.23130743205547333,
-0.4665268063545227,
0.5160182118415833,
-0.6357684135437012,
0.41804251074790955,
0.7711254358291626,
0.5092036128044128,
... |
def test _ list _ integer _ enumeration _ nistxml _ sv _ iv _ list _ integer _ enumeration _ 1 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / integer / schema + instance / nistschema - sv - iv - list - integer - enumeration - 1. xsd ", instance = " nistdata / list / inte... | [
-1.0386707782745361,
-0.704508364200592,
0.4707348048686981,
0.6011190414428711,
-0.2163669615983963,
-0.21565581858158112,
0.22709400951862335,
0.768195390701294,
1.5780187845230103,
0.8457930684089661,
-0.6086617112159729,
-0.3244195282459259,
-0.4421631395816803,
0.8141235113143921,
0... |
def setup ( self ) : print ('\ n \ nsetting up test pre - conditions with a " valid " api key and a " valid " api base url.') # set of valid inputs self. api _ key ='this _ is _ a _ valid _ api _ key'self. base _ url ='https : / / oti. slashnext. cloud / api'self. host ='www. google. com'# set of valid expected outputs... | [
0.3630906045436859,
-0.039941780269145966,
0.674065351486206,
-0.2990138530731201,
0.8946489095687866,
-0.0330127514898777,
0.25980713963508606,
-0.05324728414416313,
-0.7992058396339417,
-0.2051958590745926,
-0.1820376217365265,
0.032016508281230927,
-0.8448039889335632,
0.174006104469299... |
def fitandevaluate ( fitdata, vn, solver, poly = none ) : if poly is none : poly = par0 # perform zip fit. coeff = zipfit ( v = fitdata ['v'], p = fitdata ['p'], q = fitdata ['q'], vn = vn, solver = solver, par0 = poly ) # evaluate the zip fit pest, qest = gldzip ( v = fitdata ['v'], coeff = coeff, vn = vn ) # compute ... | [
0.3824712038040161,
-1.34126615524292,
0.44746312499046326,
-0.5616880655288696,
-0.16687846183776855,
-0.145693838596344,
-0.6927201747894287,
0.149837464094162,
0.48779892921447754,
-0.4427839517593384,
-0.677360475063324,
0.30398258566856384,
-0.5112560987472534,
-0.016677992418408394,
... |
def _ compute _ date ( self ) : t = datetime. datetime. now ( ) date = int ( t. hour * 3600 * 1000 + t. minute * 60 * 1000 + t. second * 1000 + t. microsecond / 1000 ) return date, t | [
0.06204083189368248,
-0.44365349411964417,
0.5702923536300659,
-0.21473558247089386,
-0.5035508871078491,
-0.22727084159851074,
-0.5567352175712585,
0.5636351704597473,
-0.4135235548019409,
0.6889711022377014,
-1.105071783065796,
0.006977939512580633,
0.23930972814559937,
0.801860451698303... |
def get _ kl _ z ( self ) : # formula : 0. 5 * sum ( 1 + log ( sigma ^ 2 ) - mu ^ 2 - sigma ^ 2 ) return - tf. reduce _ mean ( tf. reduce _ mean ( 0. 5 * tf. reduce _ sum ( 1. 0 + 2. 0 * self. z _ log _ sigma - tf. square ( self. z _ mu ) - tf. exp ( 2. 0 * self. z _ log _ sigma ), [ - 1 ] ), [ 0 ] ) ) | [
0.5521599054336548,
-0.7508430480957031,
0.4972187280654907,
0.7404648661613464,
-0.6432321071624756,
-0.12123014777898788,
0.8733218908309937,
0.38214346766471863,
0.42614659667015076,
0.7447997331619263,
0.12711574137210846,
0.725642204284668,
0.16052646934986115,
-0.15440675616264343,
... |
async def open _ account ( self ) : self. update _ intro ( ) self. update _ prompt ( ) priv _ spend _ key = none priv _ view _ key = none if not self. args. account _ file and not self. args. spend _ key : logger. debug ( " no account file nor spend key. please generate new account " ) return acc _ file _ exists = fals... | [
-0.7589989304542542,
-0.5505145192146301,
0.9217597246170044,
-0.3744153678417206,
0.3822389841079712,
0.3146485686302185,
1.0168359279632568,
0.26606905460357666,
0.3106061816215515,
0.37639129161834717,
-0.2952275276184082,
0.8680902123451233,
0.03714338690042496,
0.21245737373828888,
... |
async def remote _ seat _ heater _ request ( self, level : int, seat _ id : int ) - > none : # if car is asleep the heater is already off wake _ if _ asleep = level > 0 data = await self. _ send _ command ( " remote _ seat _ heater _ request ", heater = seat _ id, level = level, wake _ if _ asleep = wake _ if _ asleep,... | [
-1.3117562532424927,
-0.6724750399589539,
0.7286832928657532,
0.019710088148713112,
0.3085123598575592,
0.476232647895813,
-1.6904265880584717,
-0.0671016201376915,
-1.1439615488052368,
0.32285502552986145,
-0.0899200290441513,
1.1676348447799683,
-0.7265087366104126,
0.8263728618621826,
... |
def _ torch _ to _ tf ( self, batch _ size, max _ seq _ len ) : tf _ dynamic _ rnn = conversion. convert ( torch _ dynamic _ rnn, pytorch, [ functions, variables, control _ flow ] ) tf _ create _ rnn _ cell = conversion. convert ( _ create _ torch _ rnn _ cell, pytorch, [ functions, variables, control _ flow ] ) tf _ g... | [
0.21607020497322083,
-0.10239414125680923,
0.4518694281578064,
0.48334378004074097,
0.4145720303058624,
-1.5731173753738403,
0.2962002158164978,
-0.06218024343252182,
-0.34943968057632446,
-0.19854149222373962,
-1.1923645734786987,
0.49842384457588196,
1.0778554677963257,
-0.39452326297760... |
def make _ mo _ files ( ) : po _ files = glob. glob ( os. path. join ( os. path. dirname ( _ _ file _ _ ),'lc _ messages ','*. po') ) try : sys. path. append ( os. path. join ( os. path. dirname ( sys. executable ), " tools ", " i18n " ) ) import msgfmt for po _ file in po _ files : msgfmt. make ( po _ file, po _ file.... | [
0.4979454278945923,
-0.12790483236312866,
0.8533955216407776,
-0.1119450107216835,
0.7076100707054138,
0.1738828867673874,
0.5471299886703491,
-0.3011533319950104,
-0.772565484046936,
0.025010257959365845,
-0.28256866335868835,
-0.4572698175907135,
0.3027099370956421,
-0.26492053270339966,... |
def update ( self, arg ) : # pylint : disable = r0201 state = arg [ 0 ] logger. info ( " mw : state : % s ", str ( state ) ) if state = = self. model. state. graph _ changed : current _ tab = self. tabs [ arg [ 2 ] ] graph = self. model. loaded _ graphs [ arg [ 1 ] ] logger. info ( " setting the graph of % s to % s ", ... | [
-0.5196123123168945,
-0.8039444088935852,
0.37885892391204834,
-0.3844228684902191,
-0.317666232585907,
0.4755968451499939,
0.36768120527267456,
-0.5579302906990051,
-0.4233412444591522,
0.6765346527099609,
-0.09019340574741364,
1.325587272644043,
-0.21251101791858673,
-0.39400428533554077... |
def interpolate _ bladestructure ( st3d, s _ new ) : st3dn = { } sorg = st3d ['s'] st3dn ['s'] = s _ new. copy ( ) st3dn ['version'] = st3d ['version'] st3dn ['materials'] = st3d ['materials'] st3dn ['matprops'] = st3d ['matprops'] st3dn ['failmat'] = st3d ['failmat'] st3dn ['failcrit'] = st3d ['failcrit'] st3dn ['web ... | [
0.060920774936676025,
-0.6504276990890503,
0.8592532277107239,
-0.5662626028060913,
-0.4223911464214325,
0.6929787993431091,
-0.5177884101867676,
0.11166523396968842,
0.062042027711868286,
-0.2672464847564697,
-0.22494758665561676,
-0.01704367622733116,
0.2504153847694397,
0.03805621713399... |
def shipping _ postal _ code ( self ) : return self. _ shipping _ postal _ code | [
-0.25196120142936707,
-0.47453293204307556,
0.415031760931015,
-0.18075554072856903,
-0.37059155106544495,
1.1174883842468262,
0.13262777030467987,
0.48723897337913513,
0.5683196783065796,
-0.16815339028835297,
0.2571943402290344,
0.13325850665569305,
0.08055403083562851,
-0.44910979270935... |
def add ( self, i ) : self. individuals. append ( i ) | [
-1.3196948766708374,
-0.1605629026889801,
0.3287315368652344,
-0.2684224247932434,
0.19827023148536682,
2.210144519805908,
-0.4139633774757385,
0.32182595133781433,
-0.18377685546875,
-0.34654444456100464,
-0.8863582015037537,
0.42784515023231506,
-1.157408595085144,
-0.09823894500732422,
... |
def stopspeechonactivedescendantchanged ( self, event ) : if not event. any _ data : return true # in an object which manages its descendants, the #'descendants'may really be a single object which changes # its name. if the name - change occurs followed by the active # descendant changing ( to the same object ) we won'... | [
0.3615560233592987,
-0.8932753801345825,
0.7058143615722656,
-1.1045048236846924,
-0.9831804633140564,
0.14337033033370972,
-0.15871354937553406,
-0.9432727694511414,
0.3573135435581207,
0.35946124792099,
-0.7601250410079956,
0.3151470720767975,
0.1143277958035469,
-0.0713697075843811,
0... |
def test _ kombu _ message _ compression ( self, env, os _ conn, admin _ remote ) : cmd _ fuel _ upload ='fuel deployment - - env 1 - - upload'cmd _ nova _ stop ='service nova - conductor stop'# enable compression self. enable _ kombu _ compression ( admin _ remote ) # reset, update, deploy env self. reset _ env ( ) ad... | [
-0.1816767156124115,
0.0370866060256958,
0.794003963470459,
0.3818131685256958,
0.323123037815094,
0.2692990005016327,
-0.20153547823429108,
-0.8321502208709717,
-0.8854081630706787,
0.6788655519485474,
-0.5556268692016602,
0.1381010115146637,
-1.234623908996582,
0.6855618357658386,
1.34... |
def test _ atomic _ language _ enumeration _ 1 _ nistxml _ sv _ iv _ atomic _ language _ enumeration _ 2 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / language / schema + instance / nistschema - sv - iv - atomic - language - enumeration - 2. xsd ", instance = " nistda... | [
-0.5013055205345154,
-0.7567737698554993,
0.5519602298736572,
0.5718574523925781,
-0.24317564070224762,
0.19527705013751984,
-0.11719086766242981,
0.09830024838447571,
0.18346552550792694,
0.698202908039093,
-0.332687109708786,
-0.020028768107295036,
0.46077483892440796,
0.0342891775071620... |
def media _ duration ( self ) - > int | none : if self. _ currently _ playing. get ( " item " ) is none : return none return self. _ currently _ playing [ " item " ] [ " duration _ ms " ] / 1000 | [
0.09752807766199112,
-0.507190465927124,
0.2444031536579132,
0.3756658434867859,
0.5250869393348694,
-0.2433304339647293,
0.5349432826042175,
-0.11528640985488892,
0.29954999685287476,
0.38620033860206604,
0.3225442171096802,
0.49136683344841003,
-0.4003649652004242,
0.5158082842826843,
... |
def palindrome _ sentence ( sentence ) : string = " " for char in sentence : if char. isalnum ( ) : string + = char return is _ palindrome ( string ) | [
-0.14260055124759674,
-0.43551918864250183,
0.42740875482559204,
0.03290500119328499,
-0.5671682953834534,
-0.24732661247253418,
-0.7697966694831848,
0.2520785629749298,
0.14929738640785217,
0.666377604007721,
-0.24775229394435883,
-1.2321938276290894,
-1.6992501020431519,
-0.3619250059127... |
def _ update _ entire _ file ( operation, file _ path ) : with open ( file _ path,'r') as file : contents = file. read ( ) new _ contents = operation ( contents ) if new _ contents is none : return [ ] with open ( file _ path,'w') as file : file. write ( new _ contents ) return [ file _ path ] | [
-0.5963466763496399,
-0.9918834567070007,
0.5294649600982666,
0.25430506467819214,
-0.004677425138652325,
-0.793001115322113,
0.062180496752262115,
0.7301556468009949,
-0.6918752193450928,
0.9438064098358154,
0.044995829463005066,
-1.0469943284988403,
0.019474972039461136,
-0.6457126140594... |
def move _ file ( source, destination ) : status = call ( ['mv ', source, destination ] ) | [
-0.49624717235565186,
0.615276575088501,
0.35016894340515137,
0.497760534286499,
-0.09169546514749527,
0.2221709042787552,
-0.9672112464904785,
0.9268961548805237,
-0.8996855616569519,
0.6745182871818542,
-0.36660757660865784,
0.007916171103715897,
0.9569069743156433,
-0.4668509066104889,
... |
def _ get _ or _ create _ logger ( destination : str = " null " ) - > logging. logger : global _ events _ logger if _ events _ logger : return _ events _ logger logging _ handler = get _ logging _ handler ( destination ) _ events _ logger = logging. getlogger ( f " torchx - events - { destination } " ) _ events _ logge... | [
0.014894410967826843,
0.5691812038421631,
0.666782796382904,
-0.20878498256206512,
0.18820245563983917,
-0.5569844245910645,
-0.39336177706718445,
0.10629873722791672,
0.26523643732070923,
-0.25136420130729675,
0.2734902501106262,
0.1634596735239029,
0.30396535992622375,
0.4668696522712707... |
def get _ contact _ flow ( contact _ flow _ id : optional [ str ] = none, instance _ id : optional [ str ] = none, name : optional [ str ] = none, tags : optional [ mapping [ str, str ] ] = none, type : optional [ str ] = none, opts : optional [ pulumi. invokeoptions ] = none ) - > awaitablegetcontactflowresult : _ _ a... | [
-0.4470793902873993,
-0.39983999729156494,
0.45263057947158813,
0.39509135484695435,
0.36187222599983215,
-0.43670547008514404,
-0.45582520961761475,
-0.49176880717277527,
0.517387330532074,
-0.5666576623916626,
-0.23324206471443176,
1.2264565229415894,
-0.45767489075660706,
-0.79456406831... |
def from _ uri ( cls, uri : str ) - > brokeruri : invalid _ format = valueerror ( " broker uri ( without sasl ) should be of the format'kafka : / / host : port'" " or'kafkas : / / user : pass @ host : port'" ) if uri. startswith ( " kafka : / / " ) : sasl = false elif uri. startswith ( " kafkas : / / " ) : sasl = true ... | [
0.18815827369689941,
-0.8336371779441833,
0.786662757396698,
0.6104523539543152,
-0.8219422698020935,
0.264127641916275,
-0.010716808028519154,
0.804604172706604,
0.2006942629814148,
-0.4963259696960449,
0.13135577738285065,
0.3599303960800171,
-0.42553195357322693,
-0.4458485245704651,
... |
def test _ nt _ keep ( arr _ p _ t _ keep, arr _ p _ o _ steps ) : nt _ keep = sbp. calc _ keep _ timesteps ( arr _ p _ t _ keep, arr _ p _ o _ steps ) assert isinstance ( nt _ keep, int ), " nt _ keep should be an integer " # use bit operation to check for a power of 2 assert nt _ keep! = 0 and ( nt _ keep & ( nt _ ke... | [
0.4467105269432068,
0.04515527933835983,
0.6186534762382507,
0.6205539703369141,
0.12155155837535858,
1.2235755920410156,
-0.41154050827026367,
-0.9297794103622437,
-0.06154264882206917,
0.30538874864578247,
-0.08739854395389557,
-0.5045211315155029,
-0.5081309080123901,
0.6613464951515198... |
def model _ setup _ without _ config ( ) : with namedtemporaryfile ( ) as tf : with open ( tf. name,'w') as f : f. write ( model _ config ( ) ) yield tf. name | [
-0.13676458597183228,
-0.1484251618385315,
0.5003786683082581,
-0.34010472893714905,
-0.07993927597999573,
0.6765689253807068,
0.5572315454483032,
-0.4151754081249237,
-0.837569534778595,
0.8111452460289001,
-1.838747262954712,
-1.2030125856399536,
0.6513945460319519,
-0.04807516559958458,... |
def update _ variables _ momentum ( alpha, beta1, var, grad, v ) : # exponentially weighted averages v = beta1 * v + ( 1 - beta1 ) * grad # variable update var = var - alpha * v return var, v | [
0.06163189560174942,
-1.6724176406860352,
0.39727044105529785,
-0.8668904900550842,
-0.49628758430480957,
0.3994047939777374,
0.3246645927429199,
0.5045842528343201,
-0.722625195980072,
1.213415265083313,
0.2756630778312683,
0.5019757151603699,
-0.4720560908317566,
0.8433345556259155,
-0... |
def create _ data _ batch ( list _ ids _ temp, max _ snps, n _ classes, locus _ fraction, locus = none, locus _ replicates = 1 ) : assert isinstance ( list _ ids _ temp, ( list, ) ),'list _ ids _ temp must be a list.'preformatted _ x = [ ] preformatted _ posx = [ ] preformatted _ labels = [ ] n = 0 for i, id in enumera... | [
-0.4829724133014679,
-0.23032939434051514,
0.6752602458000183,
0.476558119058609,
0.3890914022922516,
0.6584481596946716,
0.04892594367265701,
0.4921233654022217,
0.48892369866371155,
0.03538452088832855,
-0.24017783999443054,
0.5222612023353577,
-0.11692174524068832,
0.4031165540218353,
... |
def timeseries _ report ( self ) : tech _ id = self. unique _ tech _ id ( ) results = super ( ). timeseries _ report ( ) results [ tech _ id +'natural gas price ( $ / millionbtu )'] = self. fuel _ price return results | [
-0.3600611388683319,
0.9307162761688232,
0.1421022266149521,
-0.41835740208625793,
0.3675539195537567,
-0.820915162563324,
-1.3673036098480225,
-0.6787348389625549,
-0.7054439783096313,
-0.010296708904206753,
0.27514880895614624,
-0.5145990252494812,
0.34654948115348816,
0.9183399677276611... |
def test _ list _ decimal _ length _ 2 _ nistxml _ sv _ iv _ list _ decimal _ length _ 3 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / decimal / schema + instance / nistschema - sv - iv - list - decimal - length - 3. xsd ", instance = " nistdata / list / decimal / schem... | [
0.14997558295726776,
-0.0552082434296608,
0.4963477551937103,
0.3610544502735138,
0.39281412959098816,
0.05372614786028862,
-0.5517931580543518,
0.3260343074798584,
0.9429495334625244,
0.2523353099822998,
-1.0275226831436157,
-0.625512421131134,
-0.06401177495718002,
0.2531341314315796,
... |
def sortcolors ( self, nums ) : " " " [ 2 0 2 1 1 0 ] ^ since 2, swap to'end'[ 0 0 2 1 1 0 ] ^ 0, swap to'start'" " " start = 0 end = len ( nums ) - 1 idx = 0 while idx < = end : if nums [ idx ] = = 2 : nums [ idx ] = nums [ end ] nums [ end ] = 2 end - = 1 elif nums [ idx ] = = 0 : nums [ idx ] = nums [ start ] nums [... | [
-0.8527665734291077,
-0.7744132876396179,
0.8676714301109314,
-0.4126400947570801,
-0.15450741350650787,
0.14024145901203156,
0.464861124753952,
0.07400454580783844,
-0.36740532517433167,
-0.03001612238585949,
-0.1628725230693817,
1.0599656105041504,
-0.22932246327400208,
0.162676572799682... |
def test _ find _ migrating _ animals _ return _ list ( self ) : migrating _ animals = self. cell. find _ migrating _ animals ( ) assert isinstance ( migrating _ animals, list ) | [
-0.7453469038009644,
0.14822523295879364,
0.19101420044898987,
-0.004396549426019192,
1.1205544471740723,
0.45069748163223267,
-1.1082892417907715,
-0.6011885404586792,
-0.038970768451690674,
0.5683664679527283,
-1.1489771604537964,
-0.6019047498703003,
-0.02418467588722706,
0.468985617160... |
def xa _ to _ diameter ( xa ) : # compute diameter from area diameter = np. sqrt ( xa * 4 / np. pi ) return diameter | [
0.19073939323425293,
-0.757136344909668,
0.6214094758033752,
-0.8553754687309265,
0.09002271294593811,
-0.41110244393348694,
0.42513924837112427,
0.0626421645283699,
1.9447708129882812,
0.7098938822746277,
0.19318076968193054,
-0.09031607955694199,
0.49359557032585144,
0.18509063124656677,... |
def blstmconcatlayer _ 1 ( input _ layer, n _ hidden, grad _ clip, nonlinearity ) : ingate = lasagne. layers. recurrent. gate ( w _ in = lasagne. init. normal ( 0. 1 ), w _ hid = lasagne. init. normal ( 0. 1 ), \ w _ cell = lasagne. init. normal ( 0. 1 ), b = lasagne. init. constant ( 0. 0 ) ) forgetgate = lasagne. lay... | [
1.061129093170166,
-0.04750251770019531,
1.1298993825912476,
0.07412382960319519,
-0.8371986150741577,
0.4440480172634125,
-0.27411648631095886,
-0.28934425115585327,
-0.26092493534088135,
0.5782600045204163,
-0.307508647441864,
0.15158069133758545,
0.10585125535726547,
1.1211693286895752,... |
def getsignals ( self, targ, method ='mean') : if targ. ndim = = 3 : targ = np. expand _ dims ( targ, axis = 3 ) signals = [ ] for i in range ( targ. shape [ 3 ] ) : if self. atlas. ndim = = 3 : signals. append ( tools. get _ signals ( targ [..., i ], self. atlas, method, self. regions ) ) elif self. atlas. ndim = = 4 ... | [
-1.0675302743911743,
0.05343218892812729,
0.42136150598526,
-0.12928514182567596,
0.2605191767215729,
-0.5026727914810181,
-0.15081830322742462,
-0.7302702069282532,
-0.1220179945230484,
0.4292427897453308,
0.20227307081222534,
0.45028191804885864,
0.06933628022670746,
0.5390287041664124,
... |
def ontextdeleted ( self, event ) : role = event. source. getrole ( ) state = event. source. getstate ( ) if role = = pyatspi. role _ password _ text and state. contains ( pyatspi. state _ focused ) : orca. setlocusoffocus ( event, event. source, false ) # ignore text deletions from non - focused objects, unless the # ... | [
0.679004967212677,
-0.8744285702705383,
0.7857815027236938,
-0.2658097743988037,
-0.39615848660469055,
-0.9107311964035034,
0.012353242374956608,
-0.1491112858057022,
0.9727199673652649,
0.12758180499076843,
-0.22706803679466248,
0.5267783999443054,
-0.24681776762008667,
0.1193134188652038... |
def relativesortarray ( self, arr1 : list [ int ], arr2 : list [ int ] ) - > list [ int ] : counts = counter ( arr1 ) nums = set ( arr2 ) res = [ ] remain = [ ] for num, count in counts. items ( ) : if num not in nums : for _ in range ( count ) : remain. append ( num ) remain. sort ( ) for num in arr2 : for _ in range ... | [
0.0527140311896801,
-0.2133219987154007,
0.9758338332176208,
0.7889167666435242,
-0.3969465494155884,
0.7558692097663879,
0.45358866453170776,
-0.17020434141159058,
-0.13278500735759735,
0.7395418882369995,
-0.43096429109573364,
0.6404863595962524,
-0.6877583265304565,
0.3298566937446594,
... |
def extract _ attributes ( gdb _ path ) : # ogr2ogr - progress - overwrite - skipfailures - f " csv " test. csv # ~ / downloads / jotr _ ofr _ v10 - 2. gdb tblunitdescriptionsummary csv _ path = " attributes. csv " if not os. path. isfile ( csv _ path ) : util. call _ cmd ( [ " ogr2ogr ", " - progress ", " - overwrite ... | [
0.476730078458786,
0.1990426629781723,
0.490023672580719,
-0.4287245273590088,
0.1906677931547165,
0.28940820693969727,
0.7788311839103699,
-0.27024564146995544,
-0.3099856376647949,
0.11716373264789581,
1.4287114143371582,
0.09450753778219223,
-0.24685513973236084,
-0.022326702252030373,
... |
def get _ parser ( ) : parser = argparse. argumentparser ( description = " tweet cleaning and creating corpus and dictionary files " ) parser. add _ argument ( " - i ", " - - input ", dest = " inputs ", help = " the path of the csv input file ", default ='input / data _ elonmusk. csv') parser. add _ argument ( " - s ",... | [
0.0564594566822052,
-0.5736971497535706,
0.8110234141349792,
-0.7742691040039062,
0.2309141457080841,
0.5367023944854736,
-0.47673100233078003,
0.7785496711730957,
-0.9358052611351013,
-0.16452628374099731,
0.05538955703377724,
-0.07437322288751602,
-0.4351651668548584,
0.6146401762962341,... |
def _ generate ( self, feature _ map _ shape _ list, im _ height = 1, im _ width = 1 ) : anchor _ grid _ list = [ ] for ( feat _ shape, base _ sizes, aspect _ ratios, anchor _ stride, anchor _ offset ) in zip ( feature _ map _ shape _ list, self. _ base _ sizes, self. _ aspect _ ratios, self. _ anchor _ strides, self. ... | [
-0.8549922704696655,
-0.24737781286239624,
0.690214991569519,
0.10697787255048752,
-0.2686002254486084,
-0.07187753170728683,
0.1502934992313385,
0.39149415493011475,
-0.3138580918312073,
-0.28554242849349976,
0.4047262966632843,
0.2058577984571457,
0.7214993834495544,
-0.0742664784193039,... |
def _ group _ swap _ test ( groups, target _ func ) : n = groups. shape [ 0 ] return np. all ( [ np. all ( [ target _ func ( k, n ) for k in groups [ i ] ] = = [ i ] * n ) for i in range ( n ) ] ) | [
-1.2631546258926392,
0.3859616219997406,
0.34969156980514526,
0.45310476422309875,
0.1931793987751007,
-0.5551358461380005,
0.39808404445648193,
0.012025881558656693,
0.08254902809858322,
0.2332186996936798,
0.467867374420166,
0.6671909093856812,
0.023697173222899437,
-0.15103329718112946,... |
def apply ( data, taxonomy _ id, annotation _ id ) : client = utils. getclientinstance ( ). data _ taxonomystores _ datataxonomies messages = utils. getmessagesmodule ( ) name = resources. registry. create ('datapol. data. taxonomy ', data = data, taxonomystoresid = utils. gettaxonomystoresid ( ), datataxonomiesid = ta... | [
0.5629510879516602,
0.10361015796661377,
0.3757183253765106,
-0.8613818883895874,
0.2652602195739746,
0.004655074328184128,
-0.16394437849521637,
0.3167805075645447,
0.6897242069244385,
0.026585951447486877,
-0.6110925674438477,
0.24267692863941193,
0.5404497385025024,
-0.31141766905784607... |
def create _ chitchat _ bot ( self ) : self. chatbot = chatbot ('ckorpion ', trainer ='chatterbot. trainers. chatterbotcorpustrainer') self. chatbot. set _ trainer ( listtrainer ) self. chatbot. train ( [ " hi ", " hello. i can help you with stack overflow queries ", ] ) self. chatbot. train ( [ " hey ", " hello. i can... | [
0.3970724046230316,
-0.3278576731681824,
0.40238574147224426,
0.3660479485988617,
0.9219424724578857,
0.6348409652709961,
-0.09939902275800705,
0.4955672323703766,
-0.7667349576950073,
-0.24627436697483063,
-1.6482577323913574,
0.34165629744529724,
-0.25536972284317017,
0.5765970945358276,... |
def distance _ from _ object ( loc ) - > float : if len ( loc ) < = 3 : return np. linalg. norm ( loc ) return np. linalg. norm ( loc [ : 3 ] ) | [
0.34257790446281433,
-0.9238787889480591,
0.3570060729980469,
-0.1303628832101822,
-0.7198878526687622,
0.5624032616615295,
0.6526561379432678,
0.7257601618766785,
1.2697842121124268,
0.8803694844245911,
-0.3311653733253479,
-0.40515562891960144,
0.5339568257331848,
-1.1922128200531006,
... |
def test _ isunicode _ byte ( self ) : assert not isunicode ( b'hello, world!') | [
0.28945624828338623,
0.530838668346405,
0.060800645500421524,
0.9916613698005676,
0.5265401005744934,
1.206161618232727,
0.20357421040534973,
1.2211530208587646,
1.1699868440628052,
-0.4600328803062439,
-1.3226827383041382,
0.1021353080868721,
-1.508586049079895,
-0.053194642066955566,
-... |
def testlistbucketobjects ( self, mock _ gcs _ api ) : api _ list _ object = mock _ gcs _ api. return _ value. objects. return _ value. list api _ list _ object. return _ value. execute. return _ value = mock _ gcs _ bucket _ objects list _ results = fake _ gcs. listbucketobjects ('gs : / / fake - bucket') self. assert... | [
-0.6194925904273987,
-0.20521818101406097,
0.5568206906318665,
-0.27205348014831543,
0.8977686762809753,
0.12734417617321014,
-0.00931699201464653,
-0.5853605270385742,
-0.356550008058548,
-0.26427972316741943,
-1.804243803024292,
-0.00023084148415364325,
-0.23947060108184814,
0.0153135526... |
def user _ id ( self, user _ id ) : self. _ user _ id = user _ id | [
0.5141482949256897,
-0.6167158484458923,
-0.2681947946548462,
1.0635895729064941,
0.603169858455658,
1.0351271629333496,
0.667870044708252,
1.0646986961364746,
0.16055214405059814,
-0.44524261355400085,
-0.6615158915519714,
0.47184544801712036,
0.2351798117160797,
1.6394011974334717,
0.0... |
def validate _ time ( start _ time, now ) : # calculate the difference between date / times difference = now - start _ time # check if guess in 10 seconds if difference. seconds > 10 : return'turn took longer than 10 seconds'return'' | [
0.1351184993982315,
0.04460160434246063,
0.5226103663444519,
0.23408091068267822,
0.42576149106025696,
0.4021013677120209,
0.08872274309396744,
0.23078538477420807,
-0.803886890411377,
0.6724119782447815,
-0.02473297156393528,
-0.18039570748806,
-0.20346327126026154,
0.8081454634666443,
... |
def test _ atomic _ qname _ max _ length _ nistxml _ sv _ iv _ atomic _ qname _ max _ length _ 1 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / qname / schema + instance / nistschema - sv - iv - atomic - qname - maxlength - 1. xsd ", instance = " nistdata / atomic / qn... | [
0.4434806704521179,
-0.3345317542552948,
0.22007876634597778,
0.3327602446079254,
-0.4836862087249756,
0.2800586521625519,
-0.291281521320343,
-0.507503867149353,
0.5645970702171326,
0.3452112078666687,
-0.28805363178253174,
-0.4888983368873596,
-0.2821645140647888,
0.02814851887524128,
... |
def follow _ instructions ( actions _ list ) : robot = robot. robot ( left _ trim = 0, right _ trim = 0 ) pin _ r = 12 pin _ g = 32 pin _ b = 36 buzzerpin = 16 right = 15 # gpio 22 pin 15 ( right side sensor ) left = 13 # gpio 27 pin 13 ( left side sensor ) gpio. setmode ( gpio. board ) gpio. setup ( pin _ r, gpio. out... | [
-0.43407225608825684,
0.016765283420681953,
0.7238412499427795,
0.16753195226192474,
0.4287923276424408,
0.1569318324327469,
0.7756815552711487,
-0.46217086911201477,
0.44623076915740967,
0.5267362594604492,
-0.6176836490631104,
-0.442561537027359,
-0.05092660337686539,
1.058968186378479,
... |
def gotobookmark ( self, inputevent ) : bookmarks = self. getbookmarks ( ) bookmarks. gotobookmark ( inputevent ) | [
-0.6535176634788513,
0.011987965553998947,
0.3123995065689087,
1.1441888809204102,
1.3593921661376953,
0.3537590503692627,
0.7879603505134583,
-0.3715808391571045,
-0.5155246257781982,
0.06160196661949158,
-0.6096310019493103,
1.3945993185043335,
0.35373300313949585,
0.008742921985685825,
... |
def _ path _ is _ valid ( self, path, is _ current _ os _ path ) : # make sure the path isn't just a separator if path = = os. path. sep : return false, " please provide a directory name for the storage. " if is _ current _ os _ path : # current os path must be absolute path if not os. path. isabs ( path ) : return fal... | [
-0.48477184772491455,
-0.6110436916351318,
0.5847163200378418,
0.5557586550712585,
-0.4937115013599396,
0.959404706954956,
-0.16873160004615784,
-0.2535407841205597,
-0.7000454068183899,
0.2856215536594391,
0.5592381954193115,
-0.42249995470046997,
-0.2413320392370224,
-0.01546730753034353... |
def migration _ window _ start _ time _ in _ utc ( self ) - > optional [ str ] : return pulumi. get ( self, " migration _ window _ start _ time _ in _ utc " ) | [
0.3001943528652191,
-0.6340416073799133,
0.6610081791877747,
0.22140146791934967,
0.26291006803512573,
1.3225131034851074,
-0.04049127176403999,
0.14822781085968018,
0.5123485326766968,
0.7092482447624207,
-0.20985127985477448,
1.1005661487579346,
-0.15260401368141174,
0.1412033885717392,
... |
def emoticons _ look _ up ( text ) : words = text. split ( ) emolist = [ ] for word in words : if word in emo : emolist. append ( str ( emo [ word ] ) ) text = text. replace ( word, " " ) return text, emolist | [
-0.4669085443019867,
-0.42292648553848267,
0.5028260350227356,
-0.9782337546348572,
-0.4051808714866638,
-0.47560349106788635,
0.2777951955795288,
1.2586030960083008,
0.9446138739585876,
2.044156789779663,
-1.4494668245315552,
-0.1641172617673874,
-0.008800928480923176,
0.42330071330070496... |
def get _ keras _ datagens ( data _ dir, batch _ size, feature _ len = 300, num _ video _ per _ person = 1e4, num _ audio _ per _ video = 1e4, split _ by ='audio ', split _ size = 0. 2, txt _ dirs = none, ratios = [ 1. 0, 1. 0 ] ) : tr _ paths, val _ paths = get _ pkl _ paths ( data _ dir, num _ video _ per _ person, n... | [
-0.121880441904068,
0.47842368483543396,
0.6527572274208069,
1.4072648286819458,
-0.3439998924732208,
-0.34292811155319214,
0.2740737199783325,
0.4220066964626312,
-0.3311759829521179,
-0.12128107249736786,
0.10223483294248581,
-0.08704698085784912,
0.5296940803527832,
0.6283715963363647,
... |
def list ( self, bucket _ name : str, versions : bool | none = none, max _ results : int | none = none, prefix : str | list [ str ] | none = none, delimiter : str | none = none, match _ glob : str | none = none, user _ project : str | none = none, ) : if delimiter and delimiter! = " / " : warnings. warn ( " usage of'de... | [
-0.5830895304679871,
0.06782880425453186,
0.6785532236099243,
0.7495317459106445,
0.09143984317779541,
0.18163830041885376,
-0.875348687171936,
0.36921387910842896,
0.42343634366989136,
-0.35646769404411316,
-0.08196578174829483,
0.4365482032299042,
0.4953276813030243,
0.030759425833821297... |
def makesamplesfromevaloutput ( metadata, output, elapsed _ seconds, use _ tpu = true ) : if use _ tpu : pattern = ( r'saving dict for global step \ d + : global _ step = ( \ d + ),'r'loss = ( \ d + \. \ d + ), top _ 1 _ accuracy = ( \ d + \. \ d + ),'r'top _ 5 _ accuracy = ( \ d + \. \ d + )') step, loss, top _ 1 _ ac... | [
-0.9304258227348328,
-0.23955856263637543,
0.6206735372543335,
0.3687259256839752,
-0.09795010834932327,
-0.004377814009785652,
0.57032710313797,
-0.08963068574666977,
-0.875630259513855,
0.5198984146118164,
-0.011204560287296772,
0.3109759986400604,
0.7182974219322205,
-0.1134934797883033... |
def append _ result ( self, job, results, failed = false ) : if failed : results _ ext = " % s job % s : % s " % ( self. scheduler. name, self. scheduler. job _ id, results ) logger. error ( results _ ext ) if self. settings. operate _ on = ='works': for j in job. jobs : self. jobs _ failed. append ( { " id " : j. id, ... | [
-0.5821475386619568,
-0.016301436349749565,
0.7164784073829651,
-0.5363487601280212,
-0.0475875623524189,
-0.20500501990318298,
-0.6015481948852539,
-0.6521313786506653,
-0.3856316804885864,
-0.5945289134979248,
-0.4933798611164093,
-0.5155521631240845,
-0.24841395020484924,
0.595643699169... |
def rombergsmethod ( f, n, a, b ) : matrix = [ [ 0 for i in range ( n ) ] for j in range ( n ) ] for k in range ( 0, n ) : # using the trapezoidal method matrix [ k ] [ 0 ] = trapezoidalrule ( f, 2 * * k, a, b, false ) # romberg recursive formula using values that have already been calculated for j in range ( 0, k ) : ... | [
0.3179120421409607,
0.5857722163200378,
0.397301584482193,
0.7956475615501404,
0.012187018059194088,
-0.5625790357589722,
0.5169979929924011,
-0.3603108823299408,
-0.5187038779258728,
0.27142277359962463,
0.15103961527347565,
-0.8213271498680115,
-0.5213566422462463,
1.0686222314834595,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.