text
stringlengths
25
2.19k
embedding
listlengths
768
768
def remove _ model ( self, model _ uuid : str ) - > dict : model _ type = none for key, val in self. models. items ( ) : if model _ uuid in val : self. _ log. info ( " found % s among % s models ", model _ uuid, key ) model _ type = key break if model _ type is none : self. _ log. error ( " model not found, aborted " )...
[ -1.2300468683242798, 0.2230091691017151, 0.4536210000514984, -0.18959857523441315, 0.04614198952913284, -0.4251738488674164, 0.3505266606807709, 0.2314833700656891, -0.4374718964099884, 1.103126049041748, 0.012930594384670258, -0.11463862657546997, -0.4356412887573242, 0.1880960911512375, ...
def login _ form ( self, response ) : logger. info ( " in login form. last url : % s ", response. url ) if self. process _ errors ( response, [ teststrings. error ], html = false ) : url = self. url _ provider. get _ institute _ login _ url ( self. student. get ( formkeys. std ( ), " " ) ) yield scrapy. request ( url =...
[ -1.1580933332443237, -0.20884251594543457, 0.6919726729393005, -0.7397918701171875, 0.11186550557613373, -0.060591500252485275, -0.13298939168453217, -0.08509774506092072, 0.8544610142707825, -0.7739599347114563, -0.17971964180469513, -0.14528286457061768, 0.7560961246490479, -0.4631803929...
def to _ obj ( self, name = " mesh ", vertex _ offset = 0 ) - > str : lines = [ f " o { name } " ] for vertex in self. vertices : position = " ". join ( str ( x ) for x in vertex. position ) lines. append ( f " v { position } " ) for vertex in self. vertices : normal = " ". join ( str ( x ) for x in vertex. normal ) li...
[ -0.19275328516960144, -0.3187004625797272, 0.9277771711349487, -0.12779513001441956, -1.0220894813537598, 0.6981166005134583, -0.04106456786394119, -0.6618965268135071, -0.002916794503107667, -0.12761561572551727, -0.3362356722354889, 0.6169403195381165, 0.6062841415405273, -0.499394357204...
def get _ indexes ( self ) : return { group : " create index on % s ( % s ) ; " % ( self. get _ table _ name ( group ), groupby ) for group, groupby in self. groups. items ( ) }
[ -0.7011455297470093, -0.013411913998425007, 0.25275149941444397, -0.018238427117466927, -0.31154340505599976, -0.18241667747497559, 0.442935049533844, -0.30143246054649353, -1.140804409980774, 0.27808254957199097, -0.2729319632053375, -0.11346812546253204, -0.5230921506881714, 0.0243317503...
def is _ palindrome ( string ) : return string [ : : - 1 ]. casefold ( ) = = string. casefold ( )
[ -0.1265903115272522, -0.43437492847442627, 0.34145307540893555, 0.6531400680541992, -0.08671349287033081, 0.2796551585197449, -0.6301835775375366, -0.11718276143074036, 0.3268086910247803, 0.4666130244731903, 0.28229618072509766, 0.11246218532323837, -1.488487958908081, -0.9589943885803223...
def get _ friends _ ids ( screenname = none, idstr = none, maxfriends = 10000 ) : t = connect ( ) args = { " stringify _ ids " : true } if screenname is not none : args ['screen _ name'] = screenname elif idstr is not none : args ['user _ id'] = idstr else : # todo throw exception pass cursor = - 1 ids = [ ] waitperiod...
[ -0.5571505427360535, -0.010873360559344292, 0.6397700905799866, 0.35682791471481323, 0.11392514407634735, -0.4120505154132843, -0.6420584917068481, -0.675875186920166, -0.5073311924934387, 0.6556369066238403, 0.15564857423305511, 0.9215514063835144, -1.281333327293396, -0.0782284289598465,...
def subactivity _ sampler ( self ) : logger. debug ( '.') self. _ count _ subact ( ) for idx, video in enumerate ( self. _ videos ) : if idx % 20 = = 0 : logger. debug ('% d / % d'% ( idx, len ( self. _ videos ) ) ) logger. debug ( str ( self. _ subact _ counter ) ) temp _ sub _ counter = self. _ subact _ counter - vid...
[ 0.07048434764146805, -1.1500189304351807, 0.5867542624473572, -0.3530656099319458, -0.4146316349506378, -0.16790680587291718, 1.7366228103637695, -0.04178968444466591, 0.7192005515098572, 0.008794202469289303, -0.4416622817516327, 0.6144059300422668, -0.04564245417714119, 0.664146184921264...
def first ( self, * * kwargs ) : self. _ first = dict ( kwargs )
[ -0.0032371655106544495, 0.6687077879905701, 0.28084900975227356, -0.4583958685398102, 0.48479604721069336, -0.2703711986541748, -0.5405643582344055, -0.17097626626491547, -0.8017318844795227, -0.31268778443336487, -1.3911727666854858, 0.17188791930675507, -0.2191595435142517, 0.96693187952...
def standardize ( self ) : self. scale = standardscaler ( ). fit ( self. mega _ histogram ) self. mega _ histogram = self. scale. transform ( self. mega _ histogram ) print ( " vocabulario normalizado " ) # print ( str ( self. mega _ histogram ) ) plt. hist ( self. mega _ histogram ) plt. title ( " histograma de palabr...
[ 1.075886845588684, 0.14783062040805817, 0.44499051570892334, 0.14369186758995056, -0.17904703319072723, 0.21387386322021484, -0.01606675423681736, 1.245069146156311, 0.46320924162864685, -0.08261602371931076, 0.16337144374847412, 1.240244746208191, -0.07579261809587479, 0.9525149464607239,...
def computenumevents ( self ) : self. numevents = int ( self. duration / self. interval ) return
[ 0.624722421169281, 0.4860226809978485, 0.3944654166698456, 0.33243468403816223, 0.7535446882247925, 0.2021811157464981, 1.17319917678833, 1.0426164865493774, 0.1403530091047287, -0.2339092642068863, -0.5424948930740356, -0.019167421385645866, 0.02996286377310753, -0.33526453375816345, 1....
def noise _ for _ galaxy ( gal, nano2e, nims ) : # noise model + no negative image vals when compute noise one _ std _ per _ pix = gal. array. copy ( ) # nanomaggies one _ std _ per _ pix [ one _ std _ per _ pix < 0 ] = 0 # rescale one _ std _ per _ pix * = nano2e * nims. array. copy ( ) # e - one _ std _ per _ pix = n...
[ -0.9130066633224487, -0.26732394099235535, 0.5558870434761047, -0.010050701908767223, 0.26660996675491333, 0.20344258844852448, -0.07016133517026901, -0.012996647506952286, 0.14308671653270721, 0.5746828317642212, 0.5336793661117554, 0.013263310305774212, 0.39426228404045105, 0.86453181505...
def twitter _ login ( _ user ) : print _ user. session _ token auth = tw. oauthhandler ( apicred ['twitter _ consumer _ key'], apicred ['twitter _ consumer _ secret'],'http : / / localhost : 8080 / api / user / twitter _ oauth _ callback') url = auth. get _ authorization _ url ( ) memcache. set ( key ='oauth -'+ _ user...
[ -0.7268542051315308, -0.03421645984053612, 0.549959123134613, -0.1897229254245758, -0.39918091893196106, -0.46891114115715027, 0.048191845417022705, 0.0987224280834198, 0.3713019788265228, 0.1800694316625595, -1.4523252248764038, 0.5251972675323486, 0.810807466506958, 0.06475451588630676, ...
def _ handle _ read ( self, cmd = none ) : # handle update the recv buffers try : # acknowledged data is immediately made avalible to client # ( and buffered if no read is currently running ) if isinstance ( cmd, recvacknowledgeddata ) : self. _ recv _ buffer [ cmd. channel _ number ]. append ( cmd ) # burst data doubl...
[ 0.41540172696113586, -0.624064564704895, 0.9579253792762756, -0.4630826413631439, -0.39306095242500305, 0.045062106102705, 0.6358660459518433, -0.9200931191444397, 0.3516450524330139, -0.7450879812240601, -0.15579238533973694, 0.4544517993927002, 0.04567442461848259, 0.2931461036205292, ...
def strategy _ expensive ( cookies, cps, history, time _ left, build _ info ) : inventory = { } item = none for item in build _ info. build _ items ( ) : inventory [ item ] = build _ info. get _ cost ( item ) highest _ cost = max ( inventory. values ( ) ) if cookies + cps * time _ left > = highest _ cost : for item, co...
[ 0.027593089267611504, -0.45612290501594543, 0.4721298813819885, 0.8503729104995728, 0.32537350058555603, -0.19497081637382507, -0.9174890518188477, 0.07119189947843552, -0.36396047472953796, 0.4776764512062073, 0.42762091755867004, -0.26529520750045776, 0.5892609357833862, -0.1943410784006...
def config ( self, command, rpc = u'2. 0 ', method = u'cli') : commands = [ command ] list _ result = self. config _ list ( commands, rpc, method ) return list _ result [ 0 ]
[ -1.3485891819000244, 0.5334497094154358, 0.35187825560569763, 1.0969254970550537, 0.4659533202648163, -0.738258957862854, -0.6493508815765381, -0.1922740340232849, -0.03130011260509491, 0.35406479239463806, -0.2016298770904541, 0.2481233775615692, -0.6988131403923035, 1.1137664318084717, ...
def to _ int32 ( x, name = " toint32 " ) : return cast ( x, dtypes. int32, name = name )
[ 0.0787656158208847, 0.47907644510269165, 0.2766760289669037, 0.12608465552330017, -0.4537261426448822, 0.14969854056835175, -0.6951930522918701, -1.5277111530303955, 0.2536856234073639, 0.7002838850021362, -0.9599829316139221, 0.8249178528785706, 0.47535544633865356, -1.0934765338897705, ...
def test _ atomic _ language _ min _ length _ 3 _ nistxml _ sv _ iv _ atomic _ language _ min _ length _ 4 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / language / schema + instance / nistschema - sv - iv - atomic - language - minlength - 4. xsd ", instance = " nistda...
[ 0.597235918045044, -0.3698481619358063, 0.32726484537124634, 0.1582941859960556, -0.7500403523445129, 0.21703878045082092, -0.029100973159074783, -0.31830546259880066, 0.018931394442915916, 0.35829958319664, -0.822039008140564, -0.30242109298706055, -0.6382354497909546, -0.4140307307243347...
def create _ boto3 _ client ( account _ id, client _ type, source _ role _ credentials = none, region _ name = none ) : # assume organizationaccountaccessrole through master account if source _ role _ credentials is none : logging. debug ( f " creating client { client _ type }. " ) access _ key _ id, secret _ access _ ...
[ 0.590366005897522, -0.2681497037410736, 0.49601903557777405, -0.445474773645401, -0.17638839781284332, 0.7230437397956848, 0.6663525700569153, -0.396185040473938, 0.6279881596565247, 0.37027281522750854, 0.34235554933547974, 1.2736406326293945, 0.6074332594871521, -0.81377112865448, 1.11...
def extract _ optimized _ dimensions ( self, values : arraytype ) - > arraytype : return values [ self. optimized _ joint _ indexes, : ]
[ -0.342670738697052, 0.09801356494426727, 0.36007925868034363, 1.1765834093093872, 0.46515345573425293, 0.14049452543258667, 0.7334187626838684, -1.2722007036209106, -0.3957853615283966, 0.15269769728183746, -0.02638280764222145, 0.7702646851539612, -0.5980738997459412, -0.27997252345085144...
def archive _ science _ metadata ( self, current _ version _ pid ) : try : self. client. archive ( current _ version _ pid ) except exception, e : logging. error ('failed to archive object pid :'+ current _ version _ pid ) logging. error ( e ) return false else : return true
[ -0.2684783935546875, -0.8938332796096802, 0.6011922955513, 0.15766260027885437, 0.4271826148033142, 1.352725625038147, -0.6374019980430603, -0.20127849280834198, -0.5263760685920715, 0.8780320286750793, 0.10681752115488052, 0.8406890630722046, -0.8210773468017578, -0.45241186022758484, -...
def bylength ( word1, word2 ) : return len ( word1 ) - len ( word2 )
[ 1.3498073816299438, -0.13857629895210266, 0.8673738241195679, -0.6922184228897095, -0.6705339550971985, 0.3777083158493042, -0.382114440202713, 0.1605672389268875, -0.8424736261367798, 0.881121814250946, -0.5534495711326599, 1.0898494720458984, -0.7244684100151062, 0.08145447075366974, -...
def solve ( user, team, challenge, request ) : pass
[ -0.9278027415275574, 0.47976166009902954, 0.0456697903573513, 1.8122071027755737, 0.19676518440246582, -0.32186493277549744, 0.2905949056148529, -0.5071489810943604, -0.5364022850990295, -0.41129419207572937, -0.5622366666793823, -0.6782437562942505, -0.26537930965423584, -0.98279356956481...
def calculate _ ptdf _ ldf ( branches, buses, index _ set _ branch, index _ set _ bus, reference _ bus, base _ point = basepointtype. solution ) : _ len _ bus = len ( index _ set _ bus ) _ mapping _ bus = { i : index _ set _ bus [ i ] for i in list ( range ( 0, _ len _ bus ) ) } _ len _ branch = len ( index _ set _ bra...
[ -0.22028963267803192, 0.039737965911626816, 0.7278381586074829, -0.164139986038208, -0.5004758834838867, -0.5677480697631836, 0.35897788405418396, 0.03225848451256752, -0.4756527543067932, 0.36535459756851196, 0.02523908019065857, 0.11878563463687897, -0.6710227727890015, -0.11280804872512...
def set _ timeout ( self, timeout ) : self. timeout = timeout
[ 0.6875559687614441, 0.43735143542289734, 0.02992951311171055, -0.24506209790706635, 0.5341420769691467, 0.6066282391548157, 0.03378869965672493, 1.3334016799926758, -0.15866100788116455, 0.58930504322052, -0.5339095592498779, 0.27019965648651123, 0.1663169115781784, 0.013798383995890617, ...
def click ( self ) : self. clicked = true self. setborder ( yellow, 3 ) self. board. possiblemoves ( self. number )
[ 0.31026068329811096, 1.0215495824813843, 0.368592232465744, 0.276604562997818, 0.09543614834547043, -0.4276902973651886, 0.48672792315483093, 1.3552072048187256, 0.8056306838989258, 0.021582651883363724, -0.8530614972114563, 0.5643548965454102, 0.42562854290008545, 0.015381045639514923, ...
def test _ stripoperand ( self ) : sclanguage = smartcontractlanguage ( ) operand ='< 1 >'assert sclanguage. stripoperand ( operand ) = ='1'operand2 ='< someotheroperand >'assert sclanguage. stripoperand ( operand2 ) = ='someotheroperand '
[ -0.5996024012565613, -0.5608694553375244, 0.4980534315109253, -0.35492461919784546, -1.3660467863082886, 0.6615870594978333, 0.056917257606983185, 0.7549489140510559, 1.1834402084350586, -0.6392320990562439, -0.6348246932029724, 0.04931734874844551, -0.3641544282436371, 0.00572126405313611...
def ignoredfile ( file ) : for suffix in [ '. pyc ', '. pyo ', '. egg - info'] : if file. endswith ( suffix ) : return true return false
[ 0.4013057351112366, 0.30153074860572815, 0.6822718977928162, 0.290983110666275, 0.1704566329717636, 0.7541959285736084, 0.169513538479805, -0.04621284827589989, -0.6165977716445923, -0.10436100512742996, -1.0017813444137573, -0.5846899151802063, -0.2689173221588135, 1.3762037754058838, -...
def test _ example _ input _ one _ fields _ placeholder _ value ( self, ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) : input _ page = inputpage ( ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) input _ page. create _ new _ input. select ( " example input one " ) self. assert _ util ...
[ -0.006329074036329985, 0.7030285596847534, 0.2679145336151123, 0.14773418009281158, 0.21516835689544678, 1.3668562173843384, 0.14445848762989044, 0.1884460747241974, 0.3299280107021332, 0.2664922773838043, -0.14147570729255676, -0.7111281156539917, -0.03705555200576782, -0.0328570418059825...
def test _ required _ creds ( self ) : bad _ creds = [ { }, # missing everything {'username':'user1 ','strategy':'keystone ','password':'pass'}, # missing auth _ url {'password':'pass ','strategy':'keystone ','auth _ url':'http : / / localhost / v1'}, # missing username {'username':'user1 ','strategy':'keystone ','auth...
[ 0.18006643652915955, 0.007242907304316759, 0.6274628639221191, -0.04496528208255768, 0.14983810484409332, -0.02605055645108223, -0.9223834872245789, -0.5452349781990051, -0.24209418892860413, 0.3795660734176636, -0.07747409492731094, -0.1007676050066948, 0.06038397550582886, 0.218545287847...
def distance _ com1 _ com2 ( graph, c1, c2, p _ t, nodes2id ) : summing = 0 for i, k in enumerate ( graph. nodes ( ) ) : square = ( p _ t _ c _ func ( graph, c1, p _ t, nodes2id ) [ i ] - p _ t _ c _ func ( graph, c2, p _ t, nodes2id ) [ i ] ) * * 2 degree _ k = graph. degree ( k ) summing + = square / degree _ k retur...
[ 0.1381211131811142, -0.07774227112531662, 0.6523148417472839, -0.2418638914823532, 0.28724223375320435, 0.8409770131111145, 0.24111929535865784, 0.28027698397636414, -0.6345685720443726, 1.0710198879241943, -0.4695430397987366, 0.11909853667020798, -0.19781966507434845, -0.5761262774467468...
def handle ( self, * * options ) : # delete extra posts for feed in feed. objects. values ('id') : excluded _ entries = entry. objects. filter ( feed = feed ['id'] ). order _ by ('- created ','- id') [ : niftyurls _ limit _ posts ] entry. objects. filter ( feed = feed ['id'] ). exclude ( pk _ _ in = excluded _ entries ...
[ 0.2863326668739319, -0.17532211542129517, 0.795262336730957, 0.4910450875759125, 0.5939353108406067, -0.6454572081565857, 0.013483262620866299, -0.15524356067180634, -0.3486209511756897, -0.36335960030555725, 0.06886861473321915, -0.5224136710166931, -0.037295203655958176, 0.82825905084609...
def check _ password ( form, field ) : ok = true result = flicketuser. query. filter _ by ( username = g. user. username ). first ( ) if bcrypt. hashpw ( form. password. data. encode ('utf - 8'), result. password )! = result. password : field. errors. append ('entered password is incorrect.') return false return ok
[ -0.07180685549974442, 0.3445519506931305, 0.4347347021102905, 0.5193581581115723, 0.5427551865577698, 0.4341166615486145, 0.07416441291570663, 0.30210569500923157, -0.7265654802322388, 0.09355095773935318, -0.3952175974845886, -0.3933599591255188, -0.443438857793808, 0.5137166380882263, ...
def test _ list _ integer _ length _ 4 _ nistxml _ sv _ iv _ list _ integer _ length _ 5 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / integer / schema + instance / nistschema - sv - iv - list - integer - length - 5. xsd ", instance = " nistdata / list / integer / schem...
[ -0.46887722611427307, -0.3892645537853241, 0.2941036820411682, 0.18755806982517242, -0.6491507291793823, -0.44205549359321594, -0.006761827040463686, -0.15415069460868835, 0.32335612177848816, 0.9003379344940186, -1.410733938217163, -0.3198406398296356, -0.5227805376052856, 1.0146813392639...
def fwversion ( self ) : return self. fwversion & 255
[ 0.053328778594732285, -0.368814080953598, 0.4086969196796417, 0.8177398443222046, -0.3422267735004425, 0.24236947298049927, 0.2834205627441406, -1.2542363405227661, 0.08211296796798706, -0.8634458780288696, -0.6580141186714172, -0.12425343692302704, -0.0980117917060852, 0.8219201564788818,...
def get _ data _ abspath ( data _ path : object ) - > object : return os. path. join ( data _ path, data _ path )
[ 0.24054767191410065, -0.9832576513290405, 0.455060750246048, -0.46593332290649414, 0.08648794144392014, 0.9769779443740845, 0.0306551456451416, -0.5374013781547546, -0.6000155210494995, -0.2967233955860138, 0.26108527183532715, 1.0179439783096313, 0.5393146872520447, -0.21945253014564514, ...
def test _ uc _ to _ assignments ( self ) : expected = {'q1': [ ['a ','b ','c ','d'], ['a ','b ','c ','e'] ],'q2': [ ['a ','h ','i ','j'], ['a ','h ','k ','l ','m'], ['a ','h ','i ','j'] ],'q3': [ [ ] ],'q4': [ [ ] ],'q5': [ [ ] ] } params = {'id _ to _ taxonomy _ fp': self. id _ to _ tax1 _ fp,'reference _ sequences _...
[ -0.2871858477592468, -0.8245663046836853, 0.6539392471313477, -0.4229345917701721, 0.07258717715740204, 0.48020634055137634, 1.149047613143921, 0.2859988212585449, -0.8369160294532776, -0.07572248578071594, 0.1970842331647873, -0.25943633913993835, 0.21842409670352936, -0.4886610507965088,...
def voice ( self, f ) : self. add _ handler ( f, type ='voice')
[ -0.0987493097782135, 0.06565418094396591, 0.39257800579071045, 0.8349869251251221, 0.5698261260986328, 0.8125126361846924, -0.14275719225406647, -0.026294685900211334, -0.7323585748672485, -0.6434417963027954, -0.3994366526603699, 0.29490014910697937, 0.5802931189537048, 0.6594021320343018...
def export _ thumb _ mask ( self, cls, save _ to = ". ", size = 512 ) : mask = self. masks [ cls ] height, width = mask. shape scale = self. get _ scale ( size, height, width ) mask _ resized = cv2. resize ( mask, dsize = none, fx = scale, fy = scale ) mask _ scaled = mask _ resized * 255 cv2. imwrite ( str ( path ( sa...
[ -1.539908528327942, -0.14493626356124878, 0.7263230681419373, 0.5590827465057373, 0.5715928077697754, -0.1195395365357399, 0.8295384049415588, -0.7275766730308533, 0.7599165439605713, 0.3159213662147522, -1.2135860919952393, 0.09527286142110825, 1.038083791732788, 0.4856780171394348, 0.4...
def _ putindir ( dirname ) : def wrap ( fxn ) : def mod _ f ( self, * args ) : if not os. path. exists ( dirname ) : os. mkdir ( dirname ) # bring files for f in self. itp _ files + self. plumed _ files + [ self. current _ structure, self. current _ top ] : if ( f is not none and os. path. exists ( f ) ) : shutil. copy...
[ -1.2140194177627563, 0.0900937095284462, 0.7672816514968872, -0.39656299352645874, 0.08917772769927979, -0.3322596848011017, 0.814759373664856, -0.10546603798866272, 0.052645836025476456, -0.0898158997297287, 0.2745946943759918, -0.16486473381519318, -0.11580061167478561, -0.55588775873184...
def new _ variable ( self, value, variable _ id = none ) : method ='put'if variable _ id else'post'endpoint ='/ variables / { } '. format ( variable _ id ) if variable _ id else'/ variables'return self. _ request ( method, endpoint, body = {'value': value } )
[ -0.7291658520698547, 0.09527728706598282, 0.35268065333366394, -0.19213829934597015, 0.2687460780143738, -0.48155272006988525, -0.9019948244094849, -0.7320857048034668, 0.35092729330062866, 0.22651717066764832, -0.5975145101547241, 1.0107101202011108, -1.136382818222046, 0.2665427625179291...
def classify _ document ( self, response ) : if ( not isinstance ( response, scrapy. http. htmlresponse ) and check _ pdf ( response. body ) ) : return'pdf ', { } if not isinstance ( response, scrapy. http. htmlresponse ) : return'noabs ', { } fields = {'splash _ url': response. url } found = false for key, ( is _ list...
[ -1.0162907838821411, -0.4559517502784729, 0.8482816219329834, -0.4921780824661255, -0.24865975975990295, -0.15971912443637848, 0.2329394668340683, 0.3533989191055298, 0.36300867795944214, -0.17660722136497498, -0.30473968386650085, -0.49266135692596436, 1.0323153734207153, 0.62214279174804...
def isvisible ( node ) : if cmds. attributequery ('visibility ', node = node, exists = true ) : visible = cmds. getattr ( node + '. visibility') else : return false # the node is not a dag node, thus not " visible " if cmds. attributequery ('intermediateobject ', node = node, exists = true ) : visible = visible and not...
[ -0.46253612637519836, 0.33447012305259705, 0.8620387315750122, -0.3733387887477875, -0.684653639793396, -0.3918510973453522, 0.47808539867401123, 0.027464987710118294, 0.4542352259159088, 0.1650840938091278, 0.22629578411579132, -0.14876788854599, 0.5867568850517273, 0.7389325499534607, ...
def write _ corpus ( ) : global corpus, base _ path assert corpus is not none t = datetime. datetime. now ( ). strftime ( " % y - % m - % d % h : % m : % s " ) l = len ( list ( corpus. iter _ utterances ( ) ) ) print ( f'dumping { sys. argv [ 1 ] } corpus at time { t } ; contains { l } utterances.') corpus. dump ( name...
[ -0.8666192293167114, -0.33584967255592346, 0.8164259791374207, -0.4648056924343109, 1.1259697675704956, 0.7737752795219421, 0.6945594549179077, 0.6597135066986084, -1.0185468196868896, 0.11941781640052795, -0.3753858208656311, -0.0640980452299118, -0.2128138542175293, 0.6119813323020935, ...
def transform ( self, sent _ pairs ) : x = none return x
[ -1.2507208585739136, -0.11298145353794098, 0.2206527590751648, -0.6572998762130737, -0.47369539737701416, -0.4096320569515228, 0.13191579282283783, -0.11260547488927841, 0.6875945329666138, -0.39750561118125916, -0.7875986099243164, -0.13331396877765656, -0.9928624629974365, -0.80263626575...
def window _ rp ( self ) - > int : return self. _ vehicle _ data. get ( " vehicle _ state ", { } ). get ( " rp _ window " )
[ -0.1546606719493866, -0.08420577645301819, 0.3977779150009155, 0.10004685819149017, 0.07136131078004837, 0.20666778087615967, 0.2177424132823944, 0.23503847420215607, 0.2861188054084778, 0.49835148453712463, 0.5011587142944336, 0.6955463886260986, -0.990467369556427, -0.051590580493211746,...
def _ get _ guid _ url _ for ( url ) : guid _ url = guid _ url _ node _ pattern. sub ('', url, count = 1 ) guid _ url = guid _ url _ project _ pattern. sub ('', guid _ url, count = 1 ) guid _ url = guid _ url _ profile _ pattern. sub ('', guid _ url, count = 1 ) return guid _ url
[ -0.12807153165340424, 0.3311555087566376, 0.43179628252983093, -0.57469642162323, 0.3161100447177887, 0.8682409524917603, 0.20002219080924988, 1.2765142917633057, 0.002726759295910597, -0.35882553458213806, 0.07633385807275772, 0.32111167907714844, -0.17614738643169403, 0.26403769850730896...
def _ get _ headers ( self, xrf _ key : str ) - > dict : headers = super ( ). _ get _ headers ( xrf _ key = xrf _ key ) headers. update ( {'user - agent':'windows'} ) return headers
[ -0.3194344937801361, 0.509297788143158, 0.5100858211517334, 0.5064939260482788, 0.25195029377937317, -1.139907717704773, -0.9385501742362976, -0.028230447322130203, -0.0044372063130140305, 0.8448231220245361, -0.5742852091789246, -0.5463868379592896, -0.631152331829071, -0.0175158716738224...
def as _ sql _ filter ( self, db : " prefectdbinterface " ) - > " booleanclauselist " : filters = self. _ get _ filter _ list ( db ) if not filters : return true return sa. and _ ( * filters )
[ -0.8994731903076172, 0.11148926615715027, 0.5597459077835083, 0.35921597480773926, -0.47998303174972534, 0.004199958872050047, -0.9240836501121521, 0.7067248821258545, 0.51258784532547, 0.539548933506012, 0.20520982146263123, -0.15167935192584991, -0.26573827862739563, 1.1320277452468872, ...
def checkaverage ( self, nums, k, target ) : s = 0 prev = 0 min _ sum = 0 for i in range ( k ) : s + = nums [ i ] - target if s > 0 : return true for i in range ( k, len ( nums ) ) : s + = nums [ i ] - target prev + = nums [ i - k ] - target min _ sum = min ( min _ sum, prev ) if s - min _ sum > 0 : return true return ...
[ 0.10539694130420685, -0.0328998900949955, 0.847235918045044, 0.6119473576545715, -0.19678282737731934, 0.3665086627006531, 0.22624777257442474, 0.2244309037923813, 0.02847139909863472, 1.2401494979858398, 0.3176780641078949, 0.5746219754219055, -0.21705317497253418, 0.0421125665307045, -...
def get _ contents ( self, url, driver = none, crawl _ type = none, * * gatewaykwargs ) : self. _ store _ crawling _ logs ( url = url, start _ time = now _ str ( ) ) crawl _ type = crawl _ type or self. crawl _ type handlekeyerror ( lst = supported _ crawl _ types, crawl _ type = crawl _ type ) if self. verbose : print...
[ -0.8885583877563477, -0.3137182891368866, 0.5778091549873352, 0.43495744466781616, -0.4055945873260498, -0.9841905832290649, 0.13281886279582977, -0.1381015181541443, -0.17286249995231628, -0.09721506386995316, 0.3219088315963745, -0.0007253036019392312, -0.1796966791152954, 0.543607532978...
def normalize _ file _ page _ num ( page _ num ) : if page _ num. isdigit ( ) : # not roman numerals, so in main section return'{ : 0 > 3 } '. format ( page _ num ) # we want 3 digits with leading 0s elif " gs " in page _ num : # dealing with getting started return int ( page _ num. replace ( " gs ", " " ) ) elif " ap ...
[ 0.2870428264141083, -1.1009970903396606, 0.7300019264221191, -0.9343693256378174, -0.43703243136405945, 0.22801508009433746, -0.20440120995044708, 0.6779099106788635, 0.382332444190979, 0.2544254958629608, 1.282877802848816, -0.2009068727493286, 0.07616399973630905, 0.26975688338279724, ...
def test _ target _ wrong _ type ( self, graph ) : with pytest. raises ( typeerror, match = " target must be an integer " ) : strawberryfields. gbs. dense. resize ( subgraphs = [ [ 0, 1 ] ], graph = graph, target = [ ] )
[ -0.4250010848045349, 1.353636384010315, 0.31084951758384705, 0.7148579955101013, 1.2403160333633423, 0.2384684532880783, 0.1364850550889969, -0.07399066537618637, 0.3401169180870056, 0.19625137746334076, 0.13844887912273407, 0.5106471180915833, -0.5526968240737915, -0.1624966263771057, 0...
def connect ( self ) : try : if self. aws _ access _ key is none : self. sdbconn = boto. connect _ sdb ( ) else : self. sdbconn = boto. connect _ sdb ( self. aws _ access _ key, self. aws _ secret _ key ) except : try : self. sdbconn = boto. connect _ sdb ( ) except : raise sdb _ connect ( )
[ -0.5692229866981506, 0.13085658848285675, 0.7846993803977966, 1.6082749366760254, 0.4273732900619507, 0.011920553632080555, -0.6506851315498352, -0.059768196195364, -0.12008647620677948, -0.41258323192596436, 0.24306152760982513, 0.13140226900577545, 0.4017452299594879, 0.3587094843387604,...
def test _ example _ input _ two _ clone _ cancel _ entity ( self, ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper, add _ input _ two ) : input _ page = inputpage ( ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) input _ page. table. clone _ row ( " dummy _ input _ two " ) self. assert _...
[ 0.6903568506240845, 0.19275140762329102, 0.6536959409713745, 1.288502812385559, -0.2868412137031555, 1.0319771766662598, -0.4580317735671997, -0.009534414857625961, 0.3670499920845032, 0.7293022274971008, 0.18311931192874908, 0.02198268286883831, 0.687671959400177, -0.3185800611972809, 0...
def syn _ cnn _ 2 ( x ) : return syn _ cnn _ 2 _ z _ x ( [ 1. 0, 1. 0 ], x )
[ 0.349656879901886, -0.788325309753418, 0.201778382062912, 1.4744237661361694, -1.4316920042037964, -0.8422504663467407, 0.20100612938404083, -0.7157396078109741, -0.16454647481441498, 0.08164624869823456, -0.8382555842399597, 0.8324788808822632, 1.14167320728302, -0.16263119876384735, 0....
async def create _ product _ with _ options _ async ( self, tmp _ req : servicecatalog _ 20210901 _ models. createproductrequest, runtime : util _ models. runtimeoptions, ) - > servicecatalog _ 20210901 _ models. createproductresponse : utilclient. validate _ model ( tmp _ req ) request = servicecatalog _ 20210901 _ mo...
[ -0.9861018657684326, 0.27667391300201416, 0.8318487405776978, 0.20387312769889832, 0.26527565717697144, 0.8896936178207397, -0.023201463744044304, -1.5044742822647095, 0.3268393874168396, 0.7649722099304199, -0.1486523151397705, 0.8451247215270996, -0.3430321514606476, 0.25727447867393494,...
def one _ hot ( indices, depth ) : encoded _ indicies = torch. zeros ( indices. size ( ) + torch. size ( [ depth ] ) ). cuda ( ) index = indices. view ( indices. size ( ) + torch. size ( [ 1 ] ) ) encoded _ indicies = encoded _ indicies. scatter _ ( 1, index, 1 ) return encoded _ indicies
[ -1.1761382818222046, 0.6026215553283691, 0.36121466755867004, -0.08723025023937225, -0.33392980694770813, -0.33501294255256653, 0.5824660658836365, 0.6091089844703674, 1.2368687391281128, 0.38167598843574524, 0.2188224196434021, 1.1435871124267578, -0.19299642741680145, -0.8419888615608215...
def l _ uu ( self, x, u, i, terminal = false ) : if terminal : return 0 self. quus [ i ] = self. lagrange * self. u _ diffs [ i ]. dot ( self. u _ diffs [ i ]. t ) * self. b0 / 4. 0 return self. quus [ i ] * 2. 0
[ 0.1770293265581131, -0.3768686056137085, 0.4500736892223358, -0.8108096718788147, -0.2103148251771927, 0.6469443440437317, -0.1692548543214798, 0.6862474679946899, 0.21669751405715942, -0.5110031962394714, -0.5028185248374939, 0.6495671272277832, -0.43735581636428833, -0.5804781913757324, ...
def transfercookiestosafari ( ) : import platform if " darwin " in platform. system ( ). lower ( ) : cookiestring = http. getcookiesforurl ( base _ url ) if not cookiestring : return true try : thecookies = basecookie ( cookiestring ) appendthis = [ ] tomorrow = datetime. now ( ) + timedelta ( ( 1 ) ) for k, v in theco...
[ -0.911670982837677, 0.5960059762001038, 0.8768371343612671, 0.7011237740516663, -0.3639760911464691, -0.2147214561700821, 0.06009308993816376, -0.04972396418452263, -0.0827263817191124, 0.4357639253139496, -1.1176713705062866, -0.1749011129140854, -0.7790839076042175, 0.4033016562461853, ...
def estimate _ a _ third _ contour _ centroid ( centroid1, centroid2 ) : centroid _ distance = utility _ get _ norm _ dist ( centroid1, centroid2 ) centroid1 _ homo = np. append ( centroid1. astype ( np. float32 ), np. array ( [ 0 ], np. float32 ) ) centroid2 _ homo = np. append ( centroid2. astype ( np. float32 ), np....
[ 1.3768285512924194, -1.186821460723877, 0.9599918723106384, 0.6407317519187927, -0.19997498393058777, -0.08290422707796097, 0.0023604906164109707, 0.20129284262657166, 0.0035313493572175503, 0.7671360373497009, -0.6622796058654785, 0.3317267894744873, -0.0007584478589706123, 0.513818085193...
def get _ values ( line ) : return line. partition ('` values') [ 2 ]
[ 0.45122501254081726, 0.599459707736969, 0.4407193660736084, 0.7047600746154785, 0.9867984056472778, -0.7964848279953003, -0.9315305352210999, 0.09693671762943268, -1.1816422939300537, -0.5196117758750916, -0.334876149892807, -0.06726032495498657, 0.003235947573557496, -0.687741756439209, ...
def lincor _ data ( lincormod, gdata, avedn, diffdn ) : ycor = lincormod ( avedn ) / lincormod. c0. value diffdn _ cor = diffdn / ycor gdata _ cor = np. concatenate ( ( [ gdata [ 0 ] ], gdata [ 0 ] + np. cumsum ( diffdn _ cor ) ) ) return gdata _ cor
[ 0.5390908718109131, -0.09716790914535522, 0.583430826663971, -1.421933650970459, 0.20733121037483215, 0.5755114555358887, 0.004888944327831268, -0.25958165526390076, -0.23122994601726532, -0.15268109738826752, -0.1314324140548706, 0.9648555517196655, 0.09103020280599594, 0.2898535132408142...
def instance _ groups ( self, instance _ groups ) : if instance _ groups is none : raise valueerror ( " invalid value for ` instance _ groups `, must not be ` none ` " ) self. _ instance _ groups = instance _ groups
[ -0.29642751812934875, 0.890265703201294, -0.15461990237236023, 0.04640376195311546, 0.023635290563106537, 0.8615977764129639, -0.07173644751310349, 0.39442893862724304, -1.041406273841858, 0.2701190412044525, -0.46101701259613037, 0.24884264171123505, -1.5084121227264404, 0.201944351196289...
def copy _ to _ shadow ( self, request, queryset ) : for review in queryset : review. save ( using = " reviews - s " )
[ -0.5890756249427795, -0.3459571301937103, 0.37886232137680054, -0.040961187332868576, 0.5467645525932312, 1.1760679483413696, -0.3391675651073456, 0.4799327552318573, 0.17765897512435913, 1.0211704969406128, -0.09793602675199509, 0.7970305681228638, 0.08525420725345612, -0.3146199584007263...
def forward ( self, latent _ i : tensor, latent _ o : tensor, images : tensor, fake : tensor, pred _ real : tensor, pred _ fake : tensor ) - > tensor : error _ enc = self. loss _ enc ( latent _ i, latent _ o ) error _ con = self. loss _ con ( images, fake ) error _ adv = self. loss _ adv ( pred _ real, pred _ fake ) lo...
[ -0.148830384016037, -0.1258244663476944, 0.42828768491744995, -0.49856191873550415, -0.2890280783176422, 0.17522035539150238, 0.4820609986782074, 0.02088293433189392, -0.7467008233070374, 0.062403589487075806, -0.40456870198249817, 0.4784374237060547, 0.9324586987495422, -0.719642996788024...
def deletemappingsfromthingtype ( self, thingtypeid, logicalinterfaceid ) : req = apiclient. onethingtypemappingurl % ( self. host, " / draft ", thingtypeid, logicalinterfaceid ) resp = requests. delete ( req, auth = self. credentials, verify = self. verify ) if resp. status _ code = = 204 : self. logger. debug ( " map...
[ -1.4515471458435059, -0.28695058822631836, 0.5387290716171265, -0.7270664572715759, -0.4494398534297943, -0.029452988877892494, -0.4900059401988983, -0.9668567180633545, 0.6042000651359558, 0.17541369795799255, 0.35981467366218567, 0.3185143768787384, -1.3436856269836426, 0.507372796535491...
def display _ board ( game _ board ) : for row in range ( 3 ) : for col in range ( 3 ) : if game _ board [ row ] [ col ] = = ('' ) : # checks to see if the iteration is at the end of a row to remove the'|'symbol if col = = 2 : print ('_ _ ', end ='' ) else : print ('_ _ | ', end ='' ) else : # checks to see if the iter...
[ 0.40406113862991333, 0.39551234245300293, 1.1346157789230347, -0.21595799922943115, -0.7805553078651428, 0.6060139536857605, 0.23960642516613007, 0.1174970343708992, -0.6162065267562866, 0.6218252182006836, 1.0208055973052979, 0.2574581503868103, 0.07204556465148926, 0.6668069958686829, ...
def test _ record _ submission _ too _ large ( ) : with open ( '. / src / test / cve _ tests / cve _ record _ fixtures / cve - 2021 - 0004 _ largeinput. json') as json _ file : data = json. load ( json _ file ) res = requests. post ( f'{ env. awg _ base _ url } { cve _ url } / cve - 2021 - 0004 ', headers = utils. base...
[ 0.4356130063533783, 0.7435026168823242, 0.6053957939147949, -0.7046337723731995, 0.2870866358280182, 0.6524332165718079, -0.44836223125457764, -0.3507591187953949, 0.040471870452165604, 0.18753598630428314, -0.4344865381717682, 0.5383607149124146, 0.09925874322652817, 0.5513993501663208, ...
def testgetbootdisk ( self, mock _ get _ operation, mock _ list _ disks ) : mock _ get _ operation. return _ value = mock _ gce _ operation _ instances _ get mock _ list _ disks. return _ value = mock _ list _ disks boot _ disk = fake _ instance. getbootdisk ( ) self. assertisinstance ( boot _ disk, compute. googlecomp...
[ -0.09666121751070023, 1.1192930936813354, 0.48526740074157715, 0.7228682041168213, 0.7546488046646118, -0.28286686539649963, 0.6704110503196716, -0.42034876346588135, -0.29590046405792236, -1.000093698501587, -0.5635697245597839, 0.8285091519355774, -0.04907400533556938, 0.6583700180053711...
def test _ mom _ with _ network _ failure _ bounce _ master ( ) : # get mom ip mom _ ip = ip _ of _ mom ( ) print ( " mom ip : { } ". format ( mom _ ip ) ) app _ def = get _ resource ( " { } / large - sleep. json ". format ( fixture _ dir ( ) ) ) with marathon _ on _ marathon ( ) : client = marathon. create _ client ( ...
[ 1.0170460939407349, -0.04652790725231171, 0.6971590518951416, 1.0140652656555176, -0.10338345915079117, 0.6075502038002014, 0.45747292041778564, 0.03223273530602455, 0.49198079109191895, -0.42807260155677795, -0.49376827478408813, -0.26237115263938904, -0.21583659946918488, 0.4031566083431...
def get _ tasks ( ib : ib _ insync. ib. ib, target : str, frequency : str, currency : str, symbols : list [ str ], start _ ts : pd. timestamp, end _ ts : pd. timestamp, use _ rth : bool, exchange : optional [ str ] = none, ) - > list [ tuple [ ib _ insync. contract, pd. timestamp, pd. timestamp, str, str, str, bool ] ]...
[ -0.9633448123931885, 0.9347324967384338, 0.6268613934516907, -0.13769002258777618, 0.8937382102012634, -0.4876176416873932, 0.24138587713241577, -0.5963316559791565, -0.821213960647583, 0.8411195874214172, -0.34455111622810364, 0.345232754945755, 0.3068678081035614, -0.44754675030708313, ...
def load _ module ( self, name ) : # load the module module = imp. load _ module ( name, self. file, self. filename, self. stuff ) if self. file : self. file. close ( ) # decorate the function / methods for hacker in bredala. _ hackers : module = hacker. hack ( module, name ) # update the module required information mo...
[ -1.2164853811264038, -0.24091561138629913, 0.6531768441200256, -0.341576486825943, -0.036166220903396606, 0.14172495901584625, -0.2067486196756363, -0.3652535676956177, 0.5698645114898682, 0.12955980002880096, -0.24196317791938782, 0.6712566614151001, -0.38276734948158264, 0.24923411011695...
def wait _ for _ page _ loaded ( self, dont _ wait = none, page _ load _ timeout = 60 ) : ajax _ wait _ timeout = \ builtin ( ). get _ variable _ value ('$ { ajax _ wait _ timeout }') if ajax _ wait _ timeout : self. wait _ for _ condition ('return window. jquery. active = = 0 ', ajax _ wait _ timeout,'ajax request was...
[ 0.060948293656110764, -0.7230874300003052, 0.7413150072097778, -0.33670324087142944, 0.5088339447975159, 0.40700143575668335, -0.9337219595909119, -0.20416639745235443, -0.2440691441297531, 0.25933459401130676, 0.08223867416381836, -0.2961030602455139, 0.2503570020198822, 0.279462337493896...
async def create _ password _ reset ( self, data : passwordresetmanagerdata ) - > user : await self. connect _ to _ database ( ) # create the password reset db object password _ reset _ db : passwordresetdb = passwordresetdb ( user _ id = data. user _ id, code = data. code, created _ at = datetime. now ( ) ) password _...
[ -0.33925411105155945, 0.5166764259338379, 0.6389632225036621, -0.12448252737522125, 0.5917438268661499, -0.0650157481431961, -0.32214945554733276, -0.369554728269577, 0.19923165440559387, 0.3476364314556122, -0.001983853057026863, 0.0786023661494255, -0.9032792448997498, -0.035192273557186...
def set _ qualification ( self, value ) : self. qual = value logging. debug ( " user's qualification received " )
[ 0.19073332846164703, -0.7821773290634155, 0.10819506645202637, 0.7744141817092896, -0.14213289320468903, 0.5942867398262024, 0.3436569571495056, 0.5824024081230164, -0.24748720228672028, 0.23247861862182617, -1.7043095827102661, 0.48977625370025635, 0.17582304775714874, -0.2514072358608246...
def setdescription ( self, description ) : self. _ description = description
[ 0.28721141815185547, -0.04899647831916809, 0.14124715328216553, 0.12699975073337555, 0.2731596529483795, 0.6461971402168274, -0.5031649470329285, 0.3123535215854645, 0.13410227000713348, 0.2484305053949356, -0.47806134819984436, 0.8805705308914185, -0.22729851305484772, 0.7531118988990784,...
def calc _ wavelet _ duration ( freqs, n _ cycles ) : result = np. empty _ like ( freqs ) for i in range ( len ( result ) ) : result [ i ] = ( float ( n _ cycles [ i ] ) / freqs [ i ] / np. pi ) * 1000 return result
[ -0.20936349034309387, 0.5653188824653625, 0.1537567526102066, -0.44676461815834045, -0.22716493904590607, -0.2525244355201721, 0.4657849073410034, -0.39023303985595703, 0.5074329376220703, 0.9362876415252686, -0.2584648132324219, -0.3654305934906006, -0.23249684274196625, 0.458200782537460...
def get _ updater ( optimizer ) : states = dict ( ) def updater ( index, grad, weight ) : " " " updater for kvstore " " " if index not in states : states [ index ] = optimizer. create _ state ( index, weight ) optimizer. update ( index, weight, grad, states [ index ] ) return updater
[ -0.12714573740959167, -0.16085350513458252, 0.19680319726467133, -0.416677325963974, -1.4490002393722534, -0.21341708302497864, -0.5862316489219666, 0.109406977891922, 0.42593517899513245, 0.49815431237220764, 0.26096129417419434, -0.8007943630218506, 0.012886354699730873, -0.3796973824501...
def mkh1 ( cls, spin _ particle, parameter _ vector ) : return sum ( [ v * getattr ( spin _ particle, ax ) for v, ax in zip ( parameter _ vector, cls. axes ) if v! = 0 ] )
[ 0.3051675856113434, -0.38246870040893555, 0.3628762662410736, 0.6361224055290222, 0.5926238298416138, 0.5647915601730347, 0.09987979382276535, 0.93718421459198, -0.24832403659820557, 0.7673680186271667, -0.09665998071432114, 0.4764343798160553, -0.49178948998451233, -0.2001999467611313, ...
def has _ extn ( self, opt ) : return opt. lower ( ) in self. esmtp _ features
[ 0.15642379224300385, 0.08583517372608185, 0.49561041593551636, 0.45304742455482483, -0.35674935579299927, -0.2220805436372757, -1.2130331993103027, 0.22699390351772308, 0.397804856300354, 0.8841237425804138, -0.8664782643318176, -0.060706183314323425, -0.9176266193389893, -0.26715785264968...
def make _ list _ of _ elements ( table, index ) : list _ of _ elements = [ line [ index ] for line in table ] return list _ of _ elements
[ -0.3935999274253845, -0.5593267679214478, 0.08343657851219177, 0.10376618802547455, 0.3284119665622711, 0.16283482313156128, -0.978570282459259, 0.7662590742111206, 0.0582716278731823, 0.01460610143840313, -0.2700299620628357, 0.20068366825580597, 0.9581028819084167, -0.5842201709747314, ...
def wait _ until _ started ( self, wait _ load = true ) : if wait _ load : msg ='entering the event loop | will retry binding | hot standby mode'self. logfile _ pos. seek _ wait ( msg, self. process if not self. gdb and not self. lldb else none ) while true : try : temp = adminconnection ('localhost ', self. admin. por...
[ 0.41855567693710327, 0.061375249177217484, 0.6988869309425354, 0.17074580490589142, -0.17767088115215302, 0.4703510105609894, -0.2860766053199768, -0.09870143234729767, -0.8733105063438416, -0.6084610223770142, -0.47504687309265137, 0.05193936824798584, -0.4624232053756714, 0.7956509590148...
def updatemessages ( self, parameters ) : return
[ -1.567604660987854, -0.9690781235694885, 0.2583858370780945, -0.21975545585155487, 0.8681479096412659, 0.08346996456384659, 0.04644835367798805, -0.9504042267799377, -0.13963182270526886, 1.0419188737869263, 0.19431455433368683, 0.39671364426612854, -2.004340410232544, 0.9237192273139954, ...
async def stop _ charge ( self ) - > none : # if car is asleep, it's not charging data = await self. _ send _ command ( " stop _ charge ", wake _ if _ asleep = false ) if data and data [ " response " ] [ " result " ] is true : params = { " charging _ state " : " stopped " } self. _ vehicle _ data [ " charge _ state " ]...
[ -1.0874462127685547, -0.45808133482933044, 0.5567615628242493, 0.017707761377096176, 0.792794406414032, 0.08943033963441849, -0.9938684105873108, -0.17172837257385254, -0.8446750640869141, 0.4621199667453766, -0.3007456064224243, 0.13962030410766602, -0.7382763028144836, 0.1457338035106659...
def say ( self, channel, s ) : self. presenter. say ( channel, s )
[ 0.7158101201057434, -0.8545242547988892, 0.2744676470756531, -1.3214333057403564, 0.38308531045913696, 0.03163978457450867, -0.7358022928237915, 0.12435302883386612, 0.5105913877487183, -0.11387381702661514, 0.3583657145500183, 1.2470710277557373, -0.6179907917976379, -0.02159745804965496,...
def remember _ changed _ files ( rid ) : server = rblib. reviewboardserver ( ) request = server. get _ review _ request ( rid ) get _ diffs _ url = request ['links'] ['diffs'] ['href'] diffs _ resource = server. api _ get ( get _ diffs _ url ) diffs _ list = server. api _ get _ list ( get _ diffs _ url,'diffs') total _...
[ -0.6049091815948486, 0.3893706202507019, 0.9870162606239319, -0.5307193398475647, 0.7037448287010193, -0.2257637083530426, 0.09620267152786255, 0.03385085612535477, 0.017473982647061348, 0.16089896857738495, -0.5968613624572754, -0.10933659225702286, -0.2070850282907486, 1.0664247274398804...
def getneighbors ( self ) : output = " " for z in self. veryclose : output + = z. getworld ( ) output + = " \ n " for z in self. close : output + = z. getworld ( ) output + = " \ n " # for z in self. distant : # output + = " distant % s sector - % s \ n \ n " \ # % ( z [ 0 ]. title ( ), z [ 1 ] ) # for z in self. far :...
[ -0.6605333089828491, -1.0014681816101074, 0.9242679476737976, -0.2903813421726227, -0.08819209784269333, 0.9711682200431824, -0.18695233762264252, -1.7812260389328003, -0.9787842035293579, 0.1585630476474762, -0.290322482585907, 0.4575677216053009, -0.7165404558181763, 0.5837092995643616, ...
def _ connection _ info ( cls ) : if cls. config _ uri : return {'host': cls. config _ uri } return {'host': cls. config _ host,'port': cls. config _ port }
[ -0.9529503583908081, -0.5731493234634399, 0.6106613278388977, -0.47138386964797974, -0.3151884973049164, -0.3189775347709656, -0.15843461453914642, 0.2110455334186554, -1.2098842859268188, 0.44335171580314636, -0.4558732509613037, -0.8236852288246155, -0.02127458155155182, 0.17221488058567...
def charge _ limit _ soc _ max ( self ) - > int : return self. _ vehicle _ data. get ( " charge _ state ", { } ). get ( " charge _ limit _ soc _ max " )
[ 0.6004533171653748, 0.08699431270360947, 0.5210103988647461, 1.0047682523727417, 0.37712958455085754, 0.3205856680870056, -0.6698194742202759, -0.08547642827033997, 0.4393421411514282, 0.21111992001533508, -0.1494990736246109, 0.5823646783828735, 0.517922043800354, -0.5106689929962158, 0...
def _ tpcf _ process _ args ( sample1, rbins, sample2, randoms, period, do _ auto, do _ cross, estimator, num _ threads, approx _ cell1 _ size, approx _ cell2 _ size, approx _ cellran _ size, rr _ precomputed, nr _ precomputed, seed, ) : sample1 = enforce _ sample _ has _ correct _ shape ( sample1 ) sample2, _ sample1 ...
[ 0.19755201041698456, 0.5081799030303955, 0.7755515575408936, 0.15200766921043396, 0.5350822806358337, 0.2882787883281708, 0.8460988402366638, -0.3955712914466858, -0.8435726761817932, 0.14965075254440308, -0.04933754354715347, 0.3664037883281708, -0.7009137272834778, 0.2035486251115799, ...
def grouped _ by _ chrom ( genes ) : chrom _ ordered = { } for gene in genes : try : chrom _ ordered [ gene. coord _ name ]. append ( gene ) except keyerror : chrom _ ordered [ gene. coord _ name ] = [ gene ] return chrom _ ordered
[ 0.2406240850687027, -0.3026732802391052, 0.2885904312133789, -0.15030808746814728, -0.5769935846328735, -0.1750641018152237, 0.09740016609430313, -0.3242296874523163, -1.0694975852966309, 0.011145476251840591, -0.4654548168182373, 0.25779953598976135, -0.2604462504386902, -0.34359717369079...
def wx _ skanuj _ zdjecie ( self, plik ) : image = pil. image. open ( plik ) wartosci = zbadaj _ zdj ( image ) if wartosci = = " nope " : self. wx _ wyswietl _ wiadomosc ( " zdjecie zawiera wiecej niz 3 kolory. nie mozna go przetworzyc ", " error " ) else : szer _ lini = wartosci [ 0 ] szer _ kom = wartosci [ 1 ] l _ z...
[ -0.8212199211120605, -0.23078516125679016, 0.3677804172039032, 0.09653227776288986, -0.9548981785774231, 0.5064319372177124, 0.6795024871826172, -0.20817463099956512, -0.036786485463380814, 0.0234669242054224, -0.7040308713912964, 0.1955057829618454, 0.30998197197914124, 0.4225544333457947...
def loglam ( self, ispec = none, iflux = none, loglam = none, y = none ) : if loglam is not none : return loglam else : return self. eval _ param ('loglam ', ispec = ispec, iflux = iflux, loglam = loglam, y = y )
[ 0.6172970533370972, -0.12466190755367279, 0.6081898808479309, -0.1645602136850357, 0.26221349835395813, -0.1012488454580307, -0.8683174252510071, 0.7175881266593933, 0.7336835861206055, -0.226945161819458, 0.7626612186431885, 1.522998571395874, 0.4174545109272003, -0.21360231935977936, 0...
def test _ atomic _ hex _ binary _ white _ space _ nistxml _ sv _ iv _ atomic _ hex _ binary _ white _ space _ 1 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / hexbinary / schema + instance / nistschema - sv - iv - atomic - hexbinary - whitespace - 1. xsd ", instance =...
[ -0.33779987692832947, -0.07007158547639847, 0.4316249191761017, 0.2750598192214966, 0.18616190552711487, 0.2527877688407898, 0.047880347818136215, -0.36052238941192627, 0.27466440200805664, 0.16965351998806, -0.1037767305970192, -0.4598531723022461, -0.3016587495803833, 1.1451863050460815,...
def _ move _ model _ to _ cluster ( self, hpc _ cluster = none, overwrite : bool = false, validation : bool = false, ) : if hpc _ cluster is none : hpc _ cluster = get _ site ( self. comm. project. interpolation _ site ) optimizer = self. comm. project. get _ optimizer ( ) iteration = optimizer. iteration _ name if val...
[ 0.05931529030203819, 0.14119140803813934, 0.683489978313446, 0.2857755422592163, 0.9507256150245667, 0.9269718527793884, 0.7527033686637878, -0.29313114285469055, -0.4354390799999237, 0.09878932684659958, -0.40458962321281433, 0.4697013795375824, -0.29664885997772217, 0.19767872989177704, ...
def _ init _ cc _ optimizer ( name, param _ keys, param _ vals ) : creator = optimizercreator ( ) check _ call ( _ lib. mxoptimizerfindcreator ( c _ str ( name ), ctypes. byref ( creator ) ) ) assert creator, " cannot find c + + implementation of optimizer \ registered with name " + name param _ keys = c _ array ( ctyp...
[ 0.40623992681503296, 0.07101446390151978, 0.4705631732940674, -0.2924397587776184, -0.5833502411842346, -0.27626416087150574, -0.03917599096894264, -0.22032469511032104, -0.7629863023757935, 0.01161388959735632, -0.6240411400794983, 0.12738220393657684, -0.7912670373916626, -0.120973564684...
def get _ form _ years _ list ( self, form _ years _ elements ) : form _ years _ list = [ ] for form _ year in form _ years _ elements : form _ year = form _ year. text. strip ( ) form _ years _ list. append ( int ( form _ year ) ) return form _ years _ list
[ -1.0069626569747925, -1.0343698263168335, 0.4527214765548706, -0.1803896725177765, -0.03757316619157791, 0.7271575927734375, -1.0013686418533325, 1.0665478706359863, 0.48337915539741516, 0.273996502161026, -0.8479751348495483, -0.49246469140052795, 0.12486793100833893, 1.1864502429962158, ...
def test _ auth _ required ( self ) : response = self. client. get ( recipes _ url ) self. assertequal ( response. status _ code, status. http _ 401 _ unauthorized )
[ -0.7041417956352234, 0.4387328326702118, 0.34617239236831665, 0.6287980079650879, 0.009620994329452515, 0.832764208316803, -0.4322548806667328, 1.3045172691345215, 0.014721152372658253, -0.7696484923362732, -0.39731502532958984, 0.6216357946395874, -0.1332421749830246, 0.06491755694150925,...
def post ( function ) : def wrapped ( self, discrete _ control ) : result = function ( self, discrete _ control ) if self. logger. if _ log _ data ( " optimization " ) : output _ data = self. log _ result ( result ) + list ( discrete _ control ) self. logger. log _ optimization _ step ( output _ data ) return result re...
[ -0.5410341024398804, 0.9070890545845032, 0.4496230185031891, 0.916790246963501, -0.18855597078800201, -0.6922021508216858, -0.18862387537956238, -0.8637669086456299, 0.3892456293106079, -0.9344630241394043, -0.6927129626274109, -0.7480466365814209, 0.9637045860290527, -0.001513453200459480...
def filter _ link ( self, link ) : if not link : return link _ empty # ignore javascript links ( from 1. 2 version javascript # links of the form. js are fetched, but we still ignore # the actual javascript actions since there is no # javascript engine. ) llink = link. lower ( ) # skip javascript, mailto, news and dire...
[ -0.8265998363494873, 0.5484820604324341, 0.6067889332771301, 0.4749508798122406, -0.41522839665412903, -0.019117649644613266, 0.3672502636909485, -0.13176767528057098, 0.8008000254631042, -0.7581957578659058, 0.5591428279876709, 0.6132368445396423, -0.3124803900718689, 0.6088536977767944, ...