text
stringlengths
25
2.19k
embedding
listlengths
768
768
def _ _ init _ _ ( self, center, resolution, max _ depth, prior _ prob = 0. 5 ) : self. _ center = center self. _ resolution = resolution self. _ max _ depth = max _ depth self. root = occupancyoctonode ( prior _ prob )
[ 1.1525052785873413, 0.2354934960603714, 0.3840761184692383, 0.5650158524513245, 0.16112573444843292, -0.17245852947235107, -0.06399999558925629, 0.8880886435508728, 0.29439476132392883, -0.3294889032840729, 0.4577906131744385, -0.3031509220600128, -0.05004395917057991, 0.16008888185024261,...
def rating _ delete _ handler ( sender, instance, * * kwargs ) : media = instance. media # re - sum rating count if media. rating _ count : media. rating _ count = f ('rating _ count') - 1 media. save ( )
[ -0.08547218143939972, 0.4190371036529541, 0.5617392659187317, 0.34342217445373535, 1.0625040531158447, 0.22877489030361176, 0.8944208025932312, 1.1448990106582642, -0.5279718637466431, 1.1943193674087524, -0.2861694097518921, -0.6321911811828613, -0.6458966732025146, 0.1313970983028412, ...
def consumeroperations ( self, producer _ op ) : result = set ( ) for inp in producer _ op. outputs : result. update ( self. mapping [ inp ] ) return result
[ -0.31569647789001465, -0.5802373290061951, 0.7455833554267883, 0.9167316555976868, -0.06600747257471085, -0.7877148985862732, 0.3481117784976959, -0.6813866496086121, -0.15525929629802704, 0.4711719751358032, 0.3633256256580353, -0.4374809265136719, -0.13888558745384216, -0.982601523399353...
def compute _ torsion _ angle ( position1 : np. ndarray, position2 : np. ndarray, position3 : np. ndarray, position4 : np. ndarray ) - > float : position1 _ 2 = position2 - position1 position2 _ 3 = position3 - position2 position3 _ 4 = position4 - position3 rn1 = np. cross ( position1 _ 2, position2 _ 3 ) rn2 = np. cr...
[ 0.02111126109957695, -0.26216837763786316, 0.6535018086433411, 0.021495571359992027, 0.6001284122467041, -0.11290611326694489, -0.09526398032903671, 0.035000696778297424, -0.702902615070343, 1.3820425271987915, -0.003072823630645871, -0.5175279974937439, -0.735426127910614, -1.081315755844...
def neighbor ( self, move ) : # you fill this in return maze ( self. grid, move )
[ 0.33162829279899597, -0.7655511498451233, 0.4489955008029938, 0.8562204241752625, -0.8002544641494751, 0.06290888041257858, 0.7845014929771423, -0.7296167016029358, -0.044920001178979874, -0.10419344902038574, -0.40514448285102844, -0.1306978464126587, -0.9623258113861084, 0.28189322352409...
def evaluate _ model ( model, x _ train, y _ train, x _ val, y _ val, metric _ title ) : print ('evaluation :') print ('= = = = = = = = = = =') print ('{ } '. format ( metric _ title ) ) print ('train : { } '. format ( model. evaluate ( x _ train, y _ train, batch _ size = predict _ batch _ size, verbose = 0 ) ) ) prin...
[ 0.4406314194202423, -0.08082034438848495, 0.5601938366889954, 0.3547781705856323, -0.4574674367904663, 0.8846359848976135, -0.8897684216499329, -0.1793542504310608, -2.115211009979248, 0.05892391875386238, 0.48884835839271545, 0.5115540623664856, 0.8486990928649902, -0.12446378171443939, ...
def computeactionfromqvalues ( self, state ) : " * * * your code here * * * " def largest ( array, n ) : # find the largest one larg = array [ 0 ] # initial value i = 1 # compare every element with while i < n : if array [ i ] > larg : larg = array [ i ] # current max i = i + 1 return larg opt _ policy = none if state!...
[ 0.12302082031965256, -0.2750411927700043, 0.6593638062477112, 0.010917364619672298, 0.10727590322494507, 0.305366188287735, -0.18864113092422485, -0.22382886707782745, 0.6089130640029907, 0.20874594151973724, 0.12109041213989258, 0.5495893359184265, 0.5710508227348328, 0.6486940979957581, ...
def load _ data _ from _ pickle ( path _ to _ x _ train, path _ to _ x _ test, path _ to _ y _ train, path _ to _ y _ test, path _ to _ x _ val = none, path _ to _ y _ val = none ) : x _ val = none y _ val = none with open ( path _ to _ x _ train,'rb') as data _ input : x _ train = pickle. load ( data _ input ) with op...
[ 0.32380759716033936, 0.1879972368478775, 1.070521354675293, -0.45012161135673523, 0.3901098370552063, -0.04506584629416466, -0.02735348604619503, -0.711812436580658, -0.8466495871543884, -0.30003809928894043, 0.23633764684200287, 0.036928124725818634, 0.22587522864341736, -0.81222236156463...
def _ _ init _ _ ( self, netlinktype, * args, * * kwargs ) : if netlinktype! = self. netlink _ route : raise ( valueerror ( " netlink type { } not " " supported. ". format ( netlinktype ) ) ) self. netlinktype = netlinktype udp. multicastport. _ _ init _ _ ( self, * args, * * kwargs )
[ 0.008627922274172306, 0.23811669647693634, 0.5485066771507263, 0.38976195454597473, 0.26800501346588135, -0.39629805088043213, 0.17762693762779236, 0.012786401435732841, 1.6477893590927124, -0.488149493932724, -0.6864643096923828, -0.011626946739852428, -0.08914924412965775, 1.301560401916...
def _ dict _ test ( self, id _ key, entry _ key ) : entry = self. json _ tests [ id _ key ] [ entry _ key ] if not len ( entry ['conditions'] ) : entry ['conditions'] = [ none ] if not len ( entry ['designs'] ) : entry ['designs'] = [ none ] if not len ( entry ['models'] ) : entry ['models'] = self. project. config. mo...
[ -0.29877617955207825, -0.12535429000854492, 0.7045560479164124, -1.1879792213439941, -0.6027702689170837, -0.4065417945384979, -0.27312812209129333, -0.1411115825176239, 0.15727414190769196, 0.16704945266246796, 0.4572419226169586, -0.025952814146876335, -0.026412583887577057, -0.282351315...
def cutoff ( scores, threshold ) : return np. where ( scores > threshold, 1, 0 )
[ -0.31320151686668396, -0.615060031414032, 0.17970874905586243, 0.6138233542442322, -0.3713891804218292, 0.5100739598274231, 0.44471845030784607, -0.012350862845778465, 0.1204354539513588, 0.5855600237846375, 0.5123400092124939, 0.24064107239246368, 0.10886847972869873, -0.9918785095214844,...
def prior ( data, par, bandwidth, sampling = 500 ) : # instantiate and fit the kde model kde = kerneldensity ( bandwidth = bandwidth, kernel = " gaussian " ) kde. fit ( data [ par ] [ :, none ] ) # x range x _ d = np. linspace ( np. min ( data [ par ] ), np. max ( data [ par ] ), sampling ) # score _ samples returns th...
[ 0.6740542650222778, 0.08371073752641678, 1.015529990196228, -0.6731954216957092, -0.8420055508613586, 0.09845492988824844, 0.3653234541416168, 0.27225038409233093, 0.14017800986766815, -0.028268899768590927, 0.5855810642242432, 0.770066499710083, 0.013996221125125885, 0.255887895822525, ...
def bundletype ( self ) : return b'gzip ', b'gz '
[ 0.5203878879547119, -0.07849833369255066, 0.5946726202964783, 0.6441885232925415, 0.5793458819389343, 0.9852813482284546, 0.3156542181968689, -0.17580583691596985, 0.20035076141357422, 0.7286364436149597, -0.5228041410446167, 0.24251215159893036, -0.9764406085014343, 0.5786550641059875, ...
def writeday ( self, solver _ scores, withheld _ solvers ) : avg = 0 outfile = open ( " daily _ dump. txt ", " w " ) outfile. write ( " day " + str ( self. _ current _ day ) ) if len ( solver _ scores ) > 0 : for item in solver _ scores : avg + = item [ 1 ] avg = avg / len ( solver _ scores ) outfile. write ( " avgfit ...
[ -0.6254737973213196, -0.6272034645080566, 0.8463009595870972, -0.13381744921207428, 0.7330647706985474, 0.8008617162704468, 0.3731056749820709, -0.7799859046936035, -0.7136537432670593, -0.573685348033905, 0.11278840899467468, -0.13618238270282745, -0.3498583436012268, 0.3719007968902588, ...
def contains ( self, point ) : if not len ( point ) = = 3 : raise valueerror ( " point should be tuple containing x, y, z " ) radius = self. radius return \ self. _ center [ 0 ] - radius < = point [ 0 ] < self. _ center [ 0 ] + radius and \ self. _ center [ 1 ] - radius < = point [ 1 ] < self. _ center [ 1 ] + radius a...
[ 0.2560962438583374, -0.334820419549942, 0.6326836347579956, 0.35619187355041504, -0.4907325208187103, 1.0836315155029297, -0.3651234209537506, -0.26103508472442627, 0.7997211813926697, 0.19946493208408356, -0.1978873461484909, -0.28003358840942383, -1.3551256656646729, -0.4688495993614197,...
def test _ fetch _ tag _ raster ( self ) : raster _ file = " tests / data / massachusetts _ buildings _ kaggle / 22978945 _ 15 _ uint8 _ clipped. tif " tag _ raster ='tests / data / massachusetts _ buildings _ kaggle / tag _ raster. tif'classes _ dict = {'waer': 1,'fore': 2,'roai': 3,'buil': 4 } with rasterio. open ( r...
[ 0.12071011960506439, -0.09871051460504532, 0.4122529923915863, -0.06444092839956284, 0.5380566716194153, 1.038910150527954, 0.3145276606082916, -0.4062040150165558, -0.61231929063797, 0.2164747416973114, -0.19991670548915863, -0.38321417570114136, 0.9607724547386169, 0.3048454821109772, ...
def live _ plot _ signal ( hostname : str, lidar _ port : int = 7502 ) - > none : import cv2 # type : ignore print ( " press esc from visualization to exit " ) # [ doc - stag - live - plot - signal ] # establish sensor connection with closing ( client. scans. stream ( hostname, lidar _ port, complete = false ) ) as str...
[ 0.7390426993370056, -0.09154731035232544, 0.7681499123573303, 0.6569663882255554, -0.7666736841201782, 0.42962536215782166, 0.3382306694984436, -0.31296616792678833, -0.3515528738498688, 0.8864827752113342, -0.5012099146842957, 0.2303772270679474, 0.07065631449222565, 0.21520619094371796, ...
def delete ( self ) : self. _ client. delete ( " { } { } / ". format ( self. _ path, self. id ) )
[ 0.5388306379318237, -0.336310476064682, 0.30866536498069763, 0.07888241112232208, 0.9259436726570129, 0.3115730881690979, 0.3136235475540161, 0.2983267307281494, 0.1448580026626587, -0.8839486241340637, -0.1129937395453453, 0.789821207523346, -1.0849802494049072, -0.6432756185531616, -0....
def main ( arglist ) : try : import msvcrt getchar = msvcrt. getch except importerror : getchar = sys. stdin. read ( 1 ) if len ( arglist )! = 1 : print ( " running this file directly launches a playable game of sokoban based on the given map file. " ) print ( " usage : sokoban _ map. py [ map _ file _ name ] " ) retur...
[ -0.6028329730033875, -0.2769767940044403, 0.9894225001335144, 1.0269519090652466, 0.006811902858316898, 0.4026203453540802, 0.9342772960662842, 0.44027358293533325, -0.05565263703465462, 0.14963488280773163, -0.3632117211818695, -0.4452704191207886, -0.6244598031044006, -0.1943589299917221...
def check _ gateway ( self ) : if not self. gateway : raise runtimeerror ( " there's no gateway i can use " )
[ 0.45152175426483154, 0.06492342799901962, 0.38425734639167786, 0.414831280708313, -0.37704479694366455, -0.7328082919120789, -0.39127981662750244, 0.6649267673492432, -0.5035263895988464, -0.09889288246631622, 0.6304110884666443, 0.9282825589179993, -0.7316190004348755, 2.0766148567199707,...
def visualize _ image ( image _ id : int, interactive : bool = false ) : image = np. array ( image. open ( image _ root + f'maksssksksss { image _ id }. png'), dtype = np. uint8 ) annotation = preprocess. parsexml ( annotation _ root + f'maksssksksss { image _ id }. xml') fig, ax = plt. subplots ( 1 ) ax. imshow ( imag...
[ 0.5249341726303101, -0.014029009267687798, 0.5330356359481812, -0.41619619727134705, -1.029758334159851, 0.37865176796913147, 0.3559085428714752, 0.3765721917152405, 0.8199529051780701, 0.05117698013782501, 0.42457669973373413, 0.6245918273925781, 0.6175498366355896, 0.5224693417549133, ...
def list2cmdline ( seq ) : # see # http : / / msdn. microsoft. com / library / en - us / vccelng / htm / progs _ 12. asp result = [ ] needquote = false for arg in seq : bs _ buf = [ ] # add a space to separate this argument from the others if result : result. append ('' ) needquote = ( " " in arg ) or ( " \ t " in arg ...
[ -0.12270453572273254, -0.7629643082618713, 0.8340151906013489, -0.029044602066278458, -0.09632357209920883, -0.4804587662220001, -0.4781431555747986, -0.23986686766147614, 0.06380544602870941, 0.8520588278770447, -0.3842586874961853, -0.1174979880452156, 0.3010908365249634, 0.8587616086006...
def sensor _ change _ totals ( station, year, sensor _ l ) : d _ left = make _ left _ df ( station, year ) sensor _ d = build _ dictionary ( station, year, sensor _ l ) df = make _ df ( d _ left, sensor _ d, sensor _ l ) df = add _ end ( station, year, df ) df. columns = df. columns. str. replace ('withno ','original')...
[ -0.1448998898267746, 0.20130406320095062, 0.692728579044342, -1.072002649307251, -0.9612833857536316, -0.7441564798355103, -0.5923694372177124, 0.3503965437412262, 0.23341892659664154, 0.018432697281241417, -0.17834806442260742, 0.18548336625099182, 1.1164426803588867, -0.07148673385381699...
def description ( self, value ) : self. _ update _ values ('description ', value )
[ -0.1549185812473297, 0.7872298955917358, 0.2974013686180115, 0.10750559717416763, 0.28752684593200684, 0.8567620515823364, -0.07465223222970963, -0.10307221114635468, 0.0888831615447998, 0.8901006579399109, -0.6066151261329651, -0.12051656097173691, 0.04460897296667099, 0.7385449409484863,...
def night ( self ) : for life in self. species [ grass ]. keys ( ) : life. remainingdays - = 1 if life. remainingdays < = 0 : self. kill ( life ) for lifeclass in [ zebra, lion ] : livinglongest = self. livinglongest [ lifeclass ] for life in self. species [ lifeclass ]. keys ( ) : life. eat ( ) # try to eat if random....
[ -0.579042375087738, -0.6613457798957825, 0.711236298084259, 1.361728310585022, 0.19421890377998352, 0.6663352251052856, -0.8179493546485901, -0.4163246750831604, -0.20042508840560913, 0.1544441133737564, 0.3255595862865448, -0.7189515233039856, -0.7362469434738159, 1.3650301694869995, -0...
def read ( self ) : return self. active _ location
[ -0.40659093856811523, -2.0984528064727783, 0.6354653239250183, -0.258563369512558, -0.40871119499206543, 0.08921125531196594, 1.2239354848861694, -0.14016850292682648, -0.17113201320171356, -1.0330301523208618, 1.3616000413894653, 0.6626715660095215, -0.3566306531429291, -2.391635656356811...
def remove _ paint ( self ) : self. painted _ colors = [ ]
[ 0.1354517638683319, -0.11467672884464264, 0.20866304636001587, -1.2565369606018066, 0.3452402353286743, 0.9926126003265381, 0.6740965247154236, 0.6668350100517273, -0.17911489307880402, -0.6775333285331726, -1.0806559324264526, 0.9129732847213745, -1.1977310180664062, 0.6478868722915649, ...
def path _ to ( self, dest ) : # dest may be in the returned list of layer ( ) which could be a treedebugger. if isinstance ( dest, treedebugger ) : dest = dest. current worklist = [ self. current ] seen = set ( { self. current } ) parent = { self. current : none } while len ( worklist ) > 0 : node = worklist. pop ( ) ...
[ -0.3207394480705261, 0.3091740310192108, 0.7617490887641907, -0.405168741941452, -0.48516660928726196, -0.40045398473739624, 1.1491011381149292, -1.1299000978469849, -0.12703850865364075, 0.15876977145671844, -0.362064391374588, -0.19493676722049713, -0.26997673511505127, 0.632157623767852...
def person _ relationship _ dates ( node ) : person = node. people. single ( ) rel = node. people. relationship ( person ) if rel. start _ date is not none : return {'start _ date': rel. start _ date,'end _ date': rel. end _ date } elif rel. start _ date is none : # look at all roles associated with the project, # and ...
[ -0.07288262993097305, -0.5582853555679321, 0.7868539690971375, -0.44497910141944885, -0.02095867320895195, 0.1324293464422226, -0.7146565914154053, 0.36442074179649353, -0.37757617235183716, -0.4430614113807678, 0.2149403989315033, -0.3230474591255188, 0.022331781685352325, 0.5161514878273...
def decompose _ plant _ data _ frame _ into _ areas _ and _ resources ( df, areas, resources, grid ) : # areas _ resources = defaultdict ( dict ) df _ areas _ resources = { } resources = _ check _ resources _ are _ in _ grid _ and _ format ( resources, grid ) for a, df _ a in decompose _ plant _ data _ frame _ into _ a...
[ -0.44386032223701477, -0.4899890720844269, 0.3001449406147003, -0.12372872233390808, -0.422248899936676, -0.7050439119338989, 0.7723112106323242, 0.252998948097229, 0.004016326740384102, -0.2872151732444763, 0.46788644790649414, -1.0795475244522095, 0.7333667278289795, 0.47195085883140564,...
def _ _ set _ time _ into _ config _ json ( self ) : self. c _ logger. info ( " starting to set the times into json file. " ) current _ selected _ date = self. _ _ get _ date _ from _ calendar ( self. new _ data _ calendar _ instance ) arriving _ time = self. _ _ get _ time _ from _ time _ picker ( self. arrive _ time ...
[ -1.0228077173233032, 0.1496134102344513, 0.7962690591812134, -1.1399900913238525, -0.12248500436544418, 0.46879512071609497, 0.49945881962776184, -0.3408110439777374, -1.6541714668273926, 1.4085053205490112, -0.755161464214325, 0.5393713116645813, 0.20045368373394012, 0.8206179738044739, ...
def regular _ content ( content ) : content = content. replace ('','' ) # filter website address website _ addresses = '. '. join ( re. findall ( u'\ w * : / /. * ', content ) ) for website _ address in website _ addresses : content = content. replace ( website _ address,'' ) # filter chinese in bracket brackets = '. '...
[ 0.4994718134403229, -0.6728050708770752, 0.9658297896385193, -0.7689394354820251, -1.1268516778945923, -0.35702553391456604, 0.7005202770233154, 0.23576250672340393, 0.09460828453302383, 0.3728627860546112, -0.4707528352737427, 0.5591020584106445, -0.8891627788543701, -0.46213865280151367,...
def get _ media ( self, *, media _ id = none, shortcode = none ) : if media _ id is not none : url = self. client. media +'/ { } '. format ( media _ id ) else : url = self. client. media +'/ shortcode / { } '. format ( shortcode ) return self. client. get ( url, bucket = _ func _ ( ) )
[ 0.13946431875228882, -0.2386762499809265, 0.33935773372650146, 0.9262278079986572, 0.8730779886245728, -1.0224025249481201, -1.2005925178527832, -0.033208638429641724, 0.705909013748169, -0.04137752950191498, 0.5639706254005432, 1.5643826723098755, -1.121225118637085, 0.809830904006958, ...
def str2str _ list ( str ) : return [ s. strip ( ) for s in str [ 1 : - 1 ]. split ( ", " ) ]
[ -0.39718097448349, -1.0800387859344482, 0.46565961837768555, -0.4079076945781708, 0.6858393549919128, 0.43899139761924744, -1.3105251789093018, 1.3112819194793701, 0.9198291301727295, 0.682328999042511, -0.5799030661582947, 0.8785380721092224, -0.04808271303772926, -0.2804733216762543, -...
def mac _ final ( self ) - > bytearray : if get _ pad _ size ( self. _ buff, self. block _ size ) = = 0 : final _ key = self. _ key _ 1 else : final _ key = self. _ key _ 2 self. _ buff = set _ pad _ mode _ 3 ( self. _ buff, self. block _ size ) result = bytearray ( ) result = self. _ cipher _ obj. encrypt ( add _ xor ...
[ -0.8072049617767334, 0.7271140813827515, 0.8149649500846863, 0.28996196389198303, -0.23871134221553802, -0.0024314140900969505, 0.6703011393547058, -0.9507163166999817, -0.5868642926216125, 0.3214782774448395, -0.4359308183193207, 0.2069927304983139, -1.3943779468536377, 0.5708032846450806...
def ex ( self ) : tables = self. underlying. get _ tables ( ) data _ map = self. data _ map missing = set ( tables. keys ( ) ) - set ( data _ map. keys ( ) ) res = self. underlying. eval ( data _ map = data _ map ) return ( res )
[ -0.4133484363555908, 0.0963936448097229, 0.6256152987480164, -0.43294113874435425, -0.18444621562957764, 0.6659811735153198, 0.6098290681838989, 0.6778509020805359, -0.5349358916282654, 0.18686115741729736, -0.9443434476852417, 0.42297622561454773, 0.109760582447052, 0.181451678276062, -...
def get _ height ( i, j, obstacles, holes ) : for obs in obstacles : if obs [ 0 ] = = i and obs [ 1 ] = = j : return obstacle _ height for hole in holes : if hole [ 2 ] = = i and hole [ 3 ] = = j : return 0 - hole [ 0 ] ; return 0 ;
[ 0.2610948085784912, -0.1250716745853424, 0.841023325920105, 0.433709055185318, -0.47579917311668396, 0.946927547454834, 0.7357780337333679, -0.5955185294151306, -0.8488692045211792, 1.528813362121582, 0.1514960676431656, -0.16409048438072205, -0.021341700106859207, -0.7441858053207397, 0...
def _ _ upgradeinstanceconf ( self ) : pass
[ -1.0861010551452637, -1.3542289733886719, 0.2673676908016205, -0.15021537244319916, -0.8949703574180603, 0.03059854358434677, 0.5252541899681091, 1.0845510959625244, -0.6095749735832214, 0.8633133172988892, -1.1502506732940674, -0.39235255122184753, -0.25713491439819336, -0.077650830149650...
def _ _ init _ _ ( self ) : self. storage = [ ] self. currentitem = 0
[ -0.5761828422546387, -0.8633659482002258, 0.27285322546958923, 0.6682862639427185, 0.5454816222190857, 0.2080923467874527, 0.30007633566856384, 0.897680938243866, 0.1206287145614624, -0.24873121082782745, -1.4899858236312866, -0.7221798896789551, -0.41878393292427063, 0.9972121119499207, ...
def _ reverse2 ( self, head ) : if head is none : return head stack = [ ] current = head while current is not none : stack. append ( current ) current = current. next head = stack. pop ( ) head. prev = none current = head while stack : node = stack. pop ( ) current. next = node node. prev = current node. next = none cu...
[ 0.0781586542725563, 0.36897385120391846, 0.9429383873939514, 0.07791369408369064, -0.5712999701499939, -1.4835325479507446, 0.40485209226608276, 0.43918168544769287, -0.28454262018203735, 0.22680719196796417, -0.40951061248779297, 0.6890716552734375, -0.973332941532135, -0.2405035495758056...
def get _ absolute _ url ( self ) : return self. swf _ url
[ 0.460272878408432, -0.5396972894668579, 0.3948344886302948, 0.7063796520233154, 0.3588365316390991, 0.31601575016975403, -0.3376186192035675, 1.2757247686386108, -0.7351565361022949, -0.8043139576911926, -0.18867412209510803, 0.3037349283695221, -0.34935009479522705, 0.6644392013549805, ...
async def get _ quote ( self, member : optional [ member ] = none ) - > quote : channel = self. bot. get _ channel ( quote _ channel _ id ) # gather all matching quotes quotes = [ ] if member is none : # get quotes from all members async for message in channel. history ( ) : quotes. append ( self. process _ quote ( mes...
[ 0.5493803024291992, -0.3702385425567627, 0.4166339635848999, 0.6746176481246948, 0.7480441331863403, -1.0702660083770752, -1.1019774675369263, -0.25494441390037537, 0.3149282932281494, 0.14352232217788696, 0.7488361597061157, 0.8063156604766846, -1.1119067668914795, 0.09724625945091248, ...
def reset _ game ( left, right, boat, backup ) : while len ( left ) > 0 : left. pop ( ) for i in range ( len ( backup ) ) : left. append ( backup [ i ] ) while len ( right ) > 0 : right. pop ( ) while len ( boat. contents ) > 0 : boat. contents. pop ( ) boat. side = 0
[ -0.2883317470550537, 0.7225403785705566, 0.9192901849746704, -0.5781076550483704, 0.8641883134841919, 0.22215941548347473, -0.5715819001197815, -0.6369453072547913, -0.354159951210022, 1.4488203525543213, 0.0727008655667305, -0.28299131989479065, -1.2792829275131226, 0.04937584325671196, ...
def _ _ parse _ prototype _ for _ user _ def _ bin _ op ( self ) - > optional [ kal _ ast. prototype ] : self. _ _ eat _ tok ( ) #'binary'if self. curr _ tok. type! = tokentype. operator : raise parseerror ( " expected operator after'binary'" ) fn _ name = f " binary { self. curr _ tok. value } " self. _ _ eat _ tok ( ...
[ -0.5469967126846313, 0.037868987768888474, 0.6651974320411682, 0.7906348705291748, -0.693547248840332, -0.7058247923851013, 0.21151822805404663, -0.38165947794914246, -0.25898808240890503, 0.18384087085723877, -0.5321680903434753, -0.21904350817203522, 0.33876901865005493, 0.51520013809204...
def ecliptic _ to _ equatorial ( lon, lat, input = " deg ", output = " sexigesimal ", \ j2000 = true ) : if j2000 : obliquity = 0. 409092804 # radians else : obliquity = 0. 409206212 # radians # convert ecliptic coords to radians if input = = " sexigesimal " : input = " dmsstr " lon = protractor. convert ( lon, input, ...
[ -0.46839800477027893, -1.4289003610610962, 0.8975110650062561, -1.1928675174713135, -0.19578075408935547, 0.07157330214977264, -0.5366964936256409, 0.6692761778831482, -0.10720905661582947, 0.9560756087303162, -0.43548181653022766, 0.347526878118515, 0.5254346132278442, -0.0502016693353652...
def _ get _ zone _ id ( self, device _ id : str ) - > optional [ str ] : return self. devices [ device _ id ]. get ( " zone " )
[ 0.4978034794330597, 0.06620480865240097, -0.0529821515083313, 0.5264156460762024, 0.07752721011638641, -0.2941551208496094, 0.4558172821998596, -0.7042612433433533, 1.2879058122634888, 0.36300724744796753, 0.45663368701934814, -0.11562500894069672, -0.22922083735466003, 0.01337871886789798...
def uint _ winapi ( argtypes = [ ] ) : def args _ decorator ( sdk _ func ) : " " " second layer sets argtypes as well as the return type, which is a uint for most of the methods. " " " # get func name sdk _ func = getattr ( andor _ solis, sdk _ func. _ _ name _ _ ) # set func argtypes sdk _ func. argtypes = argtypes # ...
[ -1.1959173679351807, -0.05328233167529106, 0.7401966452598572, 0.32211190462112427, -0.1837197095155716, 0.0869976058602333, 0.09073840826749802, 0.12036449462175369, 0.41918984055519104, -0.02789379097521305, 0.2045687586069107, -0.06016165763139725, 0.13761870563030243, 0.042725268751382...
def update _ group _ with _ http _ info ( self, group _ id, title, description, logged _ in _ user _ id, access _ token, client _ token, * * kwargs ) : all _ params = ['group _ id ','title ','description ','logged _ in _ user _ id ','access _ token ','client _ token ','fields'] all _ params. append ('callback') all _ p...
[ -0.9334647059440613, 0.20784179866313934, 0.8598673343658447, 0.11292045563459396, -0.7826413512229919, 0.0082912128418684, -0.4110453426837921, -1.0157912969589233, -0.7812219858169556, 0.40748220682144165, 0.397280216217041, 0.9609500765800476, -0.7756215929985046, 0.7843098044395447, ...
def _ mgui _ get _ column _ headers ( self ) - > tuple : horiz _ header = self. _ qwidget. horizontalheader ( ) ncols = self. _ qwidget. columncount ( ) # visual index allows for column drag / drop, though it's currently not enabled. indices = ( horiz _ header. visualindex ( i ) for i in range ( ncols ) ) items = ( sel...
[ -0.4852721691131592, 0.03655559942126274, 0.5870581865310669, -0.000861802080180496, 0.11769933253526688, -0.3374887704849243, -0.7853922843933105, -0.9391677975654602, -1.5161546468734741, 0.7333375215530396, -0.8313004374504089, -1.378645896911621, -0.10986927896738052, -0.28027650713920...
def _ killprocessesbyname ( self, sname, sdesc, fchildren = false ) : ckilled = 0 ; aoprocesses = utils. processlistall ( ) ; for oprocess in aoprocesses : sbase = oprocess. getbaseimagenamenoexesuff ( ) ; if sbase is not none and sbase. lower ( ) = = sname : reporter. log ('killing % s process : % s ( % s )'% ( sdesc,...
[ -0.4161618649959564, -0.30914247035980225, 0.8567202091217041, -0.4564245641231537, -0.246244877576828, -1.0652133226394653, -0.020040111616253853, -0.26551690697669983, 0.07360706478357315, 0.8980821967124939, -0.43981480598449707, -0.2668820917606354, 0.3383435904979706, -0.0285324696451...
def start _ game ( self ) : while self. keep _ playing = = true : self. _ cue _ action ( " input " ) self. _ cue _ action ( " update " ) self. _ cue _ action ( " output " ) self. keep _ playing = self. _ script [ " update " ] [ 1 ]. checkgameover ( ) sleep ( constants. frame _ length ) self. gamewon = self. _ script [ ...
[ -0.6928122639656067, -0.9249094128608704, 0.8118702173233032, 0.910957396030426, -0.5307258367538452, 0.19062337279319763, 0.9507725238800049, -0.4126686453819275, -0.4985399842262268, 1.3827875852584839, -0.1946910321712494, 0.2918652296066284, -0.630447268486023, 0.29651880264282227, 1...
def _ hook ( cls, item ) : if isinstance ( item, dict ) : return cls ( item ) elif isinstance ( item, ( list, tuple ) ) : return type ( item ) ( cls. _ hook ( elem ) for elem in item ) return item
[ -1.1215457916259766, 0.3640478253364563, 0.7132129073143005, 0.28245753049850464, 0.42097941040992737, 0.4058714807033539, -0.09452959895133972, -0.06253711879253387, 0.8175936341285706, 0.12118065357208252, 0.25994402170181274, 0.0410497784614563, -0.15579336881637573, -0.6179944276809692...
def all _ multiples _ below ( m1, m2, n ) : return sum ( [ i for i in range ( n ) if i % ( m1 * m2 )! = 0 and ( i % m1 = = 0 or i % m2 = = 0 ) ] )
[ -0.10700754076242447, -0.014773364178836346, 0.5211142301559448, 0.7360313534736633, -1.0052353143692017, 0.4994555115699768, -0.8339317440986633, -1.0702825784683228, -0.5644078850746155, -0.42629408836364746, -0.2544446587562561, 0.6259557008743286, -1.2441389560699463, 0.985334873199462...
def anntorle ( self, ann, height, width ) : segm = ann ['segmentation'] if isinstance ( segm, list ) : # polygon - - a single object might consist of multiple parts # we merge all parts into one mask rle code rles = maskutils. frpyobjects ( segm, height, width ) rle = maskutils. merge ( rles ) elif isinstance ( segm ['...
[ 0.5663477182388306, -0.77656489610672, 0.4767690598964691, -0.15899816155433655, 0.48308300971984863, -0.13588054478168488, 0.40563133358955383, -0.756061851978302, 1.0695363283157349, -0.2677227854728699, 0.06196242943406105, -0.1396830677986145, -0.04881560802459717, -0.6523947715759277,...
def all ( self ) : return list ( self. inspections. values ( ) )
[ 0.25428566336631775, -0.322248637676239, 0.2685708701610565, 0.41484951972961426, 0.20280349254608154, 0.7317280769348145, -0.6240373849868774, 0.9537636041641235, 0.04749114438891411, -0.48202160000801086, -0.12474988400936127, 0.16446152329444885, -0.387551873922348, 0.8550283312797546, ...
def player ( board ) : num _ empty = 9 for row in board : num _ empty - = sum ( item is not empty for item in row ) if num _ empty = = 0 : next _ player = none elif num _ empty % 2 = = 0 : next _ player = o else : next _ player = x return next _ player
[ -0.024744028225541115, 0.40433287620544434, 0.6691568493843079, 0.07138142734766006, 0.18152104318141937, -0.18920983374118805, 0.9508602619171143, -0.039571117609739304, 0.16660134494304657, 0.015564193949103355, -0.5623763203620911, -0.6372799873352051, -0.511585533618927, -0.29884716868...
def send _ message _ to _ other _ user ( self, receipient : str, message : str, *, sender : str = none ) - > bool : pass
[ -1.1910406351089478, 0.61590176820755, 0.5010590553283691, 1.0293325185775757, 0.40102630853652954, -0.06142934039235115, 0.44920048117637634, -0.4625858664512634, -0.30471864342689514, 0.020303312689065933, -0.1853877156972885, 0.2611510753631592, -0.6546773314476013, 0.14704468846321106,...
def testupdatevaluesforquerieswithimplicittags ( self ) : tagapi ( self. user ). create ( [ ( u'username / bar ', u'description') ] ) # fixme replace this with securetagvalueapi once the index is # integrated objectid = uuid4 ( ) values = { objectid : { u'username / bar': 42 } } tagvalues = securetagvalueapi ( self. us...
[ -0.3795150816440582, 0.37493327260017395, 0.40490084886550903, -0.22903764247894287, 0.26454663276672363, 0.40412816405296326, -0.1635124385356903, -0.08539949357509613, -0.15376046299934387, -0.4314380884170532, -0.9682332873344421, -0.26366475224494934, -0.05214160680770874, 0.3204107582...
def _ translate _ attribute ( key : str, value : types. attributevalue, max _ length : optional [ int ] ) - > optional [ model _ pb2. keyvalue ] : translated = none if isinstance ( value, bool ) : translated = _ get _ bool _ key _ value ( key, value ) elif isinstance ( value, str ) : if max _ length is not none : value...
[ -0.23168206214904785, -0.2623496651649475, 0.44384142756462097, -0.4508480131626129, -0.6947946548461914, -0.739711582660675, -0.9889184832572937, -0.20784948766231537, -0.19616112112998962, 0.8295616507530212, 0.011270192451775074, 0.7932087182998657, 0.9520367980003357, -0.87601566314697...
def populate _ stream _ dict ( chan, data ) : video = false audio = false try : for strm in data ['streams'] : if strm ['codec _ type'] = ='video': video = true resolution ='{ } x { } '. format ( strm ['width'], strm ['height'] ) fps = strm ['avg _ frame _ rate']. split ('/') fps = round ( float ( fps [ 0 ] ) / float (...
[ -0.2822691798210144, 0.17058588564395905, 0.8907846808433533, -1.507919192314148, 0.1310751885175705, -0.20518805086612701, -0.7015021443367004, -0.9930861592292786, -0.04266494885087013, 0.27110856771469116, 0.021267496049404144, 0.6505967974662781, -0.41157570481300354, 1.527231693267822...
def check _ parent _ login ( username, dob ) : base _ url ='http : / / report. aldel. org / parent _ page. php'try : date, month, year = dob. split ('/') except valueerror : return false with requests. session ( ) as s : r = s. get ( base _ url ) session _ id = str ( r. cookies. get ('phpsessid') ) # get sessionid capt...
[ -0.30865412950515747, 0.1071515679359436, 0.9621276259422302, 0.5190355777740479, -0.6513991951942444, 0.6618549227714539, 0.10760392993688583, -0.5096182823181152, 0.16820065677165985, 0.18644686043262482, -0.21637190878391266, -0.12926645576953888, -0.5199322700500488, 0.1417004913091659...
def parse _ params ( path ) : param _ dict = {'negative peaks': none,'temperature range to bound negative curve fitting': none,'temperature range to bound positive curve fitting': none,'max peak num': none,'mass defect warning': none,'temperature to calculate mass loss from': none,'temperature to calculate mass loss to...
[ 0.5226215720176697, -1.202519416809082, 0.8080442547798157, -0.13844642043113708, -0.24151548743247986, 0.7195498943328857, 0.08826237916946411, 0.768882155418396, -1.3966341018676758, 0.3530299663543701, -0.35792288184165955, 0.268591970205307, -0.3078170716762543, 0.8252408504486084, -...
def test _ hypothesis _ grid _ iter ( h, generator, survey, bins, return _ chains, mw _ alternative, method, seed, nlive, kwargs ) : # prevents duplicate results when multiprocessing if seed is not none : np. random. seed ( seed ) else : seed = 42 # format the ` t _ total ` argument so that it only affects measurements...
[ -0.6805148124694824, 0.34774506092071533, 0.8358463644981384, -0.09753917902708054, 0.8774552941322327, 0.09741611033678055, 0.26301148533821106, -0.12272913753986359, -0.6875556111335754, -0.20631277561187744, 0.09173605591058731, 0.6928711533546448, 0.25488486886024475, 1.266914963722229...
def dfs _ path ( self, source, dest ) : pass
[ -1.2622517347335815, 0.7488423585891724, 0.046077661216259, 0.21037104725837708, -0.3759232759475708, 0.021959805861115456, 0.23136399686336517, -0.15598657727241516, -0.6932322382926941, -0.2829330861568451, 0.8424740433692932, -0.27435174584388733, 0.5337212681770325, -0.2414595931768417...
async def _ load _ buttons ( self ) : _ log. debug ( " loading buttons for pico button groups " ) button _ json = await self. _ request ( " readrequest ", " / button " ) button _ devices = { button _ group : device for device in self. devices. values ( ) if device [ " button _ groups " ] is not none for button _ group ...
[ -0.884084165096283, -0.0949074923992157, 0.5520554184913635, -0.37154126167297363, 0.666224479675293, -0.14569291472434998, -0.3426007926464081, -0.33693453669548035, -0.1756189465522766, -0.2978094816207886, -0.9365984201431274, -0.5012820959091187, -0.1727343201637268, -0.025897525250911...
def get _ rllib _ config ( path ) : jsonfile = path +'/ params. json'# params. json is the config file jsondata = json. loads ( open ( jsonfile ). read ( ) ) return jsondata
[ -0.27472051978111267, -1.2669668197631836, 0.5315782427787781, -0.985580563545227, -0.4238436222076416, 0.5555833578109741, -0.5586357712745667, -0.1377645879983902, -0.8667941093444824, 1.3101716041564941, -1.1217139959335327, -0.10593491792678833, 0.014568856917321682, 0.5847365260124207...
def _ get _ poisson _ likelihood _ minimise ( self, x ) : fit _ parameters = dict ( list ( zip ( self. variable _ names, x ) ) ) return self. _ get _ poisson _ likelihood ( * * fit _ parameters )
[ -0.054862868040800095, -0.9293069839477539, 0.39743563532829285, -0.22994232177734375, -0.24543151259422302, -0.579675555229187, -1.41959810256958, -0.7189158797264099, -0.007536225952208042, -0.0756436437368393, -0.975627064704895, 0.43655848503112793, -1.3532068729400635, -0.503944993019...
def _ get _ load _ and _ process _ fn ( self, is _ training ) : def load _ and _ process ( path, label, bbox ) : # load image image = tf. image. decode _ png ( tf. io. read _ file ( path ), channels = 1 ) # apply augmentations and / or crop to bbox if is _ training : image, bbox = self. _ augment _ image _ and _ bbox (...
[ -0.6081472039222717, -0.14218024909496307, 0.7593747973442078, -1.2785488367080688, -0.1304187774658203, -0.7074466943740845, -0.19143742322921753, -0.319566011428833, 0.10349803417921066, 0.2807244658470154, 0.4147724211215973, 0.38865822553634644, 1.057835578918457, -0.5471774935722351, ...
def sfc _ sfpverifyfile ( jitter ) : ret _ ad, args = jitter. func _ args _ stdcall ( [ " lpszfilename ", " lpszerror ", " dwerrsize " ] ) raise runtimeerror ('api not implemented') jitter. func _ ret _ stdcall ( ret _ ad, ret _ value )
[ 0.1257529854774475, 0.15827159583568573, 0.5612322092056274, 0.12520161271095276, 0.02941552922129631, 0.33268579840660095, 0.7672348022460938, -0.13053038716316223, 0.05422067269682884, -0.710849940776825, -0.663246214389801, -0.0687965378165245, -0.4652954936027527, 1.6001827716827393, ...
def setup ( self ) : self. n1 = nodeorderable. objects. create ( name ='1') self. n2 = nodeorderable. objects. create ( name ='2 ', parent = self. n1 ) self. n3 = nodeorderable. objects. create ( name ='3 ', parent = self. n2 ) self. n4 = nodeorderable. objects. create ( name ='4 ', parent = self. n2 ) self. n5 = nodeo...
[ -0.19052031636238098, 0.9556199908256531, 0.6959375739097595, 1.0540298223495483, 0.24722322821617126, -0.2815015912055969, 0.89439457654953, -0.8887644410133362, -0.4860922694206238, 0.19373928010463715, -1.267385721206665, -0.824484646320343, -0.23216994106769562, 0.40635305643081665, ...
def get _ platform ( ) : system = platform. system ( ) if system = = " linux " : return platform. linux if system = = " darwin " : return platform. mac if system = = " windows " : return platform. windows raise notimplementederror ( f " platform { system } is not supported yet " )
[ -0.7356754541397095, -0.1034979447722435, 0.45249831676483154, 0.626725435256958, -0.4419136643409729, 0.06625917553901672, 0.13592813909053802, -0.6238448619842529, -0.696204662322998, -0.34154823422431946, 0.07809313386678696, 0.8117983937263489, -0.2281285971403122, 0.784434974193573, ...
def authenticate _ google ( ) : creds = none # the file token. json stores the user's access and refresh tokens, and is # created automatically when the authorization flow completes for the first # time. if os. path. exists ('token. json') : creds = credentials. from _ authorized _ user _ file ('token. json ', scopes )...
[ -0.3068922460079193, -0.7271725535392761, 0.4871884882450104, 0.07392547279596329, -0.21296420693397522, 0.7284095287322998, -0.2290412336587906, -0.9378171563148499, 0.6311370730400085, -0.6595800518989563, -0.15973223745822906, 1.1151307821273804, -0.3515722155570984, -0.1864895075559616...
def get _ nearest _ airport ( city ) : location = get _ lat _ long ( city ) if location is none : return none else : url ='https : / / api. sandbox. amadeus. com / v1. 2 / airports / nearest - relevant'params = dict ( latitude = location ['lat'], longitude = location ['lng'], apikey = amadeus _ api _ key ) try : resp =...
[ -0.43472936749458313, -0.77366703748703, 0.6833525896072388, -0.14984752237796783, -1.3166134357452393, -0.11702584475278854, -0.7219276428222656, -0.6524724960327148, 0.3488908112049103, 0.3848523199558258, -0.6778544783592224, 0.35076043009757996, -0.5516391396522522, -0.2483139038085937...
def get _ easting _ northing _ from _ lat _ long ( latitude, longitude, radians = false ) : latitude = np. array ( latitude ) longitude = np. array ( longitude ) lat, lon = wgs84toosgb36 ( latitude, longitude, radians ) a = osgb36. a b = osgb36. b f _ 0 = osgb36. f _ 0 phi _ 0 = osgb36. phi _ 0 lam _ 0 = osgb36. lam _ ...
[ -0.21162784099578857, 0.270962655544281, 1.051051139831543, -0.1543271839618683, -0.5503531694412231, 0.014108318835496902, -0.5949766039848328, 0.43572336435317993, -0.5608989596366882, 0.786980152130127, -0.6193764805793762, 0.29624250531196594, -0.09468793869018555, 0.2625219523906708, ...
def read ( self, length, offset = 0, consume = true ) : start = self. _ read _ head + offset indices = tf. math. floormod ( tf. range ( start, limit = start + length ), self. _ buffer _ size ) result = tf. gather ( self. _ buffer, indices ) if consume : self. consume ( length, offset ) return result
[ -0.20782315731048584, 0.12031181901693344, 0.8608920574188232, -0.9673309326171875, -0.7548469305038452, 0.24975979328155518, -0.3065473735332489, -0.43750259280204773, -0.5307972431182861, 0.036199282854795456, -0.4053981900215149, 0.8030357956886292, -0.12919846177101135, -1.146820068359...
def to _ python ( self, value ) : if isinstance ( value, str ) : return value elif isinstance ( value, dict ) : try : value = value [ " url " ] except keyerror : raise validationerror ( " dictionary must contain an'url'element " ) if not isinstance ( value, str ) : raise validationerror ( " field's url element must be ...
[ -0.7851608395576477, -0.028742831200361252, 0.7998970746994019, -0.9032242298126221, -0.03755856305360794, 0.349244624376297, -0.08917485922574997, 0.1519457846879959, 0.3851640820503235, -0.19545044004917145, 0.2798883020877838, 0.29724568128585815, -0.45776188373565674, 0.340553611516952...
def iter _ cu _ range _ lists _ ex ( self, cu ) : stream = self. stream stream. seek ( cu. offset _ table _ offset + ( 64 if cu. is64 else 32 ) * cu. offset _ count ) while stream. tell ( ) < cu. offset _ after _ length + cu. unit _ length : yield struct _ parse ( self. structs. dwarf _ rnglists _ entries, stream ) ;
[ -0.6483730673789978, 0.13394160568714142, 0.3984684944152832, -0.031123440712690353, -0.6037620306015015, 0.9893583059310913, 0.16682499647140503, -0.29819920659065247, 0.5087551474571228, -0.33790162205696106, -0.3750583231449127, 0.33294448256492615, -0.5367009043693542, 0.50728911161422...
def cond _ sdp _ tree ( self, x, fx, t _ x, tree, s, algo = " shap ", n = 50000, data = none ) : if type ( data )! = type ( self. data ) : data = self. data a = tree. children _ left b = tree. children _ right f = tree. feature t = tree. threshold r _ w = tree. weighted _ n _ node _ samples v = np. array ( [ tree. valu...
[ 0.7866100668907166, -0.16004569828510284, 0.9132943749427795, 0.4141610562801361, -1.2334132194519043, -0.18407589197158813, -0.2770932614803314, 0.2694726586341858, -0.7650200128555298, 0.7021682858467102, 0.30037009716033936, 0.07301020622253418, 0.45997822284698486, 0.30922427773475647,...
def available ( self ) : return self. extra _ state _ attributes [ " start " ] is not none
[ -0.20737093687057495, 0.003984727431088686, 0.39910954236984253, 0.31116390228271484, -0.5201493501663208, 0.9317653775215149, 0.2009153813123703, 0.9431329369544983, 0.48095884919166565, 0.7720773816108704, -0.5011234283447266, 0.13549548387527466, 0.16139060258865356, 0.07221343368291855...
def update ( self, dt, entity _ manager ) : print'system. update called. dt = { }, entity _ manager = { } '. format ( dt, entity _ manager )
[ -0.5160301923751831, -0.7907212376594543, 0.23802904784679413, 0.24289457499980927, -0.45709624886512756, 0.7071123123168945, -0.5961586833000183, -0.6190435290336609, -0.39085185527801514, -0.5783833265304565, 0.17709778249263763, 0.36839237809181213, 0.7095104455947876, 1.447177171707153...
def test _ unit _ auth _ form _ with _ invalid _ user ( self ) : # mock forms. with patch ('user _ auth. auth _ forms. forms') as form : form. charfield = magicmock ( return _ value = " charfield " ) form. emailfield = magicmock ( return _ value = " emailfield " ) with patch ('user _ auth. auth _ forms. user') as user ...
[ -0.6455668807029724, 0.7797954082489014, 0.5057539939880371, 0.08263099938631058, 0.7141964435577393, 0.7110236287117004, 0.4354279637336731, -0.24517546594142914, 0.12717822194099426, -1.4676704406738281, -1.0615720748901367, 0.012439340353012085, 0.45805585384368896, 0.14446239173412323,...
def extract _ non _ tty _ phone ( public _ liaison ) : if'phone'in public _ liaison : non _ tty = [ p for p in public _ liaison ['phone'] if'tty'not in p ] if len ( non _ tty ) > 0 : return non _ tty [ 0 ] elif len ( public _ liaison ['phone'] ) > 0 : return public _ liaison ['phone'] [ 0 ]
[ -0.5066368579864502, -0.7391771078109741, 0.33778631687164307, -0.48076745867729187, 0.4043577015399933, 0.681492269039154, -1.6017930507659912, -0.07313162833452225, 0.37065330147743225, 0.6796236038208008, 0.36763256788253784, -0.869445264339447, -0.7462725043296814, 0.8799829483032227, ...
def test _ create _ skill _ wrong _ credentials ( self ) : payload = { " date " : " 22 august ", " name " : { " en " : " test skill ", " fr " : " skill de test " }, " description " : { " en " : [ " test desc " ], " fr " : [ " desc test " ] } } res = self. admin _ client. post ( skill _ url, payload, format ='json') sel...
[ 0.35947608947753906, -0.23726239800453186, 0.41009533405303955, -0.11748525500297546, 0.9300122261047363, 1.3435097932815552, -1.0271605253219604, -1.1983193159103394, -0.697504997253418, 0.13507889211177826, -1.0428526401519775, 1.1555440425872803, -0.2890666723251343, 0.47168004512786865...
def test _ get _ parameter ( self ) : pass
[ -0.1864670366048813, 0.25031760334968567, 0.24230441451072693, 1.0078753232955933, 1.3948523998260498, 0.3861207067966461, 1.4530341625213623, -0.39836281538009644, 0.08626772463321686, -0.5997154712677002, 0.08628097176551819, 1.3939403295516968, -0.795484185218811, -0.03383569419384003, ...
def collate _ fn ( batch ) : inputs = [ ] outputs = [ ] lengths = [ ] for each in batch : x = each [ 0 ] y = each [ 1 ] _, path = fastdtw ( x, y, dist = melcd, radius = 1 ) pathx = list ( map ( lambda l : l [ 0 ], path ) ) pathy = list ( map ( lambda l : l [ 1 ], path ) ) x, y = x [ pathx ], y [ pathy ] inputs. append ...
[ 0.7603870630264282, -0.11024864763021469, 0.7832027673721313, -0.3834841251373291, -0.12630228698253632, -0.47896039485931396, 0.1655135452747345, -0.7017368674278259, -0.9838648438453674, -0.0562402717769146, 0.26075950264930725, -0.3823433816432953, 0.6308326125144958, 0.7990796566009521...
def _ path _ from _ path _ dict ( path _ dict, start, end ) : path = [ end ] curr = end while curr! = start : curr = path _ dict [ curr ] path. append ( curr ) return path [ : : - 1 ]
[ -0.04740035533905029, -0.9685572981834412, 0.4908936321735382, -0.13797122240066528, -0.0029372479766607285, 0.6045734882354736, -0.6339515447616577, 0.239568829536438, -0.7885909080505371, 1.022550344467163, 0.7692302465438843, -0.1826241910457611, -0.23999157547950745, -0.933613598346710...
def testsettaginstancewithunknowntag ( self ) : self. store. commit ( ) with login ( u'username ', uuid4 ( ), self. transact ) as session : thriftvalue = createthriftvalue ( 42 ) deferred = self. facade. settaginstance ( session, u'unknown / path ', str ( uuid4 ( ) ), thriftvalue ) error = yield self. assertfailure ( d...
[ -0.14751407504081726, 0.3845476508140564, 0.36903998255729675, -0.7905740141868591, 0.4720304012298584, 0.22200603783130646, -0.04491163045167923, -0.1541830599308014, -0.581762969493866, -0.05897653102874756, -0.9505910873413086, -0.2496507465839386, 0.5565266013145447, 0.7626539468765259...
def generatephotonparticle ( partcilecount, energy ) : shape, scale = 2., energy * * 0. 2 energies = np. random. normal ( energy, math. sqrt ( energy ), partcilecount ) " " " make distribution of positions " " " " " " uncomment and copy < [ x [ iparticle ], y [ iparticle ], z [ iparticle ] ] > to the function below " "...
[ -0.13852572441101074, -0.4617781341075897, 0.7485142350196838, -0.8060215711593628, -0.46691083908081055, 0.9287747740745544, -0.11050724983215332, 0.2762535512447357, 0.22008222341537476, 0.46509847044944763, -0.5050919651985168, -0.5853948593139648, -0.48587051033973694, -0.2577639222145...
def findfirstandseconddosestats ( dashboard _ link ) : global first _ dose, second _ dose try : page = requests. get ( dashboard _ link ) soup = beautifulsoup ( page. content, " html. parser " ) numbers = soup. find _ all ('div ', class _ = " numbers " ) for number in numbers : if number. find ( string = re. compile ( ...
[ 0.2215791493654251, 0.0832921490073204, 0.7527337074279785, -0.433501273393631, 1.3382467031478882, -1.1487817764282227, 0.4241657257080078, -0.34763363003730774, -0.5777289271354675, -0.8375672101974487, -0.4217325747013092, 0.4283311069011688, 0.925971269607544, 1.3756818771362305, 1.1...
def expand _ globstar ( patt, fuzziness = false, * * kwargs ) : fuzziness = 3 if fuzziness is true else int ( fuzziness ) if fuzziness is not none else fuzziness if isinstance ( fuzziness, float ) and 0 < fuzziness < 1 : fuzziness = int ( round ( fuzziness * regex _ len ( patt ), 0 ) ) if r'|'in patt : patt = regex. su...
[ 0.015099916607141495, -0.09553294628858566, 1.202012062072754, -0.5723430514335632, -1.3963743448257446, -0.4401922821998596, 0.16314715147018433, 0.6230565905570984, 0.6302600502967834, 0.17721740901470184, 0.7052247524261475, 0.045449793338775635, -0.26257970929145813, 0.2989358901977539...
def delete ( self, eventref : documentreference ) : return eventref. delete ( )
[ 0.5646215081214905, -0.6916143298149109, 0.49602341651916504, -0.5448649525642395, -0.42418256402015686, -0.21183057129383087, 0.2618241608142853, 0.2314394861459732, 0.8203265070915222, 0.6019287705421448, 0.4359903037548065, 0.43088898062705994, -1.0153731107711792, -0.05193372070789337,...
def name ( self ) : return self. _ data. get ('name')
[ -0.745848536491394, 0.004775702953338623, 0.19784842431545258, -0.13594479858875275, -0.3430567681789398, 0.48782649636268616, -0.37240034341812134, -0.6333788633346558, 0.023855656385421753, 0.5487131476402283, -0.7175403237342834, 0.14169549942016602, 0.4155436158180237, -0.5894110202789...
def set _ active ( self, active ) : self. _ _ active = active
[ -0.3072463274002075, -1.2417221069335938, 0.2507164478302002, -0.1000932827591896, 0.41646862030029297, 0.8437824249267578, 0.5675674080848694, 0.15766020119190216, -0.7408232092857361, -0.476784884929657, -0.9770994782447815, 0.05476853996515274, -0.2262452393770218, -1.1372934579849243, ...
def gen _ basis _ matrix ( data, m ) : basis _ matrix = np. zeros ( shape = ( len ( data ), m ) ) for di, d in enumerate ( data ) : for m in range ( m ) : basis _ matrix [ di, m ] = d * * m return basis _ matrix
[ -0.626845121383667, 0.019528720527887344, 0.4255051910877228, 0.06455810368061066, -0.08536767214536667, 0.5268024802207947, 0.009890303947031498, 0.5049724578857422, -0.033656418323516846, -0.0666564479470253, -0.14261162281036377, 0.5702539682388306, -0.4851149320602417, 0.45975434780120...
def refresh _ sensorpush _ data ( event _ time ) : # todo : discovering new devices ( and auto - configuring hass sensors ) is not supported # hass. data [ sensorpush _ service ]. update ( update _ devices = true ) # retrieve the latest samples from the sensorpush cloud service try : latest _ samples = hass. data [ sen...
[ 0.7768399715423584, -0.21701693534851074, 0.3807015120983124, 0.07299132645130157, 0.6036564707756042, 0.00015471040387637913, -1.184334635734558, -0.7163782715797424, 0.6318874955177307, -0.1137051060795784, 0.4499143660068512, 0.5193559527397156, 0.8180868029594421, 1.078307867050171, ...
def make _ bigrams ( xs ) : return zip ( xs, xs [ 1 : ] )
[ -0.624779224395752, 0.42418035864830017, 0.44904932379722595, 0.6882643699645996, 0.51114821434021, -0.6520176529884338, -0.3999954164028168, 0.03929363191127777, 0.737076461315155, 0.861234188079834, -1.4170966148376465, 1.144936442375183, 0.22955811023712158, -0.11498274654150009, 0.15...
def message ( self ) : return self. _ message
[ -0.5588659048080444, 0.19776123762130737, 0.18636392056941986, -0.1984763741493225, 0.5462602972984314, 0.810543954372406, 0.17693403363227844, -0.7154408097267151, 0.10700330138206482, -1.4671969413757324, 1.0348445177078247, 0.7321836948394775, -0.6855937242507935, 0.054163120687007904, ...
def to _ python ( self, value ) : if value is not none : return json. loads ( json. dumps ( value ) )
[ -1.2694751024246216, -0.6402600407600403, 0.5159656405448914, -1.399024248123169, -0.4153355658054352, -1.156876802444458, -0.784321665763855, -1.024574637413025, 0.8425722718238831, 0.7006605267524719, -1.2824065685272217, 0.85909104347229, 0.0703909620642662, -0.2699489891529083, 0.298...
def _ _ init _ _ ( self, nrank, nsuit ) :
[ 0.2893972396850586, -0.2825818359851837, 0.28646495938301086, 1.2947508096694946, -0.01743345707654953, -0.03239726275205612, 0.21893568336963654, -0.3922613859176636, -0.11282041668891907, -0.5681307911872864, -0.47175920009613037, 0.27949222922325134, -0.2858711779117584, 0.7617189884185...
def prepare _ context ( exc, cls ) : context = exc. create _ object _ context ( cls ). create _ child _ context ( ) context [ constants. ctx _ names _ scope ] = cls context. register _ function ( string _ ) context. register _ function ( int _ ) context. register _ function ( bool _ ) context. register _ function ( not...
[ -0.6542903184890747, 0.2751094400882721, 0.8475322723388672, -0.35411620140075684, -0.07211072742938995, -0.6030698418617249, 0.11969956755638123, -0.3049691617488861, 1.4717100858688354, -0.059272248297929764, -1.0640089511871338, -0.22970755398273468, 0.945491373538971, -0.10276997089385...