text
stringlengths
25
2.19k
embedding
listlengths
768
768
def href ( self, href ) : self. _ href = href
[ 0.33849620819091797, 0.49181392788887024, -0.07954980432987213, 0.2813981771469116, -0.03300873935222626, 0.9638038277626038, 0.44648775458335876, 0.9988006949424744, -0.7761108875274658, -0.46080392599105835, -0.6125719547271729, -0.13231821358203888, -0.4899616837501526, 0.11634879559278...
def test _ get _ change ( self ) : diff = ( b'diff - - git a / test b / test \ n'' index 9daeafb9864cf43055ae93beb0afd6c7d144bfa4..'' dced80a85fe1e8f13dd5ea19923e5d2e8680020d 100644 \ n'' - - - a / test \ n + + + b / test \ n @ @ - 1 + 1, 3 @ @ \ n test \ n + \ n + test \ n') diff _ encoding = md5 ( diff. encode ('utf ...
[ -0.14105400443077087, 0.6908746361732483, 0.8819957375526428, -0.8151170611381531, 0.6747609972953796, -0.4338679611682892, -0.053823072463274, -0.8361567854881287, -0.42522287368774414, -0.07875895500183105, -0.6304620504379272, 1.34751558303833, -0.3896682560443878, 0.647976279258728, ...
def dump ( self, command ) : ret _ super = super ( connectionstats, self ). dump ( command ) now _ time = int ( time. time ( ) ) rusage _ user, rusage _ system, _, _, _ = os. times ( ) ret = [ ('pid ', os. getpid ( ) ), ('uptime ', now _ time - self. start _ time ), ('time ', now _ time ), ('pointer _ size ', 64 ), ('r...
[ -0.6341318488121033, 0.2137715071439743, 0.693809449672699, -0.5087721347808838, 0.24112273752689362, 0.40838122367858887, -0.5647497177124023, -0.3400576412677765, -0.2150193601846695, -0.3912443220615387, -0.5316256880760193, -0.08959531038999557, -0.5441192984580994, 1.0662155151367188,...
def testresolvequerywithpermissiondeniederror ( self ) : tagapi ( self. user ). create ( [ ( u'username / tag ', u'description') ] ) permissions = cachingpermissionapi ( self. user ) values = [ ( u'username / tag ', operation. read _ tag _ value, policy. closed, [ ] ) ] permissions. set ( values ) self. store. commit (...
[ 0.2567279636859894, 1.1547859907150269, 0.41674819588661194, 0.5463281869888306, 0.3024706542491913, 0.22431884706020355, -0.060882605612277985, -0.35037991404533386, -0.3841552436351776, -0.8348655700683594, -0.0389888659119606, -0.6834325194358826, -0.14990563690662384, 0.339274823665618...
def _ delete _ empty _ services ( connection ) : service = models. service. _ _ table _ _ pattern = models. journeypattern. _ _ table _ _ link = models. journeylink. _ _ table _ _ local _ operator = models. localoperator. _ _ table _ _ operator = models. operator. _ _ table _ _ organisations = models. organisations. _ ...
[ -0.33316898345947266, -0.10954425483942032, 0.7556867003440857, -0.9640935063362122, 0.12730030715465546, 0.4728904664516449, 0.8285980224609375, -0.4131942689418793, -0.0650888979434967, -0.2542220950126648, 0.14499367773532867, -0.5826944708824158, -0.2973286211490631, 0.5668905377388, ...
def test _ logoff _ robot _ controller _ correct ( self ) : is _ logged _ off, _ = user _ auth. logoff _ robot _ controller ( self. controller ) self. asserttrue ( is _ logged _ off )
[ 0.06109870225191116, -0.18363121151924133, 0.15113434195518494, 0.4739753007888794, 0.3294006884098053, 0.9925245642662048, 0.04688142612576485, -0.4125116765499115, 0.6559862494468689, -0.4190845489501953, -0.350999653339386, 0.7148226499557495, -0.10994995385408401, -0.27696478366851807,...
def inference ( self, x, n _ outputs = none, hidden _ layers = none, condition = none ) : print ('fully connected inference has called') with tf. variable _ scope ('fullyconnected') : if x. dtype is tf. int32 : # x = self. embedding _ layer ( x ) pre _ trained _ embeddings = np. load ('datasets / clinicalts / basefiles...
[ -0.2586914598941803, 0.21726027131080627, 0.712077796459198, 0.36185261607170105, -0.3970597982406616, -0.22719818353652954, 0.49403274059295654, -0.4904436469078064, 0.11380156129598618, -0.13419994711875916, -0.14913474023342133, -0.6736757159233093, 0.13896137475967407, 0.93731611967086...
def close ( self ) : for bidx in self. bands : for band in self. bands [ bidx ] : band. close ( )
[ -0.5286160707473755, -1.597999095916748, 0.3320707678794861, 0.009719829075038433, 0.49461719393730164, 1.7472634315490723, 0.46197420358657837, -1.0146749019622803, -0.6167720556259155, -0.6262242794036865, 0.288191020488739, 0.34775763750076294, -0.7845038771629333, 1.1192611455917358, ...
def api ( self ) : self. last if true : # if there's more to go return { { " title " : " sample bill " } } else : # if done return 0
[ -0.9357597231864929, 0.13573376834392548, 0.47456106543540955, -0.6658137440681458, -0.3257390558719635, -0.1580687165260315, -1.0178450345993042, -0.5188344717025757, -0.012495475821197033, 0.14774508774280548, -0.2258891612291336, -0.8523932695388794, -0.846595287322998, 0.44826999306678...
def make _ directories ( path = '.') : top _ process = ['systemengineering ','safetyengineering ','softwareengineering ','support ','others'] sub _ process = [ # systemengineering ['requirementsdefinition ','architecturaldesign ','integrationtesting ','testing'], # safetyengineering ['requirementsdefinition ','testing'...
[ -0.6616736054420471, 0.48301902413368225, 1.1273956298828125, -0.03211174160242081, -0.36988741159439087, 0.6537091135978699, 1.1118748188018799, -0.5172090530395508, 0.45528027415275574, -0.8561148047447205, -0.547869861125946, 0.2398519515991211, 0.2877393066883087, -0.13139194250106812,...
def get _ host ( ) : aton _ host = os. getenv ( " aton _ host " ) if aton _ host is none : return " 127. 0. 0. 1 " else : return str ( aton _ host )
[ 0.44017624855041504, -0.988043487071991, 0.3416133522987366, 0.24651272594928741, -0.536300778388977, 0.6058464050292969, -1.0868403911590576, 0.1443103402853012, -0.5385351777076721, 0.8716708421707153, 1.0749528408050537, 0.21055012941360474, -0.12957881391048431, -1.1399508714675903, ...
def itkimageserieswriteriul3iul2 _ cast ( * args ) : return _ itkimageserieswriterpython. itkimageserieswriteriul3iul2 _ cast ( * args )
[ -0.31458282470703125, 0.1755972057580948, 0.43089964985847473, -0.6432300806045532, -0.4787285327911377, 1.0794577598571777, -1.1422053575515747, 0.46801501512527466, 0.39873671531677246, 0.8577168583869934, 0.2866756319999695, 0.8004547357559204, 0.202377051115036, -1.1537528038024902, ...
def solve _ tcp _ instance ( model, graph, edge _ variables, detailed _ output = true, time _ output = false ) : start _ time = python _ time. time ( ) # solve and recover solution print ('- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -...
[ 0.5344510674476624, 0.3298832178115845, 0.7271353602409363, 0.34071001410484314, -0.5890505313873291, -0.46838411688804626, 0.2618602514266968, -0.280288964509964, -1.036659598350525, 0.6833000183105469, 0.1555049568414688, -0.6264870166778564, -0.880657434463501, -0.45424214005470276, -...
def run _ list _ features _ action ( self, state, manager ) : keep _ features = [ ] remove _ features = [ ] # if user set features, separate into yes and no groups if state. options. features : for feature _ name in state. options. features. split ( ", " ) : if feature _ name. startswith ( " - " ) : remove _ features. ...
[ -0.3421460688114166, -1.1292487382888794, 0.6425761580467224, 0.4885501563549042, 0.4414517283439636, -0.8111361861228943, -0.3311421573162079, 0.6656624674797058, 0.5049567818641663, 0.6878261566162109, -0.331498920917511, 0.6895785331726074, 0.020423347130417824, 0.8990845084190369, -0...
def _ _ init _ _ ( self, model _ path, labels _ path, image _ path, sign, sorted _ data _ path ) : self. _ _ model _ path = model _ path # a path to the trained model self. _ _ labels _ path = labels _ path # a path to the updated labels self. _ _ image _ path = image _ path # a path to an image that should be checked ...
[ -0.1713649183511734, -0.7680999636650085, 0.5127591490745544, 0.5500134825706482, 0.19290600717067719, 0.3182483911514282, 0.00421674782410264, 0.3186969757080078, -0.687451958656311, -0.31945061683654785, -0.23418176174163818, 0.33191442489624023, -0.5571282505989075, 0.5158255696296692, ...
def create _ dataloader ( self ) : data _ loader = torch. utils. data. dataloader ( bufferedshuffledataset ( dataset = self, buffer _ size = self. shuffle _ buffer ) if self. shuffle else self, batch _ size = self. batch _ size, drop _ last = self. drop _ last, num _ workers = self. num _ workers, prefetch _ factor = s...
[ 0.2628006041049957, 0.3235730528831482, 0.6943717002868652, -0.4687332212924957, 0.051701828837394714, 0.15042702853679657, 0.14137515425682068, -0.01712435483932495, -0.35930025577545166, -1.5426820516586304, -0.23708264529705048, -0.015392455272376537, -0.014716720208525658, 0.1522427797...
def _ modify ( v, cutoff ) : if v > = 0 : return v elif cutoff = ='truncate': return 0 elif cutoff = ='reflect': return - v else : raise valueerror ('method does not exist.')
[ -1.278801441192627, 0.11791091412305832, 0.4760343134403229, -1.0642563104629517, -0.22285695374011993, -0.2966586947441101, -0.15518027544021606, 0.010700494050979614, 0.4457480013370514, 0.7751286625862122, 1.2274073362350464, 0.22223162651062012, 0.15461887419223785, 0.09863867610692978...
def _ _ getitem _ _ ( self, key ) : return self. tracks [ key ]
[ -0.6526870727539062, -0.0960211306810379, 0.333861768245697, -0.31817737221717834, -0.45369821786880493, 0.6649888157844543, -0.33943411707878113, -0.7345593571662903, -1.0388787984848022, -0.0008858044748194516, 0.8632810711860657, 0.03157024085521698, -0.3180806636810303, -0.618052899837...
def field _ callback ( self, msg ) : # convert the polygonstamped into a shapely polygon temp _ points = [ ] for point in msg. polygon. points : temp _ points. append ( ( float ( point. x ), float ( point. y ) ) ) self. field _ shape = geo. polygon ( temp _ points ) self. field _ frame _ id = msg. header. frame _ id
[ 0.9209157824516296, -0.45797523856163025, 0.38415977358818054, -1.4071344137191772, 0.7718256115913391, -0.26691359281539917, -0.029551252722740173, 0.6368346214294434, 0.38339942693710327, 0.0069343592040240765, -1.6251673698425293, 0.20185527205467224, 0.03818979859352112, -0.70520299673...
def _ mgui _ set _ max ( self, value : float ) : super ( ). _ mgui _ set _ max ( value ) self. _ readout _ widget. setmaximum ( value )
[ -0.16168159246444702, 0.43039223551750183, 0.47025832533836365, 0.6083880662918091, -0.2657036781311035, -0.10149303078651428, -0.4970751404762268, 0.09135014563798904, -0.6249303221702576, 0.08449967205524445, -0.03921931982040405, -0.02391809970140457, 0.07282022386789322, 0.449767529964...
def v4 _ url _ for ( * args, * * kwargs ) : return flask. url _ for ( * args, db _ name = flask. g. db _ name, testsuite _ name = flask. g. testsuite _ name, * * kwargs )
[ 0.18204565346240997, -0.1744549572467804, 0.4645231366157532, -0.12991680204868317, 0.6155696511268616, 0.09678872674703598, -0.3953138589859009, -0.30997517704963684, -1.4076460599899292, -0.18227528035640717, 0.6574167609214783, 0.47807058691978455, 0.07248952239751816, 0.367572993040084...
def build _ hdict ( station, year, sensor _ l ) : ddict = { } station _ info = [ ] extra = ['sza ','azm ','etr ','etrn'] for sens in sensor _ l : ddict [ sens ] = [ [ ], np. zeros ( ( 12, 24 ) ) ] for e in extra : ddict [ e ] = np. zeros ( ( 12, 24 ) ) lb = false if ( int ( year ) % 4 ) = = 0 : lb = true for i in range...
[ -0.09123867005109787, 0.011703507043421268, 0.7206225991249084, -0.0359661728143692, -0.8492130041122437, 0.560455322265625, 0.19738106429576874, 0.3252665400505066, -0.16313320398330688, -0.3382987082004547, 0.3463320732116699, -0.36298683285713196, 0.37937766313552856, 1.167236089706421,...
def parse _ json _ and _ match _ value ( line : str ) - > optional [ logtype ] : return log _ parser. parse _ json _ and _ match _ value ( line = line, value = " metric " )
[ 0.7601824402809143, -0.10254751890897751, 0.5463706254959106, 0.4513055086135864, -0.316091924905777, -0.5416774749755859, -0.4280245304107666, -0.914259672164917, -0.5429717898368835, 0.05305441841483116, 0.21705998480319977, 0.22926756739616394, 0.41922640800476074, -0.22022303938865662,...
def re _ center ( pos, cm ) : pos _ n = np. copy ( pos ) for i in range ( 3 ) : pos _ n [ :, i ] = pos [ :, i ] - cm [ i ] return pos _ n
[ 0.8392554521560669, -0.7247581481933594, 0.560821533203125, -0.012020050548017025, -0.18211351335048676, -0.7032728791236877, -0.05922999233007431, 1.186719298362732, 0.754531979560852, 1.2572416067123413, -0.5968810319900513, -0.08641154319047928, -0.6233750581741333, -1.1615750789642334,...
def buildselenolist ( infile, outfile ) : # not sure when this list is relevent or in what case it would be used - please add to documentation dbh = sqlite3. connect ( params [ " database _ name " ] ) statement ='''select distinct transcript _ id from transcript _ info as t, protein _ stats as p where p. protein _ id =...
[ 0.27793776988983154, -1.0337066650390625, 0.5637131333351135, -0.05836980789899826, 0.4174056947231293, 0.4605790376663208, -0.43810755014419556, 1.2660350799560547, 0.2467958927154541, 0.2513059675693512, -0.6706748008728027, -0.05618990585207939, 0.26672685146331787, 0.286865234375, -0...
def rotate ( self ) : if not ( os. access ( self. directory, os. w _ ok ) and os. access ( self. path, os. w _ ok ) ) : return year, month, day = self. lastdate newname = " % s. % s " % ( self. name, self. suffix ( self. lastdate ) ) archivepath = os. path. join ( self. archive _ dir, str ( year ),'% 02d'% month ) if n...
[ -0.34739911556243896, -0.25659483671188354, 1.0611926317214966, -0.4902328550815582, -0.11409948021173477, 0.3075118064880371, 0.9981265068054199, -0.21289753913879395, 0.041588302701711655, -0.47694137692451477, 0.6688811779022217, 0.3396163880825043, -0.022818077355623245, -0.58879262208...
def test _ proper _ error _ response _ on _ email _ not _ available ( self ) : emp1 = employee ( ) emp1. name ='emp'emp1. email ='emp1 @ mail. com'emp1. department ='dep'emp1. save ( ) emp2 = employee ( ) emp2. name ='emp2'emp2. email ='emp2 @ mail. com'emp2. department ='dep'emp2. save ( ) resp = self. client. put ('/...
[ -0.6487954258918762, -1.0552865266799927, 0.6382575631141663, -0.7702816724777222, -0.36839908361434937, 0.8727259039878845, -0.31138738989830017, -0.07443205267190933, -0.15444770455360413, 0.7498209476470947, -1.3100204467773438, 0.40897446870803833, -0.5402984023094177, -0.4542646110057...
def addarg ( self, arg ) : self. _ args. append ( arg )
[ -0.8034172058105469, 0.07879406958818436, 0.1015363484621048, -0.6778687834739685, 0.17821702361106873, 1.4814614057540894, -0.37805429100990295, 0.964120626449585, 0.31568485498428345, -0.5739794373512268, -0.3413994312286377, 0.8800066113471985, -0.0846756249666214, 1.4727882146835327, ...
def inside _ q ( self, pt ) : raise exception ( " this is the base region class! use a subclass " )
[ 0.28739938139915466, -0.25296902656555176, 0.3878144919872284, 0.11590362340211868, -0.6202898621559143, 1.4063050746917725, -0.34573593735694885, -1.0739591121673584, 0.513503909111023, -1.3581328392028809, 0.450359970331192, 0.7596555352210999, -1.108164668083191, 0.5380836129188538, -...
def grid _ eval _ 2d ( x, y, q, xout, yout, method ='nearest ', return _ ma = true ) : from scipy. interpolate import regulargridinterpolator from numpy import ma # for masked arrays qdim = q. ndim if qdim = = 2 : # change to 3d array of shape ( 1, q. shape [ 0 ], q. shape [ 1 ] ) : q = np. array ( [ q ] ) nvars = q. s...
[ 0.6725473403930664, -0.2621730864048004, 1.1234025955200195, -0.750540554523468, -0.6114833354949951, -0.490085631608963, -0.46869292855262756, -0.1929655820131302, -0.1084948405623436, 0.5966403484344482, 0.3238307535648346, 0.7486263513565063, 0.4594305157661438, 0.5524547100067139, -0...
def local _ importance _ values ( self ) : if self. is _ local _ sparse : return self. _ local _ importance _ values else : return self. _ local _ importance _ values. tolist ( )
[ 0.3124834895133972, -0.1411532610654831, 0.42461907863616943, 0.17454980313777924, 0.6926132440567017, 0.25029420852661133, -0.8479052186012268, 0.6203674077987671, 0.391863614320755, 0.4044066369533539, -0.7622193694114685, 0.9586313366889954, 0.02043169178068638, 0.7637123465538025, -0...
def base _ model ( self, base _ model ) : self. _ base _ model = base _ model
[ -0.24277743697166443, -1.1478177309036255, -0.0406934954226017, 0.9609016180038452, 0.8187888860702515, 1.3907603025436401, 0.2439800202846527, 0.49148720502853394, -1.1841083765029907, 0.15807843208312988, -1.21144437789917, -0.7876708507537842, -0.1171470582485199, 0.35411638021469116, ...
def sumstats _ correlation ( chr _ list ) : starttime = datetime. datetime. now ( ) mt0 = hl. read _ matrix _ table ('gs : / / phenotype _ 31063 / hail / gwas. imputed _ v3. both _ sexes. annotated. mt') mt1 = mt0. filter _ rows ( hl. is _ defined ( variants [ mt0. locus, mt0. alleles ] ) ) # filter to variant _ set va...
[ 0.5709487795829773, -0.16418105363845825, 0.8344915509223938, -0.391155868768692, 0.6579989790916443, 0.8454686403274536, 1.0993294715881348, -0.2817010283470154, -0.013705025427043438, 0.16956265270709991, -0.4999048113822937, 0.7382258772850037, -0.21582891047000885, 0.8329038023948669, ...
def validate _ annotation _ set _ on _ node ( client, node, annotation _ key, annotation _ value ) : print ( " annotaton _ value : ", annotation _ value ) # check via api node = client. reload ( node ) node _ annotations = node. annotations. data _ dict ( ) assert node _ annotations [ annotation _ key ] = = annotation ...
[ 0.13630354404449463, -0.40709763765335083, 0.36830806732177734, -0.30623719096183777, 0.2235288769006729, 0.7155125141143799, -0.9111120104789734, -0.5362789034843445, -0.4584067761898041, 0.8803226351737976, 0.4022223651409149, 1.3269977569580078, 0.2989538311958313, 0.38148772716522217, ...
def create _ scf _ result _ node ( * * kwargs ) : for key, val in kwargs. iteritems ( ) : if key = ='outpara': # should be alwasys there outpara = val outdict = { } outputnode = outpara. copy ( ) outputnode. label ='output _ scf _ wc _ para'outputnode. description = ('contains self - consistency results and'' informati...
[ -0.6947442293167114, -0.16372908651828766, 0.4852942228317261, 0.023018116131424904, -0.040490586310625076, -0.036016274243593216, 0.7959856390953064, -0.2356816828250885, -0.5182139873504639, 0.5556939840316772, -0.014190586283802986, 0.46721506118774414, -0.19823779165744781, -0.07890719...
def add _ new _ product ( list _ of _ product _ objects ) : product _ name = input ( " please enter a new product name : " ) try : product _ price = float ( input ( " please enter a new product price : $ " ) ) except valueerror as e : error _ message = " " " the product price you provided is not a valid number. this pr...
[ -0.9952073097229004, -0.6094139814376831, 0.5548733472824097, 1.3468090295791626, 0.34882622957229614, 1.101621389389038, -0.06351490318775177, -0.7224677801132202, 0.26479223370552063, 0.20207342505455017, 0.004854742903262377, -0.1837402880191803, -0.7509287595748901, 0.48315247893333435...
def authenticate ( self, username, password, cookie _ path ) : session = requests. session ( ) login = session. get ( login _ url ) _ logger. info ('logging in to adtpulse...') payload = {'usernameform': username,'passwordform': password } _ logger. warning ('payload = % s ', payload ) if os. path. exists ( cookie _ pa...
[ -0.577056884765625, -0.5139829516410828, 0.6655805706977844, 0.37935811281204224, 0.01711146906018257, 0.018068796023726463, -0.302744060754776, 0.352225661277771, 0.5018651485443115, 0.3876681923866272, -0.19423562288284302, -0.33422061800956726, -0.46720394492149353, -0.5200088024139404,...
def on _ get ( self, req, resp ) : resp. status = falcon. http _ 200 # this is the default status resp. body ='{ " status " : " ok " } '
[ 0.28746867179870605, -1.092760443687439, 0.39685893058776855, 0.06438040733337402, 0.8681979775428772, -0.12958548963069916, -1.3681423664093018, 1.3129483461380005, -0.26106545329093933, 0.018950162455439568, -0.6940574645996094, 0.4328320026397705, 0.5134313702583313, -0.3336386978626251...
def clustering _ orig _ binary ( nrange, digits, num _ sample, outfile ) : eucl _ dist = lambda a, b : np. linalg. norm ( a - b ) k = len ( digits ) a1, a2 = [ ], [ ] for n in nrange : print " doing % i of % i " % ( n, nrange [ - 1 ] ) ns = [ n ] * k for m in range ( num _ sample ) : originals, binaries, labels = pick ...
[ -0.3304705321788788, -0.07499883323907852, 0.7421345114707947, -0.2664685547351837, -0.5345370769500732, 0.1566818505525589, 1.2420576810836792, -0.48094454407691956, -0.4022841155529022, 0.6134120225906372, 0.5076972246170044, 1.313117265701294, 0.5292744636535645, 0.736048698425293, 0....
def vgg11 ( pretrained = false, * * kwargs ) : model = vgg ( make _ layers ( cfg ['a'] ), * * kwargs ) if pretrained : model. load _ state _ dict ( model _ zoo. load _ url ( model _ urls ['vgg11'] ) ) return model
[ 0.11350716650485992, 0.6059296727180481, 0.26350563764572144, 0.4752594530582428, -0.41592422127723694, 0.5838667750358582, 0.31059712171554565, 1.2686879634857178, 0.14483444392681122, 0.24773749709129333, -0.40270575881004333, -0.3625451326370239, -0.19639219343662262, 0.3913757205009460...
def find _ search _ box ( values ) : flag = 0 search _ box ='' for box in boxes : # scan through all boxes if len ( values [ box ] ) > 1 : # search should be unsolved if len ( values [ box ] ) = = 2 : # if box has only two possible solutions, pick that box and return result search _ box = box return search _ box break ...
[ -0.28995102643966675, 0.07775536924600601, 0.7916263937950134, 0.0033979048021137714, -0.38084718585014343, -0.2852250635623932, 0.43481019139289856, -1.0341964960098267, -0.11997312307357788, -0.9241390824317932, -0.1300145387649536, -0.44266149401664734, -0.42172887921333313, 0.805917739...
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 j _ fn ( x, * args ) : _ kwargs = { k : v for k, v in zip ( keys, arg...
[ -0.04736524447798729, 0.4666730761528015, 0.9399306774139404, 0.47636178135871887, -0.5292167663574219, -0.9999292492866516, -0.1078546941280365, 0.019129909574985504, -0.9548761248588562, 0.8208004236221313, -0.2837182283401489, 0.19363202154636383, 0.7101844549179077, 0.02934807538986206...
def grad ( image ) : grad _ hor, grad _ ver = np. zeros _ like ( image ), np. zeros _ like ( image ) grad _ hor = np. gradient ( image, axis = 1 ) grad _ hor [ :, 1 : - 1 ] = ( 2 * grad _ hor [ :, 1 : - 1 ] ) % 256 grad _ ver = np. gradient ( image, axis = 0 ) grad _ ver [ 1 : - 1, : ] = ( 2 * grad _ ver [ 1 : - 1, : ]...
[ -1.3078551292419434, -0.09622393548488617, 0.6992172598838806, -0.12280866503715515, -0.20653201639652252, 0.06734920293092728, 0.509002685546875, 0.05262758955359459, -0.3849165141582489, 0.7576056718826294, -0.5561307668685913, 0.20659339427947998, -0.22073282301425934, 1.190120458602905...
def _ deserialize ( self, json _ dict : dict = none, datastring : str ='', filepath : str ='' ) : assert json _ dict or datastring or filepath, \'please provide at least one of < json _ dict >, < datastring >, or < filepath > to deserialize from.'if not json _ dict : if datastring : json _ dict = json. loads ( datastri...
[ -0.39169955253601074, 0.04888547584414482, 0.5134180784225464, -0.5866341590881348, -0.2638876736164093, -0.671364426612854, 0.030658824369311333, 0.41106557846069336, -0.33522653579711914, -0.02728818915784359, -0.24602243304252625, -0.09589213132858276, 0.4080469012260437, 0.460148453712...
def test _ map _ deserialization ( self ) : original = deserializationtestmodel. create ( count = 5, text ='happy') nested = original. get _ map ( ) assert isinstance ( nested, dict ) assert nested ['vertex'] = = original assert nested ['number'] = = 5
[ -0.0552956685423851, -0.34729039669036865, 0.5506668090820312, -0.10989515483379364, -0.606453537940979, 0.07224196195602417, 0.16797341406345367, -0.08805189281702042, -0.2499762773513794, -1.3080644607543945, -1.044297456741333, -0.18367525935173035, 0.19775299727916718, -0.5771730542182...
def run ( self, inputvolume, outputvolume, imagethreshold, enablescreenshots = 0 ) : if not self. isvalidinputoutputdata ( inputvolume, outputvolume ) : slicer. util. errordisplay ('input volume is the same as output volume. choose a different output volume.') return false logging. info ('processing started') # compute...
[ -0.1800343543291092, -0.2495942860841751, 0.6610181927680969, 0.3794502317905426, -0.23739556968212128, -0.18689459562301636, 0.19875335693359375, -0.6955949664115906, -0.38085833191871643, 0.23607879877090454, 0.3531404733657837, 0.3110523223876953, -0.5334382057189941, -0.687445044517517...
def columns _ used _ from _ sources ( self, using = none ) : raise notimplementederror ( " base method called " )
[ -0.595544695854187, -0.3123950660228729, 0.7280945777893066, 0.0481393039226532, 0.2520299255847931, -0.00374516355805099, 1.030504822731018, -0.34685221314430237, -0.9174692630767822, -0.19734515249729156, -0.9589588046073914, 0.3284498453140259, 0.13819973170757294, 0.7645984888076782, ...
def _ create _ workspace _ metadata ( self ) - > client. v1objectmeta : new _ name = self. _ generate _ workspace _ name ( ) meta = client. v1objectmeta ( ) meta. name = new _ name meta. namespace = self. namespace return meta
[ -0.4562751352787018, -0.9349079132080078, 0.6067376732826233, -0.27300137281417847, 0.1427060216665268, 0.6451835036277771, -0.5904617309570312, -0.8897782564163208, 0.2423688918352127, 0.7635494470596313, -0.5688721537590027, 0.8667761087417603, 0.152614027261734, -0.5644964575767517, -...
def cdna _ to _ genomic _ coord ( transcript, coord ) : transcript _ strand = transcript. tx _ position. is _ forward _ strand exons = get _ exons ( transcript ) utr5p = ( get _ utr5p _ size ( transcript ) if transcript. is _ coding else 0 ) # compute starting position along spliced transcript. if coord. landmark = = c...
[ -0.062169671058654785, -0.3112197816371918, 0.8341202139854431, -0.7970221042633057, -0.914808988571167, -0.2388695478439331, -0.08525455743074417, 0.27287501096725464, -0.11230631917715073, 0.7078832983970642, -0.8407236337661743, 0.514904797077179, 0.12017132341861725, -0.934269309043884...
def fpr _ at _ 95 _ tpr ( preds, labels ) : fpr, tpr, _ = roc _ curve ( labels, preds ) if all ( tpr < 0. 95 ) : # no threshold allows tpr > = 0. 95 return 0 elif all ( tpr > = 0. 95 ) : # all thresholds allow tpr > = 0. 95, so find lowest possible fpr idxs = [ i for i, x in enumerate ( tpr ) if x > = 0. 95 ] return mi...
[ 0.07297705113887787, -0.9164785146713257, 0.5398355722427368, -0.208564892411232, -0.7148756980895996, -0.43535274267196655, -0.346487820148468, -0.22820009291172028, -1.3370195627212524, -0.28958335518836975, 0.5225220918655396, -0.8064420223236084, -0.7819917798042297, -0.308354288339614...
def _ _ com _ port _ thread ( self ) : while self. alive. isset ( ) : b = self. serial. read ( 1 ) # ( self. serial. inwaiting ( ) or 1 ) if b : if not os. path. exists ( os. path. dirname ( " log / byte _ recived _ log " ) ) : try : os. makedirs ( os. path. dirname ( " log / byte _ recived _ log " ) ) except oserror a...
[ 0.6821315884590149, -1.0406043529510498, 0.9819557070732117, 0.06517048925161362, 0.4624880850315094, 0.7449219822883606, 0.6502376794815063, -0.20554864406585693, 0.2899584472179413, -0.7905337810516357, -0.21196378767490387, 0.04613343998789787, -0.7261523008346558, -0.48043546080589294,...
def handler ( context ) : # load data context. logger. info ( " loading data " ) df = context. inputs [ " data " ]. as _ df ( ) x = df. drop ( [ " id ", " class " ], axis = 1 ). values y = labelencoder ( ). fit _ transform ( df [ " class " ] ) # ml training code context. logger. info ( " training model " ) clf = svc ( ...
[ 0.020250841975212097, 0.21117910742759705, 0.7371206283569336, 0.08906546235084534, 0.6022481918334961, 0.5338096618652344, 0.437663197517395, 0.39958834648132324, -0.3762013614177704, -0.25440728664398193, -0.5315552949905396, 0.06164068728685379, 0.6759324669837952, 0.9417049288749695, ...
def act ( self, * args ) : pass
[ -0.25565215945243835, -1.7862299680709839, 0.1288318634033203, 0.7780730724334717, 1.7682509422302246, 0.9405727386474609, 1.4971333742141724, 0.08922836929559708, -0.6205014586448669, -0.4265463948249817, -0.11655046790838242, 1.0262776613235474, -0.41789448261260986, 0.06163999065756798,...
def test _ epix _ geometry ( args ) : epix, ( nrow, ncol ), pxsz, cls = args assert isinstance ( epix, cls ) assert epix. expected _ data _ shape = = ( 1, 2 * nrow, 2 * ncol ) assert epix. n _ modules = = 1 assert epix. n _ quads = = 0 assert epix. n _ tiles _ per _ module = = 4 assert isinstance ( epix. modules, list ...
[ -0.2675219476222992, 0.4958727955818176, 0.4319212734699249, -0.3066219985485077, 0.08993379026651382, 0.6234750151634216, 0.2677924335002899, 0.06500640511512756, 0.9332656264305115, -0.750011682510376, -0.8190626502037048, -0.38005197048187256, 0.2290409803390503, 0.5820340514183044, -...
def job _ connect ( self ) : self. log. debug ( " establishing job connection. " ) return self. socket _ connect ( socket _ type = zmq. dealer, connection = self. connection _ string, port = self. args. job _ port, send _ ready = false, )
[ -0.20981736481189728, -0.4699919521808624, 0.6020808815956116, -0.36367926001548767, -0.21259069442749023, -0.33917373418807983, 0.05358674004673958, -0.19359099864959717, -1.2745695114135742, -0.362403929233551, 0.47260791063308716, 0.5840177536010742, -0.7019430994987488, 0.1983589828014...
def make _ data _ sets ( x _ train _ val, y _ train _ val, x _ test, y _ test, split _ train _ val = false, stratified _ splits = true, test _ size = none, random _ state = none, flatten _ images = false, dtype = tf. float32 ) : class datasets ( object ) : pass data _ sets = datasets ( ) x _ train = none x _ val = none...
[ -0.34070250391960144, 0.7206474542617798, 0.6926630735397339, 0.0025240457616746426, -0.6583441495895386, -0.03700955584645271, 0.5236573219299316, -0.41252759099006653, -0.012404792942106724, -0.39483922719955444, 0.16689567267894745, 0.37846630811691284, 0.8152112364768982, -0.3110870718...
def setupui ( self, mainwindow ) : mainwindow. setobjectname ( " mainwindow " ) mainwindow. resize ( 640, 632 ) self. centralwidget = qtwidgets. qwidget ( mainwindow ) self. centralwidget. setobjectname ( " centralwidget " ) self. morning = qtwidgets. qgroupbox ( self. centralwidget ) self. morning. setgeometry ( qtcor...
[ -0.3744359016418457, -0.48079967498779297, 0.8837756514549255, -0.2309141606092453, -0.010677501559257507, 0.7310149669647217, 0.9442437887191772, -0.36934980750083923, -0.09698177874088287, -0.24458369612693787, -0.35343748331069946, -0.4109940230846405, -0.35875633358955383, 1.2680021524...
def create _ final _ discriminator _ network ( x, from _ rgb _ conv _ layers, blocks, flatten _ layer, logits _ layer, params ) : print _ obj ( " \ ncreate _ final _ discriminator _ network ", " x ", x ) with tf. variable _ scope ( name _ or _ scope = " discriminator ", reuse = tf. auto _ reuse ) : # only need the last...
[ -0.46073272824287415, -0.3253764808177948, 0.7404338717460632, 0.2749376893043518, 0.32034537196159363, -0.6195070743560791, -0.013751986436545849, -0.33299440145492554, 0.16056357324123383, -0.31995514035224915, -0.6892077922821045, 0.29395487904548645, -0.28335270285606384, 0.16234487295...
def test _ saved _ description ( self ) : report _ airflow _ variable = variable. get ( " rb _ status _ " + self. report _ form _ sample. report _ title. data, deserialize _ json = true, ) self. assertequal ( self. report _ form _ sample. description. data, report _ airflow _ variable [ " description " ], )
[ 1.058110237121582, -0.03649257868528366, 0.14783932268619537, -0.38532379269599915, 0.9660853147506714, -0.1360848844051361, -0.42939677834510803, -0.025796527042984962, 0.225065678358078, -0.1460287868976593, -0.6242177486419678, 0.34852439165115356, -0.4539245367050171, -0.19487835466861...
def testorphaneddatanotdiscardedifflagunset ( self ) : gen = _ eventgenerator ( self ) acc = self. _ make _ accumulator ( gen, purge _ orphaned _ data = false ) gen. addevent ( event _ pb2. event ( wall _ time = 0, step = 0, file _ version = " brain. event : 1 " ) ) gen. addscalartensor ( " s1 ", wall _ time = 1, step ...
[ 0.2990693151950836, 0.4246549606323242, 0.6815412640571594, -0.31352537870407104, 0.020717943087220192, 1.0592502355575562, 0.6278905868530273, -0.07143013924360275, -0.38375863432884216, -0.21583206951618195, -0.8191084861755371, 0.4305575489997864, 0.5280550122261047, 0.6404157876968384,...
def login _ user ( self, req ) : data = json. loads ( req. data ) user = self. user _ model. find _ by _ email ( data [ " email " ] ) if user and user. check _ password2 ( data ('password') ) : auth _ token = user. encode _ auth _ token ( user. id ) if auth _ token : response _ object = {'status':'success ','message':'...
[ -1.0119460821151733, -0.586694061756134, 0.848256528377533, 0.896809458732605, -0.3436338007450104, 0.4629601836204529, -0.39862748980522156, -0.1864914745092392, 0.07197239249944687, -0.10986274480819702, -0.6019946932792664, -0.12691465020179749, 0.2988327145576477, -0.2139645367860794, ...
def setup ( self, parameters ) : self. parameters = parameters
[ -0.3136638402938843, -0.11337808519601822, 0.13633598387241364, -0.6523425579071045, 1.0903699398040771, 0.520033597946167, 0.3246162533760071, 0.5352299809455872, -0.020666172727942467, 0.9078081846237183, -0.31628668308258057, 0.24083212018013, -1.1384155750274658, 1.0175559520721436, ...
def resample ( img, size ) : ratio = size / max ( np. shape ( img ) ) return sp. misc. imresize ( img, ratio, mode ='l ', interp ='nearest')
[ 0.6468900442123413, 0.783669114112854, 0.4293034076690674, -0.05996229127049446, -1.5395348072052002, -0.884401261806488, -0.4378281235694885, 0.4193151295185089, 1.1986883878707886, 0.17330119013786316, 0.1827787309885025, -0.3942577540874481, 0.12297102808952332, -0.8049014210700989, 0...
def check ( self ) : for repo in self. get _ all ( ) : repo. files = repo. files
[ 0.2374359518289566, 0.21668875217437744, 0.48504695296287537, 0.1965174823999405, 1.3324650526046753, -0.11911826580762863, -0.10998912900686264, 0.6304004788398743, -0.4621447026729584, 0.45145589113235474, 0.3655514121055603, -0.5820212960243225, -0.0796782597899437, 0.9300128817558289, ...
def _ marshaled _ dispatch ( self, data, dispatch _ method = none, path = none ) : # parse the request try : request = jsonrpclib. loads ( data, self. json _ config ) except exception as ex : # parsing / loading error fault = fault ( - 32700,'request { 0 } invalid. ( { 1 } : { 2 } ) '. format ( data, type ( ex ). _ _ n...
[ -0.49156808853149414, -0.11588288843631744, 0.7250646352767944, -0.6548483967781067, -0.4320864677429199, -0.6649858951568604, -0.5635038614273071, -0.2545754015445709, 0.5495636463165283, -0.19394804537296295, 0.0008882309193722904, -0.446066290140152, 0.0273720882833004, 0.09581615775823...
def readinto ( self, b ) : return 0
[ -0.7441592812538147, -0.22718898952007294, 0.5108323693275452, 0.2817120850086212, 0.40314510464668274, 0.7234933972358704, 0.07456529140472412, 0.17090873420238495, -0.8471682667732239, -0.5963223576545715, 0.22652482986450195, -0.03254837915301323, -1.3533248901367188, -0.445898771286010...
def get _ red _ box ( resized _ frame, threshold _ area = 400 ) : hsv _ colour _ img = cv2. cvtcolor ( resized _ frame, cv2. color _ bgr2hsv ) # lower red lower _ red = np. array ( [ 0, 110, 110 ] ) upper _ red = np. array ( [ 10, 255, 255 ] ) # upper red lower _ red2 = np. array ( [ 170, 50, 50 ] ) upper _ red2 = np. ...
[ -0.570396900177002, -0.23846881091594696, 1.121262550354004, 0.7555151581764221, -0.33773064613342285, -0.5960392951965332, 0.3289402425289154, -0.5432096123695374, 0.8413126468658447, -0.2034180760383606, -1.159487247467041, 0.10858265310525894, 0.6795170307159424, 0.9446046352386475, 0...
def initialize ( self ) : pass
[ 0.009855352342128754, -0.902616560459137, -0.0014338530600070953, 1.0475406646728516, 1.100987434387207, 0.6061794757843018, 0.5689640641212463, 0.4190096855163574, -0.1501513570547104, -1.1811728477478027, -1.501328468322754, 0.19064973294734955, -0.12300574779510498, 0.9325046539306641, ...
def _ _ init _ _ ( self ) : self. _ stack = [ ] self. _ min = [ ]
[ -0.26511603593826294, 0.38726410269737244, 0.3094158172607422, 0.7248579263687134, 0.06444474309682846, -0.5810620784759521, 0.09998682141304016, 0.06637366116046906, 0.005614140070974827, -0.1898697316646576, -1.8814419507980347, -0.0035262680612504482, -0.1490568071603775, 0.745165467262...
def hivelist ( self ) : log. debug ( " executing volatility hivelist plugin on " " { 0 } ". format ( self. memdump ) ) self. _ _ config ( ) results = [ ] command = self. plugins [ " hivelist " ] ( self. config ) hive _ offsets = [ ] for hive in command. calculate ( ) : try : name = str ( hive. filefullpath or'' ) or st...
[ -0.48106467723846436, -0.9681987166404724, 0.5967221260070801, -0.6008058786392212, 0.22115446627140045, -0.5308303833007812, -0.5148133635520935, 0.8579562306404114, 0.19970332086086273, 0.9975549578666687, -0.8195350170135498, 0.10929160565137863, 0.3050915598869324, 0.37303972244262695,...
def validate ( model, criterion, valset, loss _ scalars, best _ val _ loss _ dict, iteration, batch _ size, n _ gpus, collate _ fn, logger, distributed _ run, rank ) : model. eval ( ) with torch. no _ grad ( ) : val _ sampler = distributedsampler ( valset ) if distributed _ run else none val _ loader = dataloader ( val...
[ 0.05086072161793709, -0.3154028356075287, 0.8262887001037598, 0.42170679569244385, -0.2212541699409485, 0.10337776690721512, 0.09877850115299225, -0.06179981306195259, -0.7600309252738953, 0.029874129220843315, 0.259475439786911, 0.0330483503639698, 1.2809429168701172, 0.9224283695220947, ...
def readcalibration ( self, calibrationfile ) : b = none height = none with open ( calibrationfile,'rb') as f : lines = f. readlines ( ) b = float ( lines [ 1 ] ) # the second line contains the b value height = float ( lines [ 3 ] ) tiltangle = np. arccos ( - b ) # crop angle maxangle = np. arctan ( - 2. / b ) # print ...
[ 0.2229982316493988, -0.7122776508331299, 0.745440661907196, 0.47970208525657654, -0.9230331182479858, 0.31122881174087524, 0.7664273977279663, 0.06814325600862503, 0.0963311418890953, 0.6754143834114075, -0.12235546857118607, -0.31259456276893616, 0.3943622410297394, -0.5074260830879211, ...
def _ updatelabels ( self, labels = none ) : # : default plot labels if labels is none : labels = dict ( k = r'$ k \ rm \, ( \ aa ^ { - 1 } ) $ ', r = r'$ r \ rm \, ( \ aa ) $ ', energy = r'$ e \ rm \, ( ev ) $ ', mu = r'$ \ mu ( e ) $ ', norm = r'normalized $ \ mu ( e ) $ ', flat = r'flattened $ \ mu ( e ) $ ', deconv...
[ -0.15605728328227997, -0.4486163258552551, 0.3816339373588562, -1.5142934322357178, -0.31293144822120667, 0.036462727934122086, -0.3821612596511841, 0.17578758299350739, -0.5934549570083618, 0.4554336369037628, 0.17200441658496857, 0.07857439666986465, -0.40299782156944275, 0.4574714899063...
def groupupdated ( self, groupview ) : raise notimplementederror
[ -0.5770171880722046, -1.0177526473999023, 0.4457826018333435, 0.53862464427948, -1.012332558631897, -0.03809438273310661, 0.5202878713607788, -0.43428993225097656, -0.17345941066741943, -0.159386545419693, -0.061986278742551804, 0.0500883087515831, 0.33789747953414917, 0.12336592376232147,...
def permute _ 18s ( g ) : from random import shuffle rrna _ labels = [ d ['18s _ rrna _ sequence'] for n, d in g. nodes ( data = true ) ] shuffle ( rrna _ labels ) for i, n in enumerate ( g. nodes ( ) ) : g. node [ n ] ['18s _ rrna _ sequence'] = rrna _ labels [ i ] return g
[ -0.9400758147239685, 0.23317468166351318, 0.5723947882652283, -1.0762263536453247, 0.4072180688381195, 0.27150043845176697, 0.2049982100725174, 0.21296115219593048, 0.47222900390625, 0.8393707275390625, -0.05769486352801323, 0.16415221989154816, 0.3876911401748657, -0.6372714638710022, -...
def menu ( self ) : if self. mainscreen : pygame. display. update ( ) screen. blit ( self. background. image, self. background. rect ) for text in self. elementmenu : text. draw ( screen ) for e in pygame. event. get ( ) : if e. type = = pygame. quit : self. exit _ game ( ) elif e. type = = pygame. keyup : self. startg...
[ -0.6682949066162109, -0.6185029149055481, 0.6165305376052856, 0.8932958841323853, 0.18431173264980316, 0.5267789959907532, 0.09056059271097183, -0.17931877076625824, 0.3208909034729004, 0.41143614053726196, 0.6346573233604431, -0.6319307684898376, -0.6757440567016602, 1.1221871376037598, ...
def _ _ init _ _ ( self, x : num, y : num ) : super ( ). _ _ init _ _ ( x, y )
[ -0.004909124691039324, 0.13134244084358215, 0.5689306855201721, 0.680766224861145, -0.11489120125770569, 0.4286220073699951, -0.4818952977657318, -0.638985812664032, -0.19210635125637054, -0.6203091144561768, -0.5695773363113403, 0.6958534717559814, 0.7652098536491394, -0.24873201549053192...
def print _ size _ np _ array ( array, array _ name ) : logger. debug ( " shape of { 0 } array : { 1 } ". format ( array _ name, array. shape ) ) logger. debug ( " size of { 0 } : { 1 :. 3f } mb ". format ( array _ name, array. nbytes / float ( 2 * * 20 ) ) )
[ 0.9242598414421082, -1.0686025619506836, 0.9131277203559875, -0.5456146597862244, -0.17799127101898193, 0.3905932903289795, -0.13877439498901367, -0.2145855873823166, 0.5104123950004578, 0.9057212471961975, -0.37156063318252563, 1.2159115076065063, 0.24891234934329987, 0.8319786787033081, ...
def patch _ file ( filename : str, pattern : str = none, replace : str = none, patterns : list [ tuple [ str, str ] ] = none, outfile : str = none ) : # this is foobared but i cannot find the strength to do this right if ( pattern is none and replace is none and patterns is none ) : # or # ( patterns is not none and # ...
[ 0.748404860496521, -0.4776873290538788, 0.9041005969047546, -0.4518652856349945, -0.40044891834259033, 0.24751487374305725, 0.3528177738189697, 1.8577841520309448, 0.31787747144699097, -0.30705299973487854, 0.5125656127929688, 0.6004351377487183, -0.2425270825624466, 0.2599453032016754, ...
def handle _ error ( sys _ args, cmd ) : err _ str = render _ email _ template ( " cronwrap detected failure or error output for the command : ", sys _ args, cmd ) if sys _ args. emails : send _ email ( sys _ args, sys _ args. emails,'host % s : cronwrap detected a failure!'% platform. node ( ). capitalize ( ), err _ s...
[ 0.36214694380760193, -0.19027462601661682, 0.48235851526260376, 0.3907933831214905, 0.24659140408039093, -0.16260646283626556, -0.17410850524902344, 0.39109164476394653, -0.14725612103939056, -0.39729735255241394, 0.700337290763855, 1.039949655532837, -0.21140192449092865, 0.29930117726325...
def get _ registers ( self ) : host, port = self. ip _ addr, 730 sock = socket. socket ( socket. af _ inet, socket. sock _ stream ) sock. connect ( ( host, port ) ) # this is the cmd that we send to the console sock. send ( " getcontext thread = 0x % x control int fp vr \ r \ n " % self. addr ) data ='' # the character...
[ -0.5568310618400574, 0.18434090912342072, 0.7217788100242615, -0.26814740896224976, 0.5577604174613953, -0.9656323194503784, -0.2711902856826782, -0.5061198472976685, -0.3397716283798218, -0.20133458077907562, -0.2731187045574188, 0.7341447472572327, -1.1140973567962646, 0.524057924747467,...
def json _ format _ dict ( self, data, pretty = false ) : if pretty : return json. dumps ( data, sort _ keys = true, indent = 2 ) else : return json. dumps ( data )
[ -1.0264363288879395, -0.4338946044445038, 0.5904824733734131, -0.5781903862953186, -1.3600512742996216, 0.05184296518564224, -0.6514359712600708, -0.4742879867553711, 0.0869179517030716, -0.0490620918571949, 0.6207400560379028, 0.36303144693374634, 0.32101601362228394, 1.248522400856018, ...
def _ create _ drydock _ results _ notes ( self, dd _ task _ id, task _ result ) : for msg in task _ result. get ('details ', { } ). get ('messagelist ', [ ] ) : try : if msg. get ('message') : error = msg. get ('error ', false ) msg _ text = " { } : { } : { } { } ". format ( msg. get ('context _ type ','n / a'), msg. ...
[ -0.34758076071739197, -0.058597493916749954, 0.5644909739494324, -0.6407496333122253, 0.8145760893821716, -0.15181398391723633, 0.6239238381385803, -0.6684516072273254, -0.945662260055542, -0.24707208573818207, 0.021226366981863976, -0.35838207602500916, 0.6599405407905579, 0.8851961493492...
def get ( self, session _ id ) : cursor = self. _ db _ pool. connect ( ). cursor ( ) # query the session from the database, only searching for still valid sessions cursor. execute ( " select id, data, expires from sessions where id = % s and expires > % s ", ( session _ id, datetime. utcnow ( ) ) ) # get the first matc...
[ -0.16973257064819336, -0.39870133996009827, 0.4120132625102997, -0.5259393453598022, 0.39710238575935364, -1.0466140508651733, -0.802143394947052, -1.3435791730880737, 1.1696324348449707, -0.4555900990962982, -0.12127453833818436, 0.21857626736164093, -0.15529681742191315, -0.6536279320716...
def _ dayclickcallback ( self, calendarguiday ) : self. selectedcalendarguiday = calendarguiday self. nextbutton ['state'] = directguiglobals. normal self. makepartynowbutton. hide ( ) self. nextbutton. show ( )
[ -0.06867416203022003, 0.4968842566013336, 0.37652987241744995, -0.3887673020362854, -0.6326854228973389, 0.4902724623680115, 0.8178632259368896, 0.21896106004714966, 0.8257127404212952, -0.22144490480422974, 0.10142353177070618, -0.3491972088813782, 0.0802476778626442, -0.04263147711753845...
def push ( self, elem ) : no = self. top self. top = node ( elem ) self. top. next = no self. _ size = self. _ size + 1
[ -1.1841371059417725, 1.6766374111175537, 0.4944303035736084, 0.6019198894500732, -0.732310950756073, 0.2442377209663391, 0.7481600642204285, -0.24850575625896454, 0.5727753043174744, 0.21906699240207672, -0.8472975492477417, 0.5479147434234619, -0.1271710842847824, 0.10235846787691116, 0...
def getampdesc ( index, char _ length ) : andor _ solis. getampdesc. restype = ctypes. c _ uint name = ctypes. create _ string _ buffer ( str _ buffer _ size ) result = andor _ solis. getampdesc ( ctypes. c _ int ( index ), ctypes. byref ( name ), ctypes. c _ int ( char _ length ) ) check _ status ( result ) return str...
[ 0.26314273476600647, -0.48198172450065613, 0.5056198239326477, -0.8961494565010071, -0.8199068307876587, -0.2003505825996399, -0.19577595591545105, -1.0174469947814941, 0.8051138520240784, 0.38242727518081665, 0.23456019163131714, 1.0799601078033447, 0.04729147627949715, -0.856708407402038...
def _ jacobian _ contraction _ ntk _ fn ( f : applyfn, trace _ axes : axes, diagonal _ axes : axes, vmap _ axes : vmapaxes, * * kwargs ) - > empiricalkernelfn : def sum _ and _ contract ( fx, j1, j2 ) : ndim = fx. ndim size = utils. size _ at ( fx, trace _ axes ) _ diagonal _ axes = utils. canonicalize _ axis ( diagona...
[ -0.0652347132563591, 0.31121960282325745, 0.7000280618667603, -0.40377891063690186, -0.9939089417457581, -0.7808614373207092, 1.0828462839126587, -0.571908175945282, -0.39793646335601807, 1.0517642498016357, -0.37605002522468567, -0.04112032800912857, 1.029340147972107, 0.10971836745738983...
def _ get _ arrays _ of _ same _ size _ list ( array _ parameters ) : arrays _ same _ sizes _ list = [ ] for param in array _ parameters : size = param. sizes [ 0 ] # if a declared size is not yet represented in a result list : if not _ size _ in _ list ( arrays _ same _ sizes _ list, size ) : # append an object with t...
[ 0.2705193758010864, -0.41160348057746887, 0.8940981030464172, 0.8361719846725464, 0.9669169783592224, -0.10504774749279022, 0.23884181678295135, -0.8494662642478943, 1.2229130268096924, 0.7647233605384827, -0.4064951241016388, 0.3462270200252533, -0.2884335219860077, 1.6356136798858643, ...
def rotate ( stringblock ) : lines = [ list ( row ) for row in stringblock. split ( " \ n " ) ] length = len ( lines ) return " \ n ". join ( [ " ". join ( [ lines [ length - 1 - j ] [ i ] for j in range ( length ) ] ) for i in range ( length ) ] )
[ -0.014743909239768982, -0.2551766335964203, 0.8834527730941772, -0.40268203616142273, -0.6659561395645142, -1.1083284616470337, -0.21463802456855774, -0.2761062681674957, -0.4094315767288208, 0.5049224495887756, 0.08057287335395813, 0.14545132219791412, -1.5104260444641113, -0.886956453323...
def get _ correlating _ nouns _ and _ adjectives ( self, tokens ) : return list ( item. string. strip ( ) for item in tokens if item. pos _ in self. noun _ adjectives )
[ -0.6389780044555664, -0.6877431869506836, 0.04524468258023262, -0.8115814328193665, -0.33667635917663574, 0.5625335574150085, -1.830325961112976, -0.15796060860157013, -0.5323996543884277, 0.4301340878009796, -0.17449069023132324, 0.2195160686969757, -0.17691928148269653, 1.226435303688049...
def map _ srm _ to _ name ( self, project _ id, include _ all = true, * * args ) : samples = self. map _ name _ to _ srm ( project _ id, * * args ) srm _ to _ name = { } for k, v in samples. items ( ) : if not v : if not include _ all : continue srm _ to _ name. update ( { " nosrm _ { } ". format ( k ) : { " sample " :...
[ -0.5071221590042114, -0.317844957113266, 0.5611327290534973, -0.7215418815612793, -0.9780991077423096, -0.23695717751979828, -0.39835113286972046, 0.23327045142650604, 0.3155823349952698, 0.8008108139038086, -0.7595877051353455, -0.0556270033121109, 0.178773894906044, 0.7195570468902588, ...
def _ parse _ json ( self, file ) : with open ( file ) as f : content =''. join ( f. readlines ( ) ) match = self. comment _ re. search ( content ) while match : content = content [ : match. start ( ) ] + content [ match. end ( ) : ] match = self. comment _ re. search ( content ) return json. loads ( content )
[ -0.2815479040145874, -1.4085652828216553, 0.7108988761901855, -1.3357367515563965, -0.40398210287094116, -0.07679010927677155, 0.24194294214248657, -0.09168758243322372, -0.9668422937393188, 0.5245830416679382, -0.3083505630493164, -0.23512178659439087, 0.10073676705360413, -0.729010283946...
def test _ node _ annotation _ a _ add _ k _ edit _ a _ edit ( ) : annotation _ key = random _ name ( ) annotation _ value = random _ name ( ) # get node details client, node = \ get _ node _ details ( cluster _ detail [ " cluster " ], cluster _ detail [ " client " ] ) node _ name = node. nodename node _ annotations = ...
[ -0.185984805226326, -0.372185617685318, 0.6349143981933594, -0.44926464557647705, 0.21251589059829712, 0.44145452976226807, 0.5397027730941772, -0.1583998054265976, 0.06396269053220749, 0.350471168756485, -0.3864327371120453, 0.872096836566925, 0.2000323385000229, 0.1460849791765213, 0.5...
def service _ rpc _ string ( service, uid ) : return {'specifications': ['python : /'+ service ],'peer':'{ } '. format ( uid ),'configurations': ('herald - xmlrpc ', ),'uid':'{ } '. format ( uid ),'properties': {'herald. rpc. peer':'{ } '. format ( uid ),'endpoint. framework. uuid':'{ } '. format ( uid ),'herald. rpc. ...
[ 0.23257635533809662, -0.7733982801437378, 0.5251438021659851, -2.24890398979187, -0.7118920087814331, -0.12523019313812256, -0.6486693620681763, -1.1302281618118286, -0.1543298214673996, 0.5569276809692383, 0.07697048783302307, 0.6482494473457336, -0.7356564998626709, 0.02177751623094082, ...
def update _ weights ( self, weights ) : # dont track update in grad self. eval ( ) # ordered keys of params state _ dict = self. state _ dict ( ) keys = list ( state _ dict. keys ( ) ) keys. sort ( ) # ensure we have the same order each time used _ params = 0 # for key in keys : for param in self. parameters ( ) : # g...
[ -0.7006596922874451, -0.48538675904273987, 0.4824703633785248, -0.5210357904434204, 0.016377080231904984, -0.07469044625759125, 0.23378382623195648, -0.04031789302825928, -0.533745288848877, 1.034904956817627, -0.20681969821453094, 0.5971038341522217, 0.028260674327611923, 1.20914661884307...
def from _ file ( self, full _ path ) : with open ( full _ path ) as file : creds = json. load ( file ) if not " client _ id " in creds or not type ( creds [ " client _ id " ] ) is str : raise daexplorerexception ( " credentials must be valid json with string value'client _ id '. " ) if not " client _ secret " in creds...
[ 0.6155270338058472, -0.06716758012771606, 0.5477588176727295, -0.5291309952735901, -0.3336924910545349, -0.0325457938015461, -0.21486255526542664, 0.5812695622444153, -0.35944122076034546, -0.24456578493118286, -0.1935426890850067, -0.2509632110595703, 0.7190735340118408, 0.152342185378074...
def save ( function, * args, * * kwargs ) : # get targetextension targetpath = kwargs. get ('targetpath ', args [ 0 ] ) targetbase, targetextension = os. path. splitext ( targetpath ) # if the targetpath does not have a zip extension, if targetextension. lower ( )! = '. zip': # run function as usual return function ( *...
[ -0.6099568605422974, -0.2373366802930832, 0.8839050531387329, -0.26374226808547974, -0.08498014509677887, 0.03403497487306595, 0.8905273675918579, -0.07305733114480972, 0.11763598024845123, 0.3740622401237488, -0.36305588483810425, -0.3290615379810333, -0.2566462755203247, -0.0496881976723...
def load _ all _ mat ( mat _ path = '. / mat ', from _ npy = false ) - > object : if not from _ npy : blendshapes = scipy. io. loadmat ( os. path. join ( mat _ path,'blendshapes. mat') ) ['blendshapes'] [ 0 ] [ 0 ] [ 0 ] # 34530 x 150 x 47 # pt87. keys ( ) includes'parazk _ 87 ','index87in186 ','index _ new87 ', # only...
[ 0.5100066661834717, -0.655765950679779, 0.5568427443504333, 0.06482277065515518, -0.5821986794471741, 0.48699066042900085, 1.57213294506073, -0.6416133046150208, 0.4560527205467224, 0.2014770805835724, -0.21630863845348358, 0.45338010787963867, -0.21868662536144257, 0.21116560697555542, ...
def find _ all _ local _ file _ names ( source _ folder _ name ) : cwd = os. getcwd ( ) cwd _ extension = os. path. normpath ( f'{ cwd } / { source _ folder _ name } / * *') file _ names = glob. glob ( cwd _ extension, recursive = true ) return [ file _ name for file _ name in file _ names if os. path. isfile ( file _ ...
[ 0.9080411791801453, -0.3008010983467102, 0.6386079788208008, 0.49457958340644836, -0.7454066872596741, 0.23897603154182434, 0.3642137050628662, 0.9199305772781372, 0.36326202750205994, 0.3915553092956543, -0.5458738803863525, 0.027967650443315506, -0.21452194452285767, 1.4946566820144653, ...