text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def test _ destroy _ alumno _ curso _ admin ( self ) : self. client. force _ authenticate ( user = self. user _ admin ) response = self. client. delete ( f " / api / alumnos / curso / { self. curso _ 1. id } / " ) self. assertequal ( response. status _ code, status. http _ 200 _ ok ) response = self. client. get ( " / ... | [
0.18367253243923187,
0.018814219161868095,
0.37985140085220337,
0.03659282252192497,
0.62823486328125,
0.78389972448349,
0.09455576539039612,
0.3051011860370636,
0.21046486496925354,
0.29294353723526,
-1.1464186906814575,
1.2209899425506592,
0.11620356142520905,
0.2944077253341675,
0.654... |
def start _ component ( name ) : # for each require in the component info for require in _ component _ info [ name ] ['requires'] : # if the require is not optional if not require [ 2 ] : # if the require is not satisfied # stop the process because some requires are missing if not get _ best _ service _ provider ( requ... | [
-0.2570020854473114,
-1.189942717552185,
0.9603868722915649,
-0.7050003409385681,
-0.03127487376332283,
0.9229413866996765,
0.10473186522722244,
0.43125203251838684,
-0.04005636274814606,
-0.1188582330942154,
-0.5304356813430786,
-0.10279861837625504,
0.014020068570971489,
0.19106498360633... |
def flatten ( self, tensor ) : with tf. name _ scope ('batch _ flatten') : if self. _ batch _ dims = = 1 : return tensor self. _ original _ tensor _ shape = composite. shape ( tensor ) if tensor. shape [ self. _ batch _ dims : ]. is _ fully _ defined ( ) : return composite. reshape ( tensor, [ - 1 ] + tensor. shape [ s... | [
0.2919763922691345,
0.6006404161453247,
0.7230821251869202,
0.7287359237670898,
0.48041629791259766,
-0.016751034185290337,
0.6793572902679443,
0.05681871250271797,
0.3628062307834625,
-0.25480538606643677,
-0.15847761929035187,
0.3301660120487213,
0.1792164444923401,
-0.6897222399711609,
... |
def _ extract _ classes ( self, v ) : return ( isinstance ( v, ast. classdef ) and ( v. name [ 0 ]! ='_') ) | [
-1.521043300628662,
0.06824973970651627,
0.5994956493377686,
-0.3069445788860321,
-0.6031171679496765,
-0.4297187626361847,
-0.30841419100761414,
-0.17214961349964142,
0.5046657919883728,
0.760320782661438,
-0.9214853644371033,
-0.2621491253376007,
0.09678288549184799,
0.9790576696395874,
... |
def group ( self, components, groups ) : nodes = { } isolate _ nodes = { } remaining = set ( components ) for component in components : node = none if component. node : # explicit node node = component. node elif component. isolate : # explicit isolate try : node = isolate _ nodes [ component. isolate ] except keyerror... | [
-1.058471918106079,
0.3240283131599426,
0.6518726348876953,
-1.0304471254348755,
0.1447346955537796,
-0.17814970016479492,
0.45589080452919006,
0.07953765988349915,
-0.458149254322052,
0.34937459230422974,
0.0543794259428978,
-0.26783379912376404,
-0.7406139373779297,
-0.318876177072525,
... |
def test _ nfc _ wps _ er _ handover ( dev, apdev ) : try : _ test _ nfc _ wps _ er _ handover ( dev, apdev ) finally : dev [ 0 ]. request ( " wps _ er _ stop " ) | [
-0.529208779335022,
0.5858822464942932,
0.4560231566429138,
0.273353636264801,
0.8668164014816284,
0.5955572724342346,
0.25197285413742065,
-0.8458306789398193,
0.8626615405082703,
-0.7390249371528625,
0.7095891237258911,
-0.3805355131626129,
-0.0024835122749209404,
-0.27884483337402344,
... |
def printprojmatrix ( matrix ) : for key in sorted ( matrix. keys ( ) ) : for block in matrix. get ( key ) : print ('% 6. 3f'% block, end ='' ) print ( ) | [
0.9211639761924744,
0.21675054728984833,
0.6034837961196899,
0.072769895195961,
-0.6691335439682007,
0.46129414439201355,
-0.5555773377418518,
-0.6425486207008362,
-0.8252959847450256,
1.0346659421920776,
1.161852478981018,
-0.10473913699388504,
-0.3711431622505188,
0.6527930498123169,
-... |
def portrait ( img ) : y, x = np. shape ( img ) return img. transpose ( ) if x > y else img | [
-0.21851567924022675,
0.5908087491989136,
0.47449392080307007,
-0.27115598320961,
-0.08048923313617706,
-0.6909373998641968,
-0.10949555784463882,
-0.8562439680099487,
0.5468382835388184,
0.8466748595237732,
0.47587451338768005,
-0.8698668479919434,
-0.3947131931781769,
-0.6011123657226562... |
def list _ percelen _ by _ sectie ( self, sectie ) : sid = sectie. id aid = sectie. afdeling. id gid = sectie. afdeling. gemeente. id sectie. clear _ gateway ( ) def creator ( ) : url = ( self. base _ url + f " / municipality / { gid } / department / { aid } / section / { sid } / parcel " ) h = self. base _ headers p =... | [
-0.00020108035823795944,
-0.8901641368865967,
0.571985125541687,
-0.2322399616241455,
-0.7005237340927124,
-0.2780008316040039,
-0.5777488946914673,
-0.8947197198867798,
0.9390085339546204,
0.4916125535964966,
0.2393733263015747,
-0.1610102504491806,
-0.15570202469825745,
0.751703083515167... |
async def create _ teacher _ interview _ room ( self, guild : discord. guild, teacher _ app : list [ str ] ) - > none : teacher _ app _ cat = discord. utils. get ( guild. categories, id = self. teacher _ app _ cat _ id ) teacher = discord. utils. get ( guild. members, id = teacher _ app [ 0 ] [ 1 ] ) # moderator = disc... | [
0.3817136287689209,
-0.4638996720314026,
0.8789939880371094,
-0.029406379908323288,
0.15006037056446075,
0.020342346280813217,
-0.7828991413116455,
0.3732524514198303,
-0.78104567527771,
0.8352324962615967,
0.4155416786670685,
0.3453306555747986,
-0.9735894799232483,
1.0351955890655518,
... |
def delete ( ) : conn, cursor = init _ db ( ) get _ id = request. args. get ('id') conn = get _ db ( ) cursor = conn. cursor ( ) cursor. execute ('update foundations set deleted = 1 where id =? ', ( get _ id, ) ) conn. commit ( ) return redirect ( url _ for ('main') ) | [
-0.08243083208799362,
0.38640594482421875,
0.6025212407112122,
0.49353480339050293,
0.4633515179157257,
-0.009253081865608692,
0.46018144488334656,
0.6679598093032837,
0.16302722692489624,
-0.6253229975700378,
0.6913672685623169,
-0.39230233430862427,
-0.2690896987915039,
0.752111136913299... |
def step ( self, closure = none ) : if closure is none : raise valueerror ( " closure required : closure ( beta ) " ) # get initial sample from the prior and compute its loss self. get _ prior _ sample ( ) log _ w = float ( closure ( 0 ). data. numpy ( ) ) # holds running importance weight last _ jump = - 1 for i, beta... | [
-0.10533330589532852,
0.10940605401992798,
0.9989771246910095,
-0.2297603338956833,
-0.06475900858640671,
-0.5709397196769714,
1.1992164850234985,
0.21081246435642242,
-0.8334197998046875,
-0.38682791590690613,
0.2699914276599884,
0.7257702946662903,
-0.9488289952278137,
1.0445053577423096... |
def test _ elastic _ dist ( self ) : cells, _, _ = data _ utils. load _ cells ( ) curve _ 1, curve _ 2 = cells [ 0 ] [ : 10 ], cells [ 1 ] [ : 10 ] metric = self. elastic _ metric dist = metric. dist ( curve _ 1, curve _ 2 ) result = dist. shape expected = ( ) self. assertallclose ( result, expected ) result = dist > 0... | [
0.5145297050476074,
0.3095681071281433,
0.531001091003418,
-0.35027778148651123,
0.9745389819145203,
0.9098917245864868,
-0.37216776609420776,
0.3221735954284668,
-0.5673089027404785,
-0.15764857828617096,
-0.5983599424362183,
0.10513602197170258,
0.5957764387130737,
-1.260077714920044,
... |
def empty ( self ) : return self. _ _ empty | [
-0.8825182914733887,
-0.6811549663543701,
0.4488828480243683,
-0.6809885501861572,
0.35386228561401367,
1.5079656839370728,
0.059971634298563004,
-0.8909419178962708,
-0.01852925680577755,
-0.08131302148103714,
-0.822152316570282,
1.005292296409607,
-0.5357486009597778,
-0.8574180006980896... |
def keys ( self ) - > set : # a ( candidate ) key is a minimal superkey. superkeys : set = self. superkeys ( ) keys : set = set ( superkeys ) # remove non - minimal keys from the set of superkeys. for superkey in superkeys : membership : callable = lambda key : set ( key ) < set ( superkey ) if any ( map ( membership, ... | [
0.26791778206825256,
0.23241443932056427,
0.4446112811565399,
0.46315211057662964,
-0.5265077352523804,
0.0038827024400234222,
0.08784609287977219,
-0.1314154714345932,
0.1373603790998459,
-0.5094939470291138,
-0.9888643622398376,
1.0972589254379272,
-0.9265444874763489,
-0.129876270890235... |
def mult ( a, b ) : return a * b | [
-0.2201693207025528,
0.8639143705368042,
0.5666503310203552,
-0.225823774933815,
0.5828832983970642,
-0.05035649985074997,
-0.9656396508216858,
-1.4147083759307861,
-0.5651124715805054,
-0.5386665463447571,
0.646605372428894,
0.396786630153656,
0.2455536425113678,
-0.6135284304618835,
-0... |
def trafficloadmode ( self ) : if self. force _ auto _ sync : self. get ('trafficloadmode') return self. _ trafficloadmode | [
-0.7593488097190857,
0.8569089770317078,
0.3135055601596832,
-0.6408810019493103,
0.4322085976600647,
0.9902960062026978,
0.27770930528640747,
-0.8987786769866943,
0.13666357100009918,
0.0850474014878273,
-0.9795368313789368,
0.1029074415564537,
-0.4321351945400238,
-0.8311808705329895,
... |
def _ _ init _ _ ( self, pos, transform = false ) : self. init ( ) self. pos = vec ( pos ) self. point _ type ='doubleclear'self. transform = transform self. obtype = " point " self. sharp = true self. control = false | [
0.3422548174858093,
-0.39031851291656494,
0.5969741344451904,
0.3699827194213867,
-0.1400810182094574,
0.13948315382003784,
-0.15620911121368408,
-0.07032173126935959,
0.4848082661628723,
-0.1429845541715622,
-1.2883411645889282,
-0.3402943015098572,
0.8488028645515442,
0.4774787425994873,... |
def kernel _ fn ( x1 : pytree, x2 : optional [ pytree ], get : union [ none, str, tuple [ str,... ] ], params : pytree, * * apply _ fn _ kwargs ) - > pytree : if get is none : get = ('nngp ','ntk') out _ dict = { g : kernel _ fns [ g ] ( x1, x2, params, * * apply _ fn _ kwargs ) for g in get } out _ dict = _ dict _ of ... | [
-0.5000670552253723,
0.5119574069976807,
0.5837739706039429,
0.18374410271644592,
-0.6574194431304932,
-1.5551844835281372,
-1.1309430599212646,
0.13156387209892273,
-1.0195971727371216,
0.07441149652004242,
-0.29012876749038696,
0.7398671507835388,
0.6586955785751343,
0.39175090193748474,... |
def bestseqd ( self, max _ depth ) : return self. preferred _ actions ( self. current, max _ depth = max _ depth ) | [
-0.9943831562995911,
-0.49510008096694946,
0.461696982383728,
0.478605717420578,
0.0669940635561943,
-0.29241541028022766,
-0.20438523590564728,
-0.34568411111831665,
-0.00032048299908638,
-0.10540725290775299,
0.5809054374694824,
1.1266136169433594,
0.13425137102603912,
0.4168334007263183... |
def nngp _ fn ( x1 : pytree, x2 : optional [ pytree ], params : pytree, * * apply _ fn _ kwargs ) - > pytree : def output ( x, * * kwargs ) : return f ( params, x, * * kwargs ) kwargs1, kwargs2 = utils. split _ kwargs ( apply _ fn _ kwargs, x1, x2 ) out1 = output ( x1, * * kwargs1 ) out2 = output ( x2, * * kwargs2 ) if... | [
0.15974612534046173,
0.1749919056892395,
0.8053843379020691,
0.30246850848197937,
-0.5756108164787292,
-0.9388163089752197,
-0.8189418911933899,
-0.439793199300766,
-0.4597025215625763,
0.7445820569992065,
0.09735849499702454,
0.3686758279800415,
0.4965260922908783,
-0.13272233307361603,
... |
def jam ( a : int, b : int ) - > int : return a + b | [
-0.1432400941848755,
0.15166354179382324,
0.42568984627723694,
-0.3554794490337372,
-0.1440942883491516,
-0.677699863910675,
0.033136192709207535,
-0.011397763155400753,
0.4355975091457367,
-0.3247922956943512,
0.47929903864860535,
0.8626532554626465,
-0.34534335136413574,
-1.1038639545440... |
def is _ not _ none ( ) - > any : class _ notnone : def _ _ eq _ _ ( self, other ) : return other is not none return _ notnone ( ) | [
-0.339522123336792,
-1.0464036464691162,
0.5290477871894836,
0.5423181653022766,
0.8235679268836975,
-1.1631829738616943,
-0.5505539774894714,
-0.7360880374908447,
0.7814339995384216,
0.2782946228981018,
-1.1415579319000244,
-0.617832601070404,
-0.19017499685287476,
0.16123482584953308,
... |
def forward ( self, x1, x2, diag = false, last _ dim _ is _ batch = false, full _ covar = true, * * params ) : if last _ dim _ is _ batch : raise notimplementederror ( ) else : n = x1. shape [ 0 ] m = x2. shape [ 0 ] out = torch. zeros ( ( n * self. num _ tasks, m * self. num _ tasks ), device = x1. get _ device ( ) ) ... | [
0.28963130712509155,
0.811996340751648,
0.8351423144340515,
0.85359126329422,
-0.1791374832391739,
-0.4130275249481201,
0.5772967338562012,
0.7063054442405701,
-1.1145423650741577,
0.3161140978336334,
0.04412706941366196,
0.5083816051483154,
0.46637144684791565,
-0.5003008842468262,
-0.0... |
def counting _ sort ( lst, key, bins ) : buckets = [ [ ] for _ in range ( bins ) ] for item in lst : print ('\ t ', item ) value = key ( item ) buckets [ value ]. append ( item ) return [ x for bucket in buckets for x in bucket ] | [
-0.2725450098514557,
-0.12740062177181244,
0.6420009732246399,
0.9118421673774719,
-0.5099053382873535,
0.6868165731430054,
-0.6244572401046753,
-0.33922871947288513,
-1.1138384342193604,
0.3549878001213074,
-0.8446477055549622,
-0.06125849485397339,
0.35645970702171326,
0.3525978922843933... |
def check _ init _ vect _ value ( init _ vect : bytearray, block _ size : int ) - > bool : result = true if ( not isinstance ( init _ vect, ( bytes, bytearray ) ) ) or len ( init _ vect ) % block _ size! = 0 : result = false return result | [
-0.34540867805480957,
-0.6336421966552734,
0.6038694977760315,
0.6896330118179321,
-0.3411206603050232,
0.3757553994655609,
0.16573241353034973,
-0.1534673273563385,
0.03949985280632973,
-0.4798082709312439,
-0.4278804361820221,
0.5058448910713196,
-1.074731707572937,
0.6656935214996338,
... |
def thumbnail ( self, thumbnail ) : self. _ thumbnail = thumbnail | [
0.1449667066335678,
0.5924690961837769,
-0.05274941399693489,
1.1604156494140625,
0.5988664627075195,
-0.015339579433202744,
0.3842769265174866,
1.01487398147583,
-0.18314844369888306,
-0.2990144193172455,
-1.790333867073059,
-0.4430809020996094,
0.363864541053772,
-0.10385309159755707,
... |
async def update _ moderator _ application ( self, moderator _ id : int, txt _ id : int, vc _ id : int ) - > none : mycursor, db = await the _ database ( ) await mycursor. execute ( " " " update moderatorapplication set channel _ open = 1, txt _ id = % s, vc _ id = % s where moderator _ id = % s " " ", ( txt _ id, vc _... | [
-0.5328157544136047,
-1.4150468111038208,
0.3411812484264374,
-0.6528657674789429,
-0.8179998993873596,
0.16539877653121948,
-0.40147775411605835,
0.510918140411377,
-0.12261483818292618,
1.3378472328186035,
0.6029499769210815,
0.9326471090316772,
-1.501967191696167,
0.16429546475410461,
... |
def cond _ exp _ linear _ y _ set ( self, x, y, s ) : # s doesn't take str ( y ) x _ in = x. copy ( ) [ : self. d ] s _ bar = [ i for i in self. index if i not in s ] cond _ dist _ param = condmvn ( self. mean [ y ], self. cov [ y ], s _ bar, s, x _ in [ s ] ) mu _ bar = cond _ dist _ param [ 0 ] if len ( s )! = self. ... | [
0.3140137195587158,
-0.49748295545578003,
0.46257907152175903,
-0.5506538152694702,
-0.9950502514839172,
0.06470748782157898,
0.41862839460372925,
0.3480464220046997,
0.1323273479938507,
0.17112191021442413,
-0.10510262846946716,
0.9716796875,
-0.43192970752716064,
-0.5963034629821777,
-... |
def get _ apps _ dir ( ) - > str : return join ( config _ dir,'apps') | [
0.5188201665878296,
0.004014414269477129,
0.46068844199180603,
0.8920074105262756,
0.13315966725349426,
1.0702322721481323,
0.2931414842605591,
0.3966255784034729,
-0.2643546462059021,
-0.00429720152169466,
0.5986384749412537,
0.056530848145484924,
0.22645054757595062,
0.5870664119720459,
... |
def _ ondclick ( self, event ) : # if an artist is already dragging, feed any additional button # presses to that artist. # todo : do we want to force a single button model on the user? # todo : that is, once a button is pressed, no other buttons # todo : can come through? i think this belongs in canvas, not here. if s... | [
0.22452203929424286,
0.569526195526123,
0.7364094853401184,
-0.4560316801071167,
0.12380922585725784,
-0.4758663475513458,
0.8765619993209839,
0.374378502368927,
0.60337233543396,
-0.9850479364395142,
-0.45564553141593933,
-0.5434471964836121,
0.5621218085289001,
0.6983423829078674,
-0.9... |
def find _ images ( dir, bground ) : images = list ( ) labels = list ( ) for fil in os. listdir ( dir ) : if fil. lower ( ). endswith ( '. jpeg') : try : img = cv. imread ( dir + " / " + fil, 1 ) img = resize ( img ) except cv. error : print ( " { } malformed! ". format ( fil ) ) sys. exit ( ) images. append ( img. fla... | [
-0.966781735420227,
-0.3495948016643524,
0.5566924810409546,
0.08033540844917297,
0.262335866689682,
-0.5753297209739685,
0.5710093379020691,
0.2015930414199829,
-0.17124724388122559,
1.252655029296875,
0.33062073588371277,
0.19818881154060364,
-0.28678473830223083,
1.6907954216003418,
-... |
def get _ potential _ destinations ( origin, budget, date _ outbound, date _ inbound, n = 10 ) : url ='https : / / api. sandbox. amadeus. com / v1. 2 / flights / inspiration - search'params = dict ( origin = origin, departure _ date = date _ outbound, duration = int ( get _ duration ( date _ outbound, date _ inbound ) ... | [
-1.2571550607681274,
0.2708605229854584,
0.7653299570083618,
0.4037197232246399,
0.14336039125919342,
-0.6643638014793396,
-1.7597174644470215,
-0.1008741483092308,
-0.6332593560218811,
0.0699215978384018,
-0.23624208569526672,
0.3751882016658783,
0.372934490442276,
0.5365384817123413,
1... |
def test _ compare _ pybba _ to _ matbba _ clean ( get _ matlab _ data _ clean, get _ python _ data _ clean, set _ tolerance ) : mat = get _ matlab _ data _ clean py = get _ python _ data _ clean tol = set _ tolerance bb _ py = py. loc [ :, 481 ] bb _ mat = mat. loc [ :, 481 ] error = np. array ( abs ( bb _ mat - bb _ ... | [
0.12263686954975128,
-0.5899286866188049,
0.4627455472946167,
-0.14741000533103943,
0.9414418339729309,
1.2414051294326782,
0.21712101995944977,
-0.6430242657661438,
0.3090348243713379,
0.226080983877182,
-0.42008280754089355,
0.7408612370491028,
-0.1183503046631813,
-0.36295178532600403,
... |
def create _ or _ update ( cluster, token _ name, token _ fields, action ) : cluster _ name = cluster ['name'] cluster _ url = cluster ['url'] existing _ token _ data, existing _ token _ etag = get _ token ( cluster, token _ name ) try : print _ info ( f'attempting to { action } token on { terminal. bold ( cluster _ na... | [
-0.7729729413986206,
0.1413842737674713,
0.7213296294212341,
-0.23679351806640625,
0.6560384631156921,
-0.2128506898880005,
-0.29880622029304504,
0.3052349388599396,
-0.5268198847770691,
0.6743771433830261,
-0.472042977809906,
0.34351882338523865,
-0.21399568021297455,
-0.4092549979686737,... |
def prev ( self ) : try : if data. islast ( self ) : return self. storage [ self. currentitem ] [ 0 ], self. storage [ self. currentitem ] [ 1 ] else : self. currentitem + = 1 return self. storage [ self. currentitem ] [ 0 ], self. storage [ self. currentitem ] [ 1 ] except indexerror : pass | [
-0.9121774435043335,
0.4072625935077667,
0.8821011185646057,
-0.06582844257354736,
-0.1840980499982834,
-0.28260287642478943,
0.6999387741088867,
-0.2359212189912796,
-0.21520917117595673,
-0.1910986751317978,
-0.9276861548423767,
-0.7749150395393372,
-0.8570783734321594,
0.119795717298984... |
def start _ of _ turn ( self ) : self. infected + = self. incoming _ infected self. incoming _ infected = 0 | [
-0.5964565873146057,
-1.071606159210205,
0.44504114985466003,
-1.1635526418685913,
1.2798298597335815,
-0.13681770861148834,
0.5609028339385986,
0.21814590692520142,
0.4057117700576782,
0.1128087118268013,
-0.22932684421539307,
0.7805567979812622,
-0.14900557696819305,
-0.7227858901023865,... |
def player _ by _ id ( self, player _ id : int ) - > optional [ player ] : s = self. _ session return s. query ( player ). filter _ by ( id = player _ id ). first ( ) | [
0.1983608454465866,
-0.7465749979019165,
0.061510249972343445,
-0.06760730594396591,
0.9184532165527344,
-0.9894852638244629,
-0.43547967076301575,
-1.4249236583709717,
0.8959980607032776,
0.4150428771972656,
0.398345947265625,
0.2218749225139618,
-0.8510972857475281,
-0.09969793260097504,... |
def test _ setup _ ilm _ disabled ( self ) : self. render _ config ( ) exit _ code = self. run _ beat ( logging _ args = [ " - v ", " - d ", " * " ], extra _ args = [ " setup ", self. cmd, " - e ", " setup. ilm. enabled = false " ] ) assert exit _ code = = 0 self. idxmgmt. assert _ index _ template _ loaded ( self. ind... | [
-0.749435544013977,
-0.026630520820617676,
0.4227023124694824,
-0.5139331221580505,
0.8305616974830627,
1.3139243125915527,
0.6870924234390259,
0.8144789338111877,
-0.23311865329742432,
0.09448889642953873,
-0.3574957549571991,
-0.0723293125629425,
-0.8036769032478333,
0.06989175081253052,... |
def drag _ drop ( locator, target _ locator, index = 1, anchor = " 1 ", target _ anchor = " 1 ", timeout = 0, dragtime ='0. 5s ', left = 0, right = 0, above = 0, below = 0 ) : # pylint : disable = unused - argument pyautogui. failsafe = false draggable = dragdrop. get _ draggable _ element ( locator, index, anchor ) if... | [
-0.7020105719566345,
-0.13221003115177155,
0.6631593704223633,
-0.4754530191421509,
0.18417257070541382,
-0.4148472249507904,
-0.010679678991436958,
-0.016910478472709656,
0.06691387295722961,
0.054865602403879166,
-0.2457021027803421,
0.40806758403778076,
0.6686742305755615,
-0.4651249051... |
def _ _ moneychange ( self, newmoney ) : if hasattr ( self,'totalmoney') : self. totalmoney = base. localavatar. gettotalmoney ( ) if hasattr ( self,'beanbank') : self. beanbank ['text'] = str ( int ( self. totalmoney ) ) | [
0.058978866785764694,
-0.49717748165130615,
0.6186118721961975,
-0.15104222297668457,
-0.6705231070518494,
-0.6502087712287903,
0.10851555317640305,
-0.4860847294330597,
0.9234287142753601,
0.6809060573577881,
-0.4928160011768341,
-0.5460148453712463,
-0.09970960021018982,
1.40316438674926... |
def wait _ for _ element ( self, locator, timeout = 10, by = by. css _ selector ) : element = webdriverwait ( self. driver, timeout ). until ( ec. presence _ of _ element _ located ( ( by, locator ) ) ) return element | [
-0.27264007925987244,
-0.5323801040649414,
0.3552325367927551,
-0.20303595066070557,
0.39915964007377625,
0.4211752414703369,
-0.008055786602199078,
0.7199560403823853,
0.2812241017818451,
-0.16427846252918243,
-0.1819581538438797,
-0.17670509219169617,
0.45551565289497375,
-0.480534911155... |
def test _ set _ failed ( parse _ conf ) : with patch ( " salt. modules. logrotate. _ parse _ conf ", magicmock ( return _ value = parse _ conf ) ) : kwargs = { " key " : " / var / log / wtmp ", " value " : 2 } pytest. raises ( saltinvocationerror, logrotate. set _, * * kwargs ) | [
0.39314791560173035,
0.6510290503501892,
0.39657723903656006,
-0.6667405962944031,
0.383322536945343,
0.11940061300992966,
-0.3648630380630493,
-0.8859995007514954,
-0.5130343437194824,
0.7292834520339966,
-0.6012597680091858,
0.3752521872520447,
-0.6940603852272034,
0.22804225981235504,
... |
def get _ version ( request ) : if'jsonrpc'in request : return 2. 0 elif'id'in request : return 1. 0 return none | [
-0.35123777389526367,
-1.1117216348648071,
0.43954870104789734,
0.6458673477172852,
1.0040463209152222,
-0.3426112234592438,
-0.9960422515869141,
-0.992280125617981,
-0.03983794525265694,
0.33874496817588806,
0.19537928700447083,
-0.0022716920357197523,
-0.6131647229194641,
1.0354318618774... |
def _ _ eq _ _ ( self, other ) : if not isinstance ( other, totallimitconstantresponse ) : return false return self. _ _ dict _ _ = = other. _ _ dict _ _ | [
0.24395006895065308,
-0.9025077819824219,
0.5385545492172241,
-1.266072154045105,
-0.19417214393615723,
0.2494039535522461,
0.7008148431777954,
-0.5513522028923035,
1.6444467306137085,
0.3747100830078125,
-1.2878966331481934,
-1.0643595457077026,
-0.7287035584449768,
-1.3125497102737427,
... |
def scale ( self ) : return self. _ scale | [
-0.059865593910217285,
-0.25707846879959106,
0.3523213565349579,
-0.07868795841932297,
0.3169281780719757,
1.0520497560501099,
-0.27278387546539307,
-0.8495569229125977,
-0.18565598130226135,
0.1704254001379013,
0.33158910274505615,
-0.4835513234138489,
-0.9162176251411438,
-0.201444089412... |
def select _ noise _ regressors ( r2 _ nrs, pcstop = 1. 05 ) : numpcstotry = r2 _ nrs. size - 1 # this is the performance curve that starts at 0 ( corresponding to 0 pcs ) curve = r2 _ nrs - r2 _ nrs [ 0 ] # initialize ( this will hold the best performance observed thus far ) best = - np. inf for p in range ( 1, numpcs... | [
-0.3757050931453705,
-0.36219292879104614,
0.6389632225036621,
-0.09963349997997284,
0.45283958315849304,
-0.35016757249832153,
0.1893959492444992,
-1.2217336893081665,
0.22261248528957367,
-0.20718401670455933,
0.5286442637443542,
0.9721872806549072,
-0.7416538000106812,
-0.37719240784645... |
async def async _ run _ command ( self, command, first _ try = true ) : await self. async _ connect ( ) try : with ( await self. _ io _ lock ) : self. _ writer. write ('{ } \ n '. format ( " % s & & % s " % ( _ path _ export _ command, command ) ). encode ('ascii') ) data = ( ( await asyncio. wait _ for ( self. _ reade... | [
-0.5647440552711487,
0.07871899008750916,
0.8071159720420837,
0.7955125570297241,
0.23848725855350494,
-0.3784210681915283,
-0.8511675000190735,
0.15639537572860718,
0.004594662692397833,
0.4368651509284973,
0.5506834983825684,
0.27921971678733826,
-0.6995633244514465,
-0.03068512491881847... |
def train ( self, patterns, iterations = 1, n = 0. 5, m = 0. 1, verbose = false, nb = 0. 1 ) : tmp _ error = [ ] for i in xrange ( iterations ) : # error = complex ( 0. 0, 0. 0 ) error = 0. 0 for p in patterns : self. update ( p [ 0 ] ) tmp = self. backpropagate ( p [ 1 ], n, m, nb ) error + = tmp if ( ( i + 1 ) % 100 ... | [
-0.7999306917190552,
0.5664671063423157,
0.7397125959396362,
0.6102199554443359,
0.07831050455570221,
-0.09099305421113968,
1.1465212106704712,
0.19650761783123016,
-0.06651289761066437,
0.8024155497550964,
-0.14206980168819427,
0.012064196169376373,
-1.3578962087631226,
-0.102536171674728... |
def kms _ encrypted _ password ( self ) - > optional [ pulumi. input [ str ] ] : return pulumi. get ( self, " kms _ encrypted _ password " ) | [
0.6726152896881104,
-0.4523070156574249,
0.38314172625541687,
0.5751983523368835,
0.4860176146030426,
0.8499053120613098,
-0.3333646059036255,
0.18842460215091705,
1.4273245334625244,
0.3233480155467987,
-0.2878999412059784,
1.0305947065353394,
-0.27356216311454773,
-0.5620882511138916,
... |
def get _ loss ( net, labels, num _ class, batch _ size, image _ size, s, b, offset, scope ='loss _ layer') : with tf. variable _ scope ( scope ) : predict _ classes = net [ :, :, :, : num _ class ] # confidence is defined as pr ( object ) * iou predict _ confidence = net [ :, :, :, num _ class : num _ class + b ] # pr... | [
-0.6771472096443176,
0.016660232096910477,
1.2031601667404175,
-0.33805590867996216,
-0.19116775691509247,
0.09141066670417786,
0.7937458157539368,
0.266442209482193,
-0.35183700919151306,
0.3061293065547943,
-0.34951314330101013,
0.5598106980323792,
0.6281746625900269,
-0.2618557214736938... |
def delete _ role _ arn ( iam, config _ dict ) : role _ arn = config _ dict [ " dwh _ iam _ role _ name " ] iam. detach _ role _ policy ( rolename = role _ arn, \ policyarn = " arn : aws : iam : : aws : policy / amazons3readonlyaccess " ) iam. delete _ role ( rolename = role _ arn ) print ( " rolearn is deleted " ) ret... | [
0.22802656888961792,
-0.6030806303024292,
0.5948355793952942,
-0.7078754305839539,
0.3194052278995514,
0.6450744867324829,
0.20427119731903076,
1.3632924556732178,
1.153064489364624,
0.6479325890541077,
0.01930932328104973,
0.9766027331352234,
0.14131757616996765,
-0.12404661625623703,
2... |
def fit ( self, x, masks = none, noise _ transform = true ) : n = x. shape [ 0 ] p = x. shape [ 1 ] xnan = np. copy ( x ) x _ orig = np. copy ( x ) if len ( masks ) = = 2 : mask = mask [ 0 ] * mask [ 1 ] else : mask = masks # add noise, if requested before transform add _ noise = noise _ transform and self. noise if ad... | [
-0.21047013998031616,
-0.21969568729400635,
0.904001772403717,
0.24158094823360443,
0.05294971168041229,
0.03407517075538635,
0.16274480521678925,
-0.25607606768608093,
0.4349977970123291,
-0.3108081817626953,
-0.2796238958835602,
0.7343328595161438,
-0.28660157322883606,
0.652739167213439... |
def clean _ data ( filepath : str ) - > iterable : for row in iterrows ( filepath ) : if not is _ in _ stock ( row ) : continue is _ interesting, category = has _ interesting _ category ( row ) if not is _ interesting : continue img _ name, img _ url = get _ image _ info ( row ) yield create _ cora _ row ( row, categor... | [
-0.725753903388977,
0.05040237680077553,
0.18537390232086182,
-0.13065654039382935,
-0.15996932983398438,
-0.01680181920528412,
-0.10663154721260071,
-0.5393465757369995,
-0.6529402136802673,
0.4988867938518524,
0.33174023032188416,
-0.3744434416294098,
0.6423212289810181,
1.00389933586120... |
def remove _ callbacks ( self ) : if self. _ _ rop is not none : try : self. _ _ rop. removeeventcallback ( ( hou. nodeeventtype. namechanged, ), self. _ _ name _ changed ) self. _ _ rop. removeeventcallback ( ( hou. nodeeventtype. beingdeleted, ), self. _ _ being _ deleted ) self. _ _ rop. removeeventcallback ( ( hou.... | [
0.19964687526226044,
0.009493783116340637,
0.7521973848342896,
0.006618184968829155,
0.3190724551677704,
-0.28307533264160156,
0.6382905840873718,
-0.4431467354297638,
0.4222663342952728,
-0.5088959336280823,
-0.5233892798423767,
0.03293001279234886,
-0.7743624448776245,
0.6319955587387085... |
def calc _ reg _ lpfbwtx _ lpfbwrx ( self, model ) : pll _ bandwidth _ tx = model. vars. pll _ bandwidth _ tx. value. value pll _ bandwidth _ rx = model. vars. pll _ bandwidth _ rx. value. value # we need to set some bits in the upper part of synthlpfctrl # since we don't have proper fields defined for them in the # se... | [
-0.028891121968626976,
0.03305721655488014,
0.5973859429359436,
-0.4243834614753723,
0.4000958800315857,
-0.18494436144828796,
0.0172437597066164,
0.11523624509572983,
-0.34823542833328247,
-0.7522528767585754,
-1.0335508584976196,
-0.08780300617218018,
-0.37922877073287964,
-0.01959586143... |
def get _ order ( cls ) - > [ str ] : return ['conv3x3 - bn - relu ','conv1x1 - bn - relu ','maxpool3x3'] | [
-0.3303910791873932,
0.27337247133255005,
0.4016939103603363,
1.1863117218017578,
1.1576579809188843,
0.2939399182796478,
-0.8920591473579407,
-0.24609962105751038,
0.4785257577896118,
0.684082567691803,
-1.4958806037902832,
0.3855210840702057,
0.2871314287185669,
-0.3188610076904297,
-0... |
def buildgreatregulatorydomains ( infile, outfile ) : statement ='''zcat % ( infile ) s | cgat gtf2gtf - - method = filter - - filter - method = proteincoding - - log = % ( outfile ) s. log | cgat gtf2gtf - - method = filter - - filter - method = representative - transcript - - log = % ( outfile ) s. log | cgat gtf2gff... | [
0.18552471697330475,
0.017281780019402504,
0.45209458470344543,
-0.3347105085849762,
0.11294770240783691,
0.1285782754421234,
0.32109203934669495,
0.03363727778196335,
-0.7686038613319397,
-0.5159125328063965,
-0.330443799495697,
1.2398920059204102,
0.3684588670730591,
-0.3568331003189087,... |
def signin ( request ) : if request. method = = " post " : form = signinform ( request. post ) if form. is _ valid ( ) : username = form. cleaned _ data ['username'] password = form. cleaned _ data ['password'] user = authenticate ( request, username = username, password = password ) if user is not none : login ( reque... | [
-0.7090027332305908,
-0.5057767033576965,
0.9906994700431824,
1.058798909187317,
-0.7052563428878784,
0.5130224823951721,
-0.11089980602264404,
0.4569447338581085,
0.28381991386413574,
-1.045911431312561,
0.2688086926937103,
-0.42901331186294556,
-0.03170248493552208,
0.24546940624713898,
... |
def ipv4 _ netmask _ to _ cidr ( netmask ) : return map ( lambda x : ipv4 _ cidr _ to _ netmask ( x ), range ( 0, 33 ) ). index ( netmask ) | [
-0.11639221012592316,
-0.12162352353334427,
0.21606728434562683,
0.35673412680625916,
0.28762808442115784,
-0.16154053807258606,
0.4443405270576477,
-0.15000775456428528,
0.40921705961227417,
-0.3201175630092621,
-0.3797486424446106,
-1.137087345123291,
-0.6948836445808411,
-0.311130017042... |
def build _ server _ list ( self ) : self. servers = set ( ) servers _ dict = self. api. query ( ). servers. get ( ) [ " servers " ] for server in servers _ dict : self. servers. add ( server ( self, server ) ) | [
-1.781214714050293,
-0.007009228691458702,
0.34657761454582214,
-0.3966178894042969,
1.7173917293548584,
0.06312761455774307,
-0.9691412448883057,
0.2676061987876892,
0.8796369433403015,
0.15849705040454865,
-0.5039904713630676,
0.3183628022670746,
0.21875028312206268,
0.18721464276313782,... |
def training _ deconvolution ( self ) : header _ written = false lr _ train _ helper = learningratehelper ( scheduler = self. scheduler _ train, learning _ rate _ name = " train _ lr " ) previous _ test _ perfs = none perfs = performancelist ( ) print ( " training with unsupervised set.. " ) for epoch in range ( self. ... | [
-0.5754253268241882,
0.9232921004295349,
0.5823146104812622,
-0.03341810405254364,
-0.2736280560493469,
-0.5317833423614502,
0.677703857421875,
0.2958059310913086,
-0.8604597449302673,
0.10107055306434631,
0.001176345394924283,
-0.20327521860599518,
-0.24299170076847076,
0.2763181328773498... |
def pr _ in _ production ( pr _ id ) : print ( " getting pr in prod { } ". format ( pr _ id ) ) try : with get _ pr _ files ( pr _ id ) as pr _ files : pr _ ttfonts = [ ttfont ( f ) for f in pr _ files if f. endswith ( ". ttf " ) ] if not pr _ ttfonts : return false family _ name = _ family _ name ( pr _ ttfonts [ 0 ] ... | [
-0.5019209384918213,
-0.60245680809021,
0.7967858910560608,
-0.31151431798934937,
-0.3049704134464264,
0.23675037920475006,
-0.4495835602283478,
-0.1266871690750122,
-0.10219758749008179,
0.40942367911338806,
-0.13638614118099213,
0.6846768260002136,
-0.6342345476150513,
0.1097907871007919... |
def luma _ effect _ strength ( self, luma _ effect _ strength ) : # type : ( float ) - > none if luma _ effect _ strength is not none : if not isinstance ( luma _ effect _ strength, ( float, int ) ) : raise typeerror ( " invalid type for ` luma _ effect _ strength `, type has to be ` float ` " ) self. _ luma _ effect _... | [
0.3979417383670807,
-0.3086094856262207,
-0.5249097943305969,
-0.18304328620433807,
0.2511167824268341,
0.12459426373243332,
0.03425547853112221,
0.6926388740539551,
0.039208345115184784,
-1.0482597351074219,
-1.0196847915649414,
-0.3720604181289673,
-0.8749790191650391,
0.0997777506709098... |
def _ _ init _ _ ( self ) : self. fig, self. ax = plt. subplots ( 1, 1, figsize = self. _ cm2inch ( 8. 9, 8. 9 ) ) # make uid name dicts path _ to _ meta ='109 _ 20200609 _ 2020 - 06 - 09 _ 11 - 59 - 06. 357078. seqs. absolute. meta _ only. txt'meta _ df = pd. read _ csv ( path _ to _ meta, sep ='\ t') self. id _ to _ ... | [
0.3991912603378296,
0.02098974958062172,
0.6480575203895569,
-0.4018223285675049,
-0.7730683088302612,
0.5353276133537292,
0.775107204914093,
0.7096099257469177,
0.08017086237668991,
0.35416457056999207,
0.3052441477775574,
0.7112516760826111,
0.8725776076316833,
-0.5189678072929382,
1.2... |
def extract ( jet, pflow = false ) : jet = copy. deepcopy ( jet ) s = jet [ " content " ]. shape # if not pflow : content = np. zeros ( ( s [ 0 ], 7 + 5 + 2 ) ) # else : # # pflow value will be one - hot encoded # content = np. zeros ( ( s [ 0 ], 7 + 4 ) ) for i in range ( len ( jet [ " content " ] ) ) : px = jet [ " c... | [
0.4389353394508362,
-0.8101121783256531,
0.628032922744751,
-0.8421220779418945,
-0.7627610564231873,
-0.08869535475969315,
-0.1421692967414856,
-0.09844179451465607,
0.32301244139671326,
0.4733697474002838,
-0.042046837508678436,
-0.29607629776000977,
-0.12195843458175659,
0.5233373641967... |
def receive _ packet ( self ) : while true : try : data, client _ address = self. sock. recvfrom ( buf _ size ) # fixme : need clock synchronization? receive _ time = datetime. now ( ) # 子 1 中 receiving _ queue self. receiving _ queue. put ( ( data, client _ address, receive _ time ) ) except socket. error, e : logging... | [
-0.08224382996559143,
0.3237277567386627,
0.707668662071228,
-0.6118177175521851,
-0.03278803452849388,
0.06563446670770645,
-0.3267582058906555,
0.2992810606956482,
-0.7013586163520813,
-0.2842765152454376,
-0.7577645778656006,
0.7752658724784851,
-0.24634622037410736,
-0.2017702758312225... |
def by _ calendar _ permission _ id ( self, calendar _ permission _ id : str ) - > calendarpermissionitemrequestbuilder : if not calendar _ permission _ id : raise typeerror ( " calendar _ permission _ id cannot be null. " ) from. item. calendar _ permission _ item _ request _ builder import calendarpermissionitemreque... | [
0.11694741994142532,
0.3109990954399109,
0.24816565215587616,
0.9597652554512024,
-0.6649933457374573,
0.08039650321006775,
-0.5392513275146484,
-0.1514463573694229,
0.5327094197273254,
-0.13885195553302765,
0.8185034990310669,
0.3152921199798584,
-0.6421328783035278,
-0.7092862129211426,
... |
def call ( self, x, training = false ) : x = lambda ( self. identity _ func, name = " input " ) ( x ) with tf. gradienttape ( persistent = true ) as hess _ tape : hess _ tape. watch ( x ) with tf. gradienttape ( ) as grad _ tape : grad _ tape. watch ( x ) y = self. input _ layer ( x ) y = self. activation ( y ) # y = s... | [
-0.1171858087182045,
0.27791357040405273,
0.9944611191749573,
-0.4339618682861328,
0.2535027861595154,
0.6097670197486877,
0.4275985360145569,
-0.4904838502407074,
-0.23037120699882507,
0.019376514479517937,
-0.512688159942627,
-0.33336102962493896,
0.6632300019264221,
1.6059144735336304,
... |
def add _ scene ( cls, scene ) : cls. scenes. append ( scene ) | [
-0.9833797216415405,
0.011262510903179646,
0.32501453161239624,
-0.2946176528930664,
0.8055064678192139,
0.47580981254577637,
-1.3375954627990723,
-0.057486481964588165,
0.8056833148002625,
-0.6809979677200317,
-0.1058572381734848,
0.02375771291553974,
-0.551866352558136,
0.760928690433502... |
def test _ proper _ response _ on _ not _ available _ email ( self ) : emp = employee ( ) emp. name ='emp'emp. email ='emp @ mail. com'emp. department ='emp _ department'emp. save ( ) employee _ data = {'name':'other _ emp ','email':'emp @ mail. com ', # problematic data'department':'emp _ department'} response = self.... | [
-0.08130942285060883,
-0.7777312397956848,
0.4269822835922241,
-0.6382654905319214,
0.21452867984771729,
1.2493661642074585,
-0.6052403450012207,
-0.034135572612285614,
-0.2423345446586609,
0.4757978022098541,
-1.096150517463684,
0.3286093771457672,
-0.48207664489746094,
0.0797309726476669... |
def tile _ from _ slippy _ map ( root, x, y, z ) : path = glob. glob ( os. path. join ( os. path. expanduser ( root ), str ( z ), str ( x ), str ( y ) + ". * " ) ) if not path : return none return mercantile. tile ( x, y, z ), path [ 0 ] | [
0.5290600061416626,
-0.9198798537254333,
0.42344698309898376,
0.20059071481227875,
-1.1675543785095215,
-0.2173689603805542,
0.1839981973171234,
0.029587073251605034,
0.37055978178977966,
-0.7010277509689331,
0.3907430171966553,
0.03536335006356239,
0.03856917470693588,
-0.251169890165329,... |
def writable ( self ) : return false | [
-0.840998649597168,
-0.5151413083076477,
0.5249024629592896,
0.8270442485809326,
0.6471561789512634,
0.907073974609375,
0.8185992240905762,
0.8524124622344971,
-1.0183069705963135,
0.10861539095640182,
0.2882133722305298,
0.05393057316541672,
-1.2572860717773438,
-0.42039230465888977,
-1... |
def gb _ energy ( lammps _ command, potential, symbols, alat, axes _ 1, axes _ 2, e _ coh, mpi _ command = none, xshift = 0. 0, zshift = 0. 0 ) : axes _ 1 = np. asarray ( axes _ 1, dtype = int ) axes _ 2 = np. asarray ( axes _ 2, dtype = int ) lx = alat * np. linalg. norm ( axes _ 1 [ 0 ] ) lz = 2 * alat * np. linalg. ... | [
0.7176377177238464,
0.14769607782363892,
0.8538063168525696,
-0.9509869813919067,
0.2817342281341553,
0.8363919258117676,
-0.09373936057090759,
0.011351542547345161,
-1.0942455530166626,
0.3997722864151001,
0.16529621183872223,
1.0877172946929932,
-0.9589495062828064,
0.0040009282529354095... |
def parsejson ( jsonfile, extracted _ conditions = none, name _ dict = none ) : n _ objs = {'vehicle': 0,'person': 0,'two - wheelers': 0 } cover _ val _ objs = {'vehicle': [ ],'person': [ ],'two - wheelers': [ ] } objs = [ ] f = open ( jsonfile ) info = json. load ( f ) objects = info ['frames'] [ 0 ] ['objects'] weath... | [
-0.8747255802154541,
-0.40336549282073975,
1.002468228340149,
-0.5616336464881897,
-1.1420286893844604,
-0.10076232254505157,
0.4282141625881195,
-0.24606934189796448,
-0.7828110456466675,
0.7492367029190063,
-0.8295944929122925,
-0.651204526424408,
0.45811939239501953,
1.0346670150756836,... |
def get _ full _ name ( self ) : full _ name ='% s % s'% ( self. first _ name, self. last _ name ) return full _ name. strip ( ) | [
0.7625666856765747,
-1.2080127000808716,
0.724260687828064,
-0.681163489818573,
-0.25906556844711304,
0.4773562252521515,
-1.5100908279418945,
0.03639307618141174,
-0.4482308030128479,
-0.3114178776741028,
0.06142411753535271,
0.13953626155853271,
0.3249489963054657,
0.43075260519981384,
... |
def upsample _ 2d ( hidden _ states, kernel = none, factor = 2, gain = 1 ) : assert isinstance ( factor, int ) and factor > = 1 if kernel is none : kernel = [ 1 ] * factor kernel = torch. tensor ( kernel, dtype = torch. float32 ) if kernel. ndim = = 1 : kernel = torch. outer ( kernel, kernel ) kernel / = torch. sum ( k... | [
-0.014468163251876831,
-0.19401545822620392,
0.9049950242042542,
0.089335598051548,
-0.9971901774406433,
-0.283824622631073,
-0.3221163749694824,
-0.6105371713638306,
0.06796843558549881,
-0.3719770312309265,
-0.28036588430404663,
-0.05640319362282753,
0.5644271373748779,
0.235520437359809... |
def _ populate _ cache ( self, object _ type : type [ pbxobject ] ) - > none : if object _ type. _ _ name _ _ in self. _ cached _ items : return cached _ items : dict [ str, pbxobject ] = { } for object _ key, project _ object in self. objects. items ( ) : if not isinstance ( project _ object, object _ type ) : continu... | [
-0.9935133457183838,
0.3294958472251892,
0.6013360619544983,
0.008523091673851013,
0.5045402646064758,
1.0329481363296509,
-0.23569387197494507,
-0.8715062737464905,
0.02842150256037712,
0.7564196586608887,
-0.7223930358886719,
-0.14477084577083588,
-0.025342781096696854,
0.561616480350494... |
def insert _ suffix ( self ) : # update the active point and the floating leaves if self. active _ points [ self. active _ sequence ]. active _ edge : self. update _ active _ edge ( ) if self. active _ points [ self. active _ sequence ]. floating _ leaves : self. solve _ floating _ leaves ( ) # if there is no active ed... | [
0.5748469829559326,
-0.8564820289611816,
0.9879283308982849,
-0.2119370400905609,
-0.5438442826271057,
-0.5143282413482666,
0.42086994647979736,
0.736953616142273,
0.33037441968917847,
0.0033834604546427727,
-0.7469555735588074,
0.17046844959259033,
-0.8289080262184143,
-0.1626408696174621... |
def _ get _ private _ connection ( self ) : if self. private _ connection _ name : return datastream. privateconnectivity ( privateconnectionname = self. private _ connection _ name ) return none | [
0.07414243370294571,
-0.5838742256164551,
0.5344778299331665,
0.04197780787944794,
-0.13600334525108337,
-1.247076153755188,
-0.04371121525764465,
-1.4468997716903687,
0.593267560005188,
-0.7711005210876465,
0.4388830065727234,
0.662421464920044,
-1.2518699169158936,
0.01175553910434246,
... |
def fix _ projection ( shape, axes, limits ) : fixed _ limits = [ ] fixed _ axes = axes for s in shape : if s = = 1 : fixed _ limits. append ( ( 0, 0 ) ) else : fixed _ limits. append ( limits. pop ( 0 ) ) for ( i, s ) in enumerate ( shape ) : if s = = 1 : fixed _ axes = [ a + 1 if a > = i else a for a in fixed _ axes ... | [
-0.07358215749263763,
-0.5021969676017761,
0.44997933506965637,
0.12050773948431015,
-0.06777656078338623,
-0.2433674931526184,
0.15818871557712555,
0.9323843717575073,
0.0866420716047287,
1.2002590894699097,
0.07002104073762894,
0.2022658884525299,
-0.4769597053527832,
-0.8669843673706055... |
def test _ set _ parameter _ value _ long _ 0 ( self ) : pass | [
-0.5531458854675293,
0.1749652475118637,
0.7167478203773499,
-0.28682342171669006,
0.7445948123931885,
0.6181650757789612,
0.3898018002510071,
0.6923757195472717,
-0.47320055961608887,
-0.36428678035736084,
-0.6476072072982788,
0.575908362865448,
0.03352724760770798,
1.2264857292175293,
... |
def generate _ replacer ( search, replace ) : search = prepare _ for _ regex ( search ) replace = prepare _ for _ regex ( replace, task ='replace') search = re. compile ( search ) def _ inner ( pattern ) : return search. sub ( replace, pattern ) return _ inner | [
-0.8019070029258728,
-0.2494812309741974,
0.525613009929657,
-0.9831226468086243,
-0.9041073322296143,
-0.8237924575805664,
-0.6458132863044739,
1.709498643875122,
-0.594332754611969,
-0.35827529430389404,
-0.44028323888778687,
-0.48697707056999207,
-0.055132221430540085,
-0.24867610633373... |
def run ( self ) : self. pipeline. medium. insert ( ) pass | [
-0.1963706612586975,
0.6380319595336914,
0.1747628152370453,
-0.4361256957054138,
0.7368051409721375,
0.6278924345970154,
0.5658308863639832,
0.7196345925331116,
-0.6388298273086548,
-0.472952663898468,
-0.12331180274486542,
0.30926164984703064,
-0.9893222451210022,
0.3045315146446228,
-... |
def validatepagenumbers ( self ) : with transaction. atomic ( ) : prev _ page = 0 for page in self : if page. page _ number > prev _ page + 1 : # print ( " validatepagenumbers ", " prev _ page ", prev _ page, " cur _ page ", page. page _ number ) # debug page. page _ number = prev _ page + 1 page. save ( ) prev _ page ... | [
-0.07181011140346527,
-0.6337973475456238,
0.690645694732666,
0.5132035613059998,
0.8656735420227051,
-0.19742532074451447,
0.9032445549964905,
0.46483898162841797,
0.10340655595064163,
-0.005608737003058195,
0.21414312720298767,
-0.42232412099838257,
-0.3119775056838989,
0.935346841812133... |
def build _ apps ( self, app _ main _ obj _ targets, static _ lib _ targets ) : def build _ one _ app ( acc, app _ main _ obj ) : app _ name, _ = os. path. splitext ( str ( app _ main _ obj ) ) try : necessary _ lib _ targets = self. _ _ linked _ static _ lib _ targets ( app _ main _ obj, static _ lib _ targets ) excep... | [
-0.28907737135887146,
-0.7206667065620422,
0.6376776695251465,
0.7589318156242371,
0.6345528364181519,
0.8618329763412476,
0.21932892501354218,
0.6012603640556335,
0.8894904255867004,
0.5534774661064148,
0.4276202321052551,
0.6808079481124878,
0.2786037027835846,
-0.1522790491580963,
0.7... |
def dfs _ recursive ( self, starting _ vertex, destination _ vertex ) : stack = [ ] visited = [ false for x in range ( len ( self. vertices ) ) ] currentpath = [ ] pathlist = [ ] def dftutil ( self, vertex ) : nonlocal stack neighbors = self. get _ neighbors ( vertex ) nextvertex = none if not visited [ vertex - 1 ] : ... | [
0.17890828847885132,
0.677983283996582,
0.7591979503631592,
0.8858479857444763,
-0.8607334494590759,
-0.46926349401474,
0.6559994220733643,
-0.7234681844711304,
0.11973004788160324,
-0.16741690039634705,
-0.0744466632604599,
0.43397316336631775,
-0.5207700133323669,
0.07275749742984772,
... |
def delete _ event ( event ) : root = m. deleteitem ( m. itemids ( t. itemid ( id = event. id, changekey = event. change _ key ) ), deletetype = " harddelete ", sendmeetingcancellations = " sendtoallandsavecopy ", affectedtaskoccurrences = " alloccurrences " ) return root | [
0.8613184690475464,
-0.2502748966217041,
0.47747212648391724,
0.7639461755752563,
-0.15587157011032104,
0.07960264384746552,
0.5543405413627625,
0.6710401177406311,
0.6359006762504578,
0.5037174224853516,
0.07105749845504761,
-0.059564441442489624,
0.45677635073661804,
0.5281821489334106,
... |
def process ( pairs ) : multipliers = [ mpl. namemultiplier ( ), mpl. citymultiplier ( ), mpl. countrymultiplier ( ), mpl. locationmultiplier ( ), mpl. thingmultiplier ( ) ] for src, tgt in pairs : src = src. replace ('{ myname } ', myname ) tgt = tgt. replace ('{ myname } ', myname ) src = src. replace ('{ yourname } ... | [
-0.8224143981933594,
0.18630768358707428,
0.5117072463035583,
-1.1907198429107666,
-0.9526140689849854,
-0.3214223384857178,
-0.1687900274991989,
0.6876217722892761,
0.4104485511779785,
-0.153531014919281,
-1.064651608467102,
-0.4981275796890259,
-0.548076331615448,
0.338276743888855,
0.... |
def truncate ( self, size = none ) : pass | [
0.5681087970733643,
0.3827938437461853,
0.3443650007247925,
0.39028745889663696,
0.6407803893089294,
-0.620472252368927,
0.2746133804321289,
0.03592460975050926,
0.4405975937843323,
-1.081238031387329,
-1.3001993894577026,
0.6046621203422546,
-0.8170279860496521,
-0.5909356474876404,
-0.... |
def vnf _ cost _ from _ internal ( internal ) : ext = { } ext [ " cost " ] = internal [ " cost " ] ext [ " vnfid " ] = internal [ " vnf " ] ext [ " nfvipopid " ] = internal [ " host " ] return ext | [
-0.8391347527503967,
-0.5419701337814331,
0.22729426622390747,
-0.31859850883483887,
-1.2922210693359375,
-1.2640373706817627,
-1.2674903869628906,
0.12494239956140518,
-0.13078700006008148,
1.491825819015503,
-0.5970784425735474,
-0.7905630469322205,
-0.31787943840026855,
-0.1164278164505... |
def _ get _ probability _ of _ hypothesis _ if _ data ( self, x, hypothesis ) : probability = 1 # for each feature for feature in xrange ( self. _ features _ no ) : feature _ type = " continuous " if feature in self. _ continuous _ variables else " discrete " probability * = self. _ feature _ probability ( feature, x [... | [
0.44072115421295166,
0.4594443142414093,
0.5520532131195068,
0.9301801323890686,
0.44532307982444763,
-0.40424060821533203,
-0.6243034601211548,
0.49413231015205383,
-0.5700895190238953,
0.6998422145843506,
-0.4131227731704712,
0.20201899111270905,
-0.44532614946365356,
-0.4381996095180511... |
def cov2html ( coverage ) : ext = coverage. footprint. extent def _ get _ browse _ url ( coverage ) : bbox = ", ". join ( " %. 7g " % ext [ i ] for i in ( 1, 0, 3, 2 ) ) ext _ x = ext [ 2 ] - ext [ 0 ] ext _ y = ext [ 3 ] - ext [ 1 ] size _ x = max ( 1, int ( 200 * ( 1. 0 if ext _ x > ext _ y else ext _ x / ext _ y ) )... | [
-0.09739723801612854,
0.1985863596200943,
1.2845176458358765,
-0.15650783479213715,
-1.2618004083633423,
0.25937238335609436,
-0.016081398352980614,
-0.17073507606983185,
-0.4801523983478546,
1.1693816184997559,
0.6737467646598816,
-0.16104425489902496,
1.3580896854400635,
0.73988968133926... |
def invitecontact ( self, contact _ uid ) : c = self. _ core. _ contactlist _ manager. getcontact ( contact _ uid ) self. _ conv. invite _ user ( contact. papyon _ contact ) | [
0.3713901937007904,
-0.3124222159385681,
0.1675223559141159,
0.2346484512090683,
-0.4449087083339691,
0.21431156992912292,
-0.07940822839736938,
-0.5954628586769104,
0.8891340494155884,
0.13603515923023224,
-0.6427538990974426,
-0.17574508488178253,
-0.8975269794464111,
0.18745748698711395... |
def mask _ spectrogram ( spec, mask _ thresh _ std ) : return ( ( spec. t < ( np. median ( spec, axis = 1 ) + mask _ thresh _ std * np. std ( spec, axis = 1 ) ) + 1e - 5 ). astype ( " float32 " ). t ) | [
0.8874474167823792,
0.0325261689722538,
0.5601548552513123,
0.3173597455024719,
-0.30531132221221924,
0.5894721746444702,
0.1576927751302719,
-0.45306578278541565,
0.13860000669956207,
0.8111976385116577,
0.689985990524292,
0.13691167533397675,
-0.19129812717437744,
-0.7754843831062317,
... |
def getnoise ( self, noise _ num, maxlennoise = 40 ) : with torch. no _ grad ( ) : self. noise _ model. requires _ grad _ ( false ) noise = torch. zeros ( [ noise _ num, maxlennoise ], device = next ( self. noise _ model. parameters ( ) ). device, dtype = torch. long, ) ones = torch. ones ( [ noise _ num ], device = ne... | [
-0.6918743252754211,
0.577715277671814,
0.6265865564346313,
0.4163585603237152,
0.6164191365242004,
-0.5894894003868103,
0.13210682570934296,
0.5972097516059875,
0.22252975404262543,
0.15190069377422333,
-1.1339863538742065,
0.20272502303123474,
0.2580953538417816,
0.2255755513906479,
0.... |
def link ( self, z ) : return 1 / ( 1 + np. exp ( - z ) ) | [
-0.2355644851922989,
-0.5252513885498047,
0.35504797101020813,
0.40085291862487793,
0.5069982409477234,
0.891141951084137,
1.1464102268218994,
0.47160738706588745,
1.6079612970352173,
-1.0889440774917603,
0.4754062592983246,
0.7267659902572632,
-1.2402362823486328,
0.17128773033618927,
-... |
def _ change _ detected ( previous, current ) : return previous! = current | [
-0.29437294602394104,
-0.35873472690582275,
0.38378894329071045,
0.4876869320869446,
0.6183895468711853,
0.1594734787940979,
0.003482520580291748,
-0.3649120330810547,
-0.29666832089424133,
0.44246232509613037,
-0.3426136076450348,
1.086017370223999,
-0.5156112313270569,
-0.026717983186244... |
def reload _ menu ( ) : close _ menu ( ) show _ menu ( ) | [
-0.7632870674133301,
-0.5402626395225525,
0.23027954995632172,
0.8940380811691284,
-0.2689988315105438,
-0.011677857488393784,
0.2900453805923462,
0.933720588684082,
-0.2879355847835541,
-0.0014082590350881219,
0.4570191204547882,
1.1520333290100098,
-0.22241634130477905,
0.650190234184265... |
def get _ random _ gene ( ) : pass | [
-0.09611473977565765,
-0.1157185286283493,
0.24956366419792175,
1.0489065647125244,
-0.13926537334918976,
-0.2599528729915619,
0.06311104446649551,
0.5404564738273621,
-0.8921052813529968,
-1.1461122035980225,
-0.4937168061733246,
1.3267713785171509,
-0.7353081107139587,
-0.106737732887268... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.