text
stringlengths
25
2.19k
embedding
listlengths
768
768
def test _ devicemanager _ load _ json _ check _ services _ 02 ( device _ manager _ from _ data ) : dm = device _ manager _ from _ data dm. scan ( ) # " description _ service _ names. txt " corresponds to " description. json " with open ( " description _ service _ names. txt " ) as fobj : service _ names = list ( map (...
[ -0.5942026376724243, 0.05198276787996292, 0.4986829459667206, -0.9531093239784241, -0.377025306224823, 0.32365882396698, -0.01973327063024044, -0.5803920030593872, -0.09674756228923798, -0.45574912428855896, -0.24938863515853882, 0.1825914978981018, 0.5077616572380066, 0.7528849840164185, ...
def to _ table ( self, tablename, info = none, * * kwargs ) : jwtypes = { " < u40 " : [ " filename ", " cal _ ver ", " prd _ ver ", " visit _ id ", " obs _ id ", " obslabel ", " program ", " observatn ", " visit ", " visit _ grp ", " seq _ id ", " exposure ", " date - obs ", " time - obs ", " expstart ", " detector ", ...
[ -0.6086978912353516, -0.39382702112197876, 1.0819416046142578, 0.1525057852268219, 0.09230238199234009, 0.2795201539993286, -0.0631343275308609, -0.6753833889961243, -0.20583659410476685, 0.16621750593185425, -0.0004305299371480942, 0.796197235584259, -0.14658720791339874, 0.52527719736099...
def do _ select _ all ( self, * * kwargs ) : _ hardware _ id = kwargs ['hardware _ id'] # don't use the ramstkdatamodel. do _ select _ all ( ) method because we don't # want to clear the tree or we'll only be left with the last hardware # id passed. _ session = self. dao. ramstk _ session ( bind = self. dao. engine, au...
[ 0.27988201379776, 0.14947886765003204, 0.6417852640151978, -0.21619760990142822, 0.7071168422698975, -0.47473347187042236, -0.24226771295070648, 0.025229455903172493, -0.017364080995321274, 0.633331298828125, -0.11243241280317307, 0.24561534821987152, -0.84535813331604, 0.3842492699623108,...
def submit _ job ( self, job _ info ) : # submit to to dask client if self. n _ workers > 1 : self. futures. append ( self. client. submit ( self. _ f _ objective, job _ info ) ) else : # skipping scheduling to dask worker to avoid added overheads in the synchronous case self. futures. append ( self. _ f _ objective ( ...
[ -0.24868172407150269, 0.2891042232513428, 0.6713094711303711, 0.45693254470825195, 0.14750678837299347, -0.059499066323041916, -0.09557139873504639, -0.17851467430591583, -1.3717108964920044, -0.6247466206550598, -0.40714550018310547, 0.040600311011075974, 0.46765533089637756, 0.4897306859...
def render ( self ) : self. _ canvas. update ( )
[ -0.06719038635492325, -0.5990920662879944, 0.3030303418636322, -0.8927807211875916, 0.25542810559272766, 0.28677934408187866, 0.11214428395032883, -0.11431856453418732, -0.3388424813747406, -0.6616268157958984, 0.2184862345457077, 0.3200056254863739, -0.2794177234172821, 0.4403912127017975...
def getdisplaycolorspacename ( self, display, view ) : pass
[ 0.4871583580970764, -1.0092952251434326, 0.5796297192573547, 0.4187210202217102, -0.7111505270004272, 0.157290980219841, 0.9050936698913574, -1.0447790622711182, 0.66300368309021, -0.8171294331550598, 0.7576850652694702, 0.7453413009643555, 0.21722690761089325, 0.9672051072120667, -0.805...
def _ parse _ markdown _ line ( self, line, delim = ", " ) : tmp = _ split _ string ( line, " ( " ) [ 1 ] tmp2 = _ split _ string ( tmp, " ) " ) # get input file input _ file = tmp2 [ 0 ] # if there's leftovers after the input file, treat them as comma - # separated arguments. args = none if len ( tmp2 ) > 1 : if tmp2 ...
[ 0.10482317954301834, -0.14027513563632965, 0.5973958373069763, 0.29967188835144043, 0.039564117789268494, -0.21862685680389404, -0.6770415306091309, 0.885098934173584, -0.4986625909805298, -0.18825194239616394, 0.39105984568595886, -0.0030835075303912163, -0.29948997497558594, 0.0109057025...
def _ _ init _ _ ( self, size = 0 ) : self. size = size
[ 0.14299806952476501, -0.15784581005573273, 0.49394455552101135, -0.09808263927698135, -0.5161889791488647, 0.3018134534358978, 0.051615841686725616, 0.5190712213516235, 0.8188682794570923, -1.1218540668487549, -0.7901027798652649, -0.2588748335838318, -0.5853815078735352, 0.787585377693176...
def parse _ dict _ top _ level _ keys ( raw _ dict _ str : str ) - > list [ str ] : return dict _ top _ level _ keys _ re. findall ( raw _ dict _ str )
[ -1.0816611051559448, -0.7423558831214905, 0.516717791557312, -0.32547497749328613, -0.839607834815979, 0.12374383956193924, -0.41956230998039246, 0.3886430859565735, -0.16639314591884613, 0.6004617810249329, -0.1341223120689392, 0.2527955174446106, 0.19135472178459167, -0.17690138518810272...
def show _ info _ message ( title, message ) : return _ show _ info _ message ( title, message )
[ -0.06660854816436768, 0.08869019895792007, 0.44689568877220154, 0.456144779920578, -0.5807437300682068, -0.5170952677726746, 0.03862656280398369, -0.9002043604850769, -0.9600224494934082, 0.130900040268898, 0.9863430857658386, 1.4309673309326172, -0.3924825191497803, 0.1960495263338089, ...
def toextended ( self ) - > str : return self. m _ priv _ key. toextended ( )
[ -0.28802210092544556, 0.5738959908485413, 0.6660532355308533, -0.3130849301815033, -0.26788732409477234, 0.43448349833488464, -1.522064447402954, 0.0762493759393692, 0.4432868957519531, 0.1455341875553131, -0.21182774007320404, 1.2194715738296509, -0.36270034313201904, 0.12521526217460632,...
def rec _ jaclog ( n, a ) : alphaj, betaj = rec _ jacobi01 ( 2 * n, 0, 0 ) mom = mm _ log ( 2 * n, a ) alpha, beta, _ = mod _ chebyshev ( n, mom, alphaj, betaj ) return alpha, beta
[ 0.1157979667186737, -0.4025731682777405, 0.3152083456516266, -0.48764243721961975, -0.5292785167694092, -0.615385890007019, -0.3516264259815216, -0.12979242205619812, -0.47189706563949585, 0.4535890519618988, -0.6541367769241333, 0.18801377713680267, 0.5945202708244324, 1.294512152671814, ...
def set _ dosing ( max _ dose, num _ doses, num _ replicates = 1, step ='half - log ', exclude _ doses = none ) : if step = ='half - log': dose _ range = max _ dose * 1e - 4 * np. logspace ( 0, 4, 9 ) elif step = ='onethird - log': dose _ range = max _ dose * 1e - 4 * np. logspace ( 0, 4, 7 ) elif step = ='quarter - lo...
[ -0.05271296948194504, 0.5901745557785034, 0.6859838366508484, -0.028615456074476242, -0.49646323919296265, -0.8035175204277039, -0.38324055075645447, 0.3266555070877075, 0.48311343789100647, 0.5223879814147949, 0.0367402657866478, 0.7887226939201355, 0.36016184091567993, 0.1243655309081077...
def _ _ init _ _ ( self, * * options ) : super ( ). _ _ init _ _ ( normalizerenum. duplicate _ space, 110, * * options )
[ 0.36265918612480164, 1.3836978673934937, 0.43406471610069275, 0.31268203258514404, 0.17597052454948425, -0.05884740501642227, 0.9781304597854614, 0.623570442199707, 2.0419132709503174, 0.19158947467803955, -0.9591352939605713, -0.36225470900535583, 0.07167984545230865, 1.215635061264038, ...
def getsids ( self ) : log. debug ( " executing volatility getsids plugin on " " { 0 } ". format ( self. memdump ) ) self. _ _ config ( ) results = [ ] command = self. plugins [ " getsids " ] ( self. config ) for task in command. calculate ( ) : token = task. get _ token ( ) if not token : continue for sid _ string in ...
[ 0.35449686646461487, -0.9547567963600159, 0.6440669894218445, -0.7558417916297913, 0.29393506050109863, -1.191912055015564, -0.2880133092403412, -0.1525038480758667, 0.48249128460884094, 0.41927599906921387, -1.2186167240142822, 0.868379533290863, 0.0027546535711735487, 0.17767740786075592...
def test _ grpc _ 02 _ bidirectional _ stream ( self ) : for res in self. grpc _ stub. makefriends ( self. friendship _ generator ( ) ) : assert res. friend1 is not none assert res. friend2 is not none assert not res. error
[ -0.28424108028411865, -0.16271533071994781, 0.44532227516174316, 0.2840822637081146, 1.35262131690979, 1.0100722312927246, 0.7883228063583374, -1.180640459060669, -1.1629657745361328, -0.7531263828277588, -0.5197269916534424, 0.5609632730484009, -0.644848108291626, -0.3232494592666626, 0...
def suite _ configs _ from ( test _ docs : list [ parser. document ] ) - > list [ object ] : all _ suites = [ ] for doc in test _ docs : if ( doc. obj. get ( schema. type _ key )! = schema. full _ type or doc. obj. get ( schema. version _ key )! = schema. version ) : continue tests = doc. obj. get ( " test ", { } ) the...
[ -0.31928375363349915, -0.7295237183570862, 0.4779664874076843, 1.124188780784607, -0.3806520402431488, 0.22793841361999512, 0.3499310612678528, 0.24583959579467773, 0.743180513381958, 1.2751528024673462, -0.873494565486908, -0.3217950165271759, -0.01401328481733799, 1.0759799480438232, 0...
def test _ stat _ filename _ with _ spaces _ osx _ 10 _ 14 _ 6 ( self ) : self. assertequal ( jc. parsers. stat. parse ( self. osx _ 10 _ 14 _ 6 _ stat _ filename _ with _ spaces, quiet = true ), self. osx _ 10 _ 14 _ 6 _ stat _ filename _ with _ spaces _ json )
[ 1.652423620223999, -0.6472925543785095, 0.48141995072364807, -0.25985369086265564, 0.21626828610897064, 0.3052406311035156, 0.17998002469539642, -0.6420704126358032, 0.2843942642211914, -0.7869805097579956, -0.30267632007598877, -0.24111977219581604, 0.8366104960441589, 1.4676220417022705,...
def status ( access _ key, status ) : client = get _ admin _ client ( ) cred _ cli. status ( client, access _ key, status )
[ 0.3582940697669983, -0.15075251460075378, 0.18147331476211548, 0.09318852424621582, 0.36159342527389526, 0.18239805102348328, -1.4003829956054688, 0.680256187915802, -0.19800342619419098, 0.789207398891449, 0.05959990993142128, 1.8994688987731934, -0.32871299982070923, 0.4132457971572876, ...
def forward _ selected ( data, response ) : remaining = set ( data. columns ) remaining. remove ( response ) selected = [ ] current _ score, best _ new _ score = 0. 0, 0. 0 while remaining and current _ score = = best _ new _ score : scores _ with _ candidates = [ ] for candidate in remaining : formula = " { } ~ { } + ...
[ 0.27078086137771606, -1.2609957456588745, 0.4507090449333191, -0.39154139161109924, 0.1387750804424286, -0.07510294020175934, 0.5805231332778931, -0.6579030156135559, 0.43742233514785767, -0.32848116755485535, 0.2595270872116089, 0.3802676200866699, 0.33588796854019165, -0.8433188796043396...
def create _ tag ( self, repo, revision, tag ) : logging. info ('creating tag % ( tag ) s for repository : % ( repo ) s, revision : % ( revision ) s ', dict ( tag = tag, repo = repo, revision = revision ) ) data = { " tag " : tag, " object " : revision, " message " : " release % s " % tag, " type " : " commit ", } url ...
[ 0.15316569805145264, -0.1556289941072464, 0.592762291431427, -0.8344349265098572, 0.6585747003555298, 0.11256658285856247, -1.1531895399093628, -0.15874210000038147, -0.7697961330413818, 0.8992109894752502, -0.2849768102169037, 0.6430301070213318, -0.3990243971347809, 0.540172278881073, ...
def n _ gram ( ngram _ length = 1, skip _ length = 0, all _ lengths = true, max _ num _ terms = [ 10000000 ], weighting ='tf ', * * params ) : entrypoint _ name ='ngram'settings = { } if ngram _ length is not none : settings ['ngramlength'] = try _ set ( obj = ngram _ length, none _ acceptable = true, is _ of _ type = ...
[ 0.5327644944190979, 0.8475251197814941, 0.9346006512641907, 0.11368324607610703, 0.034695517271757126, -0.6488901376724243, 0.448209673166275, -0.021686647087335587, 0.44449251890182495, 0.42555350065231323, 0.27100813388824463, 0.02855571173131466, -0.19790294766426086, 0.2083785682916641...
def disc _ cont _ loss ( predicted, targets ) : yp, ap = predicted yt, at = targets loss _ actn = f. mse _ loss ( yp, yt ) loss _ geom = f. mse _ loss ( ap, at ) return loss _ actn + loss _ geom
[ 0.3689403533935547, -0.5796949863433838, 0.25504058599472046, -0.5074460506439209, -0.38345637917518616, 0.4427267909049988, 0.8247346878051758, 0.9578132033348083, -0.11979562044143677, -0.0828246921300888, 0.5084933042526245, 0.711544394493103, 1.731982946395874, -0.1511247158050537, 0...
def test _ get _ success _ url ( self ) : self. assertequal ( profileupdateview ( object = profilefactory ( ) ). get _ success _ url ( ), reverse ('tasks : home') )
[ 0.5910932421684265, 0.32175883650779724, 0.33349189162254333, 1.4796409606933594, 0.31578442454338074, 0.9464223980903625, 0.8374371528625488, 0.11163505911827087, -0.12078700959682465, -0.6553198099136353, -0.6534849405288696, 0.01772606000304222, 0.9355632066726685, -0.4688400328159332, ...
def rmse ( y, y _ hat ) : return np. sqrt ( np. mean ( ( y - y _ hat ) * * 2 ) )
[ 0.43635687232017517, -0.9035956859588623, 0.4135780334472656, 0.5731446146965027, 0.4675125479698181, -0.09324011951684952, -0.5262441039085388, -0.12644724547863007, -0.04868970066308975, 0.26868462562561035, -0.5087786316871643, 1.0723967552185059, 0.3130330741405487, 0.6543182134628296,...
def moves ( self ) : # you fill this in possiblemoves = [ ] # current x, y coordinates x = self. location [ 0 ] y = self. location [ 1 ] if self. grid [ x - 1 ] [ y ] = = " " : # up possiblemoves. append ( ( x - 1, y ) ) if self. grid [ x ] [ y + 1 ] = = " " : # right possiblemoves. append ( ( x, y + 1 ) ) if self. gri...
[ -1.096387505531311, -0.5227891206741333, 0.665020763874054, 0.40377867221832275, 0.23345668613910675, -0.09479782730340958, 0.02369133196771145, 0.4438583254814148, 0.3618695139884949, 0.6815970540046692, -0.4853120446205139, -0.17713414132595062, -0.9580676555633545, 0.6666942834854126, ...
def type _ menu ( ) : types = nodetype. objects. exclude ( hidden = true ) return {'types': types }
[ -0.7260411381721497, 0.9030982255935669, 0.36369529366493225, -0.2716330587863922, -0.2275664508342743, 0.1256801337003708, 0.695530891418457, -0.8623377680778503, -0.769733726978302, 0.9813972115516663, -0.9952021837234497, -0.24561037123203278, -0.46958819031715393, 0.6012468338012695, ...
def rotate ( self, angle, axes = ( 1, 2 ), center = none, * * kwargs ) : if angle is not none : self. rotation _ angle = angle if center is not none : self. rotation _ center = center # todo : implement off center rotation self. processed. values = rotate ( self. processed, angle, reshape = false, axes = axes, * * kwar...
[ 0.3071340024471283, 0.2950441539287567, 0.5118309855461121, -0.26066941022872925, 0.9191244840621948, -0.6984858512878418, 0.44214993715286255, 0.1290448158979416, -0.047371234744787216, -0.3641197085380554, -0.10868795216083527, 0.6649027466773987, 0.2690780758857727, -0.15269161760807037...
async def order _ archive ( self, ctx ) : if not await self. bot. has _ perm ( ctx, admin = true ) : return message = ctx. message name = self. bot. get _ variable ( message. content, " name ", type = " keyword ", default = false ) date = self. bot. get _ variable ( message. content, " date ", type = " keyword ", defau...
[ 0.3198191523551941, 0.6071479320526123, 0.7663393020629883, 0.15269839763641357, 0.6514791250228882, -0.07927308976650238, -1.1453418731689453, -0.45330810546875, -0.7526673674583435, -0.4158047139644623, 0.06306258589029312, 1.0221267938613892, 0.2160075604915619, 0.9385671615600586, -0...
def creatgeohashedindex ( thecollection, hashkey ) : print ( " creating hashed index on % s " % ( hashkey ) ) thecollection. create _ index ( [ ( hashkey, hashed ) ] )
[ 0.43514683842658997, 0.05333907902240753, 0.06231314688920975, -0.20123399794101715, 0.7975954413414001, 1.4401367902755737, -0.039515163749456406, 0.26558053493499756, -0.5592928528785706, 0.158023864030838, -0.2307111620903015, 0.0765497237443924, -0.34245002269744873, 0.4162633121013641...
def count ( self, data ) : count = 0 current = self. head while current is not none : if current. data = = data : count + = 1 current = current. next return count
[ 0.08967210352420807, 0.19923405349254608, 0.4929356575012207, -0.08312685042619705, -0.632690966129303, -0.4058683514595032, 0.08876176923513412, 0.17339187860488892, 0.5514455437660217, -0.2635691463947296, -1.2471933364868164, 0.6658570170402527, -0.9263024926185608, 1.0993860960006714, ...
def _ is _ login ( self, response ) : url = response. url. split ( '?') [ 0 ] if'passport. weibo. com / visitor / visitor'in url : return false return true
[ -0.9343662858009338, -0.5413851737976074, 0.5666888952255249, 1.033372163772583, 0.2750912606716156, 0.23642314970493317, 0.10412174463272095, 0.02584030106663704, 1.635485053062439, -0.28765469789505005, -0.22685125470161438, -0.46479740738868713, -1.1395269632339478, -0.5726996064186096,...
def _ _ eq _ _ ( self, other ) : if not isinstance ( other, futurespricetrigger ) : return false return self. to _ dict ( ) = = other. to _ dict ( )
[ -0.7983576059341431, 0.5593249797821045, 0.7160125970840454, -0.09928576648235321, -0.3742261230945587, -0.3948337733745575, -0.9429948925971985, -0.4968899190425873, 0.41918590664863586, 0.3635529577732086, -1.3520283699035645, -0.6355128884315491, 0.2804664969444275, -0.5288133025169373,...
def _ _ getitem _ _ ( self, key ) : for value, item in self. heap : if item = = key : return value raise keyerror ( str ( key ) + " is not in the priority queue " )
[ 1.175014853477478, -0.48199263215065, 0.5151481628417969, -0.030252045020461082, -0.5629150867462158, 0.3617701828479767, -1.133968710899353, -0.6650676131248474, -0.493407666683197, -0.16377776861190796, 1.0226799249649048, -0.17539529502391815, -0.3426395058631897, 0.24018897116184235, ...
def getdelaunaypeers ( candidates, center ) : bucket _ size = 5 if len ( candidates ) < bucket _ size : return candidates buckets = { ( 0, maxval ) : [ center ] } sortedcandidates = sorted ( candidates, key = lambda x : distance ( x, center ) ) for c in sortedcandidates : for r in buckets. keys ( ) : if c [ 0 ] > = r [...
[ -0.08919152617454529, -0.9416883587837219, 1.0043033361434937, -0.28775426745414734, -0.43172091245651245, 0.03035404533147812, -0.6619234085083008, 0.8112680912017822, 0.4122297167778015, 0.8484326601028442, -0.7760195136070251, -0.05522848293185234, -0.4802965819835663, -0.09785583615303...
def format _ six ( num ) : return str ( num ). zfill ( 6 )
[ 0.5633905529975891, -0.4511391520500183, 0.49054113030433655, 0.09702860563993454, -0.10383030772209167, -0.1087043285369873, 0.402996689081192, -0.7581906318664551, 1.2274975776672363, -0.5407871603965759, -0.14389732480049133, 0.21021535992622375, 0.6703753471374512, -0.20573186874389648...
def password _ check ( password ) : # calculating the length length _ error = len ( password ) < 8 # searching for digits digit _ error = re. search ( r " \ d ", password ) is none # searching for uppercase uppercase _ error = re. search ( r " [ a - z ] ", password ) is none # searching for lowercase lowercase _ error ...
[ 0.023156799376010895, 0.21073532104492188, 0.9336535334587097, -0.7171275615692139, -0.3419213891029358, 0.3998907804489136, 0.6348680853843689, 0.19080619513988495, 0.11409132927656174, 0.5740172863006592, -0.29362574219703674, 0.5097372531890869, -0.29062002897262573, 0.5798085927963257,...
def _ presolve ( self ) : raise notimplementederror ( " this is just an abstract interface " )
[ -0.5776419639587402, 0.16124004125595093, 0.8698031306266785, -0.11241180449724197, 0.25853994488716125, 0.30129531025886536, 0.7429560422897339, -0.8157715797424316, -0.0034843815956264734, -0.8777961730957031, -0.39697590470314026, -0.9899033904075623, -0.19618359208106995, 0.55916988849...
def _ _ init _ _ ( self, data _ format ='encrypted ', device = none, encrypted _ data = none, first _ digit _ of _ pan = none, fallback = none, fallback _ reason = none, additional _ tlv _ data = none, * args, * * kwargs ) : # noqa : e501 # noqa : e501 self. _ data _ format = none self. _ device = none self. _ encrypte...
[ 0.4183202385902405, 0.06156390532851219, 0.48663952946662903, -0.979251503944397, -0.6528168320655823, -0.11773822456598282, -0.1676657795906067, 0.10653799027204514, 0.9967015981674194, -0.3912770748138428, -0.3310411274433136, 0.6696200370788574, 0.6142998933792114, 0.49057242274284363, ...
def fix _ randseed ( seed ) : random. seed ( seed ) np. random. seed ( seed ) torch. manual _ seed ( seed ) torch. cuda. manual _ seed ( seed ) torch. cuda. manual _ seed _ all ( seed ) torch. backends. cudnn. benchmark = false torch. backends. cudnn. deterministic = true
[ 1.081233263015747, -0.038574427366256714, 0.31420275568962097, 0.3939836919307709, 0.2917053699493408, 0.3332970440387726, 0.4276268482208252, -0.0405341275036335, -0.1299731284379959, -0.5839157700538635, -0.20086194574832916, 0.49480652809143066, 0.6189774870872498, 0.7896068692207336, ...
def _ get _ mass _ centers ( freq ) : mass _ centers _ dict = _ mass _ centers _ table ( ) freq _ band = get _ freq _ band ( freq ) if ( freq _ band is not none ) and ( freq _ band in mass _ centers _ dict ) : return mass _ centers _ dict [ freq _ band ] if freq < 4e9 : freq _ band _ aux ='c'elif freq > 12e9 : freq _ b...
[ 0.31436821818351746, -0.21612651646137238, 0.4716862142086029, -0.791522741317749, -0.1760837584733963, -0.004277642350643873, -0.22114531695842743, -0.7107145190238953, 0.019134320318698883, -0.07646799832582474, 0.9882333278656006, -0.48590049147605896, 0.5808683037757874, 0.773302555084...
def test _ check _ input _ invalid _ time _ window _ idx ( ) : with pytest. raises ( typeerror ) : mob. check _ inputs ( chmask, basevalues _ idx = [ 0 ], window _ idx ='invalid')
[ -0.301967054605484, 0.08019321411848068, 0.3841201364994049, 1.2832074165344238, 0.37733879685401917, 0.7766276001930237, -0.022469764575362206, -0.6447519063949585, 0.15427380800247192, 0.038113467395305634, -0.020381296053528786, 0.7012243866920471, -0.8854691386222839, 0.934685587882995...
def draw _ anchor _ point _ and _ boxes ( img _ to _ draw _ on, anchor _ point _ coord, feature _ to _ input, scale = none, aspect _ ratio = none ) : cv2. circle ( img _ to _ draw _ on, ( anchor _ point _ coord [ " x " ], anchor _ point _ coord [ " y " ] ), 2, ( 0, 0, 255 ) ) x1 = int ( round ( anchor _ point _ coord [...
[ -0.5797246694564819, -1.2851535081863403, 0.8222286701202393, -0.5264881253242493, -0.5327906012535095, 0.7311885952949524, 0.16265542805194855, 0.24796709418296814, 0.11875185370445251, 0.06784099340438843, 0.07441456615924835, 0.7343589067459106, 1.3566111326217651, -0.4918478727340698, ...
async def wait _ for _ condition ( condition _ predictor, timeout = 10, retry _ interval _ ms = 100, * * kwargs ) : # pragma : no cover start = time. time ( ) last _ ex = none while time. time ( ) - start < = timeout : try : pred = condition _ predictor ( * * kwargs ) if inspect. isawaitable ( pred ) : pred = await pre...
[ 0.32986170053482056, 0.02120032161474228, 0.5039294362068176, -0.013004654087126255, -0.7136567234992981, 0.38368314504623413, -0.485396146774292, 0.6016407608985901, -1.163072109222412, 0.2839467227458954, 0.6102145314216614, 0.29083552956581116, 0.18002916872501373, -0.03661389648914337,...
def create _ user ( self ) : password _ hash = generate _ password _ hash ( self. password ) create _ user _ statement = " " " insert into users ( email, first _ name, last _ name, password _ hash, role ) values ('% s ','% s ','% s ','% s ', % d ) " " " % \ ( self. email, self. first _ name, self. last _ name, password...
[ -0.11120261251926422, 0.3557143211364746, 0.5847893357276917, 0.3858879506587982, 1.135198712348938, 0.24490872025489807, 0.06044595316052437, 0.12249244004487991, -0.978040337562561, -0.41072264313697815, -0.8024533987045288, -0.9411490559577942, -0.10006359964609146, 0.038736745715141296...
def additional _ services ( self ) - > optional [ pulumi. input [ sequence [ pulumi. input [ str ] ] ] ] : return pulumi. get ( self, " additional _ services " )
[ 0.11895790696144104, -0.17229285836219788, 0.5253482460975647, -0.1400635838508606, 0.2524498999118805, 1.4415512084960938, 0.5322760939598083, -0.9901228547096252, 1.5767757892608643, -0.5030418634414673, -0.3834545910358429, 0.35519939661026, -0.4381389319896698, -0.45799580216407776, ...
def time _ stats ( df ) : print ('\ ncalculating the most frequent times of travel... \ n') start _ time = time. time ( ) # to do : display the most common month common _ month = df. month. mode ( ) print ('most common month : ', common _ month ) # to do : display the most common day of week common _ day = df. day. mod...
[ 0.17066887021064758, 0.5745834112167358, 0.9304814338684082, -0.04369456693530083, 0.5136443376541138, -0.267394483089447, 0.8303186297416687, -0.47457823157310486, -0.2651645243167877, 0.10940747708082199, -0.024713072925806046, -0.21561254560947418, 0.6983177661895752, 1.0152531862258911...
def uniqueindicators ( ) : return jsonify ( list ( indicators. keys ( ) ) ), 200
[ -2.0556888580322266, -0.8896558284759521, 0.17185454070568085, -0.2965517044067383, 0.15166005492210388, -0.0546601377427578, -0.23440313339233398, 0.12419746071100235, 1.0127531290054321, 0.8880160450935364, -1.2851719856262207, 0.06590462476015091, -0.12489601224660873, -0.30678510665893...
def downhill _ simplexnd ( func, start, delta, tol = 2e - 10, maxiter = 1000 ) : n = len ( start ) # dimensionality it = 0 # a vertex in n - d has n + 1 points # first construct the other n points vertices = [ start ] for i in range ( 0, n ) : basis _ vector = np. zeros ( n ) basis _ vector [ i ] = 1 vertices. append (...
[ 0.5259580016136169, 0.7359537482261658, 0.753841757774353, 1.0082658529281616, -0.6556577086448669, -0.556948184967041, 0.37972769141197205, -0.28041955828666687, 0.5636740326881409, -0.23349937796592712, -0.2699107229709625, 0.3824474513530731, 0.3752947747707367, -0.3741869628429413, -...
def scan _ darwin _ apps ( scan, options ) : i = 0 for plist in glob ( " / applications / * / contents / info. plist " ) : i = i + 1 scan. add _ file ( plist, " apps / app _ " + str ( i ) + ". plist " )
[ -0.9309887886047363, 0.026049776002764702, 0.581314206123352, 0.8513032793998718, 0.021017378196120262, 0.8278220295906067, 0.5103937387466431, 0.06619960814714432, 0.2576020359992981, 0.2347281575202942, -0.7683883309364319, -1.0965676307678223, 0.4216461777687073, 0.777370274066925, 0....
def _ importable ( obj, alias ='', source = none, enclosing = false, force = true, \ builtin = true, lstrip = true ) : if source is none : source = true if isfrommain ( obj ) else false if source : # first try to get the source try : return getsource ( obj, alias, enclosing = enclosing, \ force = force, lstrip = lstrip...
[ -0.06025368347764015, -0.22034496068954468, 0.8003222942352295, -0.7083777189254761, -0.9229844212532043, 0.06758714467287064, 0.6260983943939209, 0.3680073916912079, 0.49972355365753174, 0.30446743965148926, -0.2137288898229599, 0.7772356867790222, 0.8004127740859985, 0.07386036962270737,...
def apply _ thrust ( self ) : self. body. apply _ impulse _ at _ local _ point ( ( self. body. angle, 20 ) ) # generate and apply an impulse self. image = self. activated _ img # swap the current image with the activated for the blit ( ) method
[ 0.3524055480957031, -0.19881221652030945, 0.35123664140701294, -0.8889215588569641, 0.6516159176826477, 0.03572297841310501, 0.3854988217353821, 0.9780851006507874, 0.24067290127277374, -0.23252126574516296, -0.5439117550849915, 0.5176833868026733, -0.7397153377532959, 0.2344888597726822, ...
def test _ cannot _ post _ for _ paid _ booking ( self ) : event = baker. make _ recipe ('booking. future _ ev ', cost = 10 ) booking = baker. make _ recipe ('booking. booking ', user = self. user, event = event, paid = true ) resp = self. _ post _ response ( self. user, booking, {'block _ book':'yes'} ) self. asserteq...
[ 0.2444244772195816, 0.983835756778717, 0.47704505920410156, 1.1979516744613647, -0.22405028343200684, 1.5494261980056763, 0.3144083023071289, 0.2812967598438263, -0.2614210844039917, -0.24745027720928192, -0.2403503805398941, -0.6548212766647339, 0.10548196732997894, 1.2338426113128662, ...
def reward _ update ( self ) : # self. logger. debug ( f'encountered { len ( self. events ) } game event ( s )') # get the reward based on the events from the previous step get _ reward ( self ) # update the model start _ time1model = time ( ) update _ model ( self, false ) self. elapsed _ time _ model + = time ( ) - s...
[ 0.32977303862571716, -0.39813232421875, 0.49170464277267456, 0.31194713711738586, 0.8826663494110107, -0.254221647977829, 0.2846568822860718, 0.4557662606239319, -0.4779265820980072, 1.0467817783355713, -0.49593228101730347, -0.21180228888988495, 0.012446400709450245, 0.422615647315979, ...
async def make _ report _ support _ message ( self, ctx ) - > none : guild = ctx. guild embed = discord. embed ( title = " _ _ report - support section _ _ ", description = " " " welcome to the report - support section, here you can easily find your way into things and / or get help with whatever problem you may be exp...
[ 0.8965054750442505, 0.8979947566986084, 0.8920988440513611, -0.7997552156448364, -0.01695423573255539, 0.1449553221464157, -0.2470008283853531, 0.26754263043403625, -0.4768771231174469, -0.575687050819397, -0.35879185795783997, 0.7033528089523315, -0.8585222959518433, -0.22471767663955688,...
def sockscan ( self ) : log. debug ( " executing volatility sockscan plugin on " " { 0 } ". format ( self. memdump ) ) self. _ _ config ( ) results = [ ] command = self. plugins [ " sockscan " ] ( self. config ) for sock _ obj in command. calculate ( ) : new = { " offset " : hex ( int ( sock _ obj. obj _ offset ) ), " ...
[ -0.8304259181022644, -0.26749172806739807, 0.6492919921875, -0.3663194477558136, -0.11400151997804642, -0.7939279675483704, -0.20671918988227844, -0.33262524008750916, -0.07734940201044083, 0.2378777414560318, -0.646705150604248, 0.7608368396759033, -0.2971150279045105, 0.8143226504325867,...
def get _ resource ( url ) : response = requests. get ( url, headers = {'user - agent': user _ agent } ) return json. loads ( response. content ) ['results']
[ -0.9669969081878662, -0.45713236927986145, 0.6686294674873352, -0.2306125909090042, -0.3159676790237427, -1.1244105100631714, -0.8443263173103333, -0.300457626581192, 0.015947768464684486, 0.6503278613090515, -0.8737196922302246, -0.2532402276992798, -0.060379087924957275, -0.4734299182891...
def change _ vertex _ group _ by _ automorphism ( self, vert, aut ) : for edge in self. incident _ edges ( vert, keys = true ) : ekey = edge [ 2 ] origin = self. origin ( ekey ) terminus = self. terminus ( ekey ) if vert = = terminus : self [ origin ] [ terminus ] [ ekey ] ['tmap'] = compose ( aut, self. gettmap ( ekey...
[ -1.1403485536575317, -0.846854031085968, 0.6278747916221619, 0.1662265658378601, -0.45298364758491516, -0.35072964429855347, 0.8509190082550049, 0.308215469121933, 0.19061565399169922, 0.8147399425506592, -0.08775203675031662, 0.6472748517990112, 0.04748893529176712, -0.17261669039726257, ...
def test _ _ array _ search _ inexistent ( self ) : arr = array ( 10 ) arr [ 0 ] = 10 arr [ 1 ] = 20 arr [ 2 ] = 30 arr [ 3 ] = 40 # print ( arr ) res = search ( arr, 50 ) # print ( res ) self. assertequal ( res, none )
[ -0.5010098218917847, -0.7659149169921875, 0.6812816858291626, -0.16491477191448212, 0.5699304938316345, 0.6436792612075806, -0.08550762385129929, -0.39338773488998413, 0.30821797251701355, 0.25906142592430115, -0.5863141417503357, -0.14115454256534576, -1.0085186958312988, 0.40065076947212...
def filter _ getaveragingfactor ( ) : andor _ solis. filter _ getaveragingfactor. restype = ctypes. c _ uint averagingfactor = ctypes. c _ int ( ) result = andor _ solis. filter _ getaveragingfactor ( ctypes. byref ( averagingfactor ) ) check _ status ( result ) return int ( averagingfactor. value )
[ -0.61725914478302, 0.2349248230457306, 0.44173553586006165, -0.7488059401512146, -0.9941425919532776, -0.630932629108429, 1.186017632484436, -0.3286359906196594, -0.11887843906879425, 0.10726828873157501, -0.26718541979789734, 1.1975022554397583, -0.2237299084663391, -0.20002125203609467, ...
def key _ from _ arguments ( self, host, annex, path, * * data ) : # key is annex and the description, or if the description # does not exists, the host name assert isinstance ( host, structure _ host. host ), " host % s has to be an instance of host " % host return annex, data. get ( " description ", host. name )
[ 0.17306992411613464, -0.4287206828594208, 0.37217336893081665, -0.8559807538986206, 0.41715681552886963, 0.4915982484817505, -1.014652132987976, 0.6119957566261292, -1.7792179584503174, 0.5613876581192017, 0.6144735217094421, 0.8308864831924438, -0.03251964598894119, 0.40970224142074585, ...
def handlesearchrequest ( self, environ ) : search _ results = " " search _ status = false # fetch all the attributes provided by the user. parameters = self. utils. getparameters ( environ ) self. _ geplaces. parameters = parameters self. _ coordinate. parameters = parameters # retrieve the function call back name for...
[ -1.442840337753296, 0.14347992837429047, 0.7486238479614258, 0.0014448832953348756, 0.4362450838088989, -0.1655871719121933, 0.2085130661725998, -0.9327550530433655, -0.019677408039569855, 0.011664620600640774, 0.3745066523551941, -0.5727577209472656, -0.43314409255981445, 1.28340804576873...
def created ( self ) - > datetime. datetime : return self. _ get _ detail ( " created " )
[ 1.1353510618209839, 0.41601648926734924, 0.29608049988746643, 0.921866774559021, 1.4038009643554688, 0.07844606786966324, -0.8621907830238342, -0.07392558455467224, -0.2645067274570465, -0.5438700914382935, -0.524583101272583, 0.7549499273300171, 0.979610800743103, -0.24457262456417084, ...
def dict _ delete ( a : dict, b : dict ) : return [ k for k in a if k not in b ]
[ -0.5046306252479553, -0.5821843147277832, 0.6305152177810669, -0.42051181197166443, -0.46638599038124084, 0.005094967316836119, -1.454389214515686, 1.3205180168151855, -0.24016427993774414, 1.137282133102417, 0.019754884764552116, 0.5138555765151978, 0.20860889554023743, -0.271378755569458...
def iter _ docs ( tree ) : for document in tree. iter ('document') : for row in iter _ opinions ( document ) : yield row
[ -0.33964210748672485, -0.20925091207027435, 0.4480496644973755, -0.8424584865570068, -0.14674131572246552, 0.15461653470993042, -1.0528494119644165, -0.22270727157592773, -0.6672723293304443, 0.930317759513855, 1.6169402599334717, -0.2897457778453827, 0.16292650997638702, 0.970491528511047...
def front ( self ) - > int : if self. isempty ( ) : return - 1 return self. items [ self. head ]
[ -0.6476285457611084, 0.6231728792190552, 0.5660846829414368, -0.11073458939790726, 0.3136582672595978, 0.06789133697748184, 0.223349466919899, 0.31644460558891296, 0.12397821247577667, -0.6573752164840698, -0.24070842564105988, 1.4252378940582275, -0.707769513130188, 0.7289829850196838, ...
def _ aggregate _ streamed _ local _ explanations ( explainer, evaluation _ examples, task, features, batch _ size, * * kwargs ) : if batch _ size < = 0 : raise valueerror ( " specified argument batch _ size must be greater than 0 " ) importance _ values = none expected _ values = none eval _ dataset = evaluation _ exa...
[ 0.4597044289112091, 0.32879316806793213, 0.7194808721542358, 0.020905915647745132, 0.05683388561010361, 0.08634666353464127, 0.7766058444976807, 1.37058687210083, -0.17557954788208008, 0.4371236562728882, 0.5498363971710205, 1.1218560934066772, 0.7794267535209656, 1.536742091178894, 0.28...
def fetch _ metadata ( hostname : str ) - > none : # [ doc - stag - fetch - metadata ] with closing ( client. sensor ( hostname ) ) as source : # print some useful info from print ( " retrieved metadata : " ) print ( f " serial no : { source. metadata. sn } " ) print ( f " firmware version : { source. metadata. fw _ re...
[ -0.5600849390029907, -0.16780100762844086, 0.5055884718894958, -0.35474708676338196, 0.4793231189250946, 0.4544452726840973, -0.34570738673210144, -0.7227898836135864, -0.812656581401825, 0.6280152201652527, -0.7643980383872986, 0.7373061776161194, 1.1003506183624268, 0.3909144103527069, ...
def collapse _ node ( self, nodeid ) : node = self. get _ item _ by _ nodeid ( nodeid ) if not self. is _ expandable ( node ) : self. logger. debug ( " node % s not expandable on tree % s ", nodeid, self. tree _ id ) return false if self. is _ expanded ( node ) : self. logger. debug ( " collapsing expanded node % s on ...
[ -0.817249596118927, 0.09518029540777206, 0.8047981858253479, -0.08253645151853561, -0.0940743014216423, -0.44671836495399475, -0.1826450675725937, 0.19758442044258118, 0.49215587973594666, 0.8847864270210266, -0.2875021994113922, -0.17997637391090393, -0.4677717387676239, 0.963009655475616...
def _ _ init _ _ ( _ _ self _ _, *, network _ watcher _ name : pulumi. input [ str ], resource _ group _ name : pulumi. input [ str ], storage _ location : pulumi. input ['networkpacketcapturestoragelocationargs'], target _ resource _ id : pulumi. input [ str ], filters : optional [ pulumi. input [ sequence [ pulumi. i...
[ -0.5091552138328552, 0.013677304610610008, 0.7782057523727417, -0.2023821324110031, 0.1294223964214325, -0.06839445978403091, -0.7799054980278015, -0.3840361535549164, 0.35582226514816284, 0.3933406174182892, -1.3669601678848267, 0.18153461813926697, 0.8286716938018799, -0.1721376329660415...
def final _ record ( self ) : from core. models. coreproxy import dimgnafaddressdetailsproxy record = self. gnafrecs. iloc [ 0 ] gnafaddr = dimgnafaddressdetailsproxy ( address _ detail _ pid = record. address _ detail _ pid, street _ locality _ pid = record. street _ locality _ pid, locality _ pid = record. locality _...
[ 0.10189072787761688, -0.029022524133324623, 0.8230504989624023, -1.5062980651855469, 0.7765857577323914, -0.651913046836853, 0.1088055968284607, -0.2937481105327606, -0.48874732851982117, -0.623185932636261, -0.20256657898426056, 1.0006043910980225, 0.004366294946521521, -0.381498217582702...
def get _ total _ latency ( self, src _ adr = none ) : pairs = [ ] p1 = none p2 = none sqnc _ num = none for packet in self. packets : if packet [ 1 ]. name = = " tcp " or packet [ 1 ]. name = = " ack " : if p1 is none and packet [ 1 ]. src _ node = = 0 : p1 = packet sqnc _ num = p1 [ 1 ]. sqnc _ num if p1 is not none ...
[ 0.08083722740411758, -0.22172096371650696, 1.1525603532791138, -0.9479480981826782, 0.022858407348394394, -0.31730300188064575, 0.31367865204811096, 0.9869176745414734, 1.0127314329147339, 0.9175081849098206, 0.18970832228660583, -0.016471680253744125, -0.2776575982570648, 0.52558690309524...
def pop ( self ) : if self. heap : return heapq. heappop ( self. heap ) [ 1 ] else : raise exception ('trying to pop from empty priorityqueue.')
[ 0.6457741856575012, -0.3134549558162689, 0.5929282903671265, 0.5196292996406555, -0.5687485933303833, 0.39568910002708435, -0.6998310089111328, -0.11361662298440933, -0.006031595636159182, -0.007509998045861721, 0.46933555603027344, -0.16764302551746368, -0.7756579518318176, 0.013043756596...
def finddock ( ) : global dock dock = mw. findchild ( qtgui. qdockwidget, " combo view " )
[ 1.3839645385742188, 0.482003778219223, 0.45831042528152466, -0.053114186972379684, -0.2737285792827606, -0.05796236917376518, 1.7308802604675293, 0.06714413315057755, -0.20420245826244354, -1.4144424200057983, 0.5690957307815552, 0.4943279027938843, -0.31468233466148376, 1.4138891696929932...
async def get _ message _ out ( self, timeout = none ) - > message : get _ task = asyncio. ensure _ future ( self. _ _ q _ out. get _ async ( timeout ) ) done = { } # check pool health every second while get _ task not in done : if not self. _ check _ pool _ healthy ( ) : get _ task. cancel ( ) self. logger. warning ( ...
[ -0.1835140585899353, 0.11599159985780716, 0.6253698468208313, -0.19603849947452545, -0.01780642196536064, -0.11178946495056152, 0.08652808517217636, -0.7851293683052063, -0.36036866903305054, -0.3234807848930359, 0.7095963358879089, 0.5743805766105652, -0.8005062937736511, -0.4948083758354...
def test _ check _ config _ params _ keep _ unsupported _ files _ wrong _ type ( gitdelver _ config _ params _ fixture : callable [ [ none ], dict [ str, str ] ] ) : config _ params = gitdelver _ config _ params _ fixture config _ params [ " keep _ unsupported _ files " ] = " test " with pytest. raises ( systemexit ) :...
[ 0.16907742619514465, 0.46024540066719055, 0.607141375541687, 0.5972855091094971, 0.16581407189369202, 1.2120519876480103, 0.1549694538116455, 0.7697492241859436, -0.507926344871521, 1.1368943452835083, -0.7241395115852356, -0.2891058921813965, -0.5611985325813293, 1.408202886581421, 0.91...
def _ parse _ cmgl _ header ( s ) : try : index, status, origin, _, date, time = s. strip ('+ cmgl :'). split ( ',') except valueerror : return {'index': none,'status': none,'origin': none,'date': none,'time': none,'message': s, } y, m, d = date. split ('/') date ='/ '. join ( [ m, d, y ] ) return {'index': int ( index...
[ -0.35320034623146057, -0.20278804004192352, 0.7304620742797852, -0.9518568515777588, -1.7054533958435059, -1.036633849143982, -0.004968589171767235, -0.32341471314430237, -0.3619419038295746, -0.08971945941448212, -1.2076939344406128, 0.3868284225463867, -0.379405677318573, -0.294409304857...
def reproduce ( self ) - > remotedataset : return remotedataset ( self. client, self. id )
[ 0.924240231513977, 0.07207898795604706, 0.40044915676116943, -0.9166632890701294, -0.8423381447792053, 0.6616292595863342, -1.1921404600143433, -0.20690591633319855, 0.23973728716373444, -1.4278016090393066, -0.19193896651268005, 1.2967495918273926, -0.9045323729515076, -1.809362530708313,...
def test _ access _ with _ non _ tls _ client ( self ) : self. assertraises ( req _ exceptions. connectionerror, self. docker _ client _ non _ tls. containers )
[ -0.2051108181476593, 0.15622039139270782, 0.27361762523651123, 0.34103426337242126, -0.2791742980480194, 0.654330313205719, 0.37462860345840454, -0.9402613639831543, -0.6607537269592285, 0.21717838943004608, 0.514072597026825, -0.24557951092720032, -0.12377726286649704, 1.1691806316375732,...
def name ( self ) - > pulumi. output [ str ] : return pulumi. get ( self, " name " )
[ 0.5996610522270203, -0.47791606187820435, 0.4736770689487457, 0.08874538540840149, -0.4275035560131073, 0.3480296730995178, 0.1574808806180954, -0.024846583604812622, -0.18589520454406738, 0.7590891122817993, 0.08242655545473099, 0.3790670931339264, 0.5259250402450562, -0.723107635974884, ...
def test _ add _ build _ type ( self ) : pass
[ 0.0791759118437767, 0.4459308981895447, 0.41341525316238403, 1.3380917310714722, 1.0653477907180786, 1.231776475906372, 0.9644070863723755, -0.17588232457637787, 0.2774601876735687, -1.0132441520690918, -1.2660338878631592, -0.22482003271579742, -0.8887009024620056, 0.47887861728668213, ...
def test _ no _ complain _ no _ data _ multiple _ dbs ( self ) : def mock _ get _ history _ db _ config ( db ) : if db = = " usa - stk - 1d " : return { " bar _ size " : " 1 day ", " universes " : [ " usa - stk " ], " vendor " : " ibkr ", " fields " : { " close " : " float ", " open " : " float ", " high " : " float ",...
[ -0.22785025835037231, 0.7297242283821106, 0.8421717286109924, -0.03016943857073784, 0.7920376658439636, 0.10532098263502121, 0.7151882648468018, -0.1645534634590149, -0.4165862500667572, -0.2844027578830719, 0.06785240769386292, 0.17723068594932556, -0.31321823596954346, 0.5049924254417419...
def compute _ best _ test _ losses _ case2 ( data, k, total _ queries ) : results = [ ] for query in range ( k, total _ queries + k, k ) : best _ arch = sorted ( data [ : query ], key = lambda i : i [ 4 ] ) [ 0 ] test _ error = best _ arch [ 5 ] results. append ( ( query, test _ error ) ) return results
[ -0.3673134744167328, -0.26751941442489624, 0.2936434745788574, 0.10415981709957123, -0.10107293725013733, -0.20754268765449524, 0.1923503279685974, 0.044253189116716385, 0.44660818576812744, 0.6873910427093506, -0.2566105127334595, -0.18662796914577484, -0.06200414523482323, 0.232088401913...
def settitle ( self, text ) : print " amsnwindow. settitle " pass
[ 0.3459281623363495, -0.4714643955230713, 0.15742865204811096, 0.48296380043029785, -0.8825806379318237, 0.3751654326915741, -0.9350123405456543, -0.12549036741256714, 0.9164503216743469, 0.01524979155510664, -0.9362984299659729, 0.3658079206943512, -1.2130835056304932, 0.2954137921333313, ...
def cors _ enabled ( origin, methods = ['get'] ) : def decorator ( f ) : @ wraps ( f ) def decorated _ func ( request, * args, * * kwargs ) : if request. method = ='options': # preflight if ('http _ access _ control _ request _ method'in request. meta and'http _ access _ control _ request _ headers'in request. meta ) :...
[ -0.2761508822441101, -0.8032233119010925, 0.9606230854988098, 0.15140485763549805, -0.3857605755329132, 0.08602913469076157, -0.7453450560569763, 0.40779927372932434, 0.9960128664970398, 0.06455884873867035, 0.9691463112831116, 0.13096264004707336, 0.4809040129184723, 0.013228565454483032,...
def load ( self ) : from scipy. io import loadmat import h5py from pathlib import path import numpy as np filename = path ( self. filename ) try : if filename. suffix = = '. mat': d = loadmat ( filename ) elif filename. suffix = = '. h5': d = h5py. file ( filename ) except typeerror : logger. exception ( f'{ filename }...
[ 0.02440977655351162, -0.5990435481071472, 0.5133499503135681, -0.07952271401882172, 0.11516779661178589, 0.8044061660766602, -0.25438618659973145, -0.44422096014022827, -1.4442384243011475, 0.00853366032242775, 0.34615379571914673, 0.07296443730592728, 0.5591499209403992, 0.115486584603786...
def contains ( self, point, origin, width ) : return origin [ 0 ] < = point [ 0 ] < origin [ 0 ] + width and \ origin [ 1 ] < = point [ 1 ] < origin [ 1 ] + width and \ origin [ 2 ] < = point [ 2 ] < origin [ 2 ] + width
[ 0.4777175784111023, -1.2421040534973145, 0.6148457527160645, 0.2934100329875946, -0.7189680337905884, 0.8155195116996765, -0.8920233249664307, 0.1544300764799118, 0.7898619174957275, -0.13381798565387726, 0.22994880378246307, -0.02291286550462246, -0.8428838849067688, -0.13791567087173462,...
def test _ srv _ inner _ product _ and _ dist ( self ) : r3 = euclidean ( dim = 3 ) curve _ b _ transl = self. curve _ b + gs. array ( [ 1. 0, 0. 0, 0. 0 ] ) curve _ b = [ self. curve _ b, curve _ b _ transl ] translation _ invariant = [ true, false ] for curve in curve _ b : for param in translation _ invariant : srv ...
[ 0.08960665017366409, -0.3106081783771515, 0.6390417218208313, 0.569845974445343, -0.0493018738925457, 1.2409436702728271, 0.42518800497055054, -0.05628226324915886, 0.20004259049892426, 0.25705191493034363, -0.6176467537879944, 0.27638399600982666, -0.5395997166633606, -0.5635996460914612,...
def fb _ create ( self, * * kwargs ) : social _ app = socialapp. objects. all ( ) [ 0 ] client _ id = social _ app. client _ id # access _ token = social _ app. socialtoken _ set. all ( ) [ 0 ] # this token isn't working access _ token = " { 0 } | { 1 } ". format ( client _ id, social _ app. secret ) name = kwargs. get...
[ 0.49172157049179077, 0.41280412673950195, 0.8168742060661316, 1.1954153776168823, -0.04294005408883095, 0.38422074913978577, -0.25598016381263733, -0.6417189240455627, -0.10888202488422394, -0.47963738441467285, 0.21934673190116882, 0.60884028673172, -1.2518547773361206, 0.5956676602363586...
def extendtask ( self ) : self. timetogo = datetime. timedelta ( minutes = settings. task _ extension ) self. start ( )
[ 0.7270779609680176, 1.4114189147949219, 0.6483386158943176, 0.7947533130645752, -0.08883136510848999, 0.2745335102081299, -0.9243609309196472, 0.6902292966842651, 0.3412044942378998, 0.816002368927002, -1.1136716604232788, 0.5020389556884766, 0.6051782965660095, -0.15809930860996246, -0....
def get _ field _ type ( self ) : return " list : { } ". format ( self. inner. get _ field _ type ( ) )
[ -0.6608598828315735, 0.04990735650062561, 0.5436616539955139, -1.0211257934570312, 1.2656428813934326, 0.1341758370399475, -0.7143713235855103, 0.3267984986305237, 0.5201151371002197, -0.5593219995498657, -1.020424485206604, 0.7087743878364563, -0.4068111777305603, 0.13188926875591278, 0...
def search _ users ( self, query ) : params = {'q': query, } return self. client. get ( self. client. users +'/ search ', params = params, bucket = _ func _ ( ) )
[ -1.613431453704834, 0.8885318636894226, 0.20694825053215027, 0.4197876453399658, 0.07429202646017075, 0.021631427109241486, -1.0188812017440796, -1.3522042036056519, 0.0680927112698555, -0.4726506769657135, -0.33257582783699036, 0.8775472044944763, -0.9433944821357727, -0.16521814465522766...
def output _ fn ( prediction _ output, accept ) : if accept = = content _ type : buffer = bytesio ( ) np. save ( buffer, prediction _ output ) return buffer. getvalue ( ), accept raise exception ('requested unsupported contenttype in accept :'+ accept )
[ -0.5663257241249084, -0.6867783665657043, 0.47658857703208923, 0.2861369848251343, -0.8894088864326477, -0.1222602128982544, 0.5045251846313477, -0.7452197670936584, -1.3412553071975708, 0.34269049763679504, -0.13694901764392853, 0.3466734290122986, 0.10504916310310364, -0.1661292761564254...
def test _ login _ user ( self ) : user = user. objects. create _ user ( username ='chet ', email ='chet @ chethall. com ', password ='chet') cl = client. objects. create ( user = user, redirect _ uri = " http : / / localhost / ", client _ type = 2 ) token = accesstoken. objects. create ( user = user, client = cl, expi...
[ 0.13203288614749908, 0.23516470193862915, 0.5635080933570862, 0.509867250919342, -0.07487330585718155, 0.9409040212631226, -0.2790738642215729, -1.0156466960906982, -0.26447996497154236, -1.450203776359558, -0.6412564516067505, 0.052420180290937424, 0.4027827978134155, -0.31503814458847046...
def trace ( self ) : print ( f " trace : % 02x | % 02x % 02x % 02x | " % ( self. pc, # self. fl, # self. ie, self. ram _ read ( self. pc ), self. ram _ read ( self. pc + 1 ), self. ram _ read ( self. pc + 2 ) ), end ='' ) for i in range ( 8 ) : print ( " % 02x " % self. registers [ i ], end ='' ) print ( )
[ 0.6261917352676392, 0.32378512620925903, 0.8791487812995911, -0.03651856258511543, 1.3387643098831177, 0.4683525562286377, 0.957154393196106, -0.5681858062744141, 0.048874396830797195, 0.0938267856836319, 0.17555347084999084, 0.8865017294883728, -1.3559582233428955, 0.32148873805999756, ...
async def async _ setup _ platform ( hass : homeassistant, config : configtype, async _ add _ entities : addentitiescallback, discovery _ info : discoveryinfotype | none = none, ) - > none : async _ add _ entities ( await _ async _ create _ entities ( hass, config ) )
[ 0.20335890352725983, 0.7177481651306152, 0.46391868591308594, 0.39720916748046875, 1.393872857093811, 0.16285549104213715, 0.03629874065518379, 0.10205817967653275, 0.14115719497203827, -0.06338169425725937, -0.1888543665409088, -0.8038797378540039, 0.6181461811065674, 1.4869694709777832, ...
def run _ entry _ crud _ ops ( tablelike _ schema, crud _ client, result _ acc ) : tle0 = tablelike _ schema. generate _ example _ entry ( ) tle1 = tablelike _ schema. generate _ example _ entry ( ) tle2 = tablelike _ schema. generate _ example _ entry ( ) log ('tle0 :'+ str ( tle0 ) ) log ('tle1 :'+ str ( tle1 ) ) log...
[ 0.303092360496521, 0.1884666383266449, 0.501713216304779, 0.020382476970553398, 0.27984854578971863, 0.4019773006439209, 0.9366747140884399, -0.3163406550884247, -0.22356157004833221, 0.19767940044403076, -0.230674147605896, 0.5576711297035217, 0.04143352061510086, 0.38536620140075684, 0...
def normalize _ df ( df ) : x = df. values min _ max _ scaler = preprocessing. minmaxscaler ( ) x _ scaled = min _ max _ scaler. fit _ transform ( x ) scaled _ df = pd. dataframe ( x _ scaled ) renaming _ rules = dict ( zip ( scaled _ df. columns, df. columns ) ) scaled _ df. rename ( columns = renaming _ rules, inplac...
[ -0.4177258014678955, 0.22277821600437164, 0.7743911743164062, 0.004506191238760948, -0.7858677506446838, -0.07562239468097687, -0.5665470957756042, 0.05565802752971649, 0.06566286832094193, 0.5125536918640137, 0.024166500195860863, 0.5379843711853027, 0.4583684504032135, -0.101660177111625...
def vgg19 ( pretrained = false, * * kwargs ) : model = vgg ( make _ layers ( cfg ['e'] ), * * kwargs ) if pretrained : model. load _ state _ dict ( model _ zoo. load _ url ( model _ urls ['vgg19'] ) ) return model
[ 0.6419564485549927, 0.5933153629302979, 0.11524663120508194, 0.37786388397216797, -0.09834208339452744, 0.1288454383611679, 0.6386454701423645, 1.0315122604370117, -0.11694653332233429, -0.14760629832744598, -0.7742476463317871, -0.5751927495002747, -0.1802477389574051, 0.21800298988819122...
def search _ results ( ) : query = request. form. get ('search') documents = [ ] produce = produce. query. all ( ) for p in produce : name = p. prod _ name p _ type = p. prod _ type p _ describe = p. describe p _ date = p. avail _ date p. id = str ( p. prod _ id ) body = dict ( type = p _ type, name = name, date = p _ ...
[ -1.2720117568969727, -0.11440553516149521, 0.7831792235374451, -0.06152930110692978, 0.40410682559013367, 0.11495284736156464, -0.3942195177078247, -0.46247559785842896, -0.05049331486225128, -0.33843448758125305, 0.3904242515563965, -0.37077027559280396, -0.056058838963508606, 0.099303796...