text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def _ live _ server _ helper ( request ) : if " live _ server " not in request. fixturenames : return request. getfixturevalue ( " transactional _ db " ) live _ server = request. getfixturevalue ( " live _ server " ) live _ server. _ live _ server _ modified _ settings. enable ( ) request. addfinalizer ( live _ server.... | [
-0.14926894009113312,
-0.3438829481601715,
0.38944917917251587,
0.11117572337388992,
0.4883991777896881,
0.1657085418701172,
0.4203849136829376,
0.5933402180671692,
1.2085320949554443,
0.7729830741882324,
-0.0349629744887352,
-0.6917990446090698,
-0.1806282252073288,
0.5812320709228516,
... |
def check _ argument ( arguments ) : if len ( arguments ) = = 4 : file _ name _ list = arguments [ 1 : ] else : message = " " " error : missing pdb filename as argument usage : % s input. pdb + / - value output. pdb " " " % ( arguments [ 0 ] ) sys. exit ( message ) | [
-0.0860103890299797,
0.17672955989837646,
0.800853967666626,
0.5751157402992249,
0.6899721622467041,
1.1859080791473389,
0.6460661292076111,
0.29341158270835876,
-1.0343599319458008,
0.5536777377128601,
0.030000699684023857,
-0.0664726197719574,
-0.7086127996444702,
0.9768034815788269,
0... |
def clear ( self ) : self. _ state [ " data " ]. clear ( ) self. _ state [ " session " ]. request _ rerun ( ) | [
-0.4390110969543457,
-0.34860944747924805,
0.42156535387039185,
0.27120107412338257,
0.04937756061553955,
0.2131587415933609,
-0.5449052453041077,
-0.4346013069152832,
0.6347681283950806,
-0.2616669237613678,
-0.2716030776500702,
1.6354258060455322,
0.7108078598976135,
-0.16714945435523987... |
def shutdown ( self ) : pass | [
-0.26774483919143677,
-1.5082571506500244,
-0.01705523394048214,
0.880611777305603,
0.4223591089248657,
0.8051880598068237,
0.9282345771789551,
0.4924866855144501,
-0.005293499678373337,
-0.24309781193733215,
-0.24565327167510986,
0.08879107236862183,
-0.7610750794410706,
-0.14590491354465... |
def getincrementindex ( self ) : return _ itkimageserieswriterpython. itkimageserieswriterirgbus3irgbus2 _ getincrementindex ( self ) | [
-0.1576213538646698,
-0.17591239511966705,
0.3488822877407074,
0.5676965713500977,
0.24307551980018616,
0.18288075923919678,
0.3081197440624237,
-0.20117348432540894,
-0.3204405605792999,
-0.3592127561569214,
-0.5512239933013916,
0.8721412420272827,
-0.6808452010154724,
-0.7737641334533691... |
def _ get _ jacobian ( eqn : optional [ jaxpreqn ], cts _ in : shapedarray, invals : list [ union [ np. ndarray, undefinedprimal ] ], idx : int, _ j _ rules : bool, _ fwd : optional [ bool ], ) - > union [ np. ndarray, zero ] : if eqn is none : primitive = none else : primitive = eqn. primitive inval _ shape = invals [... | [
-0.9048841595649719,
0.07745883613824844,
0.7177881002426147,
-1.031168818473816,
-0.19841228425502777,
-0.2932486832141876,
0.4562802314758301,
-0.42523065209388733,
-0.40171173214912415,
-0.32338911294937134,
0.6214354038238525,
0.7926664352416992,
0.863561749458313,
-0.18111294507980347... |
def schedule _ run _ pending _ fixture ( ) : def side _ effect ( ) : schedule. run _ all ( ) schedule. clear ( ) with mock. patch ('schedule. run _ pending ', side _ effect = side _ effect ) as run _ pending _ mock : yield run _ pending _ mock | [
-0.5863074064254761,
-0.1853657066822052,
0.7429561614990234,
0.16876447200775146,
-0.5626957416534424,
0.03806880861520767,
-0.21366961300373077,
0.31721818447113037,
0.2708966135978699,
-0.1739705204963684,
-0.28329336643218994,
0.05507639795541763,
0.4805607795715332,
0.0034670848399400... |
def get _ writer ( buildtool, fileout ) : return _ _ writerconstructors [ buildtool ] ( fileout ) | [
0.09054838120937347,
-1.4339172840118408,
0.011003413237631321,
0.43460071086883545,
0.28953543305397034,
-0.5554836988449097,
0.46357962489128113,
0.3852567672729492,
-1.8619484901428223,
-0.8114928007125854,
0.338813841342926,
0.11725962907075882,
1.133014440536499,
-0.13874469697475433,... |
def encode ( self, obj ) : json _ str = super ( jsonencoderbinary, self ). encode ( obj ) binaries = list ('{ : 08b } '. format ( ord ( c ) ) for c in json _ str ) return''. join ( binaries ) | [
-0.3648934066295624,
-0.7062028646469116,
0.7389820218086243,
0.31160885095596313,
-0.36310654878616333,
0.352581650018692,
-0.8981282711029053,
-0.9807270765304565,
0.6924680471420288,
0.5568493604660034,
-1.4789084196090698,
0.5584107637405396,
-0.15596981346607208,
0.48113083839416504,
... |
def main ( argv = none ) : if argv is none : argv = sys. argv parser = e. optionparser ( version = " % prog version : $ id : sequence2alignment. py 2782 2009 - 09 - 10 11 : 40 : 29z andreas $ ", usage = globals ( ) [ " _ _ doc _ _ " ] ) parser. set _ defaults ( ) ( options, args ) = e. start ( parser ) iterator = fasta... | [
-0.09689934551715851,
-0.931460440158844,
1.0001020431518555,
-0.2768024206161499,
-0.7029703259468079,
-0.0308200865983963,
1.2420732975006104,
-0.2700432538986206,
-0.29607364535331726,
0.8345832824707031,
0.4992876946926117,
0.24426403641700745,
-0.05387716367840767,
0.33307942748069763... |
def test _ pep8 _ conformance _ rectangle ( self ) : pep8style = pep8. styleguide ( quiet = true ) result = pep8style. check _ files ( ['models / rectangle. py'] ) self. assertequal ( result. total _ errors, 0, " found code style errors ( and warnings ). " ) | [
0.012950779870152473,
0.04242707043886185,
0.38807231187820435,
0.21827580034732819,
1.5103790760040283,
0.7964282631874084,
0.15615089237689972,
0.20837371051311493,
-0.15294787287712097,
0.4840700030326843,
0.29929444193840027,
-0.5135196447372437,
0.2427820861339569,
0.5851746797561646,... |
def run ( self ) - > typing. optional [ dict ] : issue = self. sm. get _ issue ( _ info _ issue _ name ) if not issue : _ logger. info ( " no issue to report to, exiting " ) return _ logger. info ( f " found issue { _ info _ issue _ name }, generating report " ) with cloned _ repo ( self. service _ url, self. slug, dep... | [
-0.28931793570518494,
-0.032822322100400925,
0.5961557030677795,
-0.23181338608264923,
0.4846959412097931,
-0.2395976334810257,
0.1539725959300995,
0.0036794987972825766,
0.03811970725655556,
-0.5055496692657471,
0.5212671756744385,
0.31330907344818115,
-0.42756831645965576,
0.340854853391... |
def test _ integrity ( param _ test ) : # find the test that is performed and check the integrity of the output index _ args = param _ test. default _ args. index ( param _ test. args ) param _ test. output + ='\ ntesting'+ param _ test. args +'\ n'# open resulting image and check dimensions and spacing image _ result ... | [
0.45016515254974365,
0.1064983457326889,
0.593227744102478,
-0.06019263714551926,
0.3183920681476593,
-0.12218263000249863,
1.3842785358428955,
0.021563488990068436,
0.31587231159210205,
0.07800035923719406,
0.3701932430267334,
-0.42753446102142334,
-1.018342137336731,
0.161919504404068,
... |
def read _ doi _ to _ pmid ( ) : doi _ to _ pmid = dict ( ) with open ('% s / onto / data / plos _ doi _ to _ pmid. tsv'% app _ home ) as f : for line in f : doi, pmid = line. strip ( ). split ('\ t') doi _ to _ pmid [ doi ] = pmid return doi _ to _ pmid | [
-0.2423343062400818,
-0.8738518357276917,
0.414995402097702,
-1.6690934896469116,
-0.26309555768966675,
0.2629791796207428,
-0.2550339698791504,
0.2058516889810562,
-0.15449650585651398,
0.8672641515731812,
-0.34010475873947144,
0.5797222852706909,
0.7745695114135742,
-0.5312039256095886,
... |
def apply _ pass ( self, sdfg : sdfg, pipeline _ results : dict [ str, any ] ) - > optional [ dict [ str, set [ str ] ] ] : results : dict [ str, set [ str ] ] = defaultdict ( lambda : set ( ) ) symbol _ scope _ dict : ap. symbolscopedict = pipeline _ results [ ap. symbolwritescopes. _ _ name _ _ ] [ sdfg. sdfg _ id ] ... | [
-0.9638445973396301,
-0.41182008385658264,
0.7622213959693909,
-0.7461616396903992,
-0.06268560886383057,
-0.9598920941352844,
0.4580773413181305,
0.28842729330062866,
0.32358309626579285,
0.3813555836677551,
0.19907915592193604,
-0.3312687277793884,
0.2715170085430145,
0.3452138304710388,... |
def service ( config, service ) : print ( f " scanning { local _ lan } for { vendor _ name } cameras or nvrs " ) discover ( ) | [
0.12420710921287537,
0.33421939611434937,
0.0732540711760521,
1.4775930643081665,
-0.08895198255777359,
-0.271553635597229,
-0.616139829158783,
-0.8956032991409302,
1.4833579063415527,
-0.4031015932559967,
-0.20549514889717102,
0.09876695275306702,
-0.2196243405342102,
1.6184866428375244,
... |
def _ _ init _ _ ( self, port, baudrate ) : self. port = port self. baud = baudrate | [
0.9652042388916016,
-0.6347947716712952,
0.6290369629859924,
-1.0111101865768433,
0.320154070854187,
0.5544599890708923,
-1.230972409248352,
0.42854443192481995,
-0.7795366644859314,
-0.6163342595100403,
-0.07412802428007126,
0.4971885085105896,
0.06234263628721237,
-0.057810187339782715,
... |
def reconcile _ feature _ lists ( locus _ list _ one : list, locus _ list _ two : list ) - > list : updated _ features = [ ] skipped _ features = 0 skipped _ features _ str = " " # determine the orientation of the two feature lists by comparing the lengths of their features feat _ one _ lens = [ lc. locus _ len ( ) for... | [
0.03516971319913864,
-0.582047164440155,
0.8866729140281677,
0.31059756875038147,
-0.2791955769062042,
-0.35169997811317444,
0.06470683217048645,
0.7174331545829773,
-0.1498718112707138,
-0.03653131425380707,
-0.2221563309431076,
0.2413337230682373,
-0.07192631810903549,
0.0229992475360631... |
def from _ parent ( cls, parent : " inlinetestmodule ", *, name : str, runner : " inlinetestrunner ", dtest : " inlinetest ", ) : # incompatible signature due to imposed limits on subclass return super ( ). from _ parent ( name = name, parent = parent, runner = runner, dtest = dtest ) | [
0.8601948022842407,
-0.011960336938500404,
0.57843017578125,
0.25067073106765747,
-0.7559438943862915,
0.515937089920044,
0.2935277819633484,
0.08371704071760178,
0.32183951139450073,
-0.0633017048239708,
-0.38728365302085876,
0.25195521116256714,
0.24963805079460144,
-0.18723846971988678,... |
def test _ getpluginreactortypes ( self ) : name ='fakereactortest'package = _ _ name _ _ + '. fakereactor'description ='description'self. pluginresults = [ reactors. reactor ( name, package, description ) ] reactortypes = reactors. getreactortypes ( ) self. assertequal ( self. plugincalls, [ ( reactors. ireactorinstal... | [
-0.2011094093322754,
-0.2165679633617401,
0.40839383006095886,
-0.1567516028881073,
1.850433111190796,
-1.0439523458480835,
-0.21212807297706604,
0.27680060267448425,
0.7072221040725708,
-0.3672446310520172,
-1.35077965259552,
0.1357104331254959,
-1.2621653079986572,
-0.168832466006279,
... |
def get _ all _ assets ( self ) : with preserve _ expanded _ rows ( self. view ) : with preserve _ selection ( self. view ) : self. clear ( ) nodes = commands. get _ all _ asset _ nodes ( ) items = commands. create _ items _ from _ nodes ( nodes ) self. add _ items ( items ) | [
-0.1862751990556717,
0.3431243896484375,
0.5723150968551636,
-0.11960707604885101,
0.35433924198150635,
0.27387523651123047,
0.41104835271835327,
-0.7676440477371216,
0.11903929710388184,
-0.5814769268035889,
0.6978937983512878,
0.9799453020095825,
0.7858527302742004,
-0.12588556110858917,... |
def recv _ email ( self, hdrs, msgfile ) : flow = self. flow if hdrs! = self. _ _ last _ hdrs : self. _ _ last _ hdrs = hdrs print'from mailsnarf ', time. ctime ( flow. etime ) for line in open ( msgfile ) : line = line. rstrip ( ) if line. startswith ('from') : print'> % s'% line else : print line os. unlink ( msgfile... | [
0.938357949256897,
-0.7737988233566284,
0.5198829770088196,
-0.6740027666091919,
0.12736813724040985,
0.10648889094591141,
-0.25596484541893005,
0.26272693276405334,
-0.33644604682922363,
0.32881030440330505,
0.555273175239563,
0.636241614818573,
0.1716480404138565,
-0.0588044747710228,
... |
def _ _ init _ _ ( self, model _ path ) : self. graph = tf. graph ( ) graph _ def = none # load frozen graph. with open ( model _ path ) as fd : graph _ def = tf. graphdef. fromstring ( fd. read ( ) ) if graph _ def is none : raise runtimeerror ('cannot find inference graph in tar archive.') with self. graph. as _ defa... | [
0.7194654941558838,
0.27891871333122253,
0.4395729601383209,
0.1477486789226532,
-0.1242675632238388,
-0.043096352368593216,
0.764485239982605,
-0.07933879643678665,
-0.5288407802581787,
0.20659250020980835,
-0.7954698801040649,
0.08192382752895355,
0.5359839200973511,
-0.33968695998191833... |
def getseparator ( self ) : return'\ \ ' | [
0.3552606701850891,
-0.6353965997695923,
0.37883880734443665,
-0.46084532141685486,
-0.38940638303756714,
0.4018268585205078,
-0.19452117383480072,
0.018502576276659966,
0.005271152593195438,
-1.7002311944961548,
-0.18511605262756348,
-0.6538280844688416,
-0.9636438488960266,
0.12756118178... |
def check ( value, message ) : if value = = none : raise systemexit ('libsbml returned a null value trying to'+ message + '.') elif type ( value ) is int : if value = = libsbml _ operation _ success : return else : err _ msg ='error encountered trying to'+ message + '.'\ +'libsbml returned error code'+ str ( value ) +'... | [
0.641158401966095,
0.734176754951477,
0.4907021224498749,
0.2953936457633972,
-0.5160727500915527,
-0.6632014513015747,
0.299103319644928,
-0.48552513122558594,
0.3356214463710785,
0.022787228226661682,
1.0330332517623901,
0.0040091113187372684,
-0.698540449142456,
0.4314624071121216,
0.... |
def root _ materializable _ or _ observable _ asset _ keys ( self ) - > abstractset [ assetkey ] : observable _ keys = { key for key, is _ observable in self. _ is _ observable _ by _ key. items ( ) if is _ observable } return fetch _ sources ( self. _ asset _ dep _ graph, observable _ keys | self. materializable _ ass... | [
-0.2927396297454834,
0.15795761346817017,
0.6262792944908142,
0.08023254573345184,
-0.6414462924003601,
0.3413018584251404,
-0.6172271370887756,
-0.837711751461029,
-0.2827111780643463,
0.565712034702301,
1.1632291078567505,
1.2591221332550049,
0.5354416966438293,
0.5066084265708923,
-0.... |
def set _ absent ( self ) : self. presence = _ pres _ absent | [
-0.6115246415138245,
-1.552283525466919,
0.42363306879997253,
-0.7042030096054077,
-0.3278951644897461,
2.10473370552063,
0.40965285897254944,
0.8157916069030762,
-0.25593242049217224,
0.24269329011440277,
-0.4540238678455353,
1.1951589584350586,
-0.4248930811882019,
0.7343814969062805,
... |
def load _ levels ( self, force _ update : bool = false ) - > none : levels _ path = os. path. join ( self. dataset, " levels. json " ) try : with open ( levels _ path, " r " ) as flevels : self. levels = json. load ( flevels ) logger. info ( " read levels. json dataset " ) except filenotfounderror : self. levels = { }... | [
-0.46666431427001953,
-0.5422751903533936,
0.7093471884727478,
-0.8538241386413574,
0.13752500712871552,
0.7268044352531433,
-0.6542088985443115,
-0.291492760181427,
-0.28657737374305725,
0.3968942165374756,
-0.6015419363975525,
0.5369362831115723,
0.09593888372182846,
0.45498332381248474,... |
def flood ( self, msg ) : datapath = msg. datapath ofproto = datapath. ofproto parser = datapath. ofproto _ parser for dpid in self. topology. switch _ host _ ports : for port in self. topology. switch _ host _ ports [ dpid ] : if ( dpid, port ) not in self. topology. switch _ host _ access _ table. keys ( ) : datapath... | [
0.29244014620780945,
0.46007055044174194,
0.49875375628471375,
-0.49756747484207153,
0.36468687653541565,
0.3687961995601654,
0.948884904384613,
-0.09669004380702972,
0.16757440567016602,
-0.5969192981719971,
0.5853986144065857,
0.5935620069503784,
-0.4621995985507965,
0.6944308876991272,
... |
def truncate _ unicode ( string, byte _ limit, encoding = default _ encoding ) : # per denis otkidach on so < http : / / stackoverflow. com / a / 1820949 >. encoded = string. encode ( encoding ) [ : byte _ limit ] return encoded. decode ( encoding,'ignore'). encode ( encoding ) | [
0.7449846267700195,
0.33663034439086914,
0.47542065382003784,
0.1937408149242401,
-0.06420661509037018,
-0.034359801560640335,
-0.21645399928092957,
0.7050415277481079,
0.5332953333854675,
0.42831602692604065,
-0.6324270963668823,
1.061720609664917,
-0.3493761122226715,
-1.8926312923431396... |
def read _ settings ( self ) : pattern = re. compile ( r'\ s +') config = configparser. configparser ( ) config. read ( os. path. dirname ( os. path. realpath ( _ _ file _ _ ) ) +'/ ovh. ini') self. regions = [ ] configregions = re. sub ( pattern,'', config. get ('ovh ','regions') ) self. regions = configregions. split... | [
-0.81551194190979,
-0.38662952184677124,
0.5680780410766602,
-0.12867970764636993,
0.4072740375995636,
0.049065928906202316,
-0.5053138136863708,
-0.0032779560424387455,
-0.8470013737678528,
0.7609714269638062,
-0.3538157045841217,
-0.04653923213481903,
-0.05204073712229729,
-0.09332033991... |
def test _ last _ line _ commas ( self ) : ls = self. card. getaddresslines ( 3 ) for l in ls : self. failif ( ',,'in l ) | [
0.18092191219329834,
-0.039971187710762024,
0.6057817935943604,
-0.42681631445884705,
1.076178789138794,
0.5275163054466248,
-1.7187267541885376,
0.4423854649066925,
0.8194780945777893,
-0.3472902178764343,
-0.06247348338365555,
-0.7720791101455688,
-0.4998008906841278,
0.03150475770235061... |
def native _ max _ value ( self ) - > float : return self. entity _ description. native _ max _ value _ fn ( self. actuator ) | [
0.3870365619659424,
-0.06242896616458893,
0.2929486930370331,
0.8131951689720154,
0.021152129396796227,
0.12928137183189392,
-0.6997722387313843,
-0.15150761604309082,
-0.3807242810726166,
-0.14263129234313965,
0.5846095681190491,
0.9141354560852051,
0.667719841003418,
0.23486511409282684,... |
def check _ windows ( ) : return true | [
0.42310163378715515,
-0.08405130356550217,
0.407877117395401,
1.880014181137085,
-0.11980651319026947,
1.5607364177703857,
0.3452284336090088,
0.42295658588409424,
-0.19570891559123993,
-0.22175876796245575,
-0.09643140435218811,
0.5796473026275635,
-2.00154447555542,
1.3453739881515503,
... |
def add _ failure ( self, dest _ url, payload, hashing, query _ string, method ='url') : if payload ['browser'] = = " [ heuristic test ] " : pass else : self. report ( " [ + ] checking : " + method + " attack with " + payload ['payload'] + "... fail \ n " ) options = self. options for reporter in self. _ reporters : re... | [
-0.2148798257112503,
0.478491872549057,
0.4778677821159363,
-0.16570375859737396,
1.4539121389389038,
0.017690075561404228,
-0.7154510617256165,
-0.139345183968544,
-0.147789865732193,
-0.32017067074775696,
0.13867896795272827,
-0.36058759689331055,
-0.18255983293056488,
0.7863443493843079... |
def test _ form _ submit _ good _ hash ( self ) : # pass strings for form submittal and add stage variable to # show we previously saw first stage of the form. self. test _ data. update ( {'stage': 2 } ) response = self. client. post ( self. url, self. test _ data ) self. assertnotequal ( response. content, success _ s... | [
0.2779555916786194,
-0.05427650362253189,
0.5550085306167603,
0.27626171708106995,
0.17751051485538483,
0.9837022423744202,
-0.8546944856643677,
-0.1781887412071228,
-0.5846291780471802,
-0.711384117603302,
-0.9435973763465881,
-0.10367877036333084,
0.3437632918357849,
0.17910872399806976,... |
def create _ authentification _ by _ password ( self, body, content _ type ) : # prepare query url _ query _ builder = configuration. get _ base _ uri ( ) _ query _ builder + ='/ oauth / v1 / token'_ query _ url = apihelper. clean _ url ( _ query _ builder ) # prepare headers _ headers = {'content - type': content _ ty... | [
-1.1192927360534668,
-0.15430104732513428,
0.5183724761009216,
0.7404497861862183,
0.18352600932121277,
-0.1452752649784088,
-0.33816707134246826,
-0.41336455941200256,
0.24642401933670044,
0.8678153157234192,
-0.4384615123271942,
0.7600330710411072,
-0.9046816825866699,
0.0307107269763946... |
def reset ( ) : k. clear _ session ( ) # reload ( ) gc. collect ( ) | [
0.30569276213645935,
-0.20822502672672272,
0.3043719530105591,
0.018766092136502266,
0.7829517126083374,
0.06577897816896439,
0.3435998857021332,
-1.5948854684829712,
-0.41820335388183594,
0.7598761916160583,
0.04914332553744316,
0.8434640765190125,
0.13485290110111237,
-0.5908845067024231... |
def query _ to _ pandas ( self, query, prefetch ='' ) : cursor = self. con. cursor ( ) cursor. arraysize = self. prefetch if prefetch! ='' : cursor. arraysize = prefetch temp = cursor. execute ( query ) if temp. description! = none : data = pd. dataframe ( temp. fetchall ( ), columns = [ rec [ 0 ] for rec in temp. desc... | [
-0.24960042536258698,
0.808796226978302,
0.552003800868988,
-0.1260322779417038,
-0.015168937854468822,
-0.16505958139896393,
-0.7578575015068054,
0.1547563076019287,
0.3705615699291229,
-0.41873982548713684,
0.37196865677833557,
0.7832080125808716,
-0.598017156124115,
-0.02824348025023937... |
def testgetbestpattern ( self ) : skeletons = ('yqqqq ', # year + full name of quarter, i. e., 4th quarter 1999'ymmmm ', # year + full name of month, i. e., october 1999'mmmmd ', # full name of month + day of the month, i. e., october 25'hhmm ', # 12 - hour - cycle format, i. e., 1 : 32 pm'jjmm') # preferred hour forma... | [
0.3719280958175659,
0.5915908813476562,
0.7096633911132812,
-0.004466279409825802,
0.01542191207408905,
0.6460965871810913,
0.21774104237556458,
-0.5073010325431824,
0.09625744074583054,
-0.6884738206863403,
-0.653827965259552,
-0.059600040316581726,
0.07396051287651062,
-0.031556777656078... |
def coxeter _ element ( b _ matrix ) : zero _ vector = vector ( [ 0 for x in range ( b _ matrix. ncols ( ) ) ] ) coxeter = [ ] columns = b _ matrix. columns ( ) source = none for j in range ( b _ matrix. ncols ( ) ) : for i in range ( b _ matrix. ncols ( ) ) : if all ( x < = 0 for x in columns [ i ] ) and columns [ i ]... | [
-0.23196347057819366,
0.5081552267074585,
0.7880918979644775,
0.1285238265991211,
0.3285568058490753,
-0.4883367717266083,
0.4610162079334259,
0.48304423689842224,
-0.45688197016716003,
0.7917566895484924,
0.03585593402385712,
-0.26270750164985657,
-0.42521587014198303,
0.08089705556631088... |
def host ( self ) - > optional [ str ] : return self. _ _ host | [
0.7436941266059875,
-0.3052859604358673,
0.3520950376987457,
0.5778999328613281,
-0.06074773520231247,
1.1359401941299438,
-0.5742147564888,
-0.006408609915524721,
0.33116060495376587,
-0.4492185413837433,
0.6959511637687683,
-0.08767864853143692,
-0.5608327984809875,
-1.4402961730957031,
... |
def test _ transpose _ matrix ( self ) : matrixa = matrix ( [ [ 2, 3, 4 ], [ 3, 4, 5 ] ] ) matrixb = matrix ( [ [ 1, 2 ], [ 2, 3 ], [ 3, 4 ] ] ) matrixc = matrix ( [ [ 1, 2, 3 ] ] ) self. assertequals ( [ [ 2, 3 ], [ 3, 4 ], [ 4, 5 ] ], matrixa. transpose ( ) ) self. assertequals ( [ [ 1, 2, 3 ], [ 2, 3, 4 ] ], matrixb... | [
0.6562374234199524,
0.43756580352783203,
0.7951654195785522,
-0.37773171067237854,
0.5642514824867249,
-0.6740673184394836,
0.7278291583061218,
0.01699157990515232,
0.13583503663539886,
0.012769472785294056,
-0.6911332607269287,
-1.4228265285491943,
-0.7070317268371582,
0.09334496408700943... |
def normalizefilename ( name ) : return name. lstrip ( os. sep ) | [
1.0305068492889404,
-0.6541985869407654,
0.8272927403450012,
-0.33552682399749756,
-0.9501328468322754,
0.654671847820282,
-0.23408758640289307,
0.5269423723220825,
0.05926801636815071,
0.02478032372891903,
0.45045486092567444,
-1.3167657852172852,
0.11852765083312988,
-0.28152793645858765... |
def token ( self ) : return self. _ token | [
-0.3251931369304657,
-0.7576694488525391,
0.08508539944887161,
-0.03782415762543678,
0.3219957947731018,
0.8291904926300049,
1.1281145811080933,
0.9065541625022888,
0.3791075050830841,
-2.436385154724121,
-0.20865225791931152,
1.0250484943389893,
0.802227258682251,
-1.2721984386444092,
-... |
def connect _ async ( self, host, port = 1883, keepalive = 60, bind _ address = " " ) : print ( " connect _ async " ) if host is none or len ( host ) = = 0 : raise valueerror ('invalid host.') if port < = 0 : raise valueerror ('invalid port number.') if keepalive < 0 : raise valueerror ('keepalive must be > = 0.') self... | [
-0.17473191022872925,
-0.3741462528705597,
0.662370502948761,
0.7388705611228943,
-0.6277180910110474,
0.450700044631958,
-0.5331885814666748,
-0.29249972105026245,
-0.7694377303123474,
0.48868125677108765,
-0.3952161371707916,
-0.16479822993278503,
0.10913030803203583,
0.1616109162569046,... |
def test _ graph _ g _ suite _ associations _ list ( self ) : pass | [
-0.7122971415519714,
0.3803476393222809,
0.1689755767583847,
1.2075141668319702,
0.9003859162330627,
0.7590805888175964,
1.9074409008026123,
-0.7313742637634277,
0.11591707915067673,
-0.029208550229668617,
-0.19894146919250488,
0.08584809303283691,
0.37529700994491577,
0.3394823670387268,
... |
def _ buildgraph ( self, base ) : sack = dnf. sack. rpmdb _ sack ( base ) pkgmap = dict ( ) packages = [ ] depends = [ ] rdepends = [ ] deps = set ( ) providers = set ( ) for i, pkg in enumerate ( sack. query ( ) ) : pkgmap [ pkg ] = i packages. append ( pkg ) rdepends. append ( [ ] ) for i, pkg in enumerate ( packages... | [
-1.1254441738128662,
0.13306893408298492,
0.5390594601631165,
-0.6393654942512512,
-0.5498589277267456,
-0.3724052608013153,
-0.08160067349672318,
0.05857932195067406,
0.14964501559734344,
0.20626039803028107,
-0.7845020294189453,
-0.6513540148735046,
-0.20833608508110046,
-0.1240197718143... |
def get _ group _ actions ( self, uuid, * * kwargs ) : return self. request ( f'groups / { uuid } / actions ', * * kwargs ) | [
-1.7514617443084717,
0.086616650223732,
0.2156522125005722,
0.697411060333252,
0.5596003532409668,
-1.1405346393585205,
0.3596387505531311,
-0.5759790539741516,
-0.3856993615627289,
0.33378028869628906,
-0.4141243100166321,
1.1218549013137817,
-1.0316243171691895,
-0.21135573089122772,
-... |
def rates ( self ) - > list : for bond in self. _ instruments. values ( ) : if bond. maturity _ term not in self. _ curve : raise keyerror ( " term { } not found ". format ( bond. maturity _ term ) ) self. _ curve [ bond. maturity _ term ] = self. bond _ spot _ rate ( bond ) return [ self. _ curve [ t ] for t in self. ... | [
0.19004705548286438,
-0.35271117091178894,
0.4437977373600006,
-0.7740228772163391,
1.0265973806381226,
0.5770962834358215,
-0.8569304943084717,
-0.45146098732948303,
-0.1392602026462555,
1.0929324626922607,
0.42748385667800903,
0.18270421028137207,
-0.5721948742866516,
0.2512287199497223,... |
def initialise _ args ( self, sitemap, request ) : if self. navigation _ type is not none : self. navigation _ type = int ( self. navigation _ type ) if self. maxdepth is not none : self. maxdepth = self. calculate _ depth ( self. maxdepth, sitemap, request ) self. startdepth = self. calculate _ depth ( self. startdept... | [
-1.3758254051208496,
-0.15559427440166473,
0.4250650703907013,
0.04539969190955162,
0.39473262429237366,
-0.22239689528942108,
0.97129225730896,
-0.15047447383403778,
0.37707188725471497,
0.15809118747711182,
-0.781299352645874,
0.09468873590230942,
-0.4851248264312744,
1.237949252128601,
... |
def split _ template _ args ( s, open _ brace ='< ', close _ brace ='> ', separator = ',') : targs = [ ] ns = s. split ( open _ brace, 1 ) [ - 1 ]. rsplit ( close _ brace, 1 ) [ 0 ]. split ( separator ) count = 0 targ _ name ='' for n in ns : count + = n. count ( open _ brace ) count - = n. count ( close _ brace ) if l... | [
-1.2141690254211426,
-0.23101457953453064,
0.882000744342804,
-0.24605593085289001,
-0.6484590768814087,
-0.8723586201667786,
-0.24485450983047485,
0.7717497944831848,
-0.34793171286582947,
0.5157356858253479,
-0.364967942237854,
-0.4971669316291809,
0.03247233107686043,
0.1525280624628067... |
def note _ list _ single _ part ( self, part, measure _ start, num _ measures ) : pure _ notes = [ ] part _ selected = self. score. getelementsbyclass ( stream. part ) [ part ] measures = part _ selected. getelementsbyclass ( stream. measure ) measures _ selected = [ ] for i in range ( num _ measures ) : measures _ sel... | [
0.004215593449771404,
-0.7856704592704773,
0.7890177369117737,
0.0832652822136879,
0.3669012784957886,
0.5777117013931274,
0.10125701129436493,
-0.17707064747810364,
0.4819503724575043,
0.36420655250549316,
-0.31872129440307617,
0.22457587718963623,
-0.11535771191120148,
0.3483932018280029... |
def vad _ collector ( sample _ rate, frame _ duration _ ms, padding _ duration _ ms, vad, frames ) : num _ padding _ frames = int ( padding _ duration _ ms / frame _ duration _ ms ) # we use a deque for our sliding window / ring buffer. ring _ buffer = collections. deque ( maxlen = num _ padding _ frames ) # we have tw... | [
0.3905090093612671,
0.012132743373513222,
0.505954384803772,
0.12323199212551117,
0.424800306558609,
-0.759970486164093,
-0.5074268579483032,
-0.3698295056819916,
0.8885093331336975,
0.6399401426315308,
0.06696760654449463,
0.6803573369979858,
-0.32209423184394836,
0.9122064709663391,
-0... |
def get _ map ( stub ) : req = spec _ pb2. empty ( ) map _ objects = stub. getmap ( req ) # we received a generator of objects on the map from the server logger. info ( " receive map from server " ) return map _ objects | [
-1.427480697631836,
-1.1869698762893677,
0.7396185398101807,
0.3638182282447815,
0.18911024928092957,
0.3431513011455536,
-0.3625520169734955,
-0.026958605274558067,
-0.07574481517076492,
-0.484693706035614,
-0.19469909369945526,
0.5645442605018616,
0.07140224426984787,
0.1453956961631775,... |
def _ _ mul _ _ ( self, other : float ) - > " translation2d " : if not isinstance ( other, ( float, int ) ) : return notimplemented return translation2d ( self. x * other, self. y * other ) | [
-0.8274315595626831,
0.6799961924552917,
0.7452964782714844,
0.2558319866657257,
-1.09023916721344,
0.09630339592695236,
-0.5256714820861816,
-1.7661895751953125,
0.10632820427417755,
-0.445585697889328,
-0.49553436040878296,
-1.315991997718811,
0.6338765621185303,
-0.282795250415802,
0.... |
def modify _ url _ for _ impersonation ( cls, url : url, impersonate _ user : bool, username : optional [ str ] ) - > none : # do nothing and let update _ impersonation _ config take care of impersonation | [
-1.873111367225647,
0.07864674925804138,
0.5541853904724121,
0.8663917183876038,
-0.20577824115753174,
0.9576048851013184,
0.2907281816005707,
1.800958514213562,
0.2042352259159088,
0.10636182874441147,
-0.7218170166015625,
0.35966795682907104,
-0.7875034213066101,
0.13348479568958282,
0... |
def py _ mail ( subject, body, to, from, attachment ='null') : # create message container - the correct mime type is multipart / alternative here! message = mimemultipart ('alternative') message ['subject'] = subject message ['to'] = to message ['from'] = from message. preamble = " " " your mail reader does not support... | [
0.22366416454315186,
0.38760483264923096,
1.0015041828155518,
-0.39349478483200073,
-0.2550545334815979,
0.22398725152015686,
-0.34072384238243103,
-0.2173481285572052,
0.03156753256917,
-0.30273497104644775,
0.27375528216362,
0.8569850921630859,
-0.48460865020751953,
-0.07036129385232925,... |
def test _ rect _ float ( self ) : for detector in self. detectors : with self. subtest ( detectortype = detector. detectortype ) : with pytest. raises ( lunasdkexception ) as exceptioninfo : detector. redetect ( images = [ imageforredetection ( image = vlimage _ one _ face, bboxes = [ error _ core _ rect ] ) ] ) self.... | [
0.5336654186248779,
0.9878545999526978,
0.5582427978515625,
0.546336829662323,
0.9557211399078369,
0.25090140104293823,
0.05121833086013794,
0.04781769961118698,
0.09469251334667206,
-0.7910889387130737,
0.16246746480464935,
-0.6259640455245972,
0.40774714946746826,
1.5075956583023071,
0... |
def reset ( self, events ) : self. watcher. stop ( ) self. watcher. set ( self. socket. sock, events ) self. watcher. start ( ) | [
0.08943512290716171,
-0.08166918158531189,
0.20323273539543152,
-0.04828527197241783,
0.5025551319122314,
-0.030234752222895622,
0.48745933175086975,
-0.2004012018442154,
-0.37652266025543213,
0.18171438574790955,
-0.5871708989143372,
1.699599027633667,
-1.0383013486862183,
-0.410401463508... |
def test _ validate _ int _ bad ( self ) : bad _ int = " hello " with self. assertraises ( exception ) as context : helpers. validate _ int ( bad _ int,'int') exception = context. exception self. assertequal ( exception. args [ 0 ] [ " status _ code " ], 400 ) self. assertequal ( exception. args [ 0 ] [ " message " ], ... | [
0.388264000415802,
-0.1568818986415863,
0.626018762588501,
-0.24815252423286438,
0.9975029230117798,
0.8997864723205566,
-1.2857780456542969,
-0.12394540011882782,
-0.33540353178977966,
-0.40885064005851746,
-0.46055352687835693,
0.2938709557056427,
-0.5098734498023987,
0.9113485813140869,... |
def _ tables _ init ( self, force = false ) : if self. tables and not force : return self. tables if force : self. reset ( ) for table in self. _ tables _ get ( ) : self. tables [ table ] = { } return self. tables | [
-1.0191572904586792,
0.9634348154067993,
0.7159947752952576,
-0.1294274777173996,
-0.8644858002662659,
-0.02492983639240265,
0.2694806158542633,
-0.6706542372703552,
-0.08442915976047516,
0.05012136325240135,
-0.7323431372642517,
0.22984634339809418,
-0.24513961374759674,
0.783107280731201... |
def recreate _ image ( codebook, labels, w, h ) : d = codebook. shape [ 1 ] image = np. zeros ( ( w, h, d ) ) label _ idx = 0 for i in range ( w ) : for j in range ( h ) : image [ i ] [ j ] = codebook [ labels [ label _ idx ] ] label _ idx + = 1 return image | [
-1.3322514295578003,
-0.1305023431777954,
0.3334362208843231,
-0.04914297163486481,
0.1465013176202774,
0.4661017954349518,
-0.43898311257362366,
0.027498356997966766,
-1.2343116998672485,
0.2734919786453247,
0.406274676322937,
0.9151501059532166,
-0.29506993293762207,
-0.1148744598031044,... |
def error ( self, message ) : self. print _ usage ( sys. stdout ) self. exit ( 3, gettext ('% s : error : % s \ n') % ( self. prog, message ) ) | [
0.2619589567184448,
-0.045556820929050446,
0.5079724192619324,
0.3388262987136841,
0.19181731343269348,
0.8570231199264526,
0.8393515348434448,
0.27974891662597656,
-0.6467717289924622,
0.283157080411911,
0.504257321357727,
0.8357218503952026,
-0.7531688213348389,
0.5587639212608337,
0.5... |
def login _ user ( self, user : user, remember : optional [ bool ] = none, duration : optional [ timedelta ] = none, force : bool = false, fresh : bool = true, ) - > bool : # this method's logic is modified from flask _ login. utils. login _ user if not force : if not user. is _ active : raise authenticationerror ( _ (... | [
-0.9628034234046936,
0.5304976105690002,
0.8565507531166077,
1.0296534299850464,
-0.06778250634670258,
0.3741070330142975,
0.23456910252571106,
-0.7792910933494568,
0.6727365851402283,
0.3177526593208313,
-1.0682382583618164,
0.052424557507038116,
0.3040400743484497,
0.04191676899790764,
... |
def init _ weights _ and _ state ( self, input _ signature ) : d _ model = input _ signature [ - 1 ]. shape [ - 1 ] shape _ w1 = ( d _ model, self. _ d _ ff ) shape _ w2 = ( self. _ d _ ff, d _ model ) shape _ b2 = ( d _ model, ) rng _ w1, rng _ w2, rng _ b2 = fastmath. random. split ( self. rng, 3 ) if base. n _ weigh... | [
-0.2937834858894348,
0.45717859268188477,
0.7655811309814453,
0.08000781387090683,
0.20568981766700745,
-0.7539860010147095,
0.36460021138191223,
-0.21804708242416382,
-0.5909814238548279,
0.16132430732250214,
-1.08199942111969,
-0.14198848605155945,
0.4469175934791565,
1.271309494972229,
... |
def set _ up ( args ) : global options, derivative _ gen, spreader options = args setup _ log ( ) derivative _ gen = derivatives ( options, logger ) spreader = modsspreader ( logger = logger ) test _ programs = required _ programs if not options. skip _ derivatives and not options. skip _ hocr _ ocr : test _ programs. ... | [
0.19375304877758026,
-0.059625934809446335,
0.8679021596908569,
0.06204690411686897,
0.3694639503955841,
0.6603730320930481,
0.8372992277145386,
-0.35022780299186707,
-0.2611498534679413,
0.2894795835018158,
0.6167091131210327,
0.5702764391899109,
-0.5646534562110901,
0.6292653679847717,
... |
def operations ( self, qubits ) : q0, q1, q2, q3 = qubits yield cirq. h ( q0 ), cirq. h ( q1 ), cirq. h ( q2 ) yield cirq. xpowgate ( exponent = - 0. 5 ). on ( q3 ) yield cirq. cnot ( q0, q1 ), cirq. cnot ( q1, q2 ), cirq. cnot ( q2, q3 ) yield cirq. zpowgate ( exponent = sympy. symbol ('theta _ 0') ). on ( q3 ) yield ... | [
0.19891397655010223,
0.5128673911094666,
0.8072521686553955,
-0.3213774263858795,
-0.5606936812400818,
0.53761887550354,
0.5189445614814758,
-0.27365773916244507,
0.046756621450185776,
0.24623160064220428,
-0.4596875011920929,
-1.047931432723999,
-0.5863876938819885,
-0.05505414307117462,
... |
def test _ table _ 10 _ fail ( ) : cleanup ( ) print _ test _ separator ( " starting test _ table _ 10 " ) cat = csvcatalog. csvcatalog ( ) try : t = cat. create _ table ( " teams ", ".. / data / teams. csv " ) print ( " teams table ", json. dumps ( t. describe _ table ( ), indent = 2 ) ) t. add _ column _ definition (... | [
0.31853187084198,
1.111826777458191,
0.9304435849189758,
-0.32273149490356445,
0.5845121145248413,
0.20835383236408234,
0.6371157765388489,
-0.5400726199150085,
-0.353948712348938,
0.2524351179599762,
-0.12603521347045898,
0.7117363810539246,
0.7512853741645813,
-0.3410293161869049,
1.12... |
def deserialise ( row : str, features : featureset, targets : optional [ target ] = none, ) - > union [ tuple [ tf. tensor, tf. tensor ], tf. tensor ] : raw _ features = tf. parse _ example ( row, features = _ fdict ) npatch _ side = 2 * features. halfwidth + 1 with tf. name _ scope ( " inputs " ) : x _ con = tf. decod... | [
-0.017911193892359734,
0.13134682178497314,
0.5641804933547974,
-0.6672859787940979,
-0.4862298369407654,
-0.8759017586708069,
0.010351425968110561,
0.46714189648628235,
-0.405617356300354,
-0.43701332807540894,
-0.5721834301948547,
-0.09429740160703659,
1.0931710004806519,
-1.094672203063... |
def begin _ scene ( self ) : thread _ lock = threading. lock ( ) # lock needed to ensure threading is happy canvas = pygame. display. set _ mode ( self. window _ size, 0, 32 ) pygame. mouse. set _ visible ( false ) # pygame. event. set _ grab ( true ) # only uncomment this if you're sure it won't break everything rende... | [
0.11589259654283524,
-0.24061205983161926,
0.7087156176567078,
0.2889931797981262,
0.17486511170864105,
0.29829102754592896,
0.754889965057373,
-0.37934449315071106,
-0.026426704600453377,
-1.093658685684204,
0.2814646363258362,
0.6699181199073792,
-0.39214077591896057,
0.3832372725009918,... |
def test _ power _ law _ from _ uniform _ parameter ( power _ law _ converter ) : d = 4 power _ law _ converter. scale = 10 power _ law _ converter. _ f = mock ( return _ value = 2 ) power _ law _ converter. _ log _ jacobian _ inv = mock ( return _ value = - 2 ) du, lj = powerlawconverter. from _ uniform _ parameter ( ... | [
-0.5620191097259521,
-0.048457931727170944,
0.6383697986602783,
-0.036736421287059784,
0.5346767902374268,
0.3288777470588684,
0.05674131214618683,
0.10991564393043518,
-0.6698212027549744,
0.12419148534536362,
-1.1081129312515259,
-0.340335488319397,
0.7610715627670288,
0.9905610680580139... |
def movetask ( self, label, position ) : print ( " label = " + label ) print ( " position = " + str ( position ) ) rowid = self. lookuprowid ( label ) trace = self. deletetask ( rowid ) root = trace. list [ 0 ] [ 0 ] oldposition = root. task. position root. task. position = position self. readdatabase ( ) newlabel = se... | [
-0.38268670439720154,
-0.6186473369598389,
0.8468880653381348,
-0.045329075306653976,
-0.1655472368001938,
0.14712777733802795,
-0.06133343279361725,
0.4817369282245636,
-0.022183844819664955,
1.6451128721237183,
-0.8724334239959717,
-0.589550256729126,
-0.3504168391227722,
-0.190148830413... |
def setup _ stop _ exists ( connection ) : es = existingstops ( connection ) @ utils. xslt _ text _ func def stop _ exists ( _, file _, code ) : " " " check if stop point exists. " " " return es. stop _ exists ( file _, code ) | [
-0.7097675204277039,
-0.8072547316551208,
0.5711124539375305,
-0.3728513717651367,
0.6617071628570557,
-0.23592114448547363,
-0.2799890637397766,
0.2673169672489166,
-1.003037929534912,
0.7191533446311951,
0.19488418102264404,
-1.0616480112075806,
1.4604119062423706,
-0.9519177079200745,
... |
def permission _ factory ( community, action ) : return _ permission ( community, action ) | [
0.3272942006587982,
-0.6077761054039001,
0.17218762636184692,
0.6804491877555847,
-0.4383831322193146,
-1.0832405090332031,
0.05994192883372307,
-0.43685096502304077,
-0.33165863156318665,
0.5399225950241089,
0.8845717310905457,
-0.43682801723480225,
0.6459706425666809,
-0.648277997970581,... |
def plot _ received _ symbols ( symbols, valid _ ratio = 0. 8 ) : ax = figure ( ). add _ subplot ( 111 ) ax. plot ( symbols. real, symbols. imag,'xm') ax. plot ( symbols. real [ - len ( symbols ) * valid _ ratio : ], symbols. imag [ - len ( symbols ) * valid _ ratio : ], '. c') ax. set _ xlabel ('in - phase') ax. set _... | [
0.5344185829162598,
0.7280767560005188,
0.5473257303237915,
-0.8661329746246338,
-0.6163836121559143,
0.25300490856170654,
1.0671519041061401,
-0.15977007150650024,
0.24932223558425903,
-0.5010769963264465,
0.021213829517364502,
0.3753677010536194,
0.011400412768125534,
-0.0737856030464172... |
def password ( self ) - > pulumi. output [ optional [ str ] ] : return pulumi. get ( self, " password " ) | [
0.9709246158599854,
-0.3557417690753937,
0.48279502987861633,
0.92240971326828,
0.818508505821228,
0.2692171633243561,
0.29518064856529236,
0.1790940761566162,
0.6943058371543884,
-0.1023370549082756,
0.4328993856906891,
0.5255544185638428,
0.16219736635684967,
-0.7813342213630676,
-1.17... |
def readfile ( self, path ) : try : with open ( path +'/'+ self. filename,'rt') as f : self. originaltext = f. readlines ( ) self. originaltext = " ". join ( self. originaltext ) # self. markedtext = " ". join ( self. originaltext ) self. markedtext = self. originaltext except ioerror as exc : print ( " something goes ... | [
0.07836597412824631,
-0.8268666863441467,
0.5781000256538391,
0.3623133897781372,
-0.07614608108997345,
0.9294846653938293,
0.31298384070396423,
1.2392985820770264,
-0.7656226754188538,
0.21555277705192566,
0.9819379448890686,
0.19625814259052277,
0.01684829778969288,
0.2139221727848053,
... |
def get _ user ( *, user _ id ) : try : with db _ session ( ) as db : user = db. query ( models. useraccount ) \. filter _ by ( id = user _ id ) \. one ( ) except ( sqlalchemy. exc. dbapierror, sqlalchemy. exc. sqlalchemyerror ) as err : # database error pass else : return user | [
-0.057449571788311005,
-0.28490108251571655,
0.2949371039867401,
1.1199613809585571,
0.72352135181427,
-0.40430527925491333,
1.0899333953857422,
-0.6214102506637573,
0.8010483384132385,
-0.1830196976661682,
0.4422946870326996,
0.17636331915855408,
-0.09667547792196274,
0.1869749128818512,
... |
def padframenumber ( ff, depth ) : return''. join ( ['0'] * ( len ( str ( depth ) ) - len ( str ( ff ) ) ) ) + str ( ff ) | [
-0.21544036269187927,
0.01838088035583496,
0.6986194252967834,
-0.474263995885849,
-0.10958906263113022,
0.09910215437412262,
0.08166144788265228,
0.057850826531648636,
0.5141386985778809,
-0.7510136365890503,
0.46684694290161133,
0.734137773513794,
-0.5377444624900818,
0.7387256026268005,... |
def test _ check _ config _ params _ invalid _ csv _ output _ folder _ path ( gitdelver _ config _ params _ fixture : callable [ [ none ], dict [ str, str ] ] ) : config _ params = gitdelver _ config _ params _ fixture config _ params [ " csv _ output _ folder _ path " ] = " test " with pytest. raises ( systemexit ) : ... | [
-0.05547342821955681,
-0.05253596603870392,
0.29197224974632263,
0.9772325158119202,
-0.45844516158103943,
0.38086822628974915,
0.5456759333610535,
0.5341161489486694,
-0.8855690360069275,
0.27165091037750244,
-0.2865886390209198,
-0.3210863769054413,
-0.3903903365135193,
0.890955567359924... |
def normal _ dist _ traffic ( graph, src, dest, parents ) : current = none # if we have no parents, then just proceed as normal if src in parents : current = parents [ src ] else : return graph. edges [ ( src, dest ) ]. get _ average _ time ( ) path = [ src ] while current : path. append ( current ) if current in paren... | [
-0.11346015334129333,
0.2289564311504364,
0.9898173213005066,
-0.399649977684021,
-1.0796276330947876,
0.22437390685081482,
0.41544535756111145,
0.3900613784790039,
-0.2135312706232071,
1.397847056388855,
0.20178428292274475,
0.009013100527226925,
-0.6369305849075317,
0.015154038555920124,... |
def iscrawlingelementtocrawl ( self, crawlingelement ) : if crawlingelement. type! = crawlingelement. type. uniqueurl : return true # if the url is in mongo db, we don't crawl it again : if self. alreadycrawledfunct is not none : if self. alreadycrawledfunct ( crawlingelement ) : return false if self. alreadyfailedfunc... | [
-1.245485544204712,
0.7675333023071289,
0.5463951230049133,
0.3539496064186096,
0.6175108551979065,
0.4071449637413025,
0.8041014075279236,
0.15149280428886414,
0.9263521432876587,
0.34729355573654175,
-0.20894697308540344,
0.4504462778568268,
-1.0006468296051025,
0.3805096447467804,
-0.... |
def scan _ inc ( op, e, _ list ) : if len ( _ list ) = = 0 : return _ list result = [ op ( e, _ list [ 0 ] ) ] for x in _ list [ 1 : ] : result. append ( op ( result [ - 1 ], x ) ) return result | [
-1.2542572021484375,
1.2614918947219849,
0.6396566033363342,
1.374867558479309,
-0.43097636103630066,
-0.5848435759544373,
0.2806822955608368,
0.9319993257522583,
0.5955427289009094,
0.5365163087844849,
-0.760636031627655,
-0.7538627982139587,
-0.38081854581832886,
0.1626138985157013,
-0... |
def project _ point ( df ) : df [ " utm _ x " ] = df. image _ utm _ left + ( df. resolution * df. x ) df [ " utm _ y " ] = df. image _ utm _ top - ( df. resolution * df. y ) # create geopandas geoms = [ point ( x, y ) for x, y in zip ( df. utm _ x, df. utm _ y ) ] gdf = gpd. geodataframe ( df, geometry = geoms ) # set ... | [
-0.16678155958652496,
0.29062896966934204,
0.5071269273757935,
-0.6405348777770996,
-0.08087701350450516,
0.6718738675117493,
-0.5666823387145996,
0.21942760050296783,
0.29824623465538025,
0.35256436467170715,
1.2574456930160522,
0.0884452760219574,
0.29834529757499695,
-0.6557437181472778... |
def test _ create _ pfe _ device _ 3 ( self, context ) : # these could come from a data file id = " post _ vedevices _ allconfigadminmulticasttruethree " name = " post _ vedevices _ allconfigadminmulticasttruethree " devicehost = " post _ vedevices " # define a test step with pytest. allure. step ( " create client ` { ... | [
0.564864456653595,
0.5172142386436462,
0.6504147052764893,
0.34739482402801514,
0.28152453899383545,
0.8465732932090759,
0.16242998838424683,
0.05370541289448738,
0.45607876777648926,
-0.6112041473388672,
-0.385347843170166,
0.2288496494293213,
-0.8182485699653625,
0.2932870388031006,
0.... |
def _ get _ logs ( job _ id ) : # avoid sqlalchemy " unicode type received non - unicode bind param value " # warnings. job _ id = unicode ( job _ id ) results = engine. execute ( logs _ table. select ( ). where ( logs _ table. c. job _ id = = job _ id ) ). fetchall ( ) results = [ dict ( result ) for result in results... | [
0.5812848806381226,
0.22330497205257416,
0.4428962171077728,
0.1245906874537468,
-0.1806047558784485,
-0.7035759687423706,
-1.324187159538269,
-0.09389907121658325,
-0.5777472853660583,
0.8416930437088013,
-0.04728241264820099,
0.33441877365112305,
0.1117529422044754,
0.9295104742050171,
... |
def init _ keys ( self, parent = none ) : if parent is none : parent = self self. key _ pressed ='' # string code of currently pressed key wx. evt _ enter _ window ( self, self. on _ enter _ window ) wx. evt _ key _ down ( self, self. on _ key _ down ) wx. evt _ key _ up ( self, self. on _ key _ up ) | [
0.19184426963329315,
-0.09431043267250061,
0.7048810124397278,
0.1328008621931076,
-0.1389540284872055,
-0.4112333059310913,
0.6798931956291199,
-0.242046520113945,
-0.45064035058021545,
0.25118494033813477,
-0.7642229199409485,
-0.050545934587717056,
-0.5070118308067322,
1.136474251747131... |
def from _ xml _ element ( cls, xml _ element : et. element, parent :'regsregister') - >'regsbitfield': name = xml _ element. attrib [ " name " ] if " name " in xml _ element. attrib else " n / a " offset = int ( xml _ element. attrib [ " offset " ], 16 ) if " offset " in xml _ element. attrib else 0 width = int ( xml ... | [
0.17711900174617767,
0.3385174572467804,
0.6414650678634644,
-0.35713493824005127,
0.032213322818279266,
0.3221202790737152,
0.18062245845794678,
-0.6780912280082703,
0.4512205421924591,
0.15349656343460083,
-0.2530788481235504,
0.014919623732566833,
-0.30121660232543945,
0.077718481421470... |
def odd _ round ( x, k ) : # replace 0 with 2 to the power of 16 # multiply then mod 2 * * 16 + 1 mult = lambda x, y : ( ( x if x! = 0 else 2 * * 16 ) * ( y if y! = 0 else 2 * * 16 ) ) % ( 2 * * 16 + 1 ) # 2 * * 16 maps to 0 add = lambda x, y : ( x + y ) % ( 2 * * 16 ) # print mult ( x [ 0 ], k [ 0 ] ), " = ", x [ 0 ],... | [
-0.1557324379682541,
-0.25801095366477966,
1.0377373695373535,
-1.139007806777954,
-0.2760620415210724,
0.0408736914396286,
-0.5515249371528625,
-0.6720463633537292,
0.444372296333313,
1.0560593605041504,
-0.5912977457046509,
-0.5628265142440796,
0.18534453213214874,
0.3173205852508545,
... |
def setincrementindex ( self, * args ) : return _ itkimageserieswriterpython. itkimageserieswriterirgbus3irgbus2 _ setincrementindex ( self, * args ) | [
-0.7315154075622559,
-0.34546247124671936,
0.3311794102191925,
0.32445618510246277,
0.16882020235061646,
0.6890712380409241,
0.43359267711639404,
-0.34957683086395264,
-0.33763378858566284,
-0.10777437686920166,
-1.4082063436508179,
0.8835507035255432,
-0.6200010776519775,
-0.1194663569331... |
async def stop ( self, ctx ) : print ( " leaving voice channel. " ) await ctx. voice _ client. disconnect ( ) | [
-0.22292257845401764,
-0.5648909211158752,
0.034111253917217255,
-0.5341251492500305,
0.9789116978645325,
1.1218652725219727,
-1.4023267030715942,
-0.24702958762645721,
-0.25199437141418457,
0.1939220279455185,
0.3352700471878052,
0.6505233645439148,
-0.9972863793373108,
-0.767939627170562... |
def test _ 03 _ extractsched ( self ) : l _ node = config _ tools. yaml ( self. m _ pyhouse _ obj ). read _ yaml ( config _ file _ name ) l _ yaml = l _ node. yaml l _ sched = self. m _ config. _ extract _ light _ schedule ( l _ yaml ['schedules'] [ 0 ] ['light'] ) print ( prettyformatany. form ( l _ sched,'f1 - 03 - a... | [
0.3109132945537567,
-0.34146690368652344,
0.6056784987449646,
-0.09510728716850281,
-0.39851561188697815,
-0.7606441974639893,
0.20596668124198914,
0.3891247808933258,
0.4736335575580597,
-0.23929288983345032,
-0.46833837032318115,
0.2975434958934784,
0.493502140045166,
0.02850386872887611... |
def test _ full _ update ( self ) : recipe = sample _ recipe ( user = self. user ) recipe. tags. add ( sample _ tag ( user = self. user ) ) payload = {'title':'new title ','time _ minutes': 10,'price': 99. 99 } url = get _ detail _ url ( recipe. id ) self. client. put ( url, payload ) recipe. refresh _ from _ db ( ) se... | [
0.2798038423061371,
0.5246242880821228,
0.6613374948501587,
-0.29033851623535156,
0.19245600700378418,
-0.05098560079932213,
-1.0429655313491821,
0.09507881104946136,
-0.41580843925476074,
-0.04315764456987381,
-1.3342317342758179,
-0.613555908203125,
0.29996171593666077,
0.057287309318780... |
def print ( self, * args, * * kwargs ) - > none : # type : ignore # currently rich is unable to render ansi escapes with print so if # we detect their presence, we decode them. # https : / / github. com / willmcgugan / rich / discussions / 404 if args and isinstance ( args [ 0 ], str ) and " \ 033 " in args [ 0 ] : tex... | [
0.2712482213973999,
-0.1723383218050003,
0.5253391861915588,
0.05723511427640915,
0.07969995588064194,
-0.01536730770021677,
-1.7686691284179688,
-0.30678051710128784,
0.142288476228714,
-0.5032046437263489,
-0.2546568214893341,
0.5516541004180908,
-0.7265029549598694,
0.5490461587905884,
... |
def get ( self ) : if len ( self ) < 1 : return " wow " if self. index > = len ( self ) : self. index = 0 step = random. randint ( 1, min ( self. step, len ( self ) ) ) res = self [ 0 ] self. index + = step self. rotate ( step ) return res | [
-1.3803534507751465,
0.3930375277996063,
0.5896665453910828,
-0.4227654039859772,
0.4511537253856659,
0.02055615745484829,
0.37735962867736816,
-0.7337527275085449,
1.0319246053695679,
-0.4718838632106781,
-0.22576700150966644,
0.55157071352005,
-1.3084914684295654,
-0.948530375957489,
-... |
def test _ power _ law _ jacobian _ inverse ( power _ law _ converter, d, scale, power, expected ) : power _ law _ converter. _ power = power + 1 power _ law _ converter. scale = scale log _ j = powerlawconverter. _ log _ jacobian _ inv ( power _ law _ converter, d ) np. testing. assert _ almost _ equal ( expected, log... | [
-0.6975626349449158,
-0.48441144824028015,
0.47771409153938293,
0.18148069083690643,
-0.5216933488845825,
0.6863359808921814,
-0.5337469577789307,
0.2641458809375763,
-1.00616455078125,
0.5437256097793579,
-0.5227695107460022,
0.07573650777339935,
-0.10907059907913208,
0.5767743587493896,
... |
def turn ( self, direction _ in, direction _ out, r = - 1, * args, * * kwargs ) : if base. cornerdirection ( direction _ in, direction _ out ) > 0 : self. up ( direction _ in, r, * args, * * kwargs ) else : self. down ( direction _ in, r, * args, * * kwargs ) return direction _ in | [
-0.30638769268989563,
-0.8972489237785339,
0.5696240663528442,
-0.011981559917330742,
0.2727925479412079,
-0.09860388934612274,
0.05515555292367935,
0.12218957394361496,
0.01860303059220314,
-0.22839051485061646,
0.23441971838474274,
0.206711545586586,
-0.3260985016822815,
-0.0275034047663... |
def make _ single ( inp, iterator = none, force = false, default = none, ignore _ dict = false ) : if not isinstance ( inp, ( list, tuple, dict ) ) : return inp elif not ignore _ dict and isinstance ( inp, dict ) : inp = inp. values ( ) if len ( inp ) = = 0 : return default elif len ( inp ) = = 1 : return inp [ 0 ] eli... | [
-0.9694628119468689,
0.6029130220413208,
0.6920301914215088,
-0.006552399136126041,
-0.13888409733772278,
0.6856892704963684,
0.0471290647983551,
0.950666069984436,
0.47606703639030457,
-0.36103835701942444,
-0.31202372908592224,
0.1964234560728073,
-0.9463272094726562,
-0.8058018088340759... |
def forget _ note ( data : dictionary ) : display _ categories ( data ) category _ choice = input ( " choose category : " ) if len ( data [ category _ choice ] ) > 0 : display _ notes ( data, category _ choice ) note _ choice = int ( input ('choose note to delete :') ) data [ category _ choice ]. remove ( data [ catego... | [
-0.042647585272789,
0.306458055973053,
0.5085793137550354,
-0.37566110491752625,
0.43329373002052307,
0.5907729864120483,
0.6452869772911072,
-0.40202438831329346,
-0.25265705585479736,
0.26041102409362793,
0.5029283761978149,
0.7059760093688965,
-0.31400439143180847,
0.03237712383270264,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.