text
stringlengths
25
2.19k
embedding
listlengths
768
768
def argument _ list ( self ) : answer = self. _ call ('argument _ list') return answer. names
[ -0.9325088262557983, 0.411589652299881, 0.49796536564826965, 0.8730502128601074, 1.245712399482727, 0.4969993531703949, -1.0412400960922241, 0.4312417507171631, 0.29060298204421997, 0.5922105312347412, -0.906656801700592, 0.7272453308105469, -0.0008285188814625144, 0.42248550057411194, -...
def topological _ sort ( self ) : if self. is _ cyclic ( ) : raise valueerror ( " graph is cyclic. " ) white = set ( self. adj _ list. keys ( ) ) ret = [ ] while white : self. topological _ helper ( white. pop ( ), white, ret ) ret. reverse ( ) return ret
[ -0.5655757784843445, 0.4749566614627838, 0.4069085419178009, 0.31220051646232605, 0.7153802514076233, 0.220815509557724, 0.2786256670951843, -1.2812442779541016, -0.0238325297832489, 0.7653774619102478, 0.19955074787139893, 1.0321677923202515, -0.23340097069740295, 0.34301361441612244, -...
def with _ data ( self, x : pd. dataframe ) - > " boolparammeta " : return self
[ -0.5217726230621338, 0.31738200783729553, 0.2579827308654785, -0.31702855229377747, -0.2568396329879761, 0.597635805606842, -0.9838531017303467, -0.23369921743869781, 0.06488820165395737, -0.315258651971817, -0.27115821838378906, 0.8347161412239075, 0.31253769993782043, -0.4246862828731537...
def _ real _ departure ( self ) - > int : return round ( ( self. real _ departure _ time - self. now ). seconds / 60 )
[ -0.1727897673845291, -0.3847000300884247, 0.5602144002914429, -0.6341589093208313, -1.3874726295471191, -0.10710664838552475, -0.38230085372924805, 0.28575074672698975, -0.3075410723686218, 0.11606055498123169, -0.6911736130714417, -0.6388214826583862, 0.5346024632453918, 0.495906323194503...
def register ( self, var _ name, var _ value ) : if self. _ lock. acquire ( true, 1 ) : try : if var _ name in self. _ variables : # variable already exists return false else : self. _ variables [ var _ name ] = var _ value self. _ logger. debug ( f'registered new variable { var _ name }') return true except exception ...
[ -0.7780120372772217, 0.453347384929657, 0.7473912239074707, -0.7588410973548889, 0.42393505573272705, -0.32361698150634766, -0.4827961027622223, -0.5516155958175659, -0.4442252218723297, -0.0325687900185585, -0.8586028814315796, -0.33094650506973267, -0.7810866832733154, -0.036560207605361...
def getnumberpreampgains ( ) : andor _ solis. getnumberpreampgains. restype = ctypes. c _ uint nogains = ctypes. c _ int ( ) result = andor _ solis. getnumberpreampgains ( ctypes. byref ( nogains ) ) check _ status ( result ) return int ( nogains. value )
[ -0.061923980712890625, 0.6423057913780212, 0.7278350591659546, 0.02906431257724762, -0.8808212280273438, -0.44358474016189575, 1.6788936853408813, 0.09854867309331894, 0.5813965797424316, -1.1399000883102417, -0.7920301556587219, 0.33275169134140015, -0.4146406948566437, 0.5915699601173401...
def auto _ crop ( i ) : import numpy as np row _ sum = ( 1 - i ). sum ( axis = 1 ) col _ sum = ( 1 - i ). sum ( axis = 0 ) top = np. nonzero ( row _ sum ) [ 0 ] [ 0 ] bottom = np. nonzero ( row _ sum ) [ 0 ] [ - 1 ] left = np. nonzero ( col _ sum ) [ 0 ] [ 0 ] right = np. nonzero ( col _ sum ) [ 0 ] [ - 1 ] # print ( l...
[ -0.4319431185722351, -0.45083215832710266, 0.8351590037345886, 0.8241888880729675, -0.1581527292728424, -0.16899681091308594, 1.569995641708374, -0.41349542140960693, 0.494141548871994, 0.45798900723457336, -0.21189630031585693, -0.2621596157550812, 0.16881592571735382, -0.5913299918174744...
def vmap _ chunked ( f : callable, in _ axes = 0, *, chunk _ size : optional [ int ] ) - > callable : in _ axes, argnums = _ parse _ in _ axes ( in _ axes ) vmapped _ fun = jax. vmap ( f, in _ axes = in _ axes ) return _ chunk _ vmapped _ function ( vmapped _ fun, chunk _ size, argnums )
[ 0.5220723748207092, 0.42876556515693665, 0.5588864088058472, -0.13670901954174042, -0.5353544354438782, -0.8032122254371643, 0.15794023871421814, 0.044001150876283646, -0.0318329893052578, 0.3706366717815399, 0.21553443372249603, 0.8496217727661133, 0.9941492080688477, -1.0329005718231201,...
def getimagedepth ( self ) : return ( self. fieldtodec ( self. dibheader. colourdepth ) )
[ -0.4414599537849426, -0.030322838574647903, 0.5416530966758728, -0.6889115571975708, 0.10094325244426727, -0.15459147095680237, 0.556584358215332, -0.7864071130752563, 0.01617785356938839, -0.766632616519928, -0.31055086851119995, 0.3021705448627472, 0.27649638056755066, 1.1908249855041504...
def subdisplays ( self ) : return zip ( self. embedded, self. window. displays )
[ 0.6570748090744019, -0.889668881893158, 0.5765794515609741, 0.539801836013794, -0.8396119475364685, 1.2201615571975708, 0.6233123540878296, -0.8613496422767639, 1.1330586671829224, -0.20768247544765472, 0.04847284406423569, 0.3401901423931122, -0.7967674732208252, 1.364912748336792, -0.9...
def current _ names ( table, column ) : try : tbl, col = col _ alias [ ( table, column ) ] except keyerror : # print ('> > > > unable to find historical names for column " % s " of table " % s "'# % ( column, table ) ) raise columnnotfounderror if ( tbl, col ) = = ( none, none ) : return ( none, none ) elif ( tbl, col ...
[ 0.22631525993347168, -0.27623823285102844, 0.6006074547767639, -0.0733109563589096, -0.0013797174906358123, -0.3661893606185913, 0.1757827252149582, -0.5790011882781982, -1.134948492050171, 0.9299055337905884, -0.15415091812610626, 0.47554829716682434, 0.44659191370010376, 0.75579988956451...
def random _ seed _ stream ( random _ seed = none ) : rs = numpy. random. randomstate ( random _ seed ) seed = rs. randint ( random _ seed _ max ) while true : yield seed # incrementing is better than generating new seeds with a call to randint, # because with random seeds collisions are likely after only around 2 * * ...
[ 0.45143023133277893, 0.44473543763160706, 0.5709823966026306, 0.049738094210624695, -0.21062014997005463, -0.2939000129699707, 0.2590826153755188, -0.7894644141197205, 0.814814031124115, -0.8231184482574463, 0.1053818017244339, 0.4235210716724396, 0.005108455196022987, 0.47389742732048035,...
def _ get _ parameters ( header, fdata ) : # massage header into pseudo - ini file for configobj ( ) header = header. split ( " \ n " ) header = [ line. replace ('; ','# ', 1 ) for line in header ] header = configobj. configobj ( header ) file _ = header ['file information'] meas = header ['measurement information'] da...
[ -0.01887136697769165, -0.38662201166152954, 0.8720294833183289, -0.5906670689582825, -0.619591236114502, -0.5521026253700256, 0.04064054414629936, 0.5444397330284119, -0.7699397802352905, -0.03356873616576195, -0.24467094242572784, 0.11607258766889572, -0.10207179933786392, 0.3895874917507...
def get _ iou ( boxes1, boxes2, scope ='iou') : with tf. variable _ scope ( scope ) : boxes1 = tf. stack ( [ boxes1 [ :, :, :, :, 0 ] - boxes1 [ :, :, :, :, 2 ] / 2. 0, boxes1 [ :, :, :, :, 1 ] - boxes1 [ :, :, :, :, 3 ] / 2. 0, boxes1 [ :, :, :, :, 0 ] + boxes1 [ :, :, :, :, 2 ] / 2. 0, boxes1 [ :, :, :, :, 1 ] + boxe...
[ -0.19359683990478516, -0.16274546086788177, 1.5397671461105347, -0.03908006101846695, -0.4913303852081299, -0.7305641174316406, 0.5331902503967285, 0.5188257098197937, -0.4531419277191162, 0.3385348320007324, -0.9637548327445984, 0.43892958760261536, -0.24744164943695068, -0.92931336164474...
def run _ in _ executor ( executor, func, * args ) : # in python 3, try to get the current asyncio event loop, otherwise create a new one if py3 : get _ async _ event _ loop ( ) # run the function in the specified executor, handling tornado version 4 where there was no # run _ in _ executor implementation if version _ ...
[ -0.18298397958278656, 0.11703824996948242, 0.4742875397205353, 0.3940824866294861, -0.2716939449310303, -0.8804076313972473, -0.6509326100349426, 0.6534059643745422, -0.7416775226593018, -0.018061911687254906, 0.09049239009618759, -0.12600843608379364, -0.12684714794158936, 0.3574821949005...
def ml _ weights ( inputmtx, targets ) : phi = np. matrix ( inputmtx ) targets = np. matrix ( targets ). reshape ( ( len ( targets ), 1 ) ) weights = linalg. inv ( phi. transpose ( ) * phi ) * phi. transpose ( ) * targets return np. array ( weights ). flatten ( )
[ -0.722213864326477, -0.17396512627601624, 0.5618956089019775, -0.29688405990600586, -0.11614034324884415, 0.018988505005836487, -0.41941437125205994, 1.2201957702636719, -0.9566214680671692, 1.2569104433059692, 0.30977147817611694, 0.9302605986595154, -1.0468721389770508, 0.419808000326156...
def load _ json _ config ( json _ dict, message, fs = none ) : try : return json _ format. parsedict ( json _ dict, message ) except json _ format. parseerror as e : error _ msg = ('problem parsing protobuf from { }. '. format ( json _ dict ) +'you might need to run scripts / compile') raise protobufparseexception ( er...
[ 0.019962146878242493, 0.14370028674602509, 0.45610466599464417, -0.482994019985199, -1.0465288162231445, -0.24752721190452576, -0.4448164701461792, 0.11147592961788177, -0.23579560220241547, -0.18840700387954712, -0.09370151907205582, -0.323203980922699, -0.6097220778465271, 0.676539361476...
def valid _ name ( cls, new _ name ) : if cls. min _ length < = len ( new _ name ) < = cls. max _ length : return true # else return false
[ -0.4598636329174042, -0.7782187461853027, 0.6777285933494568, -0.017526043578982353, -0.9213806986808777, 1.4196686744689941, -1.3024258613586426, -0.4769147038459778, 0.3538711965084076, 0.3572237491607666, -0.8252129554748535, 0.033934831619262695, -0.6311242580413818, 0.0653183162212371...
def read _ training _ list ( ) : image _ list _ file = flags. train _ data _ dir +'/ train'f = file _ io. fileio ( image _ list _ file,'r') # this can read files from the cloud filenames = [ ] labels = [ ] n _ classes = len ( labelmap ) for line in f : label, c1, c2, c3 = line. rstrip ( ). split ('' ) # convert labels ...
[ -1.5747300386428833, -0.1018151342868805, 0.6527210474014282, 0.19115318357944489, 0.6063755750656128, 0.19314807653427124, -0.1019856408238411, 0.9416781067848206, -0.8605501651763916, 0.2461455762386322, -0.6610724329948425, -0.5903643369674683, 0.743241548538208, 0.5280287265777588, -...
def validate _ error _ event _ collector _ json ( num _ errors = 1 ) : @ transient _ function _ wrapper ('newrelic. core. stats _ engine ','statsengine. record _ transaction') def _ validate _ error _ event _ collector _ json ( wrapped, instance, args, kwargs ) : try : result = wrapped ( * args, * * kwargs ) except : r...
[ -0.33274519443511963, -0.9071946740150452, 0.6680061221122742, -0.9426009654998779, -0.41019129753112793, -0.5754275918006897, 0.14646027982234955, -0.9376422762870789, 0.718734622001648, 0.4536464810371399, -0.10047400742769241, 0.008855937980115414, 0.8549383282661438, -0.373243093490600...
def get _ definition ( message _ id : messageid ) - > optional [ type [ messagedefinition ] ] : # dumb linear search, but the result is memoized. for i in get _ args ( messagedefinition ) : if i. message _ id = = message _ id : # get args returns tuple [ any... ] return i # type : ignore [ no - any - return ] return no...
[ 0.2613711953163147, 0.4655821621417999, 0.2942034602165222, 0.2880888283252716, 1.1287074089050293, -1.3466778993606567, -0.24716177582740784, -1.027162790298462, -0.7861266732215881, 0.2016741931438446, 0.19451266527175903, 0.2795366942882538, -0.6478793621063232, 1.2872344255447388, -0...
def normalize _ number ( text ) : # した を0て replaced _ text = re. sub ( r'\ d + ','0 ', text ) return replaced _ text
[ 0.3963685929775238, -0.19653362035751343, 0.5386028289794922, 0.23503869771957397, -1.0168354511260986, 0.10175590962171555, 0.3596450984477997, 1.904699444770813, 0.5294420123100281, -0.32031598687171936, -0.86531662940979, -0.05924715846776962, -1.1817626953125, 0.29916104674339294, 0....
def _ _ eq _ _ ( self, other ) : return other. pt1 = = self. pt1 and other. pt2 = = self. pt2
[ -0.37540367245674133, -0.7364059686660767, 0.6254331469535828, 0.5755370855331421, 0.08263985812664032, 1.0053861141204834, 0.18937978148460388, -0.23014739155769348, 0.30908674001693726, 0.13473477959632874, -0.5342410206794739, 0.3720182180404663, -0.3075883090496063, -0.2642979621887207...
def paginate _ queryset ( self, queryset ) : if self. paginator is none : return none return self. paginator. paginate _ queryset ( queryset, self. request, view = self )
[ -0.913012683391571, -0.3131905496120453, 0.29982516169548035, -0.17407940328121185, -0.16394157707691193, -0.986046314239502, 0.0163979884237051, -0.8231268525123596, 0.9652965068817139, -0.5016986727714539, 1.2824572324752808, -0.4347471594810486, -0.4559885263442993, 0.28152996301651, ...
def get _ s3 ( download _ path, * * kwargs ) : # configure s3 s3 = boto3. resource ('s3') dest = get _ destination _ s3 ( * * kwargs ['get _ destination _ s3'] ) bucket = dest ['bucket'] file _ path = dest ['key'] # assign bucket to variable bucket = s3. bucket ( bucket ) try : # download data from s3 into specified do...
[ 0.8720685243606567, -0.5897740721702576, 0.7774805426597595, 0.4182426631450653, 0.015608620829880238, 0.6872778534889221, -0.6321858763694763, 0.2098795473575592, -0.09114901721477509, -0.0068635414354503155, 0.07327038049697876, 0.5577981472015381, 0.5868091583251953, -0.5383068919181824...
def hasnext ( self ) - > bool : return len ( self. stack ) > 0
[ 0.016497986391186714, 1.376479148864746, 0.41844916343688965, 0.44564133882522583, 0.08665411919355392, -0.10771998018026352, -0.8995104432106018, 0.3888285160064697, -0.2697393000125885, -0.039362095296382904, -0.7889404296875, -0.11819399148225784, -0.6101371049880981, 0.883416473865509,...
def run _ paster ( ) : from gunicorn. app. pasterapp import pasterapplication pasterapplication ( " % prog [ options ] pasteconfig. ini " ). run ( )
[ 0.024975694715976715, -0.5894917845726013, 0.47207877039909363, 0.3108298182487488, -0.4415988028049469, 0.705646276473999, 0.11968865245580673, 0.7333648204803467, -0.8371706604957581, 0.8908175826072693, -0.21482883393764496, 0.28116607666015625, -0.5551992654800415, 0.5857442617416382, ...
def _ _ init _ _ ( self, xbounds, ybounds, xsteps, ysteps ) : x, y = np. meshgrid ( np. linspace ( xbounds [ 0 ], xbounds [ 1 ], xsteps ), np. linspace ( ybounds [ 0 ], ybounds [ 1 ], ysteps ) ) self. grid = x + 1j * y
[ 0.6214431524276733, -0.10495723783969879, 0.5058186054229736, 0.49677783250808716, 0.005695469677448273, 0.26246774196624756, -0.7204340100288391, -0.3645389676094055, -0.024442924186587334, -0.2029746025800705, 0.018533775582909584, 0.23497450351715088, 0.4124611020088196, 1.3474026918411...
def is _ same _ class ( obj, a _ class ) : if type ( obj ) = = a _ class : return true else : return false
[ -0.41984760761260986, -0.7456053495407104, 0.5610340237617493, 0.9723730087280273, 0.10134446620941162, 0.6199398636817932, 0.39745497703552246, -0.12952958047389984, 1.6522945165634155, 0.7781928181648254, -0.28146621584892273, 0.7312301993370056, -0.2678382694721222, -0.13907860219478607...
def load _ type ( t, left, right, boat ) : if len ( boat. contents ) > 1 : return 0 if boat. side = = 0 : active _ list = left else : active _ list = right try : x = active _ list. index ( t ) boat. contents. append ( active _ list. pop ( x ) ) return 1 except valueerror : # none left on this side return 0
[ -1.0119868516921997, 0.1749477982521057, 0.6303578019142151, -1.266493558883667, 0.1729295253753662, 0.00861434731632471, -0.11100082099437714, -0.5913313031196594, -0.4412224590778351, 1.024897813796997, -0.45042890310287476, -0.4187139570713043, -1.0315934419631958, 0.06567782163619995, ...
def get _ contour ( img ) : return max ( measure. find _ contours ( img,. 8 ), key = len )
[ 0.5707345008850098, 0.6585263013839722, 0.3206292390823364, 0.7962332963943481, -0.3135712742805481, -1.0041799545288086, 0.01968943327665329, 0.2347482591867447, 0.7017264366149902, -0.48375263810157776, 0.1848544329404831, -1.208253026008606, 0.3060683608055115, 0.5339499711990356, -0....
def update ( self, request, * args, * * kwargs ) : key = kwargs [ " pk " ] value = request. data. get ( " value " ) # validate and change value. try : config [ key ] = value self. autoupdate _ for _ key ( key ) except confignotfound : raise http404 except configerror as err : raise validationerror ( { " detail " : str ...
[ -1.7172712087631226, -0.32750388979911804, 0.5979387760162354, 0.23615577816963196, -0.623720109462738, 0.24288156628608704, 0.17840705811977386, 0.04018599912524223, -0.19126556813716888, 0.6942141652107239, -0.2165032923221588, -0.42166250944137573, 0.11199793964624405, 0.026686312630772...
def rasterize _ points _ python ( pointclouds, image _ size : union [ int, tuple [ int, int ] ] = 256, radius : union [ float, torch. tensor ] = 0. 01, points _ per _ pixel : int = 8, ) : n = len ( pointclouds ) h, w = ( image _ size if isinstance ( image _ size, ( tuple, list ) ) else ( image _ size, image _ size ) ) ...
[ -0.24964503943920135, -0.05702691152691841, 0.739904522895813, 0.7175480723381042, 0.13836988806724548, -0.35929247736930847, 0.31588849425315857, -0.46800872683525085, -0.218643918633461, 0.5123260617256165, -0.003685224801301956, -0.42061036825180054, 0.037880972027778625, 0.137030929327...
def find _ desktop _ file ( self, root _ mount _ point ) : x11 _ sessions = " {! s } / usr / share / xsessions / {! s }. desktop ". format ( root _ mount _ point, self. desktop _ file ) wayland _ sessions = " {! s } / usr / share / wayland - sessions / {! s }. desktop ". format ( root _ mount _ point, self. desktop _ f...
[ 1.0705020427703857, -1.361142873764038, 0.7423263192176819, 0.28330907225608826, -0.23849081993103027, 0.0056924158707261086, 0.45522165298461914, -0.4660584628582001, -0.05937511846423149, -0.4121040105819702, 0.6209341287612915, 0.04016963765025139, -0.36989232897758484, 0.50922149419784...
def deeplabv3 _ resnetd50b _ coco ( pretrained _ backbone = false, classes = 21, aux = true, * * kwargs ) : backbone = resnetd50b ( pretrained = pretrained _ backbone, ordinary _ init = false, bends = ( 3, ) ). features del backbone. final _ pool return get _ deeplabv3 ( backbone = backbone, classes = classes, aux = au...
[ -0.790605366230011, 0.9115156531333923, 0.38341838121414185, 0.3934491276741028, -0.7063221335411072, 0.61590176820755, 0.2521873712539673, 0.5713527798652649, 0.3585694134235382, 0.34989696741104126, -0.3015883266925812, 0.3816811740398407, -0.443376749753952, -0.43572378158569336, 0.08...
def master _ plotting ( dataframe, filename ) : # # calling different plotting functions # # # r _ vs _ calshearmag ( dataframe ) # r _ vs _ reconv _ profile ( dataframe ) # r _ vs _ gaussian _ deconv _ psf _ size ( dataframe ) # r _ vs _ gaussian _ deconv _ psf _ size _ violin ( dataframe ) # sanity _ check _ 1 ( data...
[ -0.0493035614490509, 0.4379516839981079, 0.4775029122829437, 0.8197272419929504, 0.0196022130548954, 0.41144976019859314, 0.6749734282493591, 0.13487210869789124, 0.23756876587867737, -0.46993428468704224, -0.22785110771656036, 0.1780567318201065, 0.08728600293397903, 0.40749940276145935, ...
def testsessionlogstartmessagediscardsexpiredevents ( self ) : gen = _ eventgenerator ( self ) acc = self. _ make _ accumulator ( gen ) slog = event _ pb2. sessionlog ( status = event _ pb2. sessionlog. start ) gen. addevent ( event _ pb2. event ( wall _ time = 0, step = 1, file _ version = " brain. event : 2 " ) ) gen...
[ 0.5348111391067505, 0.10371063649654388, 0.7318688035011292, 0.037892166525125504, -0.2017025202512741, 0.3014032244682312, 0.11553914844989777, -0.3699911832809448, -0.03906233236193657, 0.14928607642650604, -0.8501557111740112, -0.3034677505493164, 0.49015283584594727, -0.019308257848024...
def createvectors ( record ) : return labeledpoint ( record [ 0 ], record [ 1 ] )
[ 0.19247601926326752, -0.8127099871635437, 0.3152109384536743, -0.6988675594329834, 0.2477608621120453, 0.4583990275859833, -0.4251765310764313, -0.8310258388519287, -0.11512214690446854, 0.46359017491340637, 0.28548088669776917, 0.19825239479541779, 0.12217943370342255, -0.7217878699302673...
def test _ update _ online _ tutorial _ booking _ to _ paid ( self ) : tutorial = baker. make _ recipe ('booking. future _ ot ', cost = 10 ) booking = baker. make _ recipe ('booking. booking ', user = self. user, event = tutorial, paid = false ) baker. make _ recipe ('booking. block ', block _ type _ _ event _ type = t...
[ 0.2680661678314209, 0.10590262711048126, 0.5993695259094238, 1.4906522035598755, -0.377040833234787, 1.1181797981262207, -0.16827863454818726, 0.888032853603363, -0.16135495901107788, 0.450062096118927, -0.49068596959114075, -0.2460833340883255, -0.27267035841941833, -0.01261005736887455, ...
def _ _ validate _ http _ request ( http _ request : str ) : if'get'in http _ request and'http / 1. 1'in http _ request and'http : / /'in http _ request : if len ( http _ request. strip ('get http / 1. 1 http : / /') ) > 0 : return true raise valueerror ('wrong http request.')
[ -0.9133448004722595, -0.11042480170726776, 0.7514172792434692, -0.06644129753112793, -0.01110632810741663, 1.0575659275054932, -0.9622250199317932, 0.1621512919664383, -0.9120997190475464, 0.6545904278755188, 0.9237974286079407, 0.6572665572166443, -0.14615072309970856, 0.20108292996883392...
def _ generate _ token ( self, device _ id, device _ token ) : hash _ object = hashlib. sha256 ( bytes ( device _ id,'utf - 8') + bytes ( device _ token,'utf - 8') ) hex _ dig = hash _ object. hexdigest ( ) return bytes ( hex _ dig,'utf - 8')
[ -0.3436107337474823, -0.04002748802304268, 0.32158780097961426, -0.2192680537700653, -0.044857703149318695, -0.009580935351550579, -1.047489881515503, 0.843879759311676, -0.12719421088695526, -0.567413330078125, -0.08051881939172745, -0.3749614655971527, 0.3424714207649231, -0.633981466293...
def save _ service _ note ( request ) : if request. method = ='post': if request. post. get ('service _ note _ pk') : # if service note id is provided, load existing service note message ='updated'service _ note = servicenote. objects. get ( pk = request. post. get ('service _ note _ pk') ) else : # if service notes id...
[ -0.7672287225723267, -0.1462203711271286, 0.5932528376579285, -0.1334700733423233, 0.22376509010791779, 0.11394853889942169, -0.08646871894598007, -0.19172771275043488, -0.2733299136161804, 0.9490948915481567, -0.3678140342235565, -0.13829553127288818, -0.46710705757141113, 0.7431905269622...
def aggregate _ history ( self, prev _ glucose, cur _ time, next _ time ) : # previous values # avg of previous glucose values # todo : rename method avg _ glucose = mean ( [ p ['value'] for p in prev _ glucose ] ) avg _ glucose _ feature = feature ( " avgglucose ", avg _ glucose ) self. glucose _ feature _ group. add ...
[ 0.26539918780326843, 0.35832300782203674, 0.9454165101051331, 0.1377377063035965, 0.2353009134531021, -0.20452968776226044, 0.9254350662231445, 0.09798766672611237, -1.205100655555725, 0.2795911729335785, 0.06280782073736191, 0.8494659662246704, 0.3556939661502838, 1.1972602605819702, 0....
def _ _ str _ _ ( self ) : tensor = self. value ( ). get _ tensor ( ) if tensor. _ is _ initialized ( ) : return'tensor : % s \ n % s'% ( self. name, str ( tensor ) ) else : return'tensor : % s, not initialized'% ( self. name )
[ -0.40133771300315857, -1.2597705125808716, 0.34485727548599243, -1.0057615041732788, -0.1258038431406021, -0.1851634979248047, 0.3847474157810211, -0.6889004707336426, -0.32057908177375793, 0.43845683336257935, -0.2885569632053375, 0.6589980721473694, 0.5852702856063843, -0.415688842535018...
def create _ menu _ option ( request ) : if request. user. is _ stylist = ='yes': if request. method = ='post': menu _ option _ form = menuoptionform ( request. post ) if menu _ option _ form. is _ valid ( ) : new _ option = menu _ option _ form. save ( commit = false ) new _ option. duration = timedelta ( hours = floa...
[ -0.5798615217208862, 0.3310714662075043, 0.503774881362915, 1.1392802000045776, 0.300589919090271, 0.7959156036376953, -0.3655948340892792, 0.030608931556344032, -0.206905797123909, 0.5593985915184021, -0.22701218724250793, -0.3297712802886963, 0.05843207985162735, 0.7167484760284424, -0...
def test _ get _ customer ( self ) : # get the id of a customer test _ customer = self. _ create _ customer ( ) resp = self. app. get ( " / customers / { } ". format ( test _ customer [ " id " ] ), content _ type = " application / json " ) self. assertequal ( resp. status _ code, status. http _ 200 _ ok ) data = resp. ...
[ 0.5549894571304321, -0.18360298871994019, 0.4619937837123871, 0.8166964650154114, 0.511423647403717, -0.10396643728017807, -0.46116378903388977, 0.046049315482378006, -0.44890713691711426, -0.558289647102356, -0.0461774505674839, 0.5078901052474976, 0.04558839648962021, -0.4945718646049499...
def handle ( self, events : union [ str, list ], listener : union [ str, callable ] = none, *, priority : int = 50 ) - > none : return self. listen ( events, listener )
[ -0.05176413431763649, 0.08358100056648254, 0.3895832896232605, -0.06373337656259537, 0.19685254991054535, -0.21036891639232635, -1.1073026657104492, 0.3998498022556305, 0.7701772451400757, -1.1363999843597412, -0.6325200796127319, -0.349126398563385, -0.3026019334793091, -0.005113849882036...
def test _ devicemanager _ load _ json _ check _ descriptions ( device _ manager _ from _ data ) : dm = device _ manager _ from _ data assert len ( dm. descriptions ) = = 2 # based on the test - data
[ 0.02936563640832901, 0.5695406794548035, 0.40937021374702454, -0.7177324295043945, 0.16659241914749146, -0.1471852958202362, -0.633462131023407, 0.16935598850250244, -0.15869180858135223, -0.49657514691352844, -0.05059075355529785, -0.012701261788606644, 0.44870656728744507, 0.907365500926...
def remove _ data ( url, ext ) : url _ hash = hashlib. sha224 ( url. encode ( ) ). hexdigest ( ) filename = url _ hash [ : 7 ] + '.'+ ext if os. path. exists ( filename ) : os. remove ( filename ) print ('removed ', filename ) else : print ('file is not present')
[ 0.605782687664032, -0.5649994611740112, 0.8575708270072937, 0.05843150243163109, -0.1705111712217331, 0.5514881014823914, -0.6489599347114563, 1.620059609413147, 0.02523520402610302, 0.33682942390441895, -0.49545490741729736, -0.17706537246704102, -0.025904834270477295, -0.1531309634447097...
def use _ mysqlalchemy ( conn _ url ) : try : engine = sqlalchemy. create _ engine ( conn _ url, echo = false, encoding ='utf - 8') connection = engine. connect ( ) return connection except exception as e : log. critical ('mysqlalchemy was not able to use connection ulr : % s ', e ) sys. exit ( )
[ -0.09886889904737473, -0.870378851890564, 0.5203207731246948, 0.04389337822794914, -0.12893570959568024, -0.7739033699035645, -0.5026981830596924, 0.6033517718315125, -0.02567283809185028, -0.4576016962528229, 0.46968528628349304, -0.5982696413993835, -0.1641903519630432, -0.12460359185934...
def generate _ theta ( k, n ) : x = m. pi * np. random. beta ( k + 1, k + 1, size = n ) # generate x - gamma ( k + 1, k + 1 ) u = np. random. rand ( n ) # generate u uniform ( 0, 1 ) # tests for accepting a = np. log ( u ) / float ( k ) b = np. log ( ( m. pi * m. pi * np. sin ( x ) ) / ( 4 * x * ( m. pi - x ) ) ) accep...
[ -0.14710526168346405, 0.6079772710800171, 0.7891637682914734, -0.2453974485397339, -0.985049307346344, 0.7145427465438843, -0.35682836174964905, 0.2483103722333908, -0.1396658718585968, 0.5141251683235168, -0.2483394294977188, -0.2372475117444992, -0.3177713453769684, -0.24065911769866943,...
def _ node _ io _ loop ( self, func, * args, * * kwargs ) : pbar = kwargs. pop ( " pbar ", none ) root _ nodes = kwargs. pop ( " root _ nodes ", none ) if root _ nodes is none : root _ nodes = self. trees store = kwargs. pop ( " store ", none ) data _ files, node _ list = self. _ node _ io _ loop _ prepare ( root _ nod...
[ -0.7494463324546814, 0.23665158450603485, 0.41391584277153015, -0.21952731907367706, 0.13801783323287964, 0.29326048493385315, 0.6228700280189514, -0.3817097246646881, -1.0389814376831055, 0.3299941420555115, 0.3091218173503876, 0.07849997282028198, -0.04374175891280174, 0.6805033683776855...
def _ fetch ( self, curs ) : curs. execute ( " select name from mailbox where id =? ", ( self. id, ) ) self. name = curs. fetchone ( ) [ 0 ] curs. execute ( " " " select value from mailbox _ flag where mailbox _ id =? and key ='flag'" " ", ( self. id, ) ) self. flags = [ row [ 0 ] for row in curs. fetchall ( ) ] return...
[ -0.20988807082176208, -0.27104562520980835, 0.24076323211193085, -0.43867072463035583, -0.4797290861606598, 0.14938907325267792, -1.296692967414856, -0.6442946195602417, 0.1546667069196701, 0.028046706691384315, -0.5275859832763672, 0.3697716295719147, -0.2143002301454544, 0.29566144943237...
def test _ bounds _ iou ( self ) - > none : raster _ file = " tests / data / massachusetts _ buildings _ kaggle / 22978945 _ 15 _ uint8 _ clipped. tif " raster = rasterio. open ( raster _ file ) label _ gdf = gpd. read _ file ('tests / data / massachusetts _ buildings _ kaggle / 22978945 _ 15. gpkg') label _ bounds _ b...
[ -0.5595033764839172, -0.6822953224182129, 0.7410479784011841, 0.19640909135341644, 0.4816853702068329, 1.6666936874389648, 0.6301560401916504, -0.5562482476234436, 0.06472070515155792, -0.5255961418151855, 0.16494466364383698, 0.1028188169002533, 0.01322278194129467, -0.5566397905349731, ...
def greet _ user ( username ) : # define the function, the variable username is the parameter # include doctstring describing what it does print ( f " hello, { username. title ( ) } " )
[ 0.3693769872188568, 0.573230504989624, 0.4969521462917328, 0.4381480813026428, -0.18631504476070404, 0.7161819934844971, 0.5699690580368042, 0.24178168177604675, -0.5865647196769714, -0.48941826820373535, -0.25737571716308594, 1.0519605875015259, 0.19427555799484253, 0.2331087291240692, ...
async def createmarkdownformergerequest ( gl, event, project _ id, gitlab _ clone _ url, namespace, source _ branch, target _ branch, merge _ iid, merge _ error, path _ with _ namespace ) : if os. name! ='nt': await createmarkdownformergerequest _ linux ( gl, event, project _ id, gitlab _ clone _ url, namespace, source...
[ 0.13223884999752045, -0.04815010353922844, 0.7662191987037659, 0.24521729350090027, 0.7931333780288696, 0.8547666072845459, -0.5298498272895813, -0.11276491731405258, -0.8264503479003906, -0.23031234741210938, 0.3616812229156494, 0.6848815679550171, -0.7463429570198059, 1.0422084331512451,...
def timefunc ( f ) : def f _ timer ( * args, * * kwargs ) : start = time. time ( ) result = f ( * args, * * kwargs ) end = time. time ( ) # print f. _ _ name _ _,'took ', end - start,'seconds'return result return f _ timer
[ 0.1699608862400055, 0.02332521416246891, 0.7124255895614624, -0.26386958360671997, -0.41225019097328186, -0.669055163860321, 0.4587171673774719, 0.41220149397850037, -0.6864883303642273, 0.6063830852508545, -0.9283657670021057, -0.2782655954360962, 0.6195252537727356, 0.6660104393959045, ...
def get _ widget _ count ( self, row ) : if row in self. cnt _ col : return self. cnt _ col [ row ] else : raise indexerror ( " row { } does not exist. existing rows : { } ". format ( row, self. cnt _ row ) )
[ -0.262479692697525, 0.8855939507484436, 0.6627793312072754, -0.26264214515686035, 0.12926813960075378, -0.34972241520881653, 0.8145310282707214, 0.2664288878440857, 0.2941259741783142, 0.043309129774570465, 0.014021474868059158, -0.38033515214920044, 0.16837753355503082, 0.6025328040122986...
def add _ foreign _ key ( self ) - > none : super ( ). add _ foreign _ key ( " request ", " tid ", " company " ) super ( ). add _ foreign _ key ( " request ", " uid ", " users " ) super ( ). add _ foreign _ key ( " request ", " sid ", " rstatus " )
[ -0.09710004180669785, 0.9637348055839539, 0.632050096988678, 1.4205734729766846, 1.3704365491867065, 0.8714377284049988, -0.21101701259613037, 0.02829495631158352, 0.009222251363098621, -0.4447883665561676, 0.07470665127038956, 0.053792621940374374, -0.16425025463104248, 0.7529860138893127...
def test _ get _ landmarks _ for _ batch _ redetect ( self ) : for case in self. landmarkscases : with self. subtest ( landmarks5 = case. detect5landmarks, landmarks68 = case. detect68landmarks ) : for detector in self. detectors : with self. subtest ( detectortype = detector. detectortype ) : detectone = detector. det...
[ 0.5562142133712769, 0.05860188230872154, 0.3604716360569, 1.0418741703033447, 0.9484562277793884, 0.23154257237911224, 0.1910872906446457, 0.19328533113002777, 0.5656276345252991, -0.360667884349823, -0.34896865487098694, 0.01274399645626545, 0.4278445541858673, 1.0768955945968628, -0.33...
def auto _ dupl _ on ( case, changed = true ) : if changed : # all contained stages are set with case as calling _ case for stage in case. stages : stage. calling _ case = case if case. model : case. model. auto _ dupl = true yield if changed and case. model : case. model. auto _ dupl = false
[ -0.3559989035129547, 0.12446889281272888, 0.6957184076309204, 0.9494920372962952, -0.6105057597160339, 0.3646767735481262, 0.7815795540809631, -0.3016463816165924, 0.7962607741355896, 0.48633021116256714, -1.2306674718856812, -0.04745524376630783, 0.2611716389656067, 1.3371986150741577, ...
def view ( self, user, twilioaccount, * args ) : if user. is _ anonymous or user. is _ client : return false if user. is _ administrator : return false if user. is _ manager : return false if user. is _ superadvisor and user. group = = twilioaccount. group : return true return self. admin _ permission ( user, twilioacc...
[ 0.003563640173524618, 1.3829631805419922, 0.49423426389694214, 0.5963043570518494, -1.3261064291000366, 0.3119731545448303, 0.11896706372499466, -0.22696880996227264, 0.4295792579650879, -0.32805556058883667, 0.7615635395050049, 0.5338925719261169, -0.6537980437278748, 0.29352855682373047,...
def get _ scaled _ features ( self ) : return ( self. scaled _ train _ features, self. scaled _ validation _ features, self. scaled _ test _ features )
[ -0.6694951057434082, -0.19665437936782837, 0.4627114534378052, 0.15404246747493744, 1.0137625932693481, 0.21833136677742004, -0.48353323340415955, -0.3889877498149872, -0.9725134372711182, 0.45831435918807983, -2.2361667156219482, 0.09017414599657059, -0.7419674396514893, 0.234849795699119...
def get _ rllib _ pkl ( path ) : pklfile = path +'/ params. pkl'# params. json is the config file with open ( pklfile,'rb') as file : pkldata = cloudpickle. load ( file ) return pkldata
[ 0.2799812853336334, -0.5110138058662415, 0.3732067942619324, -0.6483592987060547, -0.09171596169471741, 0.9036875367164612, -0.21003051102161407, -0.2638566493988037, -0.3038305640220642, 0.793950617313385, -0.5782236456871033, -0.5849111676216125, -0.13329894840717316, -0.252864271402359,...
def thinkpos ( self ) : pos = self. getpos ( ) hpr = self. gethpr ( ) serverversion = base. cr. getserverversion ( ) districtname = base. cr. getshardname ( base. localavatar. defaultshard ) # see if you are in the town if ( hasattr ( base. cr. playgame. hood, " loader " ) and hasattr ( base. cr. playgame. hood. loader...
[ -0.02336937189102173, -1.1524733304977417, 0.7500162720680237, -0.848487913608551, 0.013075493276119232, 0.16812629997730255, -0.27596861124038696, -0.24155156314373016, -0.2504032552242279, 0.15782420337200165, -0.08503836393356323, 0.11596325784921646, -0.8766869306564331, 0.545605421066...
def expr ( e ) : res = hfst. regex ( e ) res. minimize ( ) return res
[ -0.3343110978603363, 0.18935218453407288, 0.33427193760871887, 0.32379722595214844, -0.3935224115848541, -1.0884432792663574, 0.30399978160858154, 1.068808913230896, 0.6091991662979126, -0.15148580074310303, -0.24029384553432465, -0.5211665034294128, -0.1776467114686966, -0.423679113388061...
def setapikey ( ) : global google _ api _ key try : # reads the api key from the google _ api. txt file fp = open ( " google _ api. txt " ) google _ api _ key = fp. readline ( ) if google _ api _ key = = " " : print ( " the google _ api. txt file appears to be blank " ) print ( " if you do not have an api key from goog...
[ -0.4254492223262787, -0.23263317346572876, 0.4626392722129822, -0.4182587265968323, 0.40511253476142883, 1.0862383842468262, 0.41272830963134766, 0.44393715262413025, -0.802148699760437, 0.26004624366760254, -0.2565704882144928, 1.1090936660766602, -0.7639878988265991, 0.7483675479888916, ...
def _ children ( self ) - > list ['virtualproduct'] : return [ from _ validated _ recipe ( child ) for child in self ['collate'] ]
[ 0.3457314968109131, -0.280936062335968, 0.2594037652015686, 1.0294299125671387, -0.23471371829509735, 0.5118907690048218, -0.35020607709884644, -0.2585121691226959, 0.7280452251434326, 0.6300934553146362, -0.6712662577629089, 0.1106007844209671, 0.4264747202396393, -0.3450238108634949, -...
def populate _ tnds _ data ( connection, path = none, delete = true, warn = false ) : data = _ get _ archives ( connection, path, warn ) if data is none : return # check if operators exist first operators _ exist = connection. execute ( db. exists ( db. select ( [ models. operator. code ] ) ). select ( ) ). scalar ( ) ...
[ -0.11914756149053574, 1.0077183246612549, 0.6357896327972412, -0.3532584011554718, 0.09655919671058655, -0.20548059046268463, -0.10678164660930634, -0.26145094633102417, -0.1960759162902832, 0.5652235746383667, 0.6966806650161743, -0.4945032000541687, 0.2999148666858673, 0.2881214618682861...
def dump _ patches ( dump _ file, patches ) : def patch _ to _ row ( patch ) : l = [ p. id for ( p, present ) in patch. parcels. items ( ) if present ] l. sort ( ) return [ patch. id ] + l csv. writer ( dump _ file ). writerows ( [ patch _ to _ row ( patch ) for patch in patches ] )
[ 0.4378426969051361, -0.7535061240196228, 0.4144516885280609, -0.7663417458534241, -0.18761120736598969, 0.8047730922698975, -0.39502280950546265, 0.11807487159967422, 0.6555629968643188, -0.46527090668678284, -0.06571248173713684, -0.33907845616340637, 0.4017377495765686, -0.09152019023895...
def check _ offline _ progress ( request ) : # read file text = request. form. get ( " text ", " " ) label = request. form. get ( " label ", " " ) print ( text ) print ( label ) ca = get _ mongo _ client ( uri ='mongodb : / / localhost : 27017 /') text = ca [ " annotation _ data " ]. insert _ one ( { " label " : label,...
[ -0.23945192992687225, -0.2141404151916504, 0.6646637320518494, -0.43074750900268555, -0.27423930168151855, 1.494964599609375, -0.4922281801700592, 0.15348082780838013, -1.029372215270996, 0.6957897543907166, 0.472568541765213, -0.2920514643192291, -1.295518398284912, 0.41143712401390076, ...
def clickedwhisper ( self, doid, isplayer = none ) : if doid > 0 : localavatar. localavatar. clickedwhisper ( self, doid, isplayer ) else : foundcanstart = false for partyinfo in self. hostedparties : if partyinfo. status = = partyglobals. partystatus. canstart : foundcanstart = true break if base. cr and base. cr. pla...
[ -0.22908511757850647, -0.49378398060798645, 0.6558742523193359, 0.06007397547364235, -0.10424590110778809, 0.5076806545257568, 1.121695637702942, 0.28183484077453613, 0.14459462463855743, 0.09401963651180267, 0.1271539032459259, 0.3647465407848358, -0.7744691371917725, 1.1668332815170288, ...
def replace _ config ( self, config : pywintypes. devmodewtype ) : self. config = config
[ -0.6325465440750122, -0.31693148612976074, 0.03726804628968239, -0.02637857012450695, -0.32471781969070435, 0.3015410006046295, 0.4589745104312897, 0.7477526068687439, 0.5068840384483337, -0.09533007442951202, -1.7654776573181152, 0.6766353249549866, -0.6029744744300842, 1.5465964078903198...
def _ _ init _ _ ( self, main _ window, c _ logger = none, data _ processor = none, graph _ settings = none, graph _ settings _ file _ path = none, ) : self. c _ logger = c _ logger if c _ logger else self. _ _ set _ up _ default _ logger ( ) self. main _ window = main _ window self. c _ logger. info ( " get main windo...
[ 0.5298869013786316, 0.3789730668067932, 0.8101630806922913, -0.0879022553563118, -0.4520268142223358, 0.021444600075483322, 0.8483543992042542, 0.29337063431739807, -0.4713769555091858, 0.15902286767959595, 0.12039832025766373, 1.0369021892547607, -0.1280606985092163, 0.9066016674041748, ...
def search _ groups _ with _ http _ info ( self, query, start, end, logged _ in _ user _ id, access _ token, client _ token, * * kwargs ) : all _ params = ['query ','start ','end ','logged _ in _ user _ id ','access _ token ','client _ token ','fields'] all _ params. append ('callback') all _ params. append ('_ return ...
[ -0.6230159401893616, 0.7991716861724854, 0.9409104585647583, -0.04389733821153641, -0.4798394441604614, -0.25336310267448425, -0.5547807216644287, -1.659798264503479, -1.1255422830581665, 0.278411328792572, 0.5149109959602356, 0.5605767369270325, -0.943798303604126, 0.17124995589256287, ...
def teardown ( self ) : self. app. application _ close ( self. util. client, self. app _ name ) self. common. generate _ report ( self. util. client, false ) # releases the client so that other clients can approach the agent in the near future. self. common. release _ client ( self. util. client ) self. common. release...
[ 0.6691323518753052, -0.27430370450019836, 0.5590140223503113, -0.8071074485778809, 0.922745943069458, 0.37233230471611023, 1.6164673566818237, -0.2889389097690582, 0.044910978525877, -0.3292822539806366, 0.09774776548147202, 0.06787888705730438, -1.1288115978240967, 0.6101008057594299, 0...
def test _ redirect _ for _ default _ path ( self ) : redirection ( host ='myhost. test ', path = redirection. default _ key, redirection ='http : / / this _ is _ the _ default _ site. test / pic. png'). save ( ) not _ existent = self. response _ gen ('myhost. test ','not _ existent') self. assertredirects ( not _ exis...
[ -0.5688117146492004, 0.40197524428367615, 0.5169900059700012, 0.8289501070976257, 1.038927435874939, 0.8114874958992004, 1.0735324621200562, -0.2341248095035553, -0.004997195675969124, -0.3530227541923523, -0.7547832727432251, -0.8169394731521606, 0.21869350969791412, -0.008843726478517056...
def checkmenu ( trigger _ rules, lvl1 _ file, hlt _ file ) : rules _ list = trigger _ rules. keys ( ) menu _ list = [ ] lvl1 _ info = et. parse ( lvl1 _ file ). getroot ( ) for item in lvl1 _ info. findall ('triggermenu / triggeritem') : name = item. get ('name') if name in rules _ list : rules _ list. remove ( name ) ...
[ 0.2834727168083191, -0.7378092408180237, 0.9658214449882507, 0.8563929200172424, 0.40515175461769104, 0.5403681993484497, -0.7243021130561829, 1.2990814447402954, -1.446804404258728, 0.7538443803787231, -0.28411558270454407, -0.06151390075683594, -0.5869263410568237, 0.755926251411438, -...
def load _ patient _ data ( self, path ) : # clearing old data in a case that user wants to load another patient if ( self. ct _ scan _ detection is not none or self. ct _ scan _ localization is not none ) : self. ct _ scan _ segmentation = none self. ct _ scan _ detection = none self. ct _ scan _ detection _ rgb = fal...
[ 0.11244044452905655, -0.3734605610370636, 0.6391652822494507, -0.5806477069854736, -0.8395675420761108, 0.44252341985702515, 0.5336995720863342, -0.20607656240463257, 0.05659760162234306, -0.31036099791526794, 0.060203373432159424, 0.1580447256565094, 0.07039356231689453, -0.20828618109226...
def push ( self, my _ dict, key, element ) : if key in my _ dict : my _ dict [ key ]. append ( element ) else : my _ dict [ key ] = [ element ]
[ -0.285949170589447, 0.625905454158783, 0.30038759112358093, -0.09362858533859253, -0.6352332830429077, 0.29298242926597595, -1.787459373474121, 1.2269660234451294, 0.038112375885248184, 0.9584751725196838, -0.22445595264434814, 0.2946402430534363, -0.7425854802131653, 1.028695821762085, ...
def index ( request, * args, * * kwargs ) : return render ( request,'frontend / index. html')
[ 0.4007592499256134, 0.3029474914073944, 0.24107643961906433, -0.0029954174533486366, -0.28234735131263733, 0.5403940081596375, 0.25462260842323303, 0.11128664016723633, -0.7504059076309204, -0.5480030179023743, 0.8926595449447632, 0.04062984138727188, 0.21442478895187378, -0.17465496063232...
def update _ request ( stub ) : req = updaterequest ( meta = metadata ( status = statuscode. success, request _ id = int32 ( next ( counter ) ), uuid = str ( uuid. uuid4 ( ) ) ) ) human _ list = stub. getupdate ( req ) # we get a list of people in the simulation from the server logger. info ( " receive update response ...
[ -1.4234793186187744, -0.7754871249198914, 0.45859959721565247, 0.11213180422782898, -0.26002994179725647, -0.20556187629699707, -0.6312144994735718, 0.32927507162094116, -0.11628921329975128, 0.4619337022304535, -0.28267034888267517, 0.12652944028377533, -0.3600862920284271, -0.17567884922...
def apihooks ( self, pid = none ) : log. debug ( " executing volatility apihooks plugin on { 0 } ". format ( self. memdump ) ) self. _ _ config ( ) results = [ ] if pid is not none : conf = copy. deepcopy ( self. config ) conf. pid = pid else : conf = self. config command = self. plugins [ " apihooks " ] ( conf ) for p...
[ -1.0019960403442383, -1.3119802474975586, 0.5289695262908936, -0.9342315793037415, 0.8249643445014954, -0.6507595181465149, -0.6615020632743835, 0.30785059928894043, 0.10236987471580505, 0.751988410949707, -0.3027791678905487, 0.20942719280719757, -0.5224615931510925, 0.3239598870277405, ...
def getdefault ( idx : int ) : if spec. defaults is not none : if idx > = len ( spec. args ) - len ( spec. defaults ) : default = ( spec. defaults [ idx - ( len ( spec. args ) - len ( spec. defaults ) ) ], ) else : default = none else : default = none return default
[ -0.008292175829410553, 1.1159465312957764, 0.30031800270080566, -0.24475349485874176, 1.6395295858383179, -1.0161364078521729, -0.19387783110141754, -1.1379239559173584, 0.04076702520251274, -0.19516251981258392, -0.16684593260288239, -0.04020820930600166, -0.8941599130630493, -0.276718497...
def test _ complete _ project _ when _ already _ completed ( self ) : old _ end _ date = timezone. now ( ) - datetime. timedelta ( days = 1 ) completed _ project = project ( end _ date = old _ end _ date, is _ completed = true ) completed _ project. complete _ project ( ) self. assertequal ( completed _ project. end _ ...
[ -0.2495376318693161, 0.1711026430130005, 0.2417399287223816, 0.5280769467353821, 1.008426547050476, 0.8314250111579895, 0.004757778253406286, -0.5241963863372803, -0.4059191942214966, 0.3759416937828064, -0.1849241405725479, -0.28845033049583435, 0.015693340450525284, 0.7453492283821106, ...
def initialize ( ) : rock _ positions = [ ( 2, 1 ), ( 1, 2 ), ( 3, 2 ), ( 2, 3 ) ] rocks = [ ] for pos in rock _ positions : rock = rock ( ) game _ board. register ( rock ) game _ board. set _ el ( pos [ 0 ], pos [ 1 ], rock ) rocks. append ( rock ) rocks [ - 1 ]. solid = false # initializes character player = characte...
[ -0.7523043155670166, 0.63311767578125, 0.8237277269363403, -0.2505979835987091, 1.0481765270233154, -0.15575678646564484, -0.008083311840891838, -0.21688735485076904, -0.6731171607971191, 0.3444177806377411, -1.3701053857803345, -0.07330694794654846, -0.18513813614845276, -0.04133073613047...
def test _ update _ incomplete _ payments ( self, mock _ send _ email ) : payments = [ {'uuid':'wargle - 1111 ','processor _ id': 1,'recipient _ name':'john ','amount': 1700,'status':'pending ','created': datetime. now ( ). isoformat ( ) +'z ','modified': datetime. now ( ). isoformat ( ) +'z ','prisoner _ number':'a140...
[ -0.09430506080389023, -0.3776228427886963, 0.6575431227684021, -0.8816644549369812, -0.3440299928188324, 0.04875113070011139, 0.34653180837631226, 0.40650784969329834, -0.5832338929176331, 0.20656852424144745, -0.4172824025154114, -0.10454381257295609, 0.0637814849615097, -0.02513118647038...
def test _ length _ array _ tri ( self ) : l = array ( 10, array ( 5, array ( 3, 0 ) ) ) res = len ( l [ 0 ] [ 0 ] ) # print ( res ) self. assertequal ( res, 3 )
[ 1.1080389022827148, -0.298698365688324, 0.40637481212615967, -0.2005101889371872, 1.3388280868530273, 1.1854630708694458, 0.4577319622039795, 0.9650426506996155, 1.12086820602417, 0.23390211164951324, -1.2518659830093384, -0.12869812548160553, -0.406288206577301, -0.16944369673728943, -0...
def check _ sony ( self ) : res = requests. get ( self. ps5 _ url _ sony ) soup = beautifulsoup ( res. text, features ='lxml') status = soup. find ('div ', {'class':'producthero - mobile - price'} ). find ('p'). gettext ( ) if status = ='out of stock': return result ( is _ available = false ) return result ( is _ avail...
[ -1.230985164642334, -0.37502893805503845, 0.3935374915599823, 0.24892260134220123, -0.31342440843582153, -0.781786322593689, -0.20125700533390045, 0.40249308943748474, 0.08394813537597656, 0.9670772552490234, -0.31718483567237854, -0.053957171738147736, -0.09188275039196014, 0.312999159097...
def neglogl ( a, b, c, xi, sumlogxi ) : n = len ( xi ) if ( not ( 1. 1 < a < 2. 5 ) or not ( 0. 5 < b < 2 ) or not ( 1. 5 < c < 4 ) ) : # a b or c is not in required bound, return high value return 1e100 # we use the trilinear interpolator to approximate a ( a, b, c ) a = lininterp ( [ a, b, c ] ) second _ term = sumlo...
[ 0.803631067276001, -0.23796896636486053, 0.8029965162277222, -0.621330976486206, -0.1655202955007553, 0.6483089327812195, -0.7688076496124268, -0.33424195647239685, 0.47187376022338867, 0.7849422097206116, 0.01869816519320011, -0.02715914510190487, -0.5352502465248108, -0.5431435108184814,...
def click _ element ( self, locator, timeout = 20 ) : time. sleep ( 0. 5 ) return ( webdriverwait ( self. driver, timeout ). until ( ec. element _ to _ be _ clickable ( locator ), message = " nope " ). click ( ) )
[ -0.16395150125026703, 0.3626278340816498, 0.3121302127838135, -0.06637983024120331, -0.032602932304143906, 0.18419979512691498, 0.05911936238408089, 0.40711653232574463, -0.19609197974205017, 0.44157958030700684, -0.14947979152202606, -0.2631789743900299, -0.4761960804462433, -0.6272680759...
def hit ( self, item, * identifiers ) : return ( self. storage ( ). incr ( item. key _ for ( * identifiers ), item. get _ expiry ( ), true ) < = item. amount )
[ -0.34918543696403503, 0.4685207009315491, 0.3310248553752899, 0.575853168964386, -0.21222960948944092, 0.6474125981330872, -0.6792792081832886, -0.2733069658279419, -0.7121850252151489, 0.5724730491638184, -0.47040602564811707, -0.874945878982544, -0.904000461101532, -1.7369961738586426, ...
def unstack _ params ( params, to _ square = false ) : mu, logstdev = np. split ( params, indices _ or _ sections = 2, axis = - 1 ) sigma = np. exp ( 2 * logstdev ) if to _ square : sigma = np. apply _ along _ axis ( func1d = np. diag, arr = sigma, axis = - 1 ) return mu, sigma
[ -0.2692849040031433, 0.4005446434020996, 0.6815523505210876, 0.5359699726104736, -0.42830315232276917, -0.9593178629875183, 1.07394540309906, 0.9116320610046387, 0.0048474594950675964, 1.2502471208572388, -0.07631132006645203, 0.3884529769420624, 0.3747920095920563, 0.4944048225879669, 0...
def add _ async ( self, task, transactional = false, rpc = none ) : try : tasks = list ( iter ( task ) ) except typeerror : tasks = [ task ] multiple = false else : multiple = true has _ push _ task = false has _ pull _ task = false for task in tasks : if task. method = ='pull': has _ pull _ task = true else : has _ pu...
[ -0.9600680470466614, 1.566470742225647, 0.8346239328384399, 0.8473923206329346, 0.4872187376022339, 0.150678813457489, -0.46772539615631104, -0.12845546007156372, 0.6139169931411743, 0.16700135171413422, 0.14394055306911469, -0.5803029537200928, -0.03761155903339386, 0.9550309181213379, ...
def count ( self :'linked _ list ', test : callable [ [ any ], bool ] ) - > int : if self. head is none : return 0 if test ( self. head. data ) : return 1 + linked _ list ( self. head. link ). count ( test ) else : return linked _ list ( self. head. link ). count ( test )
[ 0.10762331634759903, 0.3620339334011078, 0.403655081987381, 0.12621024250984192, -0.24666623771190643, -0.2804805636405945, 0.5455672144889832, 0.4257783889770508, 0.7662883996963501, -1.166520118713379, -0.5575546622276306, 0.3166194558143616, -0.27657344937324524, 1.0294090509414673, -...
def get _ value ( self, name, default = none ) : try : option = self. model. objects. get ( name = name ) return option. get _ value ( ) except self. model. doesnotexist : return default
[ -0.17666955292224884, 0.48198989033699036, 0.3321065604686737, 0.4620562791824341, 1.1743299961090088, -0.3736790418624878, -0.5242831707000732, -1.0569756031036377, -0.23490333557128906, 1.032482624053955, -0.2846786081790924, -0.7328706383705139, -0.3655916452407837, -0.263794481754303, ...
def _ get _ timetable _ events ( full _ modules ) : timetable = get _ cache ( " timetable " ) bookings = get _ cache ( " booking " ) distinct _ fields = ('setid ','siteid ','roomid ','sitename ','roomname ','bookabletype ','slotid ','bookingid ','starttime ','finishtime ','startdatetime ','finishdatetime ','weeknumber ...
[ -0.6195975542068481, -0.07454822212457657, 0.6538551449775696, -0.17955978214740753, -0.7333189845085144, 0.035346388816833496, 0.38811632990837097, 0.07632450014352798, -0.3802817165851593, 0.6592602729797363, -0.4413723051548004, -0.24336792528629303, 0.4760116934776306, 1.25686836242675...
def _ beam ( self ) : return self. _ beam _ factory. simple ( self. _ metrology _ params. wavelength )
[ 1.3508225679397583, 0.37713417410850525, 0.08619969338178635, 0.14909936487674713, -1.0840750932693481, 0.333931028842926, -0.933650016784668, 0.2102845460176468, 0.27238768339157104, -1.160065770149231, 0.15027734637260437, 0.7290390133857727, -0.8961076736450195, 0.05146559700369835, -...
def _ get _ list _ of _ cluster _ ids _ for _ tetrodes _ across _ recordings ( self ) : tetrode _ nrs = [ ] cluster _ ids = [ ] for recording in self. recordings : for unit in recording. units : if not unit ['tetrode _ nr'] in tetrode _ nrs : tetrode _ nrs. append ( unit ['tetrode _ nr'] ) cluster _ ids. append ( [ ] )...
[ -0.5750672221183777, 0.09417998790740967, 0.48692241311073303, -1.300844669342041, 0.865012526512146, -0.007205170579254627, 0.5299537777900696, -0.018758956342935562, 0.2763398587703705, 0.9175311326980591, 0.14977656304836273, 0.8303134441375732, -0.04938407987356186, 0.7322524189949036,...
def get _ data _ array ( poly, field _ type = " cell ", attribute ='parentindex') : if field _ type = = " cell " : return dsa. wrapdataobject ( poly ). celldata [ attribute ] elif field _ type = = " point " : return dsa. wrapdataobject ( poly ). pointdata [ attribute ]
[ -0.8539988994598389, -0.5654258728027344, 0.5035097002983093, -0.10279866307973862, -0.26885518431663513, 0.3739754557609558, -0.4134393036365509, -0.7739327549934387, 0.12254424393177032, -0.5133521556854248, -0.31780779361724854, 1.304533839225769, 0.9131613373756409, -0.5713232755661011...