text
stringlengths
25
2.19k
embedding
listlengths
768
768
def get _ dtype _ length ( dtype : dict [ str, str ] ) - > int : return sum ( int ( label. strip ( " > < | suuif " ) ) for label in dtype. values ( ) )
[ -0.44201794266700745, 1.3125197887420654, 0.4077202081680298, -1.0761526823043823, -0.4133995771408081, 0.27104198932647705, 0.07066642493009567, 0.6104044318199158, -0.3282431960105896, 0.6885462403297424, -0.9678757190704346, -0.530348539352417, 0.3780920207500458, 0.3172670006752014, ...
def print _ build _ output ( result : builddocsresult ) : with with _ group ( f " { text _ red } output for documentation build { result. package _ name } { text _ reset } " ) : console. print ( ) console. print ( f " [ info ] { result. package _ name : 60 } : " + " # " * 80 ) with open ( result. log _ file _ name ) as...
[ 0.21746793389320374, -1.0619601011276245, 0.7519318461418152, 0.03657545521855354, -0.25897350907325745, 0.4664258062839508, 0.3085785508155823, -0.24165762960910797, -0.5508157014846802, -0.2752838730812073, 0.2379833310842514, -0.06685595959424973, 0.3363228738307953, -0.0824090689420700...
def gettriadedges _ pungraph ( * args ) : return _ snap. gettriadedges _ pungraph ( * args )
[ -0.24369871616363525, 1.0189310312271118, 0.33363184332847595, 0.3293069303035736, 0.19616785645484924, -0.6973609328269958, 0.39992600679397583, 0.5376740097999573, 0.8199967741966248, 0.3633716404438019, -0.6645958423614502, -0.20620734989643097, -0.9130300283432007, -0.6279608607292175,...
def nn ( model, text, vectors, query, k = 5 ) : qf = decode ( model, [ query ] ) qf / = norm ( qf ) scores = numpy. dot ( qf, vectors. t ). flatten ( ) sorted _ args = numpy. argsort ( scores ) [ : : - 1 ] sentences = [ text [ a ] for a in sorted _ args [ : k ] ] print'query :'+ query print'nearest :'for i, s in enumer...
[ 0.3055369257926941, -0.35418498516082764, 0.3555387854576111, 0.10527096688747406, -1.0685480833053589, -0.03790263831615448, 0.04362522438168526, -0.4223282039165497, -0.8715031743049622, 0.5889469385147095, -0.3885291814804077, -0.9125783443450928, -0.3992888033390045, 0.1656066030263900...
def isstrattrdeletede ( self, * args ) : return _ snap. pneanet _ isstrattrdeletede ( self, * args )
[ 0.1275668740272522, 0.19504663348197937, 0.6326269507408142, -0.16095611453056335, 0.6483063101768494, 0.1451629400253296, -0.6771799325942993, -0.17942674458026886, 0.04931698739528656, -0.07407481223344803, -0.459746778011322, -0.6584122180938721, -0.8344392776489258, 0.2321079820394516,...
def set _ child _ watcher ( self, watcher ) : assert watcher is none or isinstance ( watcher, asyncio. abstractchildwatcher ), " watcher should be none or abstractchildwatcher instance " if self. _ watcher is not none : self. _ watcher. close ( ) self. _ watcher = watcher
[ 0.08533024787902832, -0.47501426935195923, 0.4403368830680847, -0.17055581510066986, -0.3706611394882202, 1.0354118347167969, 0.4603821337223053, -0.023779859766364098, -0.695675790309906, -0.8503075242042542, -0.8680909276008606, 0.6559315323829651, 0.229361891746521, 1.4321045875549316, ...
def on _ counterclockwise _ rotate ( self ) : if not self. edit _ mode : self. curr _ action = ( self. curr _ action - 1 ) % self. len else : self. dec _ val ( ) self. update _ screen ( )
[ -0.37241408228874207, -0.38143813610076904, 0.5811024308204651, 0.04217486456036568, 0.4339492917060852, 0.03931260108947754, 1.1396268606185913, -0.5247222781181335, -0.07325101643800735, -0.337924987077713, 0.04441436007618904, 0.17456676065921783, -0.5401352643966675, 0.0348686762154102...
def _ _ init _ _ ( self, * args ) : _ snap. tintstrvhi _ swiginit ( self, _ snap. new _ tintstrvhi ( * args ) )
[ 0.689124584197998, -0.2635642886161804, 0.16346405446529388, 0.8493756055831909, -0.6970697045326233, -0.6204288005828857, 0.9419151544570923, -0.28082266449928284, -0.7593798637390137, 0.645886242389679, -0.8202590942382812, 0.4908992648124695, -1.0121160745620728, 0.21091440320014954, ...
def test _ title _ field ( self ) : field = omniformbase. _ meta. get _ field ('title') self. assertisinstance ( field, models. charfield ) self. assertequal ( field. max _ length, 255 ) self. assertfalse ( field. blank ) self. assertfalse ( field. null )
[ 0.3792232275009155, 0.9725013375282288, 0.41540512442588806, -0.4607546031475067, 0.23953242599964142, 0.3641229569911957, -0.9761614799499512, -0.40772971510887146, 0.5710889101028442, -0.18484102189540863, -1.123008370399475, -0.5249180197715759, -0.6501103043556213, -0.5347881317138672,...
def print _ out ( self, obs, est, init _ data, dt = 1. 0, table = true ) : try : init _ value = init _ data [ 0 ] init _ value = init _ value [ 0 ] # reshape for a table ( for 1d ) if type ( init _ value ) is float : obs = obs. reshape ( ( len ( obs ), 1 ) ) est = est. reshape ( ( len ( est ), 1 ) ) # round values for ...
[ 0.5792475938796997, 0.3345282971858978, 0.9457228779792786, -0.39764466881752014, -0.5416978597640991, 0.053016941994428635, 0.6794013381004333, -0.30971428751945496, -1.040976643562317, 0.7355893850326538, 0.529030978679657, 1.2528456449508667, 0.5464471578598022, 1.0114810466766357, 0....
def generateclientloginauthtoken ( http _ body ) : token = get _ client _ login _ token ( http _ body ) if token : return'googlelogin auth = % s'% token return none
[ -0.7292189002037048, -0.5082718729972839, 0.29059848189353943, -0.7069010734558105, -0.2182721048593521, 0.7432212829589844, -0.5572003722190857, -0.2494022101163864, 0.08440613746643066, 0.12744875252246857, -0.5819034576416016, 1.0843615531921387, 0.3300223648548126, -0.6813167929649353,...
def update ( self ) : self. open = not len ( self. checkers ) if len ( self. checkers ) = = 1 : self. blot = true else : self. blot = false if len ( self. checkers )! = 0 : self. team = self. checkers [ 0 ]. getcolor ( ) else : self. team = none
[ -0.11428037285804749, -0.28459757566452026, 0.44696706533432007, -0.3011886179447174, -0.2653670907020569, 0.4416082799434662, 0.1045243963599205, 0.5387291312217712, -0.31539300084114075, 0.4596939980983734, 0.5733063817024231, 0.9483209252357483, -1.1425697803497314, 0.3544270992279053, ...
def getdat ( self, * args ) : return _ snap. tintinth _ getdat ( self, * args )
[ 0.31185397505760193, -0.10315840691328049, 0.4546017348766327, -0.09780354052782059, 1.1573412418365479, 0.6191378235816956, 0.22086670994758606, -1.343493103981018, -0.4347277879714966, -1.1344276666641235, -0.5025019645690918, 0.3760071396827698, -1.1688506603240967, -0.5129560828208923,...
def isfloat ( string ) : try : float ( string ) except valueerror : return false ; return true ;
[ 0.7706535458564758, 0.1418955773115158, 0.3495538830757141, 0.8457739353179932, 0.27285537123680115, 0.5274083614349365, -0.1322372555732727, 0.14905443787574768, -0.23075219988822937, -1.1377172470092773, -0.05245588347315788, -0.35663697123527527, -0.8376268148422241, -0.1464677006006240...
def get _ yoshi _ params _ from _ ocat ( obsid, obs _ date = none, web _ ocat = true, cycle = none ) : if web _ ocat : ocat = get _ ocat _ web ( obsid = obsid ) else : ocat = get _ ocat _ local ( obsid = obsid ) if obs _ date is none and ocat [ " start _ date " ] is not numpy. ma. masked : # if obsid has a defined star...
[ -0.26154443621635437, -0.4245692193508148, 0.6590200662612915, -0.8279277086257935, -0.38801589608192444, -0.745853841304779, -0.5158881545066833, 0.12708310782909393, -0.12212037295103073, 0.46065735816955566, 0.020014656707644463, 1.1195123195648193, 1.1769320964813232, 0.460511386394500...
def _ parse _ competition _ type ( source ) : for line in source. split ( " \ n " ) : s = line. lstrip ( ) if not s or s. startswith ( " # " ) : continue break else : raise valueerror # may propagate valueerror m = re. match ( r " competition _ type \ s * = \ s * ( ['\ " ] ) ( [ _ a - za - z0 - 9 ] + ) ( ['\ " ] ) $ ",...
[ 0.2742752730846405, -0.27597469091415405, 0.7605720162391663, -0.08181419223546982, -0.03327462449669838, -0.16659073531627655, 1.0309009552001953, 0.15505963563919067, -0.3029687702655792, 0.4211183786392212, -0.08883604407310486, 0.5615432858467102, -0.4470053017139435, 0.082286082208156...
def getsattrdate ( self, * args ) : return _ snap. tdirnet _ getsattrdate ( self, * args )
[ 1.044475793838501, 0.7661950588226318, 0.44606927037239075, 0.024516340345144272, 0.4382755160331726, 0.11058105528354645, -0.37933430075645447, -0.6404067277908325, -0.6710925102233887, -1.2883387804031372, 0.058071985840797424, -0.515317440032959, -0.4581352472305298, 1.0239012241363525,...
def get _ field _ label ( value, arg ) : try : model = apps. get _ model ('cts _ forms ', value ) field = model. _ meta. get _ field ( arg ) except fielddoesnotexist : return variable _ rename. get ( arg, arg. replace ('_ ','' ) ) return variable _ rename. get ( field. name, field. verbose _ name )
[ -0.14721514284610748, -0.6091298460960388, 0.5701019167900085, -0.99382084608078, 0.21579287946224213, 0.20463231205940247, -1.0456100702285767, -0.5022021532058716, -0.24070614576339722, 1.2528671026229858, 0.08014624565839767, -0.028279125690460205, 0.6169514060020447, 0.2833943367004394...
def unregister ( handle ) : # to prevent interference with the loop inside trigger ( ), the # callback won't be removed immediately ( but also won't be called # anymore ). the actual removal is done at the end of every trigger ( ) # call. # the len ( ) function will report a size not including inactive handlers. handle...
[ 0.6884487271308899, 0.6586229801177979, 0.4457327723503113, -0.4381600022315979, -0.1605299711227417, -0.11603868007659912, 1.4248346090316772, 0.6611716151237488, -0.10954992473125458, -0.9830345511436462, -1.5305266380310059, -0.21244794130325317, -1.1016675233840942, 0.3280588388442993,...
def printgraphstattable _ pngraphmp ( * args ) : return _ snap. printgraphstattable _ pngraphmp ( * args )
[ 0.025103962048888206, 0.255071222782135, 0.16738013923168182, -0.3157248795032501, 0.7492028474807739, 0.6980004906654358, 0.6892948150634766, -1.6298192739486694, -0.754266619682312, -0.13172882795333862, 0.2625572681427002, 0.6980596780776978, -1.1671178340911865, -0.09822790324687958, ...
def get _ one _ station ( station _ id, state _ list ) : conn = pg2. connect ( dbname ='weather ', host ='localhost') cur = conn. cursor ( ) conn. autocommit = true get _ weather _ command = f " " " select * from w _ 00 where station _ id ='{ station _ id }'; " " " cur. execute ( get _ weather _ command ) station _ dat...
[ -0.7368028163909912, 0.4395715296268463, 0.6142705678939819, 0.2581902742385864, 0.9371830224990845, 0.20338717103004456, -0.5948938131332397, 0.14879271388053894, 0.015715207904577255, 0.19259841740131378, 0.4266805350780487, -0.16341234743595123, -0.7023550271987915, 0.3758556544780731, ...
def find _ wrapper ( element ) : # check for a more specific wrapper in the registry try : wrapper _ match = atspimeta. control _ type _ to _ cls [ element. control _ type ] except keyerror : # set a general wrapper by default wrapper _ match = atspiwrapper return wrapper _ match
[ -0.10621815174818039, 0.04756448417901993, 0.27301838994026184, 0.3736499547958374, 0.23335959017276764, 0.4096966087818146, -0.3694100081920624, -0.7994153499603271, 0.9603871703147888, 0.1640373170375824, 0.8111975789070129, 0.6232237815856934, -0.001259488519281149, 0.9282965660095215, ...
def devmode _ enabled ( self, request ) : return utils. is _ devmode ( )
[ -1.3556760549545288, 0.4268779754638672, 0.42891237139701843, 0.7856881618499756, 0.2328248918056488, 0.7847588658332825, -0.5379168391227722, -0.6468108892440796, 0.45891228318214417, -0.11295411735773087, -0.2889387309551239, -0.22136449813842773, 0.2965525686740875, 0.041150014847517014...
def calc _ expiry _ time ( expiry ) : return ( expiry. replace ( tzinfo = none ) - datetime. datetime. utcnow ( ) ). days
[ -0.1579316258430481, -0.07291720807552338, 0.20588915050029755, -0.7451925277709961, -0.1828434020280838, -0.35196560621261597, -0.8556186556816101, 0.7908108830451965, 0.8213671445846558, 1.108569622039795, -0.7720699906349182, -0.7903217077255249, -0.2736455202102661, -0.0297504961490631...
def hilbert _ curve ( n ) : # recursion base if n = = 1 : return np. zeros ( ( 1, 1 ), np. int32 ) # make ( n / 2, n / 2 ) index t = hilbert _ curve ( n / / 2 ) # flip it four times and add index offsets a = np. flipud ( np. rot90 ( t ) ) b = t + t. size c = t + t. size * 2 d = np. flipud ( np. rot90 ( t, - 1 ) ) + t. ...
[ -0.7696727514266968, 0.7344385385513306, 0.6662801504135132, -0.3207469880580902, 0.08247874677181244, 0.017136121168732643, 0.3354402184486389, -0.5967496633529663, 0.28307512402534485, 0.24695135653018951, -0.3174974322319031, -0.07960963994264603, 0.11067719012498856, 0.2296133637428283...
def calculate _ ij ( p, q, vr, vj ) : ij = ( p * vj - q * vr ) / ( vj * * 2 + vr * * 2 ) return ij
[ -0.011898615397512913, -0.43379321694374084, 0.3028169572353363, -0.0039770761504769325, -0.5677693486213684, 0.29897865653038025, 0.2964481711387634, 0.31533291935920715, -0.3594962954521179, 0.6825206875801086, 0.07941232621669769, -0.5356937050819397, -1.8452922105789185, -0.73035615682...
def test _ repr ( ) : pytest. debug _ func ( ) c = nldt. moment ( ) # payload assert eval ( repr ( c ) ) = = c
[ 0.055888593196868896, 0.03170478716492653, 0.16275334358215332, -1.2094451189041138, 0.16377171874046326, 1.0566273927688599, -0.3247782588005066, -0.40655162930488586, -0.06428372859954834, -0.43593987822532654, 0.07442636042833328, 0.261967271566391, 0.07943975925445557, 0.55605274438858...
def compareatomicconst ( self, * args ) : return _ snap. trowiteratorwithremove _ compareatomicconst ( self, * args )
[ 0.6716561317443848, -1.046688437461853, 0.1926007717847824, -0.2416500300168991, -0.9839017987251282, 0.36870378255844116, 0.41706839203834534, -0.6370202302932739, -1.1670247316360474, 0.9850015044212341, -0.6403990387916565, -0.18519781529903412, -0.19712921977043152, 0.05670798942446709...
def wgt _ rmse ( fld1, fld2, wgt = none ) : assert len ( fld1. shape ) = = 2, " input fields must have exactly two dimensions. " if fld1. shape! = fld2. shape : print ( f " regrid required. will interpolate fld2 { fld2. shape } to fld1 grid { fld1. shape }. " ) fld2 = fld2. interp _ like ( fld1 ) if wgt is none : wgt =...
[ 0.17724277079105377, 0.08368285000324249, 0.8114443421363831, -0.32911646366119385, -0.3011414706707001, -0.08031539618968964, -0.1650235503911972, -0.3562591075897217, -0.8011913299560547, 0.38308313488960266, 0.33329445123672485, 1.3116252422332764, -1.0452532768249512, 0.630057513713836...
def check ( grid, coord ) : line _ values = grid [ coord [ 1 ] ] isresolve, solution = check _ values ( line _ values ) if isresolve : grid [ coord [ 1 ] ] [ coord [ 0 ] ] = solution return false column _ values = [ ] for line in grid : column _ values. append ( line [ coord [ 0 ] ] ) isresolve, solution = check _ valu...
[ 0.02823367714881897, 0.26237595081329346, 1.1371797323226929, -0.21921707689762115, 0.5273844599723816, -0.09780307114124298, -0.15083222091197968, -0.22367194294929504, -0.7054315805435181, 0.07626399397850037, -0.15899024903774261, -0.30321094393730164, 0.008150331676006317, 0.3398597836...
def save _ config ( self ) : output = self. device. save _ config ( ) return output
[ -1.5478739738464355, -0.10042732208967209, 0.43487221002578735, 0.6556530594825745, -0.3291563391685486, -0.7960220575332642, 0.4676765501499176, -0.016242949292063713, -0.7791566252708435, 0.26213252544403076, -1.4162664413452148, -0.9340294003486633, -0.610974133014679, 0.737785875797271...
def new ( * args ) : return _ snap. tmemin _ new ( * args )
[ -0.7475109696388245, -0.9329917430877686, 0.12250375747680664, -0.6112369894981384, -0.35496988892555237, 0.592017650604248, 0.017208993434906006, -0.2513861358165741, -1.4413795471191406, -0.1439530849456787, -0.32475730776786804, -1.0137518644332886, 0.34772542119026184, 0.70975148677825...
def write _ table ( self ) : if dataproperty. is _ not _ empty _ string ( self. table _ name ) : self. _ _ write _ chapter ( self. table _ name ) super ( markdowntablewriter, self ). write _ table ( )
[ 0.015613818541169167, -0.5628191828727722, 0.5264182686805725, 0.855120837688446, 0.38733646273612976, -0.3321949243545532, 0.20715613663196564, 0.4070913791656494, -0.9405586123466492, -0.11478300392627716, 0.7847378253936768, -0.9047218561172485, 0.11958684027194977, 0.43806010484695435,...
def oauthtokenfromurl ( url, scopes _ param _ prefix ='oauth _ token _ scope') : if isinstance ( url, ( str, unicode ) ) : url = atom. url. parse _ url ( url ) if'oauth _ token'not in url. params : return none scopes = [ ] if scopes _ param _ prefix in url. params : scopes = url. params [ scopes _ param _ prefix ]. spl...
[ -0.5458903908729553, -0.8490317463874817, 0.492836058139801, -0.15968932211399078, -0.3826025426387787, -0.5987845063209534, -0.20019720494747162, 0.6290246248245239, 1.1706138849258423, 0.2189081609249115, -0.0971522331237793, 1.1743534803390503, 0.7668772339820862, -0.54630047082901, 0...
def get _ signer _ signed _ url ( self, event, status ) : raise notimplementederror ( )
[ -0.2701580822467804, -1.3337669372558594, 0.46940356492996216, 0.9523545503616333, -0.09474389255046844, 0.6104031801223755, 0.20521800220012665, 1.3190432786941528, 0.06657961755990982, -0.35395607352256775, -0.6802057027816772, -0.7100353837013245, 0.5254780650138855, 0.5105207562446594,...
def _ _ lt _ _ ( self, * args ) : return _ snap. tmmnetmodeneti _ _ _ lt _ _ ( self, * args )
[ 0.2963786721229553, -0.6986472606658936, 0.31279152631759644, -1.0752190351486206, 0.4890068769454956, -0.4951830208301544, -0.729806125164032, -0.7718515992164612, -0.8914436101913452, -0.3071932792663574, -0.6853778958320618, -1.150983452796936, -0.03760410100221634, 0.9323598742485046, ...
def get _ motion _ raos ( self, bodyid = 1 ) : # should include an'uncoupled'option? self. _ assert _ domaintype ('frequency') data = self. _ get _ results ('w1motion ', bodyid,'data') # reshape data to ( dof, direction, frequency ) data. shape = ( self. _ ndirs, self. _ nfreqs, 6 ) return np. rollaxis ( data, 2 )
[ -0.8568780422210693, 1.1213701963424683, 0.42797568440437317, -0.27275973558425903, 0.6130445599555969, -1.0775103569030762, 0.232955664396286, -1.0019973516464233, 0.435270220041275, -0.1282646805047989, 0.5936928987503052, 0.821770966053009, -0.23291507363319397, 0.44772857427597046, -...
def get _ vertices ( self ) - > [ ] : result = [ ] i = 0 for vertex in self. adj _ matrix : result. append ( i ) i + = 1 return result
[ -0.3848648965358734, 0.49196961522102356, 0.2721099853515625, 1.0795105695724487, 0.6627243161201477, 0.286571741104126, 0.34006887674331665, 0.4019961655139923, 0.4714130163192749, 0.2811335623264313, -0.194554403424263, 0.6733071208000183, -0.2788875699043274, -0.2382293939590454, -0.6...
def delete ( * * kwargs ) - > none : if ( err : = _ sendrequest ( requests. delete, * * kwargs ) ) is not none : printhtmlerror ( err )
[ 0.5412256121635437, 0.9065627455711365, 0.46319475769996643, 1.1549452543258667, 1.080340027809143, 0.3366001546382904, -0.7071225047111511, -0.896668016910553, 0.2632422149181366, 0.02856956236064434, 0.15485036373138428, 0.5723935961723328, -1.1695252656936646, 0.2835553288459778, 0.19...
def plan _ ea ( * args ) : return _ ida _ auto. plan _ ea ( * args )
[ -1.6604079008102417, 0.109453946352005, 0.396268367767334, 0.6310656666755676, 0.11469507962465286, 0.7115344405174255, 1.2575656175613403, 0.38133445382118225, 0.1845422238111496, 0.3151072561740875, -0.416574627161026, -0.4249112606048584, -0.2711564600467682, -0.13163216412067413, 0.6...
def test _ get _ all _ entries ( self ) : response = self. app. post ( " / api / v1 / diaries ", content _ type ='application / json ', data = json. dumps ( dict ( id = " 1 ", title = " coding ", content = " the best way of life is code ", today = " 17. 07. 2018 " ), ) ) reply = json. loads ( response. data. decode ( )...
[ 0.03398282453417778, 0.4180121421813965, 0.752082347869873, 0.16865533590316772, 0.295904278755188, 0.3418385684490204, -0.5676271915435791, 0.12394793331623077, 0.032439012080430984, -1.1502151489257812, -0.30964410305023193, 0.9446812868118286, 0.3750193119049072, 0.9014405012130737, -...
def parameter ( * values, ids = none, by _ dict = none ) : if by _ dict is not none : if values or ids : raise runtimeerror ( " use of the by _ dict parameter cannot be used alongside positional arguments " ) ids, values = zip ( * by _ dict. items ( ) ) # optional cls parameter in case a parameter is defined inside a #...
[ -0.9775309562683105, -0.155221626162529, 0.569754958152771, -0.37242981791496277, 0.9956727623939514, -0.25715208053588867, 0.09404473751783371, 0.016638044267892838, 0.8885796070098877, -0.3535604178905487, 0.3000362813472748, 0.6709772944450378, 0.38004472851753235, 0.04729527235031128, ...
def _ max _ zone _ participation ( rule, obj _ l, t _ obj ) : brcddb _ fabric. set _ bp _ check ( rule, true ) temp _ l = rule. split ('(') try : brcddb _ fabric. set _ bp _ check ( temp _ l [ 0 ], int ( temp _ l [ 1 ]. split (')') [ 0 ] ) ) except indexerror : brcdapi _ log. log ('rule'+ str ( rule ) +'is not valid. '...
[ 0.5816927552223206, -0.18631255626678467, 0.49614155292510986, 0.27332183718681335, 0.9647787809371948, 0.3326040506362915, 1.0199778079986572, 0.7271320819854736, 0.09293336421251297, 0.9656047224998474, 0.18817809224128723, 0.6110814809799194, -1.0217448472976685, 0.10567145049571991, ...
def authenticate ( credentials, user _ domain _ name ='default ', project _ domain _ name ='default ', project _ name ='default') : if'username'in credentials and'password'in credentials : username = credentials ['username'] password = credentials ['password'] auth = v3. password ( auth _ url = app. iniconfig. get ('op...
[ -0.1378326267004013, 0.06775827705860138, 0.4275449514389038, 0.7298446297645569, -0.3886236548423767, -0.3384835720062256, -0.7246678471565247, -0.8201596736907959, 0.3780938684940338, 0.09087920933961868, 0.17634613811969757, 0.22582019865512848, -0.264620840549469, -0.9060834646224976, ...
def _ _ init _ _ ( self, * args ) : _ snap. tgstatvec _ swiginit ( self, _ snap. new _ tgstatvec ( * args ) )
[ -0.6961115598678589, 0.012930761091411114, 0.09334129095077515, -0.37962254881858826, 0.3962363004684448, 0.37261533737182617, 2.2902228832244873, -0.5106939673423767, -1.13816499710083, -0.27533912658691406, -0.22805479168891907, 0.824510395526886, 0.8188992738723755, 0.8929426074028015, ...
async def pill ( self, ctx, colour = " # ff0000 " ) : async with ctx. channel. typing ( ) : pill _ image = await self. make _ colour ( colour ) if pill _ image is none : await ctx. send ( " something went wrong sorry! " ) return image = discord. file ( pill _ image ) await ctx. send ( file = image )
[ -0.4965277910232544, 0.876981794834137, 0.6552744507789612, -1.089500904083252, 0.5243498086929321, 1.103919267654419, -1.1096584796905518, -0.08850864320993423, 0.3422902822494507, 0.44058364629745483, -0.42880165576934814, 1.2017408609390259, -0.39537522196769714, -0.021965693682432175, ...
def command _ bug ( self, brain, args ) : # # api info @ : # # http : / / twiki. corp. yahoo. com / view / bugzilla / bugzillawebservicesconfig if not args : return fmt ='json'data ='basic'bugnum = args [ 0 ]. strip ( ) url = " http : / / api. bug. corp. yahoo. com : 4080 / " key _ uri = " api / 1 / wssid / { 0 } ". fo...
[ -0.4857502579689026, -0.670952558517456, 0.8787152767181396, -0.23386867344379425, 0.17414511740207672, -0.4797833263874054, -0.23491232097148895, -0.3615005314350128, 0.6968811750411987, -0.35489827394485474, -0.29844173789024353, 0.872925877571106, -0.45754849910736084, 0.312144488096237...
def monthly _ relative ( self ) : if self. schedule _ freq _ type = ='monthly _ relative': return {'active _ start _ time': schedulepattern. _ time _ converter ( self. _ pattern ['active _ start _ time'],'% h : % m ', false ),'relative _ time': schedulepattern. _ relative _ day [ self. _ pattern ['freq _ relative _ int...
[ -0.03197954222559929, -0.3452698886394501, 0.8534508347511292, -0.5595053434371948, -1.0851914882659912, 0.45991337299346924, 0.22303032875061035, -0.43639007210731506, -0.12208622694015503, 0.48078033328056335, -0.18196287751197815, 0.05989716202020645, -0.6460280418395996, 0.145213767886...
def intersect _ line _ segment ( self, other : linesegment, * * kwargs ) - > point : line _ a = line. from _ points ( self. point _ a, self. point _ b ) line _ b = line. from _ points ( other. point _ a, other. point _ b ) point _ intersection = line _ a. intersect _ line ( line _ b, * * kwargs ) point _ on _ segment _...
[ 0.20277252793312073, -0.3667501211166382, 0.8331252336502075, 0.278846800327301, 0.8161049485206604, 0.32588979601860046, -0.7527846097946167, -0.6732019782066345, -0.5990117788314819, 0.026813900098204613, 0.06268341839313507, -0.8494954705238342, -0.09364717453718185, -0.3490262627601623...
def to _ float ( x, name = " tofloat " ) : return cast ( x, dtypes. float32, name = name )
[ 0.26401346921920776, 0.9044637680053711, 0.6300911903381348, 0.11448457837104797, -0.15595439076423645, -0.2275916337966919, -0.32643675804138184, -1.284674882888794, 0.2260393649339676, 0.13347139954566956, -1.3560727834701538, 0.6504765748977661, 0.8370835781097412, -0.38341641426086426,...
def from _ polygons ( cls, polygons : iterable [ polygon ], border : union [ border, autoborder ] ) - > geometry : points = vstack ( [ polygon. get _ vertices ( ) for polygon in polygons ] ) if isinstance ( border, autoborder ) : return cls ( polygons = list ( polygons ), border = border. get _ border ( points ) ) if i...
[ 1.3787339925765991, -0.4811030328273773, 0.40623629093170166, 1.3157013654708862, 0.08735260367393494, 0.31528815627098083, -0.40095600485801697, -0.5411173105239868, 0.6917842030525208, 0.30396533012390137, -0.8175535798072815, 0.8182913661003113, 0.3774130642414093, -0.6101673245429993, ...
def test _ specific _ cached ( self ) : base _ instance = omnifield. objects. get ( pk = self. field. pk ) with patch. object ( base _ instance. real _ type,'get _ object _ for _ this _ type') as patched _ method : patched _ method. return _ value = self. field assert base _ instance. specific assert base _ instance. s...
[ -0.4748106896877289, 0.10438673198223114, 0.4247679114341736, -0.029969913884997368, 0.3026913106441498, 0.39693203568458557, 0.2957618832588196, 0.15109214186668396, 0.996001124382019, -0.6174516677856445, -0.8195208311080933, 1.070520281791687, 0.31619226932525635, 0.003703747410327196, ...
def add _ edge ( self, source _ node, destination _ node, airline _ id, stops ) - > none : self. _ adjacent _ nodes [ source _ node ]. append ( destination _ node ) self. _ route _ connects [ f " { source _ node }, { destination _ node } " ] = [ airline _ id, stops ]
[ -0.9082221984863281, 0.27519235014915466, 0.5999943017959595, -0.9188541769981384, 0.5642520785331726, 1.4358668327331543, -0.8761777281761169, 0.7314490079879761, -0.7526567578315735, 0.4657255709171295, 0.22352097928524017, -0.22667498886585236, 0.454357773065567, 0.046778518706560135, ...
def get _ pep ( xmpp, available _ methods, callback ) : def _ cb ( iq ) : if iq [ " type " ] = = " error " : available _ methods [ " pep " ] = false else : available _ methods [ " pep " ] = true for conf in iq ['pubsub'] ['items'] ['item'] ['bookmarks'] ['conferences'] : if isinstance ( conf, url ) : continue b = bookm...
[ -0.0370749868452549, -0.2135726362466812, 0.5756987929344177, 0.6161129474639893, 0.07923128455877304, -0.425750732421875, -0.8523916602134705, 0.32734063267707825, -0.1611645668745041, 0.755563497543335, 0.36049050092697144, 0.004095409531146288, -0.8193278312683105, 0.058865126222372055,...
def test _ atomic _ boolean _ white _ space _ 3 _ nistxml _ sv _ iv _ atomic _ boolean _ white _ space _ 4 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / boolean / schema + instance / nistschema - sv - iv - atomic - boolean - whitespace - 4. xsd ", instance = " nistdat...
[ -0.3383125364780426, -0.14649032056331635, 0.4064937233924866, 0.2693925201892853, -0.27109581232070923, 0.11051919311285019, -0.0664735734462738, -0.6292408108711243, -0.14939536154270172, 0.8149324059486389, -0.2822989821434021, 0.14060771465301514, -0.08127855509519577, 0.29189723730087...
def next ( self ) : page = self. ui. webview. page ( ) history = page. history ( ) history. forward ( ) if history. cangoforward ( ) : self. ui. next. setenabled ( true ) else : self. ui. next. setenabled ( false )
[ 0.2800977826118469, 0.8845489025115967, 0.6390796899795532, 0.7834784388542175, -0.8009793758392334, 0.5150193572044373, 0.5726712942123413, 1.2051876783370972, 1.1462143659591675, -0.5138875842094421, 0.2478969395160675, 0.6114017367362976, -0.575539767742157, 0.8552641272544861, -0.311...
def getv ( * args ) : return _ snap. tcncomv _ getv ( * args )
[ -0.08094293624162674, 0.33128583431243896, 0.24633905291557312, 0.29923683404922485, 1.3842054605484009, 0.06506442278623581, 0.8907878398895264, 0.29225218296051025, -0.2795865535736084, -0.2522413432598114, -0.25169146060943604, -0.24588961899280548, -0.12744401395320892, 0.4586737155914...
def parse _ feature _ value ( rule _ name ) : rule _ name = validate _ rule _ name ( rule _ name ) parsed = rule _ parser. match ( rule _ name ) if parsed is none : # occurs only if rule _ name is boolean or do parsed = rule _ parser _ boolean. match ( rule _ name ) if parsed is not none : return true,'boolean'else : r...
[ 0.03665110468864441, -0.5961511135101318, 1.0117037296295166, 0.19407464563846588, 0.3633207082748413, -0.07394271343946457, 0.3475305140018463, 0.30893486738204956, -0.6346529722213745, 0.054125864058732986, 0.26551857590675354, 0.6047818064689636, 0.13538861274719238, 0.7504212856292725,...
def changeorder ( self ) : if self. play _ mode = = 3 : self. play _ mode = 1 else : self. play _ mode + = 1
[ -0.8513849377632141, 0.2434118241071701, 0.8629405498504639, 0.85148686170578, 0.6811559796333313, 0.4072517156600952, 0.31684550642967224, -0.1969207525253296, -0.13728879392147064, 0.7006239891052246, -0.7413702607154846, 0.7559061646461487, -0.2112899273633957, -0.18803292512893677, 1...
def test _ mitsuku _ basic ( mitsuku, message ) : resp = mitsuku. send ( message ) assert len ( resp ) > 0
[ -0.13314484059810638, 1.1836961507797241, 0.32261961698532104, 0.33886489272117615, 0.7765581607818604, 0.057972684502601624, -0.8752321004867554, 0.024285530671477318, -0.3651384711265564, -1.2004891633987427, -0.32158273458480835, 0.3415556252002716, -0.8440384864807129, 0.36262011528015...
def intvattrnameei ( self, * args ) : return _ snap. pneanet _ intvattrnameei ( self, * args )
[ -0.7654170989990234, 0.5635046362876892, 0.2905579209327698, 0.2369745820760727, 0.5333107709884644, 0.8438618183135986, -0.2068546563386917, -1.0616035461425781, -1.1601132154464722, 0.8915025591850281, -0.0887400284409523, -1.15996515750885, -0.5947088599205017, 0.17345094680786133, 0....
def pre _ process _ img ( img ) : " " " make gaussian blur in raw image to remove some noise " " " img _ blur = cv2. gaussianblur ( img, ksize = ( 5, 5 ), sigmax = 1, sigmay = 1 ) " " " perform image enhancement to make black - white qr - code prominent " " " img _ blur _ assist = cv2. gaussianblur ( img _ blur, ksize ...
[ 0.24333643913269043, -0.2985292375087738, 0.895039439201355, -0.05341958627104759, 0.02971269190311432, -0.207867830991745, 0.593635618686676, -0.4126175343990326, 0.6191723942756653, 0.23387077450752258, -0.1675006002187729, 0.04243989288806915, 0.5754796862602234, 0.8695464134216309, 1...
def l _ u ( self, x, u, i, terminal = false ) : if terminal : return 0 self. qus [ i ] = 2. * self. u _ diffs [ i ] * self. b0 / 4. 0 return self. qus [ i ]. t * 2. 0
[ 0.2861804962158203, -0.365695595741272, 0.4578656852245331, -0.7478731274604797, -0.40637972950935364, 0.7758260369300842, -0.18036174774169922, 0.007456609513610601, 0.033721961081027985, -0.5156023502349854, -0.8410195112228394, 0.3799140751361847, -0.4242442846298218, -0.384433329105377...
def savegviz _ pngraph ( * args ) : return _ snap. savegviz _ pngraph ( * args )
[ -1.7596263885498047, 0.8209375143051147, 0.04027571901679039, 0.2913033962249756, -0.4696919023990631, 0.10890838503837585, 0.3920721411705017, -1.0993876457214355, -0.44236817955970764, 0.15295521914958954, -1.6381597518920898, -0.04419223219156265, -0.5582999587059021, 0.3331817388534546...
def getedgesinout _ pneanet ( * args ) : return _ snap. getedgesinout _ pneanet ( * args )
[ -0.8845911026000977, 0.12640763819217682, 0.6969592571258545, 0.6160954833030701, -0.6624463200569153, 0.27603188157081604, -1.2303787469863892, -0.023016639053821564, -0.669256329536438, -0.25544309616088867, -0.40777620673179626, -0.3454785645008087, -0.7141817212104797, -0.3358354568481...
def improve _ text ( text ) : # define the list of words that should not be translated skippedwords = ['i ','a ','the ','it ','he ','she ','you ','are ','is ','in ','for'] for x in xrange ( len ( skippedwords ) ) : skippedwords. append ( skippedwords [ x ] + ',') skippedwords. append ( skippedwords [ x ] +':') skippedw...
[ 0.21724015474319458, -0.13060450553894043, 0.740000307559967, -0.19037944078445435, -0.4306178092956543, -0.8087787628173828, 0.3884945511817932, 1.1409577131271362, 0.5430215001106262, 0.2820288836956024, -0.7195597290992737, 0.7178051471710205, -0.07732909172773361, 0.5051625370979309, ...
def environ ( ) : old _ env = os. environ new _ env = dict ( old _ env. items ( ) ) os. environ = new _ env yield os. environ os. environ = old _ env
[ 0.09079401940107346, -1.0639740228652954, 0.7883897423744202, -0.638967752456665, -0.5575414299964905, 0.4532037675380707, -0.009248628281056881, 0.6067587733268738, -0.5904321074485779, 0.1358911097049713, -0.7145740985870361, 0.8781589865684509, 1.0220364332199097, 0.4904700517654419, ...
def _ _ init _ _ ( self, main _ cmd : callable ) : self. _ main _ cmd = main _ cmd
[ 0.6042249798774719, -0.6224908232688904, 0.4170824885368347, 0.4417739808559418, -0.2946373224258423, 0.3484700918197632, 0.5648946166038513, 0.7853342890739441, 0.2548685371875763, -1.0113917589187622, 0.4283224642276764, 0.5304555296897888, 0.5621145963668823, 1.2179083824157715, 0.862...
def log ( case, message ) : logging. basicconfig ( level = logging. info, filename ='bot. log ', format ='% ( asctime ) s % ( levelname ) s : % ( message ) s') try : if case = ='score': logging. info ( message ) elif case = ='bad _ vote': logging. info ( message ) except exception : print ( traceback. format _ exc ( ) ...
[ -0.07090002298355103, 0.0760529413819313, 0.6108887791633606, 0.8622490763664246, 0.2809818387031555, 0.7668976783752441, -0.6658288240432739, -0.2148466259241104, -0.4602167308330536, 0.595310389995575, 0.11986250430345535, 0.012556378729641438, -0.30856335163116455, 0.7278434634208679, ...
def _ _ init _ _ ( self ) : self. _ _ my _ words = input ( " please enter a word or sentence : " )
[ 0.12024478614330292, -0.4062713086605072, 0.27081266045570374, -0.37702029943466187, -0.8649610877037048, 0.1970248818397522, 0.3472535312175751, 0.5117126107215881, -0.34314629435539246, -0.7050727009773254, 0.02776551991701126, 0.33270731568336487, -0.6787609457969666, 1.2049134969711304...
def can _ move _ d ( self, down _ coord = none ) : # this func needs to be update it with the values in holder class if not down _ coord : down _ coord = self. get _ down _ coord ( ) pos = down _ coord * self. gridsize + self. center _ pos [ 1 ] if self. y2 - pos > self. gridsize : pass else : self. state = self. state...
[ -0.08572753518819809, -0.18119822442531586, 0.8388404846191406, 0.22873008251190186, -1.129386305809021, 0.6127176880836487, 0.5812324285507202, -0.1604057103395462, 0.07423911988735199, -0.358670175075531, 0.17666250467300415, -0.30517393350601196, -0.0059852502308785915, 0.04584074765443...
def conv3x3 ( in _ planes, out _ planes, stride = 1 ) : return nn. conv2d ( in _ planes, out _ planes, kernel _ size = 3, stride = stride, padding = 1, bias = false )
[ 0.9446840286254883, -0.03730257228016853, 0.3336145579814911, 0.19440624117851257, -1.2206488847732544, 1.280963659286499, -1.3977582454681396, -0.0411563441157341, -0.4501476287841797, 0.608845591545105, -0.20295453071594238, 0.006514042615890503, -0.17177630960941315, -1.4275084733963013...
def is _ smartobject ( obj ) : return hasattr ( obj,'is _ active')
[ 0.07955560833215714, -0.7793624997138977, 0.49911966919898987, 0.933494508266449, -0.327391117811203, -0.16488021612167358, 0.44587624073028564, -0.34696826338768005, 1.5861930847167969, -0.1130879670381546, -1.0523673295974731, -0.20103806257247925, 0.4034481942653656, -0.3940794467926025...
def requires _ package ( * packages ) : def has _ package ( package ) : try : _ _ import _ _ ( package ) return true except importerror : return false marks = [ pytest. mark. skipif ( not has _ package ( package ), reason = f " cannot import'{ package }'" ) for package in packages ] def wrapper ( func ) : for mark in m...
[ -0.3391079902648926, 0.7371894121170044, 0.653785765171051, 0.6579660773277283, 0.44438818097114563, 0.27100110054016113, 0.5312857031822205, -0.043327540159225464, 0.4963783025741577, -0.0808519795536995, -0.4584506154060364, -0.8407751321792603, 0.5049738883972168, 0.03712114319205284, ...
def _ _ init _ _ ( cls, name, bases, attrs ) : basemeta. _ _ init _ _ ( cls, name, bases, attrs ) for t in cls. _ control _ types : atspimeta. control _ type _ to _ cls [ t ] = cls
[ 0.05563550442457199, -0.22668197751045227, 0.4743187129497528, 0.1079774871468544, 0.9007256031036377, 0.05565221980214119, -0.18176878988742828, -0.5555331110954285, 0.287830650806427, 0.4418497681617737, -0.8345435261726379, -0.03695766255259514, 0.5045992732048035, -0.16653740406036377,...
def decode ( infile, outpath, resonly = false, verbose = false ) : if not hasattr ( infile,'read') : if isinstance ( infile, carbon. file. alias ) : infile = infile. resolvealias ( ) [ 0 ] if isinstance ( infile, ( carbon. file. fsspec, carbon. file. fsref ) ) : infile = infile. as _ pathname ( ) infile = open ( infile...
[ 0.32952237129211426, -0.25224626064300537, 0.7956639528274536, 0.7159096598625183, -0.3334064781665802, 0.39056214690208435, -0.09504663944244385, 1.0378477573394775, -0.22901269793510437, -0.2365572154521942, 0.130140483379364, -0.026286374777555466, -0.35498201847076416, -0.7262442708015...
def attrvalueei ( self, * args ) : return _ snap. tneanetmp _ attrvalueei ( self, * args )
[ 0.08743741363286972, -0.37833312153816223, 0.048334334045648575, 0.14098139107227325, 1.1612008810043335, 0.31235840916633606, 0.49629849195480347, 0.7669123411178589, -1.3543219566345215, 0.30286455154418945, -0.08523165434598923, -0.778831422328949, 0.24614040553569794, 1.209982752799987...
def getmatches ( self, identifier, column ) : return [ row for row in self. database if row [ column ] = = identifier ]
[ -0.30953526496887207, -0.3082771301269531, 0.39128899574279785, 0.9638354182243347, -0.2121964693069458, -0.010523305274546146, -0.39709171652793884, 0.9636542201042175, 0.04394889622926712, 0.3341730237007141, -0.8230406641960144, -0.4891323745250702, -0.3289565443992615, -0.3238035440444...
def init _ image _ processor ( feature _ extractor _ name ) : module _ path = tfhub _ modules. get ( feature _ extractor _ name ) if module _ path is none : return none return tf _ image _ processor. tfimageprocessor ( tf _ hub _ module _ path = module _ path )
[ -0.053810495883226395, -0.19123601913452148, 0.3045380413532257, -0.1540519893169403, 0.1856924146413803, -1.1111823320388794, 0.09228657931089401, 0.44947877526283264, 0.10063778609037399, 0.5048636794090271, -0.4799047112464905, -0.36619657278060913, 0.14201250672340393, 0.68712830543518...
def ehlo ( self, name ='' ) : self. esmtp _ features = { } self. putcmd ( self. ehlo _ msg, name or self. local _ hostname ) ( code, msg ) = self. getreply ( ) # according to rfc1869 some ( badly written ) # mta's will disconnect on an ehlo. toss an exception if # that happens - ddm if code = = - 1 and len ( msg ) = = ...
[ -0.8269420862197876, -0.10165522247552872, 0.8326814770698547, -0.27492719888687134, -0.6163389682769775, -0.9821930527687073, -0.21887341141700745, 0.11915147304534912, 0.10285167396068573, 0.8670123219490051, -0.7777161598205566, 0.14225545525550842, 0.2527841031551361, 0.385081797838211...
def test _ in _ local ( ) : pytest. debug _ func ( ) tz _ orig = nldt. moment. default _ tz ('clear') fixed = nldt. moment ( 1000000000 ) # payload - - verify default input timezone result = nldt. moment ( fixed ( " % f % t ", otz ='local') ) nldt. moment. default _ tz ( tz _ orig ) assert result. epoch ( ) = = 1000000...
[ 0.41046202182769775, 0.4082278907299042, 0.23767642676830292, 0.041216883808374405, 0.33984336256980896, 0.4778815805912018, -0.1292596012353897, -0.21572236716747284, 0.03397528454661369, 0.2958616614341736, -0.9280790090560913, -0.052185505628585815, -0.4957580268383026, 0.95248681306838...
def _ _ init _ _ ( self, zobj, stop _ event, queue, parent = none ) : qtcore. qthread. _ _ init _ _ ( self, parent ) self. zobj = none self. stop _ ev = stop _ event self. queue = queue
[ 0.8156706094741821, -0.9684960842132568, 0.6764079332351685, 0.4758374094963074, -0.18004059791564941, -0.02245212346315384, 0.32011526823043823, 0.11982226371765137, 0.25634586811065674, -0.596227765083313, -1.136301040649414, -0.1654578149318695, 0.11952534317970276, 0.16424670815467834,...
def calculate _ capture ( filters, signals, domain = 1. 0, trapz = true, ) : filters = np. asarray ( filters ) signals = np. asarray ( signals ) # broadcasting rules when arrays were passed if ( filters. ndim > 1 ) and ( signals. ndim > 1 ) : filters = filters [..., none, :, : ] signals = signals [..., :, none, : ] if ...
[ -0.008685830049216747, 0.7013788223266602, 0.7992540597915649, 0.6827630996704102, -0.3074833154678345, -0.2864671051502228, 0.6913118958473206, -0.10758458822965622, 0.7076963782310486, 0.4014378786087036, 0.4647485911846161, 0.7090021967887878, 0.21135610342025757, 0.5433616638183594, ...
def ttransl ( d ) : t = np. eye ( 4 ) t [ 0, 3 ] = d [ 0 ] t [ 1, 3 ] = d [ 1 ] t [ 2, 3 ] = d [ 2 ] return t
[ -0.6268987655639648, 0.7280623316764832, 0.7446272373199463, -1.4166829586029053, 0.16529954969882965, -0.5162005424499512, -0.16243210434913635, -0.4453698992729187, 0.8007616400718689, 0.9738280177116394, -0.8557378649711609, -0.9026733040809631, 0.13987775146961212, -1.684830665588379, ...
async def process _ callback _ btn _ done ( callback _ query : types. callbackquery ) : await handler _ done _ reminder ( callback _ query = callback _ query, bot = bot )
[ -0.26848989725112915, -0.130562424659729, 0.2624039351940155, -0.05431119725108147, 0.46928465366363525, 0.2765810191631317, -0.0017399340867996216, -0.5016393065452576, 1.1424981355667114, -0.019243134185671806, -0.5894656181335449, 0.4192102253437042, -0.6847220063209534, 0.9372079968452...
def to _ array ( field ) - > list : if not field : return [ none ] matrix = [ [ 0 for x in range ( 10 ) ] for y in range ( 10 ) ] p = 0 for i in range ( 10 ) : for j in range ( 10 ) : matrix [ i ] [ j ] = field [ p ] p + = 1 return matrix
[ -0.8487206697463989, -0.3621072471141815, 0.5623708963394165, -0.9600411653518677, 1.6553152799606323, -0.6179724931716919, 0.29496529698371887, 0.6122147440910339, 0.541871190071106, 0.861944317817688, -1.2446303367614746, 0.13387446105480194, -0.27431678771972656, 0.1137339323759079, 0...
def uploadfile ( input _ file, index _ col = none, skiprows = none ) : df = pd. read _ excel ( input _ file, index _ col = index _ col, skiprows = skiprows ) return df
[ 0.04065651819109917, 0.9646819829940796, 0.4788428544998169, 0.5189096331596375, 0.2423996776342392, 0.3642783463001251, 0.6182692050933838, 0.41406145691871643, -1.231623888015747, -0.08342286944389343, 0.7146607041358948, 0.24289128184318542, -0.3967067301273346, -1.4799585342407227, 0...
def prep _ data ( met _ dset, prof _ dset, params ) : import warnings # create new time vector with time step dt _ d # time _ vec = np. arange ( met _ dset ['time'] [ 0 ], met _ dset ['time'] [ - 1 ] + params ['dt _ d'], params ['dt _ d'] ) time _ vec = np. arange ( met _ dset ['time'] [ 0 ], met _ dset ['time'] [ - 1 ...
[ -0.15452812612056732, 0.401371031999588, 0.8555198311805725, -0.5909287333488464, 0.30414503812789917, 0.646070122718811, 0.27248433232307434, 0.23291677236557007, -0.9180378913879395, -0.040727950632572174, 0.5206191539764404, 0.5174691081047058, 0.48555704951286316, 1.2559747695922852, ...
def getpsmecasm ( self ) : # get location x, y, depth = self. c [ 0 ], self. c [ 1 ], self. c [ 2 ] # get exponent exp = np. round ( log10 ( self. norm ) ) # get remaining factor fac = self. norm / 10 * * exp # get tensor components, r = up, t = south, f = east mrr, mtt, mff = self. mhat [ 0 ], self. mhat [ 1 ], self. ...
[ 0.23083525896072388, -0.7256577014923096, 0.7705844044685364, -1.018445372581482, -0.5628820657730103, -0.15465953946113586, 0.41360732913017273, -0.17952151596546173, -0.238774374127388, -0.23807916045188904, 0.18303360044956207, -0.16380295157432556, -0.1732109636068344, -0.3001566529273...
def generate _ server _ uuid ( input _ string ) : s = hashlib. sha256 ( ) data = ( input _ string + salt ). encode ( " utf - 8 " ) s. update ( data ) server _ uuid = s. hexdigest ( ) return server _ uuid
[ -0.3993033468723297, -0.5801597833633423, 0.5145459175109863, -0.7359587550163269, -0.05897332727909088, 1.3777905702590942, -0.09017226099967957, 0.9522608518600464, 0.8080831170082092, 0.3435479402542114, -0.7232254147529602, 0.5827494263648987, -0.9362229704856873, -0.09840819239616394,...
def test _ cannot _ be _ attached _ to _ non _ model _ form ( self ) : form = omniform ( title ='test form') form. save ( ) handler = omniformsaveinstancehandler ( name ='save instance ', order = 0, form = form ) with self. assertraises ( validationerror ) as cm : handler. clean ( ) self. assertequal ( cm. exception. m...
[ -0.20639322698116302, -0.23993928730487823, 0.5274592041969299, 0.43666326999664307, -0.449381023645401, 1.0869888067245483, 0.22685380280017853, -0.24467970430850983, 0.13120058178901672, -0.1957208514213562, -0.9708065390586853, -0.2622562050819397, -0.25501886010169983, 1.25750398635864...
def create _ instance ( self, instance _ key, instance _ name, wait = true ) : future _ resp = self. client. _ perform _ json ( " post ", " / apps / % s / instances " % self. app _ id, body = { " targetprojectkey " : instance _ key, " targetprojectname " : instance _ name } ) future = dssfuture ( self. client, future _...
[ 0.2635349631309509, 0.5529227256774902, 0.3559935390949249, -0.30674508213996887, -0.6875642538070679, 0.45563265681266785, -0.49315962195396423, 1.0778577327728271, -0.6557692289352417, -0.2086723893880844, -0.42819634079933167, -0.12390783429145813, -0.3982442319393158, -0.15371367335319...
def disable _ static _ webserver ( monkeypatch ) - > callable : async def _ mocked _ index _ html ( request : web. request ) - > web. response : " " " emulates the reply of the'/'path when the static - webserver is disabled " " " html = textwrap. dedent ( " " " \ <! doctype html > < html > < body > < h1 > osparc - simc...
[ -0.4658519923686981, -0.4989682734012604, 0.5763549208641052, 0.3249800205230713, -0.3647531270980835, 0.4996889531612396, 1.1617777347564697, 0.35198989510536194, 0.7623018026351929, 0.5841881036758423, -0.5176874399185181, 0.757377564907074, -0.5870086550712585, 0.3869853615760803, 0.1...
def testgetbucketacls ( self, mock _ gcs _ api ) : api _ acl _ object = mock _ gcs _ api. return _ value. bucketaccesscontrols. return _ value. list api _ acl _ object. return _ value. execute. return _ value = mock _ gcs _ bucket _ acls api _ iam _ object = mock _ gcs _ api. return _ value. buckets. return _ value. ge...
[ -0.21289968490600586, 0.16257496178150177, 0.7573901414871216, 0.17880702018737793, 0.8485792875289917, -0.17305608093738556, 0.2901884615421295, -0.8456849455833435, -0.18069536983966827, -0.3575637638568878, -0.1506062000989914, 0.22647397220134735, 0.6624588966369629, -0.833825707435607...
def gentree _ pneanet ( * args ) : return _ snap. gentree _ pneanet ( * args )
[ -1.7477277517318726, 0.8127341866493225, 0.6836385726928711, 0.04489731416106224, 0.06435184925794601, 1.0268083810806274, -0.5608714818954468, -0.3076005280017853, -1.2795673608779907, -0.9277323484420776, -0.7667196989059448, -1.0281919240951538, -0.5947783589363098, 0.7000812888145447, ...
def get _ inbox ( self, limit = 5, filter = none ) : self. mail. select ( constants. imaplib _ inbox ) status _ code, indexs = self. mail. search ( none, constants. imaplib _ all ) indexs = indexs [ 0 ]. split ( ) messages = [ ] for index _ iter, index in enumerate ( indexs ) : if index _ iter = = limit : break status ...
[ -0.961911678314209, -0.008452847599983215, 0.5979149341583252, 0.09275790303945541, 0.07646714895963669, -0.8054903149604797, -0.30347225069999695, 0.029878899455070496, 0.15238243341445923, -0.5472855567932129, -0.06001323461532593, 1.486100196838379, -0.9726471900939941, -0.7492170929908...
def test _ would _ schedule _ weekly _ update _ next _ run ( self, app _ setup _ to _ add _ job, freeze _ datetime ) : freeze _ datetime. freeze ( self. start _ time _ beautifully ) schedule = models. schedule ( schedule _ type = constants. schedule _ weekly, start _ time = self. start _ time _ ugly, * * self. active _...
[ -0.3075842261314392, 0.4590624272823334, 0.6664050817489624, -0.4283009469509125, -0.2787911295890808, 0.16001847386360168, 0.11638972163200378, -0.8400653004646301, 0.18294376134872437, -0.046769533306360245, -0.25301873683929443, 0.25959184765815735, 0.20000198483467102, -0.0959476083517...
def alignment _ slit ( self ) : return self. bitmask. flagged ( self. mask,'align')
[ -0.1456679403781891, -0.2032528966665268, 0.4160868227481842, 0.14491736888885498, -0.3059726059436798, 0.7479085326194763, 0.534850537776947, -0.15606433153152466, 0.502286970615387, 0.0781889483332634, 1.1102077960968018, 0.3868396580219269, -0.5601358413696289, 0.49125590920448303, -1...
def name _ get ( self, cr, uid, ids, context = none ) : if not len ( ids ) : return [ ] res = [ ] for record in self. browse ( cr, uid, ids, context = context ) : name = record. vehicle _ category. name +'-'+ record. vehicle _ place. name +'-'if record. degree _ id : name + = record. degree _ id. name +'-'name + = reco...
[ -1.494438886642456, -0.8559392094612122, 0.606315016746521, -0.39926889538764954, -0.09285495430231094, -0.7006569504737854, -0.8925197124481201, -0.2899053990840912, 0.07767703384160995, 1.4041272401809692, -0.4245256781578064, -0.35831397771835327, 0.319343239068985, 0.20129574835300446,...
def score _ task ( self, x, y, t = 0, metric = " accuracy ", verbose = true, * * kwargs ) : y = self. _ to _ numpy ( y ) y _ tp = self. predict _ task ( x, t = t, * * kwargs ) probs = self. predict _ proba ( x ) [ t ] score = metric _ score ( y [ t ], y _ tp, metric, ignore _ in _ gold = [ 0 ], probs = probs, * * kwarg...
[ 0.1724633276462555, 0.3666434586048126, 0.5984989404678345, 0.7732898592948914, -0.1385427564382553, 0.5733439326286316, -0.16567516326904297, -0.8537966012954712, -1.569678783416748, 1.4896912574768066, 0.09999441355466843, 0.4885660409927368, 0.6556823253631592, -0.2208123803138733, -0...