text
stringlengths
25
2.19k
embedding
listlengths
768
768
def healthcheck ( self ) : return self. _ sdl. is _ active ( ) # if self. _ sdl. is _ active ( ) : # return true # return false
[ -0.5400974154472351, -0.634645938873291, 0.8575299978256226, 1.097801923751831, -0.3399234712123871, 0.7802386283874512, 0.41422539949417114, 0.13859203457832336, 0.2223653346300125, -0.8949774503707886, -0.02873685583472252, -0.13944214582443237, -0.6983996033668518, -0.4958229959011078, ...
def select _ template _ name ( templates ) : try : # django 1. 8 + template = select _ template ( templates ) template _ name = template. template. name except attributeerror : # django 1. 7 template _ name = template. name return template _ name
[ -0.7506071925163269, -0.48061859607696533, 0.38923582434654236, 0.3193105161190033, -1.6264394521713257, -1.1686650514602661, -0.029208602383732796, -0.8303546905517578, 1.0048750638961792, 1.4491077661514282, -0.1920754611492157, -0.775481104850769, 0.34536629915237427, -0.134716421365737...
def guess _ locations ( text ) : entities = machine. _ extract _ entity _ groups ( text ) location _ entity _ set = set ( location _ entities ) entity _ keys = entities. keys ( ) for k in entity _ keys : if not k in location _ entity _ set : del entities [ k ] return entities
[ -0.44110310077667236, -0.6943861842155457, 0.5149158239364624, 0.055502280592918396, -0.782657265663147, 0.6074249744415283, 0.5067954659461975, 0.5558035969734192, -0.3766724467277527, 0.4369078576564789, 0.45341160893440247, -0.5332763195037842, -0.4895344376564026, 0.2554604411125183, ...
def plot _ elec _ daily ( df ) : fig = plt. figure ( figsize = ( 12, 7 ) ) plt. plot ( df ['kwh']. resample ('d'). sum ( ), marker = '. ', markersize = 7 ) plt. ylabel ('electricity usage ( kwh )')
[ -0.23426814377307892, 1.0440057516098022, 0.6152036786079407, -0.4962473511695862, -0.4800972640514374, 0.3643369674682617, 0.41897907853126526, 0.2544829547405243, 0.12506887316703796, -0.03355902060866356, 0.6320447325706482, 0.6107538342475891, 1.2474122047424316, 0.4010485112667084, ...
def create _ from _ dict ( d ) : return toolset ( name = d ['name'], pkg _ info = d ['build - deps'], env _ vars = d ['env - vars'] )
[ 0.15376563370227814, -0.5000377297401428, 0.2060069888830185, -0.974303126335144, -0.6981217265129089, 0.5448551774024963, -0.4554068446159363, -0.9081504940986633, -0.3441355526447296, 0.06731593608856201, 0.05801552161574364, 0.12186155468225479, 1.213295340538025, 0.0021959668956696987,...
def target _ db _ server _ metadata ( self ) - >'outputs. dbservermetadataresponse': return pulumi. get ( self, " target _ db _ server _ metadata " )
[ -0.9069135189056396, 0.24589505791664124, 0.5083001255989075, -0.46830254793167114, 1.5787204504013062, 0.8556228876113892, -0.6408538222312927, -0.42481404542922974, 0.630824625492096, 0.8873963356018066, -0.506602942943573, 1.7436243295669556, 0.05753345042467117, -0.9830718040466309, ...
def getconnectionlogs ( self, parameters ) : logs = apiclient. devicelogs % ( self. host ) r = requests. get ( logs, auth = self. credentials, params = parameters, verify = self. verify ) status = r. status _ code if status = = 200 : self. logger. debug ( " connection logs were successfully obtained " ) return r. json ...
[ -1.6313658952713013, -0.2925182580947876, 0.7281883358955383, 0.3301478624343872, -0.4438721537590027, -0.10617467761039734, -0.5486966371536255, -0.8747234344482422, -0.673486590385437, 1.004854440689087, 0.2532961368560791, 0.656747043132782, -1.3322060108184814, 0.18168491125106812, 0...
def test _ call ( self ) : p = taxonassigner ( { } ) self. assertraises ( notimplementederror, p,'/ path / to / seqs')
[ -0.19743186235427856, 0.43276599049568176, 0.21404774487018585, -0.3862529695034027, -0.005141905974596739, 0.7857511043548584, 0.282793790102005, 0.06174112856388092, 0.460514098405838, 0.2014787644147873, 0.16508269309997559, -0.4923035502433777, -0.16580182313919067, 0.8798989057540894,...
def _ listify ( self, messages ) : if not isinstance ( messages, ( list, tuple ) ) : # make a list with one item messages = [ messages ] return messages
[ -1.1805213689804077, 0.2928561270236969, 0.485600084066391, 0.017920920625329018, 1.1576913595199585, -0.19594649970531464, -0.6420236825942993, -0.29653438925743103, 0.7546037435531616, 0.24836435914039612, -0.038540564477443695, -0.25177431106567383, -0.8559306859970093, 0.65942388772964...
def _ _ len _ _ ( self ) : log. warn ( " using the node - len method! " ) if self. attrs is none : return 0 if isinstance ( self. attrs, ( list, tuple ) ) : return len ( self. attrs ) return 1
[ -1.2692822217941284, 1.0915186405181885, 0.2846390902996063, -0.8045753836631775, 0.018683722242712975, -0.4756007790565491, 0.3402490019798279, 1.2651352882385254, 0.5707109570503235, -0.38439810276031494, 0.2640407383441925, 0.06757967174053192, 0.27359074354171753, 0.3197866976261139, ...
def rotate _ tensor ( l : torch. tensor, n : int = 1 ) - > torch. tensor : return torch. cat ( ( l [ n : ], l [ : n ] ) )
[ -0.8025007843971252, 0.8348046541213989, 0.38347142934799194, -0.44689705967903137, 0.6964890360832214, -0.19979017972946167, -0.7570656538009644, -0.5155991315841675, -0.07230650633573532, 0.46542394161224365, -0.7094781398773193, 0.00030586833599954844, -0.16151878237724304, -1.372405409...
def _ handle _ openflow _ portstatus ( self, event ) : if event. added : self. add _ port ( event. dpid, event. port, event. ofp. desc. hw _ addr ) elif event. deleted : self. del _ port ( event. dpid, event. port ) elif event. modified : if event. ofp. desc. config & of. ofppc _ port _ down = = 0 : # it's not down, so...
[ 1.0490198135375977, -0.4516374170780182, 0.7120221853256226, -0.23012390732765198, 0.9111899733543396, -0.3713952302932739, -0.07421661168336868, -0.1289425492286682, 1.0454152822494507, -0.27774056792259216, 0.31245875358581543, 0.021651659160852432, 0.2456546574831009, 0.5058677196502686...
def group _ by ( self, * columns ) : column _ map = { name : index for index, name, data _ type in self. _ _ columns } index _ list = tuple ( sorted ( column _ map. values ( ) ) ) schema = list ( self. schema ) tables = { } first = true for row _ dict in self. _ _ data _ area. values ( ) : interest = [ ] row = list ( r...
[ -0.6228285431861877, 0.9060985445976257, 0.7407576441764832, -0.34458404779434204, -0.12846869230270386, -0.25175032019615173, 0.8135645389556885, -0.5276719331741333, -0.7144415974617004, -0.07134465128183365, 0.04546605050563812, 0.21414682269096375, -0.5535264611244202, 0.45997819304466...
def parsexml ( filename ) : data = [ ] tree = et. parse ( filename ) # parse substructure for group in tree. findall ('group') : name = group. get ('name') smarts = group. find ('smarts'). text data. append ( ( name, smarts, none, none ) ) # parse descriptors for descriptor in tree. findall ('descriptor') : name = desc...
[ -0.5164636969566345, 0.01863561011850834, 0.5990958213806152, -0.7117647528648376, -0.5242530703544617, 0.32195064425468445, -0.8305047154426575, 0.3372057378292084, -0.5382627844810486, -0.26296889781951904, -0.8214529156684875, -0.5332509279251099, 0.39600494503974915, 0.3817379176616668...
def throwandsetrandomrun ( source, runsandprobs ) : from random import systemrandom totalprob = 0. for r, p in runsandprobs : totalprob + = p # this is the same random generator used to set the seeds for the randomnumbergeneratorservice random = systemrandom ( ) runprob = random. uniform ( 0, totalprob ) sumprob = 0 ru...
[ -0.10514932125806808, 0.12790702283382416, 0.5574323534965515, -0.0017935620853677392, -0.07231725752353668, 0.3124829828739166, 0.8753615617752075, -0.013280187733471394, 0.38520026206970215, -0.9749962687492371, -0.49613186717033386, 0.36724692583084106, -0.3319088816642761, 1.0212635993...
def result _ str ( self ) - > str : if self. exception : return " failed " return " passed "
[ -0.6844080686569214, -0.6732975840568542, 0.4957437515258789, 0.08572954684495926, -0.10288450121879578, 1.3164708614349365, -0.21752722561359406, -0.6958876848220825, -0.13701745867729187, -0.36375129222869873, 1.4502217769622803, 0.08578842133283615, -0.5566084384918213, -0.7601777315139...
def parse _ requirements ( requirements _ file ) : if os. path. exists ( requirements _ file ) : # return a list that contains each line of the requirements file return open ( requirements _ file,'r'). read ( ). splitlines ( ) else : print ( " error : requirements file " + requirements _ file + " not found. " ) sys. ex...
[ -0.04499315097928047, -0.7880051136016846, 0.5195582509040833, 0.28633013367652893, 0.7090951204299927, 0.5106400847434998, -0.40224066376686096, 0.9393979907035828, 0.004785100929439068, 0.858482837677002, 0.5802983641624451, -0.9429352283477783, -0.04048614203929901, 0.7227783203125, -...
def branch _ to _ path _ idx ( self, branch ) : return np. sign ( branch ) * self. _ branch _ to _ path _ idx [ abs ( branch ) - 1 ]
[ -1.2809195518493652, -0.830782949924469, 0.7184489369392395, 0.7997519969940186, 0.12815991044044495, 0.8565503358840942, 0.5193803310394287, -0.0920807272195816, 0.10301922261714935, 0.1822081357240677, -0.23991771042346954, 0.25089994072914124, -0.7123238444328308, -0.4117357134819031, ...
def _ create _ component ( self, comp _ conf, sim _ data ) : # pytau. start ( self. timers ['_ create _ component'] ) sim _ name = sim _ data. sim _ name path = comp _ conf ['bin _ path'] script = comp _ conf ['script']. rsplit ( '. ', 1 ) [ 0 ]. split ('/') [ - 1 ] endpath = comp _ conf ['script']. rfind ('/') # print...
[ 0.03493078425526619, -0.6109898090362549, 0.6446946859359741, -0.440793514251709, 0.2633137106895447, 0.05077991262078285, 0.9416988492012024, 0.32642319798469543, -0.43131133913993835, 0.6600663661956787, -0.09920944273471832, -0.30107390880584717, 0.41983407735824585, 0.418661504983902, ...
def test _ minimize _ poly _ 100d _ bounded _ sparse ( self ) : opt _ params = {'eta': 1,'eta _ min': 1,'eps': 1e - 12,'discrete': true,'bounds': cconstraintbox ( lb = - 1, ub = 1 ) } self. _ test _ minimize ( coptimizerpgdls,'poly - 100 - int - sparse ', opt _ params = opt _ params, label ='poly - int - sparse - discr...
[ 0.3082055449485779, -0.4490593671798706, 0.5512571334838867, 0.22852723300457, 0.5245397090911865, 0.7712376713752747, 0.2492113709449768, -0.8438672423362732, 1.1068041324615479, -0.43551933765411377, -0.8541600704193115, 0.05574871972203255, -0.101777583360672, -0.22427865862846375, 0....
def _ _ iter _ _ ( self ) : return iter ( self. _ scores )
[ 0.24027018249034882, -1.2476670742034912, 0.36181822419166565, -0.7655530571937561, 0.44415560364723206, 0.860531210899353, 0.029607707634568214, -1.3090286254882812, -0.29791921377182007, -0.39086923003196716, 1.0409094095230103, -0.003876790404319763, -0.0587860532104969, -0.427692413330...
def _ check _ existing _ route _ matches ( self, network, netmask, gateway ) : osutils = osutils _ factory. get _ os _ utils ( ) return len ( [ r for r in osutils. _ get _ ipv4 _ routing _ table ( ) if r [ 0 ] = = network and r [ 1 ] = = netmask and r [ 2 ] = = gateway ] ) > 0
[ -0.046826690435409546, -0.20993423461914062, 0.5905545353889465, 0.08159805834293365, 0.528156578540802, -0.1947157233953476, -0.07191576063632965, 0.65223228931427, -0.4395424723625183, 0.5721372365951538, 0.07367143034934998, -0.8651551008224487, -0.4578714668750763, 0.6744539737701416, ...
def test _ record _ priority _ field _ default ( self ) : # pass to home page self. client. get ( reverse ('hello : home') ) request _ store = requestsstore. objects. first ( ) # check record requeststore contains : # method -'get'and default priority - 0 self. assertequal ( request _ store. path,'/') self. assertequal...
[ 0.12823858857154846, 0.5941876769065857, 0.42967045307159424, 0.15329694747924805, 1.327191710472107, 0.7193976044654846, -0.22327932715415955, 0.866609513759613, 0.37674251198768616, -0.761471152305603, -0.04453202709555626, -0.446905255317688, -0.694747805595398, 0.38175341486930847, 0...
def start _ timestamp ( self ) - > optional [ pulumi. input [ str ] ] : return pulumi. get ( self, " start _ timestamp " )
[ 1.0291423797607422, 0.1857915222644806, 0.3570376932621002, 0.3058988153934479, 1.1723788976669312, 1.0072678327560425, 0.2842262089252472, 0.27755236625671387, 1.2589300870895386, 0.2623058557510376, -0.3541925251483917, 0.8012187480926514, 0.43795278668403625, -1.2424665689468384, -0.9...
def download _ chapter _ body _ in _ browser ( self, chapter : chapter ) - > str : raise notimplementederror ( )
[ -0.6596856117248535, -1.6676602363586426, 0.7054017186164856, 0.35929667949676514, -0.5314044952392578, 0.5684424638748169, 0.014720803126692772, -1.0489013195037842, 0.793696403503418, 0.43009066581726074, -0.21169845759868622, 0.06522607058286667, 0.29439109563827515, 1.1969047784805298,...
def setborder ( self, color, width ) : self. triangle. setborder ( color, width ) self. board. drawboard ( )
[ 0.6963076591491699, 0.8074373602867126, 0.3837810158729553, -0.3287302255630493, 1.2743784189224243, 0.5759226083755493, 0.2584837079048157, -0.3320617377758026, 1.0873409509658813, -0.950278103351593, -1.0173866748809814, 0.549533486366272, 0.11161293089389801, 0.4185771048069, -1.30633...
def random _ bounded _ uint32 _ fill ( bitgen, low, rng, size, dtype ) : out = np. empty ( size, dtype = dtype ) if rng = = 0 : for i in np. ndindex ( size ) : out [ i ] = low elif rng = = 0xffffffff : # lemire32 doesn't support rng = 0xffffffff. for i in np. ndindex ( size ) : out [ i ] = low + next _ uint32 ( bitgen ...
[ -0.50982666015625, 0.7261450290679932, 0.8345187306404114, -1.1832201480865479, 0.05848096311092377, 0.8411697149276733, -0.3630541265010834, -0.6426531076431274, 0.9340590834617615, -0.7076739072799683, -0.34172338247299194, 0.6774067282676697, -0.687813401222229, 0.7782816886901855, -0...
def with _ id ( self, id ) : b = self. _ copy ( ) b. config ['id'] = id return b
[ -0.3055930733680725, -0.4386829733848572, 0.4430820643901825, 0.5087324380874634, -0.4824746549129486, 0.626943826675415, -0.6855993866920471, -0.2429574877023697, 1.5752599239349365, -0.1494635045528412, -1.1051700115203857, 0.2799208164215088, -0.5532576441764832, -0.0839177668094635, ...
def _ random _ counts ( sample1, sample2, randoms, rbins, period, pbcs, num _ threads, do _ rr, do _ dr, _ sample1 _ is _ sample2, approx _ cell1 _ size, approx _ cell2 _ size, approx _ cellran _ size, ) : def nball _ volume ( r, k = 3 ) : " " " calculate the volume of a n - shpere. this is used for the analytical rand...
[ 0.3034358620643616, 0.39633843302726746, 0.7583528161048889, 0.5497398376464844, -0.4735044538974762, -0.08169218897819519, 0.5056869983673096, -0.7077157497406006, 0.23215298354625702, 0.16608041524887085, 0.355205774307251, 0.32993510365486145, 0.2672363221645355, 0.4191143214702606, 0...
def placeholder _ inputs ( batch _ size, timesteps, crop _ size, channels ) : images _ placeholder = tf. placeholder ( tf. float32, shape = ( batch _ size, timesteps, crop _ size, crop _ size, channels ) ) labels _ placeholder = tf. placeholder ( tf. int64, shape = ( batch _ size ) ) return images _ placeholder, labels...
[ -0.2943328022956848, -0.00499066011980176, 0.5626528263092041, -1.571223497390747, 0.20316515862941742, 0.5649996399879456, -0.09287969022989273, -0.0822555273771286, -0.28047245740890503, 0.5191807746887207, 0.17375019192695618, -0.43519094586372375, 0.38597676157951355, 0.052594646811485...
def token ( self, policy = none ) : return self. auth. upload _ token ( self. bucket, policy = policy )
[ -0.680923581123352, -0.35496416687965393, 0.23752623796463013, -0.11203780025243759, 0.35470178723335266, 0.6991608738899231, -0.3965305685997009, 0.05647198110818863, 0.30189791321754456, -0.5728451013565063, -0.9816340208053589, 0.8070670962333679, -0.10971765220165253, -0.93301814794540...
def test _ atomic _ hex _ binary _ min _ length _ 3 _ nistxml _ sv _ iv _ atomic _ hex _ binary _ min _ length _ 4 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / hexbinary / schema + instance / nistschema - sv - iv - atomic - hexbinary - minlength - 4. xsd ", instance ...
[ 0.3874436020851135, -0.0894739180803299, 0.4206072986125946, 0.39060840010643005, -0.05211819335818291, 0.30788734555244446, -0.6198285818099976, -0.29135826230049133, 0.31145599484443665, -0.09657585620880127, -0.46602174639701843, -0.8690047264099121, -0.7060604691505432, -0.015767214819...
def test _ edit _ specimen _ details _ anon ( self ) : with app. test _ client ( ) as client : resp = client. get ( " / specimen / 12 / edit _ details " ) self. assertequal ( resp. status _ code, 401 )
[ -0.28683504462242126, -0.07549092918634415, 0.23878113925457, 0.19462019205093384, -0.054612331092357635, 0.7142999768257141, -0.07263938337564468, 0.4093773663043976, 0.15163515508174896, -0.3128087520599365, -0.32822808623313904, 1.3448163270950317, -0.019302355125546455, -0.092618048191...
def swisspairings ( ) : # connect to the database conn = connect ( ) curs = conn. cursor ( ) # query the database for th eplayers id, name, and order by the number of wins query = " select players. player _ id, name from matches join players on matches. player _ id = players. player _ id order by wins desc " curs. exec...
[ -0.6150310039520264, -0.09781628847122192, 0.8057949542999268, 0.503916323184967, -0.585877001285553, 0.13754047453403473, -0.6164461970329285, 0.7026996612548828, 0.18377013504505157, 0.6799567937850952, -0.8565533757209778, -1.008303165435791, -0.8610515594482422, 0.3915274739265442, 0...
def hessian _ vector _ product ( model, vector, cg _ damping ) : model. zero _ grad ( ) mean _ kl _ div = mean _ kl _ divergence ( model ) kl _ grad = torch. autograd. grad ( mean _ kl _ div, model. parameters ( ), create _ graph = true ) kl _ grad _ vector = torch. cat ( [ grad. view ( - 1 ) for grad in kl _ grad ] ) ...
[ -0.38602516055107117, 0.08243988454341888, 0.8715860247612, 0.4405082166194916, -0.1951490193605423, 0.6474365592002869, 0.5413183569908142, -0.17443113029003143, -0.25642338395118713, 0.681570291519165, -0.028391676023602486, 0.2563911974430084, -0.6411944627761841, 0.3550678789615631, ...
def test _ instantiate _ donlib _ halo _ events ( self, monkeypatch ) : config = self. instantiate _ donlib _ config _ good ( monkeypatch ) assert donlib. haloevents ( config )
[ 0.04903937876224518, -0.17735005915164948, 0.477946400642395, 0.08653391897678375, 0.6535481810569763, 1.043052315711975, 0.6049011945724487, 0.6403167843818665, 0.2482919543981552, -0.6725913286209106, -1.3744347095489502, -0.28865084052085876, -0.07635074108839035, 0.11515960842370987, ...
def parse _ dhcp _ leases ( ) : s = dict ( ) with open ('/ var / dhcp. leases') as f : for line in f. readlines ( ) : match = dhcp _ leases _ patterns. match ( line ) if match is not none : s [ match. group ('mac') ] = match. group ('ip') return s
[ 0.012313751503825188, 0.2436973750591278, 0.4398706555366516, -0.3553183078765869, -0.9436300992965698, 0.12913909554481506, -0.3236904740333557, 0.9900460243225098, -1.0525768995285034, -0.03200457617640495, -0.08395686745643616, -1.0454260110855103, 0.04887726902961731, 0.023033538833260...
async def test _ options _ flow _ init ( hass : homeassistant ) - > none : config _ entry = mockconfigentry ( domain = domain, title = " nina ", data = { conf _ headline _ filter : deepcopy ( dummy _ data [ conf _ headline _ filter ] ), conf _ area _ filter : deepcopy ( dummy _ data [ conf _ area _ filter ] ), conf _ m...
[ -0.06570397317409515, -0.15796256065368652, 0.5437425971031189, -0.4775678515434265, 0.9294087886810303, -0.29623523354530334, 0.35917171835899353, -0.4064061641693115, 0.22329415380954742, -0.18083135783672333, -0.8321821689605713, 0.3960525393486023, 0.4832458198070526, 0.727380990982055...
def _ schedule _ call ( self ) - > none : if self. _ timerhandle is none : ts = time. mktime ( self. _ start _ at. timetuple ( ) ) delay = max ( 0, ts - time. time ( ) ) self. _ timerhandle = self. _ loop. call _ later ( delay, self. _ callback ) else : self. _ timerhandle = self. _ loop. call _ later ( self. _ period,...
[ -0.0006449277279898524, 0.4603888690471649, 0.4889235198497772, 0.27827998995780945, 0.5016496777534485, 0.3007812798023224, -0.43928125500679016, 0.3170551061630249, -0.5127280950546265, -0.6609259843826294, 0.6218381524085999, 0.044006504118442535, -0.24299463629722595, 0.181273713707923...
def _ get _ ip _ address _ discovery _ ports ( app ) : if not _ is _ legacy _ ip _ per _ task ( app ) : return none return app ['ipaddress'] ['discovery'] ['ports']
[ 1.0274500846862793, 1.0864986181259155, 0.4018000364303589, 0.6926320791244507, -0.053442854434251785, -0.8155595064163208, 0.27624842524528503, 0.23006334900856018, 0.46209701895713806, 0.30603548884391785, 0.3376421630382538, -0.4934520125389099, 1.037489652633667, -0.23307591676712036, ...
def show _ playlist ( self ) : length = len ( self. selected _ playlist ) indexes = [ index + 1 for index in range ( length ) ] items = list ( zip ( indexes, self. selected _ playlist ) ) print ( " * " * 150 ) for item in items : print ( item [ 0 ], " - - - - > ", item [ 1 ] ) print ( " * " * 150 )
[ -0.16603714227676392, -0.48741671442985535, 0.4553675353527069, 0.005652169231325388, -0.09034807235002518, -0.10882576555013657, 1.0905587673187256, -0.046040136367082596, 0.34586280584335327, 0.8294787406921387, -0.6162973046302795, 1.7992522716522217, -0.5148610472679138, 0.059962160885...
def make _ tmp _ dir ( dirname = none ) : if dirname and not tf. io. gfile. exists ( dirname ) : tf. io. gfile. makedirs ( dirname ) return tempfile. mkdtemp ( dir = dirname )
[ -0.30037301778793335, 0.7722988128662109, 0.47491076588630676, -0.6333250403404236, -0.048595525324344635, -0.267234742641449, 1.4206291437149048, 0.009289927780628204, -0.3861716091632843, -0.5850902795791626, -0.27673274278640747, -1.0434681177139282, -0.5085272789001465, -0.822994589805...
def deletedomainmapping ( self, domain ) : request = self. messages. appengineappsdomainmappingsdeleterequest ( name = self. _ formatdomainmapping ( domain ) ) operation = self. client. apps _ domainmappings. delete ( request ) operations _ util. waitforoperation ( self. client. apps _ operations, operation )
[ -1.262579321861267, 0.4840772747993469, 0.16127878427505493, 0.46326589584350586, -0.13740387558937073, 0.5234710574150085, -0.034309063106775284, -0.1008584201335907, 0.8260512351989746, -0.5518463253974915, 0.15204843878746033, 0.5268648266792297, 0.21362021565437317, 0.46262359619140625...
def evaluate _ model ( model, x _ test, y _ test ) : y _ pred = model. predict ( x _ test ) for i in range ( 0, len ( y _ test [ 1, : ] ) ) : print ( classification _ report ( y _ test [ :, i ], y _ pred [ :, i ] ) )
[ -0.10023161768913269, -0.061415787786245346, 0.29778853058815, -0.5583506226539612, 0.3158673942089081, 0.2626689076423645, -0.034982796758413315, 0.3610716164112091, -1.2907254695892334, -0.2671200633049011, -0.2495330274105072, 0.9369820356369019, 0.5469537377357483, 0.596911609172821, ...
def lambda _ handler ( event, context ) : print ( " event. session. application. applicationid = " + event ['session'] ['application'] ['applicationid'] ) " " " uncomment this if statement and populate with your skill's application id to prevent someone else from configuring a skill that sends requests to this function...
[ 0.6392517685890198, -1.071495771408081, 0.8388180136680603, 0.5280237793922424, -0.28238898515701294, 0.04351579397916794, -0.14938609302043915, -0.819647490978241, 1.3216633796691895, 0.21656779944896698, 0.10148411244153976, 0.5739363431930542, 0.885385274887085, 0.1267877221107483, 0....
def convert _ yoshi _ to _ proseco _ params ( obsid, detector, chipx, chipy, chip _ id, ra _ targ, dec _ targ, roll _ targ, offset _ y, offset _ z, sim _ offset, focus _ offset, dither _ y, dither _ z, obs _ date, t _ ccd, man _ angle, * * kwargs, ) : if offset _ y is np. ma. masked : offset _ y = 0. 0 if offset _ z is...
[ 0.10920920222997665, -0.731641948223114, 0.7680870890617371, -0.8686913251876831, -1.2291676998138428, -0.6565224528312683, -0.1863931268453598, 0.17286616563796997, -0.48277610540390015, 0.5118194818496704, -0.3947620987892151, 0.6004727482795715, 1.064345359802246, 0.9248808026313782, ...
def get _ filter _ summary ( self, rec ) : def wrapper ( item ) : f = [ rec. get ( k ) = = item. get ( k ) for k in [ " ident ", " lon ", " lat ", " rep _ memo ", " trange ", " level ", " var " ] if k in rec ] if rec. get ( " datemin " ) : f. append ( any ( [ rec. get ( " datemin " ) < = item. get ( " datemax " ), item...
[ -1.1108204126358032, 0.07333949953317642, 0.597750186920166, -0.2761821150779724, -0.9925692081451416, 0.1300240010023117, -0.5552211999893188, -0.1039930209517479, 0.0138615183532238, 0.43181607127189636, -0.10409018397331238, 0.6611025929450989, 0.6193059682846069, -0.14163964986801147, ...
def typed ( token ) : try : value = int ( token ) return value except valueerror : pass try : value = float ( token ) return value except valueerror : pass return token
[ 0.09326861053705215, 0.071840301156044, 0.7260023951530457, -0.3910244405269623, 0.5992006063461304, 0.14910092949867249, -0.01780949905514717, -0.8467094302177429, -0.5740917921066284, -0.8533229827880859, 0.055791717022657394, 0.3903912901878357, -0.7083531618118286, 0.007771038915961981...
def calculate _ l2 ( s1, distances, choice _ alphas, unique _ alt _ profiles _ expanded, minimize _ distance = false ) : # at the moment, in s1 in the possible signal dimension, # the signals that are not compatible with the alternatives # profile dimension are all 0. therefore, dividing # by the sum produced nans. how...
[ 0.6998108625411987, -0.7696207165718079, 0.46785351634025574, -0.20121236145496368, -0.9100685119628906, 0.29648274183273315, -0.2099781483411789, 0.8209563493728638, 0.3043833374977112, 0.584409773349762, -0.49624112248420715, 0.21145807206630707, 0.35079827904701233, -0.384614497423172, ...
def update ( self ) : for label, keywordstr in self. _ _ curr _ terms : self. _ freqs [ ( label, keywordstr ) ] + = 1 self. _ all _ freqs [ keywordstr ] + = 1 for kw in self. _ terms [ keywordstr ]. keywords : self. _ all _ keywords [ kw ] + = 1 self. _ _ curr _ terms = set ( )
[ -0.23362267017364502, -0.8729201555252075, 0.32410144805908203, -0.9456491470336914, -0.2398742139339447, -0.4859806299209595, -0.3797466456890106, -0.00015413279470521957, -0.29668909311294556, -0.36168116331100464, 0.28677788376808167, 0.1425732672214508, -0.03226850554347038, 0.60814237...
def token _ id ( self ) - > pulumi. input [ str ] : return pulumi. get ( self, " token _ id " )
[ 0.9917160272598267, -0.021667158231139183, 0.28438764810562134, 0.32690098881721497, 1.1392710208892822, 1.4463363885879517, 0.4209967255592346, 0.8085401654243469, 1.1756759881973267, -0.6015589237213135, -0.14576123654842377, 1.4154393672943115, 0.6363518834114075, -0.8562798500061035, ...
def _ browse _ path ( self, platform ) : # create the dialog folder _ path = qtgui. qfiledialog. getexistingdirectory ( parent = self, caption = " choose storage root folder ", options = qtgui. qfiledialog. dontresolvesymlinks | qtgui. qfiledialog. dontusenativedialog | qtgui. qfiledialog. showdirsonly, ) if not folder...
[ 0.1080780178308487, 0.15535558760166168, 0.6904592514038086, 0.5715702176094055, -0.45749014616012573, 0.24117347598075867, 1.070648431777954, -0.3644665479660034, -0.8178786039352417, -0.32195329666137695, -0.10559860616922379, 0.8244767785072327, 0.131143257021904, 0.20792776346206665, ...
def test _ normal _ conditions _ grow ( self, graph ) : adj = ( ( 0, 1, 0, 0, 0, 0, 0 ), ( 1, 0, 1, 1, 0, 0, 0 ), ( 0, 1, 0, 1, 0, 1, 1 ), ( 0, 1, 1, 0, 1, 0, 0 ), ( 0, 0, 0, 1, 0, 0, 0 ), ( 0, 0, 1, 0, 0, 0, 0 ), ( 0, 0, 1, 0, 0, 0, 0 ), ) graph = nx. graph ( 0. 5 * np. array ( adj ) ) # multiply by 0. 5 to follow wei...
[ 0.3761279284954071, 0.8867289423942566, 0.89568030834198, 0.6924669146537781, 0.12414651364088058, 0.9370361566543579, 0.7801953554153442, -0.30778011679649353, 0.00044981070095673203, -0.14928504824638367, 0.23835571110248566, -0.4683918356895447, -0.5350462794303894, -0.402754008769989, ...
def main ( ) : start _ time = datetime. now ( ) procs = [ ] for a _ device in devices : my _ proc = process ( target = show _ version, args = ( a _ device, ) ) my _ proc. start ( ) procs. append ( my _ proc ) for a _ proc in procs : print ( a _ proc ) a _ proc. join ( ) print ( " \ nelapsed time : " + str ( datetime. n...
[ 0.39002183079719543, -0.32374686002731323, 0.9293110370635986, 0.4925045371055603, 0.1015482023358345, 0.3409944474697113, 0.5029265284538269, 0.19027264416217804, -0.10518599301576614, 0.40344664454460144, 0.17618350684642792, 1.010769009590149, 0.3593488037586212, 0.7963865995407104, 0...
def get _ arguments ( callable, exclude ) : info = arginfo ( callable ) defaults = info. defaults or [ ] defaults = [ none ] * ( len ( info. args ) - len ( defaults ) ) + list ( defaults ) return { name : default for ( name, default ) in zip ( info. args, defaults ) if name not in exclude }
[ -0.3384448289871216, 0.6445895433425903, 0.6203778386116028, -0.16400951147079468, -0.466766357421875, -0.7756056785583496, -0.8008172512054443, 0.2861499488353729, -0.5040937662124634, 0.7733699083328247, -0.787955641746521, -0.35307905077934265, -0.5889822244644165, 0.12833787500858307, ...
def load _ z ( self ) : self. z = self. read _ var ( self. zvar ) self. test _ shape ( self. zvar, self. z. shape, 2 )
[ -0.0032237626146525145, -0.8696784973144531, 0.27160316705703735, 0.20495782792568207, -0.12426083534955978, -0.5988612174987793, 1.4823065996170044, 0.0766834020614624, 0.34842395782470703, -0.9998950958251953, -0.582512378692627, 0.6939608454704285, -0.012611042708158493, -0.016865571960...
def lookup _ type ( self ) : if self. stage = = " pos " : return 8 else : return 6
[ -0.6305347084999084, -0.26371654868125916, 0.6571072340011597, -0.0004946956178173423, 0.45761188864707947, 0.1004449799656868, 0.8170688152313232, -0.23360875248908997, 0.5451363921165466, 0.4392189681529999, 0.14810124039649963, -0.8022369742393494, 0.16748954355716705, 0.065661378204822...
def remove ( self ) : # decrement class variables residue _ with _ traj. list. remove ( self ) residue _ with _ traj. number - = 1 del self
[ -0.41263461112976074, -0.16356132924556732, 0.438882440328598, -0.20906683802604675, -0.041186314076185226, 0.057483818382024765, 0.7123532295227051, 0.694286048412323, 0.20048002898693085, -0.29454055428504944, -0.700354278087616, -0.605289876461029, -0.3623553514480591, 0.206918805837631...
def include ( parent _ parser : argparse. _ subparsersaction, parents : dict ) : config _ parser = parent _ parser. add _ parser ( " config ", description = " configure censys search api settings ", help = " configure censys search api settings ", ) config _ parser. set _ defaults ( func = cli _ config )
[ 0.3647819459438324, 0.16710588335990906, 0.5568773746490479, 0.4020645320415497, 0.43203458189964294, -0.10141322016716003, -0.685575008392334, 0.3373692035675049, -0.5715754628181458, 0.264311820268631, -0.454178124666214, -0.7378740310668945, -0.10861856490373611, 1.200522780418396, 0....
def gen ( source # either a list of lines of a path to the source code, target = none # either save to this file or return the generated documentation, fun = none # use ` ` # gen _ < fun > ( lns, * * kw ) : ` ` to extract the documtenation, * * kw # kw arguments to the gen _ < fun > ( ) function ) : if isinstance ( sou...
[ -0.5697961449623108, 0.652587890625, 0.7336930632591248, 0.4083177149295807, 0.0963350310921669, -0.022905873134732246, 0.6623473167419434, 0.6221391558647156, -0.26028621196746826, -0.034173622727394104, -0.9496679306030273, 0.11137065291404724, 0.49747148156166077, 0.08263295143842697, ...
def test _ atomic _ hex _ binary _ pattern _ 3 _ nistxml _ sv _ iv _ atomic _ hex _ binary _ pattern _ 4 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / hexbinary / schema + instance / nistschema - sv - iv - atomic - hexbinary - pattern - 4. xsd ", instance = " nistdata...
[ -0.0901765525341034, -0.09526016563177109, 0.5533322095870972, 0.7464934587478638, -0.21912558376789093, 0.5759677290916443, 0.04023964703083038, 0.14350324869155884, -0.5981861352920532, 0.31657636165618896, -1.0352858304977417, -0.6426284313201904, -0.3583662211894989, -0.001866887905634...
def test _ get _ file _ metadata _ command ( mocker ) : from crowdstrikemalquery import get _ file _ metadata _ command hr ='| arcyess | 484872 | pe32 | 2014 / 05 / 09 | malware | 43c596cabeb4c1d335ce53c3c7c4c392 |'\'b32c34ab09e8c20e1ed93a72bcc5424a982d3042 | accc6794951290467e01b7676e8b4ba177076d54f836589ea7d3298cdf6f...
[ 0.699718177318573, -0.08125240355730057, 1.1586930751800537, -0.5986688137054443, 1.205109715461731, 0.2780148386955261, 0.39328157901763916, -0.23841705918312073, -0.6751750111579895, -0.2151811420917511, -0.44612938165664673, -0.12838643789291382, -0.25301414728164673, -0.576303064823150...
def test _ record _ update _ too _ large ( ) : with open ( '. / src / test / cve _ tests / cve _ record _ fixtures / cve - 2021 - 0004 _ largeinput. json') as json _ file : data = json. load ( json _ file ) res = requests. put ( f'{ env. awg _ base _ url } { cve _ url } / cve - 2021 - 0004 ', headers = utils. base _ he...
[ 0.21723319590091705, 0.6144646406173706, 0.6319296956062317, -0.9954786896705627, 0.051559705287218094, 0.5978025197982788, -0.21173527836799622, -0.1363132894039154, 0.268026202917099, 0.5689377784729004, -0.689024031162262, 0.3034593462944031, -0.015283257700502872, -0.21680143475532532,...
def save _ local ( ) : local =''. join ( bookmark. local ( ) for bookmark in bookmarks if bookmark. method is'local') config. set _ and _ save ('rooms ', local )
[ -0.2799761891365051, -0.2647009491920471, 0.32344862818717957, 0.5884395837783813, 0.627671480178833, 0.04943911358714104, 0.3160147964954376, 0.7415545582771301, -0.7097256183624268, 1.0271658897399902, -1.9194371700286865, 0.12880322337150574, -0.3882204592227936, 1.3834222555160522, -...
def set _ smearer ( self, smearer = true ) : self. smearer = smearer
[ -0.6404945254325867, 0.616264283657074, 0.41497817635536194, 0.3672843277454376, -1.1291759014129639, 0.1778048276901245, -0.1477975994348526, 0.6828128695487976, 0.4008932411670685, 0.5456818342208862, -1.9081127643585205, 0.1080138087272644, -0.9065667986869812, 1.2325749397277832, -0....
def releaser _ after ( self, data ) : self. released _ version = data ['version']
[ 0.2278638780117035, -1.3418630361557007, 0.07550474256277084, -0.29488447308540344, -0.5159758925437927, 0.19772885739803314, -0.22854949533939362, 0.5074242353439331, 0.4787638783454895, 0.46725931763648987, -1.438767433166504, 0.021327927708625793, 0.028817228972911835, 0.494811505079269...
def from _ string ( string, typcls ) : s = stringstream ( string ) return s. read _ value ( typcls. _ ep _ typedesc )
[ 0.5315408110618591, -0.4128605127334595, 0.20302541553974152, -0.22755789756774902, -0.7090738415718079, 0.1707991063594818, -0.27605757117271423, -0.8352409601211548, 0.18335819244384766, -0.4092099666595459, 0.4568482041358948, 0.7974904179573059, -0.7462450265884399, -1.380318522453308,...
def _ _ init _ _ ( self, m, seq _ length, eta, sig, epochs ) : self. m = m # hidden units self. seq _ length = seq _ length self. eta = eta # learning rate self. sig = sig # variance when initializing weights self. epochs = epochs
[ 0.6433507800102234, -0.11175587028265, 0.5555663704872131, 0.39947202801704407, 0.3257712125778198, -0.10345984250307083, -0.3258153796195984, 0.4428360164165497, -0.09388550370931625, 0.4384700357913971, -0.4575636386871338, -0.07694924622774124, 0.7174584269523621, 0.7747974395751953, ...
def _ _ init _ _ ( self, file ) : self. data = { } self. report _ date = { } self. industry = { } with open ( file ) as f : skip = true for line in f : if skip : # skip header skip = false continue # split line of : 0 : gvkey, 1 : datadate, 2 : fyearq, 3 : fqtr, 4 : tic, 5 : rdq, 6 : ceqq, 7 : spcindcd current = line. ...
[ -0.0639345571398735, -0.4928571581840515, 0.6409345269203186, -0.3403036296367645, -0.2814147472381592, 0.3383280336856842, 0.21800628304481506, 0.660561203956604, -1.064211368560791, -0.06841100007295609, 0.08847936242818832, -0.18140287697315216, -0.5286816954612732, 0.2839925289154053, ...
def main ( args ) : try : result = yaml _ generator ( args ) if result is not none : destinationpath = os. path. join ( args. destination, args. output _ file _ name ) if os. path. exists ( destinationpath ) : raise exception ( " you cannot overwrite an existing file : { } ". format ( destinationpath ) ) else : with op...
[ 0.3025372326374054, -0.49096444249153137, 1.0823360681533813, 0.5654803514480591, 0.5576658844947815, 0.3308489918708801, 1.1405702829360962, 0.7803534865379333, -1.1988673210144043, 0.11140494048595428, 0.8597062230110168, -0.4844737648963928, 0.3397550582885742, -0.056792981922626495, ...
def convert _ to _ bitcompressed _ line ( k, d, coprime _ x, parts ) : # todo move to misc _ utils, only used by misc / convert _ rle. py assert len ( parts ) = = 4, parts m = parts [ 0 ] coprimes = [ x for x in coprime _ x if math. gcd ( m * k + x, d ) = = 1 ] # xxx : could avoid set here by walking chain ( reversed (...
[ -0.10998868942260742, -0.18119323253631592, 0.832648515701294, -0.2472250908613205, 0.1842527836561203, 0.11670196801424026, -0.8680548667907715, -0.3696630597114563, -0.2725021541118622, -0.12620078027248383, -0.23518559336662292, -0.389472633600235, -0.5171617269515991, -0.41005611419677...
def launch ( url = none, wait _ seconds _ after _ launch = 10 ) : # start a new browser session browser _ driver = webdriver. safari ( ) if url : # launch the url browser _ driver. get ( url ) # maximize the browser window browser _ driver. maximize _ window ( ) # keep the session open for x seconds sleep ( wait _ seco...
[ 0.0375768207013607, -0.25737395882606506, 0.5336548686027527, 1.4548410177230835, -0.7906611561775208, -0.5939701199531555, -0.19724702835083008, 1.1344802379608154, 1.6477049589157104, -0.008512366563081741, -0.22511833906173706, 0.12576502561569214, -0.12435973435640335, 0.09128558635711...
def write ( self, value, n = none, reverse = false, invert = false ) : if not isinstance ( n, int ) : raise exception ('input n must be int, not % s'% repr ( type ( n ) ) ) if n = = 0 : return start _ pos = self. bit _ seek _ pos end _ pos = self. bit _ seek _ pos + n start _ byte _ pos, start _ remainder _ bits = divm...
[ -1.5295416116714478, 0.7386212944984436, 0.941260814666748, -0.43327444791793823, 0.2257297933101654, 0.16607582569122314, 0.8101019859313965, 0.005814860574901104, 0.33208993077278137, -0.004864273127168417, -0.8408627510070801, 0.1343395709991455, -0.8400774002075195, 0.6299057602882385,...
def sign _ up ( clientid = none, secrethash = none, username = none, password = none, userattributes = none, validationdata = none ) : pass
[ -0.46179524064064026, -0.010386249050498009, 0.4438577890396118, 0.5178044438362122, -0.1997731775045395, 0.10627257823944092, 0.4943195879459381, 0.8018648028373718, -0.34629371762275696, -0.29187941551208496, -0.7698581218719482, 0.35371145606040955, -0.2583993971347809, -0.4968934357166...
def _ check _ path ( p ) : for a, b in zip ( p [ : - 1 ], p [ 1 : ] ) : if adjacency [ a [ 0 ] ] [ b [ 0 ] ]! = a [ 2 ] : return false if adjacency [ b [ 0 ] ] [ a [ 0 ] ]! = b [ 1 ] : return false return true
[ -0.20926357805728912, 0.012537555769085884, 0.7103148698806763, 0.7092686295509338, 0.23066425323486328, 0.9258509874343872, 0.33164718747138977, 0.16485947370529175, -0.029001621529459953, 0.8516538739204407, 0.3785575330257416, -0.4968356192111969, -0.9367789030075073, -0.861146271228790...
def test _ atomic _ language _ white _ space _ nistxml _ sv _ iv _ atomic _ language _ white _ space _ 1 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / language / schema + instance / nistschema - sv - iv - atomic - language - whitespace - 1. xsd ", instance = " nistdat...
[ -0.10424140840768814, -0.14767156541347504, 0.2635940909385681, 0.12664134800434113, -0.12043827772140503, -0.04335958510637283, 0.40696805715560913, -0.556242823600769, 0.6445297002792358, 0.5944844484329224, 0.256591260433197, -0.05704187974333763, -0.42142239212989807, 0.790814340114593...
def current _ time ( ) : return datetime. datetime. now ( ). strftime ( " % i : % m : % s % p " )
[ -0.3697669506072998, -1.868800401687622, 0.6920433044433594, -0.6838744282722473, -0.029480092227458954, 1.055812120437622, -0.8867799043655396, 0.3394887447357178, -0.9826756119728088, 2.3112120628356934, 0.6126535534858704, -0.4190349578857422, -0.5952768325805664, -1.0026724338531494, ...
def create _ tree _ view _ popup ( self, start _ path = " / home ", callback = none, directory = false ) : # self. popup _ window = qwidget ( ) actual _ path = none if not os. path. isdir ( start _ path ) and os. path. isfile ( start _ path ) : path _ arr = start _ path. split ('/') path _ arr. pop ( len ( path _ arr )...
[ 0.31539037823677063, -0.5121694803237915, 0.6597442626953125, -0.04402722790837288, -0.3961878716945648, -0.26295390725135803, 1.4010646343231201, 1.046626091003418, 0.01755860075354576, -0.5644046068191528, 0.5916406512260437, 0.4083994925022125, -0.24034279584884644, 0.6587647199630737, ...
def save _ access _ token ( self, token, request ) : raise notimplementederror ( " subclasses must implement this function. " )
[ -1.281726598739624, -0.8939881324768066, 0.6839802861213684, 0.23758471012115479, 0.19559428095817566, 0.2461666762828827, 0.020996728911995888, -0.14214973151683807, -0.05794103071093559, -0.19889526069164276, -0.6416957974433899, 0.2633529603481293, 0.4707310199737549, 0.3279101550579071...
def resetauthinfo ( ) : dict ['authentication'] = {'loggedinsince': 0. 0,'failedlogincount': 0,'animepremium': false,'dramapremium': false }
[ -0.9142034649848938, -0.635674774646759, 0.27384722232818604, -0.028035666793584824, -0.31715676188468933, 0.42880865931510925, 0.058483123779296875, 0.09990253299474716, 0.021606137976050377, 0.31654977798461914, -0.7116521000862122, 1.037125825881958, -0.38598477840423584, -0.69365108013...
def test _ example _ input _ one _ fields _ label _ entity ( self, ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) : input _ page = inputpage ( ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) input _ page. create _ new _ input. select ( " example input one " ) self. assert _ util ( inp...
[ -0.7100319266319275, -0.546765148639679, 0.7128753066062927, -0.2903980314731598, 0.9024072885513306, 1.1111892461776733, 0.04361254349350929, -0.5136691927909851, 0.5926969051361084, 0.3551310896873474, -0.18042156100273132, -0.35361841320991516, 0.2167106419801712, -0.020748408511281013,...
def metrics ( self ) : raise notimplementederror ( )
[ -0.05976925790309906, 0.14621664583683014, 0.526006281375885, 0.1760072112083435, -0.11221287399530411, 1.3254916667938232, 0.6794543266296387, 0.02831319533288479, -0.14890563488006592, -0.5848097801208496, 0.05889135226607323, -0.08537662774324417, 0.4270283281803131, 0.5779617428779602,...
def _ trace ( self, frame, event, arg _ unused ) : cur _ time = time. time ( ) lineno = frame. f _ lineno depth = self. depth filename = inspect. getfile ( frame ) if self. last _ exc _ back : if frame = = self. last _ exc _ back : self. data ['time _ spent'] + = ( cur _ time - self. start _ time ) self. depth - = 1 se...
[ 0.45919644832611084, 0.861805260181427, 1.0265785455703735, -0.6274462342262268, 0.26137682795524597, -0.6196271181106567, 0.03443647921085358, -0.5414494872093201, 0.008499562740325928, -0.1743398904800415, -0.464578777551651, 0.11580972373485565, -0.10476252436637878, 0.43701082468032837...
def test _ edit _ specimen _ img _ anon ( self ) : with app. test _ client ( ) as client : resp = client. get ( " / specimen / 12 / edit _ image " ) self. assertequal ( resp. status _ code, 401 )
[ -0.8767558336257935, -0.03401637822389603, 0.2210070937871933, 0.27730992436408997, -0.09534487873315811, 0.45072779059410095, 0.15219758450984955, 0.7282505631446838, 0.07887552678585052, 0.39959409832954407, -0.07905491441488266, 1.367517352104187, 0.011819851584732533, 0.234029576182365...
def trace _ marche ( m, nom _ de _ fichier ) : plt. clf ( ) n = len ( m ) plt. plot ( list ( range ( n ) ), m, label ='$ s _ n $') plt. xlabel ('$ n $') plt. title ( " trace de l'evolution de la marche $ s $ " ) plt. legend ( loc = 0 ) plt. savefig ( nom _ de _ fichier )
[ 1.3105387687683105, 0.32998716831207275, 0.5669934153556824, -0.334046870470047, 0.42494499683380127, 0.712028443813324, 0.4579608738422394, 0.3993992805480957, -0.07995276898145676, 0.3268628716468811, -1.1575576066970825, 0.5419729948043823, 0.4376278817653656, 0.2509702444076538, -0.3...
def has _ won ( board, player ) : p = player if ( ( board [ p, 0, 0 ] and board [ p, 1, 1 ] and board [ p, 2, 2 ] ) or ( board [ p, 2, 0 ] and board [ p, 1, 1 ] and board [ p, 0, 2 ] ) ) : return true for x in range ( 3 ) : if ( ( board [ p, x, 0 ] and board [ p, x, 1 ] and board [ p, x, 2 ] ) or ( board [ p, 0, x ] an...
[ -0.3310581147670746, 0.20625191926956177, 0.9981468319892883, 0.2735195755958557, -0.4721817374229431, -0.011257235892117023, -0.027528392150998116, 1.1173652410507202, -0.2406722903251648, 0.1532978117465973, -0.6024633646011353, -0.21511463820934296, -0.4800761044025421, -0.5112427473068...
def calculate _ rds _ ris ( account ) : aws _ access _ key _ id = account ['aws _ access _ key _ id'] aws _ secret _ access _ key = account ['aws _ secret _ access _ key'] region = account ['region'] rds _ conn = boto3. client ('rds ', region _ name = region, aws _ access _ key _ id = aws _ access _ key _ id, aws _ sec...
[ -0.4260152280330658, 0.461675763130188, 0.7622376680374146, -1.0527818202972412, 0.023983381688594818, -0.5010231733322144, 0.34083935618400574, -0.1535758525133133, -0.027752602472901344, 0.9438599944114685, -0.7252876162528992, 0.7367661595344543, -0.49921685457229614, 0.4323151111602783...
def total _ results ( self ) : return self. _ _ total _ results
[ 0.2097349613904953, 0.3033183515071869, 0.35245364904403687, -0.8851936459541321, 1.469043493270874, 0.010893743485212326, 0.9051984548568726, -0.53471440076828, 0.2792857885360718, -0.5763113498687744, -0.7595068216323853, -0.6613420844078064, -0.2680295705795288, -0.7761420607566833, 0...
def fitfornodeworker ( inq, outq, randomseed = none ) : # get random state ( used for clustering ). random _ state = np. random. randomstate ( seed = randomseed ) # enter loop which continues until signal received to terminate. while true : # pull data _ ls out of the input queue. data _ in = inq. get ( ) # none will s...
[ -0.49237650632858276, -0.2471579909324646, 0.6240510940551758, -0.40942999720573425, -0.12362898141145706, -0.022220702841877937, -0.020126521587371826, 0.3854101896286011, -0.6243521571159363, -0.24117885529994965, -0.4186156392097473, 0.7011293172836304, -0.24507875740528107, 0.314111799...
def is _ commitment ( s, clist ) : return any ( ( s in c ) for c in clist )
[ -0.07746805250644684, -0.28551313281059265, 0.3944351077079773, 1.092849612236023, 0.29347971081733704, -0.2833128869533539, -1.3012073040008545, 0.9992045760154724, -0.5254366993904114, 1.0541527271270752, -0.08438877761363983, -0.6939346194267273, -0.770291268825531, 0.36995524168014526,...
def list _ logs ( self ) : filenames = sorted ( os. listdir ( self. path ), reverse = true ) return [ x. split ( '.') [ 0 ] for x in filenames ]
[ 0.515705406665802, -1.0059146881103516, 0.8795919418334961, 0.404296875, 0.5864704847335815, 0.4897189736366272, -0.3812830150127411, -0.21638506650924683, 0.6412186026573181, 0.1826106160879135, 0.24979425966739655, 1.0022833347320557, -0.18939489126205444, 0.33575353026390076, -1.07199...
def _ exists ( self, path : str ) - > bool : path = os. fspath ( path ) path = path. rstrip ( os. path. sep ) # normalize path # check full path existence if path in self. files : return true # check parent directory path = path + os. path. sep if any ( f. startswith ( path ) for f in self. files ) : return true return...
[ -0.5473125576972961, -0.7663992047309875, 0.6546123623847961, -0.45795580744743347, -0.001061364309862256, 0.5440284609794617, 0.4681558310985565, 0.10672326385974884, -0.4045391082763672, -0.5563963055610657, 0.45730382204055786, -0.9964080452919006, -0.03566741570830345, 0.06606347858905...
def exit ( self ) : # join the threads if settings. testing : print ( " exit ftpbackend " ) for dt in self. download _ threads : dt. join ( ) dt. exit ( ) for ut in self. upload _ threads : ut. join ( ) ut. exit ( ) for dt in self. delete _ threads : dt. join ( ) dt. exit ( )
[ 0.2810620665550232, 0.3323412239551544, 0.5462883710861206, -0.46550947427749634, 1.0099153518676758, 0.46749168634414673, 0.15350770950317383, -0.7859673500061035, -0.6352672576904297, 0.2839535176753998, 0.3100581169128418, -0.31129854917526245, -1.4667829275131226, 0.5567517280578613, ...
def output _ to _ file _ from _ template ( input _ path : str, input _ filename : str, output _ path : str, output _ filename : str, replacements _ dict : dict [ str, str ], write _ mode : str, ) - > none : _ logger. debug ( " starting generation of % s from % s ", output _ filename, input _ filename ) with open ( os. ...
[ 0.025283537805080414, -0.7283061146736145, 0.5361009836196899, -0.6915448904037476, 0.0939464196562767, 0.12498017400503159, 0.6332513093948364, 1.6287736892700195, -1.3496845960617065, 0.055811990052461624, -0.5320531725883484, 0.052382245659828186, 0.464687317609787, -0.49898168444633484...
def _ dec2bcd ( self, value ) : return ( value / / 10 ) < < 4 | ( value % 10 )
[ 0.36681562662124634, 0.5490074753761292, 0.6670472025871277, -0.618346095085144, 0.250992089509964, 0.34470346570014954, -0.06707692891359329, -0.672706127166748, 0.029196590185165405, -0.4893004596233368, 0.4275420010089874, 0.2480061799287796, -0.3428371846675873, 0.21822962164878845, ...
def _ _ init _ _ ( self, lr, batch _ size, patience = int ( 20 ), iter _ num = int ( 1e + 3 ), log _ freq = int ( 100 ), avg _ freq = int ( 10 ), ma _ rate = 0. 01, prefix = " ", verbose = true, resp = 0, cond = [ 1 ], log = true, objname = " ", paramname = " ", paramvalue = np. inf, x _ groundtruth = np. inf ) : obj _...
[ 0.5634703636169434, -0.2822762131690979, 0.8655939698219299, 0.3030037581920624, -0.23373541235923767, 0.5948859453201294, 0.1579674929380417, -0.25330284237861633, 0.0364597886800766, 0.5034129619598389, 0.5025551915168762, -0.13816238939762115, 0.35457101464271545, 0.298244446516037, 0...
def find _ nearest _ idx _ tol ( array, value, tol = dt. timedelta ( days = 1. ) ) : array = np. asarray ( array ) idx = ( np. abs ( array - value ) ). argmin ( ) if abs ( array [ idx ] - value ) < = tol : ret _ val = idx else : ret _ val = np. nan return ret _ val
[ -0.7667157649993896, -0.6795566082000732, 0.7207632064819336, -0.4500475525856018, -2.1229825019836426, 0.47609126567840576, -0.04368872568011284, -1.2292622327804565, 0.032436441630125046, 0.8368201851844788, 0.6033079028129578, 0.5506229400634766, 0.16149914264678955, -0.5602372884750366...
def update _ trie ( word, trie ) : current _ dict = trie for letter in word : current _ dict = current _ dict. setdefault ( letter, { } ) current _ dict. setdefault ('', 0 ) current _ dict ['' ] + = 1
[ -0.15269532799720764, -0.214486762881279, 0.23834998905658722, -1.1089584827423096, -0.22654269635677338, 0.2567558288574219, 0.47068801522254944, 1.1951029300689697, -0.927995502948761, 0.7736710906028748, -0.4310663044452667, 0.3716624677181244, -0.5997280478477478, 0.3803645372390747, ...
def auto _ wait ( * args ) : return _ ida _ auto. auto _ wait ( * args )
[ -1.209513545036316, 0.2203839272260666, 0.3779136836528778, 0.9098377823829651, 0.6611652374267578, 0.25763875246047974, 1.1770482063293457, 0.19416870176792145, -1.2633706331253052, -0.47826138138771057, -0.974395751953125, -0.2528807520866394, -0.3350960314273834, -0.3304760754108429, ...
def _ get _ other _ dims ( ds, dim ) : all _ dims = list ( ds. dims ) return [ d for d in all _ dims if d! = dim ]
[ -0.29812997579574585, 0.6241186857223511, 0.4978131651878357, 0.7133285999298096, -0.4397042989730835, -0.5086889863014221, -0.7886976599693298, -0.17190885543823242, 0.9046716094017029, -0.13190624117851257, -0.5210902690887451, 1.0555589199066162, 0.4770725667476654, 0.5540534257888794, ...