text
stringlengths
25
2.19k
embedding
listlengths
768
768
def test _ list _ integer _ max _ length _ 4 _ nistxml _ sv _ iv _ list _ integer _ max _ length _ 5 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / integer / schema + instance / nistschema - sv - iv - list - integer - maxlength - 5. xsd ", instance = " nistdata / list / ...
[ -0.436750590801239, -0.1333535611629486, 0.08760499209165573, 0.4173681437969208, -0.6588354706764221, -0.2229587882757187, -0.34156766533851624, -0.23516495525836945, 0.7821975946426392, 0.7266985177993774, -1.1963417530059814, -0.4961276054382324, -0.9257249236106873, 0.7999003529548645,...
def put _ news _ item ( service _ identity _ user, title, message, broadcast _ type, sponsored, image, action _ button, order _ items, news _ type, qr _ code _ caption, app _ ids, scheduled _ at, news _ id = none, broadcast _ on _ facebook = false, broadcast _ on _ twitter = false, facebook _ access _ token = none, tar...
[ -0.02687980979681015, -0.045203834772109985, 0.5143293738365173, 1.8160467147827148, 0.5395825505256653, 0.40396907925605774, 0.07960453629493713, 0.05752202123403549, 0.42992156744003296, 0.7723871469497681, -0.41063544154167175, 0.43989428877830505, -1.0067304372787476, 0.756225645542144...
def default _ tags ( self, default _ tags ) : self. _ default _ tags = default _ tags
[ 0.6358187198638916, 0.6480672359466553, -0.14522574841976166, 0.9202523827552795, 1.7716914415359497, 0.0922321304678917, -0.3746427297592163, 0.11440026015043259, -1.219042181968689, 0.10011470317840576, -1.5411804914474487, -0.6142311692237854, -0.330948144197464, 1.11943519115448, -1....
def p200 _ program ( self ) : ctx = self. item _ start ( ) # always first line of test file _ path = os. path. join ( teensy4 _ assets _ path, ctx. item. file ) if not os. path. isfile ( file _ path ) : self. log _ bullet ( f " file not found " ) self. item _ end ( resultapi. record _ result _ internal _ error ) return...
[ -0.4209353029727936, -0.5512586832046509, 0.9313068389892578, 0.5545220971107483, 0.19948433339595795, -0.49203789234161377, 0.9677205681800842, -1.0639164447784424, -0.08618465065956116, 0.09688431769609451, -0.7493650913238525, -0.26734691858291626, -0.7936931252479553, 0.411904901266098...
def tpms _ pressure _ rr ( self ) - > float : return self. _ vehicle _ data. get ( " vehicle _ state ", { } ). get ( " tpms _ pressure _ rr " )
[ -0.12309486418962479, -0.3499956429004669, 0.17739397287368774, -1.0194350481033325, -0.0930163785815239, 0.30713945627212524, -1.2821359634399414, -0.215228870511055, 0.4239535331726074, 1.1770914793014526, 0.2422388195991516, -0.8585579991340637, -1.405024766921997, -0.47664427757263184,...
def test _ atomic _ base64 _ binary _ min _ length _ 2 _ nistxml _ sv _ iv _ atomic _ base64 _ binary _ min _ length _ 3 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / base64binary / schema + instance / nistschema - sv - iv - atomic - base64binary - minlength - 3. xsd ...
[ 0.2981836199760437, -0.15691909193992615, 0.4915631115436554, 1.1491512060165405, -0.06944878399372101, 0.5393916964530945, -0.4670197069644928, -0.15449894964694977, 0.5933448672294617, 0.6206938028335571, -0.24796876311302185, 0.4245302677154541, -0.6267015933990479, -0.3508378565311432,...
def flatten ( l ) : return [ item for sublist in l for item in sublist ]
[ 0.04901929572224617, 0.36872750520706177, 0.44347745180130005, 0.7089991569519043, -0.3028412461280823, 0.8841414451599121, -0.6906067728996277, 1.0668540000915527, 0.14452573657035828, -0.519882321357727, -1.534131407737732, -0.9128523468971252, -0.19469530880451202, 0.4958192706108093, ...
def paint _ relation _ hist ( corpus _ relation, data _ path ) : relation _ type _ stats = defaultdict ( lambda : 0 ) for rel in corpus _ relation : if len ( rel ) = = 0 : continue for d in rel : relation _ type _ stats [ d ['relation'] ] + = 1 json. dump ( relation _ type _ stats, open ( os. path. join ( data _ path,'...
[ 0.5184372067451477, 0.6421317458152771, 0.6770790815353394, -1.1374759674072266, 0.7406695485115051, 0.7325304746627808, 1.4097838401794434, 0.043019190430641174, -0.2763230800628662, 0.08313290774822235, -0.4142739474773407, 0.7354413270950317, -0.15994694828987122, 0.48023512959480286, ...
def testappendedjunkstore ( self ) : self. sf. produce ( [ self. e1 ] ) # purposely append junk to the data store with open ( self. sf. buffer _ file. data _ path,'a') as f : f. write ('xxxxxxxx') self. sf. produce ( [ self. e2 ] ) self. sf. addconsumer ('a') stream = self. sf. consume ('a') self. assertequal ( self. e...
[ 0.3879052400588989, 0.36003151535987854, 0.6243017315864563, -0.47006452083587646, 0.6960589289665222, 0.133894145488739, -0.1450989544391632, -0.21814855933189392, 0.7260825634002686, -0.9024426937103271, -0.2911001145839691, 0.9868248105049133, -0.05559499189257622, 0.9136344790458679, ...
def arccos ( x ) : try : if x. val < - 1 or x. val > 1 : raise valueerror ('math domain error') return variable ( x. name, np. arccos ( x. val ), { k : - v / np. sqrt ( 1 - x. val * * 2 ) for ( k, v ) in x. der. items ( ) }, false ) except attributeerror : if x < - 1 or x > 1 : raise valueerror ('math domain error') re...
[ -0.1277894675731659, 0.10478685051202774, 0.5358673334121704, 0.19322162866592407, -1.3090765476226807, 0.19723565876483917, -0.36484119296073914, -0.8842690587043762, -0.524115800857544, 0.028406448662281036, 0.8423258662223816, 0.8517557978630066, 0.5487403273582458, -0.05221778899431228...
def generate _ list ( ) : dict = { } order = [ ] keys _ checked = [ ] counter = 0 for i in xrange ( 0, num _ chains - 1 ) : red = hex ( random. getrandbits ( bit _ size ) ) [ : - 1 ] red _ start _ point = red for x in xrange ( 0, chain _ len - 1 ) : red = md5 _ redux ( red ) keys _ checked. append ( red ) red _ end _ p...
[ -0.9518687129020691, 0.9082698225975037, 0.547731876373291, 0.0535726360976696, 0.6712989211082458, -0.5495476722717285, -0.344308078289032, 0.37418994307518005, 0.15279607474803925, 0.23275460302829742, -0.7909256219863892, 0.43950513005256653, 0.351092666387558, 0.666509211063385, -0.3...
def export _ pandas _ dataframe _ to _ csv ( x _ data, y _ data : none, x _ name _ file, y _ name _ file : none ) : save _ log ('{ 0 } : : { 1 } '. format ( export _ pandas _ dataframe _ to _ csv. _ _ module _ _, export _ pandas _ dataframe _ to _ csv. _ _ name _ _ ) ) x _ data. to _ csv ( x _ name _ file, index = fals...
[ -0.01782619021832943, -0.14808964729309082, 0.4946790337562561, 0.6257452368736267, 0.3345177173614502, -0.4479031264781952, -0.2645391523838043, -0.29248103499412537, -0.38663795590400696, 0.17340736091136932, 0.002890992444008589, 1.624266505241394, 0.8720287084579468, -0.459697753190994...
def _ _ batch _ to _ torch ( self, mids, targets ) : mids = variable ( torch. longtensor ( mids ) ) if self. task = ='multilabel _ classification': targets = variable ( torch. floattensor ( targets ) ) elif self. task = ='classification': targets = variable ( torch. longtensor ( targets ) ) elif'regression'in self. tas...
[ -0.8025559186935425, -0.3130452632904053, 0.27181997895240784, -0.8660762310028076, 0.1399998515844345, -0.2992497980594635, -0.753396213054657, 0.2328857183456421, -0.6709885001182556, 0.651987612247467, -0.30278030037879944, 0.7117236256599426, 0.5732741951942444, -0.11330955475568771, ...
def put ( self, key, value ) : self. _ prefs [ key ] = value with open ( self. _ prefs _ file,'w') as f : f. write ( json. dumps ( self. _ prefs ) ) self. prefschanged. emit ( )
[ -0.8798518180847168, 0.019500000402331352, 0.4865424335002899, -0.7694402933120728, -0.1812136471271515, 0.2306780368089676, -0.6929685473442078, -0.2029423862695694, -0.426108717918396, 0.9899287223815918, -1.1547168493270874, 1.0023291110992432, -0.5633878111839294, -0.36126530170440674,...
def calcrecoil ( self ) : v _ gun = ( self. m * self. mv + self. casecap * self. mv * 1. 75 ) / self. gunmass return. 5 * self. gunmass * v _ gun * * 2
[ 0.8414406180381775, -0.07615561783313751, 0.34241610765457153, 0.3102456033229828, -0.44541648030281067, -0.24069686233997345, 0.2284974902868271, -0.6506346464157104, -1.321471929550171, 0.5652437806129456, -0.2106270045042038, 0.45856431126594543, -0.7708457708358765, 0.8411042094230652,...
def repeat ( val : " union [ int, float, str ] ", n : int, name : optional [ str ] = none ) - > " series " : if name is none : name = " " if isinstance ( val, str ) : s = series. _ repeat ( name, val, n ) s. rename ( name ) return s else : return series. from _ arrow ( name, pa. repeat ( val, n ) )
[ -0.5607529282569885, 0.9767621159553528, 0.4646546244621277, 0.28839990496635437, -1.1782808303833008, 0.10535484552383423, -0.7594518065452576, -1.3980534076690674, 1.0015454292297363, 0.014236214570701122, -0.226643905043602, 0.7687654495239258, 0.5902560949325562, -0.7953130006790161, ...
def iterativedeepeningsearch ( startstate, goalstate, actionsf, takeactionf, maxdepth ) : solutionpath = [ ] solutionpath. append ( startstate ) for depth in range ( maxdepth ) : print ( " depth ", depth ) result = depthlimitedsearch ( startstate, goalstate, actionsf, takeactionf, depth ) if result is'failure': return'...
[ -0.8097254633903503, 0.12791037559509277, 0.4332694113254547, 0.6692080497741699, -0.4713594913482666, 0.25903448462486267, 0.6627382636070251, -0.2290346324443817, 0.024051997810602188, -0.057035621255636215, 0.08133119344711304, -0.16203755140304565, -0.4641430377960205, 0.00746493693441...
def is _ pants _ branch ( self, branch ) : return self. dt _ branch _ type ( branch ) in [ pants _ curve _ backward, pants _ curve _ forward ]
[ -0.10284442454576492, -0.4756658375263214, 0.6087160110473633, 0.3615502119064331, 0.1263621747493744, 1.4799219369888306, -0.23333363234996796, -1.0413676500320435, -0.3629007935523987, -0.8083505630493164, -0.19515058398246765, 1.88617742061615, -1.0104444026947021, 1.384026288986206, ...
def test _ list _ decimal _ max _ length _ 2 _ nistxml _ sv _ iv _ list _ decimal _ max _ length _ 3 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / decimal / schema + instance / nistschema - sv - iv - list - decimal - maxlength - 3. xsd ", instance = " nistdata / list / ...
[ -0.068659208714962, 0.05257223919034004, 0.4939221441745758, 0.5855503678321838, -0.22432841360569, 0.33099329471588135, -0.5585299134254456, 0.348257839679718, 0.7678413391113281, 0.45915839076042175, -1.4218945503234863, -0.153788223862648, 0.26244816184043884, 0.13188955187797546, -0....
def test _ has _ converged ( test _ input1, test _ input2, expected ) : assert _ has _ converged ( test _ input1, test _ input2 ) = = expected
[ 0.537276566028595, -0.5519925355911255, 0.6110398173332214, 1.4984523057937622, 0.8661556839942932, 1.0399880409240723, 0.4623430669307709, 0.35333362221717834, -0.7910703420639038, -1.0109119415283203, -0.37438133358955383, 0.03180638700723648, -0.3513439893722534, 0.7123515605926514, -...
def sample _ from _ discretized _ mix _ logistic ( y, log _ scale _ min = none ) : if log _ scale _ min is none : log _ scale _ min = float ( np. log ( 1e - 14 ) ) assert y. size ( 1 ) % 3 = = 0 nr _ mix = y. size ( 1 ) / / 3 # b x t x c y = y. transpose ( 1, 2 ) logit _ probs = y [ :, :, : nr _ mix ] # sample mixture ...
[ 0.010076585225760937, -0.8440040946006775, 0.990221381187439, -0.13655652105808258, -0.8744003176689148, 0.0338250957429409, -0.5461388826370239, -0.834923267364502, 0.5770187377929688, 0.7798891067504883, 0.08122796565294266, 0.48930269479751587, 0.3323672115802765, -0.6844923496246338, ...
def put ( self, item : t, context : pipelinecontext = none ) - > none : logger. info ( " converting item \ " { item } \ " for sink \ " { sink } \ " ". format ( item = item, sink = self. _ sink ) ) item = self. _ transform ( data = item, context = context ) logger. info ( " puting item \ " { item } \ " into sink \ " { s...
[ -1.4970216751098633, 0.18163183331489563, 0.33696508407592773, -0.8368991613388062, 0.774528980255127, -0.4888106882572174, 0.6066189408302307, 0.14713513851165771, 0.6324686408042908, 0.34420114755630493, -1.2882592678070068, 0.7266184687614441, -0.33208128809928894, -0.9383531808853149, ...
def clear ( self ) : self. hand. cards. clear ( ) self. is _ dealer = false
[ -0.21519890427589417, -0.05352381244301796, 0.25986447930336, 0.43319132924079895, 0.3520958721637726, 0.5306630730628967, -0.2988995313644409, 0.34164750576019287, -0.3178662955760956, -0.005644650664180517, -0.007046425715088844, 0.8885113000869751, 0.5184488296508789, 0.478437602519989,...
def create _ state ( self, index, weight ) :
[ -0.01273238193243742, -0.285638689994812, 0.10334259271621704, 0.12039041519165039, 0.1984768956899643, 0.436070054769516, -0.417961448431015, -0.768880307674408, 0.22097234427928925, 0.21818234026432037, -0.12194865942001343, -0.689370334148407, -0.408110111951828, -0.8775411248207092, ...
def is _ science ( self, i ) : return self. bitmask. flagged ( self. mask [ i ],'science')
[ -0.17719170451164246, 0.6356971859931946, 0.35981273651123047, 0.9395266175270081, 0.9376710653305054, 0.7533602714538574, -0.14903908967971802, -1.9396605491638184, 0.8247627019882202, -0.06835426390171051, -0.4204894006252289, 0.8089943528175354, -0.861796498298645, 0.04750966280698776, ...
def maneuvers ( self ) : all _ maneuvers = [ ] all _ maneuvers + = [ maneuver ( bearing, difficulty. green ) for bearing in self. green ] all _ maneuvers + = [ maneuver ( bearing, difficulty. white ) for bearing in self. white ] all _ maneuvers + = [ maneuver ( bearing, difficulty. red ) for bearing in self. red ] retu...
[ -0.7492238283157349, 0.24239633977413177, 0.5095093250274658, 0.17108063399791718, 1.4238346815109253, 0.4246574938297272, -0.46845361590385437, -0.7160119414329529, 1.379617691040039, -0.30526989698410034, -0.3302658796310425, -0.45503780245780945, 0.01708132028579712, 1.2144945859909058,...
def examine ( self, approver, notes ='' ) : if self. state! = states. pending : raise valueerror, " only pending changes can be approved. " # todo : check that the approver has approval priviliges. if not isinstance ( approver, user ) : raise typeerror, " please supply a valid approver. " self. comments. create ( comme...
[ -0.038850292563438416, 0.19771605730056763, 0.5682653784751892, -0.34516069293022156, -0.1701972931623459, 0.313260942697525, -0.22566662728786469, 0.2884828448295593, -0.05253523960709572, 0.1048828586935997, 0.5342583060264587, 0.5287877917289734, -0.3228842616081238, 0.47513440251350403...
def is _ within _ original _ scope ( self, request _ scopes, refresh _ token, request, * args, * * kwargs ) : return false
[ -0.38076353073120117, -1.0202195644378662, 0.6467308402061462, 0.48153698444366455, -1.1728668212890625, 0.347199022769928, -0.5892620086669922, -1.1453242301940918, 0.6052758097648621, 0.13162070512771606, 0.4398617446422577, 1.1506181955337524, -0.5187996625900269, -0.49015119671821594, ...
def each _ env _ var ( self, env _ var : str ) : env = os. environ. copy ( ) env ['numba _ threading _ layer'] ='default'env ['numba _ threading _ layer _ priority'] = env _ var code = f " " " import numba # trigger threading layer decision # hence catching invalid threading _ layer _ priority @ numba. jit ('float64 [ ...
[ -0.15299084782600403, -0.27258339524269104, 0.5006963014602661, 0.20588967204093933, 1.7481001615524292, 0.1643432378768921, 0.6773209571838379, -0.5259690284729004, -0.1717541664838791, 0.22660532593727112, -0.3109760582447052, 0.6049315929412842, -0.3577183187007904, 1.552207589149475, ...
def get _ sections _ from _ tex ( self, tex ) : sections = [ tex ] return sections
[ 0.06062929332256317, -0.941731333732605, 0.24275103211402893, 0.42399686574935913, -0.3738444447517395, 0.339291512966156, -0.9037041664123535, -0.2657147943973541, -0.4754350781440735, 0.23901565372943878, 0.2040044069290161, -1.257930040359497, -0.025057945400476456, 1.0063081979751587, ...
def bubble _ sort ( list ) : # steps # get a list # assign a pointer to the first element / index on the list # compare the element being pointed with the element to its imidiate right # if the element to the right is larger than the element being pointed at, swap them # repeat this process for the second element, then...
[ -0.5447487831115723, 0.3221280872821808, 0.7847321629524231, 0.9086553454399109, -0.6624637246131897, 0.458777517080307, 0.27240100502967834, -0.5012268424034119, 0.9269549250602722, 0.1825849562883377, -1.0331343412399292, 0.04003085568547249, -1.480076789855957, 1.2243061065673828, -0....
def _ old _ real _ extract ( self, url, video _ id ) : webpage = self. _ download _ webpage ( url, video _ id ) title = self. _ og _ search _ property ('audio : title ', webpage ) author = self. _ og _ search _ property ('audio : artist ', webpage ) thumbnail = self. _ og _ search _ thumbnail ( webpage ) episode _ json...
[ -0.5610781311988831, -1.2334306240081787, 0.7640169858932495, -0.09821034222841263, -0.8048436641693115, -1.2477506399154663, -0.769871175289154, -0.05005405470728874, 0.3138163685798645, 0.7926954627037048, -0.8273759484291077, 0.545214056968689, 0.6059268712997437, 0.2021329402923584, ...
def coef _ s2f ( self, f _ n ) : if os. path. isfile ( f _ n ) : os. remove ( f _ n ) zero _ order _ coef, first _ order _ coef, second _ order _ coef = self. split _ 1d _ coef _ array ( ) with open ( f _ n, " w " ) as f _ handler : f _ handler. write ( " # " + " comments " + " \ n " ) f _ handler. write ( " # " + " va...
[ -0.1920776665210724, -1.2415462732315063, 0.7973260283470154, -0.4793601632118225, 1.0700243711471558, -0.6579586863517761, 0.7560602426528931, 0.2973417639732361, -0.33914610743522644, -0.8921278715133667, -1.0066978931427002, 0.37357938289642334, 0.6106331944465637, 0.1754629760980606, ...
def element ( ids : union [ int, str ] ) - > element : if isinstance ( ids, ( list, tuple ) ) : return [ _ get _ element ( i ) for i in ids ] elif isinstance ( ids, ( str, int ) ) : return _ get _ element ( ids ) else : raise valueerror ( " expected a < list >, < tuple >, < str > or < int >, got : { 0 : s } ". format (...
[ -1.0139760971069336, 0.017267554998397827, 0.3250245451927185, -0.24455967545509338, 0.49354246258735657, -0.45364096760749817, -0.7481057643890381, -0.08767011016607285, 0.5380824208259583, -0.3132895827293396, 0.457964152097702, 0.810377836227417, -0.09947475045919418, -0.310537517070770...
async def _ renew ( self, sub _ type : subtype ) - > none : if not self. _ api. subscribed ( sub _ type ) : _ logger. debug ( " host % s : requested to renew a non - existing reolink % s subscription, " " trying to subscribe from scratch ", self. _ api. host, sub _ type, ) if sub _ type = = subtype. push : await self. ...
[ 0.846757173538208, 0.0203227736055851, 0.7886141538619995, 0.7692065834999084, 0.37295839190483093, -0.6401563882827759, -1.4839396476745605, -0.4568053185939789, -0.24970749020576477, 0.053207166492938995, -0.36298879981040955, 1.5451682806015015, -0.1029578372836113, 0.24119575321674347,...
def get _ board _ diff _ levels ( self ) : levels = self. get _ board _ levels ( ) diff = [ ] for i in range ( 1, len ( levels ) ) : diff. append ( abs ( levels [ i - 1 ] - levels [ i ] ) ) return tuple ( diff )
[ -0.7900257706642151, 0.4067920446395874, 0.97575443983078, 1.2788207530975342, 0.5974632501602173, 1.0041660070419312, 0.4198246896266937, -0.32226625084877014, -1.1566522121429443, 0.6114367246627808, -0.9297023415565491, -0.5769951939582825, -0.7432554960250854, 1.2392215728759766, 0.5...
def rgb _ to _ irg ( rgb ) : irg = np. zeros _ like ( rgb ) s = np. sum ( rgb, axis = - 1 ) # print ( s ) irg [..., 0 ] = s / 3. 0 irg [..., 1 ] = rgb [..., 0 ] / s irg [..., 2 ] = rgb [..., 1 ] / s return irg
[ -0.6105508804321289, 0.5960894823074341, 0.48020341992378235, -0.709597647190094, 0.010861564427614212, -0.030932480469346046, 0.450390487909317, -0.01576804183423519, -0.21641264855861664, 1.4530701637268066, -0.2408805638551712, -0.5542814135551453, -1.2382307052612305, -0.18978329002857...
def trove _ dashboard _ git _ clone ( config _ yaml ) : config = _ git _ yaml _ load ( config _ yaml ) git _ repository = none for c in config ['repositories'] : if c ['name'] = = trove _ dashboard : git _ repository = c ['repository'] git _ branch = c ['branch'] if git _ repository is none : error _ out ('missing repo...
[ 0.5766567587852478, 0.3000236749649048, 0.6427381038665771, -0.28437820076942444, -0.21045230329036713, 0.15742312371730804, 0.47712182998657227, 0.03213904798030853, -0.22055812180042267, 0.8848093748092651, -0.19874224066734314, 0.06981094181537628, -0.35501962900161743, -0.1343071162700...
def test _ atomic _ base64 _ binary _ enumeration _ 2 _ nistxml _ sv _ iv _ atomic _ base64 _ binary _ enumeration _ 3 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / base64binary / schema + instance / nistschema - sv - iv - atomic - base64binary - enumeration - 3. xsd ...
[ -0.633814811706543, -0.3784944713115692, 0.6154620051383972, 1.3723362684249878, 0.1334441602230072, 0.5479316711425781, 0.08263885229825974, 0.1376180648803711, 0.38591381907463074, 1.1033778190612793, -0.18663400411605835, 0.38014471530914307, -0.2069520205259323, -0.414915531873703, -...
def secure _ http _ raster ( secure _ http _ testdata _ dir ) : return secure _ http _ testdata _ dir / " cleantopo / 1 / 0 / 0. tif "
[ -0.02116602659225464, -0.5115388035774231, 0.31891876459121704, 0.049524616450071335, 0.13004618883132935, 1.0297967195510864, 0.7804127335548401, -0.7176374793052673, 0.022314226254820824, -0.13730497658252716, 0.5552365183830261, 0.5541900992393494, -0.15246349573135376, -0.4018753170967...
def setname ( self, name ) : self. _ name = name
[ -0.83003169298172, -0.4860186278820038, 0.16564197838306427, -0.4666530191898346, -0.6607366800308228, 0.3489810526371002, 0.014797989279031754, -0.05429254099726677, -0.26846593618392944, 0.7778539657592773, -1.407902479171753, -0.2591905891895294, 0.3582042157649994, 0.7116838097572327, ...
def testsimple ( self ) : def cb ( e = none ) : self. passed = true and e is none def check ( ) : return true checkfunc = functioncall ( check ) self. server. watch _ function ( checkfunc, cb ) asyncore. poll ( ) self. assert _ ( self. passed )
[ -0.13273826241493225, 1.0018659830093384, 0.6154064536094666, 0.6410489678382874, 0.8668665289878845, 0.9180277585983276, 0.37574973702430725, -0.19199775159358978, -0.011036336421966553, -0.6250528693199158, -0.39873677492141724, -0.003916474059224129, -0.1240588128566742, -0.288122296333...
def snmp _ getnext ( self, snmp _ ver, system _ name, mib _ name = none, mib _ index = none, mib _ value = none, oid _ string = none, communityname = none, snmp _ timeout = 60, max _ rows = 1, username = none, authkey = none, privkey = none, authprotocol = none, privprotocol = none, custom _ mib _ paths = none, load _ ...
[ -0.012350063771009445, -0.5013245344161987, 0.5223113298416138, 0.4762945771217346, -0.7688772082328796, -0.8054013848304749, 0.015565507113933563, -0.0605761893093586, 0.5863158106803894, 0.027283675968647003, -0.2417176514863968, 0.17943920195102692, -1.4373137950897217, -0.1422449797391...
def put _ kernels _ on _ grid ( kernel, pad = 1 ) : # get shape of the grid. numkernels = = grid _ y * grid _ x def factorization ( n ) : for i in range ( int ( sqrt ( float ( n ) ) ), 0, - 1 ) : if n % i = = 0 : if i = = 1 : print ('who would enter a prime number of filters') return ( i, int ( n / i ) ) ( grid _ y, gr...
[ -0.5409826040267944, 1.0163991451263428, 0.8067606687545776, -0.45574289560317993, -0.08570302277803421, -0.6627587676048279, 0.19126957654953003, -0.782708466053009, -0.05012234300374985, 0.47981899976730347, -0.06648723781108856, 0.33317169547080994, 0.20977848768234253, 0.62681955099105...
def populate ( self, samples ) : for _ in range ( samples ) : entry = next ( self. experience _ source _ iter ) self. _ add ( entry )
[ -0.8922281265258789, 0.5116831064224243, 0.24273696541786194, -0.516353189945221, 1.5492497682571411, 0.5581762194633484, -0.2607930302619934, -0.1901550590991974, 0.5175318121910095, 0.4948282539844513, 0.036858681589365005, -0.12254944443702698, -0.14241549372673035, 0.7015714645385742, ...
def restart _ game ( self ) : for i in range ( 10 ) : print ( " v \ n " ) # restarts the game self. game. restart ( )
[ 0.1278293877840042, 0.5637977719306946, 0.44856494665145874, -0.30251386761665344, 1.6821179389953613, -0.147210955619812, -1.0740723609924316, 0.13483405113220215, -0.5719774961471558, 0.9641246795654297, -0.0396602638065815, 0.5926948189735413, -0.8022853136062622, -0.03415440022945404, ...
def correlation _ matrix ( df : pd. dataframe ) : # create the matrix matrix = df. corr ( ) # create cmap cmap = sns. diverging _ palette ( 250, 15, s = 75, l = 40, n = 9, center = " light ", as _ cmap = true ) # create a mask mask = np. triu ( np. ones _ like ( matrix, dtype = bool ) ) # make figsize bigger fig, ax = ...
[ 0.5174244046211243, 0.6351641416549683, 0.6802037358283997, -0.40423643589019775, 0.2458254098892212, 0.0949392020702362, 1.5270419120788574, 0.7637370228767395, 0.6785119771957397, -0.40863585472106934, 0.552715003490448, 0.8481626510620117, 0.31998735666275024, 0.3957996964454651, 0.72...
def test _ static _ domains _ misconfigured ( ) - > none : class urlform ( forms. form ) : url = forms. stringfield ( " url ", validators = [ forms. validators. validurl ( allowed _ domains = ('example. net ','example. com') ) ], ) form = urlform ( meta = {'csrf': false } ) form. url. data ='http : / / www. example. co...
[ -0.04143093526363373, 0.2581551671028137, 0.25764620304107666, 0.18287523090839386, 0.3676359951496124, 0.8534432649612427, -0.39175930619239807, 0.11149110645055771, -0.33312082290649414, -1.1708219051361084, -0.4518440067768097, 0.12658677995204926, 0.356440007686615, 0.6494226455688477,...
def load _ all _ in _ path ( session, path, archive _ path ) : sample _ type = session. sampletype. find _ by _ name ( " specimen " ) object _ type = session. objecttype. find _ by _ name ( " nasopharyngeal swab " ) location = " ingest " new _ samples _ by _ filename = { } for file _ path in glob. glob ( os. path. join...
[ 0.37651824951171875, -1.2616374492645264, 0.794436514377594, 0.13302050530910492, -0.18603812158107758, -0.2900930643081665, -0.011014199815690517, -0.08678431063890457, -0.10561828315258026, 0.8165215849876404, 0.1582769751548767, -0.015873579308390617, 0.44924333691596985, 0.104276821017...
def test _ reduce ( self ) : import functools self. assertequal ( functools. reduce ( lambda x, y : x + y, range ( 1, 6 ) ), 15 )
[ -0.4676458537578583, 1.022988200187683, 0.14971977472305298, 0.024668216705322266, 0.8655277490615845, 0.08495695888996124, 0.5893160104751587, -0.26887863874435425, 0.2796670198440552, -0.9870920777320862, -1.196138620376587, -0.561528205871582, 0.03392628952860832, -0.5365021824836731, ...
def calculate _ similarity ( x, y ) : # both similarity vectors should be of equal length in order to find hamming distance assert len ( x ) = = len ( y ) b = len ( x ) # calculate hamming distance hamming _ dist = 0 for i in range ( b ) : if x [ i ]! = y [ i ] : hamming _ dist + = 1 return ( 1 - hamming _ dist / b )
[ -0.20172211527824402, 0.93803471326828, 0.7062084078788757, 0.16559673845767975, -0.1970917135477066, 0.4184161126613617, -0.3154922425746918, -0.17839676141738892, 0.6668198704719543, 1.177285075187683, -1.1481688022613525, 0.9472317099571228, -0.8087092638015747, -0.06009136885404587, ...
def test _ increasing _ load ( ) - > none : dz _ 0 = np. full ( 100, 1. 0 ) phi _ 0 = np. full ( 100, 0. 5 ) phi _ 1 = compact ( dz _ 0, phi _ 0, porosity _ max = 0. 5 ) dz _ 1 = dz _ 0 * ( 1 - phi _ 0 ) / ( 1 - phi _ 1 ) dz _ 1 [ 0 ] * = 2. 0 phi _ 2 = compact ( dz _ 1, phi _ 1, porosity _ max = 0. 5 ) assert np. all ...
[ -0.18511974811553955, 0.5881452560424805, 0.5212776064872742, 0.1130291149020195, 0.1569276601076126, 0.5688280463218689, 0.3450366258621216, -0.40249940752983093, -0.6721367835998535, -0.3920685052871704, -0.5700533390045166, 0.25697845220565796, -0.2737024426460266, 0.7926445007324219, ...
def get _ tokenizer _ for _ version ( cls, version = bittensor. _ _ version _ _ ) : _ tokenizer = gpt2tokenizer. from _ pretrained ( " gpt2 ", local _ files _ only = false ) _ tokenizer. padding _ side = " left " _ tokenizer. add _ prefix _ space = false _ tokenizer. add _ special _ tokens ( {'bos _ token': " [ bos ] "...
[ -0.3677483797073364, -0.8401517868041992, 0.851428210735321, -0.10669034719467163, -0.8994618058204651, -0.3464755713939667, -0.20061279833316803, 0.636297345161438, -0.5910909175872803, -0.3972618579864502, -1.394592523574829, 0.30135172605514526, 0.8927784562110901, 0.4881339967250824, ...
def setup ( self ) : self. f7 = _ finitefield. finiteprimefield. getinstance ( 7 )
[ 0.6981824040412903, 1.5616294145584106, 0.18024733662605286, -0.48225292563438416, 0.7459763884544373, -0.5714202523231506, 0.9096724390983582, -0.02665005996823311, 0.8633311986923218, -1.0274512767791748, -0.4213455021381378, -0.6142235994338989, -0.855861246585846, 0.28536257147789, -...
def test _ atomic _ hex _ binary _ max _ length _ nistxml _ sv _ iv _ atomic _ hex _ binary _ max _ length _ 1 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / hexbinary / schema + instance / nistschema - sv - iv - atomic - hexbinary - maxlength - 1. xsd ", instance = " ...
[ 0.12355587631464005, 0.2541655898094177, 0.39289629459381104, 0.9712904691696167, -0.11068639159202576, 0.7317034006118774, -0.7218946218490601, 0.3713761866092682, 0.5592486262321472, 0.43259891867637634, -0.4077779948711395, -0.7791101932525635, -0.2810962498188019, 0.20442982017993927, ...
def onsavebuttonclicked ( self ) : if self. _ pandacontroller. hassavedscene ( ) : self. _ pandacontroller. savescene ( self. _ pandacontroller. getsavedscene ( ) ) else : self. onsaveasbuttonclicked ( )
[ 0.06330391764640808, -0.34728625416755676, 0.5998196005821228, 0.1132035180926323, 0.8189843893051147, -0.45466360449790955, 0.4632337987422943, -0.6792681813240051, 0.46226292848587036, 0.2809920012950897, -0.4089756906032562, -0.8678052425384521, 0.10143168270587921, 0.5406389832496643, ...
def logl _ delay ( self, kwargs _ lens, kwargs _ cosmo ) : delay _ arcsec = self. multiband. fermat _ potential ( kwargs _ lens, kwargs _ cosmo ) d _ dt _ model = kwargs _ cosmo ['delay _ dist'] delay _ days = const. delay _ arcsec2days ( delay _ arcsec, d _ dt _ model ) logl = self. _ logl _ delays ( delay _ days, sel...
[ 0.7505870461463928, -0.04849742352962494, 0.40758106112480164, -0.5535488724708557, -0.18043115735054016, 0.9164627194404602, -1.059145212173462, -0.0324789322912693, 0.3285732865333557, -0.49424129724502563, -0.012463554739952087, 0.1889447718858719, 1.2892051935195923, 0.1960494220256805...
def split ( self, path ) : # type : ( str ) - > tuple [ str, str ] raise notimplementederror
[ -1.637791633605957, 0.06677939742803574, 0.3637218475341797, -0.33821842074394226, -0.2777889668941498, 0.5046589970588684, 0.06261225044727325, 0.1463339924812317, -0.07339911162853241, 0.09125426411628723, -0.11181710660457611, -0.4197145998477936, -0.5154024362564087, -0.431806683540344...
def _ set _ masks ( self ) : i _ fc = 0 for p in self. prunable _ model. modules ( ) : if isinstance ( p, maskedlinear ) : p. set _ mask ( self. masks [ i _ fc ] ) i _ fc + = 1 return ( )
[ -0.6281430721282959, -0.6040422320365906, 0.5696697235107422, 0.48385801911354065, 1.139210820198059, 0.5990855097770691, 0.3504105508327484, -0.3025456964969635, -0.6487741470336914, 0.26271215081214905, -1.0745769739151, -0.03710233047604561, -0.21856778860092163, -0.02027355320751667, ...
def test _ moment _ eq ( this, that, exp ) : pytest. debug _ func ( ) if isinstance ( exp, exception ) : with pytest. raises ( type ( exp ) ) : assert ( this = = that ) else : assert ( this = = that ) = = exp
[ -0.0084682060405612, -0.40485242009162903, 0.4364803731441498, 0.4672877788543701, 1.2843878269195557, 0.46846896409988403, 0.2927657961845398, -0.5171604156494141, 1.0951247215270996, -0.02167600765824318, -0.4538656771183014, 0.17326776683330536, -0.6738698482513428, 0.3497800827026367, ...
def wait _ for _ data ( self, timeout : float ) - > none : self. _ _ wait _ for _ read ( self. _ _ socket, timeout )
[ -0.3857589364051819, 0.45128414034843445, 0.2906743288040161, -0.7819920778274536, -0.12661637365818024, 0.6919307112693787, -0.8848115801811218, 0.0060758041217923164, -1.062125563621521, -0.5838068127632141, -0.028967618942260742, 0.6686521172523499, 0.26379936933517456, -0.4256505668163...
def quantizeimage ( imgorig : np. ndarray, nquant : int, niter : int ) - > ( list [ np. ndarray ], list [ float ] ) : rgbimg = false if len ( imgorig. shape ) = = 3 : rgbimg = true imgyiq = transformrgb2yiq ( imgorig ) imgorig = imgyiq [ :, :, 0 ] un _ norm _ img = unnormalize ( imgorig ) histimage, bins = np. histogra...
[ -0.40028855204582214, -0.4555032551288605, 0.569065272808075, -0.27749282121658325, 0.06872256100177765, -1.1532886028289795, 0.7196748852729797, -0.47048622369766235, -0.015131980180740356, 0.06430035829544067, -0.07291456311941147, 0.256868451833725, -0.7733041644096375, 0.78876751661300...
def print _ info ( self, add _ algo _ info = true, add _ performace _ info = true, add _ scheme _ info = false, add _ debug _ info = false ) : s = colorize ( " update { } ". format ( self. update _ worker. actor _ version ), color = " yellow " ) s + = ", num samples collected { }, fps { } ". format ( self. num _ sample...
[ 0.4719347059726715, -0.5587388277053833, 1.2203391790390015, -0.8753563761711121, -0.10921350121498108, 0.40697067975997925, 0.14554543793201447, -0.75411456823349, -0.709481418132782, 0.2416994720697403, 0.32463568449020386, 0.8945491909980774, 0.30949175357818604, 0.9142892360687256, -...
def _ update _ display ( self ) : if self. presenter. shows _ warnings _ only : return def p ( s ) : self. say ('status ', s ) self. presenter. clear ('status') if self. stopping : if self. worker _ count is none or not self. games _ in _ progress : p ( " halting : % s " % self. stopping _ reason ) else : p ( " waiting...
[ -0.24314454197883606, -0.6209024786949158, 0.5567503571510315, -0.6124333739280701, -0.16860364377498627, 0.19374488294124603, 0.5066824555397034, -0.6748327612876892, -0.43817970156669617, 0.5531373620033264, 0.7967292070388794, 0.3874101936817169, -0.0780327096581459, 0.35044336318969727...
def test _ ensure _ device _ manufacturer _ loose _ missing ( self ) : plugin _ settings [ " object _ match _ strategy " ] = " loose " onboarding _ kwargs = { " netdev _ hostname " : " device1 ", " netdev _ nb _ role _ slug " : plugin _ settings [ " default _ device _ role " ], " netdev _ vendor " : " cisco ", " netdev...
[ -0.29918310046195984, 0.41265344619750977, 0.5481107234954834, 0.811754047870636, 0.8734760284423828, 0.4508548676967621, 0.5984377264976501, -0.17375586926937103, 0.5729814171791077, -0.6656390428543091, -0.33834707736968994, -0.25438350439071655, 0.00585053488612175, 1.4799233675003052, ...
def test _ alums ( self, derrida ) : # should return only people who are not currently on project katie = person. objects. get ( first _ name = " katie ", last _ name = " chenoweth " ) rsk = person. objects. get ( first _ name = " rebecca ", last _ name = " koeser " ) rm = person. objects. get ( first _ name = " rebecc...
[ 0.4414289891719818, -0.6991345882415771, 0.4670470356941223, -0.8899417519569397, -0.14929549396038055, 1.6905581951141357, -0.11988380551338196, -0.107848159968853, -0.3281159996986389, 0.06558365374803543, 0.5227105617523193, 0.4024389684200287, -0.029423553496599197, 0.23969398438930511...
def park _ vehicle ( args ) : registration _ no, driver _ age = args [ 1 ], int ( args [ 3 ] ) if not parkinglot. check _ availability ( ) : print ('parking lot full') else : vehicle = vehicle ( registration _ no, driver _ age ) parkinglot. add _ vehicle ( vehicle ) print ( f'car with vehicle registration number " { ve...
[ -0.2747272849082947, -0.22213664650917053, 0.5529639720916748, -0.06293968111276627, 0.5314345359802246, 0.34747013449668884, 0.45850467681884766, 0.767070472240448, -0.791260302066803, 0.28665927052497864, 0.008254947140812874, -0.12272202968597412, -0.5548034310340881, 0.3017983734607696...
def top ( self ) : o = self. get _ ordering _ queryset ( ). aggregate ( min ('order') ). get ('order _ _ min') self. to ( o )
[ -0.7826586365699768, 0.6356119513511658, 0.7638846039772034, 0.11506614089012146, 0.37561702728271484, -0.8152803778648376, -0.4686168432235718, -0.5002470016479492, -0.413965106010437, 0.4992995262145996, 0.9185643792152405, 0.44624611735343933, 0.7311998009681702, -0.4403505027294159, ...
def check _ exist ( self, title, year, category ) : # filter method based on title, year, category def find _ duplicate ( movie ) : filter _ title = title. lower ( ) = = movie. title. lower ( ) filter _ year = int ( movie. year ) = = int ( year ) filter _ category = movie. category. lower ( ) = = category. lower ( ) re...
[ -1.3238660097122192, -0.9233612418174744, 0.8891878724098206, 0.8170264959335327, 0.6526481509208679, 1.1684439182281494, -0.8555261492729187, -0.3464188277721405, -0.3283490538597107, 1.4919620752334595, -0.041193846613168716, 0.26723483204841614, -0.37303122878074646, 0.771009087562561, ...
def prepare _ patients _ for _ metadata _ export ( path _ to _ samples _ info, tsca _ id ) : raw = pd. read _ table ( path _ to _ samples _ info ) print ( " % d participants in this batch " % raw ['individual _ id']. unique ( ). shape [ 0 ] ) # data to upload data = pd. dataframe ( raw. individual _ id. drop _ duplicat...
[ -0.26077038049697876, -0.390207439661026, 0.4927420914173126, -0.6071534156799316, 0.10873013734817505, -0.010356202721595764, -0.08770935982465744, 0.2687597870826721, -0.11829240620136261, 0.8036332130432129, 0.41249579191207886, 0.3440438508987427, 0.8291588425636292, -0.539810240268707...
def cast ( * args ) : return _ itksubtractconstantfromimagefilterpython. itksubtractconstantfromimagefilteriuc2diuc2 _ cast ( * args )
[ -0.05911280959844589, -0.7931174039840698, 0.3157396912574768, -0.29248520731925964, -0.2968042492866516, 0.6071157455444336, 0.9282182455062866, 0.13259081542491913, -0.6758900284767151, -0.049766913056373596, -0.10750813037157059, 0.3268565833568573, 0.3774386942386627, -0.20249088108539...
def get _ head _ from _ section ( self, section ) : head = section. find ( name = " h2 " ) return head
[ 0.09923053532838821, -0.7915019392967224, 0.6110827326774597, 0.7698041796684265, -0.20582149922847748, -0.07425858080387115, -0.30635347962379456, -1.1868290901184082, -0.6288197040557861, 0.6226997375488281, 0.438980370759964, 0.012133952230215073, 0.4622054994106293, -0.0466739647090435...
def rotate ( mat, angle ) : height, width = mat. shape [ : 2 ] image _ center = ( width / 2, height / 2 ) # getrotationmatrix2d needs coordinates in reverse order ( width, height ) compared to shape rotation _ mat = cv2. getrotationmatrix2d ( image _ center, angle, 1. ) # rotation calculates the cos and sin, taking abs...
[ -0.22972708940505981, -0.44836199283599854, 0.5937560200691223, -0.07433958351612091, -0.025325464084744453, -0.5493031144142151, 0.12503521144390106, -0.5699878931045532, 0.3552336096763611, 0.32289591431617737, 0.7423821687698364, 0.1454896777868271, 0.1199706494808197, -0.23922067880630...
def show _ message ( mscreen, msg ) : global message message = msg content = dialogs. messagedialog ( confirm = mscreen. dismiss _ popup, message = message ) mscreen. _ popup = popup ( title = " message ", content = content, size _ hint = ( 0. 4, 0. 3 ) ) mscreen. _ popup. open ( )
[ 1.2954504489898682, 0.25665974617004395, 0.5482868552207947, -0.31782129406929016, -0.6908723711967468, 0.2550900876522064, 0.6246188879013062, 0.936157763004303, -0.0007373745902441442, 0.14015069603919983, 0.5572205781936646, 1.0499024391174316, -0.736253559589386, 1.4518260955810547, ...
def printpath _ 8p ( solutionpath ) : printpath ( solutionpath )
[ 0.20533567667007446, -0.7321447730064392, 0.11744243651628494, 0.6218814253807068, 0.5650666952133179, 0.6677989363670349, 1.5803003311157227, -1.1215349435806274, 0.5617388486862183, -0.08992652595043182, 0.40930524468421936, 0.16470247507095337, -0.44228705763816833, -0.14536152780056, ...
def put _ package ( self, package _ name, package _ contents, user _ name ) : self. _ authorize ( user _ name, resources. repository, none, actions. write ) # put the package in the repository self. package _ repository. put _ package ( package _ name, package _ contents ) # report that a new package has been created s...
[ -0.38381680846214294, 0.8110601305961609, 0.16397619247436523, -0.6803638339042664, 0.6687434315681458, -0.39192652702331543, -0.5445427298545837, 0.41928958892822266, 0.06288089603185654, -0.42767396569252014, -0.2457808554172516, 0.18801365792751312, -0.1253380924463272, -0.4567180871963...
def test _ view _ url _ create _ user _ profile _ exists _ at _ desired _ location ( self, client ) : response = client. get ( " / members / register / " ) assert response. status _ code = = 200
[ 0.2446599155664444, 0.4004915654659271, 0.4045017957687378, 0.5289947986602783, 1.4887595176696777, 0.9292038083076477, 0.3292529284954071, 0.2042396515607834, -0.5316431522369385, -0.3219442367553711, -1.1576899290084839, -0.016386382281780243, 0.3716529607772827, -0.5671229958534241, -...
def test _ valid _ user _ exists _ after _ registration ( self, client, proto _ user ) : response = client. post ( reverse ( " register " ), { " username " : proto _ user. username, " first _ name " : proto _ user. first _ name, " last _ name " : proto _ user. last _ name, " email " : proto _ user. email, " password1 "...
[ -0.20572791993618011, 0.454562783241272, 0.39080730080604553, 0.774025559425354, 0.8297419548034668, 1.0897480249404907, 0.5885021090507507, 0.4908601641654968, -0.4726890027523041, -0.7821084856987, -1.3715506792068481, -0.5292877554893494, -0.32442355155944824, 0.10501540452241898, 0.3...
def getplayerindex ( self ) : if self. color = = red : return 0 return 1
[ -1.3096305131912231, -0.2785799205303192, 0.5642709732055664, 0.3147073984146118, 0.4807969033718109, 0.20744895935058594, 0.1360221952199936, -0.1760815978050232, 0.676953911781311, 0.0655047670006752, -0.16352586448192596, 0.4354410171508789, -0.5905574560165405, 1.0130627155303955, 0....
def parsestrregex ( string, regex, errmsg ) : repattern = re. compile ( regex ) found = repattern. search ( string ) if found : match = found. group ( 1 ) logging. debug ( " found new parsed string : % s " % ( match ) ) return match else : raise exception ( errmsg )
[ 0.3231596350669861, -0.5857803821563721, 0.6879172325134277, -0.27033886313438416, -0.01396661251783371, -0.4657491147518158, 0.46213847398757935, -0.06641509383916855, -0.31070947647094727, -0.407611608505249, 0.38870179653167725, 0.6516762971878052, -0.8686977624893188, -0.88936948776245...
def _ _ init _ _ ( self, gis, csv ) : # load the data. print ( " loading data... " ) # load the gis data. self. gis = gis self. patches = load _ shapes ( self. gis ) # calculate the size and center of the gis data. bbox = bounding _ box ( self. patches ) self. center = [ ( ( bbox [ i ] + bbox [ i + 2 ] ) / 2 ) for i in...
[ 0.05518117919564247, 0.27054622769355774, 0.4443167746067047, -0.2139107584953308, -0.3446604013442993, 0.5073503851890564, 0.03950894996523857, 0.19214558601379395, -0.010256627574563026, -0.23086175322532654, -0.0013542907545343041, -0.18187588453292847, 0.34453460574150085, 0.0492795966...
def get _ secret _ or _ load _ from _ env ( key, secrets, default = none ) : ret _ val = secrets. get ( key ) if ret _ val : return ret _ val return os. environ. get ( key, default )
[ -0.19445614516735077, 0.2839146554470062, 0.5110541582107544, 0.8722004294395447, 0.12254630774259567, -0.45938950777053833, -1.1607246398925781, -0.900198221206665, -0.7394311428070068, 0.5907101035118103, 0.10242297500371933, 0.6568335294723511, -0.453072190284729, 0.15927721560001373, ...
def emit _ init _ log ( self, logger, include _ debug ) : return
[ -0.1466413140296936, -0.35286828875541687, 0.3136672377586365, 0.27911636233329773, -0.2335561215877533, -0.010259032249450684, -0.27694210410118103, 0.34937554597854614, 0.10647810250520706, 0.02546202577650547, -0.6876236796379089, 0.2816583812236786, -0.009382053278386593, 1.56912112236...
def test _ atomic _ base64 _ binary _ min _ length _ nistxml _ sv _ iv _ atomic _ base64 _ binary _ min _ length _ 1 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / base64binary / schema + instance / nistschema - sv - iv - atomic - base64binary - minlength - 1. xsd ", i...
[ 0.2520500123500824, -0.6380780339241028, 0.40010762214660645, 1.160122036933899, -0.187211811542511, -0.005586209706962109, -0.07270492613315582, -0.37986183166503906, 0.08399026095867157, 0.3985312581062317, -0.40251925587654114, 0.3939158022403717, -0.6086592078208923, 0.2754434943199157...
def autolabel ( rects, xpos ='center') : xpos = xpos. lower ( ) # normalize in case of the parameter ha = {'center':'center ','right':'left ','left':'right'} offset = {'center': 0. 5,'right': 0. 57,'left': 0. 43 } for rect in rects : height = rect. get _ height ( ) ax. text ( rect. get _ x ( ) + rect. get _ width ( ) *...
[ 0.2695881128311157, -0.8121941089630127, 0.7430000305175781, -0.5680732131004333, -0.15077440440654755, 0.1862376183271408, -0.06997791677713394, -0.2623808979988098, 0.3360890746116638, 0.7688530087471008, -0.30204394459724426, 0.28127115964889526, 0.5714748501777649, -0.39211505651474, ...
def _ _ internal _ notifier ( self ) : if not self. _ notifier : self. _ notifier = yield from self. _ _ notifier ( ) return self. _ notifier
[ -0.5870154500007629, -0.7321135997772217, 0.6953307390213013, -1.2210445404052734, -0.5541546940803528, -0.09584138542413712, 0.4593985080718994, -0.3151538074016571, 0.1609814614057541, -1.0977195501327515, -0.2101353406906128, 0.313881516456604, -0.4056755602359772, 0.5301079154014587, ...
def user _ defined _ tags ( self, user _ defined _ tags ) : self. _ user _ defined _ tags = user _ defined _ tags
[ 0.8978163003921509, -0.3839852511882782, 0.20863288640975952, 0.9568943381309509, 0.5812875032424927, 0.3732398450374603, -0.08035368472337723, 0.032439958304166794, -1.3234175443649292, -0.2531634271144867, -2.0596563816070557, 0.0015775456558912992, 0.471957266330719, 0.8760154247283936,...
def get _ ds ( name ) : if name = = " mnist " : ds = mnist ( ) return ds [ name ] elif name = = " mnist - c " : ds = mnist ( ) return ds [ name ] elif name = = " fashionmnist " : ds = fashionmnist ( ) return ds [ " fashion " ] elif name = = " svhn _ cropped " : ds = svhn ( ) return ds [ " svhn _ cropped " ] elif name =...
[ -0.6019544005393982, -0.21035586297512054, 0.5691151022911072, -0.5603576898574829, -0.6380046010017395, -0.5845350623130798, -0.4389345049858093, -0.7420119047164917, 0.44233912229537964, -0.698186993598938, -0.40206408500671387, 1.0288444757461548, 0.9751498103141785, -0.0198818165808916...
def lambda _ handler ( event, context ) : logger. info ('received event : % s ', json. dumps ( event, indent = 2 ) ) s3 _ bucket = event ['input'] ['s3bucket'] manifest _ s3 _ key = event ['input'] ['s3key'] manifest _ s3 _ version _ id = event ['input'] ['s3versionid'] manifest _ content = read _ file _ from _ s3 _ w ...
[ 0.09926008433103561, -0.15353716909885406, 0.944654643535614, -0.325778990983963, 0.02103416994214058, -0.2604735791683197, 0.27041158080101013, 0.9879886507987976, -0.05082859843969345, 0.22373172640800476, -0.7261826395988464, 0.041162293404340744, -0.23469895124435425, 0.192483723163604...
def test _ _ put _ user _ limit _ into ( ) : for input _ value, defaults, expected _ output in ( ( user _ limit _ default, false, {'user _ limit': user _ limit _ default } ), ( 1, false, {'user _ limit': 1 } ), ) : data = put _ user _ limit _ into ( input _ value, { }, defaults ) vampytest. assert _ eq ( data, expected...
[ -0.18097731471061707, 0.7153257131576538, 0.2984924018383026, 0.5081369280815125, 0.31343716382980347, 0.046181805431842804, 0.11463095247745514, 0.00028002375620417297, -0.22932718694210052, 0.19024023413658142, -0.9149941802024841, -0.08264481276273727, -0.9454834461212158, -1.0281354188...
def wamp ( self ) : issecure, host, port, resource, path, params = parse _ url ( self. irl ) ssl = true serializers = none loop = txaio. config. loop = asyncio. new _ event _ loop ( ) self. wamp _ eventloop = loop asyncio. set _ event _ loop ( loop ) async def applicationrunnersimile ( loop ) : while true : try : self....
[ 0.20601600408554077, -0.95182865858078, 0.8787161111831665, 0.5898832678794861, -0.5255569219589233, 0.24834810197353363, 0.4340064823627472, -0.13548026978969574, -0.00624095881357789, 0.433257520198822, 0.017392221838235855, -0.14537614583969116, -0.6776459217071533, -0.0340169221162796,...
def auto _ make _ proc ( * args ) : return _ ida _ auto. auto _ make _ proc ( * args )
[ 0.11679326742887497, 0.23693791031837463, 0.4352826774120331, -0.07879681140184402, 0.2773991823196411, 0.08964142948389053, 1.90765380859375, -0.8810110688209534, -0.252546489238739, -0.3876117765903473, -0.5161517262458801, 0.5697579979896545, 0.8079574108123779, -0.9331549406051636, 1...
def find _ url _ for _ rom ( self, rom ) : try : response = urllib2. urlopen ( self. consolegrid _ top _ picture _ url ( rom ) ) if response. getcode ( ) = = 204 : raise providererror ( " consolegrid has no game called % s for % s. try going to http : / / consolegrid. com and submitting the game yourself " % ( rom. nam...
[ -1.4241925477981567, 0.4742153584957123, 0.4946826696395874, 0.05683097615838051, 0.2001551240682602, -0.8495193123817444, 0.16969850659370422, -1.2310709953308105, -0.02523994632065296, 0.32639914751052856, 0.1791684478521347, -0.09719876199960709, -0.6450791358947754, 0.1488197296857834,...
def resetselected ( self ) : for minion in self. hero _ top. board : if minion. selected : minion. selected = false for minion in self. hero _ bottom. board : if minion. selected : minion. selected = false self. hero _ bottom. selected = false self. hero _ top. selected = false self. attackchoice = false
[ -0.24073567986488342, -0.9766701459884644, 0.5362992882728577, 0.3050386905670166, 1.0434305667877197, -0.19227717816829681, 0.5234043002128601, 0.10850163549184799, -0.34402593970298767, 0.754056453704834, -0.7873467206954956, 1.6125441789627075, -0.8868309855461121, -0.27383315563201904,...
def extract _ mean _ overlap ( ) : # - - directory config db _ dir = r'/ nfs / t2 / baa / ssr'base _ dir = r'/ nfs / h1 / workingshop / huanglijie / autoroi'doc _ dir = os. path. join ( base _ dir,'doc') # - - laod session id list for training sessid _ file = os. path. join ( doc _ dir,'sessid') sessid = open ( sessid ...
[ -0.18590298295021057, -0.4258113503456116, 0.8577796816825867, 0.5238789319992065, 0.3304663598537445, 0.4324803650379181, 1.176041841506958, 0.3331603705883026, 0.7972683310508728, 0.8593626022338867, -0.1152973398566246, 0.28244924545288086, -0.4646621644496918, -0.046000029891729355, ...
def timed ( func _ or _ code ) : timer = timeit. timer ( func _ or _ code ) repeat, number = 3, 1 for i in range ( 1, 10 ) : if timer. timeit ( number ) > = 0. 2 : break else : number * = 10 time = min ( timer. repeat ( repeat, number ) ) / number if time > 0. 0 : order = min ( - int ( math. floor ( math. log10 ( time ...
[ -0.46817195415496826, 0.6716116666793823, 0.708990752696991, -0.43825268745422363, 0.453843891620636, -0.4865545332431793, -0.21454434096813202, -0.7633137702941895, -0.5083811283111572, 0.4709947109222412, -0.9727334380149841, -0.26238274574279785, 0.27248477935791016, 0.45308080315589905...
def getosversioninfo ( mountpoint ) : # check for availability of basesystem. dmg basesystem _ dmg = os. path. join ( mountpoint,'basesystem. dmg') if not os. path. isfile ( basesystem _ dmg ) : unmountdmg ( mountpoint ) fail ('missing basesystem. dmg in % s'% mountpoint ) # mount basesystem. dmg basesystemmountpoints,...
[ 0.18836025893688202, -0.7936415076255798, 0.6386349201202393, 0.530105471611023, -0.34368038177490234, 0.36092424392700195, 0.00808137096464634, -0.19476956129074097, 0.25515004992485046, 0.5834203362464905, -0.8724938035011292, -0.10630133748054504, -0.10523294657468796, 0.573617279529571...
def parse _ request _ uri _ response ( self, uri, state = none ) : response = parse _ authorization _ code _ response ( uri, state = state ) self. _ populate _ attributes ( response ) return response
[ -1.1106197834014893, -0.05087596923112869, 0.5964966416358948, 0.9777793288230896, -0.27546313405036926, -0.37636634707450867, 0.17920748889446259, 0.1056114211678505, 1.238473653793335, -0.8286672830581665, 0.5110036730766296, -0.8474312424659729, -0.31350448727607727, -1.1429171562194824...
def set _ optimizer _ params _ grad ( named _ params _ optimizer, named _ params _ model, test _ nan = false ) : is _ nan = false for ( name _ opti, param _ opti ), ( name _ model, param _ model ) in zip ( named _ params _ optimizer, named _ params _ model ) : if name _ opti! = name _ model : logger. error ( " name _ o...
[ -0.42537549138069153, 0.07920446991920471, 0.7856134176254272, -0.14968065917491913, 0.010704785585403442, 0.5571675896644592, -0.33971714973449707, -0.2600412368774414, -1.1985979080200195, 1.2381423711776733, -0.9336696863174438, 0.3898426592350006, -0.5361264944076538, 0.699631929397583...
def _ _ ne _ _ ( self, other ) : # type : ( object ) - > bool return not self = = other
[ -1.2665585279464722, -0.5933164954185486, 0.6426020860671997, 0.6789525151252747, 0.22412268817424774, 0.49906450510025024, -0.3737649917602539, -1.3712576627731323, 0.1816290318965912, -0.07524142414331436, -0.985895574092865, -0.08267334848642349, -0.18786092102527618, -0.380923211574554...