text
stringlengths
25
2.19k
embedding
listlengths
768
768
def reset _ code _ slot _ if _ pin _ unknown ( hass, lock _ name : str, code _ slots : int, start _ from : int ) - > none : return asyncio. run _ coroutine _ threadsafe ( async _ reset _ code _ slot _ if _ pin _ unknown ( hass, lock _ name, code _ slots, start _ from ), hass. loop, ). result ( )
[ -0.3912479877471924, 0.6542360782623291, 0.37896728515625, 0.708432674407959, 0.1607864648103714, -0.25177526473999023, 0.17472386360168457, 0.18469636142253876, -0.48326849937438965, 0.5090104341506958, -0.1382889747619629, 0.9693524241447449, -0.26132264733314514, -0.4176922142505646, ...
def iterate _ model ( self, pop, exd, dt = 1. ) : raise notimplementederror
[ -1.1331312656402588, -0.2498432844877243, 0.43991580605506897, 0.6371910572052002, 0.1889532208442688, 1.2282768487930298, 0.08448708802461624, -0.9232255220413208, -1.0015815496444702, 1.228986382484436, 0.42766833305358887, -0.190973699092865, 0.9861896634101868, 0.09715946763753891, -...
def get _ albums _ from _ id ( self, artist _ id, just _ id _ and _ name = false ) : artist _ albums _ data = self. _ make _ request ( f " https : / / api. spotify. com / v1 / artists / { artist _ id } / albums " ) if artist _ albums _ data : artist _ albums = [ ] for album in artist _ albums _ data. json ( ) [ " items...
[ -0.5065160989761353, -1.117611050605774, 0.7176409959793091, -0.09703519195318222, 0.1208205297589302, 0.33452123403549194, -1.163028597831726, -0.5838630795478821, 0.40380987524986267, 0.17987313866615295, -1.6075074672698975, 0.22271932661533356, -0.1220507100224495, 0.30986157059669495,...
def _ builtin _ enum ( self ) : return bicenum. from _ category _ id ( self. _ revit _ object. id )
[ 0.05302687734365463, -1.3006994724273682, 0.3072925806045532, -0.32085445523262024, 1.3071563243865967, -0.09587202221155167, 0.7417773008346558, 0.2981417775154114, 0.11695491522550583, -0.350409597158432, -0.2999647259712219, 1.4927418231964111, 0.33126944303512573, -0.8010980486869812, ...
def spawn _ greenlet ( self, func, args, kwargs, greenlet _ name ) : self. close _ non _ parent _ step ( ) to _ run = [ pgs. _ get _ setter _ on _ spawn ( ) for pgs in pergreentletstateregistry ] current _ step = self. _ step _ stack [ - 1 ] def _ runner ( ) : for fn in to _ run : fn ( ) try : return func ( * args, * *...
[ -0.2671067416667938, 0.3913285434246063, 0.7775463461875916, 0.511606752872467, 0.14573675394058228, 0.8308548331260681, -0.16411732137203217, -0.47515198588371277, -0.3089400827884674, 0.4102941155433655, -0.3635687530040741, -0.3564531207084656, -0.31766030192375183, 0.48946520686149597,...
def swap ( lyst, i, j, profiler ) : # you could say lyst [ i ], lyst [ j ] = lyst [ j ], lyst [ i ] # but the following code shows what is really going on profiler. exchange ( ) temp = lyst [ i ] lyst [ i ] = lyst [ j ] lyst [ j ] = temp
[ -0.08409246802330017, 0.15041397511959076, 0.3224285840988159, -0.3628750145435333, 0.11079467087984085, 0.14185239374637604, 0.16080793738365173, -0.3857317864894867, 0.5731452703475952, 0.5193883180618286, -0.3455328643321991, 0.7304644584655762, -0.713263988494873, -0.1746569126844406, ...
def weight _ generator ( ) : while true : yield 7 yield 3 yield 1
[ -0.023988232016563416, 0.5213205814361572, 0.5240236520767212, 0.5527898073196411, -0.273963987827301, 0.6102715730667114, -0.49599510431289673, -0.2599963843822479, -0.6864861249923706, -0.07848992943763733, -0.3267447352409363, -0.830539882183075, -0.6551709175109863, 0.04366604238748550...
def _ _ call _ _ ( self ) : new _ cls = type ( self. _ old _ cls. _ _ name _ _, self. _ old _ cls. _ _ bases _ _, dict ( self. _ old _ cls. _ _ dict _ _ ) ) new _ cls. _ _ new _ _ = self. get _ new ( ) return new _ cls
[ -0.9417793154716492, -1.0633283853530884, 0.7041623592376709, -0.35254573822021484, 0.30424395203590393, -0.47204896807670593, -0.4191575348377228, -0.8793241381645203, 0.177229106426239, -0.38358017802238464, 0.0834364965558052, 1.055722951889038, 0.16326414048671722, 0.3678489625453949, ...
def clean _ up _ bots ( ) : # maximum number of in - flight ndb. futures. max _ in _ flight = 50 bot _ ids = [ ] deleted = { } for machine _ type in machinetype. query ( machinetype. num _ pending _ deletion > 0 ) : logging. info ('deleting bots : % s ', ', '. join ( sorted ( machine _ type. pending _ deletion ) ) ) bo...
[ -0.6230722069740295, 0.6284146904945374, 0.6411128044128418, 0.0345972515642643, -0.0014731029514223337, 0.6199362277984619, -0.03738250955939293, -0.16367380321025848, -0.9404411911964417, -0.49607253074645996, -0.21640059351921082, 0.08083601295948029, 0.0701538473367691, 1.0289566516876...
def train ( train _ dl, valid _ dl, config, logger = none ) : writer = make _ summary _ writer ( config. summary _ path, time _ now ) model = audiocnn ( ) if torch. cuda. is _ available ( ) : if logger : logger. info ('training on gpu!') model. cuda ( ) criterion = nn. mseloss ( ) optimizer = torch. optim. adam ( model...
[ 0.23154206573963165, 0.045961134135723114, 0.8647266626358032, 0.29810357093811035, 0.20905515551567078, -0.6893561482429504, 0.2590939998626709, 0.6458578705787659, 0.03722527623176575, 0.2813364565372467, -0.10521705448627472, 0.08070966601371765, 0.9364846348762512, 0.4019470810890198, ...
def import _ profile _ info ( self ) : profile = self. user. profile if profile. affiliation : affiliation. objects. create ( name = profile. affiliation, author = self ) return true return false
[ 0.5780750513076782, 0.2678949236869812, 0.6780632138252258, 0.6450074315071106, 0.42765870690345764, 1.3153061866760254, 0.21124789118766785, -0.37018489837646484, 0.17261968553066254, 0.4755772054195404, -0.615232527256012, -1.492365837097168, -0.2914935350418091, -0.6657565832138062, -...
def test _ list _ decimal _ max _ length _ nistxml _ sv _ iv _ list _ decimal _ max _ length _ 1 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / decimal / schema + instance / nistschema - sv - iv - list - decimal - maxlength - 1. xsd ", instance = " nistdata / list / deci...
[ -0.2951861619949341, -0.06551366299390793, 0.31226521730422974, 0.7632860541343689, -0.4149429202079773, -0.019157353788614273, 0.049672942608594894, 0.25418344140052795, 0.9290605187416077, 0.17074814438819885, -1.1706781387329102, -0.3969307243824005, -0.11298999935388565, 0.726181745529...
def make _ event ( self, syncer ) : syncable _ transformer = syncer. convert _ model _ to _ thrift ( self. model ) syncable _ dataframe = syncer. convert _ df _ to _ thrift ( self. df ) me = modeldb _ types. metricevent ( syncable _ dataframe, syncable _ transformer, self. metric _ type, self. metric _ value, self. lab...
[ 0.772514820098877, 0.29353585839271545, 0.37261298298835754, 0.44256359338760376, 0.38517528772354126, 0.9677290916442871, 0.6277735233306885, -0.1844020038843155, -1.3071807622909546, 0.31377479434013367, 0.0627448633313179, 0.2677200436592102, 0.25550132989883423, -0.11740407347679138, ...
def apply _ symmetry ( self ) : t = self. copy ( ) np = int ( len ( self. yc ) / 2 ) t. d = np. vstack ( [ self. d [ np :, : ], self. d [ : np, : ] ] ) return self. merge ( [ t ] )
[ -0.7443697452545166, 0.4350225031375885, 0.5912216305732727, -0.35670942068099976, 0.3923448920249939, -0.5438376665115356, 0.8627333045005798, 0.4639662206172943, 0.21882285177707672, -0.07856403291225433, -0.2615377902984619, -0.08339421451091766, 0.345063716173172, 0.24116253852844238, ...
def aggregate _ locations ( aggregation _ type : str, parent _ dir : str, measure _ id : int, gbd _ round _ id : int, location _ set _ id : int, year _ id : int ) - > none : # set up drawsource and drawsink. source _ dir, sink _ dir = _ get _ draw _ source _ sink _ dirs ( parent _ dir, aggregation _ type, measure _ id ...
[ -0.2340991497039795, 0.6673735976219177, 0.639245867729187, -0.9290465116500854, 0.059371866285800934, -0.4478081166744232, 0.6221050024032593, -0.007369698956608772, 0.2620319426059723, -0.09205126017332077, 1.0719636678695679, 0.9941597580909729, 1.1045666933059692, 0.9283321499824524, ...
def addbrailleregionstoline ( regions, line ) : line. addregions ( regions )
[ 0.9073193073272705, -0.6071935892105103, 0.4241698682308197, 0.012760091572999954, 1.420149564743042, 0.5281229019165039, -1.3834248781204224, -0.22590044140815735, 0.12043825536966324, -0.8282588720321655, -0.3782515823841095, 0.1462477743625641, -0.33339112997055054, 0.08277686685323715,...
def _ savelastcursorposition ( self, obj, caretoffset ) : self. pointofreference [ " lastcursorposition " ] = [ obj, caretoffset ]
[ -1.1375086307525635, -1.4497504234313965, 0.504794180393219, -1.3754626512527466, 0.8182610273361206, 0.22927890717983246, -0.18434995412826538, -0.6632547378540039, 0.8620318174362183, 0.6374664306640625, -1.0553622245788574, -0.6138338446617126, -0.5226761102676392, -0.07379968464374542,...
def show _ path ( path, starting _ city, w = 12, h = 8 ) : x, y = list ( zip ( * path ) ) _, ( x0, y0 ) = starting _ city plt. imshow ( map ) plt. plot ( x0, y0,'y * ', markersize = 15 ) # y * = yellow star for starting point plt. plot ( x + x [ : 1 ], y + y [ : 1 ] ) # include the starting point at the end of path plt...
[ 0.17601008713245392, -0.477675199508667, 0.5851560831069946, -0.358431875705719, -1.0650924444198608, 0.9332090020179749, 0.7317996621131897, 0.919200599193573, 0.5762361884117126, 0.38354095816612244, 0.09058650583028793, 0.7646209001541138, 0.3436817526817322, 0.39611366391181946, -0.1...
def test _ inlinecallbacks ( self ) : reporter = yield self. get _ reporter _ with _ suite _ run ( ) self. assertlocalsequal ( self. get _ result _ by _ test _ name ( reporter. errors,'statustest _ inlinecallbacks _ util'), dict ( _ = none ) ) # but locals are lost when using the default @ defer. inlinecallbacks : self...
[ 0.6906275749206543, 0.23249459266662598, 0.47742342948913574, -0.10590523481369019, 0.6696515083312988, 0.7110303640365601, 0.4243994951248169, 0.3995794355869293, 0.7110555171966553, -1.0101689100265503, -1.2664905786514282, -0.6421975493431091, -0.45195272564888, 0.6120328307151794, -0...
def get ( self, * args, * * kwargs ) : schedule _ pk = kwargs [ " schedule _ pk " ] schedule = ( schedule. objects. filter ( pk = schedule _ pk ). prefetch _ related ( " sections ", " sections _ _ meetings " ). first ( ) ) if not schedule : return response ( { " detail " : " invalid schedule " }, status = status. http ...
[ -0.750719428062439, -0.22849898040294647, 1.0703997611999512, -0.46902602910995483, 0.000054924159485381097, 0.06853828579187393, 0.20741547644138336, -0.3917789161205292, 0.029460689052939415, 0.8559759855270386, 0.5638646483421326, 0.02073066122829914, 0.7365986108779907, 0.3086901605129...
def forward ( self, node _ emb, edge _ idx = none ) : if edge _ idx = = none : # get the index list for all the node pairs num _ node = node _ emb [ 0 ]. shape [ 0 ] node _ idx _ list = [ idx for idx in range ( num _ node ) ] src _ idx = torch. tensor ( node _ idx _ list ). view ( - 1, 1 ). repeat ( 1, num _ node ). vi...
[ -0.6824463605880737, 0.725986897945404, 0.8478980660438538, -0.36852580308914185, 0.265696257352829, -0.6708341836929321, 0.3926205039024353, 0.6958293914794922, 0.3503085970878601, 0.040792156010866165, 0.5361257791519165, -0.08741874247789383, 0.242167666554451, -0.11325272917747498, -...
def get _ devices ( self ) : results = self. get _ api _ v1 ( " me / player / devices " ) return tuple ( device ( device ) for device in results ['devices'] )
[ -1.4518508911132812, 0.3878386914730072, 0.7123459577560425, 1.188825011253357, 0.8597717881202698, -0.21326234936714172, -0.6966657638549805, -0.6979051828384399, -0.011981895193457603, 0.036153990775346756, -0.41058027744293213, -0.5279697179794312, -0.6676665544509888, 0.114764891564846...
def test _ example _ input _ two _ valid _ input _ query _ start _ date ( self, ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) : input _ page = inputpage ( ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) input _ page. create _ new _ input. select ( " example input two " ) input _ page...
[ -0.25550785660743713, -0.5246047973632812, 0.6126233339309692, 0.32753199338912964, -0.35146331787109375, 1.1748665571212769, -0.28610703349113464, -0.44656240940093994, -0.05536859109997749, 0.18937581777572632, -0.42207249999046326, 0.24705870449543, 0.30864328145980835, 0.45098790526390...
def test _ atomic _ qname _ enumeration _ 4 _ nistxml _ sv _ iv _ atomic _ qname _ enumeration _ 5 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / qname / schema + instance / nistschema - sv - iv - atomic - qname - enumeration - 5. xsd ", instance = " nistdata / atomic ...
[ -0.5008840560913086, -0.5852267146110535, 0.4445573687553406, -0.06445681303739548, -0.5606517791748047, 0.31564033031463623, -0.07143998891115189, -1.1136358976364136, 0.2395188808441162, 0.611784040927887, -0.5613092184066772, -0.4090731739997864, -0.46189403533935547, -0.180655673146247...
def _ random _ shoot _ bernstein _ ( fun ) : xmn = fun. xmin ( ) xmx = fun. xmax ( ) ymx = max ( fun. bernstein ( ). pars ( ) ) i = 0 while true : x = _ uniform _ ( xmn, xmx ) y = _ uniform _ ( 0, ymx ) v = fun ( x ) if v > = y : return x
[ -0.10921341180801392, 0.01402976457029581, 0.32545143365859985, 1.1524325609207153, -1.12926185131073, 0.6688851118087769, -0.45167750120162964, -1.516581416130066, 0.1991337388753891, 0.2979239225387573, 0.17216025292873383, 0.49545398354530334, -0.6705868244171143, -0.19181951880455017, ...
def parse _ issues ( issues ) : logger. info ('parsing issues...') df = pd. dataframe ( ) for issue in issues : d = issue. raw ['fields'] d ['key'] = issue. key df = df. append ( d, ignore _ index = true ) return df
[ -0.5000160336494446, 0.4617336392402649, 0.35770246386528015, -0.40951621532440186, -0.2937341034412384, -0.009683309122920036, -0.6115932464599609, 0.039491917937994, 0.0410211905837059, -0.8248580694198608, 0.48133403062820435, -0.4932856261730194, -0.2569117248058319, -0.785163879394531...
def dictify ( obj _ list, key ) : result = { } for obj in obj _ list : if key not in obj : raise dictifyerror ( f'key " { key } " not found in { obj }') val = obj [ key ] del obj [ key ] if val not in result : result [ val ] = [ ] result [ val ]. append ( obj ) return result
[ -0.2787242829799652, 0.1351177990436554, 0.3660236895084381, -0.2202111929655075, -0.3807184398174286, -0.3864956200122833, -0.6270518898963928, 0.7503166794776917, -0.14921902120113373, 1.4632753133773804, -1.1739808320999146, -0.7776439785957336, -0.30293551087379456, 0.8504145741462708,...
def test _ atomic _ hex _ binary _ min _ length _ 4 _ nistxml _ sv _ iv _ atomic _ hex _ binary _ min _ length _ 5 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / hexbinary / schema + instance / nistschema - sv - iv - atomic - hexbinary - minlength - 5. xsd ", instance ...
[ 0.11240554600954056, -0.2666170299053192, 0.38017594814300537, 0.6584916114807129, -0.38005778193473816, 0.23349380493164062, -0.27055200934410095, -0.4902946949005127, 0.08988013118505478, 0.28963300585746765, -0.6703757643699646, -0.48311731219291687, -0.8196014761924744, 0.4124803543090...
def run _ get _ file _ location _ macro ( config ) : macroname, dbname = config ['macro'] ['get _ file _ location'], config ['ui _ file'] args = none return dict ( run _ transcad _ macro ( macroname, dbname, args ) )
[ 0.3815777003765106, -0.011869234964251518, 0.37941786646842957, -0.01319785788655281, -0.28204891085624695, -0.7831662893295288, 0.973899245262146, 0.37981143593788147, -1.0485469102859497, -0.0531444177031517, -0.02424551360309124, 0.3749813139438629, 0.48497530817985535, 0.32742244005203...
def _ _ normed ( self, stopwords : stroritert ) - > tuple [ str,... ] : if hasattr ( stopwords,'_ _ iter _ _') and not isinstance ( stopwords, str ) : return tuple ( set ( map ( lambda x : str ( x ). lower ( ), stopwords ) ) ) return str ( stopwords ). lower ( ),
[ -0.5369382500648499, -0.22636857628822327, 0.4532996416091919, -0.938605010509491, -0.47983282804489136, 0.4468046724796295, -0.4254932999610901, -0.750058650970459, -0.297283411026001, 1.1231294870376587, 0.6979882717132568, -0.4299827218055725, -0.8247250318527222, 0.4251704514026642, ...
def show _ decision _ boundary ( x, y, x _ train, y _ train, alphas, b, \ kernel = linear _ kernel ) : # some useful variables n, d = x. shape # obtain the minimum and maximum coordinates x _ min = np. min ( x [ :, 0 ] ) x _ max = np. max ( x [ :, 0 ] ) y _ min = np. min ( x [ :, 1 ] ) y _ max = np. max ( x [ :, 1 ] ) ...
[ 0.5684111714363098, 0.22107911109924316, 0.9837086200714111, 0.15281791985034943, -0.6884784698486328, 0.4665638506412506, -0.17964982986450195, 0.5316068530082703, -0.1956489384174347, 0.5732174515724182, 0.3965465724468231, 1.4291876554489136, 0.43263521790504456, 0.08641394227743149, ...
def can _ unlock _ course ( self, forum, user ) : return self. _ perform _ basic _ permission _ check ( forum, user, " can _ unlock _ course " )
[ -0.9394770264625549, 0.2059977650642395, 0.391292929649353, 1.5223671197891235, -0.4654156565666199, -0.11824920028448105, 0.7373142838478088, -0.19679264724254608, -0.2555736005306244, 0.34172123670578003, 0.0564299002289772, 0.2276364117860794, -0.7594347596168518, -0.2648999094963074, ...
def test _ atomic _ any _ uri _ enumeration _ nistxml _ sv _ iv _ atomic _ any _ uri _ enumeration _ 1 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / anyuri / schema + instance / nistschema - sv - iv - atomic - anyuri - enumeration - 1. xsd ", instance = " nistdata / a...
[ -0.8654406666755676, -0.9363098740577698, 0.577664852142334, 0.8995776772499084, -0.08188392221927643, -0.18328310549259186, 0.36454102396965027, 0.07017574459314346, 0.45123717188835144, 0.16482572257518768, 0.5475808382034302, -0.31710323691368103, -0.2097683846950531, 0.1484232991933822...
def testvalidation ( self ) : from _ string = xml _ configuration. configuration. fromstring # element needs to be name configuration xml _ string ='< not - configuration / >'self. assertraises ( assertionerror, from _ string, xml _ string ) # property needs non - empty name xml _ string ='< configuration > < property ...
[ 0.5648393630981445, -0.396273136138916, 0.7532724142074585, 0.18885202705860138, -0.18008778989315033, 0.6547352075576782, 0.28149309754371643, 0.4320859909057617, -0.028084993362426758, -0.5603877305984497, -0.40573301911354065, -0.32351136207580566, 0.11019691824913025, -0.12582989037036...
def split _ model _ file ( model, chunksize = 50000000, remove = false ) : if len ( glob. glob ( str ( model ) +'*. 0') ) > 0 : raise valueerror ( " model already split " ) for m in glob. glob ( str ( model ) +'*') : with open ( m ) as f : chunk = f. read ( chunksize ) file _ number = 0 while chunk : with open ( m + '....
[ -0.10329974442720413, -0.4712907373905182, 0.8116481900215149, 0.388746052980423, -0.15568673610687256, 0.2681434452533722, 1.2414655685424805, 0.2891823649406433, -0.301073282957077, 0.948868453502655, -0.49769675731658936, -0.6031908988952637, -0.5332183837890625, 0.6296103596687317, -...
def drop _ rois ( self, rois ) : self. dropped _ rois. extend ( rois )
[ -1.172379493713379, -0.3052988052368164, 0.4352989196777344, -0.05313009023666382, 0.5589582324028015, 0.9211142659187317, -0.843163251876831, 0.09260065108537674, 0.8914639949798584, 0.3053751289844513, -0.5309539437294006, 0.2094486951828003, -0.6875036358833313, 0.17510609328746796, -...
def _ parse _ time ( time ) : time _ betw _ 0 _ and _ 2000 _ ad = int ( " 0x00e03ab44a676000 ", 16 ) time _ since _ 2000 _ epoch = datetime. timedelta ( microseconds = time ) - datetime. timedelta ( microseconds = time _ betw _ 0 _ and _ 2000 _ ad ) return datetime. datetime ( 2000, 1, 1 ) + time _ since _ 2000 _ epoch
[ 0.416336327791214, -0.24529226124286652, 0.653290867805481, -0.42993471026420593, -0.9663534164428711, -0.04883992671966553, -0.07293850928544998, 0.021289533004164696, -0.07075200229883194, 0.5271493196487427, -0.7580876350402832, -0.6445903182029724, -0.07548224925994873, 0.6859870553016...
def init _ logging ( exp _ dir, config _ path ='config / logging _ config. yaml') : import yaml, sys try : with open ( config _ path,'r') as f : config = yaml. load ( f. read ( ), loader = yaml. fullloader ) config [ " handlers " ] [ " info _ file _ handler " ] [ " filename " ] = os. path. join ( exp _ dir, " info. log...
[ 0.20259396731853485, -0.8596779108047485, 0.7595710158348083, 0.00606802711263299, -0.24620962142944336, 0.44624143838882446, -0.0019795710686594248, 1.2110891342163086, -0.46588751673698425, 0.19031840562820435, -1.049839735031128, -0.13727684319019318, 0.7063477039337158, 0.9434468150138...
def test _ canonical _ removed ( self ) : resources = self. setup _ minimal ( ) feature = resources ['feature'] del self. changeset self. create ( feature, parent = feature, slug ='child ', name ='{ " zxx " : " canonical " }') self. changeset. closed = true self. changeset. save ( ) feature = feature. objects. get ( pk...
[ 0.28261709213256836, 0.3926353454589844, 0.5162792205810547, -0.500632643699646, -0.16791480779647827, 0.23658376932144165, -0.02221941575407982, 0.6047881245613098, -0.22882914543151855, -0.8802170157432556, -0.4695126712322235, 0.3313169777393341, -0.053352754563093185, -0.06960042566061...
def getfileversionhistorytable ( self ) - > str : # noqa : n802 lines = [ ] for info in self. get _ file _ history ( ). values ( ) : dimension ='{ width } × { height } px ( { size } bytes ) '. format ( * * info. _ _ dict _ _ ) lines. append ('| { timestamp } | | { user } | | { dimension } |'' | < nowiki > { comment } <...
[ 0.9632883667945862, -0.32112884521484375, 0.7737969756126404, -0.5951275825500488, -0.3395107686519623, 0.1742958277463913, -0.08022851496934891, -0.00009554724965710193, -1.4014075994491577, 0.2238197773694992, 0.19846677780151367, 0.5419635772705078, 0.7564359903335571, 0.777716875076294...
def _ garbage _ collection _ repos ( self, skip _ lock _ for _ testing = false ) : with usethendisconnect ( app. config ) : policy = get _ random _ gc _ policy ( ) if policy is none : logger. debug ( " no gc policies found " ) return repo _ ref = registry _ model. find _ repository _ with _ garbage ( policy ) if repo _...
[ -0.08355969935655594, 0.8279895186424255, 0.688244640827179, -0.35001295804977417, 1.3705857992172241, -0.0921149030327797, 0.8541963696479797, -1.0465471744537354, 0.16711553931236267, 0.08295384049415588, 0.4565785527229309, 0.2848990261554718, -0.1803111582994461, 0.6739287376403809, ...
def crypto ( files, password, cipher, decrypt = false, delete = false ) : if decrypt : status = dec ( files, password, cipher, delete ) else : status = enc ( files, password, cipher, delete ) return status
[ 0.9336808323860168, 0.3482917845249176, 0.4169365465641022, 0.3810555934906006, -0.10792654752731323, -0.3957115709781647, -0.1606156975030899, 0.6836361289024353, -0.17746910452842712, 0.38934820890426636, -0.07686210423707962, -0.45281144976615906, -0.41344091296195984, 0.265931159257888...
def validate _ choice ( value, valid _ choices ) : if value in valid _ choices : return value else : raise validationerror ( message ='invalid value % ( value ) s, valid values are : % ( valid _ choices ) s ', params = {'value': value,'valid _ choices': valid _ choices } )
[ 0.5328186750411987, -0.4629783630371094, 0.308475136756897, 0.5030120611190796, -0.3201855421066284, 0.8431657552719116, -0.2945164442062378, -0.30840152502059937, 0.07285186648368835, 0.23208314180374146, 1.2555184364318848, -0.10380910336971283, -0.19274325668811798, -0.12196046113967896...
def test _ split _ shuffled _ df _ cut _ off ( df ) : # shuffle the dataframe df _ shuffled = df. sample ( frac = 1 ) test = drophighpsifeatures ( cut _ off = 250 ) base, test = test. _ split _ dataframe ( df _ shuffled ) # the base dataframe should contain indexes from 0 to 250 set ( base. index ) = = { _ for _ in ran...
[ -0.6832682490348816, 0.337566614151001, 0.2759850025177002, -0.12330960482358932, 0.058287858963012695, 0.46241670846939087, 1.0143511295318604, 0.2347763478755951, 0.7018511891365051, -0.03144138678908348, -0.39555761218070984, -0.1577555239200592, -0.26015010476112366, -0.688225090503692...
def find _ material _ from _ name ( self, name ) : for material in self. materials : if material. name = = name : return material msg = " no material with name { } was found ". format ( name ) raise valueerror ( msg )
[ 0.4991627335548401, -1.350994348526001, 0.06344961374998093, -0.5608081221580505, -0.4630323648452759, 0.023104220628738403, -1.0203421115875244, -1.3929378986358643, -0.2688734531402588, 0.3814011812210083, 0.9302831888198853, 0.761904776096344, -1.1640257835388184, 0.6382337808609009, ...
def run ( self, left, right ) : self. left = left self. right = right for dat in left : # try to normalize and if it fails, in an acceptable manner, print # out the exception message try : self. normalize ( dat ) except nexception as exception : print ( exception ) return self. label _ additions
[ -0.6301103234291077, 0.022403130307793617, 0.4916878938674927, -0.09995999932289124, -0.18442930281162262, 0.057102322578430176, -0.9446938633918762, -0.9581616520881653, -0.04909668117761612, 0.010225746780633926, 0.06452788412570953, 0.14905864000320435, -1.568816065788269, 1.29931032657...
def test _ atomic _ qname _ min _ length _ 3 _ nistxml _ sv _ iv _ atomic _ qname _ min _ length _ 4 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / qname / schema + instance / nistschema - sv - iv - atomic - qname - minlength - 4. xsd ", instance = " nistdata / atomic ...
[ 0.5701127648353577, -0.6291557550430298, 0.33070069551467896, -0.3287493586540222, -0.3895947337150574, 0.07955094426870346, -0.45049571990966797, -0.891480565071106, 0.6150200366973877, -0.05520409718155861, -0.33254024386405945, -0.433866411447525, -0.6439178586006165, -0.553650796413421...
def parse _ board ( string, game _ board ) : logger. debug ( " parsing board : " ) height = 0 width = 0 string _ board _ io = stringio ( string ) for line in string _ board _ io. readlines ( ) : width = 0 for char in line. split ( ) : # when one is found, add to the board and perhaps add a # player. if parser. is _ pie...
[ 0.5969972014427185, -0.083640918135643, 0.6188613772392273, 0.4106586277484894, -0.2948579788208008, -0.008656790480017662, 0.29618996381759644, -0.06780894845724106, 0.060488905757665634, -0.3094198703765869, -0.2426610141992569, -0.047016073018312454, -0.06291139125823975, -0.44568997621...
def billing _ city _ name ( self, billing _ city _ name ) : self. _ billing _ city _ name = billing _ city _ name
[ 0.010657739825546741, -0.15777958929538727, -0.24402442574501038, 0.6362588405609131, -1.0660165548324585, 1.630642056465149, 0.042691461741924286, 0.6519524455070496, -0.44546255469322205, -0.4956757128238678, -0.7353695034980774, -1.2241747379302979, 0.5549743175506592, 0.961007297039032...
def get ( artist _ id ) : columns = ['artist. name ','artist. first _ name ','artist. last _ name ','artist. image _ url ','artist. videos ','video. name ','video. image _ url ','video. uri ','video. video _ sources ','videosource. url'] try : message ='success'data = artist. query. outerjoin ( artist. videos, video. v...
[ -0.6590003967285156, -0.2052600085735321, 0.8246340155601501, -0.7626845240592957, -0.2397845983505249, -0.8572516441345215, -0.4538162052631378, 0.182167649269104, 0.5329728126525879, 0.39168882369995117, -0.24028612673282623, 0.435269296169281, -0.19712382555007935, 0.973214864730835, ...
def mount _ workspace _ dir ( self, line ) : args = magic _ arguments. parse _ argstring ( self. mount _ workspace _ dir, line ) mount _ dir = self. _ get _ mount _ directory ( ) # check if the mount _ dir is already mounted. # users want to repeatedly execute their notebook so we do not want to throw an error when the...
[ -0.34119561314582825, -0.06380876153707504, 0.9454522728919983, 0.2877928614616394, 0.24782146513462067, -0.3851233422756195, 0.02299800142645836, -0.5781141519546509, 0.9142719507217407, -0.09249136596918106, 0.3422289490699768, 0.6900280117988586, -0.27044400572776794, 0.5530921816825867...
def getcounter ( self, key ) : self. send _ getcounter ( key ) return self. recv _ getcounter ( )
[ -0.5389218330383301, -0.09588172286748886, 0.5588181614875793, -0.03581400588154793, -0.3705718517303467, -0.44115307927131653, 0.3238334059715271, -0.74603271484375, -0.07422123104333878, -0.018296336755156517, -0.8036589026451111, 0.06412079930305481, -1.1096155643463135, 0.9177985191345...
def is _ not _ reachable ( delta, old, graph ) : old _ domain = defaultdict ( set ) old _ range = defaultdict ( set ) new _ domain = defaultdict ( set ) new _ range = defaultdict ( set ) # check non - intersecting domains for switch, config in old : if not switch in delta : # new _ domain [ switch ] = [ ] # new _ range...
[ -1.3925882577896118, 0.174845352768898, 0.7976029515266418, 0.382106751203537, -0.5072320699691772, 0.939778208732605, 0.7441304922103882, 0.35851675271987915, -0.9036667943000793, 0.03659514710307121, 0.22291551530361176, -0.35430487990379333, -0.39416739344596863, 0.11077360063791275, ...
def lisaconfig ( ) : retval = attrdict ( { " behaviorversion " : behavior ( 0 ), " iterationperiod " : 60, } ) retval. hostname = gethostname ( ). lower ( ) # build config useful in generating apache configuration. apacheconfig = attrdict ( ) apacheconfig. enablessl = true if retval. hostname in [ " lisa - dev ", " lis...
[ 0.028084279969334602, -0.3266696333885193, 0.7589704990386963, -0.4537928104400635, -0.6388714909553528, 0.3816746771335602, 0.7629373669624329, 0.16878150403499603, -0.08826068788766861, 0.138741135597229, -1.4512981176376343, -0.13197563588619232, 0.38657596707344055, 0.9954676032066345,...
def adjacent _ to _ hits ( board ) : adjacent _ to _ hits = { } # these arrays denote when a sequence of hits has already been visited vertically or horizontally. keeping track # of these avoids double - counting. vert _ visited = np. zeros ( ( len ( board ), len ( board [ 0 ] ) ), dtype = bool ) horz _ visited = np. z...
[ -0.2555173337459564, 0.3923574984073639, 0.8966982364654541, -0.6721492409706116, -1.263867735862732, -0.5397651195526123, 1.5220985412597656, -0.41282641887664795, -0.824076771736145, 0.29018333554267883, -0.514211118221283, 0.2751729488372803, 0.22961169481277466, 0.3775295615196228, 0...
def do _ keyevent ( client, key, modifiers, isdown ) : ret = client. keyevent ( key, modifiers, isdown ) if'result'not in ret : logging. error ( " keyevent ( { }, { }, { } ) response error : { } ". format ( key, modifiers, isdown, ret. get ( " error ", " undefined " ) ) ) raise commanderrorresponse ( ) else : logging. ...
[ -0.4059910774230957, -0.3338010609149933, 0.5161017179489136, 0.2306506186723709, 0.5178452134132385, -0.2950255870819092, -0.440486341714859, 0.34090280532836914, 0.11844269186258316, 0.4093327224254608, 0.2648896276950836, 0.5808234214782715, -1.229083776473999, 0.31234580278396606, 0....
def test _ get _ action _ step _ success ( self ) : action _ resource = actionsstepsresource ( ) # stubs for db action _ resource. get _ action _ db = actions _ db action _ resource. get _ tasks _ db = tasks _ db step = action _ resource. get _ action _ step ('59bb330a - 9e64 - 49be - a586 - d253bb67d443 ','1c') assert...
[ 0.057995714247226715, 0.06054101511836052, 0.24796272814273834, 0.7198812961578369, 0.5344973802566528, 0.34916797280311584, 0.428432822227478, -0.26570865511894226, -0.2680109143257141, -0.39768722653388977, -0.5636576414108276, -0.16272692382335663, 0.6210000514984131, -0.205481007695198...
def min ( arg0 : iterable [ any ] | any, * args : any ) - > any : if not args : if not isinstance ( arg0, iterable ) : raise typeerror ('expect more than one items to compare min') return symbolicexpression. min ( * list ( arg0 ) ) lst = list ( arg0 ) if isinstance ( arg0, iterable ) else [ arg0 ] + list ( args ) symbo...
[ 0.23127377033233643, -0.7166674733161926, 0.4938430190086365, 0.7033367156982422, 0.48447102308273315, -0.3697655498981476, -0.033718857914209366, -0.016832862049341202, 0.23163796961307526, -0.16914832592010498, -0.4233335852622986, 0.3878665268421173, -0.5462425351142883, 1.2583159208297...
def test _ example _ input _ one _ add _ cancel _ entity ( self, ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) : input _ page = inputpage ( ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) input _ page. create _ new _ input. select ( " example input one " ) input _ page. entity1. exam...
[ 0.7744529247283936, 0.12775172293186188, 0.5186972618103027, 0.8010390996932983, 0.3759852647781372, 1.3436204195022583, -0.21272283792495728, 0.5593212246894836, 0.60453861951828, 0.6615618467330933, -0.026779986917972565, -0.744853675365448, 0.19258111715316772, 0.07572382688522339, 0....
def presenttitle ( self, inputevent ) : title = self. speechgenerator. generatetitle ( orca _ state. locusoffocus ) for ( string, voice ) in title : self. presentmessage ( string, voice = voice )
[ 0.03842325508594513, -0.9550535082817078, 0.22109560668468475, -0.46576589345932007, 0.519988477230072, 0.297376811504364, -0.7100393772125244, -0.3910404443740845, 0.38783544301986694, 0.6202722787857056, 0.5776888728141785, -0.6083437204360962, -0.28181517124176025, 0.7923883199691772, ...
def get _ grid _ width ( self ) : return self. _ width
[ -0.701894223690033, 0.7760727405548096, 0.4794777035713196, 0.8176698684692383, 0.487178236246109, -0.6098760962486267, 0.18922124803066254, -0.32972317934036255, 0.15840956568717957, -1.2859950065612793, 0.39163944125175476, 0.6215270757675171, -0.1544789969921112, 0.5116917490959167, 0...
def generateforecastcurve ( self, request, context ) : context. set _ code ( grpc. statuscode. unimplemented ) context. set _ details ('method not implemented!') raise notimplementederror ('method not implemented!')
[ -1.0543521642684937, -0.09168332815170288, 0.6505353450775146, 0.5921729207038879, 0.10581028461456299, 0.4610459804534912, 1.0605707168579102, -0.5384659171104431, 0.04610434174537659, 0.09990545362234116, -0.011674490757286549, 1.4095367193222046, -0.352236270904541, 0.16799646615982056,...
def test _ atomic _ qname _ min _ length _ 2 _ nistxml _ sv _ iv _ atomic _ qname _ min _ length _ 3 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / qname / schema + instance / nistschema - sv - iv - atomic - qname - minlength - 3. xsd ", instance = " nistdata / atomic ...
[ 0.29215601086616516, -0.4630066156387329, 0.5144400000572205, 0.1383659988641739, -0.5394617319107056, 0.6927433013916016, -0.8054093718528748, -0.5681958794593811, 0.9464394450187683, 0.5203430652618408, -0.2960595190525055, 0.3021206557750702, -0.24422714114189148, -0.6281428337097168, ...
def linear _ kernel ( x1, x2 ) : return np. matmul ( x1, x2. t )
[ 0.3623926341533661, -0.022735824808478355, 0.27150529623031616, 0.10518759489059448, -0.16227708756923676, -0.5301632881164551, -1.611241102218628, 0.1998153030872345, -1.020803689956665, 0.7566859126091003, 0.19126012921333313, 0.8253554105758667, 0.2907789647579193, -1.0537652969360352, ...
def update ( self ) : self. x + = ( self. ai _ settings. alien _ speed _ factor * self. ai _ settings. fleet _ direction ) self. rect. x = self. x
[ -0.5831006765365601, -0.0041406722739338875, 0.42330172657966614, -0.7578310370445251, 0.6868008971214294, 0.12715676426887512, -0.08837752789258957, -0.13065364956855774, -0.444112092256546, -0.3997245728969574, -0.014501812867820263, -0.4627830386161804, 0.6714312434196472, 0.25770723819...
def numpyarrayf64 ( * args, * * kwargs ) : return np. array ( * args, dtype = np. float64, * * kwargs )
[ -0.1727088987827301, -0.3543983995914459, 0.3704109489917755, 0.7698688507080078, 0.5736966729164124, -0.4188639223575592, -0.5293879508972168, -0.5524777173995972, -0.3030703067779541, -0.4772583246231079, -0.3002203404903412, 0.371299684047699, -0.4165673553943634, 1.5077028274536133, ...
def convert ( in _ file, out _ file ) : checkpoint = torch. load ( in _ file ) in _ state _ dict = checkpoint. pop ('state _ dict') out _ state _ dict = ordereddict ( ) for key, val in in _ state _ dict. items ( ) : # use convmodule instead of nn. conv2d in retinanet # cls _ convs. 0. weight - > cls _ convs. 0. conv. w...
[ 0.011925172060728073, -0.8736467957496643, 0.7263562083244324, 0.6085350513458252, -0.1701018512248993, -0.1608266979455948, 0.4872150719165802, 0.8412126898765564, -0.43468621373176575, 0.9291767477989197, -0.5281006097793579, -0.13217604160308838, 0.528961718082428, 0.13085660338401794, ...
async def default _ mock _ hap _ factory _ fixture ( hass : homeassistant, mock _ connection, hmip _ config _ entry ) - > homematiciphap : return homefactory ( hass, mock _ connection, hmip _ config _ entry )
[ 0.055052220821380615, 0.03233007341623306, 0.24463984370231628, 0.5717430710792542, 0.7035319805145264, 0.11649297922849655, -0.06535466015338898, 0.6570706367492676, 0.22462967038154602, -0.33755093812942505, 0.3180425465106964, -1.0414671897888184, 0.41804710030555725, -0.695480942726135...
def unique ( _ list : list ) - > list : ret = [ ] for item in _ list : if item not in ret : ret. append ( item ) return ret
[ -0.3601643145084381, -0.11186511069536209, 0.34615275263786316, 0.33523666858673096, 1.1194502115249634, 0.6470398306846619, -0.43916139006614685, 1.111233115196228, 0.5560354590415955, 0.03260946646332741, -1.877571702003479, -0.2276674062013626, -0.31432291865348816, 0.1712389439344406, ...
def get _ simhash _ signature _ list ( file _ list ) : simhash _ list = [ ] g = nx. digraph ( ) for file _ path in file _ list : graph _ file = open ( file _ path,'r') # create a networkx graph by reading the file g. clear ( ) for line in graph _ file : n1, n2 = [ int ( x ) for x in line. split ('' ) ] g. add _ edge ( ...
[ 0.06640075147151947, 0.08685554563999176, 0.6832634210586548, 1.4752495288848877, 0.38332492113113403, -0.02217620052397251, 0.43203970789909363, 1.3518322706222534, -0.3575226366519928, 0.5669811964035034, -1.4692003726959229, -0.9279148578643799, 0.15519236028194427, 0.6174125075340271, ...
def set _ event ( ) : token = request. headers. get ('authorization') event _ name _ = request. json. get ('event _ name') event _ description _ = request. json. get ('event _ description') ending _ time _ delta _ = request. json. get ('ending _ time _ delta') location _ range _ = request. json. get ('location _ range'...
[ -0.3671104311943054, -0.5068781971931458, 0.9777985215187073, 0.05037039518356323, 0.46407267451286316, -0.4276043176651001, -0.7090657353401184, -0.4283403754234314, -0.4501035213470459, 0.7657561898231506, -0.001889999257400632, 0.7850744128227234, -0.06242496147751808, 0.291437417268753...
def test _ drives _ fail ( self ) : with patch ( self. netapp _ request _ func ) as netapp _ request : netapp _ request. return _ value = exception ( ) storagepool = self. _ initialize _ dummy _ instance ( ) with self. assertraisesregexp ( ansiblefailjson, " failed to fetch disk drives. " ) : drives = storagepool. driv...
[ -0.10126221925020218, 0.3877922296524048, 0.2948499619960785, -0.10549033433198929, 1.1824958324432373, 0.16229192912578583, -0.27667713165283203, -0.7491375207901001, -0.3780207335948944, -0.005382169503718615, -0.26713985204696655, -0.3175641894340515, -0.004873982165008783, 0.4434655904...
def setcustomheaderparameters ( self, headerparameters ) : # parameter should be a dictionary of additional headers # for example # {'origin':'coolsite. com ', #'referer':'coolsite. com'} self. customheaders = headerparameters print ( " custom headers added... " )
[ -0.04237750545144081, -0.3031061291694641, 0.1972072273492813, -0.522686779499054, -0.03839970752596855, 0.635439932346344, -0.17247606813907623, -0.05275232344865799, 0.7334749698638916, 0.3392404317855835, -0.5223409533500671, 1.120639443397522, -1.2555460929870605, 0.4407701790332794, ...
def assertmultilineequal ( first, second, msg = none ) : _ _ tracebackhide _ _ = true if first! = second : message =''. join ( difflib. ndiff ( first. splitlines ( true ), second. splitlines ( true ) ) ) if msg : message + = " : " + msg pytest. fail ( " multi - line strings are unequal : \ n " + message )
[ 0.9048657417297363, -0.3644971251487732, 0.657420814037323, 0.21944138407707214, 0.45790693163871765, 0.3891538381576538, -0.14296449720859528, -0.07183650881052017, 0.07395441085100174, -0.11361737549304962, -0.6942453384399414, 0.4787267744541168, -0.5811981558799744, 1.1308752298355103,...
def int _ to _ time ( seconds ) : return time ( 0, 0, seconds )
[ -0.3884621560573578, -0.16668522357940674, 0.13659650087356567, -0.45006662607192993, -0.1798267960548401, -0.4770257771015167, -1.0518149137496948, -1.2550543546676636, -0.3502447009086609, 1.0553021430969238, -0.846002459526062, -0.8896129727363586, 0.16105741262435913, -0.10073556751012...
def generate _ books _ csv ( file _ name, out _ name = " books _ info. csv " ) : books = [ ] with open ( file _ name, encoding ='utf - 8') as input _ file : csv _ reader = csv. reader ( input _ file ) csv _ reader. _ _ next _ _ ( ) for row in csv _ reader : try : b = get _ book _ by _ isbn ( row [ 1 ] ) except keyerror...
[ -0.4333343505859375, -0.3687914311885834, 0.5035085082054138, 1.5415431261062622, 0.4357640743255615, 0.46441876888275146, 0.19242805242538452, 0.37667950987815857, -0.9489756226539612, 0.03326808661222458, 0.05591457337141037, 0.08277691900730133, 0.3782782554626465, 0.37004542350769043, ...
def check _ common ( self ) : # check evaluation budget if self. extra is none : if self. maxeval < self. design. npts : raise valueerror ( " experimental design is larger than the evaluation budget " ) else : # check the number of unknown extra points if self. extra _ vals is none : # all extra point are unknown nextr...
[ 0.733849287033081, 0.585384726524353, 0.7236208915710449, 0.3054690957069397, 0.3623362183570862, 1.2054073810577393, -0.23571479320526123, 0.37116536498069763, -0.39236119389533997, 0.19806602597236633, 0.5137065052986145, 0.4278312027454376, -0.3230144679546356, 0.46960896253585815, 0....
def getdir ( self, angle ) : self. logger. info ( " input angle is { } ". format ( angle ) ) if angle < 0 : self. logger. error ( " don't know to handle negative value : { } ". format ( angle ) ) return errors [ " bad _ input " ] elif angle > radians ( 360 ) : self. logger. error ( " don't know to handle input larger t...
[ -1.1604812145233154, -0.496631383895874, 0.9828354120254517, -0.6034495234489441, -0.7810157537460327, 0.48052459955215454, 0.5963858962059021, -0.6186380386352539, 0.47644469141960144, -0.20606586337089539, 0.5813648104667664, 0.3275112211704254, 0.19208893179893494, 0.3514461815357208, ...
def execute ( script : str, * * kwargs ) : requirejs = requirejs ( ) required = [ ] try : required = list ( requirejs. libs. keys ( ) ) except nameerror : # require has not been defined yet, allowed pass return execute _ with _ requirements ( script, required = required, * * kwargs )
[ -0.6422434449195862, -0.8072898983955383, 0.7227116823196411, 0.9507443308830261, -0.42164090275764465, -0.7117355465888977, -0.3109337091445923, -0.9648179411888123, 0.3874346613883972, 0.648108720779419, -0.24408282339572906, 0.25203537940979004, -0.2760978043079376, 1.0406447649002075, ...
def maneuver _ from _ named _ bearing ( self, named _ bearing ) : for maneuver in self. maneuvers ( ) : if maneuver. named _ bearing ( ) = = named _ bearing : return maneuver raise valueerror ( " bearing { 0 } not found on dial! ". format ( named _ bearing. name ) )
[ 0.5675009489059448, -0.16766364872455597, 0.329120010137558, 0.008926023729145527, -0.272972971200943, 0.19447660446166992, -0.49635565280914307, -1.5745633840560913, 0.962230384349823, -0.1945885270833969, 0.24163424968719482, 0.27090984582901, -0.6809204816818237, 0.5741594433784485, -...
def linear _ check ( test _ coeff _ in, intervals ) : dim = test _ coeff _ in. ndim coeff _ abs _ sum = np. sum ( np. abs ( test _ coeff _ in ) ) mask = [ ] for interval in intervals : test _ coeff = test _ coeff _ in. copy ( ) a, b = interval # abs _ smallest _ corner = test _ coeff [ tuple ( spot ) ] idx = [ 0 ] * di...
[ 0.16031692922115326, -1.151887059211731, 0.9447969794273376, -0.6222330927848816, 0.10652929544448853, 0.37228649854660034, 0.6304543614387512, -0.25021421909332275, 0.17625585198402405, 0.29805460572242737, -0.36656683683395386, 0.1711190938949585, -0.31129831075668335, -0.228289291262626...
def _ estimate _ weighted _ log _ prob ( self, x ) : n _ samples = x. shape [ 0 ] log _ prob = np. empty ( ( n _ samples, self. n _ components ) ) for k in range ( self. n _ components ) : log _ prob [ :, k ] = self. _ compute _ log _ gaussian _ prob ( x, self. means _ [ k ], self. covariances _ [ k ] ) return self. we...
[ 0.23481987416744232, -0.014142542146146297, 0.7645788192749023, -0.09732634574174881, -0.4761600196361542, 0.07592567801475525, -0.6789696216583252, -0.5699440240859985, -0.17242197692394257, 1.46786630153656, -0.10735484957695007, 0.17747433483600616, -0.6095487475395203, 0.04352613911032...
def _ assemble _ time _ tensor ( steps _ per _ example, max _ num _ steps, ignore _ division _ by _ num _ steps : bool = false ) : x _ time = torch. arange ( 1, max _ num _ steps + 1, dtype = steps _ per _ example. dtype, device = steps _ per _ example. device ) x _ time = torch. unsqueeze ( x _ time, dim = - 1 ) x _ t...
[ 0.4495389759540558, 0.6136583685874939, 0.4788023829460144, 0.10995686799287796, -0.3105457127094269, 0.11165593564510345, 0.38472601771354675, 0.5918522477149963, -0.8807019591331482, 1.1100937128067017, 0.04990443214774132, -0.8056303858757019, 0.6377671957015991, -0.5625566840171814, ...
def test _ atomic _ qname _ length _ nistxml _ sv _ iv _ atomic _ qname _ length _ 1 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / qname / schema + instance / nistschema - sv - iv - atomic - qname - length - 1. xsd ", instance = " nistdata / atomic / qname / schema + ...
[ 0.11367260664701462, -0.3355964720249176, 0.35694530606269836, -0.01629805378615856, -0.30266907811164856, 0.2709137499332428, -0.10697110742330551, -0.19357846677303314, 0.6579883694648743, 0.6929486989974976, -0.43943873047828674, -0.38073527812957764, 0.040272410959005356, 0.03940470144...
def get _ field _ link ( context, field, obj = none ) : view = context ['view'] return view. lookup _ field _ link ( context, field, obj )
[ -0.676237940788269, 0.4321484863758087, 0.40663057565689087, -0.14500267803668976, 0.5830377340316772, -0.015345354564487934, 0.5453634858131409, -0.22353340685367584, 0.7053983807563782, -1.070868730545044, -0.12001403421163559, 1.0086958408355713, 0.14659453928470612, -0.8220076560974121...
def deserialize ( value : influxdatatypes ) - > any : return value
[ 0.18637879192829132, -0.18624451756477356, 0.1284034550189972, -0.1748049110174179, -0.2178104668855667, 0.05562359094619751, -0.04362174868583679, -0.7690774202346802, 0.39859431982040405, -1.4725351333618164, -0.9172329902648926, 0.04718660190701485, 0.13691496849060059, -0.9666768908500...
def get _ migration ( app, name ) : try : module = _ _ import _ _ ( app. _ _ name _ _ + ". " + name,'','', ['migration'] ) migclass = module. migration migclass. orm = lazyfakeorm ( migclass, get _ app _ name ( app ) ) module. _ = lambda x : x # fake i18n module. datetime = datetime return migclass except importerror :...
[ -0.06029824912548065, 0.2263416200876236, 0.5405362248420715, 0.09002358466386795, 0.054886575788259506, -0.09346165508031845, -1.186943769454956, -0.9216437935829163, 0.5622491240501404, 0.6524792909622192, -0.4780505895614624, 0.15210780501365662, 0.27758488059043884, -0.1288610547780990...
def metric ( x, y ) : return la. norm ( x - y )
[ 1.2623367309570312, -0.21791279315948486, 0.30325618386268616, -0.3115784525871277, -1.2678701877593994, 0.7035868167877197, -0.7315439581871033, -0.6813074946403503, -0.7220980525016785, 0.9612373113632202, 1.0821980237960815, 0.581936776638031, 1.2634059190750122, -0.6826089024543762, ...
def isblot ( self ) : return self. blot
[ 0.4025568664073944, 0.11925141513347626, 0.5771487951278687, 0.4855839014053345, -0.019742168486118317, 0.5957775712013245, 0.06703735888004303, -0.6427825093269348, 0.5653831958770752, 0.03673931211233139, 0.022391589358448982, 1.5365873575210571, -1.499653697013855, -0.03795991092920303,...
def test _ atomic _ qname _ pattern _ 1 _ nistxml _ sv _ iv _ atomic _ qname _ pattern _ 2 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / qname / schema + instance / nistschema - sv - iv - atomic - qname - pattern - 2. xsd ", instance = " nistdata / atomic / qname / sc...
[ -0.14110822975635529, -0.9008350968360901, 0.5350515246391296, 0.43151620030403137, -0.5380547046661377, 0.2701176404953003, -0.2524491250514984, -0.6214327216148376, -0.3353767991065979, 0.33363422751426697, -0.500852644443512, 0.2823893129825592, 0.5240314602851868, -0.017293278127908707...
def draw ( self ) : # plot window self. plot = plot ( ax = none, makeinteractive = true, figsize = ( 14, 8 ), title ='grain inspector') # buttons self. plot. addbutton ('save \ nline ', self. saveline, ( 0. 73, 0. 48, 0. 05, 0. 04 ) ) self. plot. addbutton ('previous \ ngrain ', lambda e, p : self. gotograin ( self. gr...
[ 1.2441924810409546, 0.4676910936832428, 0.9748348593711853, -0.39577123522758484, -0.10411695390939713, 0.4679660201072693, 1.1498347520828247, -0.32473957538604736, -0.5249813199043274, -0.8407017588615417, -0.137434720993042, 0.6751717329025269, -0.0455780029296875, 0.5459340810775757, ...
def parent _ step ( self, name ) : name _ tokens = self. _ record _ step _ name ( name ) try : step _ data = stepdata ( name _ tokens, executionresult ( retcode = 0 ) ) # todo ( iannucci ) : use'|'instead of '.'presentation = steppresentation ( '. '. join ( name _ tokens ) ) self. _ step _ stack [ - 1 ]. children _ pre...
[ -0.1112041026353836, -0.3032831847667694, 0.7237575650215149, 0.03360739350318909, -0.753069281578064, -0.24954137206077576, 0.13498027622699738, -0.64400714635849, -0.6040642857551575, -0.11147762089967728, -0.44385668635368347, -0.027667304500937462, -0.11149097979068756, 0.6326519846916...
def delete _ rules ( switch, pattern, priority ) : inst. stats. tally _ delete ( switch ) if not experiment : inst. send _ flow _ command ( switch, openflow. ofpfc _ delete _ strict, pattern, priority ) return
[ 0.7596321702003479, 0.4260573387145996, 0.46759217977523804, -0.09187182784080505, 1.2574843168258667, -0.15044808387756348, 0.469413697719574, 0.15812520682811737, 0.7699532508850098, -0.4932471215724945, 0.49828040599823, -0.012994569726288319, -0.5205312371253967, -0.011745929718017578,...
def test _ tmgenoperations ( ) : space. tmgen. init ( ) # create tm packet without tm parameters tmpacket = space. if. s _ tmpacketgenerator. gettmpacket ( spid = testdata. tm _ packet _ 03 _ spid, parametervalues = [ ], datafield = none, segmentationflags = ccsds. packet. unsegmented, obtutc = 0. 0, reuse = true ) pri...
[ -0.048297785222530365, 0.19459505379199982, 0.8205075263977051, -0.874424934387207, 0.05098497495055199, 0.1441192328929901, 0.26574864983558655, -0.2835851311683655, -0.31613144278526306, -0.5624561309814453, -0.6528886556625366, -0.4244250953197479, -0.675389289855957, 0.417490154504776,...
def set _ state ( self, value ) : self. state = value logging. debug ( " user's state received " )
[ -0.19451798498630524, 0.2651078402996063, 0.22600822150707245, -0.21277210116386414, -0.3696862459182739, 0.4386349320411682, 0.21557791531085968, 0.017920490354299545, 0.11229290068149567, 0.06080899387598038, -1.0627840757369995, 0.18011875450611115, -0.07831676304340363, 0.3910528421401...
def img2img _ transformer _ b3 ( ) : hparams = img2img _ transformer _ base ( ) hparams. batch _ size = 2 hparams. layer _ preprocess _ sequence = " none " hparams. layer _ postprocess _ sequence = " dan " hparams. block _ length = 128 hparams. sampling _ temp = 0. 9 return hparams
[ -0.1550072580575943, -0.25048765540122986, 0.5266217589378357, 0.10004256665706635, -0.03863636404275894, -0.507525622844696, 0.07769083231687546, 0.6698659658432007, -0.6755723357200623, 0.4598936140537262, -0.6590123176574707, 0.07962425798177719, -0.011657233349978924, 0.781596004962921...
def test _ atomic _ language _ max _ length _ nistxml _ sv _ iv _ atomic _ language _ max _ length _ 1 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / language / schema + instance / nistschema - sv - iv - atomic - language - maxlength - 1. xsd ", instance = " nistdata /...
[ 0.3493862748146057, -0.17848818004131317, 0.19891943037509918, 0.6450155377388, -0.8266283869743347, 0.22592554986476898, 0.15602177381515503, -0.03256693109869957, 0.28312426805496216, 0.9174730181694031, -0.5582947731018066, -0.21566644310951233, -0.16774176061153412, 0.35390883684158325...
def deploy _ env ( self ) : deploy _ task = self. env. deploy _ changes ( ) wait ( lambda : is _ task _ ready ( deploy _ task ), timeout _ seconds = 60 * self. timeout _ for _ deploy, sleep _ seconds = 60, waiting _ for ='changes to be deployed')
[ -0.3871803283691406, -0.2261214256286621, 0.4434555470943451, -0.32003918290138245, 0.20787014067173004, 0.20286007225513458, 0.0677977204322815, 0.6166872382164001, -0.7768489718437195, 1.206211805343628, -0.20503894984722137, 0.9587368965148926, 0.5992303490638733, 0.7899124622344971, ...
def _ _ init _ _ ( self, elements : sequence [ union [ datasource, datasink ] ], transformers : iterable [ datatransformer ] = none ) - > none : if not elements : raise valueerror ( " elements must be a non - empty sequence of datasources and datasinks " ) if transformers is none : transformers = set ( ) sources = set ...
[ -1.3234261274337769, 0.4212736189365387, 0.3899233341217041, -0.8160148859024048, -0.007267169654369354, -1.066260576248169, 0.6882202625274658, -0.061859287321567535, 0.7587544322013855, -0.08582641929388046, -1.0203067064285278, 0.4633398652076721, -0.18579140305519104, -0.11273542046546...
def _ setcontractedbraille ( event ) : braille. setcontractedbraille ( event )
[ 1.2377943992614746, -1.1687158346176147, 0.28998667001724243, 0.2896360158920288, 0.8887779712677002, 0.7522366046905518, 1.4701176881790161, 0.46822383999824524, -0.4138719439506531, 0.67253178358078, -1.2421132326126099, -0.3323698341846466, -0.29829683899879456, 0.47259312868118286, 0...