text
stringlengths
25
2.19k
embedding
listlengths
768
768
async def async _ unload _ entry ( hass : homeassistant, config _ entry : configentry ) - > bool : controller : alarmintegrationcontroller = hass. data [ domain ]. pop ( config _ entry. entry _ id ) [ data _ controller ] controller. api. stop _ websocket ( ) controller. stop _ keep _ alive ( ) unload _ ok : bool = awai...
[ -0.19777905941009521, 0.8268946409225464, 0.47834932804107666, -0.5476044416427612, 0.3188231289386749, 0.14227144420146942, 0.1958998292684555, -0.44292885065078735, -0.009808503091335297, 0.8513261675834656, -0.1650281697511673, -0.34962886571884155, -0.17854614555835724, 0.0338403023779...
def mod _ chebyshev ( n, mom, alpham, betam ) : if not isinstance ( n, int ) : raise typeerror ('n must be an integer') if n < 1 : raise valueerror ('n must be at least 1') n = min ( n, int ( len ( mom ) / 2 ) ) alpha = np. zeros ( n ) beta = np. zeros ( n ) normsq = np. zeros ( n ) sig = np. zeros ( ( n + 1, 2 * n ) )...
[ -0.2119641751050949, -0.44469696283340454, 0.8588502407073975, -0.32222697138786316, -0.3855331242084503, -0.3055722713470459, -0.30139365792274475, -0.19102846086025238, -0.10341926664113998, 0.8351631760597229, -0.8567100763320923, -0.619673490524292, -0.42544230818748474, 0.830259799957...
def do _ get ( self ) : if self. do _ preprocess ( ) : try : self. globals. _ logger. debug ( f'executing function { self. request. parsed _ path. path }') self. function ( self. globals, self. request, self. response ) self. globals. _ logger. debug ( f'completed function { self. request. parsed _ path. path }') excep...
[ -0.6701865792274475, -0.7498711347579956, 1.0362863540649414, -0.25432610511779785, 0.9346070885658264, -0.19085609912872314, 0.1611751914024353, -0.06383201479911804, -0.7492863535881042, -0.3009105622768402, 0.6138177514076233, 1.0058680772781372, -0.27110347151756287, -0.049781288951635...
def tft _ wallet _ unlock ( prefab, passphrase ) : cmd ='curl - a " rivine - agent " " localhost : 23110 / wallet "'rc, out, err = prefab. core. run ( cmd, die = false, showout = false ) if rc : raise runtimeerror ('failed to unlock tft wallet. error { } '. format ( err ) ) json _ out = json. loads ( out ) if json _ ou...
[ -0.981298565864563, 0.2624496519565582, 0.5102649927139282, -0.5143401026725769, 0.21758721768856049, -0.7096354961395264, 0.11287003755569458, 0.2880553603172302, 0.06030750647187233, 1.0155057907104492, 0.3190228044986725, -0.07639750838279724, -0.7271512150764465, 0.2912074029445648, ...
def _ check _ user ( self ) : return self. _ api ( f " / user / profile / { self. user } " )
[ -0.784315288066864, 0.24837416410446167, 0.45325154066085815, 0.8062775731086731, 0.029996713623404503, -0.21091526746749878, -0.4549526870250702, -1.214420199394226, -0.5017078518867493, -0.08200052380561829, -0.512097179889679, 0.09406500309705734, -0.6020321249961853, -0.611747384071350...
def downsample _ contour ( coords, bins = 1024 ) : edges = np. linspace ( 0, coords. shape [ 0 ], num = bins ). astype ( int ) for b in range ( bins - 1 ) : yield [ coords [ edges [ b ] : edges [ b + 1 ], 0 ]. mean ( ), coords [ edges [ b ] : edges [ b + 1 ], 1 ]. mean ( ) ]
[ -0.414349764585495, 0.06201108172535896, 0.6286402940750122, -0.1417747139930725, -0.7699204087257385, 0.08349079638719559, 0.8000073432922363, 0.15862585604190826, 0.40301281213760376, 0.12687695026397705, 0.1353674829006195, 0.4191058874130249, -0.11164664477109909, -0.3901224732398987, ...
def expand _ node ( self, nodeid ) : node = self. get _ item _ by _ nodeid ( nodeid ) if not self. is _ expandable ( node ) : self. logger. debug ( " node % s not expandable on tree % s ", nodeid, self. tree _ id ) return false if self. is _ collapsed ( node ) : self. logger. debug ( " expanding collapsed node % s on t...
[ -0.9208011031150818, 0.5277378559112549, 0.9155046343803406, -0.22258171439170837, -0.1196778267621994, -0.20214496552944183, -0.21407440304756165, 0.04748975858092308, 0.7182287573814392, 0.5285124182701111, -0.23461267352104187, 0.09875313192605972, -0.3475581407546997, 0.977799594402313...
def addshovelrelateddoid ( self, doid ) : if hasattr ( base. cr. playgame. getplace ( ),'detectedgardenplotdone') : place = base. cr. playgame. getplace ( ) state = place. fsm. getcurrentstate ( ) # print ( " estate state % s " % ( state. getname ( ) ) ) if state. getname ( ) = ='stopped': return self. touchingplantlis...
[ 0.6987983584403992, -0.21387574076652527, 0.610199511051178, 0.022370029240846634, -0.6646411418914795, 0.8083624839782715, 0.6254488825798035, -0.7280651926994324, 0.969805121421814, 0.21564628183841705, -0.3814352750778198, 0.44678395986557007, -0.37375056743621826, 0.37933602929115295, ...
def test _ get _ new _ state ( self ) : # format of tuples : ( state, neighbors, output ) input _ combinations = [ ( 1, 0, 0 ), ( 1, 1, 0 ), ( 1, 2, 1 ), ( 1, 3, 1 ), ( 1, 4, 0 ), ( 1, 5, 0 ), ( 1, 6, 0 ), ( 1, 7, 0 ), ( 1, 8, 0 ), ( 0, 0, 0 ), ( 0, 1, 0 ), ( 0, 2, 0 ), ( 0, 3, 1 ), ( 0, 4, 0 ), ( 0, 5, 0 ), ( 0, 6, 0 ...
[ -0.39106085896492004, -0.051167722791433334, 0.7306350469589233, 0.7790319919586182, 0.3695456087589264, -0.5820832252502441, 0.6897743344306946, -1.1890544891357422, -0.20869304239749908, -0.08275068551301956, -0.9532706141471863, -0.4906493127346039, -0.2850418984889984, -0.3707659244537...
def content ( self, content ) : if self. cache _ content : self. cached _ content = b2u ( content ) try : with self. _ open _ dockerfile ('wb') as dockerfile : dockerfile. write ( u2b ( content ) ) except ( ioerror, oserror ) as ex : logger. error ( " couldn't write content to dockerfile : % r ", ex ) raise
[ -0.3946407735347748, -0.041291363537311554, 0.5571684241294861, 0.28734132647514343, 0.2417723387479782, 0.5871249437332153, 1.0985971689224243, 0.6618640422821045, -0.4628376364707947, -0.26797136664390564, -0.41883426904678345, 0.25183266401290894, -0.029882049188017845, 0.02158600650727...
def set _ tmp _ folder ( self ) : self. current _ folder = self. tmp _ folder
[ -0.5828418135643005, -0.840223491191864, 0.3202102482318878, -0.7867689728736877, 0.30636486411094666, 0.22946538031101227, 1.0781975984573364, 0.07416558265686035, -0.8218952417373657, 0.0560419000685215, -0.2702755630016327, 0.5600621700286865, -0.7283100485801697, 0.8360676169395447, ...
def _ _ init _ _ ( self, words = none ) : words = self. sanitize _ words ( words ) self. word _ id = { w : i for i, w in enumerate ( words ) } self. id _ word = { i : w for w, i in iteritems ( self. word _ id ) }
[ 0.06696439534425735, 0.22961366176605225, 0.3110778331756592, -0.3382558226585388, -0.102369524538517, -0.04279152303934097, -0.6429199576377869, 0.5257735848426819, -0.16686461865901947, 0.4171299338340759, -0.5184716582298279, -0.13049592077732086, -1.2045403718948364, 0.7568886876106262...
def run _ all ( self, recollect = false ) : return list ( self. iter _ tests ( recollect ) )
[ 0.6172065138816833, -0.6578356027603149, 0.5345318913459778, 1.3177847862243652, 0.7435217499732971, 0.2773144245147705, 0.29903486371040344, 0.7409029603004456, 0.5187578797340393, 0.08568870276212692, 0.1900966912508011, 0.25121042132377625, -0.22192029654979706, 1.2570503950119019, -0...
def main ( ) : filename = pmag. get _ named _ arg ('- f') if not filename : return with open ( filename,'rb +') as f : content = f. read ( ) f. seek ( 0 ) f. write ( content. replace ( b'\ r ', b'' ) ) f. truncate ( )
[ 1.0417495965957642, 0.1339344084262848, 0.684342622756958, 0.13987888395786285, 0.6494741439819336, -0.03192932903766632, 0.4721875488758087, 0.904686689376831, -1.0181336402893066, 0.016193963587284088, 0.036353953182697296, -0.43189793825149536, -0.4219014346599579, 0.1387426257133484, ...
def get _ diameter ( self, syringe _ num ) : self. _ check _ syringe _ number ( syringe _ num ) return self. write ( " dia " + _ int _ to _ char ( syringe _ num ), 15 ) [ 1 : - 4 ]
[ -0.2653764486312866, 0.38465434312820435, 0.7541812658309937, 0.4664839506149292, 0.6245766282081604, -0.16051794588565826, 1.2573151588439941, -0.3418635427951813, 1.0484755039215088, -0.4971633851528168, -0.3452933728694916, 0.03960895165801048, -0.20933039486408234, 0.09542087465524673,...
def predict _ complete _ image ( self, data, targets, batch _ size = 64, cuda = false, normalization = none, size = 256, step = 0. 5 ) : image _ loader = loader. get _ image _ loader ( data, targets, normalization = normalization ) self. eval ( ) for image, target, index in tqdm ( image _ loader, leave = false, desc = ...
[ -0.44516393542289734, -0.4662603735923767, 0.9131990075111389, 0.0608300156891346, -0.5263264775276184, -0.4815780222415924, -0.15294355154037476, -0.16106674075126648, -0.4805581271648407, 0.5397405624389648, 0.31874582171440125, 0.0775722861289978, 0.6982981562614441, 0.6222482323646545,...
def long _ tl ( self ) : return self. ci _ field [ 0 ] in ( 0x60, 0x64, 0x6b, 0x6f, 0x72, 0x73, 0x75, 0x7c, 0x7e, 0x80, 0x8b )
[ 0.9401249289512634, 0.23918801546096802, 0.7335275411605835, -0.7192909121513367, 0.29719480872154236, 0.15405213832855225, -0.17439647018909454, -0.05197510868310928, 0.8798758387565613, 1.140968918800354, -1.206084966659546, -0.43259379267692566, -0.9925234913825989, -0.04696524143218994...
def change _ couleur ( self, newcolor ) : self. couleur = newcolor
[ -0.5408907532691956, -0.8863703608512878, 0.2982822060585022, -0.3272090256214142, 0.3774840831756592, 1.0496292114257812, -0.2590627670288086, 0.6674532890319824, -1.2658170461654663, 1.0336723327636719, -0.9251382946968079, 1.234376072883606, 0.20679634809494019, 0.6465925574302673, 0....
def filter ( self, freqcurve ='instrumental ', durcurve ='low') : if isinstance ( freqcurve, basestring ) : freqcurve = freqcurves. get ( freqcurve ) if not freqcurve : raise valueerror ( " the given freqcurve string is not an existing preset " ) if isinstance ( durcurve, basestring ) : durcurve = durcurves. get ( durc...
[ -0.17190973460674286, -0.49473148584365845, 0.7470982670783997, -0.8596715331077576, -0.3047495186328888, 0.27717432379722595, 0.18008704483509064, -0.7277649641036987, 0.25697144865989685, 0.2610957622528076, 0.40070223808288574, 0.9158194661140442, -0.6995795965194702, -0.195713907480239...
def create _ views _ and _ link _ matrix ( names, views ) : # q = [ views [ i ] [ 3 ] / 252 for i in range ( len ( views ) ) ] # view matrix q = [ ] for view in views : isrelativeview = view [ 1 ] = ='<'or view [ 1 ] = ='>'isabsoluteview = view [ 1 ] = ='='if ( isrelativeview ) : q. append ( view [ 3 ] / 252 ) elif ( i...
[ -0.9285635352134705, -0.762416422367096, 0.6883394718170166, -0.9170520305633545, -0.5670021176338196, 0.29294952750205994, 0.7102251052856445, -0.20693644881248474, 0.9000558853149414, 0.09760534018278122, 0.3886074721813202, 0.1477031260728836, 0.055801331996917725, 0.18844306468963623, ...
def _ _ setstate _ _ ( self, * args, * * kwargs ) : # real signature unknown pass
[ -0.6686295866966248, -0.7801125049591064, 0.35401636362075806, 0.2990548610687256, 0.22318348288536072, -0.11835832893848419, 0.6545286178588867, -0.250935435295105, 0.4378857910633087, -0.1503814309835434, -1.3596736192703247, -0.1152258813381195, -0.06683757901191711, 0.38794639706611633...
def _ to _ lists ( x ) : if isinstance ( x, tuple ) : return [ _ to _ lists ( el ) for el in x ] return x
[ -0.9076694846153259, 0.6807132363319397, 0.3890026807785034, 0.4926201105117798, -0.11674067378044128, 0.6302364468574524, -0.4644775390625, 0.11855077743530273, 1.1994986534118652, 0.3683687448501587, -0.3822407126426697, -0.4391481876373291, 0.5824247002601624, -0.24023893475532532, -0...
def test _ sample _ from _ user _ query ( self ) : stmt = " select id, name from users " sampler = sampler ( session = self. session, table = user, profile _ sample _ query = stmt ) sample _ data = sampler. fetch _ sqa _ sample _ data ( ) assert len ( sample _ data. columns ) = = 2 names = [ col. _ _ root _ _ for col i...
[ 0.21499167382717133, -0.2515564262866974, 0.10978764295578003, 0.3856559991836548, -1.275505781173706, 0.293538898229599, -0.14592353999614716, -1.1598411798477173, 0.850456178188324, -0.17824086546897888, -0.09574861079454422, -0.2524990439414978, 0.38541582226753235, -0.2108793556690216,...
def wrapped _ fn ( self, executor ) : # executors inheriting from ` executor _ base. executor ` will need to be # wrapped in an execution context. the ` referenceexecutor ` is special and # inherits from ` context _ base. context `, so we don't wrap. if not isinstance ( executor, context _ base. context ) : context = e...
[ -0.20972475409507751, 0.44550299644470215, 0.5354384183883667, 0.6140632629394531, 0.9879515767097473, -0.5702434778213501, 0.22440586984157562, 0.023449182510375977, 0.6088442206382751, -0.1329079419374466, 0.3267219364643097, 0.39227494597435, 0.6115230321884155, 0.5759734511375427, 0....
def main ( class _ name = none, image _ dir = none, class _ map _ file = none ) : if image _ dir and class _ name : class _ map = { class _ name : image _ dir } if class _ map _ file : class _ map = load _ class _ map ( class _ map _ file ) print " \ nbuilding vector dictionaries for : \ n " saver = calc _ vector. setu...
[ -0.7588310837745667, -0.16917675733566284, 0.8107655048370361, 0.6128770709037781, 0.44213831424713135, 0.5337281227111816, 1.1057627201080322, 1.217161774635315, -0.2443496584892273, 0.4805087149143219, -0.40279752016067505, -0.6436487436294556, 0.6407980918884277, 0.6539290547370911, 0...
async def add _ unusable _ drive ( coresys : coresys, udisks2 _ services : dict [ str, dbusservicemock | dict [ str, dbusservicemock ] ], ) - > none : await mock _ dbus _ services ( { " udisks2 _ block " : [ " / org / freedesktop / udisks2 / block _ devices / multi _ part _ table1 ", " / org / freedesktop / udisks2 / b...
[ -1.1463760137557983, 0.4001152515411377, 1.0478993654251099, -0.06621313095092773, 0.10561425238847733, -0.14870214462280273, 0.18904653191566467, 0.28026434779167175, -0.01590232364833355, -0.8350661993026733, 0.05792105942964554, 0.5224419236183167, -0.4984734356403351, 0.320338577032089...
def create _ tenant _ project ( self, tenant ) : project _ name = tenant. upper ( ) url = self. get _ url ( " projects ", project _ name ) data = { " description " : " generated by argo engine " } return self. post _ resource ( url, data )
[ -0.8047001361846924, 0.6063973903656006, 0.19113893806934357, 0.45003578066825867, 0.9568620920181274, 0.5088381767272949, -0.9740866422653198, -0.15267272293567657, -0.0031301197595894337, 0.34952372312545776, -0.048301927745342255, 0.1551913619041443, -0.4802250862121582, -0.508643805980...
async def close ( self ) : _ log. info ( " processing smartbridge. close ( ) call " ) if self. _ monitor _ task is not none and not self. _ monitor _ task. cancelled ( ) : self. _ monitor _ task. cancel ( ) if self. _ ping _ task is not none and not self. _ ping _ task. cancelled ( ) : self. _ ping _ task. cancel ( )
[ 0.12720701098442078, 0.5584971308708191, 0.8685255646705627, 1.0820245742797852, -0.0769517570734024, 0.9815471172332764, 0.5469855666160583, -0.23692677915096283, 0.3294552266597748, 0.14538709819316864, -0.17035061120986938, -0.6288133859634399, -0.684280276298523, 1.2099720239639282, ...
def _ really _ handle _ connection ( self, s ) : # get request request = recv _ all ( s, true ) if request is none : return # get reply reply = self. handle _ request ( request ) # test if not isinstance ( reply, basestring ) : raise valueerror ( " handle _ request ( ) should return a string. " ) # send reply send _ al...
[ -0.36541393399238586, -0.10519136488437653, 0.7258197665214539, -0.022287895902991295, 0.13897688686847687, -1.0578010082244873, -0.5406943559646606, -0.4288795590400696, 0.7619830369949341, -0.6431949138641357, 0.7161157727241516, -0.5773121118545532, -0.2123582810163498, -0.0903280824422...
def _ _ init _ _ ( self, name ) : super ( secondoperator, self ). _ _ init _ _ ( name ) self. windows = defaultdict ( list )
[ -0.14964917302131653, 0.36681970953941345, 0.5924630165100098, 0.24343279004096985, -1.073555588722229, -1.1971714496612549, 0.16069599986076355, 0.6282849311828613, -0.07499630004167557, 0.29505977034568787, -1.951585054397583, -1.1059958934783936, -0.5650984048843384, 1.0886015892028809,...
def _ onmotion ( self, event ) : # # can't kill double - click on motion since windows produces # # spurious motion events. # self. _ last _ button = none # dibs on the motion event for the clicked artist if self. _ hasclick : # make sure the x, y data use the coordinate system of the # artist rather than the default a...
[ 0.6146184802055359, -0.1651127189397812, 0.6355634927749634, -0.3625989258289337, 0.1074419617652893, -0.26746276021003723, 0.7250308990478516, 0.1909797042608261, 0.3378898501396179, -0.5003737211227417, -0.2861163020133972, -0.35432085394859314, 0.485243022441864, 0.08315867930650711, ...
def list _ addresses _ at _ resource _ group _ level ( self, resource _ group _ name : str, filter : optional [ str ] = none, skip _ token : optional [ str ] = none, * * kwargs : any ) - > iterable [ " _ models. addressresource " ] : api _ version = self. _ get _ api _ version ('list _ addresses _ at _ resource _ group...
[ -1.4570033550262451, 0.12623900175094604, 0.8340853452682495, -0.614145815372467, -0.5504615902900696, -0.39415910840034485, 0.11392878741025925, -0.9391284584999084, 0.05502748861908913, 0.29180312156677246, 0.0005794876487925649, 0.7587160468101501, -0.5645423531532288, 0.415885567665100...
def add _ stock _ transactions ( ticker, price, balance, buy _ proportion, sell _ proportion, new _ buy _ proportion, max _ digits ) : transactions = pickle. load ( open ( " transactions. p ", " rb " ) ) transactions ['tickers']. append ( ticker ) transactions [ ticker ] = { } transactions [ ticker ] ['first buy'] = pr...
[ 0.40234309434890747, -0.2858351767063141, 0.73911452293396, -0.3034322261810303, 0.27532416582107544, -0.38511380553245544, 0.5125417113304138, -0.4403437077999115, 0.4536641240119934, 0.2276642620563507, -1.1147067546844482, -0.8414994478225708, -0.20297516882419586, -0.1404784917831421, ...
def gen _ overlay _ dirs ( environment, region ) : return [ # give preference to explicit environment - region dirs " % s - % s " % ( environment, region ), # fallback to environment name only environment, ]
[ -0.5233206152915955, -0.12428957968950272, 0.615370512008667, -0.4522060453891754, -0.41767388582229614, 0.6366493105888367, 0.6059055328369141, -0.36944282054901123, 1.0552186965942383, -0.33435872197151184, 0.175157368183136, 0.31408262252807617, 0.3925659954547882, 0.4190545678138733, ...
def get _ frame _ preprocessor ( self, callbacks = ( ) ) : if'_ _ iter _ _'in dir ( callbacks ) : for func in callbacks : if not callable ( func ) : errmsg ='unrecognized callback type : { }'errmsg = errmsg. format ( type ( callbacks ). _ _ name _ _ ) raise typeerror ( errmsg ) def preprocess _ frame ( frame ) : for fu...
[ -0.2661237418651581, 0.18615783751010895, 0.6982156038284302, 0.14952293038368225, -0.22455301880836487, -0.544498085975647, -0.10618754476308823, -0.35341811180114746, 1.0580800771713257, -0.6567150354385376, 0.1356147974729538, 0.18494577705860138, -0.7800698280334473, 1.3232437372207642...
def load _ state _ dict ( self, state _ dict ) : # restore step, master weights and first / second moments self. _ step = state _ dict ['step'] self. _ fp32 _ p = state _ dict ['fp32 _ p']. to ( device = " cuda " ) self. _ fp32 _ m = state _ dict ['fp32 _ m']. to ( device = " cuda " ) self. _ fp32 _ v = state _ dict ['...
[ 0.42534834146499634, 0.07063104957342148, 0.5282601714134216, -0.1695934683084488, -0.6414591670036316, -0.09572192281484604, -0.2770078480243683, -0.09771818667650223, 0.23781806230545044, 0.3797571063041687, -0.4845723807811737, -0.8616883158683777, 0.10539290308952332, 0.262748956680297...
def load _ mnist _ train ( which, digits = np. arange ( 10 ) ) : if which = = " train " : data _ file ='train - images - idx3 - ubyte'label _ file ='train - labels - idx1 - ubyte'elif which = = " test " : data _ file ='t10k - images - idx3 - ubyte'label _ file ='t10k - labels - idx1 - ubyte'images = open ( data _ file,...
[ -0.9278555512428284, -0.16287371516227722, 0.714324951171875, -1.152220606803894, -0.28901076316833496, 0.02795756421983242, -0.050918154418468475, 0.4735143184661865, 0.16369909048080444, 0.663212776184082, 0.3926287889480591, 0.6823651790618896, -0.0697154700756073, -0.11817571520805359,...
def create _ tenant _ sub ( self, tenant, topic, sub ) : project _ name = tenant. upper ( ) url = self. get _ url ( " subscriptions ", sub, project _ name ) data = { " topic " : " projects / { } / topics / { } ". format ( project _ name, topic ) } return self. put _ resource ( url, data )
[ 0.3442443907260895, -0.03626454249024391, 0.1664443016052246, 0.45366108417510986, -0.13325490057468414, 1.1603621244430542, -0.9318787455558777, -0.28908446431159973, -0.4252490699291229, -0.1577383428812027, -0.34845903515815735, 0.2516058087348938, -0.7894207239151001, -1.12080347537994...
def login _ required ( fn ) : @ wraps ( fn ) def wrapper ( * args, * * kwargs ) : if'username'not in login _ session : flash ('please login to continue ','warning') return redirect ('/ login') else : return fn ( * args, * * kwargs ) return wrapper
[ -0.42904794216156006, -0.3873855769634247, 0.6107012033462524, 0.6271747946739197, -0.2738644480705261, 0.5163818597793579, -0.22428494691848755, 0.14339536428451538, 1.4255632162094116, 0.21308842301368713, 0.4057372212409973, 0.12858343124389648, 0.4890695810317993, -0.4859383702278137, ...
def config _ variables ( args ) : # begin log to keep track of program processes # read in config file and save all config variables to local variables in a dictionary process _ log ='\ n [ growth - pipe ]'+ datetime. now ( ). strftime ( " % y - % m - % d % h : % m " ) paths = { # general local variables'' :'','log fil...
[ 0.2541438639163971, -0.3597566783428192, 0.7845413684844971, -0.4025544822216034, -0.13862094283103943, 0.6074004173278809, 1.536139965057373, 0.0833859071135521, -0.3498988151550293, 0.49535736441612244, 0.02627861499786377, 0.3573690354824066, 0.42450812458992004, 0.6976866126060486, 0...
def testdeletevaluesforquerywithreadpermissiondenied ( self ) : userapi ( ). create ( [ ( u'fred ', u'password ', u'fred ', u'fred @ example. com') ] ) user = getuser ( u'username') permissions = cachingpermissionapi ( user ) tagapi ( user ). create ( [ ( u'fred / bar ', u'description') ] ) values = [ ( u'fred / bar ',...
[ 0.3035522401332855, 0.7757865786552429, 0.5848637819290161, 0.029747527092695236, 0.10923856496810913, 0.7573893666267395, -0.2390289008617401, -0.4900910258293152, -0.4808671474456787, -0.7683240175247192, 0.462390661239624, -0.2987756133079529, -0.05940011888742447, 0.6631657481193542, ...
def gen _ node _ name _ filter ( node _ names ) : return {'filter _ set _ type':'union ','filter _ set': [ {'filter _ type':'union ','node _ names': node _ names } ] }
[ -0.943851888179779, 0.4272903501987457, 0.35573965311050415, -1.5049761533737183, -0.38932138681411743, -0.14209769666194916, -0.5611672401428223, -0.03329053521156311, -0.6612216830253601, 0.8919557929039001, -0.40020474791526794, 0.6257776618003845, 0.9790558815002441, -0.160773977637290...
def until _ not ( self, method, message ='' ) : end _ time = time. time ( ) + self. _ timeout while true : try : value = method ( self. _ holder ) if not value : return value except exception : return true time. sleep ( self. _ poll ) if time. time ( ) > end _ time : break raise exception ( message )
[ -0.47541922330856323, 0.862750768661499, 0.37821468710899353, 0.2489597201347351, -0.5445724129676819, 1.119152545928955, -0.23687666654586792, -1.1610996723175049, -1.0138485431671143, 0.32463908195495605, 0.6867169737815857, 0.25713813304901123, -1.484796166419983, -0.22805152833461761, ...
def insert ( self, x1, x2 = none ) : if x2 is none : x2 = x1 # training continuation if self. kernel _ matrix is none : self. kernel _ matrix = self. kernel _ function ( x1, x2 ) self. kernel _ matrix _ inv = inv _ stable ( self. kernel _ matrix ) else : b = self. kernel _ function ( x1 [ - 1 ]. reshape ( 1, - 1 ), x2 ...
[ -0.18800148367881775, 0.33187422156333923, 1.0232340097427368, 0.10659576207399368, 0.18492461740970612, -0.644924521446228, 0.019978933036327362, 0.7859804630279541, -1.2438108921051025, 0.5683695673942566, -0.06703446805477142, 0.3909951448440552, -0.5562961101531982, -0.4588989615440368...
def logpost ( self, a, e, s ) : n0 = self. sc * 10 * * s - 1 # obtain the n0's, if self. d [ 0 ]. betabinom : # all are betbinom ll or not lp = sum ( [ self. d [ k ]. loglikelihoodbetabinom ( int ( n0 [ k ] ) ) for k in range ( self. k ) ] ) else : lp = sum ( [ self. d [ k ]. loglikelihood ( int ( n0 [ k ] ) ) for k in...
[ 1.0841540098190308, -0.49973782896995544, 0.8684622049331665, -0.6856632232666016, -0.11569974571466446, 0.12697769701480865, -0.2650364339351654, 0.8594890832901001, 0.1960896998643875, 0.1737152636051178, 0.007035935763269663, 0.1406758576631546, -0.24211594462394714, 0.44341355562210083...
def testdeletevaluesforquerywithillegalquery ( self ) : self. store. commit ( ) with login ( u'username ', uuid4 ( ), self. transact ) as session : deferred = self. facade. deletevaluesforquery ( session, u'has fluiddb / about ', [ u'username / unknown'] ) yield self. assertfailure ( deferred, tbadrequest )
[ 0.3031262457370758, 0.24364233016967773, 0.44970205426216125, 0.5524895787239075, -0.20303793251514435, 1.0966899394989014, -0.391935259103775, -0.3885762393474579, 0.13544513285160065, -0.6594803333282471, 0.9307073354721069, -0.3767171800136566, 0.15604093670845032, 1.1124848127365112, ...
def execute _ query ( query ) : try : db = psycopg2. connect ( database = dbname ) c = db. cursor ( ) c. execute ( query ) result = c. fetchall ( ) db. close ( ) return result except ( exception, psycopg2. databaseerror ) as error : print ( error ) finally : if c is not none : db. close ( )
[ -0.16041253507137299, -0.12832745909690857, 0.5358942151069641, 0.30103734135627747, -0.13101674616336823, -0.23327156901359558, -0.952921986579895, -0.6110785603523254, 0.14901013672351837, 0.5076625943183899, 0.8492311835289001, -0.6991738080978394, -1.1660228967666626, -0.06025714427232...
def test _ trivial ( self ) : self. assertequal ( text. assembleformattedtext ( a. normal ['hello, world.'] ),'hello, world.')
[ 0.05483907833695412, -1.014204978942871, 0.30082058906555176, -0.10545957833528519, -0.3383367955684662, 0.867652177810669, -0.1888331174850464, 0.35883885622024536, 0.8369120359420776, -0.3559918701648712, 0.2474430799484253, -0.19070741534233093, -0.8596543073654175, -0.07703100889921188...
def high _ pass _ subtraction ( dtrend, width = 360 ) : # - - print status. tstart = start ( " high pass subtraction. " ) lcs _ hp = gf ( dtrend, ( 0, width ) ) lcs _ diff = dtrend - lcs _ hp # - - print status. finish ( tstart ) return lcs _ diff
[ -0.19452789425849915, -0.1609332263469696, 0.4707369804382324, -0.14671273529529572, -0.029871726408600807, 0.30029019713401794, 0.42573270201683044, -0.5064298510551453, -0.29604434967041016, -1.2572271823883057, -0.8201816082000732, -0.12176747620105743, -0.4208683371543884, -0.515534818...
def contactlistupdated ( self, clview ) : self. _ main. send ( " contactlistupdated ", clview. group _ ids ) pass
[ -0.9602541327476501, -0.8701101541519165, 0.05909263715147972, 0.6480057239532471, -0.5789847373962402, -0.23839159309864044, 0.3320845067501068, -0.3556540906429291, 0.5375999212265015, 0.6187470555305481, -0.6148739457130432, 0.061506904661655426, -0.27094900608062744, 0.0265379920601844...
def resize _ image ( self, img : image ) - > image : img _ w, img _ h = img. size frame _ w, frame _ h = self. w / 1. 05, self. h / 1. 4 ratio = min ( 1, frame _ w / img _ w, frame _ h / img _ h ) new _ img _ w, new _ img _ h = int ( img _ w * ratio ), int ( img _ h * ratio ) return img. resize ( ( new _ img _ w, new _...
[ -0.22935570776462555, 0.11693628877401352, 0.6047928929328918, 0.3081831932067871, -0.33220595121383667, -0.4786210060119629, 0.24371130764484406, -0.4924205243587494, 0.35722512006759644, -0.17902587354183197, 0.3595746159553528, -0.5415247082710266, -0.3736833333969116, 1.133572459220886...
def use _ delegation ( self, msg ) : cost = msg ['cost'] * self. convert _ ratio transaction _ id = msg ['transaction _ id'] if transaction _ id in self. delegations and self. delegations [ transaction _ id ]. is _ valid ( ) \ and cost = = self. delegations [ transaction _ id ]. cost \ and cost < = self. balances [ sel...
[ 0.663987934589386, 0.33078664541244507, 0.6920562982559204, -0.27675822377204895, -0.18735815584659576, -0.24920892715454102, -0.10852320492267609, -0.04174768552184105, 0.1283433884382248, 0.5241147875785828, 0.2123955488204956, -0.14325948059558868, -0.7223717570304871, -0.06497123092412...
def mlp _ forward _ prop ( num _ registers, num _ layers, gates, registers, params ) : debug = { } # extract 0th component from all registers. last _ layer = registers [ :, :, 0 ] debug ['input'] = last _ layer # propogate forward to hidden layers. idx = 0 for i in range ( num _ layers ) : w, b, idx = take ( params, id...
[ 0.5914446711540222, -0.1385229080915451, 0.6385158896446228, -0.653615415096283, 0.40059757232666016, -0.8259975910186768, 0.6224077343940735, 0.10152769088745117, -0.3271934986114502, 0.45557641983032227, -0.36622604727745056, 0.16898928582668304, -0.0668392926454544, -0.1722918152809143,...
def current _ version ( cfr _ title, cfr _ part ) : year = date. today ( ). year vol = find _ volume ( year, cfr _ title, cfr _ part ) if vol is none : year - = 1 vol = find _ volume ( year, cfr _ title, cfr _ part ) logger. info ( " getting current version - % s cfr % s, year : % s ", cfr _ title, cfr _ part, year ) c...
[ 0.32296186685562134, -1.2888572216033936, 0.5933013558387756, -0.044361330568790436, 0.359202116727829, 0.01344996877014637, -0.24672812223434448, -0.23859122395515442, -0.9328694939613342, 0.3013076186180115, 0.4131200611591339, 0.2886865735054016, -0.4380366802215576, 0.1619536429643631,...
def get _ name _ page ( ) : city _ url = " http : / / www. infoplease. com / toptens / largestcities. html " response = requests. get ( city _ url ) # requests page info if response. status _ code = = 404 : # in case the page doesn't exist ( testing purpose ) print ( " sorry, this page doesnt work " ) data _ from _ url...
[ 0.08699069172143936, -0.42081698775291443, 0.70718914270401, -0.2474389672279358, -0.10692408680915833, 0.525536060333252, -1.1053069829940796, 0.1745581328868866, 0.14325854182243347, 0.5254216194152832, -0.23218858242034912, -0.6163540482521057, -0.08666682988405228, -0.1888594925403595,...
def _ cascade _ save ( db _ vios, context, db _ session ) : msg = ( ras. vif _ get _ msg ('info ','reconcile _ save _ start') % {'host': db _ vios. get _ host _ name ( ),'vios': db _ vios. lpar _ id } ) ras. trace ( log, _ _ name _ _, ras. trace _ debug, msg ) # loop through the veas... for vea in db _ vios. get _ all ...
[ -0.42340904474258423, -0.2654523253440857, 0.730082631111145, 0.0849752277135849, 1.4768400192260742, -0.1310987025499344, 0.20610037446022034, 0.24154308438301086, 1.3334219455718994, 0.5878167152404785, -0.436284601688385, -0.2297414094209671, -0.3167600631713867, 0.6323351263999939, 0...
def get _ verts ( voxel, g ) : ( i, j, k ) = voxel dx, dy, dz = g [ " dx " ], g [ " dy " ], g [ " dz " ] v1 _ 0, v1 _ 1, v1 _ 2 = g [ " xlo " ] + i * dx, g [ " ylo " ] + j * dy, g [ " zlo " ] + k * dz vertices = [ ( v1 _ 0, v1 _ 1, v1 _ 2 ), ( v1 _ 0 + dx, v1 _ 1, v1 _ 2 ), ( v1 _ 0 + dx, v1 _ 1 + dy, v1 _ 2 ), ( v1 _ ...
[ 0.1222548633813858, 0.24106113612651825, 0.7956825494766235, -0.18770723044872284, 0.3078784942626953, -0.08349411934614182, -0.14696736633777618, -0.19885382056236267, -0.2985115051269531, 0.6611809134483337, -1.176727533340454, -0.3560146987438202, 0.048392847180366516, -0.57125794887542...
def git _ get _ sha1 ( self ) : for data in commands. ls _ files ( repo = self. repo, index = self. index, path = self. path, children = false, ) : if data ['path']! = self. path : continue return data ['object'] # not found raise oserror ( errno. enoent, os. strerror ( errno. enoent ), )
[ 0.31769853830337524, -0.44198012351989746, 0.6810007095336914, 0.2848776876926422, 0.04016464576125145, 0.43236997723579407, 0.4175555408000946, -0.6556963920593262, -0.5116005539894104, -0.13302664458751678, 0.42868781089782715, 0.36429110169410706, -0.5976148247718811, -0.752022743225097...
def _ _ init _ _ ( self ) : # the convnet self. name = none self. net = none # caffe prototxts self. deploy _ model = none self. featex _ model = none self. train _ model = none self. solver = none # caffe binary caffemodel self. pretrained = none self. snapshot = none # mean value for imagenet self. mean = none # fine...
[ 0.1500547230243683, 0.20480744540691376, 0.47130221128463745, 0.32916298508644104, 0.464650422334671, -0.38403046131134033, 0.04576076939702034, -0.12934298813343048, -0.3862074911594391, -0.6180247664451599, -0.9215234518051147, -0.2737928628921509, -0.326526015996933, 0.7561339735984802,...
def entity _ ref ( obj, incomplete = false ) : from entityfk. providers import get _ providers for provider in get _ providers ( ) : try : result = provider. to _ ref ( obj ) if result [ 1 ] is none and not incomplete : # you either provided a class or the provider implementation # is broken. it should throw an excepti...
[ -0.11377044022083282, -0.3354945182800293, 0.5366529822349548, -0.16871535778045654, 0.25778499245643616, -0.46792200207710266, 0.7210938334465027, -0.37137842178344727, 0.7216554880142212, 0.9275193214416504, 0.2618980407714844, 0.5294079184532166, -0.6119285225868225, 0.3544374704360962,...
def expiration ( self, expiration ) : self. _ expiration = expiration
[ 0.03922635316848755, -0.1436750888824463, -0.22605174779891968, 0.7176810503005981, -0.10291925072669983, 0.11252404749393463, -0.39506542682647705, 0.63372403383255, 0.1513948291540146, 0.49696651101112366, -1.0316081047058105, -1.0605778694152832, 0.7933759689331055, 0.5975729823112488, ...
def mixture _ power _ spherical _ density ( x, mu _ list, k _ list ) : log _ return _ value = 0 log _ ps = torch. tensor ( [ ] ) nr _ mixtures = len ( mu _ list ) for mu, k in zip ( torch. tensor ( mu _ list ), torch. tensor ( k _ list ) ) : # log _ pi = powerspherical ( mu, k ). log _ prob ( x ) log _ pi = log _ power...
[ 0.4281449317932129, -0.5193129777908325, 0.6214168667793274, 0.5744516849517822, -0.8926598429679871, 0.37273305654525757, -1.1291104555130005, 1.2839025259017944, 0.605364203453064, 0.12087471783161163, 0.2727848291397095, 0.14977319538593292, 0.0007525324472226202, -0.06674723327159882, ...
def default _ walk ( self ) : return self. _ default _ walk
[ -0.6399449706077576, 0.049426157027482986, 0.09924373775720596, 0.7888139486312866, 1.4365066289901733, 1.6182774305343628, 0.8461278080940247, -0.6932974457740784, -0.2204330861568451, -1.9110909700393677, -0.5594512820243835, -0.3880297839641571, -1.1018483638763428, 0.21818098425865173,...
def get _ run _ manager ( self ) : try : self. _ run _ manager. services _ db. table _ exists ('run _ activity') except : # connection has gone away, re - create run _ manager self. _ run _ manager = runmanager ( self. services _ db _ config ) return self. _ run _ manager
[ -0.5892640352249146, -0.3100700080394745, 0.35966986417770386, -0.05721144378185272, 0.3405441343784332, -0.057268720120191574, -0.44433948397636414, -0.8265177607536316, -0.07252506166696548, -1.3891500234603882, 0.6636745929718018, 0.3085196018218994, -1.4015707969665527, 0.0975030437111...
def get _ titles ( ) : query = " select articles. title, count ( log. path ) as views \ from articles left join log \ on articles. slug = replace ( log. path,'/ article / ','' ) \ group by log. path, articles. title \ order by views desc \ limit 3 ; " result = execute _ query ( query ) print ( " \ ntop 3 articles by vi...
[ 1.1493481397628784, 0.2303393930196762, 0.7874821424484253, -0.5146042108535767, -0.07826472073793411, -0.09237407892942429, -0.4076092541217804, -0.01512342318892479, -0.6536633372306824, 0.012446233071386814, 0.46741795539855957, 0.2922978103160858, 0.04252644255757332, -0.96471762657165...
def getnews ( self, memoize = false ) : self. titles = [ ] print ( " input newssite = " + self. source ) print ( " output file = " + self. output ) paper = newspaper. build ( self. source, memoize _ articles = memoize ) for articles in paper. articles : try : articles. download ( ) articles. parse ( ) print ( articles....
[ -0.1374201476573944, 0.32328635454177856, 0.18644027411937714, 0.036787066608667374, -0.22368104755878448, -0.19384439289569855, -0.5465055704116821, 0.1447758674621582, 0.10277364403009415, -0.868893563747406, -0.5427594780921936, -0.16664433479309082, -0.23543423414230347, 0.882807493209...
def is _ clear _ drawn ( self, coords, auto = false ) : copy _ coords = list ( coords ) if auto : coords = set ( ) for c _ temp in copy _ coords : for y, x in ( ( - 1, 0 ), ( 1, 0 ), ( 0, 1 ), ( 0, - 1 ), ( 1, 1 ), ( - 1, - 1 ), ( 1, - 1 ), ( - 1, 1 ), ( 0, 0 ) ) : coords. add ( ( c _ temp [ 0 ] + y, c _ temp [ 1 ] + x...
[ -0.8215109705924988, -0.12420831620693207, 0.9303357005119324, -0.6439697742462158, -1.1134006977081299, 0.766986072063446, 0.19235080480575562, -0.5339310765266418, -0.2549360692501068, 0.4397220015525818, -0.10545226186513901, 0.058793846517801285, -0.3442762792110443, 0.0170749742537736...
def _ set _ ghparameters ( parlist, default, deggh ) : if parlist is none : parlist = default # # replicate the parlist with the right size first newparlist = [ parlist [ 0 ] ] * deggh # # now computing the length of the input parlist lparlist = len ( parlist ) # # and completing it with the right default if needed new...
[ -0.22175735235214233, 0.8072027564048767, 0.5263301134109497, -0.21500590443611145, 0.6067731976509094, 0.7872212529182434, -1.0245949029922485, 0.34340715408325195, -0.5683863162994385, 1.1354215145111084, -0.7378886938095093, -0.06688816100358963, -1.2708897590637207, 0.6305207014083862,...
def ntk _ fn ( x1 : pytree, x2 : optional [ pytree ], params : pytree, * * apply _ fn _ kwargs ) - > np. ndarray : args1, args2, fx1, fx2, fx _ axis, keys, kw _ axes, x _ axis = _ get _ args ( f, apply _ fn _ kwargs, params, vmap _ axes, x1, x2 ) def get _ ntk ( x1, x2, * args ) : f1, f2 = _ get _ f1 _ f2 ( f, keys, x ...
[ 0.2173915058374405, 0.34227243065834045, 0.9742268919944763, 0.23227153718471527, -0.46657392382621765, -0.8576622605323792, -0.14083044230937958, -0.2880701422691345, -0.8292858600616455, 0.7916224002838135, -0.2631900906562805, 0.5161915421485901, 0.8575542569160461, -0.2476733922958374,...
def test _ contingency _ grouping _ conth ( self ) : cont _ name ='test h'circuit _ data, tx2 _ data, tx3 _ data, busbars, fixed _ shunts, switched _ shunts = self. contingency _ data. group _ contingencies _ by _ name ( cont _ name ) self. asserttrue ( len ( circuit _ data ) = = 1 ) self. asserttrue ( len ( tx2 _ data...
[ 0.27061957120895386, 0.22927899658679962, 0.4031955301761627, -0.46966829895973206, 0.21139968931674957, 0.5843632221221924, 1.1116156578063965, 0.4073930084705353, -0.1757514923810959, -0.1279744952917099, -0.6423951387405396, -0.4003746211528778, -1.1863682270050049, 0.15628963708877563,...
def get _ vocab ( self ) : data _ dir = self. data _ dir files = os. listdir ( data _ dir ) files = [ data _ dir + f for f in files ] ite _ str ='dialog - babi - task'files = [ f for f in files if ite _ str in f ] # for i, f in enumerate ( files ) : # print ('reading from file { } : { } '. format ( i, f ) ) data = [ ] ...
[ 0.21823184192180634, -0.32138821482658386, 0.6758567690849304, -0.48958420753479004, -0.25432339310646057, -0.27890655398368835, 0.700182318687439, 0.9867321252822876, -0.893436849117279, 0.32910099625587463, -0.6948544383049011, -0.46859532594680786, 0.19718347489833832, 1.028597712516784...
def first _ available _ recording _ unit ( self, i ) : for unit in self. units [ i ] : if not ( unit is none ) : return unit
[ -0.6763272285461426, -0.10412339866161346, 0.8138400912284851, -0.6315934062004089, 0.5855393409729004, 0.09577938169240952, 0.15843920409679413, -0.49013590812683105, 0.31482380628585815, -0.02737152762711048, 0.2274402230978012, 0.02803817205131054, -1.1092569828033447, 0.048274897038936...
def test _ no _ ffill ( self ) : def mock _ get _ prices ( * args, * * kwargs ) : dt _ idx = pd. datetimeindex ( [ " 2018 - 03 - 31 ", " 2018 - 06 - 30 " ] ) fields = [ " eps " ] idx = pd. multiindex. from _ product ( [ fields, dt _ idx ], names = [ " field ", " date " ] ) prices = pd. dataframe ( { " fi12345 " : [ 9, ...
[ -0.2797052264213562, 0.7308367490768433, 0.7050567269325256, -1.1127169132232666, 0.18033096194267273, 0.46451622247695923, 0.35105693340301514, -0.5146546363830566, -0.019247477874159813, -0.6827518343925476, -0.003851688699796796, 0.060935430228710175, -0.14962118864059448, -0.0017235877...
def decode _ html ( text, location = none ) : decoder = get _ decoder ( none,'text / html') return decoder. decode ( text, location )
[ -0.23080691695213318, -0.0012502551544457674, 0.09995041787624359, 0.42868995666503906, -0.9311637878417969, -0.3139696717262268, -0.8700793385505676, 1.3874883651733398, 0.10271763801574707, -0.13947813212871552, -0.10833754390478134, -0.02056763507425785, -0.3605955243110657, -0.29455554...
def hide ( self ) : raise notimplementederror
[ -0.13695767521858215, -0.14593291282653809, 0.5153290629386902, 0.70362389087677, -0.21128031611442566, 1.6836373805999756, 0.9375327229499817, -0.18796361982822418, -0.39780691266059875, -0.4890073835849762, -0.021096626296639442, 0.1408756822347641, -0.03295160084962845, -0.0486112348735...
def centers ( axis, dimlen ) : ax = axis. astype ( np. float64 ) if ax. shape [ 0 ] = = dimlen + 1 : return ( ax [ : - 1 ] + ax [ 1 : ] ) / 2 else : assert ax. shape [ 0 ] = = dimlen return ax
[ 0.31478461623191833, -0.03874801844358444, 0.33404916524887085, 0.1546134054660797, 0.12346989661455154, -0.47233155369758606, -0.23884832859039307, -0.6443423628807068, 0.6977573037147522, 0.9494099617004395, 0.45668336749076843, 0.8406163454055786, -0.19275400042533875, -0.5990030169487,...
def close ( self ) : # import traceback, sys ; traceback. print _ stack ( file = sys. stdout ) assert self. _ closed is false,'progress listener was closed twice! uncomment the line above to debug this'self. _ closed = true
[ 0.3589347302913666, -0.6575182676315308, 0.48525768518447876, -0.5510506629943848, 0.3048836886882782, 1.5403730869293213, 0.878073513507843, -1.1117544174194336, -0.9976676106452942, -0.9690080285072327, 0.18633714318275452, -0.22928203642368317, -1.099507451057434, 1.2169749736785889, ...
def ysireadernaivedatetime _ test ( ) : ysi _ test _ file _ path = ysi _ test _ files _ path +'/ bayt _ 20070323 _ cdt _ ys1772aa _ 000. dat'ysi _ reader = ysi. ysireader ( ysi _ test _ file _ path ) assert ysi _ reader. dates! = [ ]
[ 0.5478248596191406, -0.3966200351715088, 0.5563629865646362, -0.7848579287528992, -0.3608417809009552, 0.6497161388397217, -0.4039682447910309, -0.6655620336532593, 0.03337353095412254, -0.20841611921787262, -0.44019848108291626, 0.3357061445713043, 0.31599903106689453, 0.02111619338393211...
def next ( self ) : try : if data. isfirst ( self ) : return self. storage [ self. currentitem ] [ 0 ], self. storage [ self. currentitem ] [ 1 ] else : self. currentitem - = 1 return self. storage [ self. currentitem ] [ 0 ], self. storage [ self. currentitem ] [ 1 ] except indexerror : pass
[ -0.8360686302185059, -0.32895708084106445, 0.6909305453300476, 0.5882230997085571, -0.5020935535430908, 0.07202775031328201, 0.10745204240083694, -0.2654018700122833, -0.04058142378926277, -0.3289203643798828, -0.3981972932815552, 0.08488832414150238, -0.9422189593315125, 0.331360906362533...
def cb _ allselected ( index, fieldvalues ) : inclenabled = not int ( fieldvalues [ index ] ) and ael _ variables [ index ] [ 9 ]! = 0 excludedenabled = not inclenabled includedindex = index + 1 excludedindex = includedindex + 1 fieldvalues = setvarvalue ( includedindex, fieldvalues, inclenabled,'' ) fieldvalues = setv...
[ 0.5196018815040588, -0.3114255964756012, 0.45833995938301086, -0.4221649765968323, -0.43525248765945435, -0.3819062113761902, 0.44219353795051575, 0.4652089774608612, 0.8772093653678894, -0.018042653799057007, -0.8385549783706665, 0.4885343015193939, -0.1483374387025833, -0.275360703468322...
def host ( self ) : log, barreleye _ instance = init _ env ( self. _ bsc _ config _ fpath, self. _ bsc _ logdir, self. _ bsc _ log _ to _ file ) server = barreleye _ instance. bei _ barreleye _ server log. cl _ stdout ( server. bes _ server _ host. sh _ hostname ) cmd _ general. cmd _ exit ( log, 0 )
[ 0.0702349916100502, -0.6342286467552185, 0.7941795587539673, 0.03514491766691208, 0.4901030659675598, 0.6460449695587158, 0.27338463068008423, 0.8283339738845825, -1.2623584270477295, 0.47496986389160156, 0.19403678178787231, 1.166566014289856, -0.7316836714744568, -0.048737820237874985, ...
def test _ request _ article ( self ) : # mock the request so no outbound http call is made session = magicmock ( ) session. get = magicmock ( ) session. get. return _ value. text = self. sample _ money session. get. return _ value. ok = true session. get. return _ value. url = ( " https : / / money. cnn. com / 2018 / ...
[ -0.41643062233924866, 0.7591500878334045, 0.6529524922370911, 0.17761842906475067, 0.5128355622291565, -0.3827996253967285, -0.17569808661937714, -0.2784247398376465, 0.2871968448162079, -0.2829686999320984, 0.4597572684288025, 0.2177831083536148, 0.0319020077586174, -0.040755320340394974,...
def net _ quantity ( self ) : return self. buy _ quantity - self. sell _ quantity
[ -1.063415288925171, -0.8031989932060242, 0.5668891668319702, 0.11833015829324722, 1.0123920440673828, 0.4095218777656555, 0.3958333432674408, -0.921404242515564, 0.12715713679790497, -0.672552227973938, -0.9445412755012512, -0.16242976486682892, 0.8513456583023071, -0.17669104039669037, ...
def test _ 03 _ delete _ all _ datadisks ( self ) : volumes = list _ volumes ( self. apiclient, listall = true ) for s in volumes : try : if s. virtualmachineid is none : cmd = deletevolume. deletevolumecmd ( ) cmd. id = s. id self. apiclient. deletevolume ( cmd ) except exception as e : continue
[ 0.49366116523742676, -0.24167978763580322, 0.618729829788208, 0.7835599184036255, 1.3010878562927246, -0.29321685433387756, -0.48492950201034546, 0.2399643361568451, 0.5739688873291016, -0.8898587822914124, 0.08752541989088058, 0.2708203196525574, -0.5172395706176758, 0.801740825176239, ...
def selection _ firmware _ validation ( self ) : signature _ validation ( )
[ -0.23903384804725647, -0.5520342588424683, -0.131307452917099, 1.7104934453964233, -0.333881676197052, -0.5044929385185242, 2.01393461227417, -0.06285082548856735, -0.0394199937582016, 0.1771811544895172, -0.006508089601993561, -0.6457310914993286, -0.626480221748352, 1.3894987106323242, ...
def savedata ( ) : try : date _ time = time _ now. strftime ( " % m _ % d _ % y _ _ % h _ % m _ % s " ) save _ db = pd. read _ sql ( " select * from logs ", times _ database ) save _ db. to _ csv ( f'{ date _ time }. csv ', index = false ) messagebox. showinfo ( " success ", " file created " ) except exception as e : m...
[ -0.32201656699180603, 0.500442385673523, 0.9110898375511169, 0.30810675024986267, 0.8171013593673706, 0.9445202350616455, -0.4209548234939575, -0.16326507925987244, -1.498392939567566, -0.0036638842429965734, -0.20193986594676971, 0.7017645835876465, -0.22840817272663116, 0.695554316043853...
def fix _ missing ( sensor _ d, sensor, r _ list ) : for i in r _ list : trange = i [ - 1 ] - i [ 0 ] + 1 first = i [ 0 ] last = i [ - 1 ] before = sensor _ d [ sensor ] [ 1 ] [ first - 1 ] after = sensor _ d [ sensor ] [ 1 ] [ last + 1 ] pv = before + after newl = [ x for x in pv if x! ='-'] nnewl = [ x for x in newl ...
[ -0.5799970030784607, -0.2708559036254883, 0.7607901692390442, 0.2985251545906067, 0.17807018756866455, 0.16805776953697205, -0.27678751945495605, 0.7633781433105469, 0.1927558183670044, 0.5015384554862976, -0.4601910412311554, 0.21835266053676605, -0.13777440786361694, 0.4235951602458954, ...
def project ( self, project ) : self. _ project = project
[ -0.37350335717201233, 0.6365232467651367, -0.22651168704032898, 0.5765530467033386, 0.068904809653759, 0.8939163088798523, 0.1959642916917801, 0.6985263228416443, -0.5850337743759155, -0.13048489391803741, -0.6865710616111755, -0.46858230233192444, -0.2944340705871582, 0.1383620947599411, ...
def hgvs _ justify _ indel ( chrom, offset, ref, alt, strand, genome ) : if len ( ref ) = = len ( alt ) = = 0 : # it's a snp, just return. return chrom, offset, ref, alt if len ( ref ) > 0 and len ( alt ) > 0 : # complex indel, don't know how to justify. return chrom, offset, ref, alt # get genomic sequence around the ...
[ -0.13306282460689545, -0.4449121356010437, 0.8722144961357117, -0.26937833428382874, -0.6767488718032837, 0.6322759985923767, 0.24296851456165314, 0.4345890283584595, 0.048918455839157104, 0.38968250155448914, 0.42385080456733704, 0.4996611773967743, -0.446615993976593, -0.0742078572511673...
def test _ wb _ update _ kwargs ( self ) : r = rectangle ( 1, 1, 0, 0, 1 ) self. assertequal ( str ( r ), " [ rectangle ] ( 1 ) 0 / 0 - 1 / 1 " ) r. update ( height = 10 ) self. assertequal ( str ( r ), " [ rectangle ] ( 1 ) 0 / 0 - 1 / 10 " ) r. update ( width = 11, x = 2 ) self. assertequal ( str ( r ), " [ rectangle...
[ -0.1969357281923294, -0.6915944218635559, 0.8617806434631348, 0.06020541116595268, -0.6496930718421936, -0.05293058604001999, -0.06729084998369217, -1.0076920986175537, 0.3590869605541229, 0.38351356983184814, -0.22977259755134583, -0.6770410537719727, -1.1654083728790283, 0.27231490612030...
def report ( ) : rpt = " donor name | total given | num gifts | average gift \ n " + \ " - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ n " for key, value in sorted ( db. items ( ), key = sortby _ amt, reverse = true ) : try : rpt = rpt + " ...
[ 1.1357052326202393, 0.4330080449581146, 0.7489374876022339, -0.9436676502227783, -0.40875470638275146, 0.5964058041572571, 0.393898606300354, -1.145801305770874, -0.5847648978233337, 0.27310508489608765, 0.6927940845489502, -0.13365378975868225, -0.056407634168863297, 0.46622246503829956, ...
def initialize ( self ) : return self
[ 0.21290387213230133, -1.2723374366760254, 0.30816924571990967, 0.11040723323822021, 0.26482248306274414, 0.6038498878479004, 0.3472194969654083, -0.15209852159023285, 0.4884296953678131, -1.820157766342163, -0.7129862904548645, 0.17761799693107605, -0.8281752467155457, 0.024692270904779434...
def bit _ length ( n ) : k = 0 try : if n > 0 : k = n. bit _ length ( ) except attributeerror : # in python2. 6, bit _ length does not exist k = 1 + int ( numpy. log2 ( abs ( n ) ) ) return k
[ 0.05007167160511017, 0.46234598755836487, 0.4742698073387146, 0.6906701326370239, -0.16646841168403625, 0.5298855900764465, 0.6120264530181885, -0.13537351787090302, 0.3180648982524872, -0.019933992996811867, 0.1700340360403061, -0.3528871536254883, 0.5542473196983337, 0.9894813895225525, ...
def was _ enqueued ( self ) : return self. _ _ enqueued
[ 0.964190661907196, -0.47213587164878845, 0.6834174394607544, -0.7085436582565308, 0.46926864981651306, 0.5237568020820618, -0.2917279601097107, -0.3407552242279053, 0.2430332601070404, -0.23496675491333008, -0.5207322835922241, 0.9963430166244507, 0.5370229482650757, 0.6296982169151306, ...
def cross _ check ( minmax, tags _ on, tags _ off, width = 30, sig = 2 ) : # - - print status. tstart = start ( " cross check ons and offs. " ) # - - set up filters mean _ diff = ( ( np. arange ( 2 * width ) > = width ) * 2 - 1 ) / float ( width ) mean _ left = 1. 0 * ( np. arange ( 2 * width ) < width ) / float ( widt...
[ 0.006342426873743534, -0.16643144190311432, 0.7472571134567261, -0.3326932191848755, -0.6937829256057739, 0.2692070007324219, -0.6615362167358398, -0.20712344348430634, 0.08362985402345657, 0.4881913959980011, -0.3778783082962036, 0.2978720963001251, 0.34077227115631104, 0.9042884707450867...
def vector _ list _ diff ( vecs1, vecs2 ) : diff = 0. 0 if len ( vecs1 )! = len ( vecs2 ) : raise assertionerror ( " error : vectors must be of equal length! exiting... " ) for ii, vec1 in enumerate ( vecs1 ) : diff + = np. linalg. norm ( vecs2 [ ii ] - vec1 ) return diff
[ -0.3067660629749298, -0.4553065598011017, 0.6120285391807556, 0.19506146013736725, 0.13937930762767792, 0.6655952334403992, 0.23430326581001282, 0.028322827070951462, 0.6184794902801514, 0.5564651489257812, -0.7811177372932434, 0.09187478572130203, -0.33661794662475586, 0.9317350387573242,...
def check _ s3 ( self, bucket, key, args ) : assert _ in ( bucket, self. mock _ s3 _ fs ) assert _ in ( key, self. mock _ s3 _ fs [ bucket ] ) contents = self. mock _ s3 _ fs [ bucket ] [ key ] # we run " echo " in place of mysqldump, so the key's contents # should just be the arguments we passed to echo assert _ equal...
[ -0.6309515237808228, -0.029612600803375244, 0.5276347994804382, -0.07634173333644867, 0.23262177407741547, 0.5447841286659241, -0.6318964958190918, 0.08028323948383331, 0.009248184971511364, -0.04487915337085724, 0.3734525740146637, -0.08463267982006073, -0.47243356704711914, 0.07772317528...
def _ _ hash _ _ ( self ) : return hash ( tuple ( self. state ) )
[ -0.06466797739267349, -0.1836744099855423, 0.39531511068344116, -0.8480382561683655, -0.06070524826645851, 0.5704292058944702, -0.5510979890823364, -0.027869349345564842, 0.3858873248100281, -0.4220234155654907, -0.6484454274177551, -0.6370176672935486, -0.019361484795808792, -1.2527425289...
def include _ subidx _ path ( self, paths _ to _ add : union [ str, list [ str ] ] ) : if isinstance ( paths _ to _ add, str ) : paths _ to _ add = [ paths _ to _ add ] for subidx _ path in paths _ to _ add : if p. isfile ( subidx _ path ) and str ( subidx _ path ). endswith ( '. index') : n _ vect = faiss. read _ inde...
[ -0.16812218725681305, 0.46593037247657776, 0.7390736937522888, 0.919377326965332, 0.1690731942653656, 0.769110918045044, 0.7695001363754272, 0.2667481601238251, 0.3299514055252075, 0.09373296052217484, -0.47550663352012634, -0.3493744432926178, 0.18217867612838745, -0.20573005080223083, ...
def load _ model ( self, model _ name : str, headers : dict [ str, t. any ] =..., config : str =..., files : dict [ str, str ] =..., ) - > none :
[ -0.6966885328292847, -0.10083098709583282, 0.4277779757976532, -0.15757834911346436, -0.33294546604156494, 0.09088215231895447, -0.7243152856826782, -0.015048801898956299, -1.1082212924957275, 0.4237109422683716, -0.9300748109817505, -0.7551715970039368, 0.15336185693740845, -0.25751844048...