text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def to _ string ( self ) : ret = ( " name : " + self. name + " ssn : " + self. _ ssn + " " + self. address. to _ string ( ) ) return ret | [
-0.2221209704875946,
-1.286435604095459,
0.656804084777832,
-1.3868635892868042,
-0.3989207148551941,
0.241873100399971,
-1.061646580696106,
-0.5839585065841675,
0.49326246976852417,
-0.19642792642116547,
-0.905146598815918,
0.6831652522087097,
0.26646533608436584,
-0.709155797958374,
0.... |
def test _ create _ new _ raster _ from _ base _ 2d _ out _ array ( self ) - > none : extract _ archive ( src = " tests / data / spacenet. zip " ) data = read _ csv ( " tests / tiling / tiling _ segmentation _ binary - multiband _ ci. csv " ) ref _ raster = path ( data [ 0 ] ['tif'] ) out _ raster = ref _ raster. paren... | [
0.14930179715156555,
-0.9940618872642517,
0.5946118235588074,
0.6355246305465698,
0.06050996482372284,
0.20273272693157196,
1.0127637386322021,
-0.9567831754684448,
-0.6711863875389099,
-0.28603339195251465,
-0.13269329071044922,
0.08732952922582626,
0.3882511556148529,
0.5491999983787537,... |
def _ _ init _ _ ( self, filename ) : self. _ file = self. open ( filename ) self. _ entry = 0 self. _ point = 0 self. _ eof = false self. read _ entry ( ) self. _ flag _ index = len ( self. _ entry ) - 1 self. _ base _ count = self. _ flag _ index - 6 + 1 # 6 fields minimum " " " this is reset every for every image re... | [
-0.006022083573043346,
-1.0649243593215942,
0.6220958232879639,
-0.0032512249890714884,
0.12660948932170868,
0.2105848491191864,
1.4562909603118896,
0.5759625434875488,
-0.24813272058963776,
-0.0595841221511364,
-0.1994290053844452,
-0.12990586459636688,
0.16000717878341675,
0.383926302194... |
def bool _ to _ string ( bool _ value ) : if bool _ value is true : return boolean ('true'). tostring ( ) elif bool _ value is false : return boolean ('false'). tostring ( ) return none | [
0.2650267481803894,
-0.43489643931388855,
0.20496751368045807,
0.1681341677904129,
-0.1946919709444046,
-0.26833465695381165,
-0.3230368196964264,
-0.46958333253860474,
-0.2368866205215454,
0.5200743079185486,
0.0562148243188858,
0.01547276321798563,
-0.007223588414490223,
-0.5347947478294... |
def test _ write _ content _ gen ( test _ class, user, file _ name, content, mode ) : def test ( self ) : # trying to write some content to a file. if it's possible, test will fail. with self. assertraises ( sb. calledprocesserror ) as cm : sb. check _ output ( ['echo { edit } | sudo - u { user } tee - a { name } '. fo... | [
-0.20716623961925507,
-0.24907730519771576,
0.4624813199043274,
0.2200261354446411,
0.2782956063747406,
0.6593788266181946,
0.970798909664154,
-0.1832292526960373,
-0.9857011437416077,
-0.4391324520111084,
0.0420805886387825,
-0.399477481842041,
-0.1640404313802719,
0.17316608130931854,
... |
def source _ disk ( self ) - > pulumi. output [ optional [ str ] ] : return pulumi. get ( self, " source _ disk " ) | [
0.8543051481246948,
0.49211418628692627,
0.5659857988357544,
-0.12516459822654724,
-0.2079988718032837,
1.3231853246688843,
0.7473095655441284,
-0.14200560748577118,
0.6865884065628052,
-0.262348473072052,
-0.15907344222068787,
0.5917609930038452,
0.03376173973083496,
-0.6871045827865601,
... |
def get _ claims _ from _ latest _ date ( claims ) : logger. debug ('get claims from latest date.') if not claims : return [ ] latest _ date = max ( claims, key = lambda x : x. clm _ from _ dt ). clm _ from _ dt latest _ claims = [ claim for claim in claims if claim. clm _ from _ dt = = latest _ date ] return latest _ ... | [
0.5169050097465515,
-0.7655433416366577,
0.619498610496521,
0.8162793517112732,
0.46175166964530945,
0.6381343007087708,
-1.327171802520752,
-0.3653753697872162,
0.21562257409095764,
-0.20267650485038757,
0.24844931066036224,
0.80243319272995,
0.9412739276885986,
0.2530313730239868,
-0.4... |
def _ identity ( inp ) : return inp | [
-1.0552369356155396,
-1.3488492965698242,
0.22134114801883698,
0.47466573119163513,
0.205065056681633,
1.0048037767410278,
0.826900839805603,
-0.16160106658935547,
1.632111668586731,
-0.7627298831939697,
-0.9627478122711182,
-0.03507253900170326,
-0.4309218227863312,
-1.5601563453674316,
... |
def fill ( self, value, queue = none, wait _ for = none ) : self. events. append ( self. _ fill ( self, value, queue = queue, wait _ for = wait _ for ) ) return self | [
0.2148459255695343,
0.5839532613754272,
0.6280208826065063,
-0.15230858325958252,
-0.2024637907743454,
-0.17815785109996796,
-0.09209514409303665,
-0.28581610321998596,
0.3721306324005127,
-0.8376067876815796,
-0.6687668561935425,
-0.24943187832832336,
0.5782499313354492,
0.908630907535553... |
def load _ classes ( path ) : fp = open ( path, " r " ) names = fp. read ( ). split ( " \ n " ) [ : - 1 ] return names | [
-1.3282430171966553,
-0.6039897799491882,
0.7397514581680298,
-0.5830773115158081,
-0.5202608704566956,
0.5235856175422668,
-0.9593245983123779,
-0.779710590839386,
-0.28011780977249146,
1.0695185661315918,
-0.9075019359588623,
-0.21746961772441864,
0.019722916185855865,
-0.276819199323654... |
def emptycopy ( self, * args ) : return _ topods. topods _ tshape _ emptycopy ( self, * args ) | [
-1.0975499153137207,
-0.18202084302902222,
0.5966558456420898,
-0.38196349143981934,
-0.4357215166091919,
1.022229790687561,
0.7950394749641418,
-0.7364180088043213,
-0.35186880826950073,
0.3961131274700165,
-0.18948622047901154,
-0.002999882446601987,
-0.22193634510040283,
-0.759178996086... |
def interpolate _ 2d _ linear ( *, dict _ fn, re, aoa, aoa _ range = none ) : # print ( dict _ fn. keys ( ) ) if aoa _ range is none : aoa _ range = [ round ( x * 0. 10, 2 ) for x in range ( - 140, 121 ) ] # alpha from - 14 to + 12 degrees in increments of 0. 1 re _ known = sorted ( dict _ fn. keys ( ) ) p11 = ( none, ... | [
-0.4022083282470703,
-1.29522705078125,
0.8795433044433594,
-0.8833418488502502,
0.10218344628810883,
-0.4977518916130066,
0.32953941822052,
0.574834406375885,
-0.0380500927567482,
-0.10291921347379684,
0.12691183388233185,
0.32847902178764343,
0.23222267627716064,
-0.6523478031158447,
0... |
def sentenceindex ( self ) : return self. pb. sentenceindex | [
0.028898969292640686,
-0.544391930103302,
0.4461572766304016,
0.04219477251172066,
0.013526410795748234,
0.38730502128601074,
1.2166322469711304,
0.6333575248718262,
0.04442036151885986,
-0.30761218070983887,
0.28109192848205566,
-0.03380333259701729,
-2.0020058155059814,
-0.69383430480957... |
def cfb _ stats ( self, conf ) : # convert pac - 12 to pac - 10 prior to 2011 for team offense. then generate correct url. if conf = ='pac - 12'and self. year1 < 2011 : url _ off ='https : / / www. sports - reference. com / cfb / conferences / pac - 10 / { } - team - offense. html '. format \ ( self. year1 ) else : url... | [
-0.6921360492706299,
0.9033244252204895,
0.7659392952919006,
-0.8979558944702148,
0.3726320266723633,
0.02014969475567341,
0.33644425868988037,
-0.5823153853416443,
-0.4149828851222992,
0.34240418672561646,
1.0099369287490845,
0.3407993018627167,
0.7789373397827148,
0.07111294567584991,
... |
def half _ adder ( idx, a, b ) : # append sum gates ; get save index ; increment index chrom = [ [ a, b, gene _ translation. index ( " xor " ) ] ] s = idx idx = idx + 1 # append carry gates ; get save index ; increment index chrom + = [ [ a, b, gene _ translation. index ( " and " ) ] ] c = idx idx = idx + 1 return ( ch... | [
-0.17343953251838684,
-0.3437570631504059,
0.555963397026062,
0.08469607681035995,
-0.07228260487318039,
-0.2847272753715515,
-0.3511350750923157,
-0.8298160433769226,
-0.07824184745550156,
0.8879811763763428,
-0.8681440353393555,
0.3416420817375183,
-0.5420423150062561,
-0.710607886314392... |
def list _ gemeenten ( self, sort = 1 ) : def creator ( ) : url = self. base _ url + " / municipality " h = self. base _ headers p = { " orderbycode " : sort = = 1 } res = capakey _ rest _ gateway _ request ( url, h, p ). json ( ) return [ gemeente ( r [ " municipalitycode " ], r [ " municipalityname " ] ) for r in res... | [
-0.535596489906311,
0.020756512880325317,
0.4814092814922333,
0.02257349342107773,
-0.4937008023262024,
-0.05047239735722542,
-1.1650599241256714,
-0.7527197599411011,
-0.002956099109724164,
0.32420793175697327,
-0.18419568240642548,
0.2923562228679657,
-1.0714998245239258,
0.7425646185874... |
def _ pair _ samples _ with _ pipelines ( run _ info _ yaml ) : with open ( run _ info _ yaml ) as in _ handle : samples = yaml. safe _ load ( in _ handle ) if isinstance ( samples, dict ) : samples = samples [ " details " ] ready _ samples = [ ] for sample in samples : if " files " in sample : del sample [ " files " ]... | [
-0.09920169413089752,
-0.8066644668579102,
0.431656152009964,
-0.8740511536598206,
0.09764501452445984,
-1.0371688604354858,
0.1904176026582718,
0.37519481778144836,
-0.14128990471363068,
0.04284173622727394,
-0.07760849595069885,
-0.6319757699966431,
0.6446563005447388,
0.788735568523407,... |
def _ _ mapdata ( self, containerlist, schemadatadict, filtertype = " none " ) : # respect any input selection otherwise use all schema defined tables - if self. _ _ schemaidincluded : selectedtableidlist = list ( self. _ _ schemaidincluded. keys ( ) ) else : selectedtableidlist = self. _ _ sd. getschemaidlist ( ) # fo... | [
-1.040378212928772,
0.22584275901317596,
0.8031628131866455,
-0.06270761042833328,
-1.1602941751480103,
-0.27138468623161316,
0.6717970371246338,
0.04915526509284973,
0.7786053419113159,
-0.23487088084220886,
-0.011661090888082981,
0.1172480583190918,
0.48143431544303894,
1.089778184890747... |
def _ euro _ call ( s : float, k : float, t : float, r : float, sigma : float ) - > float : d1 = _ d1 ( s, k, t, r, sigma ) d2 = _ d2 ( s, k, t, r, sigma ) call = ( s * si. norm. cdf ( d1, 0., 1. ) - k * numpy. exp ( - r * t ) * si. norm. cdf ( d2, 0., 1. ) ) return round ( call, 4 ) | [
0.5238999128341675,
0.3932783901691437,
0.5160375833511353,
-0.7220982909202576,
-0.6235063672065735,
-0.3541194498538971,
-0.4511856138706207,
-0.5467635989189148,
-0.23843567073345184,
1.2086658477783203,
0.5067954063415527,
-0.35409480333328247,
0.2780107259750366,
-0.594940185546875,
... |
def _ postblueprint ( bp ) : # validate syntax and required metadata fields for key in ('description ','name ','visibility ','version') : if key not in bp ['metadata'] : bpformation. output. status ('error ', 3, " blueprint json missing metadata / % s " % key ) raise ( bpformation. bpformationfatalexeption ( " fatal er... | [
-0.925262451171875,
-0.6697900295257568,
0.9906503558158875,
0.24258458614349365,
0.15549840033054352,
0.10755583643913269,
-0.01788388378918171,
-0.2394077330827713,
-0.2610315680503845,
0.8429169058799744,
-0.6945353150367737,
0.806772768497467,
-0.6479761004447937,
0.14167550206184387,
... |
def load _ file ( self, file _ path ) : # neovim doesn't like newlines. self. nvim. current. buffer [ : ] = [ l. strip ( " \ n " ) for l in self. files [ file _ path ] ] | [
0.677737295627594,
-0.5029627084732056,
0.29798954725265503,
-0.11713169515132904,
0.20849739015102386,
-0.008441168814897537,
-0.17160175740718842,
0.03505830839276314,
-0.4394843280315399,
-0.19548819959163666,
-0.7443780303001404,
-0.11885811388492584,
-0.2119072526693344,
0.46399229764... |
def get _ stream _ compaction _ status ( self, stream, local = false ) : if self. persistent : url _ endpoint ='/ streams / persistent / stream / { } / compaction? local = { } '. format ( stream, local ) # else : # url _ endpoint ='/ streams / non - persistent / stream / { } / compaction? local = { } '. format ( stream... | [
-0.29114189743995667,
-0.4940566122531891,
0.9373621344566345,
0.16268543899059296,
-0.27706536650657654,
-0.6767452955245972,
-0.35681474208831787,
-0.4577033817768097,
-0.27681297063827515,
0.0649440735578537,
-0.05834697559475899,
0.6699475646018982,
-0.9491488933563232,
0.6581230759620... |
def set _ visible ( self, value, fieldobject, * arguments, * * named ) : if value and not self. _ frame : e = threading. event ( ) global _ guithread if not _ guithread : _ guithread = threading. thread ( name = " guithread ", target = self. create, args = ( e, ) ) _ guithread. start ( ) else : callinguithread ( self. ... | [
0.2877417802810669,
0.37410444021224976,
0.8042647838592529,
0.03948409855365753,
-0.18667718768119812,
0.3693719804286957,
0.12423305213451385,
-0.5885176062583923,
-0.04561010003089905,
-0.0056627956219017506,
-0.6820806860923767,
0.516069769859314,
-0.6048241853713989,
0.757203876972198... |
def center ( window ) : remaining _ width = resolution. width - window. width gaps _ width = remaining _ width / / 2 remaining _ height = full _ height - window. height gaps _ height = remaining _ height / / 2 window. moveto ( gaps _ width, gaps _ height ) | [
0.38916122913360596,
-0.7023960947990417,
0.676194965839386,
0.3029758930206299,
-0.38946858048439026,
0.5969426035881042,
1.3919503688812256,
0.19302158057689667,
1.0100585222244263,
-0.15656955540180206,
0.567910373210907,
-0.2166220247745514,
-0.7536329030990601,
0.6349109411239624,
0... |
def _ _ init _ _ ( self, name, gender, strength ) : super ( ). _ _ init _ _ ( name, gender, strength ) | [
0.5900697112083435,
-0.43479859828948975,
0.671537458896637,
0.49316439032554626,
-0.13068462908267975,
0.8207788467407227,
-0.7208858132362366,
-0.001640709931962192,
-0.8761160373687744,
-0.37318965792655945,
-1.3055320978164673,
-0.4238179922103882,
0.10545292496681213,
0.36121913790702... |
def revlogheader ( self ) : return none | [
0.6098591089248657,
-0.6675371527671814,
0.5189009308815002,
-0.30032551288604736,
-0.48352062702178955,
0.23156172037124634,
-0.4179401397705078,
0.1955908238887787,
-0.08716053515672684,
-1.1051781177520752,
-0.1906164139509201,
0.9760043621063232,
-0.8265762329101562,
-1.448397159576416... |
def _ handle _ unsubscribe ( self, address ) : log. info ( " unsubscribing from address % s ", address ) yield from self. _ notifier. unwatch _ server ( address ) | [
0.7949831485748291,
0.5057933330535889,
0.37785449624061584,
-0.5412125587463379,
-1.1624606847763062,
-0.21141394972801208,
0.09913913905620575,
0.31158921122550964,
0.5262566208839417,
-0.02011134847998619,
-0.11110756546258926,
1.182381510734558,
0.48385584354400635,
0.4406270384788513,... |
def quantize ( data : np. ndarray ) - > np. ndarray : def _ quantize ( d ) : return np. digitize ( d, np. arange ( 0, 255 ) ) return np. apply _ along _ axis ( _ quantize, axis = 0, arr = ( data + 1 ) * 128 ) | [
-0.6743346452713013,
0.6764591932296753,
0.4361129403114319,
-0.4587559998035431,
-0.31243669986724854,
-0.5273165702819824,
-0.0014796411851420999,
-0.8802427649497986,
1.2231389284133911,
-0.22580614686012268,
-0.12713757157325745,
0.4234696328639984,
0.02582351118326187,
0.2577350735664... |
def itksmoothingrecursivegaussianimagefilteriuc2iuc2 _ cast ( * args ) : return _ itksmoothingrecursivegaussianimagefilterpython. itksmoothingrecursivegaussianimagefilteriuc2iuc2 _ cast ( * args ) | [
0.09986421465873718,
0.0961456373333931,
0.06713858991861343,
-0.5999322533607483,
-0.314795583486557,
0.4639739990234375,
0.6889978051185608,
-0.2795591354370117,
-0.9713562726974487,
-0.5464858412742615,
0.561418354511261,
0.8830519914627075,
0.52635657787323,
1.097434163093567,
0.3247... |
async def test _ discovery _ removal _ relay _ as _ light2 ( hass : homeassistant, mqtt _ mock : mqttmockhaclient, caplog : pytest. logcapturefixture, setup _ tasmota, ) - > none : config1 = copy. deepcopy ( default _ config ) config1 [ " rl " ] [ 0 ] = 1 config1 [ " so " ] [ " 30 " ] = 1 # enforce home assistant auto ... | [
0.5257929563522339,
0.19150571525096893,
0.3889705240726471,
0.6492074131965637,
0.02112915925681591,
0.3201870620250702,
0.9335544109344482,
0.49661582708358765,
0.5900814533233643,
-0.5638478994369507,
-0.7743789553642273,
0.23502117395401,
0.5621368288993835,
1.0119013786315918,
0.799... |
def _ resize ( self, m ) : resizing _ array = [ none ] * m for i in range ( self. n ) : resizing _ array [ i ] = self. resizing _ array [ i ] self. resizing _ array = resizing _ array self. capacity = m | [
-1.0805164575576782,
0.8143609762191772,
0.47090011835098267,
-0.21242979168891907,
0.26842039823532104,
-1.1178312301635742,
0.09792415797710419,
0.04005850851535797,
0.08366631716489792,
0.11593328416347504,
-0.4631803631782532,
-0.49449315667152405,
-0.38820600509643555,
0.3650539815425... |
def on _ servicegroup _ activated ( self, p0 ) : # todo : not implemented yet | [
0.46380189061164856,
-0.30862581729888916,
0.27388882637023926,
-0.1260489970445633,
-0.3613254725933075,
-0.5502676963806152,
0.7267881035804749,
0.22682473063468933,
-0.28602105379104614,
0.903394877910614,
-1.0043928623199463,
0.25950655341148376,
-0.06315682083368301,
0.647501349449157... |
def parse _ products ( self, infile ) : raise notimplementederror ( ) | [
-0.6675366759300232,
-0.7393251657485962,
0.46361199021339417,
0.5179322957992554,
-0.025010736659169197,
1.2042123079299927,
0.8962194919586182,
-0.2265876680612564,
-0.26824620366096497,
0.26108142733573914,
-0.6219211220741272,
-0.22878849506378174,
-0.4354883134365082,
-0.0978217646479... |
def getdjangourlpatterns ( ) : from soc. modules. gci. views. models. program import view as gci _ program _ view program _ params = gci _ program _ view. getparams ( ). copy ( ) patterns = [ ( r'^ tasks / gci / parental _ consent _ form / reminder / spawn / % ( key _ fields _ pattern ) s $'% program _ params,'soc. mod... | [
-0.2988615334033966,
0.979033887386322,
0.5599191784858704,
-0.04572693258523941,
0.21749362349510193,
1.1923831701278687,
0.9615538716316223,
-0.05266176164150238,
-0.24481487274169922,
0.3718032240867615,
-0.5350826978683472,
0.5798361301422119,
0.2974095642566681,
0.7335523366928101,
... |
def _ _ init _ _ ( self, relays _ start _ config : list [ bool ] = none, input _ pull _ up : list [ bool ] = none, inputs _ polling _ time : list [ float ] = none, inputs _ debounce _ time : list [ float ] = none, on _ input _ functions : list [ callable ] = none ) : # pins self. _ input _ pins : list [ int ] = [ 13, 1... | [
0.190446674823761,
0.11298967152833939,
0.7095619440078735,
0.022855553776025772,
-0.40862467885017395,
-0.20829272270202637,
0.4196094572544098,
-0.04668286815285683,
0.3097645342350006,
-0.19023306667804718,
-0.5875665545463562,
-0.20692922174930573,
-0.04832950979471207,
0.3904954791069... |
def get _ target _ compute _ version ( target = none ) : # 1. input target object # 2. target. current ( ) target = target or target. current ( ) if target and target. arch : major, minor = target. arch. split ( " _ " ) [ 1 ] return major + ". " + minor # 3. gpu compute version if tvm. cuda ( 0 ). exist : return tvm. c... | [
-0.7609907984733582,
0.015103514306247234,
0.5323446989059448,
0.6072098612785339,
0.029020218178629875,
-0.032086800783872604,
0.5800294876098633,
-0.4880515933036804,
0.032756127417087555,
1.0390530824661255,
0.4555690884590149,
1.240346908569336,
0.44695618748664856,
0.3242866098880768,... |
def _ calculate _ utm ( self, pos, longorigin = none ) : if self. longorigin : longorigin = self. longorigin try : ( pos [ " z " ], pos [ " e " ], pos [ " n " ] ) = self. _ wgs84 _ utm ( pos [ " lat " ], pos [ " lon " ], longorigin ) return true except : # todo : log errors return false | [
-1.1849688291549683,
-0.05348039045929909,
0.48422786593437195,
-0.930133581161499,
-0.1352270394563675,
-0.14120541512966156,
-0.5403677821159363,
0.8556964993476868,
-0.1409614533185959,
-0.23654374480247498,
-0.5755741596221924,
-1.3958635330200195,
0.2606218159198761,
-0.38192522525787... |
def inline ( self, callback ) : if callable ( callback ) : self. _ default _ inline = callback return callback elif isinstance ( callback, str ) : def decorator ( fn ) : self. add _ inline ( callback, fn ) return fn return decorator else : raise typeerror ( " str expected { } given ". format ( type ( callback ) ) ) | [
-0.3883388936519623,
-0.028111279010772705,
0.5208773612976074,
0.1607743799686432,
-0.6126892566680908,
0.1279546618461609,
-0.0070550828240811825,
0.7374759912490845,
0.789082944393158,
-0.47734004259109497,
0.20939429104328156,
0.039895836263895035,
-0.7307586669921875,
-0.0248489696532... |
def alphabet ( self ) : # - > any | none :... | [
-0.17621225118637085,
-0.537377119064331,
0.5971753597259521,
0.7147486209869385,
1.2069768905639648,
0.023845821619033813,
0.5606832504272461,
-1.2382113933563232,
0.4459714889526367,
-1.3243963718414307,
-0.7765836715698242,
1.065788984298706,
-0.449408620595932,
0.384357213973999,
-0.... |
def debug ( self, signal _ raw, lead, r _ peak, before, after ) : import matplotlib. pyplot as plt import matplotlib matplotlib. use ('macosx') t _ sig = signal _ raw. shape [ 0 ] / self. f _ s t _ vec = np. arange ( 0, t _ sig, 1 / self. f _ s ) dummy = ecg. ecg ( signal _ raw, sampling _ rate = self. f _ s, show = fa... | [
0.7905473709106445,
0.19641251862049103,
0.9395743608474731,
-0.5636544823646545,
-0.27439597249031067,
0.14461353421211243,
0.42297470569610596,
0.249859020113945,
0.21446235477924347,
0.06127345561981201,
-0.5497956871986389,
0.5257377028465271,
0.06011756509542465,
-0.06137789785861969,... |
def require _ auth ( self, path : str, excluded _ paths : list [ str ] ) - > bool : return false | [
-0.7595616579055786,
0.2259213775396347,
0.37093085050582886,
1.16762113571167,
-1.1005711555480957,
1.3712775707244873,
-0.2868579924106598,
0.6608617305755615,
0.2721065282821655,
-0.07233389467000961,
0.13936325907707214,
-0.09608230739831924,
-1.406139612197876,
-0.13869105279445648,
... |
def scale _ vector ( v, w ) : if w = = 1 : return vector ( copy = v ) elif len ( v. _ index ) : return vector ( index = v. _ index, value = [ w * x for x in v. _ value ] ) else : # ` v ` is empty return vector ( ) # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ... | [
-0.2505781054496765,
-0.5910931825637817,
0.5725582838058472,
-0.26684609055519104,
-0.6485358476638794,
-0.7370406985282898,
-0.1457151621580124,
-0.11098317801952362,
0.5850518941879272,
0.45341914892196655,
0.285926878452301,
0.8746294379234314,
0.07952868938446045,
-0.00841944571584463... |
def note _ list _ by _ offset ( self, offsets : list ) : pure _ notes = [ ] part _ number = 0 parts = self. score. getelementsbyclass ( stream. part ) for part in parts : part _ number + = 1 measures = part. getelementsbyclass ( stream. measure ) for measure in measures : voices = measure. getelementsbyclass ( stream. ... | [
-0.43336859345436096,
-1.085634708404541,
0.8317751288414001,
-0.20267099142074585,
-0.1599288433790207,
1.028212547302246,
-0.3493167757987976,
-0.5481873154640198,
0.3722008764743805,
0.3697386384010315,
-0.47418785095214844,
0.16481463611125946,
-0.012149550020694733,
0.3222968280315399... |
def shipped _ package ( self, parameters ) : str _ payload _ 2 = json. dumps ( parameters ) ( rc, mid ) = self. _ mqtt _ client. publish ( self. _ pub _ topic, str _ payload _ 2, qos = self. _ qos ) | [
-0.7242563962936401,
-0.30605262517929077,
0.2520473301410675,
-0.5602067708969116,
0.10409104079008102,
0.3195025324821472,
-0.7136690616607666,
-0.7058621644973755,
-0.11083459109067917,
1.0300443172454834,
-0.677530825138092,
0.8308254480361938,
-0.5330724120140076,
0.24616998434066772,... |
def zero _ angles ( a ) : a = a - 2 * pi if a > pi else a a = a + 2 * pi if a < - pi else a return a | [
-0.730571985244751,
-0.8266834616661072,
0.5456525087356567,
-0.1746675968170166,
-0.1680075228214264,
0.10210675001144409,
0.9130455255508423,
0.6184231042861938,
0.8283714652061462,
-0.508655846118927,
-0.10542815178632736,
0.2832114100456238,
-0.3774489760398865,
-0.5329277515411377,
... |
def repair _ keyspace ( keyspace, start _ steps = 100 ) : success, ring _ tokens, error = get _ ring _ tokens ( ) if not success : logging. error ( " error fetching ring tokens : { 0 } ". format ( error ) ) return false success, host _ token _ list, error = get _ host _ tokens ( ) if not success : logging. error ( " er... | [
-0.8062452077865601,
0.388662725687027,
0.6917639970779419,
0.23610390722751617,
-0.39336061477661133,
-0.01424115989357233,
0.10992531478404999,
-0.05315219610929489,
-0.3863830268383026,
-0.0458829402923584,
-0.6433162093162537,
0.0436389334499836,
-0.7667129635810852,
0.7259001135826111... |
def unmake _ move ( self, move : int ) : self. board [ move - 1 ] = 0 | [
-1.0473023653030396,
0.6592260003089905,
0.47906458377838135,
-0.24297595024108887,
0.3666488230228424,
-0.3122657835483551,
0.4300478398799896,
1.081224799156189,
-0.11656969785690308,
0.44614171981811523,
-0.3440167009830475,
0.4158090651035309,
-0.914641797542572,
-0.23187915980815887,
... |
def do _ i _ post _ a _ toot ( ) - > bool : probability = desired _ toots _ per _ day / 216 # 0. 32 ish if secrets. randbelow ( 10000 ) / 10000 < = probability : return true return false | [
-0.9034057259559631,
1.0626343488693237,
0.648733377456665,
-0.13573399186134338,
-0.1058223620057106,
0.6003145575523376,
-0.3528982102870941,
-0.9698869585990906,
-0.24475225806236267,
-0.2820620536804199,
-0.029988430440425873,
-0.14867445826530457,
-0.45292580127716064,
-0.195702373981... |
def report ( self, msg, level ='info') : if self. verbose = = 2 : prefix = " " if level! ='info': prefix = " [ " + level + " ] " print msg elif self. verbose : if level = ='error': sys. stdout. write ( " * " ) else : sys. stdout. write ( ". " ) for reporter in self. _ reporters : reporter. post ( msg ) if self. _ repor... | [
-0.3142985999584198,
0.29386067390441895,
0.6615326404571533,
0.13257823884487152,
0.9845418334007263,
-0.34352609515190125,
0.04228399693965912,
0.5315173268318176,
-0.9605879783630371,
-0.3773658871650696,
-0.05605065077543259,
-0.03776644542813301,
-1.4655743837356567,
1.327717900276184... |
def geo _ distance ( latitudes, longitudes ) : distance = 0 lon = np. radians ( longitudes ) lat = np. radians ( latitudes ) for i in range ( 1, len ( lon ) ) : x = ( lon [ i ] - lon [ i - 1 ] ) * np. cos ( ( lat [ i ] + lat [ i - 1 ] ) / 2. 0 ) y = lat [ i ] - lat [ i - 1 ] distance + = 6371e3 * np. sqrt ( x * x + y *... | [
-0.21452198922634125,
0.18782910704612732,
0.45932629704475403,
-0.45226961374282837,
-0.28168192505836487,
0.7784562706947327,
-0.9598298072814941,
0.6570993065834045,
0.08512870967388153,
0.7222560048103333,
0.10904835164546967,
0.2792712152004242,
-0.4135829508304596,
-0.118764594197273... |
def _ init ( self ) : super ( gamenumpy, self ). _ init ( ) # fates grid. each item contains the fate of the cell at the location # for the next generation. self. fates = np. zeros ( ( self. width, self. height ), dtype = np. int8 ) self. fates. fill ( fate. staydead ) # ages grid. each item is the number of generation... | [
-0.7285439968109131,
0.2786225974559784,
0.6277781128883362,
-0.15911506116390228,
0.7875048518180847,
0.39789578318595886,
0.2644994854927063,
-0.1721908450126648,
-0.5556727051734924,
0.030112653970718384,
-0.1328568458557129,
-0.020795686170458794,
1.525519847869873,
1.0613940954208374,... |
def medae ( ae, nan _ flag = true ) : if nan _ flag : return np. nanmedian ( ae, axis = 0 ) else : return np. median ( ae, axis = 0 ) | [
-0.40895918011665344,
0.14877213537693024,
0.5372253060340881,
0.2051054984331131,
0.1906135529279709,
0.6128832101821899,
-0.2117985337972641,
0.8801594376564026,
0.9827157855033875,
0.06668785214424133,
1.0841343402862549,
0.45859071612358093,
0.1396956890821457,
0.6177141070365906,
1.... |
def getrenderedtemplate ( pathtotemplate, templatefilename, templatevalues ) : # get the environment jinjaenv = getjinjaenv ( pathtotemplate ) # render and return the template return getrenderedtemplatewithenvironment ( jinjaenv, templatefilename, templatevalues ) | [
-0.3786284327507019,
-0.36714404821395874,
0.41089382767677307,
-0.5318979620933533,
-0.4731864035129547,
0.3083876669406891,
-0.5503256916999817,
0.20933902263641357,
-1.290228247642517,
-0.11908076703548431,
0.43730345368385315,
0.013609257526695728,
-0.471126914024353,
-0.49177733063697... |
def plot _ points _ dbt _ rh ( self, points : dict [ str, any ], connectors : list [ dict [ str, any ] ] | none = none, convex _ groups : list [ dict [ str, any ] ] | list [ convexgrouptuple ] | none = none, scatter _ style : dict [ str, any ] | none = none, ) - > chartannots : data _ points, data _ series = load _ poi... | [
0.25907590985298157,
0.41546234488487244,
0.597933828830719,
-0.07967205345630646,
-0.1450352668762207,
0.25740256905555725,
-0.44382935762405396,
0.1822255551815033,
-0.20549482107162476,
-0.20321327447891235,
0.027446957305073738,
1.170897364616394,
-0.41020405292510986,
-0.3661852478981... |
def lower ( self ) : return self. center ( ) * 2. 0 * * ( - 1. 0 / ( 2. 0 * self. order ) ) | [
1.1455751657485962,
-1.3214436769485474,
0.5639890432357788,
-0.31030353903770447,
0.14434809982776642,
0.34115275740623474,
0.04973568767309189,
-1.0234910249710083,
0.3889480531215668,
-0.6111186742782593,
0.1692773550748825,
0.29515576362609863,
-1.0155085325241089,
0.5399455428123474,
... |
def nexttoken ( self, stng ) : if len ( stng ) = = 0 : return none, " " rest = stng # skip whitespaces... while true : mr = re. match ( self. wsregexp, rest ) if mr is none : break rest = mr. group ( " rest " ) if rest = = " " : return none, " " # match parentheses nextchar = rest [ 0 ] if nextchar = = " ( " or nextcha... | [
-0.43661797046661377,
-1.0982505083084106,
0.8746904730796814,
-1.11798095703125,
-1.5243381261825562,
-0.6091979146003723,
-0.06028646603226662,
-0.08116525411605835,
-0.12012127786874771,
-0.1905006766319275,
-0.5126528739929199,
0.43538862466812134,
-0.4340847134590149,
-0.0393418855965... |
def slice ( self, offset : int, length : int ) - > " dataframe " : return wrap _ df ( self. _ df. slice ( offset, length ) ) | [
-0.6126012802124023,
0.02454627864062786,
0.3139309883117676,
-0.1162983849644661,
-0.6628645658493042,
-0.08166905492544174,
-0.4297943115234375,
-0.28832244873046875,
-0.2864251732826233,
-0.4633171260356903,
0.28332704305648804,
1.0729906558990479,
0.15459603071212769,
-2.25299572944641... |
def add _ fc ( self, nout ) : if len ( self. _ _ fmaps ) = = 0 : raise valueerror ('specify the number of input dimensions and the image size!') if nout = = - 1 : nout = self. _ _ fmaps [ - 1 ] self. _ _ model. append ( " { 0 } : add ( nn. linear ( { 1 }, { 2 } ) ) ". format ( self. _ _ blocks [ - 1 ], self. _ _ fmaps ... | [
-0.3751664459705353,
-0.04005274921655655,
0.649930477142334,
-0.13892126083374023,
-0.3249299228191376,
-0.14425984025001526,
0.5682869553565979,
-0.2542644143104553,
-0.020426996052265167,
-1.3242559432983398,
-0.5191997289657593,
-0.27121269702911377,
-0.9721223711967468,
0.457162052392... |
def add _ copies ( self, copy _ num = 1 ) : if self. shelf is not none : print ( " adding copies. " ) results = [ ] for x in range ( copy _ num ) : new _ book _ copy = copy. deepcopy ( self ) new _ book _ copy. shelf = none new _ book _ copy. copy = self. get _ latest _ copy ( ) + 1 new _ book _ copy. enshelf ( self. s... | [
-1.259791612625122,
0.3070323169231415,
0.6733214259147644,
1.493294358253479,
0.5634609460830688,
0.4780716598033905,
0.7101129293441772,
-0.07691509276628494,
-0.1419125497341156,
-0.15725666284561157,
-0.09555355459451675,
-0.3890411853790283,
0.11312887072563171,
0.7091770768165588,
... |
def test _ asteroid _ velocity _ frame _ shifts ( ) : time1 = time. time ('2018 - 12 - 13 9 : 00') dt = 12 * u. hour time2 = time1 + dt # make the silly but simplifying assumption that the astroid is moving along # the x - axis of gcrs, and makes a 10 earth - radius closest approach v _ ast = [ 5, 0, 0 ] * u. km / u. s... | [
0.3079582154750824,
-0.23276153206825256,
0.9312576651573181,
-0.5978627800941467,
-0.0130627965554595,
0.7898127436637878,
-0.5462017059326172,
-1.0430200099945068,
-0.04608578607439995,
-0.2494221329689026,
-0.13638707995414734,
0.4198005795478821,
0.4973772466182709,
0.17752574384212494... |
def getuni ( self, id ) : if id > = 30000 and id < = 30899 : return xbmcutil. addon. getlocalizedstring ( id ) elif id > = 32800 and id < = 32999 : return xbmcutil. addon. _ scriptdata. getlocalizedstring ( id ) else : return self. xbmc. getlocalizedstring ( id ) | [
-0.2818664014339447,
0.008589237928390503,
0.6397854089736938,
-0.7900132536888123,
-0.15212348103523254,
-0.4260646104812622,
-0.7190470099449158,
-0.4712930917739868,
1.3000614643096924,
-0.24568691849708557,
-0.07412734627723694,
1.534348964691162,
-1.2328418493270874,
-0.25420981645584... |
def create _ superuser ( self, email, name, password ) : user = self. create _ user ( email, password = password, name = name, ) user. is _ admin = true user. is _ staff = true user. save ( using = self. _ db ) return user | [
0.8064666390419006,
0.8364394307136536,
0.5144433379173279,
0.5886093974113464,
0.3207187354564667,
0.7472968101501465,
-0.9065731167793274,
-0.13374336063861847,
-0.1513873040676117,
-0.34411516785621643,
-1.8734159469604492,
-0.21663892269134521,
-0.5359848141670227,
-0.5494410991668701,... |
def handle _ event ( self, ev ) : try : event _ data = ev. data if ev. id = ='process _ batch': nfi = event _ data ['sa _ req _ list'] [ 0 ] ['agent _ info'] ['context'] ['nfi _ id'] nf = event _ data ['sa _ req _ list'] [ 0 ] ['agent _ info'] ['context'] ['nf _ id'] else : nfi = event _ data ['context'] ['context'] ['... | [
0.1584579050540924,
-0.32432645559310913,
1.0570838451385498,
1.1186463832855225,
0.5542309880256653,
0.5529111623764038,
-0.3448551595211029,
-0.0019475078443065286,
0.07710505276918411,
-0.19862526655197144,
0.1236204281449318,
-0.36093732714653015,
-0.033643871545791626,
0.7391138076782... |
def comparer ( self ) : return self. comparer _ value | [
0.25528690218925476,
-1.3714460134506226,
0.21782000362873077,
-0.3316170871257782,
-0.9641066789627075,
0.9467931985855103,
0.3489478528499603,
-0.37986308336257935,
-0.2544509470462799,
-0.9139256477355957,
0.890406608581543,
-0.03907642140984535,
-0.22981227934360504,
1.291350245475769,... |
def conditional _ skellam _ cdf _ root ( b, target, tol = 1e - 8 ) : if target < = 0 or target > = 1 : raise valueerror a = b e = 1 count = 0 floor = 1e - 6 max _ steps = 50 size = tol2size (. 5 * tol, b ) poi _ b, dpoi _ b = poisson _ vector ( b, size ) rng _ b = np. arange ( size ) while e > abs ( tol ) : size = tol2... | [
0.796434760093689,
-0.04070978984236717,
0.9553629755973816,
0.0965343564748764,
-0.5102858543395996,
-0.6838085651397705,
0.23706603050231934,
0.1957036852836609,
0.16711273789405823,
0.6945844292640686,
0.5353056788444519,
0.431541383266449,
0.06258270889520645,
0.08981583267450333,
-0... |
def _ minimize _ replica ( self, replica _ index ) : # create and cache integrator and context if needed. if not hasattr ( self,'_ context') : self. _ cache _ context ( ) context = self. _ context # retrieve thermodynamic state. state _ index = self. replica _ states [ replica _ index ] # index of thermodynamic state t... | [
-0.4342734217643738,
-0.46810731291770935,
0.47330546379089355,
-1.1092609167099,
-0.7268577814102173,
-0.6588639616966248,
0.35518524050712585,
-0.014532949775457382,
0.3101363480091095,
0.21213088929653168,
-0.025503670796751976,
-0.1312442421913147,
-0.3130166828632355,
-0.6485616564750... |
def _ feature _ to _ pad _ size ( self, feature _ list, axis ) : feature _ to _ size = lambda f : none if f. ndim = = 1 else f. shape [ axis ] size _ to _ max = lambda list : none if list [ 0 ] is none else max ( list ) lengths = [ ] for feature in feature _ list : sizes = list ( map ( feature _ to _ size, feature ) ) ... | [
0.02402746118605137,
0.7401981353759766,
0.6736765503883362,
0.8130810856819153,
0.744378387928009,
-0.2946210205554962,
-0.3543964922428131,
1.0889188051223755,
0.39314478635787964,
0.5240366458892822,
-1.0298068523406982,
0.10953589528799057,
0.43258795142173767,
0.8922390341758728,
0.... |
def _ runinretryloop ( self, repeat _ id, perform _ dry _ run _ before ) : resume _ attempt _ id = 0 if perform _ dry _ run _ before : resume _ attempt _ id = 1 for attempt _ id in xrange ( resume _ attempt _ id, self. _ attempt _ count ) : try : if perform _ dry _ run _ before : logging. info ('do sandwich dry run att... | [
-0.6787297129631042,
-0.022943230345845222,
0.8099420070648193,
0.03934330493211746,
0.25061216950416565,
-0.3295811116695404,
0.9422262907028198,
-0.38016650080680847,
0.4474889934062958,
0.11972781270742416,
0.31468746066093445,
0.6939873099327087,
-0.5220685601234436,
-0.174816653132438... |
def check ( self, spf = none ) : self. mech = [ ] # unknown mechanisms # if not strict, certain permerrors ( mispelled # mechanisms, strict processing limits exceeded ) # will continue processing. however, the exception # that strict processing would raise is saved here self. perm _ error = none try : self. lookups = 0... | [
0.07995693385601044,
0.24442802369594574,
0.5279396772384644,
-0.005463522858917713,
-0.6687877178192139,
0.3101823329925537,
0.5074058175086975,
0.8612664937973022,
0.39751875400543213,
-0.3204790949821472,
0.10147275030612946,
-0.07859328389167786,
-1.2523821592330933,
-0.105846948921680... |
def addnetwork ( self, session, network ) : self. getlogger ( ). debug ('adding network [ % s ]'% network ) try : self. getnetwork ( session, network. getaddress ( ), network. getnetmask ( ) ) raise networkalreadyexists ('network [ % s ] already exists'% ( network ) ) except networknotfound : # ok. pass dbnetwork = sel... | [
-1.16304612159729,
0.5484181642532349,
0.5860865116119385,
0.27109163999557495,
1.2908751964569092,
-0.10195888578891754,
-0.2908395230770111,
-1.1141104698181152,
1.7997817993164062,
-0.8225774765014648,
-0.31900152564048767,
-1.0032386779785156,
-0.8974177837371826,
-0.057502325624227524... |
def _ sign _ delegate _ or _ undelegate ( transaction _ dict, private _ key ) : # preliminary steps if transaction _ dict [ " directive " ] not in [ directive. delegate, directive. undelegate ] : raise typeerror ( " only delegate or undelegate are supported by _ sign _ delegate _ or _ undelegate " ) # first common step... | [
0.3409697413444519,
0.10242938250303268,
0.589940071105957,
-0.8960189819335938,
0.14325043559074402,
-0.8232890367507935,
-0.6259240508079529,
0.7190985083580017,
0.1149735227227211,
0.39467427134513855,
0.5467376708984375,
-0.12252036482095718,
0.007162093184888363,
0.3678502142429352,
... |
def collectderivations ( args ) : n, tree, sent, tags, treestr = args msg ='% d. % s'% ( n,''. join ( sent ) ) fragments = counter ( ) # find derivations for this tree derivations, msg1, chart = disambiguation. treeparsing ( [ tree ], sent, grammar, numderivs, backtransform, tags = tags ) if not chart : # no parse msg ... | [
0.2828749716281891,
0.3586297631263733,
0.7021881341934204,
-0.7048608660697937,
0.31756025552749634,
-0.9064309000968933,
0.6199619770050049,
-0.033388640731573105,
-0.3509328067302704,
-0.1743926703929901,
-0.5602211356163025,
0.10189658403396606,
0.28823667764663696,
0.9765528440475464,... |
def user _ get _ topics ( user, project ) : for item in user ['projects'] : if item ['project'] = = project : return item ['topics'] return [ ] | [
0.12985236942768097,
-0.3318609297275543,
0.22905012965202332,
0.9538537859916687,
-0.07373492419719696,
0.5139539837837219,
-1.5336248874664307,
-0.8882097601890564,
-0.3487468659877777,
0.7124799489974976,
0.29663512110710144,
0.33133310079574585,
-0.012959333136677742,
-0.78323823213577... |
def error _ string ( mqtt _ errno ) : if mqtt _ errno = = mqtt _ err _ success : return " no error. " elif mqtt _ errno = = mqtt _ err _ nomem : return " out of memory. " elif mqtt _ errno = = mqtt _ err _ protocol : return " a network protocol error occurred when communicating with the broker. " elif mqtt _ errno = = ... | [
-0.21686142683029175,
-1.3338452577590942,
0.47848188877105713,
-0.9694728255271912,
-0.9286752939224243,
0.2452695518732071,
-0.6869543790817261,
-0.4290969669818878,
0.14439493417739868,
0.0475863441824913,
-0.07289755344390869,
0.43004676699638367,
-0.30198773741722107,
-0.0410512872040... |
def set _ dimensions ( self, value ) : self. dimensions = value self. finalize ( self. absolute _ size, pixel _ location = self. absolute _ location, depth = self. depth ) | [
-0.6749557852745056,
0.5635517835617065,
0.2652783989906311,
-0.6782833337783813,
-0.47082778811454773,
0.9242215156555176,
1.007734775543213,
-0.4873877465724945,
-0.3783576190471649,
-0.2946476340293884,
-0.3219025135040283,
0.08141645044088364,
0.7820623517036438,
1.5068401098251343,
... |
def make _ datadir ( self ) : try : if os. path. isdir ( self. data _ dir ) = = false : os. makedirs ( self. data _ dir ) except exception as error : raise runtimeerror ( error ) | [
0.25964757800102234,
0.7356144189834595,
0.6342044472694397,
-0.689082145690918,
0.32753321528434753,
0.9925146102905273,
0.19894719123840332,
0.12688584625720978,
-0.4178982675075531,
-1.8141553401947021,
0.3936479687690735,
0.7127652764320374,
0.12164907157421112,
1.078201413154602,
0.... |
def save _ library ( self ) : if self. _ library is not none : self. cache. add ( cache. cache _ library,'library ', self. _ library, ttl = cache. ttl _ infinite, to _ disk = true ) | [
-0.6753830909729004,
-0.2627362012863159,
0.4529801905155182,
-0.5727316737174988,
0.9434073567390442,
0.43788063526153564,
0.08217430859804153,
0.08423349261283875,
-0.11571022868156433,
0.577856183052063,
-1.320518970489502,
-0.9613378047943115,
-0.8204166293144226,
0.5838584303855896,
... |
def build _ asn1 ( context, recipe, bindata = [ ], ofs = 0, outer _ class = none ) : if type ( recipe ) = = int : # numbers refer to a dercursor index number offset = recipe return ofs + offset elif recipe [ 0 ] = ='_ named': # dictionaries are asn. 1 constructed types # todo : old # ( _ named, pck, map ) = recipe ( _ ... | [
-0.9774932861328125,
-0.27123773097991943,
0.9817456007003784,
0.3641432225704193,
-1.098886251449585,
-0.39540770649909973,
-0.1647191345691681,
-0.008574241772294044,
0.8001486659049988,
-0.4236849248409271,
-0.18532900512218475,
0.5410977005958557,
0.4374028146266937,
-0.521640598773956... |
def definemember ( filenode, node, member, release, include _ version, meta ) : cgen = cgen ( ) rtype, name, arrays, args = cgen. getcomponents ( member, release,'return') log _ body ='\ " % s : : % s ( ) \ " ;'% ( node. getname ( ), cgen. getstructname ( member, release, include _ version ) ) if len ( log _ body ) > 6... | [
0.7289184927940369,
-0.32594993710517883,
0.8971363306045532,
-0.011340662837028503,
-0.686160683631897,
-0.10185317695140839,
-0.555180549621582,
0.310779333114624,
-0.7602594494819641,
0.4757084548473358,
0.23584263026714325,
0.6439013481140137,
-0.2881513237953186,
0.04712451994419098,
... |
def parse _ prov ( self, prov _ json ) : self. _ bundle = prov. json. load ( open ( prov _ json ), cls = prov. provbundle. jsondecoder ) return self. _ bundle | [
-0.8366779685020447,
-0.47770312428474426,
0.49842631816864014,
-0.4468878507614136,
-1.487937331199646,
0.365242600440979,
-0.08596202731132507,
-0.11339913308620453,
0.3676835894584656,
0.8133595585823059,
0.1670105904340744,
-0.33232131600379944,
-0.6395583748817444,
-0.5606434345245361... |
def gen _ next _ float ( self ) : return self. _ gen _ next ( ) * ( 1. 0 / self. _ uint32 _ max ) | [
-0.32987576723098755,
1.258770227432251,
0.5150279998779297,
0.5174370408058167,
-0.6117590665817261,
0.034474533051252365,
0.3561301827430725,
-0.19408150017261505,
-0.7166829705238342,
-1.358006238937378,
-0.27703842520713806,
-0.1936635971069336,
-0.6273428201675415,
0.4691080152988434,... |
def get _ vp _ name ( vp _ id ) : query ='select * from testcasemanage _ vpname where vp _ id = { 0 } '. format ( vp _ id ) result = autodb. select _ one _ record ( query ) vp _ name = result [ 0 ] ['vp _ name'] return vp _ name | [
0.10760463029146194,
-0.3254810869693756,
0.38103047013282776,
0.20039767026901245,
-0.20774705708026886,
-0.41756895184516907,
-0.32959118485450745,
-0.0434984490275383,
0.6829937696456909,
1.1586098670959473,
0.3354976773262024,
-0.01496303454041481,
-0.48899146914482117,
0.1760955750942... |
def decodebc ( self, img, verifypattern = true, return _ details = false ) : # the complete output from pyzbar which matches checkpattern backend = self. backend if backend = ='zbar': # code _ reader = self. decode _ zbar code _ reader = self. extract _ by _ squares elif backend = ='libdmtx': code _ reader = self. deco... | [
0.04176218807697296,
0.029937734827399254,
0.5572510957717896,
0.4030165374279022,
0.16337767243385315,
-0.46558311581611633,
0.07377157360315323,
0.40417319536209106,
0.6034495830535889,
-0.3090845048427582,
-0.32104256749153137,
0.32211223244667053,
-0.9896584749221802,
0.497059136629104... |
def _ _ init _ _ ( self, name ) : self. name = name | [
-0.2143441140651703,
-1.1978416442871094,
0.3842499554157257,
-0.4794149398803711,
-0.982975423336029,
0.22261899709701538,
-0.16782192885875702,
0.041316352784633636,
0.20781134068965912,
0.4006579518318176,
-1.3544188737869263,
-0.22119903564453125,
0.44346731901168823,
0.658432841300964... |
def product _ search ( request ) : query = request. get. get ('q') if query : query _ group = q ( title _ _ icontains = query ) | q ( place _ _ icontains = query ) products = product. objects. filter ( query _ group ) if not products : sweetify. error ( request, title = " there is no photos matching your search criteri... | [
-0.8342002630233765,
0.44912078976631165,
0.6226274967193604,
0.5152278542518616,
-0.2670622169971466,
0.6877641081809998,
0.42531877756118774,
0.021297384053468704,
0.6147114634513855,
0.21579024195671082,
1.0169649124145508,
0.27320197224617004,
0.3035039007663727,
0.3906446695327759,
... |
def read _ cities ( file _ name ) : with open ( file _ name,'r') as in _ file : file _ lines = in _ file. read ( ). split ( " \ n " ) tuples _ list = [ ] for file _ line in file _ lines : line = file _ line. split ( " \ t " ) line [ 2 ] = float ( line [ 2 ] ) line [ 3 ] = float ( line [ 3 ] ) tuple _ line = tuple ( lin... | [
-0.40893006324768066,
-0.21540965139865875,
0.6874659657478333,
-0.8642221093177795,
0.14343145489692688,
0.9025270938873291,
-0.6058186292648315,
1.1262648105621338,
-1.7137998342514038,
0.9442270398139954,
-0.4573397636413574,
-1.5676177740097046,
0.47311633825302124,
-0.1626319140195846... |
def calc _ idx _ coach ( match _ round ) : if idx _ coach = = { } : create _ team _ list ( rounds [ " 1 " ], idx _ coach ) idx _ sum = 0 for team in plays. keys ( ) : idx _ coach [ team ] [ i _ total ] = idx _ goals _ defense [ team ] [ i _ total ] * idx _ goals _ attack [ team ] [ i _ total ] idx _ sum + = idx _ coach... | [
-0.972055971622467,
0.18171031773090363,
0.7265937924385071,
-0.6657764911651611,
-0.608559250831604,
-0.5135501027107239,
1.867423415184021,
-0.2506450414657593,
-0.11166049540042877,
0.6855536103248596,
-0.3339870274066925,
-0.7942990660667419,
0.1520480364561081,
-0.9897643327713013,
... |
def remove ( self, agent ) : while agent in self. agents : self. agents. remove ( agent ) agent _ class = type ( agent ) while agent in self. agents _ by _ type [ agent _ class ] : self. agents _ by _ type [ agent _ class ]. remove ( agent ) | [
-0.6111505627632141,
-0.9806340336799622,
0.30240386724472046,
-0.12733101844787598,
-0.2459389567375183,
-0.28113725781440735,
0.40233349800109863,
0.018700383603572845,
1.0648455619812012,
0.04789694398641586,
-0.34292852878570557,
0.3986077308654785,
-0.5494558811187744,
1.1550619602203... |
def get _ last _ names _ 1990 ( ) : filename = '. / data / names / dist. all. last'# use pandas to get data # https : / / stackoverflow. com / questions / 42138966 / pandas - read - csv - ignore - commas - one - column - per - line df = pd. read _ csv ( filename, sep = ', ', header = none ) series = df. iloc [ :, 0 ] s... | [
0.1569478064775467,
-0.1389082819223404,
0.7713232636451721,
-0.9046250581741333,
-0.21523520350456238,
0.08390960842370987,
-0.6855456829071045,
0.0055700670927762985,
-0.27164220809936523,
0.5203253626823425,
-0.009118137881159782,
0.6019314527511597,
0.2725992500782013,
-0.9872726202011... |
def get _ test _ file ( ) : return os. path. sep. join ( _ _ file _ _. split ( os. path. sep ) [ : - 1 ] + [ " gk _ histo. dat " ] ) | [
1.0909696817398071,
0.022703716531395912,
0.7823138236999512,
-0.045658763498067856,
1.0224575996398926,
1.2202799320220947,
1.4985015392303467,
-0.31918105483055115,
-1.459362506866455,
-0.39688432216644287,
0.6124128699302673,
-0.022367287427186966,
-0.6166648268699646,
-0.36849617958068... |
def connect ( self ) : try : return self. sc. rtm _ connect ( ) except exception as e : log. exception ( e ) | [
-0.636737585067749,
-0.3124663233757019,
0.3784138262271881,
0.18515545129776,
-0.004073759075254202,
-0.5270899534225464,
-0.6713898777961731,
-0.45359721779823303,
-0.7363236546516418,
0.08209865540266037,
0.47350648045539856,
0.09400974959135056,
-1.6029810905456543,
-0.3278515636920929... |
def convert _ images ( data, stop = none ) : stop = stop or data. shape [ 0 ] # hard - coded cell dimensions in ( eta, phi ). * these are approximate at best! * bin _ width = [ ( 0. 025, 0. 1 ), # ps ( 0. 003125, 0. 0245 * 4 ), # ecal barrel layer 1 ( 0. 025, 0. 0245 ), #...... 2 ( 0. 025 * 2, 0. 0245 * 2 ), #... ] dim... | [
0.15739087760448456,
0.22367186844348907,
0.8968122601509094,
0.1202474907040596,
0.5473792552947998,
0.008650679141283035,
0.6958160996437073,
-0.07278267294168472,
-0.5278288125991821,
0.5362394452095032,
0.13044723868370056,
-0.47940361499786377,
0.19334708154201508,
0.7862243056297302,... |
def run _ object _ detection ( self, json _ data _ parsed ) : # replaced values with variables blob = cv2. dnn. blobfromimage ( cv2. resize ( self. image, ( self. size, self. size ) ), self. scalar, ( self. size, self. size ), self. mean _ subtraction ) self. net. setinput ( blob ) detections = self. net. forward ( ) #... | [
-0.9449906945228577,
-0.7737956047058105,
0.69505774974823,
-0.20050588250160217,
1.0497931241989136,
0.6496416330337524,
0.5214236378669739,
-0.25472110509872437,
-0.30362093448638916,
0.3972860276699066,
-0.6022405624389648,
0.46410584449768066,
0.16149842739105225,
0.7867264151573181,
... |
def phony _ worker ( t1, t2, exception _ probability = 0 ) : assert t2 > = t1 assert 0 < = exception _ probability < = 1 sleeptime = random. randint ( t1, t2 ) # logging. info ( f " sleeping { sleeptime } s ( { exception _ probability * 100 } % chance of exception ) " ) time. sleep ( sleeptime ) if random. random ( ) <... | [
-0.4567878842353821,
0.3773110508918762,
0.6259860992431641,
0.6534897685050964,
-0.7394900918006897,
0.5434537529945374,
-0.20952196419239044,
-0.1418142020702362,
-0.5054572820663452,
1.019428014755249,
-0.24175338447093964,
0.3780761659145355,
-0.7294443249702454,
-0.31229496002197266,
... |
def predict _ epochs ( self, labels, trainepochs = none, method = sklearn. linear _ model. logisticregressioncv ( ) ) : # check the method as a fit method assert inspect. ismethod ( method. fit ), \ ('the provided method has no fit function') trainclass = method # check that the labels match up with the trial numbers l... | [
-0.48184680938720703,
0.5913535952568054,
0.7832309007644653,
-0.0766604021191597,
0.625068187713623,
-0.6324660181999207,
-0.37339919805526733,
-0.1590305119752884,
-0.002383848186582327,
-0.3656100928783417,
0.3931182324886322,
0.1977752447128296,
0.1794212907552719,
-0.1585339605808258,... |
def dragenterevent ( self, event ) : mimedata = event. mimedata ( ) formats = mimedata. formats ( ) if ( " action " in formats and mimedata. data ( " action " ) = = b " tab - reordering " and " tabbar - id " in formats and " source - index " in formats and " tabwidget - id " in formats ) : event. acceptproposedaction (... | [
0.02670011855661869,
-0.5021621584892273,
0.48943352699279785,
0.4193898141384125,
0.33577337861061096,
0.684635579586029,
-0.36838823556900024,
-0.2910301983356476,
-0.2524951994419098,
0.3142710328102112,
0.5040708780288696,
0.06388390064239502,
0.01635734736919403,
0.33518272638320923,
... |
def identity ( self ) - > optional ['outputs. identityresponse'] : return pulumi. get ( self, " identity " ) | [
0.512898862361908,
-0.4730150103569031,
0.5828869342803955,
1.053053617477417,
1.5180994272232056,
0.5951517820358276,
0.7196288108825684,
-0.8190653920173645,
1.781726598739624,
-0.5084711909294128,
-0.21117447316646576,
0.2530287504196167,
-0.5073345899581909,
-1.206464409828186,
-0.75... |
def training _ compute _ binding ( self ) - >'outputs. computebindingresponse': return pulumi. get ( self, " training _ compute _ binding " ) | [
-0.5983720421791077,
0.1607092320919037,
0.6127037405967712,
1.1978510618209839,
0.2194858193397522,
0.9379690885543823,
0.9586305022239685,
0.34910109639167786,
0.6793539524078369,
0.26400792598724365,
0.10262767225503922,
0.7406617403030396,
0.22719304263591766,
-0.5126276016235352,
-0... |
def get _ elemcolor ( atomic _ number = none, elsymbol = none ) : assert ( atomic _ number is none )! = ( elsymbol is none ) if atomic _ number is not none : elsymbol = at. get _ elsymbol ( atomic _ number ) # assign a new colour to this element if needed return elementcolors. setdefault ( elsymbol, colors _ tab10 [ le... | [
-0.45038044452667236,
0.19920583069324493,
0.4129132032394409,
-0.151510089635849,
0.9645076394081116,
-0.5458678007125854,
-0.3563351035118103,
0.6022568345069885,
0.5204578042030334,
-0.1864398717880249,
0.27564990520477295,
0.99358731508255,
0.6623011231422424,
0.06789525598287582,
0.... |
async def test _ set _ pin _ wrong _ length ( v3 _ server ) : async with aiohttp. clientsession ( ) as session : with pytest. raises ( pinerror ) as err : simplisafe = await get _ api ( test _ email, test _ password, session = session, client _ id = test _ client _ id ) systems = await simplisafe. get _ systems ( ) sys... | [
0.04498964175581932,
1.3243507146835327,
0.3807859420776367,
-0.7728078961372375,
0.8699678778648376,
1.1116012334823608,
-0.4936284124851227,
-0.6554023027420044,
0.9757144451141357,
0.6989706158638,
-1.0279285907745361,
0.7081658244132996,
-0.02210238017141819,
0.13550406694412231,
1.0... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.