text
stringlengths
25
2.19k
embedding
listlengths
768
768
def tracer ( func ) : calls = [ 0 ] @ wraps ( func ) def wrapper ( * args, * * kwargs ) : calls [ 0 ] + = 1 print'execution of function { } number { } '. format ( func. _ _ name _ _, calls [ 0 ] ) return func ( * args, * * kwargs ) return wrapper
[ -0.20528489351272583, 0.3197546601295471, 0.7617547512054443, -0.1206640973687172, 0.2522122263908386, 0.6234039664268494, 0.6466238498687744, -0.5444052219390869, 0.7903698086738586, -0.3462716341018677, -0.13462233543395996, 0.1549927443265915, 0.8352441191673279, 0.7399578094482422, 0...
def gameoflife ( self, board ) : if board is none or len ( board ) = = 0 : return m, n = len ( board ), len ( board [ 0 ] ) alive = set ( ) def checknumlive ( i, j ) : livecount = 0 for x, y in map ( lambda a : ( a [ 0 ] + i, a [ 1 ] + j ), ( [ ( 0, 1 ), ( 1, 0 ), ( - 1, 0 ), ( 0, - 1 ), ( 1, 1 ), ( - 1, - 1 ), ( - 1, ...
[ 0.004613819532096386, 0.390259325504303, 1.0996755361557007, 0.3904334008693695, -0.31322887539863586, 0.3828921914100647, 0.6243292093276978, 0.2005537897348404, 0.18828508257865906, 0.940555214881897, 0.029773911461234093, -1.300937533378601, -0.5813289284706116, -0.08967053890228271, ...
def tk _ window ( ) : # global variables global codevar global descvar global amountvar # creates the window object, adds a title, sets the size of the window # and makes it non - resizable window = tk ( ) window. title ('stockitall') window. geometry ('300x150') window. resizable ( false, false ) # define stringvars f...
[ 0.7645665407180786, 0.3088774085044861, 0.9481638669967651, 0.1432834416627884, -0.20342400670051575, 0.1800358146429062, 0.904347836971283, -0.5009669065475464, -0.22096635401248932, -0.41296952962875366, 0.05111800506711006, 0.35985273122787476, 0.02824561297893524, 1.2016221284866333, ...
def update _ targets ( self, items ) : for doc in items : self. task _ types. collection. update ( {'task _ id': doc ['task _ id'] }, doc, upsert = true )
[ -1.5632694959640503, -0.5988702774047852, 0.5534449815750122, 0.2949029207229614, 1.2409746646881104, 0.9706959128379822, 0.44399571418762207, -0.052424974739551544, -0.44566333293914795, 1.5150697231292725, -0.7237609624862671, -0.4006521999835968, -0.3787354826927185, 0.2816859185695648,...
def perspective ( self, width, height, vfov, fznear, fzfar ) : if width < = 0 or height < = 0 : return self. fzfar = fzfar self. fznear = fznear self. fov = vfov self. width = width self. height = height self. aspect = self. width / float ( self. height ) self. projection = matrix16. perspective ( self. fov, self. aspe...
[ 0.551420271396637, -1.0395753383636475, 0.4638095200061798, -0.3562476933002472, -0.4203472137451172, -0.468434602022171, -0.6558242440223694, 0.03157094120979309, 0.9279460310935974, -0.3692013621330261, 0.0362347774207592, -0.1293656975030899, -1.008164644241333, -0.1501486897468567, 0...
def delete _ reminder ( self ) : xpath = self. util. read _ xpath _ list _ from _ xml ( self. object _ repo, " setreminder ", self. my _ object ) for loop _ index in range ( 0, len ( xpath ) ) : print loop _ index self. object. click ( self. util. client, xpath [ loop _ index ] ['zone'], xpath [ loop _ index ] ['xpath'...
[ -0.9183986186981201, 0.19845561683177948, 0.850938081741333, -0.5174769163131714, -0.24529284238815308, 0.08181242644786835, 0.6713804006576538, 0.036848120391368866, 0.7858842015266418, 0.15524449944496155, -0.14177295565605164, 0.052139874547719955, -0.8251705765724182, 0.942441523075103...
def validation _ dataset ( self, val _ split _ file ='val. txt ', batch _ size = 1 ) : return self. _ make _ dataset ( val _ split _ file, batch _ size, false )
[ -0.32449808716773987, 0.5093808770179749, 0.2061486542224884, 0.7085780501365662, -1.1919574737548828, 0.7309044003486633, 0.29998618364334106, 0.7363929152488708, -0.860984742641449, -0.6231845021247864, 0.3536384403705597, 0.20856811106204987, -0.35436514019966125, -0.9095695614814758, ...
def set _ context ( self, ctx ) : self. ctx = ctx
[ -0.4731043577194214, -0.04357638582587242, 0.1444937288761139, -0.24482160806655884, 0.3162202835083008, 0.9034306406974792, -0.37345948815345764, -0.07315163314342499, 0.8349416255950928, -0.5154211521148682, -0.7934954762458801, 0.4341477155685425, 0.07864750176668167, -0.103688769042491...
def test _ batch _ redetect ( self ) : for detector in self. detectors : with self. subtest ( detectortype = detector. detectortype ) : detectseveral = detector. detect ( images = [ vlimage _ one _ face, vlimage _ several _ face ] ) redetect = detector. redetect ( images = [ imageforredetection ( image = vlimage _ seve...
[ -0.1166047677397728, -0.07777343690395355, 0.4936702251434326, 1.277336835861206, 1.3732799291610718, -0.6308562159538269, 0.7338942289352417, 0.1689373403787613, 0.4539061486721039, -0.15151475369930267, -1.0499259233474731, -0.38146501779556274, 0.5562108159065247, 1.058824062347412, -...
def x _ rotation ( vector, theta ) : r = np. array ( [ [ 1, 0, 0 ], [ 0, np. cos ( theta ), - np. sin ( theta ) ], [ 0, np. sin ( theta ), np. cos ( theta ) ] ] ) return np. dot ( r, vector )
[ -0.3557511866092682, 0.3597438633441925, 0.26368969678878784, -0.7323659658432007, -0.12655235826969147, -0.4839511513710022, -0.49708133935928345, 0.21497683227062225, -0.15772698819637299, 0.9087332487106323, -0.636592447757721, 0.10443954169750214, -0.03787130489945412, -1.1915334463119...
def _ format _ radius ( radius : union [ float, list, tuple, torch. tensor ], pointclouds ) - > torch. tensor : n, p _ padded = pointclouds. _ n, pointclouds. _ p points _ packed = pointclouds. points _ packed ( ) p _ packed = points _ packed. shape [ 0 ] if isinstance ( radius, ( list, tuple ) ) : radius = torch. tens...
[ -0.024017199873924255, -0.01735265739262104, 0.5964098572731018, 0.167354553937912, -0.19874697923660278, 0.11653202772140503, 0.12129019945859909, -0.6323261857032776, 0.29304367303848267, 0.6103892922401428, 0.7919323444366455, 0.3548085391521454, -0.35264915227890015, 0.2147655487060547...
def session _ made ( self, conn ) : print ( " session made " ) self. connection = conn self. our _ dest = conn. dest print ( " are address is % s " % self. our _ dest. base32 ( ) ) self. loop. call _ later ( 1, self. ping _ loop ) raise return ( )
[ -0.520630955696106, -0.45296868681907654, 0.5757975578308105, 0.39418527483940125, -0.0849282443523407, 0.16960172355175018, 0.1445765644311905, -0.09186022728681564, 0.2213985025882721, -0.05139956250786781, -0.7346399426460266, 0.15608637034893036, -0.18809032440185547, -0.36303743720054...
def get _ plant _ id _ for _ resources _ in _ loadzones ( resources, loadzones, grid ) : plant _ id = get _ plant _ id _ for _ resources ( resources, grid ) & get _ plant _ id _ in _ loadzones ( loadzones, grid ) return set ( plant _ id )
[ 0.5170229077339172, -0.7982859015464783, 0.2898178696632385, 0.32645952701568604, 0.3542447090148926, -0.009741680696606636, 0.3190625011920929, -0.6500146985054016, -0.009887972846627235, 0.4650740921497345, 0.06643863022327423, 0.17249776422977448, -0.1158926859498024, -0.551716387271881...
def validate _ unique _ environment _ ids ( environments : union [ list [ dict ], list [ union [ aandeenvironmentagent, environmentagent, gpenvironmentagent ] ], ], id _ key : str = " environment _ id ", ) - > none : # validate unique environment _ ids strictly, i. e. don't allow if same # stringified value environment...
[ -0.7710172533988953, -0.34030893445014954, 0.3717397451400757, -0.35275164246559143, 0.5504038333892822, 0.33035218715667725, 0.1622401773929596, 0.07460808753967285, 0.878864049911499, 0.8939559459686279, 0.4221794307231903, 0.43915092945098877, 0.13157780468463898, 0.9172748327255249, ...
def _ read _ transport _ mode ( self ) : try : with open ( global _ config _ path, " r " ) as read _ file : data = json. load ( read _ file ) self. _ transport _ mode = data. get ( _ transport _ mode, none ) except : raise exception ('transport mode is not configured for the gadget.'' please run the launch. py script w...
[ -0.44586214423179626, -0.3258451223373413, 0.650257408618927, -0.8364437818527222, 0.5116034746170044, 0.6084164381027222, 0.18730752170085907, -0.15821868181228638, -0.7862841486930847, 0.8458276987075806, -0.6492804288864136, 0.21645201742649078, 0.37307173013687134, -0.9124453663825989,...
def test _ see _ service ( self, mock _ see ) : with assert _ setup _ component ( 1, device _ tracker. domain ) : assert setup _ component ( self. hass, device _ tracker. domain, test _ platform ) params = {'dev _ id':'some _ device ','host _ name':'example. com ','location _ name':'work ','gps': [. 3,. 8 ],'attributes...
[ -0.5618364214897156, 0.5890845060348511, 0.6947644352912903, -0.7943829298019409, 0.3579944372177124, 0.22703255712985992, 0.26432427763938904, -0.5238974094390869, 0.28838101029396057, -0.24857406318187714, 0.05366770923137665, 0.48802807927131653, 0.0339437760412693, 0.5389031767845154, ...
def execute _ singleton1 ( self, sql : str, * params ) - > any : cursor = self. _ _ conn. cursor ( ) cursor. execute ( sql, * params ) rows = cursor. fetchall ( ) cursor. close ( ) n = len ( rows ) if n! = 1 : raise resultexception ('1 ', n, sql ) return rows [ 0 ] [ 0 ]
[ -0.2981771230697632, 0.793340802192688, 0.7208136916160583, 1.1301159858703613, 0.36469757556915283, -0.28027018904685974, 0.04638887196779251, -0.4856664538383484, -0.1296280175447464, 0.015324707143008709, 0.6171448826789856, 0.5251891613006592, -0.8315432667732239, 0.5124526619911194, ...
def leadingzeros ( num ) : return " { : 02d } ". format ( num )
[ 0.8629049062728882, -1.32843816280365, 0.6447492837905884, -0.41925427317619324, 0.5381593108177185, 0.7996867895126343, -0.6206997632980347, -0.38340476155281067, 0.7431780099868774, -0.8240960240364075, 0.3704456686973572, 0.7385067939758301, 0.06333784759044647, 0.6629716753959656, 0....
def is _ admin ( ) : return _ is _ admin ( )
[ -0.8194778561592102, 0.6618517637252808, 0.16045589745044708, 1.1024060249328613, 0.18456418812274933, -0.7345260381698608, -0.6959177851676941, -1.2526739835739136, 0.5045790076255798, 0.039491087198257446, 0.14669430255889893, 1.2792094945907593, -0.4750792980194092, -0.00704579427838325...
def _ repr _ json _ ( self ) : return json. puts ( self. _ repr _ dict _ )
[ -1.0743440389633179, -0.8576613068580627, 0.4743024408817291, -2.544759511947632, -1.2006617784500122, -0.0872921571135521, -0.04833962395787239, 0.013899369165301323, 0.3098868727684021, 0.8036422729492188, -0.5922641754150391, 0.9539362788200378, 0.35069793462753296, -0.1837959587574005,...
def unique _ modules ( directory ) : found = { } for entry in sorted ( os. listdir ( directory ) ) : if entry. startswith ('_') : continue module = is _ module ( entry ) if module : if module not in found : found [ module ] = entry yield module elif is _ package ( os. path. join ( directory, entry ) ) : if entry not in...
[ -0.7022409439086914, 0.1490010768175125, 0.7446746826171875, -0.8988487124443054, 0.24228405952453613, 0.2958979904651642, 0.2408546656370163, -1.0806411504745483, 1.0729032754898071, 0.18895091116428375, -0.42570146918296814, 0.40015971660614014, 0.7351362109184265, 0.7944319844245911, ...
def evaluate _ diag ( self, x : jaxarray ) - > jaxarray : h = self. observation _ model ( x ) return h @ self. stationary _ covariance ( ) @ h
[ -1.5481220483779907, 0.06556106358766556, 0.6187426447868347, 0.2615998387336731, -0.27877137064933777, 0.3959524929523468, -0.03421073779463768, -0.18932241201400757, 0.11372092366218567, 0.05850217491388321, 0.3074420988559723, 0.2809901535511017, 0.7325359582901001, -0.18875545263290405...
def get _ amenities ( ) : amenities = [ ] all _ amenities = storage. all ( amenity ). values ( ) for ame in all _ amenities : amenities. append ( ame. to _ dict ( ) ) return jsonify ( amenities )
[ -0.9366385340690613, -0.8199232816696167, 0.5474366545677185, -0.06496289372444153, -0.009590021334588528, -0.24499782919883728, -1.4850082397460938, -0.0846032127737999, -0.24774578213691711, 0.6578634977340698, -1.1024984121322632, 0.8650318384170532, 0.8602691292762756, 0.64481270313262...
def entry _ repr _ heading ( format _ style = none ) : if format _ style is none : format _ style = format _ style _ default if format _ style is format _ style _ simple : return _ entry _ repr _ simple. heading elif format _ style is format _ style _ full : return _ entry _ repr _ full. heading else : raise exception ...
[ -0.03917091339826584, -0.32514211535453796, 0.6105292439460754, 0.1966162621974945, -0.5171412825584412, -0.1422746479511261, -0.4227987825870514, 0.05218786001205444, 0.9301673769950867, 0.3396809697151184, 0.8719196915626526, 0.5282891988754272, -0.4156004786491394, -0.20082315802574158,...
def load _ names _ in _ dicts ( ) : try : for keys in known _ face _ names : in _ minutes [ f'{ keys }'] = " " out _ minutes [ f'{ keys }'] = " " except exception as e : messagebox. showerror ( " load names to dicts error ", str ( e ) )
[ -0.6674876809120178, -0.05269402265548706, 0.4899888038635254, -1.662529468536377, -0.778060793876648, -0.06935271620750427, -0.6547722816467285, -0.6544198393821716, -0.6567099690437317, 0.6908220648765564, -0.8191471695899963, 0.15835852921009064, 0.11941824108362198, 0.22861599922180176...
def cascade ( self, line _ from = 0 ) : for y in range ( line _ from, len ( self. textlist ) - 1 ) : if len ( self. textlist [ y ] ) > self. width : if'' in self. textlist [ y ] : add _ to _ text = self. textlist [ y ]. split ('' ) [ - 1 ] self. textlist [ y ] =''. join ( self. textlist [ y ]. split ('' ) [ 0 : - 1 ] )...
[ -0.09731865674257278, 0.1542222797870636, 1.2124650478363037, -0.36280199885368347, -0.3016519844532013, -0.06868794560432434, -0.11438272148370743, 0.6118502020835876, 0.6572006344795227, 0.278384804725647, -0.13084660470485687, -0.04382826387882233, -0.4674718379974365, 0.960334479808807...
def casual _ tokenizer ( text ) : tokens = [ word for word in casual _ tokenize ( rm _ punctuation ( text ), preserve _ case = false, reduce _ len = true, strip _ handles = true ) ] wordnet _ lemmatizer = wordnetlemmatizer ( ) stems = [ wordnet _ lemmatizer. lemmatize ( item ) for item in tokens ] # stemmer = porterste...
[ -0.09585355967283249, -0.9267268180847168, 0.4115070402622223, -0.2353733777999878, -0.8002446293830872, 0.11233577877283096, -1.0972626209259033, 0.9173398613929749, 0.3957879841327667, -0.23820173740386963, -0.6114450693130493, -0.5002820491790771, -0.22101442515850067, 1.141354084014892...
def copy _ weights _ between _ models ( m1, m2 ) : # load state dictionaries for m1 model and m2 model m1 _ state _ dict = m1. state _ dict ( ) m2 _ state _ dict = m2. state _ dict ( ) # set the m2 model's weights with trained m1 model weights for name, param in m1 _ state _ dict. items ( ) : if name not in m2 _ state ...
[ -0.7459061741828918, -0.8689134120941162, 0.9231991767883301, -0.26841431856155396, -0.5178026556968689, 0.5419166684150696, -0.2949244976043701, -0.44968631863594055, -0.6718931794166565, 0.9071903228759766, -0.554175078868866, 0.3143557012081146, -0.19829152524471283, 0.31429097056388855...
def setup _ method ( self, method ) : self. hass = get _ test _ home _ assistant ( )
[ -0.16197185218334198, 0.5252925753593445, 0.44307538866996765, 0.36510205268859863, 1.1067472696304321, -0.468719482421875, 0.8278992176055908, -0.5278913974761963, 0.4634709656238556, -0.5967199206352234, 0.12434176355600357, 0.2990081310272217, 0.16881878674030304, 1.0519909858703613, ...
def construct _ polynomial _ approx ( degree, weights ) : # here is a function that is created on the fly from the input feature # mapping and weights def prediction _ function ( xs ) : expanded _ xs = np. matrix ( expand _ to _ monomials ( xs, degree ) ) ys = expanded _ xs * np. matrix ( weights ). reshape ( ( len ( w...
[ 0.5927714109420776, -0.7998406291007996, 0.5161278247833252, -0.5552160739898682, -0.9755443334579468, 0.14428600668907166, -0.3402363061904907, 0.679629921913147, -0.1412130445241928, -0.05160372704267502, 0.3869842290878296, 0.7090516090393066, 0.40251392126083374, -0.4608529806137085, ...
def check _ value _ error ( value, index, line _ num, file _ name, title ) : keep _ order = 0 this _ year = datetime. date. today ( ). year value _ cheks = [ { " type ( value ) = = str " : " value " }, { " index = = 2 " : " 3 " }, { # this part is only for the sold copies " value > 500 " : "'inputerror : you have too h...
[ -0.27768439054489136, -0.36381542682647705, 0.8552084565162659, 0.3308694660663605, -0.2468981295824051, 0.02335931360721588, 0.16819903254508972, -0.3470231294631958, -0.6382197141647339, 0.41917741298675537, 0.5756454467773438, 0.38191577792167664, -0.1749933660030365, -0.014218674041330...
def find _ plus ( word ) : if'+'in word : return 1 return 0
[ 0.002561192726716399, 0.23393507301807404, 0.5427296161651611, 0.4321008622646332, -1.4508379697799683, 0.4145355224609375, -0.26484209299087524, -0.2443845421075821, 0.6947115659713745, -0.0023585872258991003, 0.514215886592865, -0.25541847944259644, -0.747611403465271, 0.8716988563537598...
def checkuserexists ( self, username ) : if ( user. select ( ). where ( user. username = = username ). exists ( ) ) : return ( true ) else : return ( false )
[ -0.9368171095848083, 0.06952844560146332, 0.3549405038356781, 0.7306525707244873, 0.883755624294281, 0.8717283010482788, -0.189217671751976, 0.659074068069458, -0.6620804667472839, 0.3989630341529846, -0.3094799816608429, -0.9403701424598694, -0.36498767137527466, -0.020138563588261604, ...
def wordnet _ pos ( tag ) : table = { " n " : wordnet. noun, " v " : wordnet. verb, " r " : wordnet. adv, " j " : wordnet. adj } # default to a noun. return table. get ( tag [ 0 ], wordnet. noun )
[ 0.11276658624410629, -0.5299179553985596, 0.046146899461746216, -0.48903417587280273, -0.16205744445323944, -0.5117157697677612, -0.980819046497345, -0.9992911219596863, -0.46575313806533813, 0.4745711088180542, -0.24913795292377472, -1.033411979675293, 0.15766920149326324, 0.2937571704387...
def rds _ set ( self ) - > pulumi. output [ bool ] : return pulumi. get ( self, " rds _ set " )
[ 0.18085801601409912, 1.335750937461853, 0.5405086278915405, -0.7750931978225708, 0.6744310855865479, 0.7100644707679749, -0.8467893600463867, -0.9327362775802612, 0.26981163024902344, 0.42544978857040405, -0.07061818987131119, 1.1569591760635376, -0.9749875664710999, -0.8764140605926514, ...
def get _ vcf _ allele ( hgvs, genome, transcript = none ) : chrom, start, end = hgvs. get _ vcf _ coords ( transcript ) _, alt = hgvs. get _ ref _ alt ( transcript. tx _ position. is _ forward _ strand if transcript else true ) ref = get _ genomic _ sequence ( genome, chrom, start, end ) if hgvs. mutation _ type in _ ...
[ 0.15904776751995087, -0.48315098881721497, 0.6223456263542175, 0.7302378416061401, -0.0870237797498703, -0.41058823466300964, 0.038170479238033295, 0.3432387709617615, -0.5774000883102417, 0.6312565803527832, 0.11100195348262787, 0.8072746396064758, -0.6244763135910034, -0.5213643312454224...
def train ( self ) : config = tf. configproto ( device _ count = {'gpu': 1 } ) for _ in range ( self. episodes ) : terminal = false state = self. env. reset ( ) while not terminal : action = self. get _ action ( state ) observation, reward, terminal, _ = self. env. step ( action ) state = self. run ( state, action, rew...
[ -0.7281050086021423, 0.19614167511463165, 0.315654993057251, 0.5181208848953247, 1.1227041482925415, -0.11057006567716599, 0.09858335554599762, 0.3261021673679352, -0.9035875797271729, 0.2911907732486725, -0.43962135910987854, 0.5213658213615417, 0.23271606862545013, -0.3106655776500702, ...
def runtime ( self ) : return self. metadata. get ( " backend ", self. metadata. get ( " platform " ) )
[ -0.12253216654062271, -0.09496796876192093, 0.5988401770591736, 0.10934551805257797, 0.8810122013092041, 0.192892387509346, -0.7729078531265259, 0.06338470429182053, -1.1845698356628418, 1.0316736698150635, -0.01689242012798786, 0.8950985074043274, -1.212877869606018, 0.5844972133636475, ...
def _ request ( self, path, params ) : params = dict ( params ) # make a copy. if'self'in params : # remove'self'added by locals ( ) del params ['self'] if self. auth : params ['auth'] = self. auth else : params ['source'] = self. source query = urllib. urlencode ( params ) url = " { 0 } { 1 }? { 2 } ". format ( base _...
[ -1.431701421737671, 0.0989120602607727, 0.36918333172798157, -0.34189772605895996, 0.1286836564540863, -0.4137031137943268, -0.6274277567863464, -0.32165414094924927, -0.2516999840736389, 0.2573951780796051, 0.3935748040676117, 0.9078627228736877, -0.18316228687763214, -0.07751596719026566...
def _ _ str _ _ ( self ) : return " { } : id = { } ; version = { } ; signedoff = { } ; is _ superpanel = { } ". format ( self. name, self. id, self. version, self. signedoff, self. superpanel )
[ 0.1499442160129547, -1.5981996059417725, 0.44223552942276, -0.6416902542114258, -0.8156378269195557, 1.0756829977035522, -0.8376436829566956, -0.4576825499534607, 0.06296464800834656, -0.051847100257873535, -1.0375478267669678, 0.5909973978996277, -0.7580559849739075, 0.14657136797904968, ...
def fbx _ cleaner ( delete = false, spacestring ='03fbxasc032') : _ str _ func ='fbx _ cleaner'log. debug ( " | { 0 } | > >... ". format ( _ str _ func ) ) _ res = { } for o in mc. ls ( ) : _ res [ o ] = [ ] _ l = mc. listattr ( o, userdefined = true ) or [ ] for a in _ l : _ res [ o ]. append ( a ) _ shapes = trans. s...
[ 0.07165318727493286, -0.07152007520198822, 0.8905107975006104, -0.48943766951560974, -1.2554900646209717, -0.8187587261199951, 0.34216058254241943, -0.32804134488105774, -0.7287842035293579, 0.2493487447500229, -0.2536656856536865, 0.37165603041648865, 0.9748627543449402, 1.065703153610229...
def keypress ( self, size, key ) : if self. _ w. selectable ( ) : key = self. _ w. keypress ( size, key ) return key
[ 0.18895335495471954, 0.34036099910736084, 0.417451947927475, 0.09167417138814926, -0.7080513834953308, -0.307883620262146, 0.49477526545524597, -1.4943366050720215, 0.33934885263442993, 0.42664799094200134, -0.39440208673477173, 0.3156476616859436, -1.0856399536132812, -0.24959252774715424...
def test _ get _ parameters ( self ) : pass
[ 0.06113231182098389, 0.6807838678359985, 0.3215733766555786, 1.1917386054992676, 1.2209374904632568, 0.40716516971588135, 0.9066446423530579, -0.3422982394695282, -0.17152370512485504, -0.4450836479663849, -0.15461058914661407, 0.6077861189842224, -1.253097653388977, 0.1706802099943161, ...
def authorize ( vm _ uuid, datastore _ url, cmd, opts ) : logging. debug ( " authorize : cmd = % s opts = ` % s'vm _ uuid = % s, datastore _ url = % s ", cmd, opts, vm _ uuid, datastore _ url ) # the possible value of " datastore _ url " can be url of real datastore or " _ vm _ ds : / / " error _ msg, _ auth _ mgr = ge...
[ -0.7534015774726868, 0.3254564106464386, 0.7229362726211548, 0.5445067286491394, 0.10081310570240021, -0.7745736837387085, -0.044777702540159225, 0.6770082712173462, -0.2518584132194519, 0.6000940799713135, 0.9261006712913513, 0.7149502635002136, -0.23423448204994202, 0.7638086676597595, ...
def _ mgui _ set _ step ( self, value : float ) : if value and value < 1 * 10 * * - self. _ qwidget. decimals ( ) : self. _ qwidget. setdecimals ( math. ceil ( abs ( math. log10 ( value ) ) ) ) self. _ qwidget. setsinglestep ( value )
[ 0.685221791267395, 0.6095534563064575, 0.5393155217170715, -0.33132681250572205, 0.05808120220899582, 0.7868180274963379, -0.059716179966926575, -0.5040923357009888, -0.5555707216262817, -0.448773056268692, -0.2448180764913559, -0.27058738470077515, 0.5548633933067322, 1.7094005346298218, ...
def setup ( self, parameters ) : return notimplemented
[ -0.9190001487731934, -0.44483235478401184, 0.4121241867542267, -0.2543397843837738, 0.9472078084945679, 0.5826493501663208, 0.7487670183181763, -0.3650161921977997, 0.4786209464073181, 0.6120561957359314, -0.3926636576652527, -0.1144397109746933, -0.567257285118103, 0.6841273307800293, -...
def plot _ range _ image ( hostname : str, lidar _ port : int = 7502 ) - > none : import matplotlib. pyplot as plt # type : ignore # get single scan [ doc - stag - single - scan ] metadata, sample = client. scans. sample ( hostname, 1, lidar _ port ) scan = next ( sample ) [ 0 ] # [ doc - etag - single - scan ] # initi...
[ -0.1312226802110672, 0.6941244006156921, 0.5114169120788574, -0.3790369927883148, -0.8973585963249207, 0.24576988816261292, 0.4765518307685852, 0.09495119005441666, -0.27913185954093933, 0.1823987066745758, 0.191364586353302, 1.4304238557815552, 0.08340639621019363, -0.02130630984902382, ...
def data ( self ) - > table : return self. _ data
[ 0.29193195700645447, 0.07895012199878693, 0.11316516250371933, 0.006392862182110548, -0.758705735206604, 1.0044986009597778, -0.06134539097547531, -0.8195642828941345, -0.2845078408718109, -1.7957496643066406, -0.04905654862523079, 1.355202317237854, 0.47296422719955444, -0.494448155164718...
def submission _ count ( self, submission _ count ) : self. _ submission _ count = submission _ count
[ 0.4419832229614258, 0.324710875749588, 0.27581748366355896, 0.4199069142341614, 0.035927996039390564, 0.6177177429199219, 0.1865428388118744, 0.5894806385040283, -1.3291816711425781, -0.7328923940658569, -0.6171698570251465, -0.727534294128418, 0.5327568650245667, 1.2511112689971924, -0....
def get _ product _ urls ( page _ lim = 10 ) : urls = [ ] for i in range ( page _ lim ) : url ='http : / / www. cosme. net / item / item _ id / 1064 / products / page / { 0 } '. format ( i ) r = requests. get ( url ) html = r. text soup = beautifulsoup ( html ) item _ spans = soup. find _ all ('span ', {'class':'item'}...
[ -0.3198581039905548, 0.09955655038356781, 0.760765552520752, 0.06257698684930801, 1.3873841762542725, 0.32533496618270874, 0.15192191302776337, 0.2125038057565689, 0.43956607580184937, 0.49321725964546204, -0.6018975377082825, 0.5159099698066711, 0.351212739944458, 0.16612565517425537, 0...
def getgradient ( c1, c2 ) : o _ red = c1. red ( ) o _ green = c1. green ( ) o _ blue = c1. blue ( ) n _ red = c2. red ( ) n _ green = c2. green ( ) n _ blue = c2. blue ( ) rd = ( n _ red - o _ red ) * fade _ delta gd = ( n _ green - o _ green ) * fade _ delta bd = ( n _ blue - o _ blue ) * fade _ delta r, g, b, = o _ ...
[ -0.3074047863483429, -0.005287624429911375, 1.4097867012023926, -0.8363882899284363, 0.559870183467865, 0.1492798626422882, -0.3997425436973572, -0.909516453742981, -0.6550663113594055, 0.36406537890434265, -0.841663122177124, 0.7763209342956543, -0.321802020072937, 0.791492223739624, -0...
def test _ replace _ step ( self ) : pass
[ 0.06883308291435242, 0.41105416417121887, -0.019393403083086014, 0.7285593152046204, 0.4433130919933319, 0.007272107992321253, 1.2141982316970825, 0.7194612622261047, -0.5121850967407227, -1.5195919275283813, -1.3276368379592896, -0.15084601938724518, -1.0573475360870361, 0.995556235313415...
def handle _ write ( self ) : try : sent = self. sock. send ( self. reply ) except socket. error as err : if err. args [ 0 ] not in nonblocking : self. handle _ error ( " socket error writing to { 0 } ". format ( self. sock ) ) return self. error else : self. reply = self. reply [ sent : ] if not self. reply : return s...
[ -0.7294963598251343, 0.7032228708267212, 0.7635461091995239, -0.33178040385246277, 0.832796573638916, -0.9289416670799255, 0.2686628997325897, -0.7285908460617065, 0.17438828945159912, 0.8819690942764282, 0.1480090171098709, -0.12608638405799866, -1.6988661289215088, -0.34530898928642273, ...
def _ calclandlordlayerscount ( self, domain _ log = none, alpha _ ll _ size _ log = none ) - > int : if domain _ log is none : domain _ log = self. domain _ log if alpha _ ll _ size _ log is none : alpha _ ll _ size _ log = self. alpha _ ll _ size _ log layerscount = 0 ll _ leaves = self. _ getlandlordlayersize ( laye...
[ 0.6955915689468384, 0.056536126881837845, 0.7548614740371704, -0.11293154209852219, -0.8398987054824829, 0.34804755449295044, 0.6479462385177612, 0.10184226930141449, 0.6619588732719421, -0.7465460300445557, -0.33530890941619873, 0.5274698138237, 0.41153350472450256, 1.1562405824661255, ...
def stats ( start = none, end = none ) : session = session ( engine ) sel = [ func. min ( measurement. tobs ), func. max ( measurement. tobs ), func. round ( func. avg ( measurement. tobs ), 2 ) ] if end is none : results = session. query ( * sel ). \ filter ( measurement. date > = start ). all ( ) else : results = ses...
[ -0.5964853763580322, 0.14963212609291077, 0.6087927222251892, 0.0711156502366066, -0.337166965007782, -0.3508336544036865, -0.5437899231910706, -1.0332731008529663, -0.389350950717926, 0.722519040107727, 0.2652702033519745, 0.23652862012386322, 0.9618743658065796, 0.5303758978843689, -1....
def remove _ all ( self :'linked _ list ', test : callable [ [ any ], bool ] ) - >'linked _ list': head, removed = self. head. remove _ all ( test ) return linked _ list ( head, self. size - removed )
[ 0.5039751529693604, 0.11432600766420364, 0.4940469264984131, 0.04801834747195244, -0.7048590779304504, -0.5557855367660522, 0.25260117650032043, 0.6821061968803406, 0.8517183065414429, -0.33330610394477844, -1.0596400499343872, 0.08612854033708572, -0.7425315380096436, 0.19796331226825714,...
def _ update _ probs ( self ) : probs = list ( np. array ( list ( self. data. values ( ) ) ) / np. array ( list ( self. data. values ( ) ) ). sum ( ) ) self. card _ probs = { card : prob for card, prob in zip ( card _ names, probs ) }
[ 0.028109880164265633, -0.8573159575462341, 0.5488685369491577, -0.7606092691421509, -0.2736513018608093, 0.15093344449996948, -1.2380244731903076, 0.7623695135116577, -0.471893310546875, 0.6273882985115051, -0.31467902660369873, -0.4614468216896057, 0.06406370550394058, -0.1215110868215560...
def test _ ing _ pair _ in _ list _ case _ 2 ( self ) : ing _ list = load _ ing _ list ( ) pairs = extract _ pairs ( ing _ list ) ing1 = ingredient ( " 土 " ) ing2 = ingredient ( " " ) self. asserttrue ( ingredientpair ( ing1, ing2 ) in pairs )
[ -0.770228922367096, -0.15029829740524292, 0.6798815131187439, 0.8785565495491028, -0.7063048481941223, 0.06647860258817673, -0.3267550766468048, 0.7513468861579895, -0.19406820833683014, 0.9527742266654968, -0.8450284004211426, -0.31367242336273193, -0.9475340247154236, 0.7613316774368286,...
def search _ string ( gr, column, strings _ list ) : if isinstance ( strings _ list, str ) : strings _ list = [ strings _ list ] if isinstance ( column, str ) : # # # # if column is not a list but a string, it means there is only one column to search return gr [ gr [ column ]. str. contains ('| '. join ( strings _ list...
[ -0.0648103728890419, 0.5048374533653259, 0.5140395760536194, 0.3986871838569641, -0.02598464861512184, -0.18645991384983063, 0.22987408936023712, 0.24879597127437592, -0.8919214010238647, -0.1946048140525818, 0.590633749961853, 0.27180078625679016, -1.0581448078155518, -0.02798790484666824...
def svd ( feature _ columns, embedding _ size = 100, l2 _ reg _ embedding = 1e - 5, l2 _ reg _ linear = 1e - 5, l2 _ reg _ dnn = 0, init _ std = 0. 0001, seed = 1024, bi _ dropout = 0, dnn _ dropout = 0 ) : features = build _ input _ features ( feature _ columns ) input _ layers = list ( features. values ( ) ) sparse _...
[ 0.7206563353538513, 0.13243170082569122, 0.5879297852516174, 0.7091519236564636, -0.18479543924331665, 0.34104177355766296, -0.34494492411613464, 1.132193922996521, -0.12934082746505737, -0.18892119824886322, -0.2876497507095337, 0.45162543654441833, 0.5246552228927612, -0.8913211822509766...
def unzip ( self, x ) : res = [ ] for info, r in zip ( self. info, self. r ) : source = x [ r [ 0 ] : r [ 1 ] ] if info. mask is not none : a = info. mask. astype ( x. dtype, copy = true ) if info. default is not none : a [... ] = info. default a [ info. mask ] = source res. append ( a ) else : if info. default is not ...
[ -1.0246474742889404, 0.08982129395008087, 0.7031463384628296, -0.16043129563331604, 0.26270434260368347, -1.0240548849105835, 0.38423219323158264, -0.11202320456504822, 0.001429686788469553, 0.9842300415039062, -1.4432491064071655, -0.5992716550827026, 0.03826432302594185, -0.5657060742378...
def tsreg ( ts, freq = none, interp = false ) : if freq is none : freq = pd. infer _ freq ( ts. index [ : 3 ] ) ts1 = ts. resample ( freq ). mean ( ) if interp : ts1 = ts1. interpolate ('time') return ts1
[ -1.0627992153167725, 1.4904413223266602, 0.6163926124572754, -0.723419725894928, 0.530232846736908, -0.9475997090339661, -0.11912477016448975, 1.3697967529296875, 0.15063153207302094, 0.17824311554431915, 0.0049363705329597, -0.3858983516693115, 0.16436892747879028, -1.180073857307434, -...
def _ _ init _ _ ( self, * * kwargs ) : if len ( kwargs ) = = 0 : self. _ index = [ ] self. _ value = [ ] elif'copy'in kwargs : copy = kwargs ['copy'] self. _ index = list ( copy. _ index ) self. _ value = list ( copy. _ value ) elif'index'in kwargs and'value'in kwargs : # references to the index and value sequences ar...
[ -0.989527702331543, -0.10750225186347961, 0.7789149284362793, 0.12099993228912354, -0.9990871548652649, -0.32289350032806396, -0.2932210862636566, -0.33037328720092773, 0.5795623064041138, 0.2845158576965332, -0.3717598617076874, 0.19749696552753448, -0.14830006659030914, 0.374427139759063...
def clone ( self, new _ name ) : pass
[ 0.0013844397617504, -1.3583850860595703, 0.33264219760894775, 1.0857163667678833, -0.6817942261695862, 1.0643123388290405, -0.6537070870399475, -0.6705055832862854, -0.05654056370258331, 0.7887173295021057, -0.935312807559967, 0.34897103905677795, 0.06439274549484253, -0.5082741379737854, ...
def run _ name _ server ( node _ id, work _ dir ) : check _ file ( name _ server _ jar ) check _ file ( node _ config ) if node _ id is none or node _ id = = - 1 : node _ id = get _ node _ id ( ) work _ dir = os. path. join ( work _ dir,'log _ ns _'+ node _ id ) os. system ('rm - rf'+ work _ dir +'; mkdir - p'+ work _ ...
[ -0.7676312327384949, -0.47538068890571594, 1.0971239805221558, -0.5970401763916016, -0.15165606141090393, 0.3410710394382477, 0.709560751914978, -0.47669708728790283, 0.20055051147937775, 0.4458959996700287, -0.6766932606697083, 1.1311804056167603, -0.286989688873291, 0.4834096133708954, ...
def _ _ getitem _ _ ( self, idx ) : slide _ id = self. data _ df. image _ id. values [ idx ] isup _ grade = self. data _ df. isup _ grade. values [ idx ] gleason = self. data _ df. gleason _ score. values [ idx ] # dirty way to prepare gleason score gleason _ to _ number = {'0': 0,'3': 1,'4': 2,'5': 3 } if gleason = ='...
[ -0.5455573797225952, 0.3204421103000641, 0.6997605562210083, 0.15036636590957642, -0.024398570880293846, -0.09724235534667969, 0.8650332093238831, -0.11664628982543945, 0.47789832949638367, 0.3445093035697937, -0.45544901490211487, -0.11847422271966934, 0.6469963788986206, -0.2489627450704...
def export _ data ( output _ filename, solution ) : full _ path, states = solution s = path _ string ( full _ path ) with open ( output _ filename,'w') as f : string = str ( full _ path [ 0 ] ) string + ='solution :'+ str ( len ( s ) ) + ','+ s +'\ n'string + ='states seen :'+ str ( states ) f. write ( string )
[ 0.4816633462905884, -0.6260358095169067, 0.4676477313041687, -0.4858037531375885, -0.46080830693244934, -0.35478705167770386, 0.9418641328811646, 0.2364349216222763, 0.22881068289279938, 0.19396206736564636, -0.6629158854484558, 0.06965191662311554, 1.0094075202941895, -0.1343401074409485,...
def preformat ( text ) : return wrap _ html ( text, " pre " )
[ -0.17521941661834717, 0.34332239627838135, 0.2917938232421875, 0.12808091938495636, -1.1094368696212769, -0.27207204699516296, 0.11987688392400742, 0.10958307981491089, 0.49321600794792175, -0.3715793192386627, 0.7986670732498169, 0.197360560297966, -0.2891223430633545, 0.5402544736862183,...
def put _ tag ( self, resource, params ) : self. _ check _ endpoint _ params ('put - tag ', params ) return self. _ request ('put ','tags / % s'% resource, params )
[ -1.014595627784729, 0.049703098833560944, 0.04512297734618187, -0.3173947334289551, 1.0211302042007446, 0.23700302839279175, -0.10009373724460602, -0.3903812766075134, -0.7366226315498352, 0.9599816799163818, -0.4708816409111023, 0.5606719851493835, -0.9405954480171204, 0.23945607244968414...
def get _ lower _ budget _ promotions ( self, budget ) : assert budget in self. budgets rung = np. where ( budget = = self. budgets ) [ 0 ] [ 0 ] prev _ rung = np. clip ( rung - 1, a _ min = 0, a _ max = self. n _ rungs - 1 ) lower _ budget = self. budgets [ prev _ rung ] num _ promote _ configs = self. n _ configs [ r...
[ -0.524088978767395, 0.012439562007784843, 0.6403823494911194, 0.4069350063800812, -0.043113816529512405, -0.3501967787742615, 0.27190765738487244, -0.6875902414321899, 1.2066551446914673, 0.14871467649936676, -0.27000731229782104, 1.2633063793182373, -1.2010204792022705, 1.042017936706543,...
def to _ representation ( self, instance ) : ret = ordereddict ( ) fields = [ field for field in self. fields. values ( ) if not field. write _ only ] for field in fields : try : attribute = field. get _ attribute ( instance ) except skipfield : continue if attribute is not none : represenation = field. to _ representa...
[ -1.2931901216506958, -0.01451305765658617, 0.5698593854904175, -1.5757856369018555, 0.10769134014844894, -0.6445379257202148, 0.847650408744812, 0.4201785624027252, 0.7638363838195801, 0.7840718030929565, -1.313035249710083, 0.024070022627711296, -0.16276636719703674, -0.12275004386901855,...
def start _ group ( self, scol, typ ) : return group ( parent = self, level = scol, typ = typ )
[ 0.1158147007226944, 0.10641057789325714, 0.38396838307380676, 0.15655021369457245, -0.5013558268547058, 0.4253190755844116, 0.21875932812690735, -0.8705050945281982, -0.027012687176465988, -0.4568649232387543, -0.17471015453338623, 1.111978530883789, -0.2432514876127243, -0.543161392211914...
def phonological _ word _ for ( phones : pronunciation ) - > phonologicalword : pass
[ -0.15500770509243011, -0.0138928834348917, 0.22974054515361786, 1.6162033081054688, -0.2636822462081909, 0.9245592951774597, -1.2058559656143188, -0.05468371883034706, 0.0999101921916008, -0.510405421257019, 0.6989286541938782, -0.589091956615448, 0.15632912516593933, 0.488851398229599, ...
async def test _ move _ to _ coordinates _ implementation ( decoy : decoy, state _ view : stateview, hardware _ api : hardwarecontrolapi, movement : movementhandler, ) - > none : subject = movetocoordinatesimplementation ( state _ view = state _ view, movement = movement, ) params = movetocoordinatesparams ( pipetteid ...
[ -0.4885748326778412, 0.44478774070739746, 0.4910898208618164, -0.6727936863899231, 0.34557488560676575, -0.0030641425400972366, 0.2972114086151123, -0.16679003834724426, -0.41226086020469666, -0.35861483216285706, -0.2930811047554016, -0.2761968672275543, 0.4461846947669983, -0.44841980934...
def get _ config ( self, budget ) : # we always have some chance to sample from random distribution # if not enough points seen for any budget then also sample from a random distribution if len ( self. kde _ models. keys ( ) ) = = 0 or np. random. rand ( ) < self. random _ fraction : logger. debug ('sample new random c...
[ 0.0009053922258317471, 0.028869548812508583, 0.7447184324264526, 0.2196987420320511, -0.1312735378742218, -0.254426509141922, -0.38202521204948425, -0.4936924874782562, -0.42060962319374084, 0.880273163318634, 0.51593017578125, 0.3719821870326996, -0.04189068824052811, 0.7097342610359192, ...
def randomize _ wells ( df _ plate, fingerprint _ drug = none, fingerprint _ dose = 1, exclude _ outer = 1, plate _ dims = [ 16, 24 ] ) : cols = [ " % 02d " % s for s in range ( 1, plate _ dims [ 1 ] + 1 ) ] rows = [ chr ( 65 + n ) for n in range ( plate _ dims [ 0 ] ) ] wells = [ ] for row in rows : for col in cols : ...
[ -0.574284017086029, 0.27013668417930603, 0.7287577390670776, -0.28475478291511536, 0.23507526516914368, -0.28075969219207764, 0.7868683338165283, 0.08312393724918365, -0.1344114989042282, -0.370175302028656, 0.2717457711696625, -0.04659236595034599, -0.07339354604482651, 1.0411871671676636...
def set _ topic _ acl ( self, tenant, topic, acl ) : project _ name = tenant. upper ( ) url = self. get _ url ( " topics ", topic, project _ name, " modifyacl " ) data = { " authorized _ users " : acl } return self. post _ resource ( url, data )
[ 0.08797932416200638, -0.5580040812492371, 0.22668224573135376, 0.47224313020706177, -0.03737550601363182, 0.40470752120018005, -0.4444737136363983, -0.2652687132358551, 0.15301360189914703, 0.8348519206047058, 0.7645193338394165, 0.7518364787101746, -0.3847806453704834, -0.9787753224372864...
def test _ maximum _ likelihood _ fit ( self ) : n _ samples = self. n _ samples point = self. beta. random _ point ( n _ samples ) samples = self. beta. sample ( point, n _ samples * 10 ) fits = self. beta. maximum _ likelihood _ fit ( samples ) expected = self. beta. belongs ( fits ) result = gs. array ( [ true ] * n...
[ 0.8555142879486084, -0.5851259827613831, 0.37510985136032104, 0.4556719958782196, 0.45381125807762146, 1.0502334833145142, -0.4427814483642578, -0.1623358577489853, 0.5999254584312439, -0.6470178365707397, -0.10448578745126724, -0.2812727093696594, -1.1370130777359009, 0.3622400760650635, ...
def tcid ( self, value : str ) : self. set ( " tcid ", value )
[ 1.0321719646453857, -0.26912030577659607, 0.1544736921787262, -1.291337013244629, 0.24357494711875916, 1.4915882349014282, 0.3829473555088043, -0.27855461835861206, -0.008715287782251835, 1.37975013256073, -0.4143296480178833, -0.4542813003063202, 0.06497321277856827, -0.4594922959804535, ...
def delete _ list ( id ) : # first make sure the user is logged in if check _ if _ user _ logged _ in ( ) : user _ email = session ['user _ email'] try : # remove list item from dictionary shopping _ list _ app. delete _ shopping _ list ( id, user _ email ) # display success message and redirect if all went well flash ...
[ -0.620112419128418, 0.2682068645954132, 0.17749053239822388, 0.7087579965591431, 0.023485850542783737, 0.41986721754074097, -0.005683559458702803, 1.0123803615570068, 1.7436796426773071, 0.08601905405521393, -0.5636863708496094, -0.6639586687088013, -0.03243038058280945, 0.8646150231361389...
def getduotriofromalignmentls ( self, db _ vervet, alignmentls ) : sys. stderr. write ( " getting duos and trios from % s alignments... " % ( len ( alignmentls ) ) ) pedigreegraphdata = db _ vervet. constructpedgreegraphoutofalignments ( alignmentls ) dg = pedigreegraphdata. dg individual _ id2alignmentls = pedigreegra...
[ -0.5758600831031799, -0.08073253184556961, 0.750092089176178, -0.3927047550678253, -0.7825737595558167, 0.20568357408046722, 0.4598815441131592, 0.2710821330547333, -0.13908930122852325, 0.3201851546764374, -0.29592135548591614, -0.3955020606517792, 0.27359697222709656, 0.5161024928092957,...
def _ add _ rule ( self, rule, rule _ type ) : if rule is not none and rule not in self. _ rules _ set : self. _ rules _ set [ rule ] = none
[ 0.3255731165409088, 0.5660396814346313, 0.29372286796569824, -0.7652853727340698, 1.7715857028961182, 0.22846229374408722, -0.8425160646438599, -0.1634882241487503, -0.03493576496839523, 0.0014583979500457644, 1.0570852756500244, 1.3887301683425903, -0.9639779925346375, 0.6526539921760559,...
def del _ exception ( plate, position ) : new _ plate = np. zeros ( ( plate. shape [ 0 ] - 1, plate. shape [ 1 ], plate. shape [ 2 ] ) ) new _ plate [ : position, :, : ] = plate [ : position, :, : ] print position new _ plate [ position :, :, : ] = plate [ position + 1 :, :, : ] return new _ plate
[ 0.6762886047363281, -0.7876793146133423, 0.7337300777435303, -0.6889513731002808, -0.5863693952560425, -0.1633490025997162, -0.5447935461997986, 0.6291633248329163, 0.5634145736694336, 0.9887188673019409, -0.15011073648929596, 0.8524717092514038, -1.0580389499664307, -1.206994891166687, ...
def initialize ( self, state : fieldbase, info : optional [ infodict ] = none ) - > float : if self. show _ time : t _ initial = 0 if info is none else info. get ( " t _ start ", 0 ) else : t _ initial = none self. _ viewer = napariviewer ( state, t _ initial = t _ initial ) return super ( ). initialize ( state, info =...
[ 0.019176878035068512, 0.7121703028678894, 0.3933532238006592, 0.058489102870225906, -0.09274707734584808, -0.2665303945541382, 0.02107192575931549, -0.13626058399677277, -0.1407460719347, -0.6952864527702332, -0.46886146068573, -0.7655439972877502, 1.2102177143096924, 1.772395372390747, ...
def visit _ assign ( self, new _ body, node ) : assign _ id = self. create _ ast _ component ( node, component. assign ) self. create _ composition ( assign _ id, * self. composition _ edge ) new _ targets = [ ] assign _ calls = [ ] for index, target in enumerate ( node. targets ) : self. composition _ edge = ( assign ...
[ -1.3870582580566406, -0.7475990056991577, 0.7343313694000244, 0.09847468882799149, 0.044189319014549255, -0.44429969787597656, 0.4384355843067169, 0.07057150453329086, 0.19817548990249634, 0.9144970178604126, -0.17548416554927826, 0.009530650451779366, 0.3295827805995941, 1.271805524826049...
def recv _ data _ in _ chunks ( self, sock ) : buff _ size = 4096 # 4 kib part = " " data = b'' while true : part = sock. recv ( buff _ size ) data + = part if len ( part ) < buff _ size : # either 0 or end of data break return pickle. loads ( data )
[ 1.1052134037017822, 0.5461877584457397, 0.7323095798492432, -1.15862238407135, -0.35775551199913025, -0.369922012090683, -1.1921390295028687, -0.8006836175918579, -0.25020235776901245, -0.3170272409915924, -0.2974209785461426, 0.11124688386917114, -1.0758960247039795, -0.46206751465797424,...
def test _ taus ( ) : assert geo _ lin. taus. shape = = ( len _ ts, ) dtaus = [ np. linalg. norm ( j _ fn ( xs ) @ vs ) for xs, vs in zip ( geo _ lin. xs, geo _ lin. vs ) ] taus = np. append ( 0. 0, cumulative _ trapezoid ( dtaus, geo _ lin. ts ) ) assert np. allclose ( geo _ lin. taus, taus )
[ 1.2421503067016602, 0.07033582776784897, 0.39434748888015747, -0.3199220597743988, 0.5519636273384094, 0.6575021743774414, 0.48244693875312805, -0.48433300852775574, 0.10461807250976562, -0.324535608291626, 0.20117974281311035, 0.08765081316232681, 1.265094518661499, 0.19428566098213196, ...
def owned ( schema ) : schema. data ['owned'] = true return schema
[ -0.4582585394382477, -0.28634408116340637, 0.1630198210477829, 0.6665816307067871, 0.6832324862480164, -0.23527826368808746, 0.21213656663894653, 0.775818407535553, 0.37722882628440857, -0.9275301694869995, -0.3987320363521576, 0.5151938199996948, 0.6102961301803589, -0.825957179069519, ...
def pixelcollision ( rect1, rect2, hitmask1, hitmask2 ) : rect = rect1. clip ( rect2 ) if rect. width = = 0 or rect. height = = 0 : return false x1, y1 = rect. x - rect1. x, rect. y - rect1. y x2, y2 = rect. x - rect2. x, rect. y - rect2. y for x in xrange ( rect. width ) : for y in xrange ( rect. height ) : if hitmask...
[ -0.01040579378604889, -0.4172128438949585, 1.263381838798523, 0.09763748198747635, -0.2133396714925766, 0.6461881995201111, -0.23858997225761414, -0.9382073879241943, -0.8177094459533691, -0.10420627892017365, -0.007054734043776989, -0.11838018149137497, 0.03408602625131607, -0.67136633396...
def dataframe ( self ) : if self. _ dataframe is none : extend _ exception ( runtimeerror, " vcf data frame should be available. " ) return self. _ dataframe
[ 0.607973575592041, 0.0947333350777626, 0.2078607678413391, 0.153938889503479, 0.32312217354774475, -0.1758037656545639, 0.7209160327911377, 0.5007418990135193, 0.5331916809082031, -1.1713396310806274, 0.5679375529289246, 1.259558916091919, -0.8015657067298889, -0.7237696647644043, 0.0778...
def teardown ( self ) : # self. _ prepare ( )
[ 0.08432812243700027, -0.8436250686645508, 0.14312240481376648, -0.3648300766944885, 0.22330833971500397, 0.3411533534526825, 1.496932029724121, 0.2586258053779602, 0.6649082899093628, -0.8805286288261414, -0.15648730099201202, -0.19302044808864594, -0.498239666223526, 0.08972037583589554, ...
def emitfastforwardnodes ( repo, pushtonode ) : cl = repo. changelog relevantnodes = set ( pushtonode. values ( ) ) # we pre - populate the mapping of node to children by iterating the repo # and looking at parents because this lookup is indexed and much faster. # node - > set < node > clchildren = collections. default...
[ -0.05712275207042694, 1.2369699478149414, 0.7596231698989868, -0.7343392968177795, -0.38965073227882385, -0.6902934908866882, -0.2973177134990692, 0.18211770057678223, -0.47524747252464294, 0.4751500189304352, -0.12407523393630981, 0.7585682272911072, 0.8648454546928406, 0.2141904979944229...
def decompressorreader ( self, fh ) : raise notimplementederror ( )
[ -0.3518555462360382, -1.1170824766159058, 0.4825565814971924, 0.0053253173828125, -0.7218208312988281, 0.16806823015213013, 0.21756529808044434, 0.4397096335887909, -1.1516941785812378, -0.27593129873275757, -0.2587222158908844, -0.4420042037963867, -0.0005529820919036865, 0.48999246954917...
def make _ platykurtic ( refl, zdr, kdp, rhohv, relh, nbins = 110, pdf _ zh _ max = 20000, pdf _ relh _ max = 10000, sigma _ zh = 0. 75, sigma _ relh = 1. 5, platykurtic _ dbz = true, platykurtic _ h _ iso0 = true ) : x _ vals = np. linspace ( - 1. 1, 1. 1, num = nbins ) if platykurtic _ dbz : print ('making dbz distri...
[ 0.7291743755340576, -0.20938478410243988, 0.7182918190956116, -0.21661341190338135, -0.4091030955314636, 1.1008421182632446, 0.6646897792816162, 0.5803290009498596, -0.1499849110841751, 0.3613453209400177, 0.19541162252426147, 0.24014142155647278, 0.11339286714792252, 0.1501786708831787, ...
def catfiles ( self, f1, f2 ) : self. appendmsg ( f1, " here is the output from the autograder : \ n - - - " ) ( wfd, tmpname ) = tempfile. mkstemp ( dir = os. path. dirname ( f2 ) ) wf = os. fdopen ( wfd, " ab " ) with open ( f1, " rb " ) as f1fd : shutil. copyfileobj ( f1fd, wf ) # f2 may not exist if autograder fail...
[ 0.4493783116340637, -0.9222872257232666, 0.7239002585411072, 0.013121824711561203, -0.4942377209663391, 0.9925737380981445, 0.8510113954544067, 0.15126831829547882, -1.3464051485061646, 0.1712503284215927, 0.3885958194732666, 0.6469675898551941, 0.45352989435195923, 0.3670506775379181, -...
def test _ minus ( self ) : self. assertequal ( text. assembleformattedtext ( a. bold [ a. blink ['hello ', - a. bold ['world'], '.'] ] ),'\ x1b [ 1 ; 5mhello \ x1b [ 0 ; 5m world \ x1b [ 1 ; 5m.')
[ 0.24891451001167297, -1.202958345413208, 0.8542847633361816, 0.565925657749176, -0.11861781030893326, 0.9149512052536011, -0.2059699147939682, -0.12139028310775757, 0.31837859749794006, -0.06398063153028488, -0.39221397042274475, 0.13424858450889587, -1.0713517665863037, 0.2968783974647522...
def _ bundle ( self ) : return super ( detectorcontainer, self ). _ bundle ( ext ='detector')
[ 1.1953686475753784, 0.15532200038433075, 0.2598363161087036, 0.5911382436752319, -0.19381459057331085, 0.06654251366853714, 0.3720926344394684, 0.26185154914855957, 0.6448642015457153, -1.1253935098648071, 0.2527086138725281, -0.3667902648448944, 0.7528678178787231, 1.0284565687179565, -...
def allowed ( self, value ) : pass
[ 0.4601050615310669, 0.17871621251106262, 0.29253721237182617, 0.5101856589317322, -1.2270134687423706, 1.3503440618515015, 0.5664552450180054, -0.787438690662384, 0.31274914741516113, -0.31816112995147705, -0.028917504474520683, 0.26833802461624146, -0.31827351450920105, 0.5973473787307739...
def _ eqn _ jvp _ fn ( eqn : optional [ jaxpreqn ], idx : int, tangents : np. ndarray, * invals ) - > np. ndarray : if eqn is none : # identity function return tangents new _ tangents = [ ] new _ invals = [ ] for i _ dx, i in enumerate ( invals ) : if i _ dx = = idx : inval = np. zeros ( i. aval. shape, i. aval. dtype ...
[ -0.7079148292541504, -0.18458391726016998, 0.6958394646644592, -0.24064083397388458, -0.047685977071523666, -0.7332515716552734, 0.09140101075172424, -0.7805877923965454, 0.7135007977485657, 0.8045986890792847, 0.37713539600372314, -0.16817572712898254, 0.10883449763059616, -0.686330497264...
def test _ srv _ inner _ product _ vectorization ( self ) : dim = 3 curves = gs. stack ( ( self. curve _ a, self. curve _ b ) ) tangent _ vecs _ 1 = gs. random. rand ( 2, self. n _ sampling _ points, dim ) tangent _ vecs _ 2 = gs. random. rand ( 2, self. n _ sampling _ points, dim ) result = self. srv _ metric _ r3. in...
[ -0.18918412923812866, 0.7225491404533386, 0.8053079843521118, 0.050355300307273865, 0.3019586205482483, 0.40273404121398926, 0.5159769654273987, -1.2350696325302124, 0.06311110407114029, 0.0648823007941246, -0.24126583337783813, -0.21662552654743195, -0.9074334502220154, -1.134579896926879...