text
stringlengths
25
2.19k
embedding
listlengths
768
768
def provisionssh ( output _ dir ) : host _ key _ path = os. path. join ( output _ dir,'ssh _ key') host _ pubkey _ path = host _ key _ path + '. pub'id _ key _ path = os. path. join ( output _ dir,'id _ ed25519') id _ pubkey _ path = _ getpubkeypath ( output _ dir ) known _ hosts _ path = os. path. join ( output _ dir,...
[ -0.12628890573978424, -0.13050659000873566, 0.7477027773857117, -0.30424782633781433, 0.19669616222381592, 0.47108376026153564, 0.3746645152568817, 0.8329476118087769, -0.39795464277267456, 0.3619954586029053, -0.6903272271156311, -0.39903852343559265, 0.5317507982254028, 1.063912034034729...
def do _ update _ all ( self ) : _ error _ code = 0 _ msg ='' for _ node in self. tree. all _ nodes ( ) : try : _ error _ code, _ debug _ msg = self. do _ update ( _ node. identifier ) _ msg = _ msg + _ debug _ msg +'\ n'except attributeerror : _ error _ code = 1 _ msg = ( " ramstk error : one or more records in the ha...
[ -0.40930598974227905, -0.20348292589187622, 0.7466362714767456, 0.2521183490753174, 0.4118753671646118, -0.20559200644493103, 0.20716136693954468, 0.4871225655078888, -1.1639877557754517, 1.0085536241531372, -0.07095897197723389, 0.36258724331855774, -0.5064267516136169, 1.2188606262207031...
def analyzefunctionblock ( self, block _ ea ) : function _ calls = [ ] try : func _ start = sark. function ( block _ ea ). startea block _ lines = sark. codeblock ( block _ ea ). lines except exception : return function _ calls # scan each of the lines for line in block _ lines : instr _ pos = line. ea call _ candidate...
[ -0.040624164044857025, -0.4955421984195709, 0.7904880046844482, 0.057847872376441956, 0.2564137876033783, -1.0646679401397705, 0.33732858300209045, -0.32748642563819885, 0.19095292687416077, -0.7363278865814209, 0.37948301434516907, 0.4338880181312561, 0.1093447133898735, 1.467731714248657...
def index ( ) : form = chatform ( ) return render _ template ('index. html ', form = form, key = goo _ api _ key )
[ 0.07936250418424606, 0.3691931366920471, 0.33687329292297363, -0.4878259003162384, 0.0020495723001658916, -0.10036726295948029, -0.0185856893658638, 0.31622231006622314, -1.288175106048584, 0.13385218381881714, -0.3889603614807129, -0.025470897555351257, 0.08413824439048767, 0.233602911233...
def suite ( ) : tasks _ suite = unittest. testsuite ( ) tasks _ suite. addtest ( task _ test ('' ) ) return tasks _ suite
[ 0.45144981145858765, 0.4729140102863312, 0.5053904056549072, -0.2633551061153412, 0.5375548601150513, 0.005307952407747507, 0.13662587106227875, 0.3428621292114258, 0.019152682274580002, -0.29945245385169983, -0.5861294269561768, 0.021036796271800995, -0.07335343211889267, -0.5281777381896...
def test _ create _ like _ notification _ via _ signal ( self ) : self. article _ like. save ( ) self. assertequal ( notification. objects. count ( ), 1 ) self. assertequal ( str ( notification. objects. get ( ) ), f'{ self. user _ 2. display _ name } liked { self. article. title }')
[ 0.1396222710609436, 0.10889425873756409, 0.3076871335506439, -0.001376140397042036, 0.33868086338043213, 1.4193086624145508, -0.00925862044095993, -0.7252889275550842, -0.7173793315887451, 0.6154558658599854, -2.2760744094848633, -0.03495575115084648, 0.08270761370658875, 0.186966717243194...
def get _ transformer ( deploy _ file, mean _ file = none ) : network = caffe _ pb2. netparameter ( ) with open ( deploy _ file ) as infile : text _ format. merge ( infile. read ( ), network ) if network. input _ shape : dims = network. input _ shape [ 0 ]. dim else : dims = network. input _ dim [ : 4 ] t = caffe. io. ...
[ -0.19198712706565857, -0.19522593915462494, 0.7569501399993896, -0.6594937443733215, 0.0507163479924202, -0.08581407368183136, 0.15305624902248383, 0.04473213106393814, -1.0527499914169312, 0.8436782360076904, 0.02140020579099655, -0.06269942969083786, -0.31570112705230713, 0.3343099951744...
def periodic ( self ) : if self. _ _ event _ loop : # special for shutdown self. _ _ event _ loop. stop ( ) self. _ _ event _ loop. run _ forever ( )
[ 0.4152336120605469, -1.1209373474121094, 0.5805413722991943, 0.6413900852203369, 0.6293197274208069, 0.3886274993419647, -0.22550393640995026, 0.559242308139801, -0.8882835507392883, -0.21381396055221558, 1.0270441770553589, 0.1425163447856903, -0.5237754583358765, -0.06693705916404724, ...
def throttling _ rate _ limit ( self ) - > optional [ float ] : return pulumi. get ( self, " throttling _ rate _ limit " )
[ 1.508636236190796, 1.1883625984191895, 0.5241408348083496, 0.5164934396743774, 1.1048548221588135, 0.7218151092529297, -0.6888152360916138, -0.4315686821937561, 0.2562914788722992, 0.7370778918266296, 0.5020744800567627, 0.7378988265991211, -0.14339838922023773, -1.7220234870910645, -0.8...
async def get _ all _ operations ( self ) - > mythicresponse : url = " { } { } : { } / api / v { } / operations ". format ( self. _ http, self. server _ ip, self. _ server _ port, self. _ server _ api _ version ) resp = await self. get _ json ( url ) if resp. response _ code = = 200 and resp. status = = " success " : o...
[ -0.8770052790641785, -0.09055624902248383, 0.9865900874137878, 0.4823038578033447, 1.0407465696334839, -1.1512548923492432, 0.12456853687763214, 0.006543771363794804, 0.42773181200027466, 0.20302879810333252, -0.27373653650283813, -0.47320130467414856, -0.22830456495285034, 0.0057928669266...
def load _ costmap _ from _ img ( img _ fname ) : resolution = 0. 03 world _ size = 10 static _ map = costmap2d. create _ empty ( world _ size = ( world _ size, world _ size ), resolution = resolution, world _ origin = ( 0, 0 ) ) img = cv2. imread ( img _ fname ) # opencv loads bgr b, g, _ = img [..., 0 ], img [..., 1 ...
[ -0.39353492856025696, -1.2726058959960938, 0.838316023349762, -0.03026939183473587, -0.1839360147714615, 0.3903055787086487, 1.0959919691085815, 0.27599018812179565, 0.06386424601078033, 0.680223286151886, 0.06412765383720398, -0.19011683762073517, 0.2969014346599579, 0.34203454852104187, ...
def extract _ items _ from _ json ( self, json _ obj ) : result = errorresponse ( ) records = json _ obj. get ( records ) if type ( records )! = list : result. add _ message ('airtable api response missing list property \'records \'' ) return result items = [ ] for record in records : result1 = self. extract _ item _ f...
[ -0.6779324412345886, -0.732492983341217, 0.809965968132019, 0.49769434332847595, -0.2069147825241089, -0.2496154010295868, -0.14618471264839172, -0.4545586109161377, 0.5198990702629089, 0.29021790623664856, -0.822506308555603, -0.9086463451385498, -0.22658608853816986, 0.3401741087436676, ...
def min _ frequency ( self ) : return self. _ _ min _ frequency
[ 0.49795469641685486, -1.0474504232406616, 0.08865375816822052, 0.3433557152748108, -0.24441292881965637, 0.15390241146087646, 0.10415039956569672, -0.9293994903564453, 0.3742765784263611, -1.4237680435180664, 0.4326722025871277, -0.1836693435907364, -0.8044233322143555, 0.3114449381828308,...
def new ( * args, * * kargs ) : obj = itkimageserieswriterif3if2. _ _ new _ orig _ _ ( ) import itktemplate itktemplate. new ( obj, * args, * * kargs ) return obj
[ 0.12317059189081192, -0.11375732719898224, -0.1466313898563385, 0.07305802404880524, -0.1007695198059082, -1.0049189329147339, -0.26838237047195435, -0.4520585834980011, -1.0037846565246582, 0.928033173084259, -0.12770462036132812, 0.045407168567180634, 0.42483437061309814, 0.3967164158821...
def get _ consonents ( input ) : return set ( set ( input. lower ( ) ) - vowel _ set )
[ 0.3520452380180359, -1.0422542095184326, 0.26902109384536743, -0.24785593152046204, 0.10404976457357407, -0.19832873344421387, -0.23648904263973236, -0.8721339702606201, 0.3076040744781494, 0.4513971507549286, -0.11570276319980621, -0.421599805355072, -1.2155705690383911, -0.35677221417427...
def target _ team ( self ) : return self. _ target _ team
[ -0.1187576949596405, -0.6683153510093689, 0.023490209132432938, 0.15700818598270416, 1.062931776046753, 0.6103537678718567, 0.017817122861742973, -0.3794933259487152, -0.025040268898010254, -0.6722543239593506, 0.750792920589447, 0.9351136684417725, 0.5677735805511475, -1.608458161354065, ...
def test _ graphcutsegmentselftest1 ( self ) : # # first, get some data # # import urllib # downloads = ( ('http : / / www. slicer. org / slicerwiki / images / 5 / 59 / reglib _ c01 _ 1. nrrd ','tumor. nrrd ', slicer. util. loadvolume ), ) # export http _ proxy = http : / / proxyhost : proxyport # for url, name, loader...
[ 0.2857040762901306, -0.4136311411857605, 0.7527130246162415, 0.11333489418029785, 0.5912219285964966, -0.13578090071678162, 0.8266753554344177, -0.465816855430603, 0.37714704871177673, -0.11397916078567505, 0.19976934790611267, 0.5679137110710144, -0.4109981656074524, 0.007911693304777145,...
def is _ occupied ( self ) : return self. isoccupied
[ -1.1454784870147705, -0.5730936527252197, 0.45814430713653564, 0.20029404759407043, 0.37089675664901733, 0.19714464247226715, 0.4278572201728821, -0.30287355184555054, -0.255858838558197, 0.09707746654748917, -0.0035061617381870747, -0.24376097321510315, -0.2795960009098053, -0.43161100149...
def email _ body _ template _ id ( self ) : return self. _ email _ body _ template _ id
[ 0.13132153451442719, -0.5678995251655579, 0.4839338958263397, 0.1459101140499115, 0.0806778222322464, 0.7545338273048401, -0.08042536675930023, -0.15233106911182404, 1.1773345470428467, 0.44375553727149963, -0.9661166071891785, 0.746209442615509, -0.6717738509178162, 0.09298139065504074, ...
def _ format _ usage ( base _ pre, base _ post, modules ) : # extract the program, global options and subparser options from the # standard base parser. match = re. match ( r'^ ( \ s + ) ( \ s +. + )? \ s + ( { ( [ ^ } ] * ) }... ) $ ', base _ pre. replace ('\ n ','' ) ) if not match : raise exception ('failed to parse...
[ 0.44550392031669617, -0.4358431100845337, 0.6984060406684875, -0.17906102538108826, 0.30774202942848206, -0.6816118359565735, 0.02370717190206051, -0.3832550346851349, -0.636498212814331, 0.3901830017566681, 0.8332580924034119, 0.08662774413824081, -0.16794940829277039, 0.06509177386760712...
def get _ job _ by _ id ( cls, job _ id ) : session = meta. session ( ) job = session. query ( cls ). filter ( cls. id = = job _ id ). one _ or _ none ( ) if job is none : raise jobnotfoundexception ( " job with id " + str ( job _ id ) + " doesn't exist " ) return job
[ 0.43798941373825073, -0.29800254106521606, 0.17536011338233948, 0.36706826090812683, 0.4097507894039154, 0.4670449495315552, -0.16983932256698608, -0.3529030978679657, 0.24311023950576782, -0.11639906466007233, 0.6125504374504089, 0.6090043187141418, -0.6214079260826111, 0.3457848727703094...
def get _ sensor _ history ( self, sensor _ id, count = none, reverse = true ) :
[ 0.1623178869485855, 0.6768870949745178, 0.3167603313922882, 0.5955026745796204, 0.40957462787628174, -0.42112189531326294, 0.11661560088396072, -0.564518928527832, 0.2952740490436554, -0.3561694920063019, -0.024747412651777267, 0.7394575476646423, -0.04802100732922554, 0.45592930912971497,...
def get _ scenes ( self ) - > dict [ str, dict ] : return self. scenes
[ -1.110559105873108, -0.6594271063804626, 0.2533629834651947, -0.39938586950302124, -1.0290987491607666, -0.32491353154182434, -1.0136427879333496, -1.0928329229354858, -0.1228911429643631, 0.17869651317596436, -0.5918557643890381, -0.018445337191224098, -0.07910273224115372, 0.648040175437...
def setimage ( self, image ) : pass
[ -1.1559839248657227, 0.027941130101680756, 0.06242576614022255, 0.3533928692340851, 0.568572998046875, 0.7249365448951721, -0.0950811579823494, 0.4350212812423706, -0.4352909326553345, -0.08999785780906677, 0.41593316197395325, 0.7395582795143127, -0.277643084526062, 1.376871109008789, -...
def get _ rotate _ to _ coverslip _ function ( orig _ shape : collection [ int ], dz _ stage : float, xypixelsize : float, angle : float, interp _ order : int = 1 ) - > callable : dz = np. sin ( angle * np. pi / 180. 0 ) * dz _ stage dx = xypixelsize deskewfactor = np. cos ( angle * np. pi / 180. 0 ) * dz _ stage / dx ...
[ -0.7533464431762695, -0.28595176339149475, 0.7540267705917358, -0.3073676824569702, -0.502937376499176, -0.7828657627105713, 0.8091119527816772, -0.4590798318386078, 0.7333053946495056, -0.06381198018789291, -0.0007833139388822019, -0.17312820255756378, 0.5624146461486816, 0.25529244542121...
def _ test _ args _ subset ( test _ params, expected _ params, expected _ params _ present, args _ func ) : test _ parser = argparse. argumentparser ( ) args _ func ( test _ parser ) created = _ create _ argument _ values _ that _ must _ be _ files _ or _ dirs ( test _ params ) parsed _ params = dict ( vars ( test _ pa...
[ 0.44535505771636963, -0.7150974869728088, 0.5967086553573608, -0.16419194638729095, 0.8001901507377625, 0.4088074862957001, 0.24431319534778595, 0.7533777952194214, -1.0274218320846558, 0.7287232279777527, 0.42314139008522034, 0.3407492935657501, 0.4392768144607544, 0.377309113740921, -0...
def question ( ) : return [ [ 0, 1, 1, 1, 0 ], [ 1, 0, 0, 0, 1 ], [ 1, 0, 0, 0, 1 ], [ 0, 0, 0, 1, 0 ], [ 0, 0, 1, 0, 0 ], [ 0, 0, 0, 0, 0 ], [ 0, 0, 1, 0, 0 ], ]
[ -0.1464294195175171, -1.046496033668518, 0.9930757284164429, 0.20536014437675476, 0.405129998922348, 0.3185230493545532, 0.7635437250137329, -0.36730918288230896, 1.2857438325881958, -0.13401925563812256, -0.6888057589530945, -0.45262932777404785, -0.4586006700992584, 0.2236500382423401, ...
def test _ directory _ symlink _ dry _ run ( file, tmp _ path ) : if is _ windows and not os. environ. get ( " github _ actions _ pipeline " ) : pytest. xfail ( " this test fails when running from jenkins but not on the github " " actions pipeline " ) tmp _ dir = tmp _ path / " pgdata " sym _ dir = tmp _ path / " pg _ ...
[ 0.06829745322465897, 0.3251141309738159, 0.5352967381477356, -0.00793940108269453, 0.28911593556404114, 0.5849218964576721, 1.4795219898223877, 0.32859233021736145, 0.2208114117383957, -0.8251465559005737, -0.08251149952411652, 1.091381549835205, 0.11945284903049469, 0.8347925543785095, ...
def randchoice ( iterable ) - > int : length = len ( iterable ) index = urandom. getrandbits ( int ( math. log2 ( length ) ) + 2 ) % length return iterable [ index ]
[ -0.8991981744766235, 0.07552212476730347, 0.48753321170806885, -0.10597638040781021, 0.1134253442287445, 0.3105296790599823, 0.7804476618766785, -0.32307910919189453, 0.6547249555587769, 0.02453930862247944, 0.470053493976593, 0.6237545609474182, -0.7417325377464294, -0.7899271845817566, ...
def render _ components ( array, all _ disabled, player _ settings _ 1, player _ settings _ 2 ) : return [ row ( * ( create _ component ( array, all _ disabled, player _ settings _ 1, player _ settings _ 2, index ) for index in range ( row _ start, row _ start + 3 ) ) ) for row _ start in range ( 0, 9, 3 ) ]
[ -0.541276216506958, 0.20771674811840057, 0.40564361214637756, -0.0350806899368763, 0.046357955783605576, 0.2848849594593048, -0.5574716925621033, -0.10531554371118546, 0.6498597264289856, 0.6503097414970398, 0.5280928611755371, -0.3904207646846771, -0.5191270112991333, -0.432550847530365, ...
def tocar _ pausar ( self, track = none ) : if track : pass if self. playing : pass else : pass self. playing = not self. playing
[ -0.3900283873081207, 0.1730714738368988, 0.737565279006958, 0.8049620985984802, 0.24668903648853302, 0.7172755599021912, 0.13825610280036926, -0.14315204322338104, -0.11570919305086136, -0.42149195075035095, 0.1289977729320526, -0.053100962191820145, -1.1122502088546753, 0.2772367894649505...
def mean _ firing _ rate _ of _ unit ( self, i _ unit ) : return ( sum ( self. count _ spikes _ in _ unit _ list ( self. units [ i _ unit ] ) ) / float ( sum ( [ info ['cropped _ duration'] for info in self. info ] ) ) )
[ -1.0543731451034546, 0.567031979560852, 0.5278406739234924, -0.2028505653142929, 0.20313286781311035, -0.04637712612748146, 0.05319471284747124, -0.4142369329929352, 0.6547180414199829, 0.09736212342977524, -0.285599023103714, 0.2173101156949997, -0.5081181526184082, 0.5861856341362, -0....
def test _ get _ quarterly _ null _ current _ submission ( tas _ balances _ data ) :
[ 0.5574837327003479, -0.7970709204673767, 0.34478411078453064, -0.28499525785446167, 0.5762436389923096, 0.008514371700584888, -0.2249075472354889, -0.956942617893219, 1.0280693769454956, -1.2047004699707031, 0.3507213890552521, -0.377980500459671, 0.23989130556583405, 0.3016451299190521, ...
def power _ law _ proton ( energy, proton _ power _ law _ alpha = 2. 7, proton _ power _ law _ normalisation = 0. 096, proton _ power _ law _ decorrelation _ energy = 1, * * kwargs ) : # add a power - law component to the hess function, its index and flux at 10 tev return proton _ power _ law _ normalisation * \ np. po...
[ 0.7728707790374756, -0.49880915880203247, 0.5538058280944824, -0.05136483907699585, 0.3220704197883606, 0.990477442741394, -1.2897515296936035, 1.436525821685791, -0.24244767427444458, 0.22545084357261658, 1.2940906286239624, -0.28764164447784424, 0.0021421490237116814, 0.3365382254123688,...
def scheduled _ statuses ( self ) - > nonpaginatablelist [ scheduledstatus ] : return self. _ _ api _ request ('get ','/ api / v1 / scheduled _ statuses')
[ -0.8424873948097229, -0.3945421576499939, 0.09151775389909744, 0.8866150975227356, 0.6280416250228882, 0.06863634288311005, -1.045906901359558, 0.5358355045318604, 0.6779940724372864, -0.6811792254447937, -1.532909631729126, 0.7252459526062012, 0.16615580022335052, -0.06377772986888885, ...
def process _ primary _ edges ( self ) : logs. log _ info ( " defining edges of tri mesh... " ) # calculate edges for cells trimesh, and the hull : all _ edges = set ( ) # set of all vertex pairs unique _ edges = set ( ) # set of unique vertex pairs hull _ points = [ ] hull _ edges = [ ] tri _ mids = [ ] # midpoint of ...
[ 0.788763165473938, 0.4250342845916748, 0.7720102071762085, -0.5566288828849792, 0.6483654975891113, -0.45396608114242554, 0.35226374864578247, 0.7790965437889099, 0.3919924199581146, 0.25996655225753784, -0.44629696011543274, 0.4195708632469177, -0.36725863814353943, 0.0429287925362587, ...
def get ( self, request, session _ id ) : session = get _ object _ or _ 404 ( callsession, pk = session _ id ) print ('- - - - - region _ get - - - - - - -') print ( request. get ) print ( session. language ) voice _ service = session. service # if'redirect _ url'in request. get : # redirect _ url = request. get ['redi...
[ -0.332383930683136, -0.24048547446727753, 0.5284615755081177, -0.9511111378669739, -0.004196373745799065, -0.5239105224609375, -0.35238608717918396, -0.9465168118476868, 1.4772831201553345, -0.10943255573511124, 0.6262096166610718, 0.8270918726921082, 0.4602840840816498, 0.2016467750072479...
def writereturn ( ) : # implement me
[ -1.0397155284881592, -0.6405308842658997, 0.34390658140182495, 0.26384812593460083, 1.2088431119918823, -0.4263862669467926, 1.8684860467910767, 0.6068426370620728, -0.4297736585140228, -0.42808079719543457, -0.20461969077587128, -0.35720545053482056, -0.9688418507575989, -1.08197343349456...
def validate _ unico ( value ) : if not user. objects. filter ( username = value ) : pass else : raise validationerror ( u'ya existe usuario con ese nombre')
[ 0.14995495975017548, 0.7831516861915588, 0.30814117193222046, 1.2087966203689575, 0.15072643756866455, 1.1135330200195312, 0.2391166239976883, 0.09538041800260544, -0.3683253228664398, 0.23050960898399353, -0.07186992466449738, -0.8188377022743225, -0.1358301341533661, 0.37457922101020813,...
def test _ mac _ vendor _ lookup ( self ) : mac ='b8 : 27 : eb : 00 : 00 : 00'vendor _ string ='raspberry pi foundation'device = device _ tracker. device ( self. hass, timedelta ( seconds = 180 ), true,'test ', mac,'test name') with mock _ aiohttp _ client ( ) as aioclient _ mock : aioclient _ mock. get ('http : / / ap...
[ -0.40877753496170044, 0.4796863794326782, 0.34126725792884827, 0.01955072209239006, 0.24712540209293365, -0.027154888957738876, 0.2763080596923828, -0.02212562784552574, -0.06448894739151001, -0.3311106860637665, 0.12212000042200089, 0.15683907270431519, 0.3478641211986542, 0.3144793808460...
def _ _ str _ _ ( self ) : return self. _ _ repr _ _ ( )
[ -0.4584897756576538, -1.5232925415039062, 0.5619059205055237, -1.331662654876709, -0.3835658133029938, 0.6781365871429443, -0.022302253171801567, -0.2855006158351898, 0.5683009624481201, -0.020251257345080376, 0.30990591645240784, 0.839617133140564, 0.1680319607257843, -0.6996430158615112,...
def reset _ format ( self ) : self. set _ format ( )
[ 0.4711592495441437, -0.6756861805915833, 0.10650267452001572, 0.4145236313343048, 0.67842698097229, -0.7804088592529297, 0.29868611693382263, -0.2060251235961914, -0.3026414215564728, -0.5060944557189941, 0.370540052652359, 1.791467308998108, 0.10017342865467072, 0.32115504145622253, -0....
def left ( message ) : room = session. get ('room') leave _ room ( room )
[ 0.2630467116832733, -0.09746532142162323, 0.16772785782814026, 0.3338000476360321, 0.748175859451294, -0.07069220393896103, -0.13996657729148865, -0.6744272708892822, 0.4393483102321625, 0.6058430075645447, -0.5851984620094299, 0.2766662538051605, -0.9452450275421143, 1.3621914386749268, ...
def find _ horizon ( infile ) : algo = client. algo ('ukyvision / deephorizon / 0. 1. 0') image = base64. b64encode ( open ( infile, " rb " ). read ( ) ) return algo. pipe ( {'image':'data : image / jpg ; base64,'+ image. decode ( " utf - 8 " ) } ). result
[ -0.5878807902336121, 0.4033089876174927, 0.5497997403144836, 0.4934467375278473, -0.7417098879814148, 0.18005597591400146, 0.21604862809181213, 0.39408454298973083, -0.9966076612472534, 0.4287920892238617, -0.762927234172821, 0.5137492418289185, -0.8804289102554321, 0.17345382273197174, ...
def is _ street _ name ( elem ) : return ( elem. attrib ['k'] = = " addr : street " )
[ 0.3310365378856659, 0.7971484065055847, 0.40746358036994934, 0.9397131204605103, -0.9845685362815857, 0.3587431013584137, 0.07189444452524185, -0.08857642859220505, 1.1158348321914673, 0.9699715375900269, -0.3393439054489136, -0.3009953498840332, 0.17952662706375122, -0.03382018953561783, ...
def pretty _ number ( numbers ) : try : return [ pretty _ number ( n ) for n in numbers ] except typeerror : pass n = numbers if n = = 0 : result ='0'elif ( abs ( n ) < 1e - 3 ) or ( abs ( n ) > 1e3 ) : result = " % 0. 3e " % n elif abs ( int ( n ) - n ) < 1e - 3 and int ( n )! = 0 : result = " % i " % n else : result ...
[ -0.05312531068921089, 0.16009433567523956, 0.5819180011749268, 0.3821699619293213, -0.19455531239509583, 0.0814136266708374, -0.39204803109169006, -0.0900745615363121, 0.2567392587661743, -0.02702167071402073, 0.928211510181427, -0.5281386971473694, 0.14135389029979706, 0.9964159727096558,...
def _ _ init _ _ ( self, words ) : self. mapping = { } for i in xrange ( len ( words ) ) : self. mapping [ words [ i ] ] = self. mapping. get ( words [ i ], [ ] ) + [ i ]
[ -0.5671067833900452, 0.5102039575576782, 0.37979909777641296, -0.5395860075950623, -0.9103590846061707, 0.04263775423169136, 0.1316784769296646, 0.9727019667625427, 0.6673166751861572, 0.31337982416152954, -0.27170413732528687, -0.34916821122169495, -0.2742145359516144, 0.6156095266342163,...
def biases ( self ) : return [ layer. biases ( ) for layer in self. _ layers ]
[ 0.29424193501472473, -0.49802422523498535, 0.31244194507598877, 1.4611434936523438, 1.2229034900665283, 0.6714591383934021, -0.39319756627082825, 0.4209359288215637, -0.13220332562923431, -0.06043631210923195, -0.9198266863822937, 0.9353609681129456, -0.4154171347618103, 1.0926344394683838...
def test _ interface _ 3 ( ) : tcex _ instance = utility. init _ tcex ( ) owner = tcex _ instance. args. api _ default _ org batch = tcex _ instance. batch ( owner ) batch _ ind _ creation _ interface _ 3. address _ create ( batch ) batch _ ind _ creation _ interface _ 3. email _ address _ create ( batch ) batch _ ind ...
[ -0.07297603040933609, 1.2274545431137085, 0.4527648389339447, 0.4167630970478058, 0.32053259015083313, 1.6802352666854858, 0.338254451751709, 0.16996772587299347, -0.9634809494018555, -0.04720602184534073, -0.7226141095161438, -0.4747321307659149, -0.5659148097038269, -0.02515365183353424,...
def _ true _ pass ( self, all : str, sentences : list [ str ] ) - > str : print ('tagging true tokenization') remainingtext = str ( all ) truetokenization ='' end = false remainingtextoriglen = len ( remainingtext ) for sent in sentences : bos = true print ( f'{ ( 1 - len ( remainingtext ) / remainingtextoriglen ) * 10...
[ 0.48296403884887695, 0.20894229412078857, 0.7921969890594482, -0.17534543573856354, -0.7363592386245728, -0.3447175920009613, 0.3569145202636719, 0.10900716483592987, -0.6511040925979614, 0.7431719899177551, -0.09063278138637543, -0.594584584236145, -0.6240315437316895, 0.5978055000305176,...
def check _ collisions ( self ) : for cactus in self. _ cactus _ group : cactus. movement [ 0 ] = - 1 * self. gamespeed if pygame. sprite. collide _ mask ( self. _ player _ dino, cactus ) : self. kill _ player ( ) for ptera in self. _ pteras _ group : ptera. movement [ 0 ] = - 1 * self. gamespeed if pygame. sprite. col...
[ -0.41779354214668274, 0.27445006370544434, 1.0067083835601807, 0.30480656027793884, 0.9755404591560364, 0.3213314712047577, 1.104351282119751, -1.103883147239685, -0.5517013072967529, 0.8138012290000916, 0.3410259783267975, -0.6959762573242188, -0.13894852995872498, 0.1914316564798355, 0...
def mrr ( scores, candidates, labels ) : _, top _ score _ ids = tf. nn. top _ k ( scores, k = tf. shape ( scores ) [ - 1 ] ) batch _ indices = tf. cumsum ( tf. ones _ like ( candidates, dtype = tf. int32 ), axis = 0, exclusive = true ) indices = tf. concat ( [ tf. expand _ dims ( batch _ indices, axis = - 1 ), tf. expa...
[ -0.801685631275177, -0.6345859169960022, 0.6949295401573181, -0.4056161046028137, -0.2755984365940094, 0.5970653295516968, 0.195819690823555, 0.4903564453125, 0.10845838487148285, 0.9138694405555725, 0.31185582280158997, 0.21035698056221008, -0.4844281077384949, -0.03579077869653702, 0.4...
def unload ( self ) : for action in self. actions : self. iface. removepluginmenu ( self. tr ( u'& usługa lokalizacji działek katastralnych'), action ) self. iface. removetoolbaricon ( action )
[ -0.5645886659622192, -0.8639538884162903, 0.2702244520187378, -0.44290828704833984, 0.26848727464675903, -0.6069390773773193, 1.2108944654464722, -0.1847192496061325, -0.5019975304603577, 0.09964355081319809, -0.7217617630958557, -0.36507198214530945, -0.06897052377462387, -0.1731188595294...
def test _ single _ fetch _ data ( self ) : node = list ( self. finder. find _ nodes ( query ( self. series1 ) ) ) [ 0 ] time _ info, data = node. reader. fetch ( int ( self. start _ time. strftime ( " % s " ) ), int ( self. end _ time. strftime ( " % s " ) ) ) self. asserttrue ( self. steps = = len ( data ), msg = " e...
[ 0.15858186781406403, 0.5539743304252625, 0.3138076663017273, -0.42170217633247375, 0.39485183358192444, 0.7340980768203735, -0.5757431387901306, 0.12056121975183487, -0.16872671246528625, -0.7604326009750366, -0.03206292539834976, 0.24927213788032532, 0.5824862718582153, 0.5444594025611877...
def dot _ product ( self, other ) : return self. _ return _ dot _ product ( self, other )
[ -0.43609723448753357, 0.19781120121479034, 0.6157445907592773, 0.17349128425121307, -0.10261803865432739, -0.06484993547201157, 0.14112643897533417, -1.716091513633728, 1.168786644935608, -0.4008537828922272, -0.405297189950943, -0.03660629317164421, -0.056984830647706985, -0.1451126486063...
def get _ feature _ values ( df _ row ) : kv _ list = df _ row [ num _ columns - 1 ]. strip ( ). replace ( " \ t ", " " ). split ( _ feature _ list _ key _ value _ separator ) assert kv _ list, " empty key - value list! " feature _ values = [ kv. split ( _ feature _ value _ separator, maxsplit = 1 ) for kv in kv _ list...
[ -0.9360213279724121, 0.6178867816925049, 0.5636128187179565, 1.0516945123672485, 0.057453881949186325, -0.6497410535812378, -0.6991350650787354, 0.7992119193077087, -0.527056872844696, -0.10138273984193802, -0.4351058602333069, -0.4245184659957886, 1.145036220550537, 0.42883625626564026, ...
def solve _ sort ( expr, vars ) : lhs _ values = repeated. getvalues ( _ _ solve _ for _ repeated ( expr. lhs, vars ) [ 0 ] ) sort _ expression = expr. rhs def _ key _ func ( x ) : return solve ( sort _ expression, _ _ nest _ scope ( expr. lhs, vars, x ) ). value results = ordered. ordered ( lhs _ values, key _ func = ...
[ -0.8210457563400269, 0.46638602018356323, 0.5745083093643188, 0.06781145930290222, -0.49742135405540466, -0.8498131632804871, -0.6388741135597229, -0.7493264675140381, -0.45240500569343567, -0.3153840899467468, -0.9153140187263489, 0.3511132597923279, 0.1252383440732956, 0.0742932111024856...
def setup _ states ( ) : conn = sqlite3. connect ('source. db') curs = conn. cursor ( ) curs. execute ('drop table if exists states ;') create _ string = " " " create table states ( id integer primary key, zip integer, type text, primary _ city text, acceptable _ cities text, unacceptable _ cities text, state text, cou...
[ -0.03768265247344971, 0.4916203022003174, 0.987606942653656, -1.0243772268295288, 0.13599805533885956, 0.1765941083431244, 0.32921910285949707, 0.1312236189842224, 0.024558523669838905, 0.7912397980690002, -0.3954925835132599, -1.0876187086105347, -0.5661876201629639, 0.2852015495300293, ...
def load _ test _ tweets ( ) : test _ tweets = pd. read _ csv ( os. path. join ( data _ folder,'test _ data. txt'), delimiter = " \ t ", header = none, names = ['tweet'] ) test _ tweets = test _ tweets ['tweet']. str. split ( ', ', n = 1, expand = true ). rename ( columns = { 0 :'id ', 1 :'tweet'} ) return test _ tweet...
[ 0.0807720348238945, -0.2934143543243408, 0.3852494955062866, -1.0756288766860962, 0.5015108585357666, 0.09784027934074402, 0.38959184288978577, 0.3851375877857208, -0.30079737305641174, 0.7143489718437195, -0.5660529136657715, 0.16878744959831238, -0.4041747450828552, -0.9426776170730591, ...
def flush ( self ) : self. _ memcache. flush _ all ( )
[ 0.1636885106563568, -0.1747276335954666, 0.15850584208965302, 0.05230392515659332, 0.21221134066581726, 0.4999200105667114, -0.012410932220518589, -0.48517853021621704, -0.711510419845581, -0.5356066226959229, 0.19973979890346527, 1.1761488914489746, -0.4059050381183624, 1.0580191612243652...
def del _ node ( self, node ) : if type ( node ) is node : node _ obj = node node = node. id else : node = str ( node ) node _ obj = node ( self, node ) if not self. redis. sismember ( self. nodes _ key, node ) : raise valueerror ( node ) in _ edges = self. redis. smembers ('{ } : n : { } : ie '. format ( self. name, n...
[ -0.6754353046417236, 0.6864060759544373, 0.6168798208236694, -0.8748884201049805, -0.10045564919710159, -0.11523699015378952, -0.6829543113708496, 0.6201375722885132, 1.1050219535827637, 0.27196213603019714, -0.08713516592979431, 0.3299783766269684, -0.0437319241464138, 0.03259377554059028...
async def _ get _ message ( self, connection _ timeout : union [ int, float ] ) \ - > jsonobject : tasks : list [ asyncio. future [ any ] ] = [ ] # task waiting on connection timeout if connection _ timeout : timeout _ task = asyncio. ensure _ future ( self. _ wait _ connection _ timeout ( connection _ timeout ), loop ...
[ 0.03758962079882622, 0.06726352870464325, 0.8122190833091736, -0.4973764717578888, -0.09663131088018417, -0.9094575047492981, -0.4595443308353424, -0.5949153304100037, -0.9084515571594238, 0.4867807924747467, -0.14551912248134613, -0.37094253301620483, 0.17341236770153046, 0.23936729133129...
async def shutdown ( self ) - > none : for handler in self. on _ shutdown : if is _ async _ callable ( handler ) : await handler ( ) else : handler ( )
[ -0.5476745367050171, -0.1676543951034546, 0.4161437153816223, 1.4063829183578491, 0.7448588609695435, -0.351083368062973, 0.02913930080831051, 0.2944362759590149, 0.0032322776969522238, -0.0143588250502944, -0.02604103833436966, -0.03957514464855194, -0.28870874643325806, 0.798269987106323...
def test _ reactorparametrizationinserver ( self ) : reactor = memoryreactor ( ) factory = object ( ) t = internet. tcpserver ( 1234, factory, reactor = reactor ) t. startservice ( ) self. assertequal ( reactor. tcpservers. pop ( ) [ : 2 ], ( 1234, factory ) )
[ -0.742905855178833, 0.032848160713911057, 0.19878427684307098, -0.5225816369056702, 0.8095281720161438, -0.6034272909164429, 0.005568763706833124, 0.3754834532737732, 0.19609546661376953, 0.09280677139759064, -0.49586766958236694, 0.5678593516349792, -0.5157240033149719, 0.2396966964006424...
def get _ top _ flights ( from _ airport, to _ airport, departure _ date, duration, budget, n ) : url ='https : / / api. sandbox. amadeus. com / v1. 2 / flights / extensive - search'params = dict ( origin = from _ airport, destination = to _ airport, departure _ date = departure _ date, duration = duration, # one - way...
[ -0.7139120697975159, 0.5965316295623779, 0.6401854157447815, 0.5029411315917969, 0.02109222114086151, -0.781791627407074, -1.3194736242294312, -0.6649903059005737, -0.5598548054695129, -0.12149679660797119, -0.5587577819824219, 0.6049750447273254, -0.32734617590904236, -0.23045967519283295...
def set _ thermoregulator _ state ( self, on ) : msg = self. device. send ( " set - tr - state ", on ) return not msg. iserror ( )
[ -0.624576985836029, 1.0429999828338623, 0.7243208289146423, -0.784549355506897, -0.3580130636692047, 0.3650234639644623, -0.6256226301193237, 0.1573665738105774, -0.3127238154411316, 0.3984704613685608, -1.090410828590393, -0.45895203948020935, -1.5214382410049438, -0.1828077733516693, -...
def _ load _ template ( self, name ) : # mahmoud, be mad ; - ) mod = importlib. import _ module ( '. { 0 } '. format ( name ), _ _ package _ _ ) for key, value in mod. _ _ dict _ _. iteritems ( ) : if isinstance ( value, type ) and issubclass ( value, troposphere. template ) and not key [ 0 ] = ='_'and key! ='template'...
[ -0.7364550232887268, 0.06326257437467575, 0.5372666716575623, -0.6152395606040955, -1.7590689659118652, -0.33291009068489075, -0.42725685238838196, -1.0188769102096558, 0.14113189280033112, 0.8394724130630493, -0.8372811079025269, -0.7389053106307983, -0.7385808229446411, 0.539970099925994...
def delete ( self, ignore = none, keep = none, dryrun = false ) : # print ( self. artifacts _ dir ) manifest _ dir = self. artifacts _ dir /'manifests'delete _ errors = false nb _ manifests = 0 nb _ deleted = 0 if manifest _ dir. exists ( ) : for manifest in manifest _ dir. iterdir ( ) : nb _ manifests + = 1 if keep an...
[ 0.44104599952697754, -0.434743732213974, 0.7940293550491333, 0.019369322806596756, 0.21918906271457672, 0.04709968715906143, 0.9030632376670837, 0.3566374182701111, 0.5011979341506958, -0.3817497193813324, 0.5852593779563904, 0.045855943113565445, -0.2789727747440338, 0.4044462740421295, ...
def numerical _ gradient ( score, r, eps = 1e - 8 ) : num = r * 0 val = score ( r ) for i in range ( 3 ) : for j in range ( 3 ) : r [ i, j ] + = eps num [ i, j ] = ( score ( r ) - val ) / eps r [ i, j ] - = eps return num
[ -0.6204947233200073, 1.2733991146087646, 0.5945780873298645, 0.08754400908946991, -0.5632445216178894, -0.2132961004972458, 0.4394189715385437, 0.33563563227653503, 0.12120169401168823, 0.982059121131897, -0.7306800484657288, -0.619599461555481, 0.06440237909555435, -0.47483885288238525, ...
def get _ instances _ security _ groups _ bindings ( self, context, servers, detailed = false ) : neutron = neutronapi. get _ client ( context ) ports = self. _ get _ ports _ from _ server _ list ( servers, neutron ) security _ groups = self. _ get _ secgroups _ from _ port _ list ( ports, neutron ) instances _ securit...
[ -0.6395673155784607, 0.3266259431838989, 0.3591122627258301, 0.021887920796871185, -0.8535852432250977, 0.0695309117436409, -0.34564027190208435, -0.2444481998682022, -0.3401123583316803, 0.5720136761665344, -0.4750314950942993, 0.886258065700531, -0.7401749491691589, 1.2989497184753418, ...
def find _ clear ( self, height, width, start _ y = 0, start _ x = 0, from _ corner = true, spacing = 50 ) : def square _ generator ( increment = 50, start _ y = 0, start _ x = 0 ) : for y in range ( int ( start _ y / increment ), int ( self. y _ dim / increment ) ) : for x in range ( int ( start _ y / increment ), int...
[ -0.028708454221487045, -0.04919155687093735, 1.0926870107650757, -0.5920325517654419, -0.8170019388198853, -0.20913702249526978, 0.3850627839565277, -0.5653226971626282, 0.21593140065670013, 0.3271406292915344, -0.19654370844364166, -0.1850738227367401, 0.45884615182876587, 0.3048064708709...
def setup ( bot : pcparadisebot ) : bot. help _ command = customhelp ( )
[ 1.3755818605422974, -0.6101471185684204, 0.16474571824073792, 0.37945833802223206, 1.1843986511230469, 0.7963178753852844, 0.020636817440390587, 0.6087132692337036, -0.06580662727355957, -0.37354350090026855, 0.024247553199529648, 0.4383885860443115, -0.047616101801395416, 0.57090204954147...
def load _ from _ stream ( q _ err, q _ out, file _ in, engine, read _ all ) : try : with open ( file _ in, " rb " ) as f : while true : try : data = kas. load ( f, read _ all = read _ all, engine = engine ) except eoferror : break q _ out. put ( dict ( data. items ( ) ) ) except exception as exc : tb = traceback. form...
[ 0.9811753034591675, -0.7180352210998535, 0.5667415857315063, -0.06739848852157593, -1.3659392595291138, -0.3292885422706604, -1.3440006971359253, 0.5357211828231812, -0.9756773710250854, -0.21279652416706085, 0.2358524352312088, -0.14228346943855286, 0.6191181540489197, 0.0390208400785923,...
def generategnstanza ( self ) : conjunctions = [ ] for condition in self. conditions : if condition. architecture = ='*': arch _ condition = none elif condition. architecture = ='arm - neon': arch _ condition ='current _ cpu = = " arm " & & arm _ use _ neon'elif condition. architecture = ='ia32': arch _ condition ='cur...
[ -0.19760698080062866, -0.06286486983299255, 0.7178384065628052, 0.1629602164030075, 0.008080793544650078, -0.45900824666023254, 0.10490825772285461, 0.06877685338258743, -0.59946209192276, 0.6217061281204224, 0.0417916476726532, 0.35836631059646606, -0.35173818469047546, 0.4090732932090759...
def _ firms _ resolution ( df _ firms ) : # resolution in km of the centroids depends on the data origin. if'instrument'in df _ firms. columns : if df _ firms ['instrument']. any ( ) = ='modis': res _ data = 1. 0 else : res _ data = 0. 375 # for viirs data return res _ data / one _ lat _ km
[ -0.5818541049957275, 0.06306789815425873, 0.18097743391990662, 0.517429530620575, 0.30208274722099304, -0.8418575525283813, -0.5321837067604065, 0.5148812532424927, -0.019586073234677315, -0.001524806022644043, 0.7908105254173279, -0.4497933089733124, -0.11588511615991592, -0.0091585591435...
async def skip _ time ( self, target _ duration, * * kwargs ) : target _ time = self. time + datetime. timedelta ( pytimeparse. parse ( target _ duration ) / duration _ div ) while target _ time > self. get _ timestamp ( ) : await self. farm _ block ( * * kwargs ) self. sim. pass _ time ( 20 ) # or possibly aggregate f...
[ -0.6944267749786377, 0.7500461935997009, 0.6704690456390381, 0.5198293924331665, 0.06764290481805801, 0.01105511374771595, 0.13883477449417114, -1.7227681875228882, -0.29457372426986694, 0.15363304316997528, -0.1594795435667038, 0.4071773886680603, 0.10238750278949738, -0.5586082935333252,...
def hms _ to _ time ( hours, minutes, seconds ) : d = time ( 0, 0, 0, 0 ) if seconds < 60 : d = d. replace ( second = seconds ) else : d = d. replace ( second = seconds % 60 ) minutes + = ( seconds / / 60 ) if minutes < 60 : d = d. replace ( minute = minutes ) else : d = d. replace ( minute = minutes % 60 ) hours + = (...
[ -0.23972967267036438, 0.4422357380390167, 0.7515141367912292, -0.12818516790866852, -0.4841730296611786, -0.06258534640073776, -1.0096486806869507, -0.3639582693576813, -0.39998292922973633, 0.48075616359710693, 0.08079845458269119, 0.009916621260344982, -0.16973698139190674, 0.29229375720...
def _ _ init _ _ ( self, id, application, # pylint : disable = too - many - arguments user = none, version = none, user _ defined = none, data = none, files = none ) : super ( run, self ). _ _ init _ _ ( id = id, type = " run ", user _ defined = user _ defined, data = data, files = files ) self. application = applicati...
[ 0.6287062764167786, -0.5676866173744202, 0.40608105063438416, 1.235263466835022, 0.3351472020149231, 0.6856317520141602, -0.5222688317298889, 0.4914950430393219, -0.32946938276290894, 0.026397239416837692, -1.0951941013336182, 0.41815367341041565, -0.09634499251842499, 0.11935195326805115,...
def _ _ contextmenuclose ( self ) : if self. contextmenueditor : self. vm. closeeditorwindow ( self. contextmenueditor )
[ -0.02167798951268196, -0.4849410057067871, 0.5286944508552551, 0.22300350666046143, -0.8881124258041382, 0.2720664441585541, 0.3956874907016754, -0.007395940832793713, -0.6003421545028687, -0.5859578251838684, 1.7436389923095703, 0.014644527807831764, -1.301867127418518, 0.4776031374931335...
def send ( self, method, path, parameters ) : url =''. join ( ( self. url, path ) ) data = json. dumps ( parameters ) if parameters else none request = utils. httprequest ( url = url, data = data, method = method ) request. add _ header ('accept ','application / json') try : return self. validate ( self. receive ( self...
[ -0.9721207618713379, -0.2160426378250122, 0.6801645159721375, 0.3091585338115692, 0.3076173663139343, -0.31072989106178284, -0.459735244512558, -0.2933945953845978, -0.050591737031936646, 0.9503617286682129, 0.4231027662754059, 0.5789521336555481, -0.4830693006515503, -0.09361378848552704,...
def list _ objects ( db _ model ) : with session _ manager ( ) as db _ session : customers _ list = db _ session. query ( db _ model ) return customers _ list
[ -0.30461594462394714, -0.48862966895103455, 0.41420140862464905, 0.4655420780181885, 0.06686409562826157, -0.19928395748138428, -0.18750855326652527, -0.16791778802871704, 0.14815375208854675, 0.5820005536079407, -0.695944607257843, 0.04190415143966675, 0.33308982849121094, 0.3754875361919...
def select _ features _ from _ model ( model, x _ train, y _ train, x _ test, y _ test ) : thresholds = np. unique ( model. feature _ importances _ ) thresholds = np. sort ( thresholds ) for thresh in thresholds : # select features using threshold selection = selectfrommodel ( model, threshold = thresh, prefit = true )...
[ 0.5599076151847839, -0.2393486499786377, 0.4451290965080261, 0.17961788177490234, 0.2953314781188965, -0.3695032298564911, 0.057629864662885666, -0.5326272249221802, -0.2717551589012146, 0.14729121327400208, -0.3991977274417877, 0.4134938418865204, 0.2531999945640564, -0.5739696621894836, ...
def portfolio ( request ) : if request. user. is _ stylist = ='yes': full _ name = request. user. get _ full _ name ( ) portfolio _ haircuts = portfoliohaircut. objects. filter ( stylist = request. user ) stylist _ options = stylistmenu. objects. filter ( stylist = request. user ) return render ( request,'stylist / sty...
[ 0.0686778798699379, 0.22987693548202515, 0.3417784571647644, 0.2767869234085083, -0.7986935377120972, 0.37481051683425903, 0.2826761305332184, 0.062180519104003906, 0.6356627941131592, 0.797677218914032, 0.3149699568748474, 0.2045753449201584, -0.2482263445854187, 0.0731673538684845, 0.1...
def _ _ ne _ _ ( self, other ) : if not isinstance ( other, restpcrjobcreate ) : return true return self. to _ dict ( )! = other. to _ dict ( )
[ -0.45784518122673035, 0.33497339487075806, 0.7172286510467529, 0.3241129219532013, -0.28685641288757324, 0.7774971127510071, -1.275166392326355, -1.0462090969085693, -0.6381509900093079, -0.980048418045044, -1.0181987285614014, -0.4116462469100952, -1.3211725950241089, -0.07043671607971191...
async def put _ valid _ missing _ required ( self, complex _ body : " models. fish ", * * kwargs ) - > none : cls = kwargs. pop ('cls ', none ) # type : clstype [ none ] error _ map = { 404 : resourcenotfounderror, 409 : resourceexistserror } error _ map. update ( kwargs. pop ('error _ map ', { } ) ) content _ type = k...
[ -1.3994818925857544, -0.8146629333496094, 0.86368727684021, -0.21556676924228668, 0.04555559158325195, 0.3898874819278717, 0.7614825367927551, -0.10485249012708664, 0.29848575592041016, 0.5481564402580261, -0.9126331806182861, 0.8898434042930603, -0.5701395273208618, -0.2869473993778229, ...
def set _ critical ( self ) : self. _ call ('set _ critical')
[ 1.2650766372680664, 0.06697012484073639, 0.16262419521808624, 1.2847586870193481, 0.8072473406791687, 0.44594675302505493, -0.04688436910510063, 0.006632895674556494, -0.5733874440193176, -0.16856421530246735, -0.1299140900373459, 1.3968100547790527, -0.1671185940504074, -0.706306278705596...
def _ downloadtojson ( url : str ) - > tuple [ dict [ str, any ], int ] : with requests. get ( url, stream = true ) as req : req. raise _ for _ status ( ) return req. json ( ), len ( req. content )
[ -1.4432003498077393, -0.67862468957901, 0.8520062565803528, -1.0553783178329468, -0.7838075757026672, -1.1719342470169067, -0.18676342070102692, -0.5277780294418335, -0.3378976285457611, 0.31814733147621155, -1.768571376800537, -0.24175970256328583, 0.3190934360027313, 0.4447735548019409, ...
def cyclic ( graph ) : return any ( visit ( graph, v ) for v in graph )
[ -0.07264339178800583, 0.876793384552002, 0.43820899724960327, 1.0089914798736572, -0.3653889298439026, -0.43689829111099243, 0.2264283448457718, 0.128294438123703, -0.7492488026618958, 0.17889812588691711, 0.6091095209121704, 0.32589492201805115, -0.4941307008266449, 0.042088527232408524, ...
def _ get _ address _ from _ service ( self, service ) - > str : port = " " ip = " " for item in self. client. list _ namespaced _ service ( " default " ). items : if self. name in item. metadata. name : port = str ( item. spec. ports [ 0 ]. node _ port ) ip = self. client. list _ node ( ). items [ 0 ]. status. address...
[ -0.2711656093597412, -0.467731237411499, 0.6190792322158813, -0.1589982956647873, -0.4310697913169861, -0.24380521476268768, -0.33103692531585693, -0.6107519865036011, -0.05827078968286514, 0.8485768437385559, 0.574030876159668, 1.1731412410736084, -0.15533655881881714, -0.0303692501038312...
def read _ model ( filepath ) : return pickle. load ( open ( filepath,'rb') )
[ 0.11907803267240524, -0.6354557275772095, 0.11865557730197906, -1.031038761138916, 0.4427422285079956, 0.7478464245796204, -0.3725700378417969, -0.4053294360637665, -0.9345089793205261, 1.0340957641601562, -0.21107816696166992, -0.840534508228302, 0.11224013566970825, -1.7001233100891113, ...
def file _ end _ mtime _ epoch ( self, file _ end _ mtime _ epoch ) : if ( self. _ configuration. client _ side _ validation and file _ end _ mtime _ epoch is not none and file _ end _ mtime _ epoch < 0 ) : # noqa : e501 raise valueerror ( " invalid value for ` file _ end _ mtime _ epoch `, must be a value greater than...
[ -0.33021172881126404, -1.068671703338623, 0.04670731723308563, -0.39275476336479187, 0.008454428985714912, 0.9333834648132324, -0.7260545492172241, 1.0732324123382568, -1.867221474647522, 0.15545760095119476, -0.8465116620063782, 0.04883948713541031, -0.761948823928833, 1.2130985260009766,...
def execute ( self, parameters, messages ) : # variables, paths, workspace # job folder jobid ='job _'+ str ( parameters [ 0 ]. value ) # tile number tileid = str ( parameters [ 1 ]. value ) # job folder location jobfdr = os. path. join ( jobloc, jobid ) # mxd path mxdpath = os. path. join ( jobfdr, tileid, tileid ) # ...
[ 0.34947946667671204, -0.9441462755203247, 0.9901463985443115, -0.0027221401687711477, 0.025247933343052864, 1.1556921005249023, 0.49868088960647583, 0.35033679008483887, -0.18513371050357819, 0.020404163748025894, 1.2834359407424927, 1.0965688228607178, -0.2580263614654541, 0.2052747607231...
def update _ active _ edge ( self ) : while self. active _ points [ self. active _ sequence ]. active _ length > = self. length ( edge = self. active _ points [ self. active _ sequence ]. active _ edge ) : # if the node at the end of active _ edge is a leaf ( end of a sequence ), change the sequence that edge is # refe...
[ -0.4291331470012665, -2.0788674354553223, 0.6999334692955017, -0.717734158039093, -0.0031773389782756567, -0.31230536103248596, 0.9062075018882751, 0.5192223191261292, -0.13538138568401337, 0.9082068204879761, -0.07907237857580185, 0.7238546013832092, 0.24758531153202057, -0.51230603456497...
def do _ update ( self, node _ id ) : _ error _ code, _ msg = ramstkdatamodel. do _ update ( self, node _ id ) if _ error _ code! = 0 : _ error _ code = 2006 _ msg ='ramstk error : attempted to save non - existent'\'reliability record id { 0 : d }. '. format ( node _ id ) return _ error _ code, _ msg
[ -0.2507893443107605, -0.2703779637813568, 0.6253601312637329, -0.5375033617019653, 0.8401053547859192, -0.37490424513816833, 0.2465749830007553, 0.278662770986557, -0.5272009968757629, 1.3828413486480713, -0.38069653511047363, 0.011452889069914818, -0.66964191198349, -0.12937882542610168, ...
def test _ passinexception ( self ) : failure = synchronousfailure ( runtimeerror ( " hello " ) ) self. asserttrue ( failure. check ( runtimeerror ) )
[ 0.6932674050331116, 0.6160606145858765, 0.2744220495223999, 0.603154182434082, 0.35735321044921875, 0.3048338294029236, -0.20035767555236816, 1.0850281715393066, -0.794791042804718, -0.9235122203826904, -0.5356255173683167, -0.19677786529064178, -1.100677490234375, -0.1090136393904686, 0...
def get _ environ ( self ) : req = self. req env _ 10 = super ( gateway _ u0, self ). get _ environ ( ) env = dict ( env _ 10. items ( ) ) # request - uri enc = env. setdefault ('wsgi. url _ encoding ','utf - 8') try : env ['path _ info'] = req. path. decode ( enc ) env ['query _ string'] = req. qs. decode ( enc ) exce...
[ -0.8064164519309998, -0.8181695938110352, 0.5152700543403625, -0.5563610792160034, 0.02852432057261467, 0.16121217608451843, 0.04389683157205582, 0.6397803425788879, -0.38351938128471375, -0.3458193242549896, -0.19840149581432343, 0.07856515794992447, 0.4336283206939697, 0.7442671060562134...
def test _ model _ deleting _ works _ properly ( self ) : tm = testmodel. create ( count = 8, text ='123456789') vid = tm. vid tm. delete ( ) with self. assertraises ( testmodel. doesnotexist ) : tm2 = testmodel. get ( vid )
[ -0.08924681693315506, -0.35312584042549133, 0.4149801731109619, 0.7390869855880737, 0.8962730169296265, 0.6906258463859558, 0.20206581056118011, 0.10111143440008163, 0.10970592498779297, 0.47777897119522095, -0.6541233658790588, -0.40054479241371155, -0.14649060368537903, 0.687317430973053...
def ldexp ( significand, exponent, queue = none ) : result = significand. _ new _ like _ me ( queue = queue ) _ ldexp ( result, significand, exponent ) return result
[ 0.5299642086029053, 0.3261372447013855, 0.49311530590057373, -0.7375556230545044, -1.6038724184036255, -0.0496055893599987, -1.4281420707702637, 0.44384562969207764, 0.7296817898750305, 0.0016291355714201927, -0.7505561113357544, 0.13242407143115997, -0.15808764100074768, -0.13290315866470...
def test ( self, data ) : x _ vecs = self. process _ x ( data ['x'] ) labels = self. process _ y ( data ['y'] ) with self. graph. as _ default ( ) : tot _ acc, loss = self. sess. run ( [ self. eval _ metric _ ops, self. loss ], feed _ dict = { self. features : x _ vecs, self. labels : labels } ) acc = float ( tot _ acc...
[ -0.14349423348903656, -0.41504600644111633, 0.5628884434700012, -0.8618208765983582, -0.02994358167052269, -0.40521419048309326, 0.8162338137626648, -0.23771724104881287, -0.4582442045211792, 0.37795448303222656, 0.34784621000289917, 0.5466207265853882, 0.7214832901954651, -0.3640061020851...
def connections ( self ) : return self. properties. get ('connections ', entitycollection ( self. context, externalconnection, resourcepath ( " connections ", self. resource _ path ) ) )
[ -0.5514003038406372, -0.3787122368812561, 0.5604346394538879, 0.15872377157211304, 0.40537211298942566, -0.24509389698505402, -0.15392962098121643, -0.12874847650527954, 0.3846311867237091, -0.4386007487773895, 0.6014837622642517, -0.4977221190929413, -0.6473639011383057, -0.22595737874507...