text
stringlengths
25
2.19k
embedding
listlengths
768
768
def receive ( self, response ) : try : if response. code > 399 and response. code < 500 : return {'status': response. code,'value': response. read ( ) } body = response. read ( ). replace ('\ x00 ','' ). strip ( ) content _ type = response. info ( ). getheader ('content - type') or [ ] if'application / json'in content ...
[ -0.8234648108482361, -0.737054705619812, 0.8852441310882568, -0.29798445105552673, -0.7067438960075378, -0.5298110246658325, -0.6888311505317688, -0.2876324951648712, 0.17045846581459045, -0.35853591561317444, -0.25875839591026306, -0.3055325448513031, -0.29520493745803833, 0.7108918428421...
def extract _ rmlst _ genes ( assembly _ one, assembly _ two, rmlst _ folder, genes _ to _ ignore ) : total _ num _ snps = 0 for i in range ( 1, 10 ) : fasta _ file = os. path. join ( rmlst _ folder,'bact00000'+ str ( i ) + '. tfa') if os. path. exists ( fasta _ file ) and os. path. split ( fasta _ file ) [ 1 ] not in ...
[ 0.2476564198732376, -0.08842865377664566, 0.9721894264221191, 0.05188628286123276, 0.5471673011779785, -0.19318436086177826, 0.3829137980937958, 0.8371426463127136, 0.3198055624961853, 0.6612679958343506, -1.0980693101882935, 0.11306304484605789, -0.22171112895011902, -0.05788937583565712,...
def column _ resized ( self, index : int, old _ size : int, new _ size : int ) : self. rescale _ images ( tabledimension. column, index )
[ -0.184841126203537, -0.2487540990114212, 0.39216741919517517, 0.31553640961647034, 0.39380940794944763, -1.1064273118972778, -0.23247164487838745, -0.5008456707000732, -0.8268521428108215, 0.7931317090988159, -0.670857310295105, 0.479983389377594, 0.4314962923526764, -0.4189685583114624, ...
def cli ( ) : # load the argument options options = load _ options ( ) # configure root logger to print to stderr logger = logging. getlogger ( _ _ name _ _ ) root _ logger = configure _ stream ( level = " debug " ) log _ formatter = logging. formatter ( " % ( asctime ) s [ % ( levelname ) - 5. 5s ] % ( message ) s " )...
[ 0.7478591203689575, -0.266347199678421, 0.9386962652206421, 0.19126218557357788, 0.24438387155532837, -0.08915578573942184, -0.05000172182917595, -0.3335907459259033, -0.27802810072898865, 0.14049355685710907, 0.4556739926338196, 1.185577630996704, -0.28299790620803833, 0.8103691935539246,...
def pointer ( self ) : return self. _ _ capsule _ pointer
[ -0.14026926457881927, -1.624135971069336, 0.5894103646278381, -0.6158106923103333, 0.08064920455217361, 0.904829204082489, 0.38305118680000305, -0.92886883020401, 1.280513882637024, 0.17361463606357574, 1.0588464736938477, 0.3278678357601166, -1.0392482280731201, -0.2462742030620575, 1.0...
def wide _ resnet50 _ 2 ( pretrained = false, progress = true, * * kwargs ) : kwargs ['width _ per _ group'] = 64 * 2 return _ resnet ('wide _ resnet50 _ 2 ', bottleneck, [ 3, 4, 6, 3 ], pretrained, progress, * * kwargs )
[ -0.8805420994758606, -0.07078512758016586, 0.43543535470962524, 0.3947795629501343, -1.0967079401016235, -0.7170265316963196, -0.13801854848861694, 0.06307943910360336, 0.1507026106119156, -0.35927248001098633, -0.5830554366111755, 0.055331844836473465, -0.30638131499290466, 0.202018484473...
def _ _ init _ _ ( self, task _ name : str, read _ dtss _ address : str, read _ ts : sequence [ st. timeseries ], read _ period : datacollectionperiodbase, store _ dtss _ address : str, store _ ts _ ids : sequence [ str ] ) - > none : self. name = task _ name self. read _ dtss _ address = read _ dtss _ address self. re...
[ 0.23827214539051056, 0.410464346408844, 0.5126194953918457, -0.06316947191953659, -0.23024451732635498, -0.2755151689052582, 0.21006891131401062, -0.05016563460230827, -0.2907860279083252, -0.005604863632470369, -0.13743726909160614, 0.6020560264587402, 0.7451663017272949, -0.8836099505424...
def stochfindbestneighbor ( neighbors, currvalue ) : bestneighs = [ ] for neigh in neighbors : value = neigh. getvalue ( ) if value > = currvalue : bestneighs. append ( neigh ) if len ( bestneighs ) = = 0 : return false deltavalues = [ neigh. getvalue ( ) - currvalue for neigh in bestneighs ] bestpos = rouletteselect (...
[ 0.07280214875936508, -0.364027202129364, 0.4944797158241272, 0.5009022355079651, -0.26907220482826233, 0.6709911227226257, 0.08153876662254333, -1.002789855003357, -0.8213273882865906, 0.2664819061756134, -0.037119150161743164, 0.6567463278770447, -0.8382216691970825, -0.2477695196866989, ...
def get _ path ( obj : dict, key : str ) - > any : # split the path into pieces path = split _ path ( key ) # scan down the path, one piece at a time, stopping if none ( not defined ) val = obj for p in path : if isinstance ( val, list ) and 0 < = int ( p ) < len ( val ) : val = val [ int ( p ) ] elif isinstance ( val,...
[ -0.04466547071933746, -0.12085333466529846, 0.699286937713623, 0.562892496585846, -0.48094847798347473, -0.4029935598373413, -0.09863594174385071, -0.3626784086227417, -0.20093943178653717, 0.2765566110610962, 0.348346084356308, -0.018857859075069427, -0.8661208748817444, -0.14797005057334...
def clip _ gradient ( model, clip _ norm ) : totalnorm = 0 for p in model. parameters ( ) : if p. requires _ grad : modulenorm = p. grad. data. norm ( ) totalnorm + = modulenorm * * 2 totalnorm = np. sqrt ( totalnorm ) norm = clip _ norm / max ( totalnorm, clip _ norm ) for p in model. parameters ( ) : if p. requires _...
[ -0.9978001117706299, -0.4049786329269409, 0.6709786653518677, 0.28308263421058655, -1.3891135454177856, 0.8790613412857056, 0.2023075520992279, 0.1810886263847351, -0.1665290892124176, 0.899691641330719, 0.29075536131858826, -0.13845941424369812, 0.14300112426280975, 0.6106105446815491, ...
def simulation _ prod ( r0, v0, n, l, m, rcut, dt, t0, steps, td ) : dr, rij = force. dist _ rij ( r0, n, l, rcut ) # initial distance f = force. f _ tot ( dr, rij, rcut ) # initial forces eta = np. zeros ( ( steps ) ) # initial scaling factor in the nvt theromstat. eta [ 0 ] = 0 r = r0 # initial positions v = v0 # ini...
[ 0.1145281195640564, 0.26977208256721497, 0.7342637181282043, -0.07377644628286362, 0.10423564910888672, -0.14501143991947174, 0.4282226264476776, -0.8677598834037781, 0.11153823137283325, 0.6343829035758972, 0.29854273796081543, -0.21808414161205292, -0.1803089827299118, 0.2028879970312118...
def piped ( self ) : return pipedcommand ( self )
[ 0.5285005569458008, -0.5365802049636841, 0.6013157367706299, -0.47230103611946106, -0.18784946203231812, 0.9964969158172607, 0.11291943490505219, 0.09019138664007187, -0.22683928906917572, -1.72593092918396, 0.8720335364341736, 1.0874078273773193, -0.5444378852844238, -0.2302025854587555, ...
def rolesvocabularyfactory ( context ) : # context is the content rule object which is stored in the plone site pmemb = gettoolbyname ( aq _ inner ( context ),'portal _ membership') roles = sorted ( pmemb. getportalroles ( ) ) sane _ roles = [ ( safe _ unicode ( role ). encode ('ascii ','replace'), safe _ unicode ( rol...
[ 0.21059589087963104, -0.8186705708503723, 0.1482289582490921, -1.3271222114562988, -0.016596157103776932, -0.030365468934178352, -1.235846996307373, -0.4865165650844574, 0.541970431804657, -0.040057335048913956, 0.1405373215675354, 0.2164754867553711, 0.10154281556606293, -0.63470643758773...
def generate _ year _ months ( month, year ) : year _ months = [ ] if type ( year ) = = list or type ( year ) = = tuple : for y in year : if type ( month ) = = list or type ( month ) = = tuple : for m in month : year _ months. append ( str ( y ) +'m'+ format ( m,'02d') ) else : year _ months. append ( str ( y ) +'m'+ f...
[ -0.12544332444667816, -0.48680049180984497, 0.9301533102989197, 0.25328102707862854, -0.3844389021396637, 1.1492120027542114, -0.8690810799598694, 0.37646484375, 0.9371696710586548, 0.5687354207038879, 0.1552901417016983, 0.13826347887516022, -0.7857316732406616, 1.0154674053192139, 0.03...
def cophenetic _ corr ( x, z ) : c, coph _ dists = hierarchy. cophenet ( z, pdist ( x ) ) return c, coph _ dists
[ 0.31700897216796875, -0.7619581818580627, 0.30244559049606323, 0.035481132566928864, 0.267162024974823, 0.6447953581809998, 0.21248017251491547, 1.365612506866455, -0.6434852480888367, 0.22589564323425293, -0.37549716234207153, -0.09346828609704971, -0.34699320793151855, -0.429021865129470...
def logged ( obj ) : if isinstance ( obj, logging. logger ) : # ` @ logged ( logger )'return lambda class _ or _ fn : _ add _ logger _ to ( class _ or _ fn, logger _ name = _ generate _ logger _ name ( class _ or _ fn, parent _ name = obj. name ) ) else : # ` @ logged'return _ add _ logger _ to ( obj )
[ -0.7383414506912231, 0.02910047397017479, 1.0286890268325806, -0.13036973774433136, -0.34955137968063354, -0.1298280954360962, 0.24970312416553497, -0.7811344265937805, 1.6439872980117798, -0.6197709441184998, -0.7834047675132751, 0.5132369995117188, 0.919651448726654, 0.6161962151527405, ...
def validate ( self, data ) : if data ['status'] : error = errors. code _ to _ exception. get ( data ['status'] ) if error is none : error = errors. seleniumunknownerror raise error ( data ['value'] ) return data
[ 0.04441462457180023, -0.03639274090528488, 0.5543882846832275, 0.1384388506412506, -0.016842326149344444, 0.10243359208106995, -0.7512887716293335, 1.0868594646453857, 1.0475234985351562, 0.5664117336273193, 0.2893187999725342, -0.3364974856376648, 0.156609445810318, 0.42914631962776184, ...
def draw _ detection _ list ( im, dets, labels, sources = none ) : # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - im _ det = im. copy ( ) if dets. size = = 0 : return im _ det if dets. ndim = = 1 : d...
[ -0.8806582689285278, -0.1282443404197693, 0.7589454650878906, -0.017402272671461105, 0.0051785740070044994, 0.01237915363162756, -0.45020610094070435, 0.3160492777824402, 0.5886102318763733, -0.21251702308654785, 0.3949032127857208, -0.34122979640960693, 1.0900118350982666, 0.5799242258071...
def search ( self, search _ params ) : results = self. data for key _ in search _ params. keys ( ) : if key _ = ='rank': # results = results [ search _ params ['rank'] ] results = { key : val for key, val in results. items ( ) if search _ params ['rank'] = = val ['rank'] } if key _ = ='director': results = { key : val ...
[ -1.444511890411377, -0.05008592829108238, 0.9724026918411255, 0.7257622480392456, 0.19438251852989197, 0.2505107522010803, 0.16575568914413452, 0.08983886241912842, -0.6456482410430908, 0.8396057486534119, -0.293339341878891, 0.37341824173927307, -1.0824062824249268, 1.1712912321090698, ...
def _ setup _ resources ( ) : target _ procs = 10240 cur _ proc, max _ proc = resource. getrlimit ( resource. rlimit _ nproc ) target _ proc = min ( max _ proc, target _ procs ) if max _ proc > 0 else target _ procs resource. setrlimit ( resource. rlimit _ nproc, ( max ( cur _ proc, target _ proc ), max _ proc ) ) cur ...
[ 0.03076239489018917, -0.46691444516181946, 0.5514663457870483, -0.7845150828361511, 0.7270394563674927, -0.7200804352760315, 0.05657627433538437, 0.0319976806640625, -0.1499919891357422, -0.16055302321910858, 0.33680224418640137, 0.6438843607902527, 0.15000012516975403, 0.11289010941982269...
def balance _ training _ data ( how : str, x _ train, y _ train ) : assert y _ train. dtype = = np. bool, " two type boolean class is needed for balancing training data, n _ true < n _ false " if how = ='oversample': # assumes that number of true is in the minority. oversampling the trues true _ picks = np. random. cho...
[ -0.6491039395332336, -0.43202081322669983, 0.8530541062355042, -0.6250069737434387, 0.42827579379081726, 0.21572060883045197, -0.06251778453588486, -0.562857985496521, -0.2329193651676178, 0.1684642881155014, 0.5779545903205872, 0.40479031205177307, 0.35511454939842224, -0.1708356589078903...
def respond ( request, user, template, params = none ) : if params is none : params = { } if user : params ['user'] = user params ['sign _ out'] = users. create _ logout _ url ('/') params ['is _ admin'] = ( users. is _ current _ user _ admin ( ) and'dev'in os. getenv ('server _ software') ) else : params ['sign _ in']...
[ -0.2931180000305176, -0.11161845177412033, 0.4850664734840393, 0.9623204469680786, -0.7885719537734985, 0.08659034222364426, -0.015262294560670853, 0.6952416300773621, 0.7751433253288269, -0.22009451687335968, 0.4767451286315918, -0.23708686232566833, -0.20775651931762695, 0.24224799871444...
def match _ cigar ( qseq : str, hseq : str, query _ start : int, query _ end : int, query _ len : int ) - > typing. tuple [ typing. tuple [ int, str ] ] : match _ cigar = [ ] if query _ start > 0 : match _ cigar. append ( [ query _ start, " h " ] ) for q, h in zip ( qseq, hseq ) : if q = = " - " : op = " d " elif h = =...
[ -0.8137975335121155, 0.1602519303560257, 0.6383240818977356, 0.4092806875705719, -0.1487092524766922, -0.7846692800521851, 0.000930153822991997, 0.285251259803772, -0.7198964953422546, 0.6273012757301331, -0.49351659417152405, -0.2757536768913269, 0.12759505212306976, -0.57949298620224, ...
def send _ frame ( self, frame : bytesalike ) : pass
[ -0.5091667771339417, 0.5540376901626587, 0.20766732096672058, 0.9258139133453369, 0.5878180265426636, -0.2659478783607483, -0.41304129362106323, -0.718184769153595, 0.5907310247421265, -0.5302299857139587, -1.1522305011749268, 1.1400007009506226, -1.0281089544296265, 0.39172419905662537, ...
def create _ tri _ map ( self ) : # create an array giving a list of simplex indices for each tri _ vert verts _ to _ simps = [ [ ] for i in range ( len ( self. tri _ verts ) ) ] # create a set containing all tri _ cell inds as tuples ( used to control quad merging ) : self. free _ to _ merge = set ( ) for ci, vertsi _...
[ 0.22921301424503326, 0.4250645339488983, 0.410515159368515, -0.5823825597763062, 0.175358384847641, 0.05036742612719536, 0.4236261248588562, 0.02688523568212986, 0.3006456196308136, -0.004623327404260635, -0.49358996748924255, -0.6590264439582825, -0.12654361128807068, -0.4666060209274292,...
def debug ( ) : #'true'data sfs _ i _ true = [ 200, 50, 30, 20, 5 ] sfs _ d _ true = [ 400, 80, 20, 10, 2 ] n = 6 e _ i = 0. 05 e _ d = 0. 01 # error data - ie observed sfs _ obs _ i, sfs _ obs _ d = add _ error _ to _ sfs ( sfs _ i _ true, sfs _ d _ true, e _ i, e _ d ) # estimate true sfs _ i _ freqs = [ [ round ( ( ...
[ 0.005404139403253794, 0.4148961305618286, 0.9647848606109619, -0.8236480355262756, 0.22001920640468597, 0.027428558096289635, 0.5039978623390198, 0.02840975672006607, -0.17168563604354858, -0.38731223344802856, -0.10037605464458466, 0.21022112667560577, -0.060426510870456696, 0.25168079137...
def gen _ systags ( hdr _ files, incl _ paths ) : hdr _ files _ with _ path = find _ header _ files ( hdr _ files, incl _ paths ) ctags _ cmd = ['ctags ','- i _ _ darwin _ alias + ','- i _ _ darwin _ alias _ c + ','- i _ _ throw ','- i _ _ thrownl ','- i _ _ dead2 ','- i _ _ printflike + ','- i _ _ pure2 ','- i _ _ res...
[ 0.7653045654296875, 0.19218513369560242, 0.7997214198112488, 0.634597659111023, -0.15592487156391144, 0.29396963119506836, 0.74703049659729, 0.8942582607269287, -1.2055318355560303, 0.08286747336387634, -0.8471048474311829, -0.48716452717781067, -0.11692436784505844, 1.1173194646835327, ...
def fill _ nans _ ny _ inverting _ first _ occurence ( df ) : for col _ label in df. columns : col = df [ col _ label ] # get timestamp of first valid index and replace previous nans # by opposite ts = col. first _ valid _ index ( ) idx = df. index. get _ loc ( ts ) col. iloc [ 0 : idx ] = not col [ ts ] return df
[ -0.6455060243606567, 0.009436448104679585, 0.8803573250770569, 0.19043871760368347, 1.1004807949066162, 0.6485788822174072, 0.23016150295734406, 0.7087270617485046, 0.15883131325244904, 0.24922090768814087, 0.06317788362503052, 0.1608252376317978, 0.23503680527210236, 0.07603763788938522, ...
def _ init _ append ( self ) : if self. _ content _ length : with _ handle _ azure _ exception ( ) : self. _ resize ( content _ length = self. _ content _ length, * * self. _ client _ kwargs ) self. _ reset _ head ( ) self. _ seek = self. _ size
[ 0.2739047110080719, 0.5078485012054443, 0.4102787971496582, -0.8300966024398804, 0.24028463661670685, -0.39885514974594116, -0.043306075036525726, -0.7228416204452515, -0.010940562933683395, -0.5691651105880737, 0.199555441737175, 0.45100733637809753, -0.29650601744651794, 0.60184884071350...
def make _ chunk ( chunk _ type, chunk _ data ) : out = struct. pack ( "! i ", len ( chunk _ data ) ) chunk _ data = chunk _ type. encode ( " latin - 1 " ) + chunk _ data out + = chunk _ data + struct. pack ( "! i ", binascii. crc32 ( chunk _ data ) & 0xffffffff ) return out
[ 0.8110546469688416, 0.17266161739826202, 0.5281310677528381, -0.3816052973270416, 0.22672997415065765, 0.5927118062973022, -1.1279805898666382, -0.5163900256156921, -0.12953291833400726, -0.7560572028160095, -0.1886385679244995, 0.9886693358421326, -0.36729633808135986, -0.6389933228492737...
def f1 ( input, key, iv ) : input = bytearray ( input ) # # quote out ; and = from the input while ord (';') in input or ord ('=') in input : i = input. find ( ord (';') ) if i! = - 1 : input. pop ( i ) i = input. find ( ord ('=') ) if i! = - 1 : input. pop ( i ) input = bytearray ( " comment1 = cooking % 20mcs ; userd...
[ 0.41772252321243286, -0.007778991479426622, 0.6080588102340698, 0.21788762509822845, -0.62403804063797, -0.15630307793617249, 0.3143022656440735, -0.11746494472026825, 0.2431991845369339, 0.3365495800971985, -0.47019872069358826, -0.019200675189495087, -0.7635161280632019, 0.05947211384773...
def test _ proper _ employee _ delete ( self ) : emp = employee ( ) emp. name ='emp'emp. email ='emp @ mail. com'emp. department ='dep'emp. save ( ) resp = self. client. delete ('/ employee / emp @ mail. com / delete /') self. assertequal ( resp. json ( ), employee _ delete _ success _ json ) with self. assertraises ( ...
[ -0.17612285912036896, -0.49731311202049255, 0.5459786653518677, -0.06274042278528214, 0.7754166722297668, 1.1216281652450562, -0.15215608477592468, 0.251606822013855, 0.3408018946647644, 0.31218221783638, -0.6564276218414307, 0.2788098156452179, -0.06735046952962875, -0.18860192596912384, ...
def value ( self ) : return self. _ value
[ -0.3078201115131378, -0.21046552062034607, 0.11119545251131058, -0.41147738695144653, -0.026254676282405853, 1.0135457515716553, 0.7469770312309265, -0.29129087924957275, 0.16274741291999817, -0.9844108819961548, -0.00720231095328927, 0.5650317668914795, 0.5025394558906555, -0.371234327554...
async def call _ thread ( callback, * args, * * kwargs ) : with threadpoolexecutor ( max _ workers = 1 ) as pool : return await pool. call ( callback, * args, * * kwargs )
[ 0.0048358254134655, 0.8277173042297363, 0.44994616508483887, 0.5279484391212463, 0.3199485242366791, -0.15048626065254211, -0.9857498407363892, -0.09730757772922516, 0.21586191654205322, 0.15779565274715424, 0.1322023570537567, 0.23228231072425842, -0.9220594167709351, 0.2503560185432434, ...
def latestpolicy ( log _ dir, algo _ name ) : files = glob. glob ( os. path. join ( log _ dir + algo _ name +'_ * _ model. pkl') ) files _ list = [ ] for file in files : eps = int ( ( file. split ('_') [ - 2 ] ) ) files _ list. append ( ( eps, file ) ) def sortfirst ( val ) : return val [ 0 ] files _ list. sort ( key =...
[ -0.6620381474494934, -0.9296185970306396, 0.6548417806625366, -0.8778977990150452, 0.5066823363304138, 0.32418617606163025, -0.17451424896717072, 0.08684740960597992, -0.5277745127677917, 1.2508670091629028, -0.25240376591682434, -0.7523912787437439, 0.626839816570282, 0.04321996867656708,...
def trigger ( self ) : # user defined function. only user will call it. # internal methods should not use this. # use _ trigger ( ) instead. while len ( self. status )! = 0 : # while there are incomplete operations time. sleep ( 0. 001 ) self. status. append ( 2 )
[ -0.004401619546115398, -0.1247110515832901, 0.3287235498428345, 0.7975685000419617, 0.15921233594417572, -0.6060750484466553, 0.8729822039604187, 0.6425987482070923, -0.3147546648979187, -0.9766861796379089, -1.2384343147277832, -0.3640267550945282, 0.031295664608478546, -0.324118643999099...
def get _ slot _ value ( self ) : files = os. listdir ( self. data _ dir ) files = [ self. data _ dir + f for f in files ] files = [ f for f in files if'kb - all'in f ] f _ kb = files [ 0 ] # print ('\ nreading kb information from { } '. format ( f _ kb ) ) slot _ value = { } value _ slot = { } with open ( f _ kb ) as ...
[ 0.00444184523075819, -0.33473196625709534, 0.7587395310401917, -0.15888507664203644, -1.1676483154296875, 0.5352832078933716, 0.26356759667396545, 0.7580848932266235, -1.327700138092041, 0.3244042694568634, 0.1666027456521988, -0.26513171195983887, 0.7065166234970093, 0.6584407687187195, ...
def summary ( self, sess, averaged _ reward ) : summaries = sess. run ( self. averaged _ reward, { self. averaged _ reward _ ph : averaged _ reward } ) if self. summary _ writer : self. summary _ writer. add _ summary ( summaries, global _ step = self. averaged _ reward _ global _ steps ) self. averaged _ reward _ glob...
[ -0.46149808168411255, 0.7375460863113403, 0.41082891821861267, -0.03418729081749916, 0.5327703952789307, 0.245541051030159, 0.6976433992385864, 0.3090321719646454, 0.4271825850009918, 0.6847127676010132, 0.5011561512947083, 0.11621996760368347, 0.7280611395835876, 0.3334178626537323, 0.1...
def _ command ( self, args, check _ return _ code = true ) : cmd = self. hivecmd + args return sh ( cmd, check _ return _ code )
[ -0.5554459095001221, -0.027139436453580856, 0.4831194579601288, 0.6827734708786011, 1.1272011995315552, 0.28421783447265625, -0.41522216796875, 0.25066670775413513, -0.6376318335533142, -0.04088732600212097, 0.968511700630188, 0.0978238508105278, -0.08856866508722305, -0.008244154043495655...
def show _ menu ( self, point : qpoint ) : self. exec ( self. parent. maptoglobal ( point ) )
[ 0.1200084537267685, -0.045787058770656586, 0.4214257299900055, 0.040384143590927124, -0.6763732433319092, 0.4449993073940277, 0.4834643304347992, 0.2835792899131775, 0.18382541835308075, -0.2064579725265503, 0.09583554416894913, 1.0151640176773071, 0.49661770462989807, 0.8808609843254089, ...
def add _ new ( params ) : if " save " in params : add _ post ( params [ " heading " ]. value, params [ " category " ]. value, params [ " text " ]. value ) else : # todo : form handling, form handling, form handling!!! o = " " o + = " < form action = '? page = add _ new & save = save'method = \ " post \ " > " o + = " h...
[ 0.06983259320259094, 0.7989049553871155, 0.9109037518501282, 0.2690456211566925, 0.04885216802358627, 0.21720606088638306, -0.29928159713745117, -0.3068571388721466, -0.6613395810127258, 0.28207728266716003, 0.382645845413208, 0.0899343490600586, 0.0051174471154809, 1.3937827348709106, -...
def bulk _ get _ users ( ) : request = requests. get ( user _ endpoint, headers = ping _ headers ) return request. text
[ -0.9351879358291626, 0.42853695154190063, 0.39531683921813965, 1.2201398611068726, 0.6844735145568848, -0.6339540481567383, -1.9043009281158447, -0.9809966087341309, 0.2860158681869507, 0.35619139671325684, -0.26409193873405457, 0.8938843011856079, -0.7461937665939331, -0.7600380182266235,...
def get _ value ( self ) - > int : value = 0 for canbit in self. canbits : if not canbit. stuffbit : value < < = 1 value | = 1 if canbit. value = ='1'else 0 return value
[ -0.648884654045105, 0.29019078612327576, 0.484401136636734, 1.4615570306777954, 0.12762799859046936, 0.5441291928291321, 1.136339783668518, -0.4765692949295044, -0.7635465264320374, -0.0004270726931281388, 0.3206618130207062, 0.8001746535301208, -0.9261816143989563, 1.4071677923202515, 0...
def get _ context ( self ) : return {'person': self. person,'group _ object': self. job. group _ object,'mail': self,'base _ url': self. job. newsletter. get _ base _ url ( ) }
[ -0.2137572467327118, -0.7731634974479675, 0.45609909296035767, -0.5056635737419128, -0.5960635542869568, -0.2522871196269989, -0.6635674834251404, -0.17159856855869293, -0.11841843277215958, -0.6815041899681091, -0.533819854259491, 0.1176285594701767, -0.12048342823982239, 0.03649717941880...
def kms _ key _ id ( self ) - > optional [ pulumi. input [ str ] ] : return pulumi. get ( self, " kms _ key _ id " )
[ 0.9985847473144531, -0.357548326253891, 0.19642794132232666, 0.516993522644043, 0.009746676310896873, 1.2212375402450562, -0.5712177157402039, 0.22512757778167725, 1.2818833589553833, 0.4081045687198639, 0.2698805630207062, 1.0990955829620361, -0.5964176058769226, -0.3617399334907532, -0...
def test _ cant _ get _ car _ invalid _ request ( self ) : res = self. client. post ('/ car / get') self. assertequal ( res. status _ code, 405 ) res = self. client. delete ('/ car / get') self. assertequal ( res. status _ code, 405 ) res = self. client. put ('/ car / get') self. assertequal ( res. status _ code, 405 )...
[ -0.7942689657211304, -0.2658359110355377, 0.7715474367141724, 0.07291212677955627, 0.44697603583335876, 0.5368216037750244, -0.6551079154014587, -0.08592790365219116, -1.115072250366211, -0.8490431904792786, 0.10710036754608154, 0.5692660808563232, -0.2814757227897644, -0.02193028852343559...
async def start _ background _ tasks ( app ) : await fake _ matlab _ started ( app )
[ 1.9130643606185913, 0.5989987254142761, 0.3792647421360016, 1.6487761735916138, 1.0424885749816895, 1.0044872760772705, 0.4796521067619324, 0.07479038089513779, 0.4927195608615875, 0.7592056393623352, -0.8834031224250793, 0.4432476758956909, -0.057630084455013275, 0.27945488691329956, -0...
def get _ move _ visits ( self, state ) : for n in range ( self. _ n _ playout ) : # print ('playout : ', n ) state _ copy = copy. deepcopy ( state ) self. _ playout ( state _ copy ) # calc the visit counts at the root node act _ visits = [ ( act, node. _ n _ visits ) for act, node in self. _ root. _ children. items ( ...
[ -0.49355369806289673, 0.3862496614456177, 0.5910435914993286, 0.461416631937027, -0.6248661279678345, -0.8782004117965698, 1.6549135446548462, -0.1092194989323616, 0.7547264099121094, 0.5261929035186768, -0.06150715798139572, 1.0658094882965088, 0.2650420367717743, 0.35799866914749146, 0...
def josprofile _ redirect ( request ) : return redirect ( " profile ", username = request. user. username )
[ -0.48586487770080566, -0.3418007493019104, 0.4131483733654022, 1.1090760231018066, -0.15693095326423645, 0.5185006856918335, 1.7560791969299316, -0.4017702043056488, -0.38463521003723145, -0.6470496654510498, -0.5730732679367065, -0.08352687209844589, 0.43498820066452026, -0.84801137447357...
def contact _ email ( self, contact _ email ) : if contact _ email is not none and len ( contact _ email ) > 254 : raise valueerror ( " invalid value for ` contact _ email `, length must be less than or equal to ` 254 ` " ) # noqa : e501 self. _ contact _ email = contact _ email
[ 0.1214781329035759, -0.22100992500782013, -0.13572640717029572, 1.3180290460586548, 0.538632869720459, 0.5840688943862915, 0.13670571148395538, 1.1938252449035645, -0.7394073009490967, 0.19392208755016327, 0.3134327530860901, -0.7390845417976379, -0.34644755721092224, -0.09551724791526794,...
def _ convert _ ax _ wavelength _ to _ radius ( ax _ wavelengths ) : y1, y2 = ax _ wavelengths. get _ ylim ( ) print ( y1, y2 ) ny1 = ( y1 - lambda _ 0 ) / lambda _ 0 * self. snap. r _ 0 * \ self. snap. refractive _ index * 1e3 ny2 = ( y2 - lambda _ 0 ) / lambda _ 0 * self. snap. r _ 0 * \ self. snap. refractive _ inde...
[ 0.43982169032096863, -0.9081008434295654, 0.6630890965461731, -1.3429943323135376, -0.22896379232406616, 0.21240855753421783, -0.11562275886535645, -0.5597149133682251, 0.36174339056015015, 0.6773381233215332, 0.12714585661888123, 1.2284269332885742, 0.6438255906105042, 0.03135636448860168...
def on _ message ( self, body, message ) : if self. should _ stop is not true : self. _ pool. spawn ( self. handler, body, message )
[ 0.08809830993413925, 0.48494860529899597, 0.6825369596481323, -0.27818527817726135, 0.9463697075843811, 1.3205440044403076, -0.352654367685318, -0.575154185295105, -0.4043194055557251, 0.06114690378308296, -0.14264018833637238, 0.5564569234848022, -1.0009434223175049, 0.4651714563369751, ...
def get _ view _ interval ( self ) : return self. axes. upper _ xlim [ 0 ], self. axes. lower _ xlim [ 1 ]
[ -0.24237969517707825, -0.25639310479164124, 0.5499917268753052, 0.0018257463816553354, -1.047945499420166, 0.6140406131744385, 0.7521004676818848, -0.23485799133777618, -0.06915012747049332, -0.7186796069145203, 0.04094468802213669, 1.2949961423873901, -0.6578277945518494, -0.5668157935142...
def clean _ after ( func : callable ) - > callable : def wrapper ( context : union [ context, click. core. context ], * args : any, * * kwargs : any ) - > callable : " " " call a source method, remove dirs listed in ctx. clean _ paths if clickexception is raised. : param context : context object. : param args : positio...
[ -0.16304032504558563, 0.3373200297355652, 0.6066632866859436, 0.27392274141311646, -1.1497833728790283, -0.24045705795288086, 1.0814074277877808, -0.23589444160461426, 0.9935288429260254, 0.18191112577915192, 0.26215222477912903, -0.11910729855298996, 0.7101024389266968, 0.1521527171134948...
def assert _ matches ( instring, matcher, matchstring ) : res = matcher. match ( instring ) # check we've got the right type assert isinstance ( res, lexmatch ) if matchstring is none : assert res. forward _ string = = instring assert res. elements = = [ ] else : assert res. forward _ string = = instring [ len ( matchs...
[ -0.17199589312076569, -0.6295223832130432, 0.3132108151912689, -0.4060252904891968, 0.19642499089241028, 0.1037154421210289, -0.23007793724536896, 0.11601651459932327, 0.08436878770589828, -0.8229786157608032, 0.22126254439353943, 0.42643043398857117, -1.1551988124847412, -0.32918050885200...
def relative _ to ( self ) : return self. _ relto
[ 0.4209108054637909, -0.3077075779438019, 0.544670045375824, -0.2711809277534485, 0.2735753357410431, 0.8601580858230591, 0.579336941242218, -0.8546119928359985, -0.37116649746894836, -0.44070836901664734, -0.14101436734199524, 0.590276300907135, -0.9221677780151367, -0.49958378076553345, ...
def pdf _ to _ jpg ( pdf _ dir, pdf _ file ) : # pdf _ dir looks like " / users / miabramel / downloads / pdbs " os. chdir ( pdf _ dir ) full _ name = pdf _ dir + " / " + pdf _ file pages = convert _ from _ path ( full _ name, 300 ) full _ name = full _ name [ : - 4 ] for page in pages : page. save ( " % s - page % d. ...
[ -0.24754944443702698, -0.32469862699508667, 0.7511154413223267, 0.11630406230688095, 0.5145538449287415, -0.40174561738967896, 0.013728881254792213, 0.6872475147247314, 0.007808155380189419, 0.4257737398147583, -0.10313925892114639, -0.03025224059820175, 0.36707383394241333, -0.10738956928...
def _ _ add _ _ ( self, other ) : if len ( self )! = len ( other ) : raise valueerror ( " the length for two input vectors are not compatible " ) return vector ( [ first + second for first, second in zip ( list ( self ), list ( other ) ) ] )
[ -0.23421338200569153, -0.09873763471841812, 0.8274603486061096, -0.0033190890680998564, 0.19249384105205536, 0.7100632786750793, -0.3880554735660553, -0.6050935983657837, 0.7993539571762085, -0.28736987709999084, -0.13526466488838196, 0.42246153950691223, -0.29466697573661804, -0.195631802...
def wireprotosupport ( self ) : return none
[ -0.043713320046663284, 0.20054860413074493, 0.36067089438438416, 0.27183401584625244, 0.022897586226463318, 1.217091679573059, -0.3849416673183441, -0.6782956719398499, 0.7130942940711975, -0.10213064402341843, -0.8681836128234863, 0.03078373335301876, -2.3668243885040283, 0.39976143836975...
def test _ import _ v1 _ database _ broken _ csv _ fields ( self ) : broken _ config = database _ config. copy ( ) broken _ config [ " allow _ file _ upload " ] = broken _ config. pop ( " allow _ csv _ upload " ) broken _ config [ " extra " ] = { " schemas _ allowed _ for _ file _ upload " : [ " upload " ] } contents =...
[ 0.03885907679796219, 0.8049474954605103, 0.5741569399833679, 0.7129741311073303, 0.2029755711555481, 0.91679447889328, 0.410706490278244, 0.3317866325378418, 0.026685558259487152, 0.6434922814369202, -0.7668713331222534, -0.014990832656621933, -0.5992482304573059, -0.24756011366844177, 0...
def b _ tp _ principle _ fc _ array _ index ( self, b _ tp _ borr _ for, b _ tp _ save _ for, b _ tp _ borr _ inf, b _ tp _ lend _ inf ) :'''a. find non - zero index, to save time and also means if one of the arrays has just one 0, index will be empty and furthermore, no fixed cost will be added for this zero choice. i...
[ -0.5383949279785156, -0.4874642491340637, 0.7984849810600281, -0.2837425470352173, 0.9374027252197266, -0.302525132894516, 0.4044652581214905, -0.07195743918418884, -0.35817351937294006, 0.6553251147270203, 0.2434583455324173, 0.010456911288201809, -0.4928172826766968, 0.6886149048805237, ...
def insert _ front ( self, value ) : new _ node = node ( value = value, next _ node = self. first _ node ) if self. first _ node : self. first _ node. prev _ node = new _ node self. first _ node = new _ node
[ -0.4005250930786133, 1.2352806329727173, 0.6223848462104797, -0.84702467918396, 0.3274202346801758, -0.08217872679233551, 0.6433492302894592, 0.022414620965719223, 0.2170310914516449, 0.14508342742919922, -0.5676701664924622, 1.0913054943084717, -0.6567795276641846, 1.3493512868881226, -...
def create _ average _ box ( boxes _ to _ merge, buffer _ size ) : centroid _ x = np. mean ( [ boxes _ to _ merge [ x ]. centroid. x for x in boxes _ to _ merge ] ) centroid _ y = np. mean ( [ boxes _ to _ merge [ x ]. centroid. y for x in boxes _ to _ merge ] ) point _ geom = point ( centroid _ x, centroid _ y ) left,...
[ -0.2587507367134094, 0.014113510958850384, 0.5634483098983765, 0.031201327219605446, 0.3585525453090668, 0.6876238584518433, -0.09496960788965225, -0.6206027865409851, -0.02370987832546234, 0.04324319213628769, -0.19714772701263428, 0.006709598936140537, 0.0666116252541542, -0.345215678215...
def semantic _ cones ( self ) : return self. sensors [ 1 ]
[ -0.5458465814590454, -0.8726106286048889, 0.5106397271156311, 0.20744797587394714, 0.2552049160003662, -0.7058447003364563, -0.05083748325705528, -0.9860979318618774, 0.7729910612106323, 0.4632033705711365, 0.14672298729419708, 0.19423705339431763, 0.16633275151252747, -0.6464014053344727,...
def create _ rotor ( lex ) : rotor = [ i for i in lex ] rand. shuffle ( rotor ) return rotor
[ -1.013269066810608, 0.08824079483747482, 0.24102851748466492, -0.6135627627372742, 0.1896478682756424, 0.8646409511566162, -0.8677224516868591, -0.17687080800533295, 0.8462578654289246, 0.32614830136299133, -0.7259357571601868, -0.1382232904434204, -1.314568281173706, -0.15502744913101196,...
def get _ element _ by _ text ( text ) : return ( f " / / * [ text ( ) ='{ text }'] ", by. xpath )
[ 0.42107564210891724, -0.4351345896720886, 0.07584936916828156, 0.1556386947631836, -0.44056272506713867, -0.4326396584510803, 0.31241002678871155, 0.5242108702659607, 0.3968600928783417, 1.0354232788085938, 0.02673959732055664, -0.013526691123843193, 0.10193460434675217, -0.441594004631042...
def test _ get _ bytes ( image _ config : imageconfig, image _ config _ signed : imageconfig, json _ bytes : bytes, json _ bytes _ signed : bytes, ) : assert image _ config. get _ bytes ( ) = = json _ bytes assert image _ config _ signed. get _ bytes ( ) = = json _ bytes _ signed
[ -0.19374997913837433, 0.23515735566616058, 0.5110551714897156, -0.0975983515381813, 0.6626665592193604, -0.19281156361103058, -0.2428736686706543, -1.2237849235534668, 0.8205036520957947, -0.21339133381843567, -0.9531840682029724, 0.30503928661346436, 0.3367101550102234, 0.3533067405223846...
def check _ boundary ( self ) : x, y = self. decider. get _ position ( ) if x < 0 or x > self. bounds [ 0 ] or y < 0 or y > self. bounds [ 1 ] : return true else : return false
[ -0.09786000102758408, -1.2326818704605103, 0.8923671841621399, 0.889955997467041, 0.6868436932563782, 1.084572196006775, -0.952681303024292, -0.1813812553882599, -0.7826668620109558, -0.12580248713493347, -0.021520178765058517, 0.8229530453681946, -1.0450598001480103, 0.6498774886131287, ...
def do _ channel _ registration ( self, tile : tile, reference _ channel : int = 0 ) : registration = situimagechannelregistration ( self. registration _ function, peak _ finder = self. peak _ finder ) # for each channel ( except nucleus ) compute transform compared to reference _ channel # add channel transformation t...
[ -0.7802160978317261, 0.21012063324451447, 0.6756212115287781, -0.3528240919113159, 1.5623575448989868, -0.6428929567337036, 0.782854437828064, -0.8760383129119873, 0.33646079897880554, 0.41656625270843506, -0.020360369235277176, 0.5129022002220154, 0.34120312333106995, 0.8995211124420166, ...
def rundecayfunction ( self, lam, l1 _ durations, l2 _ durations ) : l1 _ llk = ( np. log ( lam ) - ( lam * l1 _ durations ) ). sum ( ) l2 _ llk = ( ( - 1 * lam ) * l2 _ durations ). sum ( ) llk = l1 _ llk + l2 _ llk return - 1 * llk
[ 0.23698140680789948, 0.25614452362060547, 0.6548232436180115, -0.053780604153871536, -0.004761656746268272, 0.292255163192749, -0.5220474600791931, 0.13903139531612396, -0.5129914283752441, -0.20615561306476593, 0.22776515781879425, 1.2745347023010254, 0.3118915855884552, -0.12598823010921...
def test _ check _ input _ list _ of _ mask ( ) : # call checker function assert isinstance ( chmask, list ) chmap, landmap, basevalues, time _ window, dim0 = mob. check _ inputs ( chmask, basevalues _ idx = [ 0 ], window _ idx = 1, landmap = landmask ) # assert types assert dim0 = ='time'assert isinstance ( chmap, xr....
[ -0.4576764404773712, -0.13014623522758484, 0.5729365348815918, 1.0124610662460327, 0.7190306186676025, 0.8745478987693787, 0.06666578352451324, -0.7152606844902039, 0.3356456160545349, -0.33125895261764526, -0.6784499287605286, 0.09980568289756775, -0.3734772801399231, 1.2876642942428589, ...
def fix _ url ( url ) : if not url : return qurl ( ) if url. split (':') [ 0 ] = = " about " : return qurl ( url ) search = false if url [ : 4 ] in ['http ','file'] : return qurl ( url ) else : try : # ingenioso pero feo ; con'bind'local es barato socket. gethostbyname ( url. split ('/') [ 0 ] ) except ( unicodeencodee...
[ -0.5031806826591492, -0.15636692941188812, 0.7859296202659607, 0.2548829913139343, -0.7122839093208313, 0.5884017944335938, -0.2021232545375824, 0.23914431035518646, 0.12039043754339218, -0.641127347946167, 0.5574238896369934, 0.297815203666687, -0.004040141589939594, 0.5634052157402039, ...
def _ check _ keydown _ events ( self, event ) : if event. key = = pygame. k _ up : self. ship. moving _ up = true elif event. key = = pygame. k _ down : self. ship. moving _ down = true elif event. key = = pygame. k _ space : self. _ create _ bullet ( ) elif event. key = = pygame. k _ escape : sys. exit ( )
[ -0.36465194821357727, -0.02420613169670105, 0.9113010764122009, 0.9014527201652527, -0.29170146584510803, 0.7183060646057129, -0.5606695413589478, -0.5837960839271545, 0.10991492867469788, 0.7650989294052124, -0.08672921359539032, -0.2640487253665924, 0.26424309611320496, 0.733789741992950...
def handle ( self ) : self. close _ connection = true self. handle _ one _ request ( ) while not self. close _ connection : self. handle _ one _ request ( )
[ -0.522577702999115, -0.1706521064043045, 0.6237146854400635, 0.7840555906295776, 1.342004656791687, 0.5733942985534668, 0.12944597005844116, -0.33853089809417725, -0.4410098195075989, -1.492188811302185, 0.4087618291378021, -1.2189562320709229, -1.4991464614868164, 0.29489728808403015, 1...
def to _ predicate ( x ) : if hasattr ( x, " _ _ call _ _ " ) : return x if hasattr ( x, " _ _ contains _ _ " ) : return lambda e : e in x raise valueerror ( " can't build predicate for { 0 } ". format ( x ) )
[ -0.18325874209403992, -0.013501683250069618, 0.5176903605461121, 0.07133974134922028, -0.3515666723251343, 0.3590923249721527, -0.33193936944007874, -0.06486065685749054, 1.2164592742919922, -0.20344893634319305, -0.0885196253657341, 0.36234232783317566, 0.13078777492046356, -0.16411784291...
def _ pretrained _ initializer ( var _ name, weight _ file, embedding _ weight _ file = none ) : weight _ name _ map = { } for i in range ( 2 ) : for j in range ( 8 ) : # if we decide to add more layers root ='rnn _ { } / rnn / multirnncell / cell { } '. format ( i, j ) weight _ name _ map [ root +'/ rnn / lstm _ cell ...
[ 0.41506263613700867, -0.5472182035446167, 0.8942655920982361, 0.16913242638111115, -0.035442054271698, 0.07160701602697372, 0.6747210621833801, 0.3482452929019928, -1.3636581897735596, 0.4076700508594513, -0.4435144066810608, -0.0321960374712944, 0.04052896797657013, 0.7774606347084045, ...
def cost _ derivative ( output _ activations, y ) : return output _ activations - y
[ -0.866431713104248, -0.47159305214881897, 0.3243010938167572, 0.7244957685470581, -0.6239541172981262, -0.281781941652298, 0.5843425393104553, 0.014285212382674217, -0.31825676560401917, 0.33711710572242737, 0.49114030599594116, 0.22025389969348907, 0.9440950155258179, -0.8989465832710266,...
def test _ generate _ model _ circuit ( ) : model _ circuit = cirq. contrib. quantum _ volume. generate _ model _ circuit ( 3, 3, random _ state = np. random. randomstate ( 1 ) ) assert len ( model _ circuit ) = = 3 # ensure there are no measurement gates. assert list ( model _ circuit. findall _ operations _ with _ ga...
[ 0.25332435965538025, 0.6437592506408691, 0.456066370010376, 0.17302963137626648, 0.7758040428161621, 0.9097387194633484, 0.2347826063632965, -0.5314008593559265, 0.3530292510986328, 0.06609664857387543, -0.6771363615989685, -0.7807949781417847, -0.22081667184829712, 0.47695472836494446, ...
def savefile ( self ) - > none : if self. image _ file _ name : try : self. img. save ( self. image _ file _ name ) self. error _ massage ['text'] = " " except : self. error _ massage. config ( fg ='red') self. error _ massage ['text'] = \ " couldn't save the file. try again later " else : self. error _ massage. config...
[ -0.48384225368499756, 0.2275153547525406, 0.43230918049812317, -0.03196858987212181, 0.6355893611907959, 0.07876427471637726, 0.24951991438865662, 0.7414495348930359, -0.5268459916114807, 0.11326201260089874, 0.05063517391681671, -0.4273016154766083, -0.38149094581604004, 1.498479604721069...
def create _ state ( players, board ) : state = fishgamestate ( board = board, num _ players = len ( players ), players = players, current _ player = players [ 0 ], phase = gamestatephase. final ) return state
[ -0.35907167196273804, -0.3203880190849304, 0.5540999174118042, -0.21602687239646912, -0.21876907348632812, -0.16541779041290283, 0.36659008264541626, 0.36367398500442505, -0.24755799770355225, 1.1282700300216675, 0.02499442547559738, -0.31645646691322327, -1.159437656402588, -0.11073423177...
def parallelize ( self ) : self. parallel = true self. network = torch. nn. dataparallel ( self. network )
[ 0.6954004764556885, 1.3202729225158691, 0.1731213629245758, -0.4098131060600281, 0.8913641571998596, 0.5135465264320374, -0.018014488741755486, 1.4390209913253784, 0.1830504834651947, -1.362194299697876, -0.44774433970451355, 0.2291111946105957, -0.13128893077373505, -0.004197831731289625,...
def vsearch ( g, vn ) : try : ver = [ i for i, v in enumerate ( g. vs ['name'] ) if v = = vn ] except keyerror : ver = [ ] if ver = = [ ] : g. add _ vertices ( [ vn ] ) return g. vcount ( ) else : return ver [ 0 ]
[ -0.046791549772024155, 0.5396370887756348, 0.4876321256160736, 0.22203616797924042, 0.11193482577800751, -0.7285155653953552, -0.22487223148345947, -0.38210994005203247, 0.5843561887741089, 0.8709936738014221, -0.5089311003684998, 0.050954367965459824, -0.424282431602478, -0.48719695210456...
def iter _ cus ( self ) : return self. _ rnglists. iter _ cus ( )
[ -0.22063489258289337, -0.21171937882900238, 0.19539505243301392, -0.014971953816711903, 0.11933016031980515, 0.08035482466220856, 0.4230160415172577, -0.1802278459072113, -0.15072660148143768, 0.3778066635131836, 0.7275273203849792, 0.2609541118144989, -0.05448099970817566, 0.0349829345941...
def _ load _ from _ callable ( name, kwds, converters = { } ) : # see if we actually have the named object. dotted _ name = kwds. pop ( name, none ) if dotted _ name is none : return none obj = resolvedotted ( dotted _ name ) # extract any arguments for the callable. obj _ kwds = { } prefix = name + " _ " for key in kw...
[ -0.4804938733577728, 0.1338825672864914, 0.7215644717216492, -0.6379755735397339, -0.5954501032829285, -1.2713847160339355, -0.9820071458816528, -0.7046696543693542, 0.0021257668267935514, -0.31877827644348145, -0.6752278804779053, 0.02722449228167534, 0.03164587914943695, -0.5291680693626...
def request _ budget ( self, mechanism _ type : mechanismtype, sensitivity : float = 1, weight : float = 1, count : int = 1, noise _ standard _ deviation : optional [ float ] = none ) - > mechanismspec : if count! = 1 or noise _ standard _ deviation is not none : raise notimplementederror ( " count and noise standard d...
[ -0.4720519781112671, 0.685783863067627, 0.6553199291229248, 0.14722278714179993, 0.3925371766090393, 0.3301798105239868, 0.0036392747424542904, -0.9036519527435303, -0.4833473563194275, -1.2740387916564941, 0.48001527786254883, 0.5663217306137085, -0.25674760341644287, 0.1560341715812683, ...
def merge _ overlapping _ positions ( * positions : tuple ) - > list : result = reduce ( _ merge _ on _ overlap, positions, [ ] ) if len ( positions ) > 0 else [ ] return result
[ -1.4295573234558105, 0.8905894756317139, 0.5178224444389343, 0.9765783548355103, 0.6329891681671143, 0.47636154294013977, -0.4556448757648468, 0.2177111804485321, 0.10822509229183197, 0.07707679271697998, -0.17572426795959473, -2.0161311626434326, -0.7838891744613647, 0.09675414115190506, ...
async def app _ uplink ( request ) : if request. content _ type = = " application / json " : if request. can _ read _ body : body = await request. json ( ) logger. debug ( body ) body = json. loads ( body ) src _ l2 _ addr = body. get ( " devl2addr " ) if src _ l2 _ addr is none : logger. debug ( " no ip addr found. " ...
[ -0.5981298685073853, -0.28459131717681885, 0.9268057346343994, -0.15876610577106476, -0.39041000604629517, -0.41029220819473267, -0.8339608311653137, -0.10302414745092392, 0.08587334305047989, 0.26552122831344604, 0.2493421882390976, 0.7439337968826294, 0.3794441521167755, -0.1223867088556...
def _ do _ calculate _ metric _ variances ( attributes ) : attributes ['hr _ active _ variance'] = attributes ['hazard _ rate _ active'] * * 2. 0 attributes ['hr _ dormant _ variance'] = attributes ['hazard _ rate _ dormant'] * * 2. 0 attributes ['hr _ logistics _ variance'] = attributes ['hazard _ rate _ logistics'] *...
[ -0.0399349145591259, -0.4092571437358856, 0.5013929605484009, -0.2363310158252716, 0.17252396047115326, 0.22128039598464966, 0.3310595452785492, -0.8850473761558533, -1.1144187450408936, 0.49567246437072754, 0.08522798866033554, -0.12704038619995117, 0.3268294632434845, 0.22490449249744415...
def dust _ data _ vs _ time _ seperate _ sims ( params, data _ objs, stat ='median ', subsample = ['all'], foutname ='sim _ dust _ data _ vs _ time. pdf ', sim _ labels = none, sample _ labels = none, style ='color - linestyle ', redshift = false, sample _ linewidths = none ) : # get plot stylization linewidths, colors...
[ 1.0132445096969604, 0.28446897864341736, 0.7289308309555054, 0.472432941198349, 0.22167479991912842, 0.3265557885169983, 0.605287492275238, -0.1083427295088768, 0.1433907151222229, -0.04291866347193718, 0.12632909417152405, 0.8067301511764526, 0.37093105912208557, 0.6143910884857178, 0.3...
def load _ constant ( self, k, v ) : assert ( not hasattr ( self, k ) ),'{ } already exists as constant ( { } = { } ). choose a new name. '. format ( k, k, getattr ( self, k ) ) setattr ( self, k, v ) self. _ constants. append ( k )
[ -0.23505686223506927, -0.27332186698913574, 0.6729148030281067, -0.7698549628257751, -0.6041926741600037, 0.0484796017408371, -0.9259377717971802, 0.13657820224761963, -0.008738286793231964, 1.0627665519714355, -1.3326985836029053, 0.09980137646198273, -0.08363007754087448, -0.233143776655...
def _ execute ( command, env ) : logging. debug ('executing command : % s ',''. join ( command ) ) proc = subprocess. popen ( command, stdout = subprocess. pipe, stderr = subprocess. pipe, env = env ) stdout, stderr = proc. communicate ( ) return proc. returncode, stdout, stderr
[ -0.048083964735269547, -0.9873250722885132, 0.8492785096168518, -0.27128902077674866, 0.4750850796699524, 0.20620113611221313, -1.0314290523529053, 0.38477885723114014, -0.9844232797622681, 0.6971221566200256, 0.24785849452018738, 0.04135151579976082, 0.03106687031686306, -0.27911531925201...
def show _ search ( ) : return render _ template ('formular _ search. html')
[ 0.20819386839866638, 0.5820775628089905, 0.40555626153945923, 0.5239630341529846, -0.05608002468943596, -0.1707463562488556, 0.09414135664701462, 0.7956647276878357, -1.0562283992767334, 0.054679643362760544, 1.0484241247177124, -0.3428904712200165, 0.4281370937824249, 0.3776593804359436, ...
def _ _ init _ _ ( self, pos _ label : union [ str, int ] = none, sample _ weight : np. ndarray = none, drop _ intermediate : bool = true, average : str = " macro ", max _ fpr : float = none, multi _ class : str = " raise ", labels : list [ str ] = none, ) : # store the parameters : self. _ pos _ label = pos _ label se...
[ 0.8733308911323547, -0.1968354731798172, 0.4420565366744995, 0.4420613646507263, -0.037002138793468475, -0.10431498289108276, -0.2672941982746124, 0.38241803646087646, -0.22567470371723175, 0.16431403160095215, -0.9110170602798462, 0.937061607837677, 0.017942706122994423, 0.671310424804687...
async def async _ will _ remove _ from _ hass ( self ) - > none : await self. _ api. stop _ pin ( )
[ -0.4888700544834137, 0.47413089871406555, 0.22776345908641815, -0.27870965003967285, 0.8400057554244995, 0.6818045377731323, -0.18999451398849487, 0.6530783176422119, 0.4418479800224304, 0.17064282298088074, -0.560488224029541, 0.5220346450805664, -0.17595398426055908, -0.4808081388473511,...
def remove ( keys, usernames ) : for username in usernames : with open ( keys,'r +') as f : key _ file = f. read ( ) pattern ='^. * # { } \ n '. format ( username ) match = re. sub ( pattern,'', key _ file, re. i ) f. seek ( 0 ) f. write ( match ) f. truncate ( ) f. closed click. echo ('removed { } from your authorized...
[ -0.5217809081077576, -0.4530753195285797, 0.44870007038116455, 0.09209144860506058, -0.6586005687713623, 0.32017821073532104, 0.4925732910633087, 1.4387831687927246, -0.8339764475822449, 0.6427767276763916, -0.3284827470779419, 0.6411571502685547, -1.0279592275619507, -0.07699926942586899,...
def tf _ idf _ return _ k _ result _ for _ a _ given _ query ( query, k ) : list _ = [ ] # get tuples generated from the query ( json ) tuples = generate _ tuples _ from _ query ( query ) # clean the tuples description so it contains only scientific words cleaned _ tuples = clean _ tuples _ list ( tuples ) for tuple _ ...
[ -0.03636829927563667, -0.049307093024253845, 0.41818857192993164, -0.4963294565677643, -0.16155274212360382, -0.48910123109817505, -0.16939042508602142, 0.5378181338310242, -0.7139914631843567, 1.2219098806381226, 0.4036884009838104, -0.9306591153144836, -0.15940910577774048, 0.15396125614...
def find _ path ( network, pairs, weights = none ) : am = dict _ to _ am ( network ) if weights is not none : am. data = np. ones _ like ( am. row, dtype = int ) pairs = np. array ( pairs, ndmin = 2 ) paths = csgraph. dijkstra ( csgraph = am, indices = pairs [ :, 0 ], return _ predecessors = true, min _ only = false ) ...
[ -0.2885605990886688, 0.2804509103298187, 0.755868673324585, 0.008265520446002483, -0.6168468594551086, -0.3452928960323334, 1.0559498071670532, 0.2830420732498169, 0.12453404814004898, 0.9771667122840881, 0.12096424400806427, -1.0236414670944214, -0.28217124938964844, 0.5025746822357178, ...
def cov _ to _ corr ( cov ) : # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # import numpy as np v = np. sqrt ( np. diag ( cov ) ) outer _ v = np. outer ( v, v ) correlation = cov / outer _ v correlation [ cov ...
[ -1.1591789722442627, -1.2801618576049805, 0.39669907093048096, -1.061145305633545, -0.34460151195526123, -0.7659868597984314, 0.6283605694770813, 1.0676783323287964, 0.8659158945083618, 0.863968014717102, -0.5599014759063721, 0.27189359068870544, 0.09822285175323486, 0.2747502326965332, ...
def testone ( self ) : expected _ output = ('python starboard / tools / testing / test _ runner. py'' - - target _ name nplb - - platform my _ platform - - config my _ config') cmd _ str = run _ tests. _ resolvetrampoline ( argv = ['- - target _ name ','nplb'] ) self. assertequal ( expected _ output, cmd _ str )
[ 0.27323395013809204, 0.4622223377227783, 0.5469421148300171, -0.06617269665002823, 1.6046671867370605, 0.360580176115036, 0.3877364993095398, -0.20862190425395966, -0.6936200857162476, -0.6954913139343262, -0.4006314277648926, -0.32266396284103394, -0.5333645939826965, 0.0166430976241827, ...
def delete _ user ( self ) : # type : ( ) - > dict if not self. connected : raise exception ( " not connected " ) if not self. logged _ in : self. close ( ) raise exception ( " not logged in " ) text _ to _ sign = sha256. new ( b " deluser ; name : " + self. logged _ in _ user ) signature = utils. base64 _ encode ( pkc...
[ -0.8548064231872559, 0.05045148357748985, 0.9560410976409912, 0.49934178590774536, -1.303880214691162, -0.3917500376701355, 0.3547264039516449, -0.689865231513977, 0.14060288667678833, 0.2987176179885864, -0.8800434470176697, 0.09570907801389694, -1.1379820108413696, 0.23601335287094116, ...