text
stringlengths
25
2.19k
embedding
listlengths
768
768
def norm ( self ) : tot = 0. 0 for word in self. model : tot + = self. model [ word ] ltot = log ( tot, 2 ) for word in self. model : self. model [ word ] = log ( self. model [ word ], 2 ) - ltot
[ 0.2170325368642807, -0.9174047708511353, 0.5462889671325684, -0.5186220407485962, -0.3122003376483917, 0.3680035471916199, 0.2595423758029938, 0.4776909053325653, -0.6468334794044495, 0.5108899474143982, -0.6120297908782959, 0.2698935270309448, -0.36959680914878845, 0.1702052354812622, -...
async def test _ sign ( image _ config : imageconfig, image _ config _ signed : imageconfig, config _ digest _ canonical : str, signature : str, ) : signer = fakesigner ( ) assert await image _ config. sign ( signer ) = = signer. signature _ value assert await image _ config _ signed. sign ( signer ) = = signer. signat...
[ -0.7211885452270508, -0.36345162987709045, 0.4874250590801239, 0.33336618542671204, 0.06718199700117111, -0.2116442322731018, 0.27446144819259644, 0.3023295998573303, -0.25370150804519653, 0.0634789690375328, -0.9650153517723083, -0.4581930339336395, 0.39745473861694336, 0.7347216010093689...
def dfs ( graph, src, dest ) : best _ path = [ ] best _ path _ length = maxsize graph. add _ seen ( src ) if src not in graph. connections : return [ ] for connection in graph. connections [ src ] : path = [ ] if connection = = dest : graph. add _ seen ( connection ) path. append ( connection ) path. append ( src ) ret...
[ -0.1298740804195404, 0.6946312785148621, 0.6823731064796448, 0.3462538719177246, -0.13404884934425354, -0.41365963220596313, -0.13468603789806366, -0.16574476659297943, 0.23015955090522766, 0.3093419671058655, 0.42456328868865967, -0.05506742373108864, -0.007800457067787647, 0.300617635250...
def extract _ events ( url, output ='betting _ slip _ empty') : html _ content = get _ html ( url ) soup = beautifulsoup ( html _ content [ 1 ], " html. parser " ) # html content is as index 1 ( url on index 0 ) soup _ table = soup. find ('table ', { " class " :'wikitable plainrowheaders'} ) soup _ table _ rows = soup ...
[ -1.0399104356765747, 0.3570808470249176, 1.1506725549697876, 0.7447013258934021, -0.873264729976654, -0.8235663771629333, 1.370608925819397, 0.5212582945823669, 0.2888779640197754, 0.9932604432106018, -0.0652647465467453, 0.02836225926876068, 0.46593815088272095, 0.9806196689605713, 1.15...
def get _ weights ( ) : gmpes = [ frankeletal1996mwnshmp2008 ( ), toroetal1997mwnshmp2008 ( ), silvaetal2002mwnshmp2008 ( ), campbell2003mwnshmp2008 ( ), tavakolipezeshk2005mwnshmp2008 ( ), atkinsonboore2006modified2011 ( ), pezeshketal2011nehrpbc ( ), atkinson2008prime ( ), somervilleetal2001nshmp2008 ( ) ] wts = [ 0....
[ 0.1257113367319107, -0.43038424849510193, 0.6798191070556641, -0.26087242364883423, 0.16992893815040588, 0.5383905172348022, 1.008209466934204, -0.0473615862429142, 0.2509142756462097, 0.9717283844947815, -1.0441781282424927, 0.20045527815818787, -0.34099599719047546, 0.7784671783447266, ...
def calc _ iters ( total _ samples, burn _ in = 0. 0, thinning _ factor = 1 ) : assert ( burn _ in > = 0 ) and ( burn _ in < 1 ), " burn _ in must be a proportion ( less than 1 ). " assert isinstance ( thinning _ factor, int ) and thinning _ factor > 0, " thinning _ factor must be a positive integer. " iters = int ( np...
[ -0.48328423500061035, -0.04227576404809952, 0.5486190915107727, -0.28097474575042725, 0.08897678554058075, -0.33138731122016907, 0.7645439505577087, 0.4402429163455963, -0.3613698184490204, 0.8212025165557861, 0.4549245536327362, 0.5583395957946777, -0.7385030388832092, -0.0273746848106384...
def get _ team _ with _ matchups ( self, team _ id ) : # send request url = self. base _ url + " team / " + str ( self. game ) + ". l. " + str ( self. league ) + ". t. " + str ( team _ id ) + " / matchups / " response = self. get ( url, format ='xml') return et. fromstring ( response ) \. find ('yahoo : team ', self. _...
[ -0.04869922250509262, -0.3210156261920929, 0.6377885937690735, -0.24848616123199463, 0.16505008935928345, -0.785266637802124, -0.9068289399147034, -0.17229075729846954, 1.0486770868301392, -0.3420041501522064, -0.11479426175355911, 0.21028326451778412, 0.11060698330402374, -0.0142347645014...
def exit ( self, status = 0, message = none ) : if message : self. _ print _ message ( message, sys. stdout ) sys. exit ( status )
[ 0.34690356254577637, 0.5188056230545044, 0.27774325013160706, 0.7153338193893433, 0.09869184345006943, -0.2720958888530731, -0.07309094071388245, 0.5573859214782715, -0.46541112661361694, -0.8875696063041687, 0.12520241737365723, 0.19448980689048767, -0.7252050638198853, 1.222801685333252,...
def test _ add _ two _ numbers ( ) : assert addition. add ( 2, 5 ) = = 7
[ -0.0841289833188057, -0.37912169098854065, 0.5868178606033325, 0.49950194358825684, 0.46375739574432373, 1.1229157447814941, 0.21468187868595123, -0.13977737724781036, 0.16623055934906006, -0.5811810493469238, -0.46840834617614746, 0.31502047181129456, 0.770907461643219, 0.5100399851799011...
def register ( self, entity _ type, id ) : value = self [ entity _ type ]. register ( id ) return value
[ -0.9481527805328369, 0.21838314831256866, 0.25706395506858826, -0.1459534913301468, 0.8037114143371582, -0.27595752477645874, -1.384149432182312, -0.778680145740509, -0.30523955821990967, 0.07733449339866638, -0.4382932484149933, 0.6631230711936951, -0.13707365095615387, 0.8919954895973206...
def score ( self, score ) : if score is none : raise valueerror ( " invalid value for ` score `, must not be ` none ` " ) # noqa : e501 self. _ score = score
[ 0.26423630118370056, 0.5733911991119385, 0.021691638976335526, 0.6166060566902161, 0.6023043394088745, -0.07599985599517822, -0.02884184569120407, 0.190670445561409, 0.5729035139083862, 0.6116529703140259, -0.4766305983066559, -0.49089738726615906, -0.5086259245872498, 0.028243353590369225...
def get _ header ( self ) : return self. header
[ -0.45742228627204895, -0.7420838475227356, 0.47512707114219666, 0.5553348660469055, 0.003053386928513646, 0.5381200909614563, 0.02552337944507599, -0.44697999954223633, -0.3037664592266083, -1.2478967905044556, 0.2827647924423218, 0.7423211932182312, -0.6694172024726868, -1.371885776519775...
def correlation _ heatmap ( file : str, options : list ) : if " / protein _ table " in options : with st. beta _ expander ( " correlation heatmap " ) : df = cached _ file ( file ) cols = [ _ for _ in df. columns if " lfq " in _ ] if len ( cols ) = = 0 : cols = df. columns if multiple _ file _ check ( cols ) : df = np. ...
[ 0.6665303111076355, 0.5991350412368774, 0.738772451877594, 0.04681698605418205, 0.6879292726516724, 0.46508604288101196, 1.2690999507904053, 0.3734026849269867, -0.3511132597923279, -0.07508370280265808, 0.562247633934021, 0.20758330821990967, -0.15867997705936432, 0.03319317847490311, 0...
def cesaro _ square ( tortoise : turtle. turtle ( ), order : int, size : int, angle _ tear : int ) - > none : for angle in [ - 90, - 90, - 90, - 90 ] : cesaro ( tortoise, order, size, angle _ tear ) tortoise. left ( angle )
[ 0.2525653541088104, 0.28849494457244873, 0.4083334505558014, -0.044550348073244095, 0.34029099345207214, -0.792909562587738, 0.425203800201416, -0.5901437401771545, -0.1660359650850296, 0.44310733675956726, -1.5069161653518677, -0.22119660675525665, 1.0133260488510132, -0.6656442880630493,...
def get _ graph ( ) : global _ registry = component. getglobalsitemanager ( ) graph = global _ registry. queryutility ( igraph ) if not graph : global _ registry = component. getglobalsitemanager ( ) graph = graph _ factory ( ) global _ registry. registerutility ( graph ) return graph
[ 0.031639765948057175, 1.401088833808899, 0.47072073817253113, 0.5081458687782288, 0.3301100432872772, -0.1980912685394287, 0.807679295539856, -0.12758761644363403, 0.698324978351593, -0.44284507632255554, -0.10484796017408371, 1.226784110069275, -0.8387584686279297, -1.3087799549102783, ...
def respect _ robots ( self, value ) : if value and self. _ session : asyncio. ensure _ future ( self. _ parse _ robots ) self. _ respect _ robots = value
[ 0.6634306311607361, 0.8467645049095154, 0.4715767502784729, -0.6427420377731323, -0.5952029228210449, 0.3550998270511627, -0.32953333854675293, 0.17186541855335236, -0.3017917573451996, -0.7662566900253296, -0.43067505955696106, -0.29681816697120667, -0.18350660800933838, 0.436141878366470...
def test _ add _ raise _ exception ( self, create _ beverages ) : with pytest. raises ( addbeveragetypeerror ) : create _ beverages. add ( 1, { } )
[ 0.06433621048927307, 0.7822734117507935, 0.5147296786308289, 0.7546707987785339, 0.4289817810058594, 0.9365324974060059, -0.6841439604759216, 0.13824495673179626, -0.5738358497619629, 0.6244577169418335, -0.07361458986997604, 0.24221517145633698, -1.3731307983398438, 0.7390594482421875, ...
def two _ sum ( self, nums, target ) : lo = 0 hi = len ( nums ) - 1 result = [ ] while lo < hi : # need to take into account the initial iteration if ( lo > 1 and nums [ lo ] = = nums [ lo - 1 ] ) or nums [ lo ] + nums [ hi ] < target : lo + = 1 elif ( hi < len ( nums ) - 1 and nums [ hi ] = = nums [ hi + 1 ] ) or nums...
[ -0.6827157735824585, -0.8826314806938171, 0.7228489518165588, 0.7252788543701172, 0.2875452935695648, 0.015474923886358738, 0.3423895835876465, -0.7460134625434875, 0.42669677734375, -0.08889256417751312, -0.4415334463119507, 0.8273695707321167, 0.08116725087165833, 0.3958160877227783, -...
def todate ( self, * args ) : # primarily so this can be unit tested easily return time. gmtime ( * args ) [ : 3 ]
[ -0.04063413292169571, 0.06894441694021225, 0.41193974018096924, 0.18404421210289001, 0.5494808554649353, 0.705520749092102, -1.4675732851028442, -0.5120295882225037, -0.3029520511627197, 0.4714374542236328, -0.5993330478668213, -0.8657323122024536, -1.2025731801986694, -0.35395392775535583...
def generate _ dataset ( max = 50 ) : for i in range ( max ) : state = random. choice ( states ) print ( ','). join ( map ( str, [ random _ claim _ id ( ), state, random _ zip ( state ), random _ date ( ), random _ date ( ), " %. 2f " % random _ cost ( ), random _ icd ( ) ] ) )
[ -0.31341466307640076, 0.8418758511543274, 0.44721534848213196, -0.8545159697532654, 0.21496142446994781, 0.759537398815155, -1.2683978080749512, 0.10630113631486893, 0.4930953085422516, -0.6390038728713989, 0.21563206613063812, 0.5574360489845276, 0.8336763978004456, -0.4298751950263977, ...
def get ( resource _ name : str, id : pulumi. input [ str ], opts : optional [ pulumi. resourceoptions ] = none, additional _ services : optional [ pulumi. input [ sequence [ pulumi. input [ str ] ] ] ] = none, app _ id : optional [ pulumi. input [ str ] ] = none, custom _ namespaces _ per _ services : optional [ pulum...
[ 0.3152891993522644, 0.8247293829917908, 0.38713517785072327, -0.014043590985238552, -0.2959672510623932, 0.09475164860486984, -0.05792432278394699, -0.47666412591934204, 0.6328089237213135, 0.5644150376319885, -0.1760302037000656, -0.1274060755968094, 0.2242790162563324, -0.710434257984161...
def rm _ dir ( self, path ) : path = self. fix _ path ( path ) if self. node _ exists ( path ) : print ( " deleting dir { }. ". format ( path ) ) dir _ id = self. get _ node ( path ). entry _ id self. _ rm _ dir ( dir _ id ) else : print ( " error : directory { } not found ". format ( path ) )
[ -0.30036139488220215, 0.009789371863007545, 0.6098729968070984, 0.007074311841279268, 0.10497753322124481, 0.29422932863235474, 0.24049310386180878, 0.36598870158195496, 0.8093718886375427, 0.16846968233585358, 0.38284727931022644, 0.5189206600189209, 0.16376346349716187, 0.413434505462646...
def add _ to _ front ( self, node ) : # link up new node node. prev = self. head node. next = self. head. next # update previous links self. head. next. prev = node self. head. next = node # update capacity self. cur _ size + = 1
[ -0.6337422728538513, -0.2034509927034378, 0.7376194596290588, -1.1133177280426025, 0.5622219443321228, -0.3684789538383484, 0.15573899447917938, -0.16239340603351593, 0.6185373663902283, -0.6453374624252319, -0.06036851555109024, 1.5554001331329346, -0.16592957079410553, 0.6903814077377319...
def plot _ test _ a ( self, a = 0. 02, b = 5. 0e - 6, gtype ='vor ', btype = 1, size = ( 10, 8 ), print _ errors = true ) : # generate analytical math : if gtype = ='tri': xo = self. tri _ verts [ :, 0 ] yo = self. tri _ verts [ :, 1 ] elif gtype = ='vor': xo = self. vor _ verts [ :, 0 ] yo = self. vor _ verts [ :, 1 ]...
[ 1.0577775239944458, -0.019134877249598503, 0.7372361421585083, -0.08190368860960007, -0.05932430922985077, -0.3819575011730194, 0.5574014186859131, -0.982730507850647, -0.16834375262260437, -0.00945733580738306, 0.4657127261161804, 0.8362165093421936, 0.21881049871444702, 0.025656348094344...
def _ dataset _ name _ to _ converter _ and _ args ( flags = flags ) : # the dictionary is built inside a function, rather than at the module # top - level, because the flags are not available at import time. return { # datasets in the same order as reported in the article.'ilsvrc _ 2012': ( dataset _ to _ records. ima...
[ -0.4947666823863983, -0.09618008881807327, 0.6074941754341125, -1.303115725517273, -0.308805376291275, -0.2716227173805237, -0.31602367758750916, -0.326190710067749, -0.32804200053215027, 0.028545590117573738, -0.5608610510826111, 0.4120543599128723, 0.43494391441345215, 0.7698529362678528...
def _ _ call _ _ ( self ) : return self. at ( self. _ scheduler. currenttime )
[ -0.8871636390686035, -1.0743390321731567, 0.705306351184845, -0.2819720208644867, -0.45374953746795654, 0.11951416730880737, -1.1662607192993164, -1.0229464769363403, -0.9193200469017029, 0.17046301066875458, 0.3415353000164032, 0.19938445091247559, -0.032571256160736084, -0.47424784302711...
def remove _ dups _ multi _ label ( df ) : # sort values df = df. sort _ values ( by = ['subject _ id ','hadm _ id ','org _ id'], ascending = [ true, true, true ] ) # remove duplicates df = df. drop _ duplicates ( subset = ['subject _ id ','hadm _ id ','org _ id'], keep ='first') return df
[ 0.08863312005996704, 0.040438760071992874, 0.6809104681015015, 0.01543217059224844, 0.2725583612918854, 0.6208335757255554, 0.2069699466228485, 0.028096778318285942, 0.023264994844794273, 0.9393749833106995, 0.07036840915679932, 0.4874766767024994, 0.17711442708969116, 0.00921688787639141,...
def setincrementindex ( self, * args ) : return _ itkimageserieswriterpython. itkimageserieswriterius3ius2 _ setincrementindex ( self, * args )
[ -0.8658345937728882, -0.2696533501148224, 0.26741766929626465, 0.19016312062740326, -0.029967576265335083, 0.5725626349449158, 0.015630969777703285, -0.612244725227356, -0.20219290256500244, 0.09236600250005722, -1.123629093170166, 0.24554800987243652, -0.6113761067390442, 0.55588734149932...
def test _ get _ unregister _ service _ description ( self ) : description = self. strategy. get _ unregister _ service _ description ( ) assert type ( description ) = = description assert description. data _ model is agent _ remove _ service _ model assert description. values. get ( " key ", " " ) = = " seller _ servi...
[ -0.2606654465198517, 0.6970962285995483, 0.09891586005687714, -0.19399994611740112, 0.7875732779502869, -0.619667112827301, -0.06448201090097427, 0.5365678071975708, -0.10703228414058685, -0.08523831516504288, 0.03060908429324627, 0.731952965259552, 0.016666729003190994, -0.037758234888315...
def getincrementindex ( self ) : return _ itkimageserieswriterpython. itkimageserieswriterif3if2 _ getincrementindex ( self )
[ 0.351884663105011, 0.7083662748336792, 0.15390360355377197, 0.6363032460212708, 0.13484619557857513, 0.09580174833536148, 0.395871102809906, -0.5587366819381714, -0.5074336528778076, -0.0884551852941513, -0.1925312578678131, 0.09788801521062851, -0.1711876392364502, 0.0884597972035408, -...
def count _ distance ( self ) : x, y = self. decider. get _ position ( ) goal = self. astar. s _ goal return abs ( x - goal [ 0 ] ) + abs ( y - goal [ 1 ] )
[ -0.2243928760290146, -0.8895642161369324, 0.6963669061660767, 0.5293772220611572, -0.5432595014572144, 0.9083201885223389, 0.18984532356262207, 0.7161740064620972, -0.5628966093063354, 0.5138980150222778, -0.3958283066749573, -0.2812497913837433, 0.8272848129272461, -0.05989813804626465, ...
def indices _ where _ tetrode _ nrs _ in _ tetrode _ nrs ( tetrode _ nrs _ a, tetrode _ nrs _ b ) : _, _, ind = np. intersect1d ( tetrode _ nrs _ a, tetrode _ nrs _ b, assume _ unique = true, return _ indices = true ) return list ( ind )
[ -0.3451065421104431, -0.3310660719871521, 0.4739166796207428, -1.3334462642669678, -0.22281982004642487, 0.16223694384098053, 0.11279338598251343, -0.5583956241607666, -0.1799636036157608, 1.0783593654632568, 0.6392350196838379, -0.16026535630226135, 0.07892356812953949, -0.341284334659576...
def ratelimit ( rulename, keyfun = actual _ ip, rate ='5 / m') : def decorator ( fn ) : @ wraps ( fn ) def _ wrapped ( request, * args, * * kwargs ) : already _ limited = getattr ( request,'limited ', false ) ratelimited = is _ ratelimited ( request = request, group = rulename, key = keyfun, rate = rate, method = ['pos...
[ 0.3706861734390259, 0.7102125883102417, 0.580754816532135, 0.1563108265399933, -0.008146732114255428, -0.11321675032377243, -0.7086366415023804, -0.20463736355304718, 0.1383800208568573, 0.2817235291004181, 1.0012075901031494, 0.6809231638908386, 0.1632939726114273, 0.12357283383607864, ...
def loaddataset ( filename ) : fr = open ( filename ) lines = fr. readlines ( ) m = len ( lines ) n = len ( lines [ 0 ]. strip ( ). split ( ',') ) - 1 x = np. ones ( ( m, n + 1 ) ) y = np. ones ( ( m, 1 ) ) i = 0 for line in lines : x [ i, 1 : ] = map ( float, line. strip ( ). split ( ',') [ : - 1 ] ) y [ i, 0 ] = floa...
[ -0.7818492650985718, -0.3116755783557892, 0.599227786064148, -1.1342946290969849, -0.3100915253162384, -0.21764050424098969, -0.22119195759296417, 0.7058996558189392, -0.6503562927246094, -0.19508692622184753, 0.3435690999031067, 0.6201284527778625, -0.09402752667665482, 0.0243077334016561...
def on _ queue _ url ( self ) : return self. _ _ default _ url
[ 0.43871206045150757, -0.51045161485672, 0.42259758710861206, 0.6284536123275757, 0.7921425104141235, 0.16796079277992249, -0.4674154222011566, 0.15297742187976837, -0.09012973308563232, -0.12271261215209961, -0.5878003835678101, -0.00925312377512455, -0.047802433371543884, 0.65993595123291...
def transfer _ connect ( self ) : self. log. debug ( " establishing transfer connection. " ) return self. socket _ connect ( socket _ type = zmq. dealer, connection = self. connection _ string, port = self. args. transfer _ port, send _ ready = false, )
[ -0.02499704249203205, -0.6445294618606567, 0.5373491048812866, -0.5313035249710083, 0.451936274766922, -0.4144022762775421, 0.21847592294216156, -0.9084429144859314, -0.6996177434921265, -0.01896822080016136, 0.6945127844810486, 0.8262215256690979, -0.7484081983566284, 0.2572035789489746, ...
def analyze _ root ( self ) : for base, sub _ dirs, files in os. walk ( self. _ root _ path ) : if gallery _ identifier in files : self. _ add _ directory ( base ) sub _ dirs [ : ] = [ ] else : for file _ in files : self. _ add _ file ( base, file _ )
[ 0.1455170065164566, 0.40699905157089233, 0.5766851902008057, 0.8146628141403198, 0.6208396553993225, -0.06505004316568375, 1.7332677841186523, -0.18993952870368958, 0.9172102808952332, -1.1066128015518188, -0.6053580045700073, 0.3122120499610901, 0.1473165601491928, 1.2595208883285522, -...
def test _ against _ numpy _ concatenate ( self ) : stream = [ np. random. random ( ( 15, 7, 2, 1 ) ) for _ in range ( 10 ) ] for axis in range ( 4 ) : with self. subtest ( " axis = { } ". format ( axis ) ) : dense = np. concatenate ( stream, axis = axis ) from _ stack = stack ( stream, axis = axis ) self. asserttrue (...
[ 0.9596719741821289, 0.5881961584091187, 0.789954662322998, 0.8617154955863953, 0.5748206973075867, -0.26406413316726685, 0.6981525421142578, -0.6823535561561584, 0.21948295831680298, -0.21181192994117737, -0.13081498444080353, -0.13811689615249634, -0.6461326479911804, 0.293268084526062, ...
def overlap _ alignment ( s, t ) : # store lengths as constants m = len ( s ) n = len ( t ) mu = - 2 # penalty for mismatches sigma = - 2 # penalty ( linear ) for indels tau = 1 # reward for matches # holds the number of substitutions between versions of the two strings edit _ mat = np. zeros ( ( m + 1, n + 1 ), dtype ...
[ 0.540726363658905, -0.7730556130409241, 1.032538652420044, -0.43944936990737915, -0.35485363006591797, -0.9071874618530273, 0.4423427879810333, -0.2986566424369812, -0.39141348004341125, 1.1473881006240845, 0.2957257926464081, 0.4719226360321045, -0.537123441696167, -0.76030433177948, 0....
def test _ singleton ( self ) : if hardwarethread. _ hardwarethread _ _ singleton is not none : hardwarethread. _ drop ( ) self. assertisnone ( hardwarethread. _ hardwarethread _ _ singleton ) instance _ 1 = hardwarethread ( ) instance _ 2 = hardwarethread ( ) self. assertisnotnone ( hardwarethread. _ hardwarethread _ ...
[ -0.5131385922431946, 0.154315784573555, 0.6101921200752258, -0.6253278255462646, 1.5080316066741943, 0.5886111259460449, 0.5235693454742432, 0.42213600873947144, 0.8027703166007996, -0.4415324032306671, -0.9476847052574158, 0.5114428997039795, -0.7845916748046875, 0.07794001698493958, 0....
def interactive ( self ) : self. _ raise ( )
[ 1.0266430377960205, 0.41816553473472595, 0.32182368636131287, 0.5231015086174011, 0.11508467048406601, -0.04611259698867798, 1.222102165222168, -0.18713434040546417, -0.3793685734272003, -0.4283316433429718, 0.3952856957912445, 0.6479653716087341, -1.0217626094818115, -0.4960356056690216, ...
def solve _ locations ( instance, locations, max _ time ) : # instantiate the data problem. data = dataproblem ( instance, locations ) model _ parameters = pywrapcp. routingmodel. defaultmodelparameters ( ) # create routing model routing = pywrapcp. routingmodel ( data. num _ locations, data. num _ vehicles, data. depo...
[ -0.5353866219520569, 0.10506869852542877, 0.802266001701355, -0.7602350115776062, 0.5212684273719788, -0.28342458605766296, -0.22422336041927338, 0.7551221251487732, -0.5037536025047302, 0.46487957239151, -0.3446575999259949, -0.6421130895614624, 0.16680070757865906, 0.09998352825641632, ...
def get _ cords ( self ) : return ( self. _ _ x _ cord, self. _ _ y _ cord )
[ -0.974797785282135, -1.0452399253845215, 0.839024543762207, -0.22578366100788116, 0.238320454955101, 0.23107083141803741, -0.7144381999969482, -1.1341439485549927, -0.02847776934504509, -0.06235983222723007, -0.23320971429347992, 0.42619478702545166, -0.31211918592453003, -0.19564630091190...
def is _ iterable ( obj ) : has _ iter = hasattr ( obj, " _ _ iter _ _ " ) has _ get _ item = hasattr ( obj, " _ _ getitem _ _ " ) return has _ iter or has _ get _ item
[ -0.5422578454017639, -0.25399526953697205, 0.790607213973999, 0.3157883286476135, 0.15141956508159637, -0.017157118767499924, 0.19886109232902527, -0.22530332207679749, -0.07530435174703598, 0.18967227637767792, -0.27476200461387634, -0.3466787040233612, 0.40668854117393494, 1.077540040016...
def compute _ jump _ points ( mtx _ lag, npoints ) : nn = [ ] # strongest repetition lag value, be careful to fold it mm = [ ] # the mean distance of the chunk at each lag values in nn mtx _ lag [ :, : 4 ] = np. max ( mtx _ lag ) # avoiding any very short delay repetitions, why 4 samples? arbit choice but going to work...
[ 0.1811346411705017, -0.37688148021698, 0.4361928403377533, 0.1034427359700203, -0.44251570105552673, -0.2358354926109314, -0.1943700909614563, 0.47429734468460083, 0.0423576757311821, 1.132533311843872, 0.2665540277957916, 0.28803279995918274, 0.6187777519226074, -0.1811147928237915, 0.3...
async def _ start ( self, ctx, size : int ) : shuffle ( self. registered _ users ) chunks = [ self. registered _ users [ x : x + size ] for x in range ( 0, len ( self. registered _ users ), size ) ] groups _ strs = [ ] for groups in chunks : group = [ ] for user in groups : user = await self. bot. get _ user _ info ( u...
[ -0.16260327398777008, 0.9316868185997009, 0.5175631046295166, -0.47254401445388794, 1.0428239107131958, -0.24511407315731049, 0.27362412214279175, 0.2729657292366028, -0.20136398077011108, -0.14286591112613678, 0.10449814796447754, 2.2665817737579346, -0.7843798995018005, 0.178305923938751...
def load _ deps ( self ) : package _ xml = os. path. join ( self. path, " package. xml " ) if os. path. exists ( package _ xml ) : xml _ root = qisys. qixml. read ( package _ xml ) qibuild. deps. read _ deps _ from _ xml ( self, xml _ root )
[ 0.0004927879199385643, -0.2616232931613922, 0.4296995997428894, -0.7086851000785828, 0.01230109017342329, 0.5698527097702026, -0.2749047577381134, -0.28251421451568604, 0.5888988971710205, -0.7421051859855652, -0.02978779561817646, -0.40853890776634216, 0.3033021092414856, -0.0682657733559...
def synth _ coeffs ( self, time, *, nmax = none, deriv = none, extrapolate = none ) : dim = none if nmax is none else int ( nmax * ( nmax + 2 ) ) coeffs = super ( ). synth _ coeffs ( time, dim = dim, deriv = deriv, extrapolate = extrapolate ) return coeffs
[ -0.14246180653572083, 0.456484854221344, 0.5778166651725769, 0.6136890649795532, -0.7355983257293701, -1.1378346681594849, -0.4797949492931366, -0.790558934211731, -0.019805865362286568, -0.4221917688846588, -1.4325648546218872, 0.14277777075767517, 0.8903403878211975, -0.10309228301048279...
def get _ requests _ by _ tid _ uid _ sid ( self, tid : int, uid : int, sid : int ) - > list [ request ] : requests = [ ] data = self. get _ data ('''select * from request where tid = % s and uid = % s and sid = % s order by create _ date'' ', ( tid, uid, sid ) ) for request in data : requests. append ( request ( reque...
[ -0.18511538207530975, -0.32494956254959106, 0.40356841683387756, 0.6256617307662964, 0.9893437027931213, -0.3975411653518677, -1.3421146869659424, -1.2714463472366333, -0.3293476700782776, 0.48645439743995667, 0.31905317306518555, 0.7666754722595215, 0.20773589611053467, -0.372884869575500...
def find _ coordination ( network, nodes = none ) : am = dict _ to _ am ( network ) z = am. getnnz ( axis = 1 ) if nodes is none : return z else : return z [ np. array ( nodes ) ]
[ -0.2986602187156677, -0.011843059211969376, 0.20739230513572693, 0.8207889795303345, 0.31951776146888733, -0.9576424360275269, 0.3968498706817627, -0.13495472073554993, 0.0579400509595871, 0.6607276201248169, 0.8288847804069519, -0.513241708278656, -0.24561917781829834, -0.1031170040369033...
def encodingblock ( self, x, filter _ size, block, num = 1, max _ pooling = true ) : type ='encoding'x = zeropadding2d ( padding = ( self. pad, self. pad ), name ='{ } _ block { } _ zpad { } '. format ( type, block, num ) ) ( x ) x = convolution2d ( filter _ size, self. kernel, self. kernel, w _ regularizer = l2 ( self...
[ -0.21936491131782532, 0.344662606716156, 0.8515608310699463, 0.7467410564422607, -1.2600274085998535, 0.013143498450517654, 0.2450825721025467, -0.2923140525817871, 0.21089032292366028, -0.08365857601165771, -0.6875510215759277, 1.1587834358215332, -0.07406828552484512, 0.06559701263904572...
async def async _ step _ user ( self, user _ input : dict | none = none ) - > flowresult : await self. async _ set _ unique _ id ( domain ) if ( self. source! = config _ entries. source _ reauth and self. _ async _ current _ entries ( ) ) : return self. async _ abort ( reason = " single _ instance _ allowed " ) return ...
[ -0.7984405159950256, 1.2474082708358765, 0.1905440092086792, 1.117101788520813, 0.06505049020051956, 0.40532541275024414, 1.1803449392318726, 0.2829400599002838, 0.7290574908256531, -0.3565894365310669, -0.26813024282455444, 0.8817331790924072, -0.011071433313190937, 0.3014293611049652, ...
def test _ rununtilfailureforcegcdecorate ( self ) : decorated = [ ] def decorate ( test, interface ) : decorated. append ( ( test, interface ) ) return test self. patch ( unittest, " decorate ", decorate ) self. runner. _ forcegarbagecollection = true result = self. runner. rununtilfailure ( self. test ) self. asserte...
[ -0.5035658478736877, 1.11669921875, 0.3746015429496765, 0.5037903189659119, 0.8622811436653137, 0.5315466523170471, -0.108845554292202, -0.5750908851623535, 0.20456409454345703, -0.0626341849565506, -0.8396233916282654, 0.5864055156707764, -0.7688077092170715, 0.7110925912857056, 0.93819...
def eval _ sent _ rep _ auto _ encoder ( l _ sent _ l _ word _ embed ) : l _ sent _ test = [ [ embedding _ matrix _ q [ wordindex ] for wordindex in sentence ] for sentence in l _ tok _ pad _ test _ q _ sel ] l _ sent _ hidden _ rep = model _ encoder2. predict ( asarray ( l _ sent _ test ) ) [ 0 ] l _ sent _ hidden _ r...
[ -0.4683510959148407, -0.7390687465667725, 0.5457960367202759, -0.25140759348869324, -0.6472002267837524, 0.15830260515213013, 0.5701568126678467, 0.3028876781463623, -0.1788741797208786, 1.382132887840271, -1.182686448097229, 0.9220362305641174, 0.0018896778346970677, 0.8069204688072205, ...
def autoencode _ queries ( l _ tok _ pad _ q, textonly = false ) : # run auto encoder if textonly : reconstructed _ embed _ queries = model _ auto _ encoder _ textonly. predict ( l _ tok _ pad _ q ). tolist ( ) else : reconstructed _ embed _ queries = model _ auto _ encoder _ vqa. predict ( l _ tok _ pad _ q ). tolist ...
[ 0.04540897533297539, -0.4685801863670349, 0.5715556740760803, 0.16977789998054504, -0.7798084616661072, 0.24188943207263947, -0.01656985469162464, 0.6267568469047546, 0.5172817707061768, 0.536724328994751, -0.3253261148929596, 0.29713764786720276, -0.031005091965198517, 0.8659300208091736,...
def setup ( bot ) - > none : bot. add _ cog ( fun ( bot ) )
[ 0.22545120120048523, 1.0420000553131104, 0.3943119943141937, 0.5204495191574097, 0.8871012926101685, -0.2821158766746521, -0.08960240334272385, 0.5092285871505737, -0.0723617672920227, 0.5124913454055786, -0.7453411817550659, 0.37922218441963196, 0.0708494558930397, 0.7982563972473145, -...
def test _ 01 _ buildsched ( self ) : l _ riseset = mock. riseset ( ) l _ delay, l _ list = scheduleutility. find _ next _ scheduled _ events ( self. m _ pyhouse _ obj, t _ today ) l _ now _ sec = convert. datetime _ to _ seconds ( t _ today ) l _ obj = self. m _ pyhouse _ obj. house. schedules [ 0 ] l _ sched _ sec = ...
[ -0.381558358669281, -0.05849173665046692, 0.55727219581604, 0.5434228777885437, 0.382750540971756, 0.15690135955810547, -0.20083726942539215, 0.5656647086143494, -0.1604548841714859, -0.812056303024292, -0.7326401472091675, -0.26349014043807983, 0.11243802309036255, 0.21534739434719086, ...
def next _ batch _ single _ thread ( self, batch _ size, dataset, preprocessing _ fn = none, features _ to _ pad _ mask = none, concat _ features = false, multiple _ examples = 1, cache _ preprocessed = false ) : lengths, feature _ list = [ ], [ ] mult _ filenames = [ self. _ get _ next _ filenames ( batch _ size, data...
[ -0.36008548736572266, 0.6223979592323303, 0.8717789053916931, 0.7398149967193604, -0.26126226782798767, -0.3425619304180145, 0.8203243017196655, 1.1025646924972534, -0.012651948258280754, -0.09992547333240509, -0.1521281749010086, 0.05755336955189705, -0.019025513902306557, 0.8925831317901...
def gamewithdocstring ( self, x ) : if type ( x ) is int : if x % 15 = = 0 : return " fizzbuzz " elif x % 3 = = 0 : return " fizz " elif x % 5 = = 0 : return " buzz " else : return x else : raise typeerror ( " error " )
[ -0.06730423122644424, 0.21510006487369537, 0.6910458207130432, -0.45202088356018066, -0.8701388239860535, 0.9269442558288574, -0.24815058708190918, -1.4718774557113647, 0.9921638369560242, 0.19742949306964874, 0.4783749282360077, -0.5737292766571045, -0.6037688851356506, 0.1786809265613556...
def startcdatasection ( self ) : self. in _ cdata = true
[ 0.2692410945892334, 0.09469307214021683, 0.3682331442832947, -0.24859701097011566, -0.36840561032295227, 1.4898970127105713, 0.5360164046287537, 0.7741141319274902, -1.055708885192871, -0.6426104307174683, -0.5395951271057129, 1.4984947443008423, 0.29050126671791077, 0.67877197265625, -0...
def _ index ( self, element _ name, key, value ) : # todo type check type, eid = element _ name. split (':') [ 1 : ] self. redis. sadd ('{ } : i : { } : { } '. format ( self. name, type, key ), eid ) self. redis. sadd ('{ } : i : { } : { } : { } '. format ( self. name, type, key, value ), eid )
[ -1.0812740325927734, -0.1526605635881424, 0.4967823326587677, -0.7766686677932739, 0.11475101113319397, 0.5223798155784607, -0.18273460865020752, 0.48711034655570984, 0.32152417302131653, 1.3415939807891846, -0.36831551790237427, 0.11110208183526993, -0.3148874342441559, -0.061346728354692...
def reverse _ string ( input _ string ) : try : if input _ string is not none : if len ( input _ string ) < = 1 : return input _ string else : reversed _ string = " " reversed _ string + = input _ string [ - 1 ] + reverse _ string ( input _ string [ : - 1 ] ) return reversed _ string else : return none except typeerror...
[ -0.4166404902935028, 0.2300601452589035, 0.5369423627853394, 0.6992130279541016, 0.24143366515636444, -0.4053764343261719, -0.05628754571080208, -0.14672723412513733, 0.027756445109844208, -0.33819472789764404, 0.7264360785484314, 1.1943459510803223, -1.147725224494934, -1.1616075038909912...
def get _ config ( self, setting = false, env = none, require = true, what ='dependency ', type = none ) : assert type in ( none, list ), " % s not supported for type " % type if env is none : env = setting assert setting or env value = none if not setting is false : value = self. ctx. get ( setting, none ) if value is...
[ -1.1203163862228394, 0.14864978194236755, 0.6617565751075745, 0.09825845807790756, -0.06080625206232071, -0.6192571520805359, -0.7370395064353943, -0.24775895476341248, 0.04219641909003258, 0.853376030921936, 0.42885786294937134, 0.40175116062164307, -0.05346222221851349, 0.579974710941314...
def _ simulate ( self, setting, pack ) : if isinstance ( pack, bool ) : return self. monte _ carlo ( pack, * setting ) option, exercise, style, * strikes, times, info, moments = pack if not isinstance ( times, int ) or times < = 0 : raise valueerror ('number of simulations must be positive int.') def early _ exercise (...
[ -0.048871371895074844, 0.6939788460731506, 0.8216942548751831, 0.4937865734100342, -0.41200345754623413, -0.19094809889793396, 1.1672724485397339, -0.8693166375160217, 0.33864912390708923, 0.310459166765213, 0.32167765498161316, -0.004422750789672136, -0.5427146553993225, -0.04770815372467...
def index ( request ) : # date format to get todays games from gameline model todays _ date = datetime. datetime. now ( pytz. timezone ('america / los _ angeles') ) date _ la = todays _ date. strftime ('% b % - d, % y') all _ games = mlbgameline. objects. all ( ) profiles = userprofile. objects. all ( ) context = {'pro...
[ 0.3275696337223053, 0.2654503881931305, 0.6476513147354126, 0.18049746751785278, 0.4386487901210785, 1.0067086219787598, -0.16749370098114014, -0.5256403088569641, -1.1768882274627686, 0.09465491026639938, 0.6239990592002869, -0.17470726370811462, 0.49581530690193176, -0.16116663813591003,...
def abs _ pl _ 2 _ bb ( bounding _ boxes, abs _ pl ) : x, y, w, h = tf. split ( bounding _ boxes, 4, axis = 1 ) x _ center, y _ center = tf. split ( abs _ pl, 2, axis = 1 ) # abs _ w = w * 0. 33 # abs _ h = h * 0. 33 abs _ w = tf. ones _ like ( w ) * 0. 33 * tf. maximum ( w, h ) abs _ h = tf. ones _ like ( h ) * 0. 33 ...
[ -0.11758242547512054, -0.7916647791862488, 0.8915903568267822, 0.36647486686706543, -0.24958345293998718, 0.9060288071632385, -0.2340419590473175, 0.4239002466201782, -0.509235680103302, 0.4924246370792389, -0.09574632346630096, 0.46096542477607727, 0.24663643538951874, -0.3364242613315582...
def top _ files ( query, files, idfs, n ) : # successfully implemented files _ score = list ( ) for file in files : netscore = 0 for word in query : try : tfidf = tf ( word, files [ file ] ) * idfs [ word ] netscore + = tfidf except keyerror : pass files _ score. append ( ( file, netscore ) ) desc _ files _ score = sor...
[ -0.44627466797828674, 0.16705699265003204, 0.42412543296813965, -0.2250639647245407, 0.2269165962934494, -0.22267483174800873, -0.09463293850421906, -0.014283932745456696, -0.5012437105178833, 0.9322901964187622, 0.5213599801063538, -0.7393110990524292, -0.24685712158679962, 0.565771520137...
def _ is _ admin ( self, bot : bot, user _ id : int ) - > bool : chat _ member = bot. get _ chat _ member ( self. config. group _ id, user _ id ) return chat _ member. status in ['creator ','admin']
[ 0.16832482814788818, 0.17636582255363464, -0.0419645793735981, 0.8160926699638367, -0.4831731915473938, 0.734971821308136, -1.532191276550293, -0.9852900505065918, -0.8365814685821533, 0.032752491533756256, -0.0786813497543335, 1.6672649383544922, -0.3130093514919281, 1.33115553855896, -...
def test _ sound _ speed ( ) : f0 = tab. q ['cs2'] ( x, y ) f1 = tab. q ['cs2 _ check'] ( x, y ) np. testing. assert _ allclose ( f0, f1 )
[ 0.8530845046043396, -0.5103963017463684, 0.28810930252075195, 0.9065704345703125, 0.2489558756351471, 0.7972472906112671, 0.10298386961221695, -1.5452414751052856, -0.7876794338226318, -0.9038143754005432, 0.07329928129911423, 0.3760221004486084, 0.016362546011805534, 0.5873159766197205, ...
def wildcards ( self ) - > list : return self. _ wildcards
[ -0.20125868916511536, -0.39482253789901733, 0.16825392842292786, 0.7471672296524048, 0.09259504824876785, 0.7633135318756104, -0.889784574508667, 0.8072212934494019, 0.9423086643218994, -0.6263632774353027, -0.8759940266609192, 1.1771023273468018, -0.02789853885769844, -0.22265884280204773...
def install ( self, erase _ influxdb = false, drop _ database = false ) : log, barreleye _ instance = init _ env ( self. _ bcc _ config _ fpath, self. _ bcc _ logdir, self. _ bcc _ log _ to _ file ) cmd _ general. check _ argument _ bool ( log, " erase _ influxdb ", erase _ influxdb ) cmd _ general. check _ argument _ ...
[ 0.3588300347328186, -0.09681232273578644, 0.5538637638092041, 0.12030266970396042, 1.5671404600143433, -0.08853191882371902, 0.3510567843914032, 0.43410342931747437, -0.5504468679428101, 0.8634278774261475, 0.2417980283498764, 0.713121235370636, -0.9191365838050842, 0.22475898265838623, ...
def adapt ( f, x, y, tau, h _ min ) : mid = midpoint _ rule ( f, x, y ) new _ midpoint _ x = ( x [ 1 ] + x [ 0 ] ) / 2 new _ midpoint _ y = ( y [ 1 ] + y [ 0 ] ) / 2 mid2 = midpoint _ rule ( f, ( x [ 0 ], new _ midpoint _ x ), ( y [ 0 ], new _ midpoint _ y ) ) + \ midpoint _ rule ( f, ( x [ 0 ], new _ midpoint _ x ), (...
[ 0.596225917339325, -0.7061795592308044, 0.84874027967453, 0.009919113479554653, -0.8493869304656982, -0.5537616610527039, -0.37036171555519104, -0.8623883724212646, -0.528764009475708, 0.14793357253074646, 0.9286766052246094, 0.25579074025154114, 0.3623288571834564, -0.13332031667232513, ...
def transform _ date _ checkout ( start _ date : type [ datetime ], end _ date : type [ datetime ] ) - > str : result = relativedelta. relativedelta ( end _ date, start _ date ) msg : str = " " if result. hours > = 1 : hours = " hours " if result. hours = = 1 : hours = " hour " msg + = f " { result. hours } { hours }, ...
[ -0.3083023428916931, 0.13343045115470886, 0.917074978351593, -0.3991900086402893, -0.14911295473575592, -0.03773588314652443, -0.6497364640235901, -0.5858364105224609, -0.3237476348876953, 1.3877205848693848, 0.13636259734630585, 0.2830265462398529, 0.26175132393836975, 0.07913714647293091...
def foreach ( self, function, * * executor _ config ) - > none : for _ in self. map ( lambda item : function ( item ) or true, * * executor _ config ) : pass
[ -0.2670532166957855, 0.43305066227912903, 0.3634106516838074, 0.4712243676185608, 0.8888387084007263, -0.4648762047290802, -0.432818204164505, 0.9678456783294678, -0.7658126950263977, 0.4961285889148712, -0.6690860390663147, -0.035329241305589676, 0.7892702221870422, 1.0952129364013672, ...
def evalderiv ( self, src, mesh, time _ mesh, f, v, adjoint = false ) : p = self. getp ( mesh, time _ mesh, f ) if not adjoint : return p * v elif adjoint : # dp _ df _ t = p. t * v # [ src, self ] # newshape = ( len ( dp _ df _ t ) / time _ mesh. nn, time _ mesh. nn ) return p. t * v # np. reshape ( dp _ df _ t, newsh...
[ -0.04864277318120003, 0.7904565930366516, 0.5559425950050354, -0.5978260636329651, 0.45137009024620056, 0.3347683250904083, -0.39881739020347595, 0.7897331118583679, -0.6052616238594055, 0.31222620606422424, 0.29324546456336975, -0.1514786034822464, -0.9482695460319519, 0.13478414714336395...
def generate _ monster ( types : list, descriptions : list ) - > dict : monster = {'name': random. choice ( types ),'description': random. choice ( descriptions ),'hp': 5,'max _ hp': 5,'hit _ die': 6 } return monster
[ -0.5292437672615051, 0.13095742464065552, 0.617692768573761, -0.8241338729858398, 0.2622642517089844, 0.3381185531616211, -1.29544198513031, 0.31783223152160645, -1.3041449785232544, 0.5959864854812622, -1.1606189012527466, -0.05590115860104561, -0.5297920107841492, 0.6759771108627319, 0...
def log ( self, epoch, cycle, stats ) : print ('# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #') print ('epoch : { } '. format ( epoch ) ) print ('cycle : { } '. format ( cycle ) ) _ = [ print ('{ } : { } '. format ( k, v ) ) for k, v in stats. items ( ) ] summary _ list = [ tf. summary. valu...
[ -0.11115016043186188, 0.387927383184433, 0.7439931035041809, -0.19444957375526428, 0.09402447193861008, 0.5431727766990662, 0.3785709738731384, -0.03433873504400253, -1.0544689893722534, 0.47121185064315796, -0.7656683921813965, 0.5766927599906921, 0.6130077242851257, 0.49931374192237854, ...
def _ is _ debit ( self, transaction ) : # pylint : disable = no - member if ('view'in self. context and hasattr ( self. context ['view'],'organization') ) : return transaction. is _ debit ( self. context ['view']. organization ) return false
[ -0.24740365147590637, 0.8226649761199951, 0.6320608258247375, 0.08308164030313492, -0.057882361114025116, 0.2884305715560913, 0.11257646977901459, -1.223388910293579, 0.5948209762573242, -0.0025668544694781303, 0.27505749464035034, 0.259700745344162, -0.06434459239244461, 0.931471526622772...
def main ( ) : # get the arguments from the commandline args = create _ parser ( ). parse _ args ( ) # gather all tasks tasks = list ( taskwarrior _ kanban. gather _ tasks ( args. taskwarrior _ args ) ) # create the main windows main = mainwindow ( ) # create the four sub - windows main. create _ windows ( ) # set a se...
[ 0.003358887042850256, -0.30924391746520996, 0.960529625415802, 1.0245248079299927, -0.10075938701629639, 0.1442529857158661, 1.0724589824676514, 0.021265005692839622, -0.40778204798698425, -0.2671891152858734, -0.036085210740566254, 0.2357778400182724, -0.12729625403881073, 0.3282097876071...
def _ _ init _ _ ( _ _ self _ _, resource _ name : str, args : networkpacketcaptureargs, opts : optional [ pulumi. resourceoptions ] = none ) :...
[ -0.26967400312423706, 0.31877100467681885, 0.35309159755706787, 0.2169709950685501, -0.7755861878395081, 0.16429394483566284, -0.579435408115387, -0.4798172414302826, 1.1423982381820679, -0.3022957444190979, -0.6106506586074829, 0.047042813152074814, 0.3527786433696747, 0.00955028273165226...
def with _ data ( self, x : pd. dataframe ) - > " parammeta " : pass
[ -0.7520641684532166, 0.5834829807281494, 0.23573710024356842, -0.3854841887950897, 0.14111919701099396, -0.06096842512488365, -0.8428903818130493, -0.5830714106559753, 0.1475158929824829, -0.75136798620224, -0.13150820136070251, 0.9738231301307678, 1.001081109046936, 0.04690011590719223, ...
def now _ as _ id ( ) : return ( ( time _ now ( ) * 1000. ) - discord _ epoch ). _ _ int _ _ ( ) < < 22
[ 0.2509002089500427, -0.4190887212753296, 0.5520752668380737, -0.8551847338676453, 0.10375270992517471, 0.05684894695878029, -0.5061028003692627, 0.17793042957782745, -0.22857989370822906, 0.4210389256477356, -0.5366112589836121, 0.9056198000907898, -0.1910390555858612, 0.24682264029979706,...
def oncanvasconfigure ( self, event ) - > none : self. canvas. configure ( scrollregion = self. canvas. bbox ( " all " ) )
[ 1.275615930557251, 0.13423112034797668, 0.6330168843269348, -0.06305791437625885, -0.24131746590137482, 0.163643017411232, 0.05586717650294304, -0.7615538239479065, 0.12194177508354187, -0.9681618809700012, -0.5376356840133667, 0.3509474992752075, 0.7690224051475525, 1.1450783014297485, ...
def process _ multiple ( self, gstate, iterations, dropout _ masks = ellipsis ) : if dropout _ masks is ellipsis : dropout _ masks = none append _ masks = false else : append _ masks = true def _ scan _ step ( cur _ node _ states, node _ strengths, node _ ids, edge _ strengths, * dmasks ) : curstate = graphstate ( node...
[ -0.6864336133003235, 0.5223914384841919, 0.7880911231040955, 0.5338453054428101, -0.40005508065223694, -0.35201510787010193, 0.5211381316184998, -0.8938698768615723, 0.10160627216100693, 0.27887776494026184, -0.17528459429740906, -0.1859966516494751, -0.10438647121191025, 0.194576337933540...
def run ( self ) : self. ui. run ( self )
[ -0.21987676620483398, -0.6498404741287231, 0.06033259257674217, 0.6654707789421082, 0.7923629879951477, 0.85511714220047, 1.2166671752929688, 0.2993904948234558, -0.0377516932785511, -1.2835029363632202, -0.2682303488254547, 0.5232798457145691, -0.7507861256599426, 0.8599585890769958, -0...
def all _ coordinates ( cls, precision ='1m ', index = none ) : # get the search object s = cls. search ( ) # parse the indices if index is not none : s = s. index ( ) s = s. index ( index. split ( ',') ) # aggregate, catch the agg object s. aggs. bucket ('coordinates ','geohash _ grid ', field ='coordinates ', precisi...
[ -0.11294139921665192, 1.2667979001998901, 0.8181532025337219, 0.8101169466972351, 0.6335731744766235, -0.08712138235569, -0.40925171971321106, -0.1248212605714798, -0.41638264060020447, -0.5638979077339172, 0.7694742679595947, -0.6182593703269958, -0.2010156512260437, -0.9661930799484253, ...
def clean _ old _ password ( self ) : old _ password = self. cleaned _ data [ " old _ password " ] if not self. user. check _ password ( old _ password ) : raise validationerror ( self. error _ messages ['password _ incorrect'], code ='password _ incorrect ', ) return old _ password
[ 0.5901905298233032, -0.46684232354164124, 0.548899233341217, 0.5395609736442566, 0.3064426779747009, 0.3865026533603668, 0.063516765832901, 0.15539278090000153, -0.06498315930366516, 0.5440537333488464, 0.7914912104606628, 0.5167783498764038, 0.08984006196260452, 1.0189698934555054, -0.2...
def type ( self ) - > str : return pulumi. get ( self, " type " )
[ 0.8003926277160645, 0.8377370238304138, 0.29941272735595703, 0.568932056427002, 1.4956936836242676, 1.2456002235412598, -0.08049681037664413, -0.5250646471977234, 0.6882314085960388, 0.22470416128635406, 0.617591142654419, 0.864101767539978, -0.22339650988578796, -1.0697098970413208, -0....
def _ getfailures ( self, result ) : return len ( result. _ originalreporter. failures )
[ -0.3279440402984619, 0.5277356505393982, 0.2631501257419586, -0.5077574849128723, -0.22147627174854279, -0.6521243453025818, 0.5300511121749878, 0.4608422815799713, -0.31152579188346863, -1.62076735496521, -1.3077925443649292, -1.200801968574524, -0.6739205121994019, 0.004626445937901735, ...
def test _ mac _ vendor _ lookup _ exception ( self ) : mac ='b8 : 27 : eb : 00 : 00 : 00'device = device _ tracker. device ( self. hass, timedelta ( seconds = 180 ), true,'test ', mac,'test name') with mock _ aiohttp _ client ( ) as aioclient _ mock : aioclient _ mock. get ('http : / / api. macvendors. com / b8 : 27 :...
[ -0.5567490458488464, 0.6593030095100403, 0.48180511593818665, -0.18071067333221436, -0.01757477968931198, 0.36620214581489563, 0.0008522285497747362, 0.2679751217365265, -0.2321351319551468, 0.0828440859913826, 0.003265242325142026, 0.17458045482635498, 0.2690020799636841, 0.10431842505931...
def encode ( self, s ) : x = np. zeros ( ( len ( s ), len ( self. chars ) ) ) for i, c in enumerate ( s ) : x [ i, self. char _ to _ idx [ c ] ] = 1 return x
[ -1.0538820028305054, -0.15450245141983032, 0.25268179178237915, -0.5260291695594788, 0.3280249834060669, -0.4776913523674011, 0.38008272647857666, -0.3843579590320587, 0.817479133605957, 0.16756153106689453, -0.9996694922447205, 1.3210135698318481, -0.5254763960838318, -0.6267015337944031,...
def test _ save _ ico _ sphere ( self ) : ico _ sphere _ mesh = ico _ sphere ( level = 3 ) glb = data _ dir / " ico _ sphere. glb " _ write ( ico _ sphere _ mesh, glb ) # reload the ico _ sphere device = torch. device ( " cuda : 0 " ) mesh _ reload = _ load ( glb, device = device, include _ textures = false ) self. ass...
[ -0.26626303791999817, 0.30671483278274536, 0.4907378852367401, 0.4135012626647949, 0.8435122966766357, 1.1080800294876099, 1.1111116409301758, -0.3217064440250397, 0.27863532304763794, 0.6652173399925232, -1.4619426727294922, 0.006070065312087536, -1.1690924167633057, -0.4192066490650177, ...
def test _ filter _ jobs _ by _ job _ type ( self ) : job _ post _ 1 = create _ job ( title = " job a ", category = job _ category _ choices. design, company = self. test _ company, job _ type = job _ type _ choices. full _ time ) response = self. client. get ( reverse ('jobs : jobs - home'), {'job _ type': job _ type ...
[ 0.17505067586898804, 0.5987130403518677, 0.49141013622283936, 0.2051151692867279, 0.9338476061820984, 0.3043234944343567, 0.24662567675113678, -0.4560753107070923, -0.18771494925022125, -0.3366614878177643, 0.009098492562770844, 0.022414950653910637, -0.3123156428337097, 0.1724311709403991...
def renderdistsample ( self, imgsurface ) : print " render { 0 } dist samples to the image ". format ( len ( self. mdistsamples ) ) ; freecolor = ( 0, 0, 250 ) ; obstcolor = ( 200, 0, 100 ) ; for samp in self. mdistsamples : if samp. mradius > 0 : # free sample pygame. draw. circle ( imgsurface, freecolor, ( int ( samp...
[ -0.8850087523460388, -0.11615854501724243, 0.5079143047332764, -1.1654152870178223, -0.7109019160270691, 0.44879963994026184, 0.6629624366760254, 0.07302090525627136, 1.0419443845748901, 0.5776255130767822, 0.48303523659706116, 0.18562334775924683, -0.22478081285953522, 0.9924601912498474,...
def remove _ multiple _ line _ comments ( line ) : global g _ in _ multiple _ line _ comments start _ comment _ index = none end _ comment _ index = none for i in range ( len ( line ) - 1 ) : if not g _ in _ multiple _ line _ comments : if line [ i ] = ='/': # check for inline command'/ /'if line [ i + 1 ] = ='/': line...
[ 0.2316896766424179, -0.5961534976959229, 1.1614365577697754, 0.23188988864421844, -0.13331006467342377, -0.04969574511051178, 0.3388274610042572, 0.6319506764411926, -0.2969413995742798, 0.2022773176431656, 0.08971817046403885, -0.07930338382720947, -0.33411234617233276, 0.2215543538331985...
def samplewithdistribution ( p ) : r = random. random ( ) # rational number between 0 and 1 # print ('p : ', type ( p ) ) for i in range ( len ( p ) ) : r = r - p [ i ] # print ('p [ i ] : ', type ( p [ i ] ) ) if r < = 0 : return i return 0 # i don't know how to solve here
[ -0.13836416602134705, -0.9500331878662109, 0.5591217279434204, -0.06350933760404587, -0.4831644296646118, 0.7384498119354248, 0.3451387882232666, 0.456190824508667, 1.053770661354065, -0.4030071496963501, 0.35670021176338196, -0.2396596223115921, -0.9062344431877136, 0.34583428502082825, ...
def calc _ sales _ tax ( cls, amt, rate ) : tax = {'pct': 0,'amt': 0. 0,'name':'sales tax ','value': 0,'unit':'pct'} if rate : tax ['taxable _ amt'] = amt tax ['pct'] = rate tax ['value'] = rate tax ['amt'] = helper. round _ off ( ( amt * rate ) / 100 ) return tax
[ 0.8734176754951477, -0.24193046987056732, 0.375577449798584, -0.28250718116760254, -0.9519323706626892, -0.4629572927951813, -0.3490816652774811, -0.4354768693447113, -0.5900598168373108, -0.16655324399471283, -0.2419651299715042, 0.08163335919380188, 0.489129900932312, -0.2861999571323395...
def daq ( self, seq = res + trg + tok, runtime = 10, period = 2000, verbose = false ) : if self. module. issingleroc ( ) : self. daq _ select _ deser160 ( self. deseradjust ) # no idea why we need this cmdlist = [ ] if ( seq & dtb. res ) > 0 : cmdlist. append ( dtb. pg _ resr + self. trc ) if ( seq & dtb. cal ) > 0 : c...
[ -1.1831707954406738, -0.014210671186447144, 0.7735766768455505, -0.029163459315896034, -0.49243107438087463, -0.578372597694397, 0.005091872066259384, 0.302505224943161, 0.07485729455947876, -0.39072516560554504, 0.030391136184334755, -0.44735053181648254, -0.11417751759290695, 0.306388318...
def _ _ call _ _ ( self, value : t. any ) - > t. optional [ str ] : if isinstance ( value, str ) and value. strip ( ) = ='' : ret ='' else : # none has to go through or the add - on columns will complain.. stringified _ value = str ( value ) if value is not none else none ret = str ( self. validate _ and _ format _ val...
[ -0.15061143040657043, -0.5330947637557983, 0.5453378558158875, -0.3777727782726288, -0.6615659594535828, 0.01135050319135189, -0.8997370004653931, -0.790740430355072, 0.7437899112701416, 0.43401509523391724, 1.198866844177246, 0.3009038269519806, -0.09365729987621307, 0.950748860836029, ...
def users _ put ( user _ id ) : put _ user = storage. get ( " user ", user _ id ) if put _ user is none : abort ( 404 ) obj = request. get _ json ( silent = true ) if obj is none : return " not a json ", 400 for key, value in obj. items ( ) : if key in [ " id ", " created _ at ", " updated _ at ", " email " ] : continu...
[ -1.710731863975525, -0.3489360809326172, 0.8075618147850037, -0.23830565810203552, -0.48563626408576965, -0.369567334651947, 0.21343651413917542, -0.7775835990905762, -0.1916390061378479, 0.48258814215660095, -0.8857256770133972, -0.01545593049377203, -0.14760451018810272, 0.09020751714706...