text
stringlengths
25
2.19k
embedding
listlengths
768
768
def teardown ( ) : train _ dir = join ( _ my _ dir,'train') test _ dir = join ( _ my _ dir,'test') output _ dir = join ( _ my _ dir,'output') config _ dir = join ( _ my _ dir,'configs') for suffix in ['learning _ curve ','summary'] : if exists ( join ( train _ dir,'test _ { }. jsonlines '. format ( suffix ) ) ) : os. u...
[ 0.27033913135528564, -0.7357000112533569, 0.7464478015899658, -0.16776211559772491, -0.058454226702451706, -0.022681940346956253, 1.2995095252990723, 0.09252768754959106, -0.12706615030765533, -0.024608949199318886, 0.14814803004264832, -0.011552330106496811, 0.28230637311935425, 0.2924679...
def upgrade _ plugin _ scale ( self ) : self. show _ step ( 1 ) self. env. revert _ snapshot ( self. snapshot _ name ) self. show _ step ( 2 ) cluster _ id = self. fuel _ web. get _ last _ created _ cluster ( ) slave _ name = " slave - 0 { } ". format ( len ( self. fuel _ web. client. list _ nodes ( ) ) + 1 ) self. env...
[ -0.5565339922904968, -0.8275904059410095, 0.5660786032676697, 0.15108291804790497, 0.9474503397941589, -1.2904348373413086, 0.2846476435661316, 0.06362085789442062, -0.573974072933197, 0.8860613703727722, -0.7129917740821838, 0.7682361602783203, -0.2722051441669464, 0.058222804218530655, ...
def show _ users ( ) : cid = session ['c _ id'] status, info = user. get _ user _ by _ cid ( cid ) ret = { " data " : [ ], " status " : status, " msg " : " " } d = {'root': u " ",'admin': u " ",'user': u " " } if status = = " success " : _ = [ ret ['data']. append ( {'u _ id': i [ 0 ],'u _ name': i [ 1 ], " u _ role " ...
[ -0.06479499489068985, -0.16763173043727875, 0.6998632550239563, -0.13968990743160248, -0.31661102175712585, -0.18328514695167542, 0.23107460141181946, -0.45157620310783386, -0.17605742812156677, 0.3621560335159302, -0.6491926908493042, 0.20856456458568573, -0.06190544739365578, 0.671964824...
def get _ wceff _ fccc _ std ( wc _ obj, par, qiqj, lep, nu, mqi, scale, nf = 5 ) : qqlnu = qiqj + lep +'nu'+ nu wc = wc _ obj. get _ wc ( qqlnu, scale, par, nf _ out = nf ) if lep = = nu : c _ sm = get _ cvlsm ( par, scale, nf ) else : c _ sm = 0 # sm contribution only for neutrino flavor = lepton flavor c = { } c ['v...
[ 0.42852890491485596, -0.3387088477611542, 0.45892781019210815, -0.832450807094574, -0.015732135623693466, -0.18179847300052643, -0.16822536289691925, 0.1226242408156395, -0.5731679797172546, 0.1646677404642105, -0.8022975325584412, 0.2536587119102478, 0.07615825533866882, 0.887458443641662...
def haversine ( ra1, dec1, ra2, dec2, radius = 1 ) : # convert all necessary input parameters to radians rad _ ra1 = np. pi * ra1 / 180 rad _ ra2 = np. pi * ra2 / 180 rad _ dec1 = np. pi * dec1 / 180 rad _ dec2 = np. pi * dec2 / 180 delta _ ra = abs ( rad _ ra2 - rad _ ra1 ) delta _ dec = abs ( rad _ dec2 - rad _ dec1 ...
[ 0.4542512595653534, -0.4532201588153839, 1.079306721687317, -1.0237632989883423, -0.3134145438671112, -0.038855522871017456, -0.5548650026321411, -0.15808749198913574, -1.4520678520202637, -0.4090301990509033, 0.004232447128742933, 0.565792977809906, -0.29920172691345215, -0.53734797239303...
def test _ requesting _ free _ class ( self ) : event = baker. make _ recipe ('booking. future _ ev ', cost = 10 ) booking = baker. make _ recipe ('booking. booking ', user = self. user, event = event, paid = false ) bookings = booking. objects. filter ( user = self. user ) self. assertequal ( bookings. count ( ), 1 ) ...
[ -0.5189645290374756, 1.1654690504074097, 0.7282541990280151, 0.9400226473808289, -0.44846776127815247, 0.34084272384643555, 0.018744992092251778, -0.2941887080669403, 0.10107865184545517, -1.3575465679168701, -0.5668865442276001, -0.2537534832954407, 0.04351549968123436, 0.4079776406288147...
def call ( self, pxo, training ) : point, feat, row _ splits = pxo # ( n, 3 ), ( n, c ), ( b ) identity = feat feat = self. relu ( self. bn1 ( self. linear1 ( feat ), training = training ) ) feat = self. relu ( self. bn2 ( self. transformer2 ( [ point, feat, row _ splits ], training = training ), training = training ) ...
[ 0.191475048661232, 0.28799813985824585, 0.53361976146698, 0.9696316719055176, -0.2537027895450592, 0.368602991104126, -0.5753729939460754, 0.4982079863548279, -0.03742891177535057, -0.3131290376186371, -1.1130986213684082, -0.4745104908943176, 0.5759843587875366, -0.3907765746116638, -0....
def test _ duplicate _ event _ booking ( self ) : event = baker. make _ recipe ('booking. future _ ev') resp = self. _ get _ duplicate _ booking ( self. user, event ) self. assertin ( event. name, str ( resp. content ) ) poleclass = baker. make _ recipe ('booking. future _ pc') resp = self. _ get _ duplicate _ booking ...
[ -0.6004376411437988, 0.6136367321014404, 0.6312785744667053, 1.3881531953811646, -0.44675424695014954, 0.7750008702278137, -0.06157743185758591, 0.4986678957939148, -0.17364554107189178, 0.15212678909301758, -0.7923487424850464, -0.38546472787857056, 0.1281438171863556, 0.4081140458583832,...
def draw _ waves ( y, n, fi ) : l = screen _ width / n # a length of one wave. r = l / ( 2 * np. sin ( fi / 2 * np. pi / 180 ) ) for i in range ( int ( n ) + 1 ) : if i % 2 = = 0 : circle ( screen, yellow, [ int ( i * l + l / 2 ), int ( y + r * np. cos ( fi / 2 * np. pi / 180 ) ) ], int ( r ) ) else : circle ( screen, ...
[ -0.3786715865135193, 0.9708659648895264, 0.6118512749671936, -1.1319997310638428, 0.43893519043922424, 0.1186424046754837, 0.3255051374435425, -1.073428988456726, 0.6904453635215759, -0.852541983127594, -0.19328325986862183, 0.19554480910301208, 0.10738474130630493, 1.0010128021240234, 0...
def _ _ init _ _ ( self, hass, bridge, name, token, friendly _ name, pin ) : self. name = name self. hass = hass self. unique _ id = bridge. uuid. hex ( ) self. comfoconnect = comfoconnect ( bridge = bridge, local _ uuid = bytes. fromhex ( token ), local _ devicename = friendly _ name, pin = pin, ) self. comfoconnect. ...
[ 0.9030646681785583, -0.14962057769298553, 0.3993667960166931, 0.3125016391277313, 0.2826749384403229, 0.29819512367248535, -0.3153667151927948, 0.3305623233318329, 0.484033465385437, -0.019989939406514168, -0.6885872483253479, -0.7842230200767517, -0.15197895467281342, 0.3317285180091858, ...
def save _ matfile ( self, filepath ) : # write time - dependent internal field model to matfile self. model _ tdep. save _ matfile ( filepath ) if self. coeffs _ delta : # write time - dependent external field model to matfile q10 = self. coeffs _ delta ['q10']. reshape ( ( - 1, 1 ) ) q11 = np. ravel ( self. coeffs _ ...
[ 0.02924533747136593, -0.05148898810148239, 0.8627777695655823, -0.6076186895370483, 0.2057303637266159, 1.1347119808197021, 0.3948825001716614, 0.04458898678421974, -0.38885971903800964, 0.5570031404495239, -0.9027529954910278, -0.9495830535888672, 0.38664260506629944, 0.6499155163764954, ...
def get _ virtualmachines ( self, uuid = none, market ='market ', * * kwargs ) : return self. get _ entities ('virtualmachine ', uuid = uuid, market = market, * * kwargs )
[ -0.8927648663520813, 0.727575957775116, -0.010481435805559158, 0.6822636723518372, 1.16779363155365, -0.2351616621017456, -1.087427020072937, 0.0020943901035934687, -0.17258764803409576, 0.44982314109802246, 0.20162615180015564, 0.5397583246231079, -0.7583049535751343, -0.6335036754608154,...
def fixture _ balsamic _ observations _ input _ files _ raw ( case _ id : str, filled _ file : path ) - > dict : return { " snv _ germline _ vcf _ path " : filled _ file, " snv _ vcf _ path " : filled _ file, " sv _ germline _ vcf _ path " : filled _ file, " sv _ vcf _ path " : filled _ file, }
[ 0.2504863739013672, 0.10688823461532593, 0.31892240047454834, -0.37457993626594543, 0.20591169595718384, 0.150697723031044, 0.2715092599391937, 0.17386394739151, -0.5259273052215576, 0.12370286881923676, -0.5279228091239929, -0.1900487095117569, 0.8153271675109863, -0.4773464500904083, -...
def to _ dict ( self ) : raise notimplementederror
[ -0.5766146779060364, -0.8596600890159607, 0.3426606357097626, -0.6696265339851379, -0.5598337650299072, 0.18674463033676147, 0.19953684508800507, -0.13196100294589996, -0.13850091397762299, -0.2263948619365692, -0.6741719245910645, 0.1612248718738556, 0.6530718803405762, 0.6950256824493408...
def egress _ only _ gateway _ id ( self ) - > optional [ pulumi. input [ str ] ] : return pulumi. get ( self, " egress _ only _ gateway _ id " )
[ 1.2716491222381592, 0.6934647560119629, 0.5806416273117065, 0.21896249055862427, 0.1999558061361313, 0.5166231393814087, -0.00702574523165822, 0.6500250101089478, 1.272964358329773, 0.5680908560752869, 0.2359643280506134, 1.1892011165618896, -0.5388846397399902, 1.2532103061676025, -1.06...
def native _ value ( self ) - > float : return self. entity _ description. native _ value _ fn ( self. actuator )
[ 0.4620690643787384, -0.10821492224931717, 0.2306201010942459, 0.4728209376335144, 0.23288461565971375, -0.06713699549436569, 0.19928421080112457, -0.10757987946271896, -0.8424127697944641, -0.2873997986316681, 0.8494388461112976, 1.054457426071167, 0.5961203575134277, 0.06861641258001328, ...
def _ _ setecolicarbonsourceuptake ( self, carbonsource, carbonuptakerate ) : carbonsource = carbonsource. lower ( ) if carbonsource in'glucose': uptakerxns = ['ex _ glc _ _ d _ e _ reverse'] elif carbonsource in'acetate': uptakerxns = ['ex _ ac _ e _ reverse'] elif carbonsource in'glycerate': uptakerxns = ['ex _ glyc ...
[ -0.40483373403549194, -0.22068209946155548, 0.7341288328170776, -0.5079725980758667, 0.2904280722141266, -0.44752973318099976, -0.44392135739326477, 0.9950661063194275, -0.5286908745765686, 0.4125683605670929, -0.7017635703086853, 0.35464558005332947, 0.2957741916179657, -0.338719457387924...
def rate ( framespersecond = 30 ) : # # xxx this is totally wrong, should be tracking last - frame - start # # and deciding how to delay based on that : ( time. sleep ( 1. 0 / framespersecond ) if scene and scene. _ context : scene. _ context. triggerredraw ( 1 )
[ 0.1213643029332161, 0.746070146560669, 0.6830502152442932, -0.04800666496157646, -0.13496550917625427, -0.46436718106269836, -0.4566470682621002, -0.8077094554901123, 0.9882030487060547, -1.1355900764465332, 0.806225061416626, -0.17774276435375214, -0.6127598285675049, 0.7534869313240051, ...
def _ _ init _ _ ( self, device, num, * args, * * kwargs ) : # calls _ _ init _ _ from the abstractsubdevice class it inherets from abstractsubdevice. _ _ init _ _ ( self, device, * args, * * kwargs ) self. num = num
[ 0.6551385521888733, 0.6471683979034424, 0.621972382068634, 1.0729502439498901, -0.6111332178115845, 0.7985786199569702, 0.3936742842197418, -0.049476392567157745, 0.141992449760437, -0.9557322263717651, -0.21213464438915253, 0.9145721197128296, 0.5661396384239197, 0.3942703902721405, 0.8...
def cut ( value, arg ) : return value. replace ( arg,'' )
[ 0.45016923546791077, -0.4523431360721588, 0.2724404036998749, -0.8694947957992554, -0.5321457982063293, 0.5193080902099609, -0.48473304510116577, 0.6696268320083618, 0.2152051031589508, 1.2388439178466797, -0.11419600248336792, 0.6560453176498413, 0.0807974636554718, -0.5280740857124329, ...
def get _ backoff _ time ( self, settings ) : random _ generator = random. random ( ) backoff = self. initial _ backoff + ( 0 if settings ['count'] = = 0 else pow ( self. increment _ base, settings ['count'] ) ) random _ range _ start = backoff - self. random _ jitter _ range if backoff > self. random _ jitter _ range ...
[ -0.2395922690629959, 0.22809211909770966, 0.5731719732284546, -0.5511048436164856, 0.016141429543495178, 0.042114268988370895, 0.09532354027032852, -0.43856796622276306, -0.22501006722450256, 0.8505921363830566, -0.2025904357433319, -0.5680850148200989, -1.0215682983398438, -0.404655933380...
def conv _ model ( ) : input = input ( shape = ( 28, 28, 1 ) ) x = conv2d ( 32, ( 3, 3 ), activation ='relu') ( input ) x = maxpool2d ( ) ( x ) x = conv2d ( 64, ( 3, 3 ), activation ='relu') ( x ) x = maxpool2d ( ) ( x ) x = dropout ( 0. 5 ) ( x ) x = flatten ( ) ( x ) x = dense ( 128, activation ='relu') ( x ) output ...
[ -0.21623089909553528, -0.4454191327095032, 0.5262709856033325, 0.2900710999965668, -0.47271728515625, 0.6202741265296936, -0.35430577397346497, -0.052844900637865067, 0.4441375732421875, 0.19174601137638092, -0.5369712114334106, -0.06200552359223366, 0.8685853481292725, -0.66827392578125, ...
def compare _ grad ( a, b ) : return relerr ( a, b ), corr ( a, b )
[ 0.15783779323101044, -0.7208175659179688, 0.4997512698173523, -1.0775692462921143, 0.23706822097301483, 0.03471407666802406, -0.2833261787891388, -0.40868261456489563, -0.899649441242218, 0.28095534443855286, 0.5110573768615723, 0.6717963814735413, -0.6439298987388611, -0.20983968675136566...
def ve _ step ( ppm, data, mask, mu, sigma, prior, alpha = 1., beta = 0. 0 ) : lik = np. zeros ( np. shape ( prior ) ) for i in range ( ntissues ) : lik [ :, i ] = prior [ :, i ] * gaussian ( data, mu [ i ], sigma [ i ] ) # normalize x, y, z = mask ppm [ x, y, z ] = lik if beta = = 0. 0 : ppm _ sum = ppm [ mask ]. sum ...
[ 0.44056567549705505, -0.31704312562942505, 0.642130970954895, -0.22719986736774445, 0.08844923228025436, -0.14154742658138275, 0.09384891390800476, 0.6681051254272461, -0.21703699231147766, -0.3085149824619293, 0.2563634514808655, 0.02969476208090782, -1.1831378936767578, 0.111591950058937...
def wait _ until ( self, by, path, * args ) : try : wait = webdriverwait ( self. driver, 10 ) if self. config [ " until " ] = = " click " : _ = wait. until ( ec. element _ to _ be _ clickable ( ( by, path ) ) ) if self. config [ " until " ] = = " present " : _ = wait. until ( ec. presence _ of _ element _ located ( ( b...
[ -0.9487585425376892, -0.40700089931488037, 0.8588206768035889, -0.4510152339935303, 0.02975928969681263, 0.289314866065979, -0.01612931303679943, -0.38241297006607056, -0.31700772047042847, 0.3127700388431549, -1.044894814491272, -0.3107815682888031, -0.14060437679290771, -0.13659682869911...
def stop ( self ) : self. quit ( )
[ -0.19576548039913177, -0.9880393743515015, 0.03526555374264717, -0.31223398447036743, 0.628285825252533, 1.4619404077529907, 0.8196545243263245, -0.13205116987228394, -1.2253119945526123, -0.28179091215133667, 0.28861889243125916, 0.4736250042915344, -0.5973227024078369, 0.0249081905931234...
def linelist _ update ( self, val ) : val = int ( val ) self. _ slidell. label. set _ text ( " { 0 :. 4f } ". format ( self. _ lines [ val ] ) ) self. _ slideval = val
[ -0.7524048686027527, -1.1266579627990723, 0.5303639769554138, -0.7111503481864929, -0.518378496170044, 0.8731551766395569, -0.6565322875976562, -0.33564290404319763, 0.1577005535364151, 0.43631628155708313, -0.6075384020805359, -0.20567937195301056, 0.4473516345024109, 1.0293439626693726, ...
def add2 ( ) : @ register _ verb ( int, context = context. eval ) def add ( a : int, b : int ) : return a + b return add
[ -0.2982860803604126, -0.5537386536598206, 0.6365469098091125, -0.13198353350162506, -0.19483529031276703, -0.700239896774292, -0.3382234573364258, -0.6423073410987854, 0.34094735980033875, -0.33494803309440613, -0.015815382823348045, 1.3158599138259888, 0.5326572060585022, -0.0636560916900...
def _ get _ coarse _ and _ intervals ( xdiv ) : xcoarse = [ xdiv [ 0 ] ] xsteps = list ( ) dx = xdiv [ 1 ] - xdiv [ 0 ] oldx = xdiv [ 1 ] cnt = 1 for x in xdiv [ 2 : ] : if round ( dx, 5 )! = round ( x - oldx, 5 ) : xcoarse. append ( oldx ) xsteps. append ( cnt ) cnt = 1 dx = x - oldx else : cnt + = 1 oldx = x xcoarse....
[ -0.46231770515441895, -0.22899210453033447, 0.41859710216522217, 0.3643636405467987, -0.026075445115566254, -0.3109351694583893, 0.1164940670132637, -0.567378580570221, -0.034742001444101334, 0.06139789894223213, -0.8088318109512329, -0.013255149126052856, -0.18354874849319458, 1.158306598...
def get _ stock _ news ( stockname ) : all _ news = [ ] query _ url = " https : / / feeds. finance. yahoo. com / rss / 2. 0 / headline? s = { } & region = us & lang = en - us " res = requests. get ( query _ url. format ( stockname ) ) tree = elementtree. fromstring ( res. content ) for child in tree. iter ('item') : ne...
[ -0.4880482852458954, -0.10477028787136078, 0.6448447704315186, -0.0016040279297158122, 0.2382739633321762, -0.6589871644973755, -1.5161352157592773, -0.2795045077800751, -0.32718244194984436, -0.18719114363193512, -1.377319574356079, 0.4410923421382904, 0.3202585279941559, 1.27619349956512...
async def get _ payloadtype ( self, payload _ type : union [ payloadtype, dict ] ) - > mythicresponse : url = " { } { } : { } / api / v { } / payloadtypes / { } ". format ( self. _ http, self. server _ ip, self. _ server _ port, self. _ server _ api _ version, str ( payload _ type. id if isinstance ( payload _ type, pa...
[ -0.6536501049995422, -0.216245636343956, 0.675686240196228, -0.37176817655563354, 0.3508945107460022, -1.235185146331787, -0.9039453268051147, -0.9302880167961121, 0.5008255243301392, 0.19121277332305908, -0.23434355854988098, 0.3585869073867798, -0.263904333114624, 0.5574705600738525, 1...
def test _ company _ jobs ( self ) : job _ post _ 1 = create _ job ( title = " job 1 ", category = job _ category _ choices. design, company = self. test _ company ) job _ post _ 2 = create _ job ( title = " job 2 ", category = job _ category _ choices. design, company = self. test _ company ) response = self. client. ...
[ 0.41207176446914673, 0.6365260481834412, 0.4665931761264801, 0.16703815758228302, 0.8813587427139282, 0.5767331719398499, -0.019976381212472916, -0.05932287871837616, -0.540870189666748, -0.8052757978439331, -0.14195922017097473, -0.05152024328708649, 0.22730575501918793, 0.093412809073925...
def append ( self, item ) : self. client. rpush ( self. key, self. client. encode ( item ) )
[ -0.4936482012271881, 0.535015344619751, 0.23386234045028687, 0.49567538499832153, -0.06808176636695862, 0.8338966965675354, -1.5134384632110596, -0.7817927598953247, 0.625988781452179, 0.8148885369300842, -1.1914010047912598, 0.3182431161403656, -1.1958301067352295, 0.0993122011423111, 0...
def register _ subscription _ plan ( self, plan _ id ) : if self. has _ subscription _ plan ( plan _ id ) : # plan is already registered with this service # = > update it return self. update _ subscription _ plan ( plan _ id ) action = " register subscription plan # % s " % plan _ id error = none s3db = current. s3db d...
[ 0.29330480098724365, 0.27787595987319946, 0.9228862524032593, 0.21229463815689087, -0.029076071456074715, 0.5155122876167297, 0.04329315200448036, -0.9773232340812683, 0.5267983675003052, 0.07915449142456055, -0.7373628616333008, 0.519576370716095, -0.30788522958755493, -0.0407797694206237...
def get _ fmw _ parameters _ pub _ info ( self, repo _ name, fmw _ name, pub _ name ) : return self. job. get _ fmw _ parameters _ pub _ info ( repo _ name, fmw _ name, pub _ name )
[ -0.40054625272750854, -0.3545260727405548, 0.4497552514076233, 0.03454717993736267, -0.5450026988983154, -0.1470073163509369, -1.1919931173324585, -0.4058001935482025, -1.1224162578582764, -0.06771694123744965, -0.06384431570768356, 0.9577810764312744, -0.7210420370101929, 1.21426391601562...
def test _ import _ v1 _ database _ with _ dataset _ multiple ( self ) : contents = { " databases / imported _ database. yaml " : yaml. safe _ dump ( database _ config ), " datasets / imported _ dataset. yaml " : yaml. safe _ dump ( dataset _ config ), " metadata. yaml " : yaml. safe _ dump ( database _ metadata _ conf...
[ -0.17195095121860504, 0.42169326543807983, 0.6535528302192688, 0.0010360177839174867, 0.17608921229839325, 0.4127595126628876, 0.38017258048057556, 0.3942139148712158, 0.006081274710595608, 0.3603062331676483, -0.4457463324069977, 0.6061800718307495, 0.05936724320054054, -0.017505550757050...
def select _ tuple ( self, * keys, * * executor _ config ) : return self. map ( lambda row : tuple ( row [ key ] for key in keys ), * * executor _ config )
[ -1.9362667798995972, 0.5032179355621338, 0.20512144267559052, 0.09424339979887009, 0.15416336059570312, -1.145161747932434, -0.9563609957695007, -0.003738364204764366, -1.0377932786941528, 0.746457576751709, -0.5410547256469727, -0.9002112746238708, 0.4318315088748932, -0.20313477516174316...
def tokenize _ test _ queries ( raw _ q, word2index, padding ='pre') : queries = [ ] for sentence in raw _ q : query = [ ] for word in sentence. split ( ) : wordindex = word2index. get ( word ) if not wordindex : wordindex = word2index ['unknown'] if word! = '?': # questionmark should not be recognized as an unknown wo...
[ -0.09924297779798508, -0.4090542793273926, 0.4423849582672119, -0.5622878670692444, -0.48766088485717773, -0.1016492173075676, -0.13589639961719513, -0.18781442940235138, 0.7727651596069336, 0.05968800187110901, -0.09213851392269135, 0.1193871721625328, 0.051807716488838196, 0.272946685552...
def test _ random _ uniform _ and _ belongs _ vectorization ( self ) : n _ samples = self. n _ samples point = self. beta. random _ point ( n _ samples ) result = self. beta. belongs ( point ) expected = gs. array ( [ true ] * n _ samples ) self. assertallclose ( expected, result )
[ 0.3123723268508911, 0.4588235020637512, 0.3810366094112396, -0.002479491289705038, 1.73493492603302, 1.020006537437439, 0.4873882532119751, -0.66259765625, 0.4738936424255371, -0.48854920268058777, -0.2968844473361969, -0.027012361213564873, -0.7691781520843506, 0.5380046367645264, 0.164...
def initial _ values ( self ) : nrg = 378 naz = 2656 data _ dummy = 1 / np. sqrt ( 2 ) * np. random. rand ( nrg, naz ) + 1j / np. sqrt ( 2 ) * np. random. rand ( nrg, naz ) pol _ dict = {'hh': data _ dummy,'hv': data _ dummy,'vv': data _ dummy } data _ stack _ dict = {'bsl _ 00': pol _ dict,'bsl _ 01': pol _ dict,'bsl ...
[ 0.17035828530788422, -0.014799519442021847, 0.5878881216049194, -0.31115585565567017, 0.13603603839874268, 0.46915194392204285, 0.23027576506137848, -0.1456335037946701, -0.31017372012138367, -0.2823580205440521, -1.6345168352127075, -0.0342060886323452, 0.2524745762348175, 1.4285258054733...
def capacity _ reservation _ id ( self ) - > optional [ pulumi. input [ str ] ] : return pulumi. get ( self, " capacity _ reservation _ id " )
[ 0.8509357571601868, -0.02556479349732399, 0.22930443286895752, 0.3875928521156311, 0.09561168402433395, 0.9613007307052612, -0.07291395962238312, 0.8144775032997131, 0.6532924175262451, 0.5772197842597961, 0.5463120341300964, 0.347133994102478, -0.11727434396743774, -1.375133752822876, 0...
def make _ package ( self, datet : datetime, photos : list, code : str ) - > none : try : record _ event ( code, { " files " : photos, " date " : datet. isoformat ( ) } ) except exception as err : self. logger. error ( " event'{ }'recording error : { } ". format ( code, err ) )
[ -0.920468807220459, 0.5152178406715393, 0.47475558519363403, 0.07275926321744919, 0.21594178676605225, 0.3717641830444336, -0.2525393068790436, 0.24604332447052002, -0.008584046736359596, 0.11025240272283554, -0.7451717257499695, 0.18908976018428802, 0.9911260604858398, 0.5176756978034973,...
def simple _ tokenizer ( text : str, lower : bool = false, newline : str = none ) - > list [ str ] : if lower : text = text. lower ( ) if newline is not none : # replace newline by a token text = text. replace ( " \ n ", " " + newline + " " ) return text. split ( )
[ 0.7026471495628357, -0.22611090540885925, 0.5768958926200867, 0.14402756094932556, -0.8219151496887207, -1.3259786367416382, -1.6151666641235352, 1.4799463748931885, 0.17869816720485687, -0.11348017305135727, -0.789330005645752, -0.4191504418849945, -0.6737309694290161, 0.43682897090911865...
def log _ error ( logger, suppress = true ) : def decorator ( f ) : @ functools. wraps ( f ) def wrapper ( * args, * * kwargs ) : try : return f ( * args, * * kwargs ) except exception as e : logger. error ( e ) if not suppress : raise e return wrapper return decorator
[ -0.36229896545410156, 0.10645948350429535, 0.7871212959289551, 0.013437260873615742, -0.8166505694389343, 0.051384471356868744, -0.5028608441352844, 0.5161056518554688, 0.7595868706703186, 0.5895370244979858, 0.1327705681324005, 0.14208953082561493, 0.5387579202651978, 0.14959901571273804,...
def run _ django ( ) : from gunicorn. app. djangoapp import djangoapplication djangoapplication ( " % prog [ options ] [ settings _ path ] " ). run ( )
[ -0.08376237750053406, 0.08014421910047531, 0.37730467319488525, 0.6789019703865051, 0.9440829157829285, 0.42855140566825867, 0.4924412667751312, -0.507964551448822, -0.9953281283378601, 0.7668237686157227, -0.3034023940563202, 0.6553084850311279, -0.22608189284801483, -0.020641766488552094...
def test _ login _ password _ format ( self, * _ ) : # make sure we're logged out self. open ( base _ url +'/ logout') # open / login self. open ( base _ url +'/ login') # enter in a correct format email and a wrong format password self. type ('# email ','test @ example. com') self. type ('# password ','badpass') # cli...
[ -0.0716070756316185, -0.3820410668849945, 0.6684777736663818, 0.5710717439651489, 0.6190040707588196, 0.4391617476940155, -0.048137448728084564, 0.33419129252433777, 0.2171710580587387, -0.33728134632110596, 0.01202680729329586, 0.5380212068557739, 0.13274931907653809, 0.32681363821029663,...
def replace _ doublequotes ( df ) : df. title = df. title. fillna ('' ). str. replace ('" " ', "'" ) df. abstract = df. abstract. fillna ('' ). str. replace ('" ', "'" ) return df
[ 0.140407532453537, -0.29938337206840515, 0.5883347392082214, -0.958889901638031, -0.2776761054992676, 0.07758905738592148, -0.46272268891334534, 0.6264665722846985, -0.9438906311988831, 0.9466602802276611, -0.20584611594676971, 1.0424280166625977, 0.956642746925354, 1.1252814531326294, 1...
def create _ consec _ absence _ temp _ table ( cursor, temp _ table, source _ table, source _ column, new _ column, grade, source _ schema ='clean') : sql _ create _ agg _ temp = " " " drop table if exists { tmp } ; create temporary table { tmp } as select student _ lookup, sum ( { sc } ) as { nc } from { ss }. { st } ...
[ 0.43005937337875366, 0.06516186147928238, 0.5720349550247192, -0.34577009081840515, -0.3044387996196747, 0.4796608090400696, 1.0867197513580322, 0.5170329213142395, -0.23505084216594696, 1.1057578325271606, -0.28387823700904846, -0.022668803110718727, 0.12302614748477936, 0.546228885650634...
def viewportoff ( func ) : @ wraps ( func ) def wrap ( * args, * * kwargs ) : # turn $ gmainpane off : mel. eval ( " panelayout - e - manage false $ gmainpane " ) # decorator will try / except running the function. # but it will always turn on the viewport at the end. # in case the function failed, it will prevent leav...
[ 0.15939249098300934, -0.06410175561904907, 0.6426339149475098, -0.19505782425403595, -1.5466949939727783, 0.9741998314857483, 0.3551080822944641, 0.062031496316194534, 1.1158591508865356, 0.17375902831554413, 0.6243401765823364, 0.6309958100318909, -0.35093414783477783, 0.0937131941318512,...
def plot _ tweets _ kde _ map ( self, cinema _ run = false ) : # http : / / darribas. org / gds _ scipy16 / ipynb _ md / 06 _ points. html # load data from ordance survey gb = gpd. read _ file ( ".. /.. / projectdata / data / gb / european _ region _ region. shp " ) fig, ax = plt. subplots ( 1, figsize = ( 9, 9 ) ) # r...
[ 0.516395628452301, -0.7007440328598022, 0.7306687831878662, -0.9085901975631714, -0.3845268189907074, 0.5819451808929443, -0.06104113161563873, 0.47063523530960083, -0.038102056831121445, 0.2644113004207611, 0.935687780380249, 0.7502095699310303, 0.7067126631736755, 0.803263783454895, 0....
def test _ not _ match ( self, basic _ logfile ) : matcher = logmatcher ( log _ path = basic _ logfile ) matcher. not _ match ( regex = re. compile ( r " bob " ), timeout = 0. 5 ) matcher. seek ( ) with pytest. raises ( exception ) : matcher. not _ match ( regex = re. compile ( r " third " ), timeout = 0. 5 )
[ 0.6200811266899109, 0.28150784969329834, 0.592083215713501, 0.18667234480381012, 0.34219545125961304, 0.8215598464012146, 0.14787358045578003, 0.0821584165096283, -0.4310029149055481, -0.8933018445968628, -0.4832669794559479, -0.33819639682769775, -0.5310093760490417, -0.04264161363244057,...
def twalkoutput ( self ) : return self. twalk. output
[ -0.5085119009017944, -1.075608730316162, 0.37310290336608887, -0.41775453090667725, 0.07449688017368317, 0.6238991618156433, 1.719796895980835, -0.7227495312690735, -0.7428559064865112, -0.5717984437942505, -0.1523740142583847, -1.6443077325820923, -0.2035190910100937, 0.14463628828525543,...
def _ _ init _ _ ( self, config ) : self. _ name = config. get ( attr _ name ) self. _ address = config. get ( attr _ address ) self. _ interface = config. get ( attr _ interface ) self. _ channel = config. get ( attr _ channel ) self. _ state = config. get ( attr _ param ) self. _ unique _ id = config. get ( attr _ un...
[ -0.383500874042511, -0.5639170408248901, 0.6097296476364136, -0.46246206760406494, -0.45257946848869324, -0.12012985348701477, 0.19931243360042572, -0.018665732815861702, 0.2499718964099884, 0.6112836599349976, -0.47879552841186523, 0.016617629677057266, -0.031133821234107018, 0.8614883422...
def delete ( self, p ) : p. next = p. next. next
[ 0.44246113300323486, -0.12654395401477814, 0.3471626043319702, -0.18473991751670837, -0.11276163160800934, 0.9557470679283142, 0.28849220275878906, 0.9525991082191467, 1.3255326747894287, 0.5289576053619385, 0.12236133962869644, 1.2805207967758179, -2.0005505084991455, -0.3923119008541107,...
def haversine _ np ( lon1, lat1, lon2, lat2 ) : lon1, lat1, lon2, lat2 = map ( np. radians, [ lon1, lat1, lon2, lat2 ] ) dlon = lon2 - lon1 dlat = lat2 - lat1 a = np. sin ( dlat / 2. 0 ) * * 2 + np. cos ( lat1 ) * np. cos ( lat2 ) * np. sin ( dlon / 2. 0 ) * * 2 c = 2 * np. arcsin ( np. sqrt ( a ) ) km = 6371 * c retur...
[ 0.8312778472900391, -0.7080878615379333, 0.7752296328544617, -0.5384237766265869, 0.10768389701843262, 0.21770067512989044, -1.0994285345077515, 0.26588088274002075, -0.19746297597885132, -0.3366871178150177, -0.25221747159957886, 0.5921261310577393, 0.23027952015399933, -0.847859203815460...
def boost _ product _ to _ lab ( product, beta _ x, beta _ y ) : # unpack product ( product _ name, product _ m, product _ px, product _ py ) = product # find momenta in lab frame ( px _ lab, py _ lab ) = boost _ momentum ( product _ m, product _ px, product _ py, - beta _ x, - beta _ y ) # return return ( product _ na...
[ 0.16601423919200897, -1.1749401092529297, 0.6307898759841919, 0.5051824450492859, 1.010323405265808, 1.0844335556030273, -0.004006830044090748, -2.1079013347625732, -0.3772867023944855, 0.6154413223266602, -0.3109094798564911, -0.16517487168312073, -0.23593764007091522, 0.4100126028060913,...
def subnet _ id ( self ) - > optional [ pulumi. input [ str ] ] : return pulumi. get ( self, " subnet _ id " )
[ 1.5558953285217285, 0.45975425839424133, 0.29672983288764954, 1.4176678657531738, 0.6803726553916931, 1.6094447374343872, -0.3232346177101135, 0.05574652552604675, 1.6589877605438232, -0.5733994841575623, -0.1485188603401184, 1.0623468160629272, 0.28564250469207764, -0.6525518894195557, ...
def print _ hint ( self ) : # not all objects have a hint so check all objects to see if they do # if so, add the hint to a new list hints = [ ] for obj in self. current _ room ['objects'] : data = self. current _ room ['objects'] [ obj ] if'hint'in data : hints. append ( data ['hint'] ) if len ( hints ) < 1 : print ( ...
[ 0.0057578613050282, -0.6533341407775879, 0.7535346150398254, 0.21961989998817444, 0.47089657187461853, 1.42606782913208, -0.1292257457971573, -0.10162175446748734, -0.08148578554391861, 0.6715584397315979, -0.38928458094596863, 0.8384190201759338, -1.3603861331939697, 0.4123574197292328, ...
def refine _ training _ set ( training _ set ) : for i, ( centroid, label ) in enumerate ( training _ set. labels ) : print centroid print label ( start _ row, end _ row, start _ col, end _ col ) = training _ set. get _ example _ boundries ( centroid ) figure ( ) xlim ( start _ col, end _ col ) ylim ( start _ row, end ...
[ -0.6346825361251831, -0.2384134829044342, 0.29528969526290894, -0.06767848879098892, -0.20533603429794312, 0.4115099608898163, 0.3049392104148865, -0.3163861036300659, -0.026054294779896736, 0.005307192914187908, 1.2731070518493652, 0.5430598855018616, 0.4241088926792145, 0.524232566356658...
def slider _ callback ( x ) : pass
[ 0.1486596018075943, -0.8335265517234802, 0.30278468132019043, -0.10616753250360489, -0.305113822221756, -0.2598291337490082, 0.035966657102108, -0.7341530323028564, 0.1662197709083557, -0.17967256903648376, -1.5341517925262451, 0.05216984450817108, 0.5675813555717468, 0.42444369196891785, ...
def save ( self, path ) : torch. save ( self. model, path )
[ -0.04396494850516319, -0.666626513004303, -0.004921889863908291, -0.23034575581550598, 0.5101268291473389, 1.0368306636810303, 0.6303237080574036, 0.051773183047771454, -1.1954609155654907, 0.3026779294013977, -1.7558735609054565, -0.5712423920631409, -0.1135210320353508, -0.31510841846466...
def get _ or _ create _ ngrok _ tunnel ( ) - > str : global _ app _ tunnel _ url with _ app _ tunnel _ lock : if _ app _ tunnel _ url : return _ app _ tunnel _ url local _ port = _ get _ http _ port ( ) ngrok = none if config. get ('ngrok') : ngrok = get _ plugin ('ngrok') assert ngrok,'the ngrok plugin is required in ...
[ 0.5192960500717163, 0.10942131280899048, 0.3241077959537506, 0.42063263058662415, 0.23876003921031952, -0.2890055477619171, 0.09902704507112503, -0.8246662020683289, -0.5337772965431213, 0.2192220240831375, 0.41353416442871094, -0.09712257236242294, -0.03542965278029442, 0.1039723753929138...
def download ( self, fileobj, timeout = 120, read _ timeout = 660 ) : start = time. time ( ) status = none while true : status = self. get _ status ( ) if status [ " status " ] in ( " aborted ", " failed " ) : raise runtimeerror ( " job { 0 } was aborted : { 1 } ". format ( self. id, status [ " status _ details " ] ) )...
[ 0.491310715675354, -0.6431120038032532, 0.8379361033439636, 0.10566501319408417, -0.11001181602478027, -0.0522039495408535, -0.44832664728164673, -0.07228802144527435, -0.3709707260131836, -0.15321840345859528, 0.5238494277000427, 0.32552894949913025, 0.12501463294029236, 0.628632366657257...
def button _ press _ callback ( self, event ) : if event. inaxes is none : return if self. canvas. toolbar. mode! = " " : return if event. button = = 1 : self. _ addsub = 1 elif event. button = = 3 : self. _ addsub = 0 if event. inaxes = = self. axes [ " main " ] : self. _ msedown = true axisid = self. get _ axisid ( e...
[ 0.3556451201438904, 0.4039534628391266, 0.72295081615448, 0.4151172339916229, 0.3181439936161041, 1.264343023300171, 1.4256393909454346, -0.3471328914165497, 0.1985037922859192, -0.043474677950143814, -0.7434675097465515, 0.1448577642440796, 0.32288095355033875, 0.06167047843337059, 0.25...
async def fetch _ async ( self ) - > " hostednumberorderinstance " : return await self. _ proxy. fetch _ async ( )
[ 0.3360900282859802, 0.7125464081764221, 0.32396256923675537, 0.027934834361076355, -0.448600172996521, 0.07559865713119507, -0.6689804196357727, -0.009498429484665394, 0.3041774332523346, -0.8371596336364746, -0.17519429326057434, 0.3722730576992035, 0.2125767171382904, -0.1256988644599914...
def reverse _ words ( text ) : return " ". join ( x [ : : - 1 ] for x in text. split ( " " ) )
[ 0.2659759521484375, 0.8456687927246094, 0.33270761370658875, -0.5228971838951111, 0.3976210355758667, -0.1359969824552536, -1.1509833335876465, 0.9844957590103149, -0.5091203451156616, 1.1703355312347412, -0.08310191333293915, 0.6354085206985474, -1.0308923721313477, -0.12148228287696838, ...
def best _ breadth _ first _ tip _ state ( self ) : max _ val = - float ('inf') min _ visit = float ('inf') for s in self. nonterminal _ tip _ states : n = self. states _ to _ nodes [ s ] if n. value > max _ val : best _ node = n min _ visit = n. visitorder max _ val = n. value elif n. value = = max _ val and n. visito...
[ -0.730061411857605, -0.46970731019973755, 0.6335095763206482, -0.021730778738856316, 0.05708465352654457, -0.11210445314645767, -0.10157313942909241, -0.1971033662557602, 0.32091403007507324, -0.22561608254909515, 0.5132073760032654, 0.38305091857910156, 0.5992555022239685, -0.208897829055...
def _ remove _ gaps _ patient ( df ) : unique _ visits = df ['visit _ number']. unique ( ) diff = unique _ visits [ 1 : ] - unique _ visits [ : - 1 ] if ( diff > 1 ). any ( ) : ix = np. where ( diff > 1 ) [ 0 ] [ 0 ] visit = unique _ visits [ ix ] return df [ df ['visit _ number'] < = visit ] return df
[ 0.01608141139149666, 0.09324970096349716, 0.7023062705993652, 0.1007111519575119, -0.34727829694747925, 0.47097110748291016, 1.7635782957077026, 0.3465471565723419, 0.6843903064727783, -0.10999218374490738, 1.1073696613311768, 1.0400869846343994, 0.1536240130662918, -1.2155961990356445, ...
def _ _ neg _ _ ( self ) : return self. _ negative ( self )
[ -1.6575390100479126, -0.03827526792883873, 0.6625308394432068, 0.0797581821680069, 0.0075608305633068085, 0.5114230513572693, -0.4522925019264221, -0.6871373653411865, -0.4089532792568207, -0.45379558205604553, -0.07201199978590012, -0.030208345502614975, 0.04293294996023178, 0.16964463889...
def polling _ loop ( timeout, interval = 1 ) : start _ time = time. time ( ) iteration = 0 end _ time = start _ time + timeout while time. time ( ) < end _ time : yield iteration iteration + = 1 time. sleep ( interval )
[ 0.0157974511384964, 0.4657115340232849, 0.8633096814155579, 0.20433801412582397, -0.7001259922981262, 1.2501317262649536, -0.5477532744407654, -0.156794935464859, -0.8176785111427307, 0.9283563494682312, 0.26179587841033936, -0.3123124837875366, -0.6516847014427185, -0.13141588866710663, ...
def compute _ best _ test _ losses _ case1 ( data, k, total _ queries ) : results = [ ] for query in range ( k, total _ queries + k, k ) : best _ arch = sorted ( data [ : query ], key = lambda i : i [ 2 ] ) [ 0 ] test _ error = best _ arch [ 3 ] results. append ( ( query, test _ error ) ) return results
[ -0.5475487112998962, -0.003328478429466486, 0.32177579402923584, 0.13208791613578796, 0.007276532240211964, 0.12016688287258148, 0.09561968594789505, 0.4067844748497009, 0.5717896223068237, 0.8240838646888733, -0.05668229982256889, -0.25708693265914917, -0.15406036376953125, 0.150428861379...
def _ _ init _ _ ( self, fit _ base _ to _ all _ cv : bool = false, base _ only : bool = false, cap _ predictions : bool = true, * rfargs, * * rfkwargs ) : self. base = baseexceedencemodel ( greedyfit = fit _ base _ to _ all _ cv ) self. rf = randomforestregressor ( * rfargs, * * rfkwargs ) self. greedyfit = fit _ base...
[ -0.3860160708427429, -0.5109580755233765, 0.6841195225715637, 1.2513067722320557, 1.3559343814849854, 0.26747965812683105, -0.5214821100234985, 0.9342318773269653, -0.04638282582163811, -0.5114462971687317, -0.6659424901008606, -0.10780058801174164, 0.20874249935150146, 1.3148422241210938,...
def load _ nifty _ volume _ as _ array ( filename, with _ header = false ) : img = nibabel. load ( filename ) data = img. get _ data ( ) data = np. transpose ( data, [ 2, 1, 0 ] ) if ( with _ header ) : return data, img. affine, img. header else : return data
[ -0.8409289121627808, -0.9422080516815186, 0.7445626258850098, -0.07400199770927429, 0.05356457084417343, -1.4715343713760376, -0.5702815651893616, -0.7250006198883057, -0.7999153733253479, 1.0948704481124878, -0.3757951557636261, -0.32854482531547546, -0.26770925521850586, 0.32463130354881...
def get _ header _ url ( self ) : return self. job. newsletter. header _ url _ replaced. replace ('{ { mail. mail _ hash } } ', self. mail _ hash ). replace ('{ { base _ url } } ', self. job. newsletter. get _ base _ url ( ) )
[ 0.5173546075820923, -0.7379868030548096, 0.5392334461212158, 0.13562656939029694, 0.2674269676208496, 0.14575794339179993, -1.379763126373291, 0.7653782963752747, -0.5494226813316345, -0.893251359462738, -0.21610920131206512, 0.7251986861228943, -0.12790203094482422, -0.23110951483249664, ...
def skip _ all _ messages _ for _ subscription ( self, stream, subscription, local = false ) : if self. persistent : url _ endpoint ='/ streams / persistent / stream / { } / subscription / { } / skip _ all? local = { }'\. format ( stream, subscription, local ) # else : # url _ endpoint ='/ streams / non - persistent / ...
[ 0.027830705046653748, -0.18416562676429749, 1.0026097297668457, 0.7143746018409729, 0.05986864119768143, -0.018049055710434914, -0.06834755837917328, -0.7278420925140381, -0.33616504073143005, 0.1100504994392395, 0.3297441601753235, 0.8529294729232788, -0.8774092793464661, 0.30107060074806...
def extract _ features ( self, sentence, index ) : features = { } assert ( index < len ( sentence ) ) if ('ww'in self. feature _ config. keys ( ) ) : for i in range ( self. ww _ start, self. ww _ end + 1 ) : if index + i = = 0 : features ['ww [ % i ] _ % s'% ( i, _ start _ value ) ] = 1 elif index + i = = len ( sentenc...
[ -0.6774977445602417, -0.40571483969688416, 0.6587390899658203, -0.5710497498512268, -0.7984039783477783, -1.0363805294036865, 0.3384949564933777, 0.4138336181640625, -0.7314806580543518, 0.05397327244281769, -1.4485570192337036, 0.04916507378220558, -0.21443267166614532, 0.3517042100429535...
def test _ load _ many _ mixed ( self, build _ image _ for _ jupyterlab ) : lb, username = build _ image _ for _ jupyterlab [ 0 ], build _ image _ for _ jupyterlab [ 5 ] keys = [ " conda3 & cdutil ", " pip & gtmunit1 ", " pip & gtmunit2 ", " conda3 & nltk ",'apt & curl'] loader = packagedataloader ( keys, lb, username ...
[ -0.773916482925415, 0.323345422744751, 0.6499881744384766, 0.2654079794883728, 0.5249099731445312, 0.44147059321403503, -0.6396750807762146, -0.7554667592048645, -0.6840171813964844, -0.057455748319625854, -0.8790605664253235, -0.4971725344657898, 0.3133790194988251, 1.00804603099823, -0...
def gen _ password ( length = 12, allowed _ chars ='abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz0123456789') : random. seed ( hashlib. sha256 ( ('y % s % s'% ( random. getstate ( ), time. time ( ) ) ). encode ( ) ). digest ( ) ) return''. join ( random. choice ( allowed _ chars ) for i in range ( length ) )
[ 0.28907284140586853, -0.06759125739336014, 0.7448704838752747, -0.5611454248428345, -0.9067104458808899, 0.9928559064865112, -0.5366344451904297, 0.07174533605575562, 0.7905657291412354, 0.31706905364990234, -0.5355477929115295, 0.7545673847198486, -0.10436322540044785, -0.6679360866546631...
def train ( args ) : set _ deterministic _ pytorch ( args ) # check cuda availability if not torch. cuda. is _ available ( ) : logging. warning ('cuda is not available') # get input and output src _ path = os. path. join ( args. base _ dir, args. source ) trg _ path = os. path. join ( args. base _ dir, args. target ) f...
[ 0.2010156363248825, 0.3344782888889313, 0.906493067741394, -0.052922122180461884, -0.029985977336764336, 0.1599634438753128, 0.496353417634964, 0.564805269241333, -1.0089210271835327, 0.5356352925300598, -1.3381290435791016, 0.08456822484731674, 0.7994329929351807, 0.23755289614200592, 0...
def init _ axes ( self ) : fig = plt. figure ( figsize = ( 15, 10 ) ) ax = fig. add _ axes ( [ 0. 05, 0. 15, 0. 9, 0. 80, ] ) return ( fig, ax )
[ 1.2305461168289185, 0.280323326587677, 0.6985586881637573, -0.6629722714424133, 0.30808326601982117, 0.42696821689605713, 0.34949377179145813, -0.41422712802886963, -0.5394827723503113, -0.5635848045349121, -0.844104528427124, 0.6162026524543762, 0.3366171419620514, -0.08707296848297119, ...
def test _ nfc _ wps _ er _ config _ token ( dev, apdev ) : try : _ test _ nfc _ wps _ er _ config _ token ( dev, apdev ) finally : dev [ 0 ]. request ( " wps _ er _ stop " ) dev [ 1 ]. request ( " set ignore _ old _ scan _ res 0 " )
[ -0.7248702049255371, 0.7513211965560913, 0.3412328064441681, -0.16868530213832855, 0.6903363466262817, -0.015157803893089294, -0.1615896224975586, -0.39293113350868225, 0.5800939798355103, -0.3077636957168579, -0.06035755202174187, -0.8599970936775208, 0.13587835431098938, -0.0933407247066...
def create _ snapshot ( self, machine _ id : str, data : dict [ str, any ] ) - > apiresponse : return self. _ post ( " list ", { " pk " : self. user _ pk, " sdi _ id " : self. sdi _ pk, " machine _ id " : machine _ id }, data )
[ -0.993958592414856, 1.4580190181732178, 0.25103023648262024, 0.6149224638938904, -0.5213463306427002, 0.5405768156051636, -1.3688410520553589, -0.5380370020866394, 0.05883123353123665, -0.27828964591026306, -0.7402917146682739, -0.08611232787370682, 0.23163414001464844, 0.17830954492092133...
def random _ filtered _ samples ( f, x, k, n, replace = true, max _ resamples = 1e3 ) : if replace and ( k > len ( x ) ) : raise valueerror ( " not enough elements of x. " ) if replace : num _ samples = len ( x ) * * k else : num _ samples = np. prod ( [ len ( x ) - j for j in range ( k ) ] ) if n is none : n = num _ s...
[ 0.17773476243019104, 0.7010856866836548, 0.7397923469543457, 0.6389757990837097, -0.5673787593841553, -0.28133663535118103, -0.5069990754127502, 0.616486132144928, 0.562860906124115, 0.3682558834552765, -0.006175861693918705, -0.32531997561454773, 0.1698012799024582, -0.3008604943752289, ...
def random _ walk ( n ) : bonds = np. random. standard _ normal ( ( int ( n ), 3 ) ) bonds = ( bonds. t / np. linalg. norm ( bonds, axis = 1 ) ). t coords = np. add. accumulate ( bonds, axis = 0 ) return coords
[ -0.823316752910614, 0.27336183190345764, 0.5951109528541565, -0.4843456745147705, 0.03694429621100426, 1.2071257829666138, 0.5923117995262146, -0.6756920218467712, 0.9641822576522827, -0.340635746717453, 0.30718517303466797, -0.7079742550849915, -0.9088053107261658, -0.1664697378873825, ...
def send _ exception ( self, code, message = none, exception = none ) : self. send _ response ( 200 ) self. send _ header ('content - type ','application / json') self. end _ headers ( ) resp _ json = dict ( ) resp _ json ['code'] = code resp _ json ['message'] = message if isinstance ( exception, exception ) : # exc _...
[ -0.6643207669258118, 0.05803196504712105, 0.9680733680725098, 0.2207876443862915, -0.01008654199540615, -0.6191774606704712, 0.5817093253135681, -0.04528419300913811, 0.6726735830307007, 0.6373412609100342, -0.4170515239238739, 0.15651997923851013, -0.7089267373085022, 0.6266806721687317, ...
def rule _ no ( self ) - > pulumi. input [ int ] : return pulumi. get ( self, " rule _ no " )
[ 0.5761176347732544, 1.2252488136291504, 0.39322784543037415, 0.07940709590911865, 1.5452640056610107, 1.2335002422332764, 1.1215437650680542, 1.3853821754455566, -0.7050854563713074, -0.6374143958091736, 0.005780450534075499, 1.257575511932373, 0.37982115149497986, -0.7324582934379578, 0...
def _ translate _ _ interfaces _ state ( input _ yang _ obj, translated _ yang _ obj = none ) : for k, listinst in input _ yang _ obj. interface. iteritems ( ) : innerobj = _ translate _ _ interfaces _ state _ interface ( listinst, translated _ yang _ obj ) return translated _ yang _ obj
[ -0.9094712734222412, 0.10038915276527405, 0.3249703049659729, -0.47934505343437195, -0.7487072348594666, 0.4209388494491577, 1.2144724130630493, -0.46773454546928406, 1.3880478143692017, -0.4302036762237549, -0.5759127736091614, -0.6470672488212585, -0.6178402900695801, 0.11197822540998459...
def get ( self ) : timestamp = np. asarray ( self. _ data ['timestamp'] ) # unpack everything first, otherwise old files will be a mess values = [ _ h5 _ telstate _ unpack ( s ) for s in self. _ data ['value'] ] # figure out dtype and wrap any objects dtype = infer _ dtype ( values ) if dtype = = object : values = [ co...
[ -0.2673194408416748, -0.5762927532196045, 0.23955024778842926, -0.30271005630493164, -0.45050278306007385, -0.12667758762836456, -0.904967188835144, -1.231598138809204, 0.9017063975334167, -0.46939754486083984, 0.1241287812590599, -0.07683980464935303, 0.08504156768321991, -0.4378546178340...
def test _ get _ values _ for _ normalized _ type ( self ) : expected _ result = {'1. 1. 1. 3'} record = {'sourceipaddress':'1. 1. 1. 3 ','streamalert : normalization': {'ip _ v4': expected _ result, } } assert _ equal ( normalizer. get _ values _ for _ normalized _ type ( record,'ip _ v4'), expected _ result )
[ -0.10838894546031952, 0.2909875512123108, 0.2820371985435486, 0.42506012320518494, -0.567727267742157, -0.2284035086631775, -0.261388897895813, -0.13116487860679626, -0.06766138970851898, 0.08041027933359146, -0.2901906967163086, 0.14982406795024872, -0.5108737349510193, -0.383982419967651...
def clean _ index ( output _ dir ) : index _ html = os. path. join ( output _ dir,'index. html') lines = [ ] with open ( index _ html ) as f : for l in f : if'documentation < / div >'in l : l = l. replace ('documentation < / div > ','< / div >') lines. append ( l ) f = open ( index _ html,'w') f. write ('\ n '. join ( ...
[ 0.2594476342201233, 0.17950832843780518, 0.5446417927742004, 0.5724412202835083, 0.29233282804489136, -0.0813722014427185, 1.3699736595153809, 1.0751274824142456, 0.0508904904127121, 0.6359270811080933, 0.47327280044555664, 0.24832122027873993, 0.41310790181159973, 0.20698851346969604, -...
def click _ first _ image ( ) : global driver driver. find _ element _ by _ class _ name ( " _ 9ahh0 " ). click ( )
[ 0.4094695746898651, 0.6696245670318604, 0.48269227147102356, 0.021395275369286537, 1.6243444681167603, -0.5647602081298828, 0.7530540227890015, 0.10820719599723816, 0.07307963818311691, 0.2797899544239044, -0.22980886697769165, -0.15241335332393646, -0.04901125654578209, 1.2811683416366577...
def _ validate _ parameters ( self ) : if self. n _ iter < 250 : raise valueerror ( " n _ iter should be at least 250 " ) if self. n _ components! = 2 : raise valueerror ( " currently frovedis tsne supports n _ components = 2 " ) if self. perplexity < 0 : raise valueerror ( " perplexity = { } should be not be negative....
[ -0.48845311999320984, 0.3060435950756073, 0.5212588906288147, -0.6814038753509521, 0.3550511598587036, 0.41478103399276733, -0.4919235408306122, 0.4170114994049072, -1.0391777753829956, 0.09093233942985535, 0.5954219102859497, 0.4237282872200012, -0.09340940415859222, 1.0948907136917114, ...
def delete _ workspace ( self, user = " " ) - > none : body = client. v1deleteoptions ( ) name = self. _ generate _ workspace _ name ( ) body. grace _ period _ seconds = 1 # delete deployment resp = self. app _ api _ client. delete _ namespaced _ deployment ( name, self. namespace, body = body ) print ( resp ) print ( ...
[ -0.2947365343570709, -0.027001438662409782, 0.44005119800567627, 0.9827569723129272, 0.17754003405570984, 0.5626428723335266, 0.573189377784729, -0.8835699558258057, 0.7429994344711304, -0.3270796835422516, -0.004377065692096949, 1.464045524597168, -0.6316563487052917, 1.0572528839111328, ...
def cleanstring ( string ) : try : res = " " for char in string : if char! ='' : res + = char return res except typeerror : raise typeerror ( " first argument must be a string. " )
[ 0.17382189631462097, 0.0020958620589226484, 0.06436575204133987, 0.24749186635017395, 0.5561648011207581, 0.2858942747116089, 0.600811243057251, -0.7442598938941956, -0.21562862396240234, 0.43142610788345337, 0.19385717809200287, 0.460458904504776, -0.30967792868614197, -0.2167017608880996...
def _ _ init _ _ ( self, sensor _ dict ) : self. angle = self. float _ value ( sensor _ dict,'angle') * degree _ per _ radians self. current _ lap _ time = self. float _ value ( sensor _ dict,'curlaptime') self. damage = self. int _ value ( sensor _ dict,'damage') self. distance _ from _ start = self. float _ value ( s...
[ 0.12171553820371628, -0.5476961731910706, 0.6448243856430054, -0.8495399355888367, -0.2954251170158386, 0.1584271490573883, -0.39276301860809326, 0.07928891479969025, -0.19576555490493774, 0.49391165375709534, 0.040554240345954895, -0.5087844133377075, 0.6770212650299072, 0.491961002349853...
def _ _ init _ _ ( self, device, flip _ x = false, flip _ y = false, flip _ z = false, number _ precision = 3, immediate = false, debug = false ) : self. device = device self. flip _ x = flip _ x self. flip _ y = flip _ y self. flip _ z = flip _ z self. number _ precision = number _ precision # self. device. reset _ in...
[ -0.3899731934070587, -0.6476953029632568, 0.5125020742416382, 0.7806448936462402, -0.8424076437950134, 0.515213131904602, 1.2712825536727905, 0.35287556052207947, 0.20423325896263123, -0.2968011796474457, -0.529015839099884, 0.03729740530252457, 0.13870155811309814, 0.7899143099784851, 1...
def begin _ create _ address ( self, address _ name : str, resource _ group _ name : str, address _ resource : union [ _ models. addressresource, io ], * * kwargs : any ) - > lropoller [ _ models. addressresource ] : api _ version = self. _ get _ api _ version ('begin _ create _ address') if api _ version = ='2020 - 12...
[ -1.196044921875, -0.5614637732505798, 0.9389113187789917, -0.23034684360027313, -0.6986383199691772, -0.2537561357021332, 0.11373786628246307, -0.7088465094566345, 0.801258385181427, 0.5509634017944336, -0.14072711765766144, 0.846847653388977, -0.30475324392318726, 0.405472069978714, 0.6...
def _ _ init _ _ ( self ) : results = self. _ run _ systemctl _ commands ( self. all _ timers, " show ", " - - property ", " loadstate " ) if not results : self. loaded _ timers = none # command failed. else : self. loaded _ timers = tuple ( timer for timer, result in results. items ( ) if result [ " status " ] = = 0 a...
[ 0.5019205808639526, 0.2205623835325241, 0.5562922358512878, 0.08425479382276535, 0.15408334136009216, -0.417453795671463, -0.2718927562236786, -0.20587797462940216, -0.035858310759067535, -0.5031373500823975, -0.7633287906646729, -0.08083357661962509, -0.02452012710273266, 1.13156652450561...
def update _ params _ dict ( fparams _ dict, to _ add _ dict ) : new _ dict = dict ( fparams _ dict ) if to _ add _ dict : new _ dict. update ( to _ add _ dict ) return new _ dict
[ -0.9066237807273865, -0.345476895570755, 0.6251764893531799, -0.6159337162971497, -0.6369850039482117, 0.07111863046884537, -0.469672292470932, 0.37146633863449097, -0.20407220721244812, 0.7934460639953613, 0.9096307158470154, -0.1286107748746872, 0.4094429314136505, 0.6020520329475403, ...
def call ( self, features, cols _ to _ output _ tensors = none ) : if not isinstance ( features, dict ) : raise valueerror ('we expected a dictionary here. instead we got : ', features ) transformation _ cache = fc. featuretransformationcache ( features ) output _ tensors = [ ] for column in self. _ feature _ columns :...
[ -1.4561527967453003, 0.5503555536270142, 0.677367091178894, 0.34631896018981934, 0.12809990346431732, -1.1239488124847412, 0.11665905267000198, -0.4135811924934387, -0.1947445571422577, 0.07901689410209656, -0.4740181267261505, -0.7432888746261597, 0.6391237378120422, -0.4510560929775238, ...