text
stringlengths
25
2.19k
embedding
listlengths
768
768
async def update _ operation ( self, operation : operation ) - > mythicresponse : if operation. id is none : resp = await self. get _ operation ( operation ) if resp. status = = " error " : raise exception ( " failed to get _ operation in update _ operation " ) operation. id = resp. response. id url = " { } { } : { } /...
[ -1.3245482444763184, -0.5661166906356812, 0.9723837375640869, -0.0427427664399147, 0.21116098761558533, -0.7762002944946289, 0.4212842285633087, 0.09908616542816162, 1.1435878276824951, 0.8159283995628357, -0.5134506821632385, -0.1703103482723236, -0.5291064381599426, -1.0249555110931396, ...
def unit _ of _ measurement ( self ) : return'aqi '
[ -0.09413854032754898, -0.03905460983514786, 0.5345525741577148, -0.8242711424827576, 0.7472196221351624, 0.40540868043899536, -0.2675175368785858, 0.0580906867980957, 1.1065953969955444, -0.1273074448108673, 0.7133306264877319, 0.061800289899110794, 0.4543346166610718, 0.03957045078277588,...
def create _ histograms _ from _ pickled _ file ( filepath, outfile, title, buckets = 20, rmin = none, rmax = none ) : intervals _ by _ thread _ dict = cpickle. load ( open ( filepath,'r') ) if skip _ admin _ thread _ one : del intervals _ by _ thread _ dict [ 1 ] all _ intervals = intervals _ by _ thread _ dict. value...
[ 1.1244341135025024, 0.346700519323349, 0.6816806197166443, 0.07769572734832764, 0.06119808554649353, 0.34339335560798645, 0.6351810693740845, -0.04185224696993828, -0.1581873893737793, -0.19127847254276276, 0.08979973196983337, 0.17769309878349304, -0.32653293013572693, -0.0911110863089561...
def process _ frame ( self, frame _ num, frame _ img ) : # type : ( int, np. ndarray ) - > list [ int ] cut _ list = [ ] metric _ keys = self. _ metric _ keys _ unused ='' if self. last _ frame is not none : # change in average of hsv ( hsv ), ( h ) ue only, ( s ) aturation only, ( l ) uminance only. delta _ hsv _ avg,...
[ -0.18549637496471405, 0.025136534124612808, 1.0484709739685059, 0.276591956615448, 0.540682315826416, -0.7950122952461243, 0.6230219602584839, -0.2575559616088867, 0.6540554165840149, 0.6421201229095459, 0.752710223197937, 0.7161306738853455, 0.2587358057498932, 0.9194421172142029, 0.564...
def calculate _ reward ( category, i _ episode, update ) : prefix ='{ } _ episode _ { : 04d } _ update _ { : 03d } '. format ( category, i _ episode, update ) rl _ file = join ( classifier _ root,'fixed _ set _ acc _ rl _ { }. p '. format ( prefix ) ) rl _ acc = pickle. load ( open ( rl _ file,'rb') ) return rl _ acc
[ 0.5217075943946838, -0.87349534034729, 0.4530279338359833, -0.7061784267425537, -0.20029035210609436, -0.5912858843803406, 0.13708391785621643, 0.1733061820268631, -0.09867215156555176, 1.493877649307251, -0.05800757184624672, 0.07908792048692703, -0.049314409494400024, -0.8876858949661255...
def fraction ( nb ) : try : if nb = = 0 : return " 0 " if float ( nb ). is _ integer ( ) = = true : return str ( nb ) for den in range ( 1, 10 ) : for num in range ( 1, den * 2 ) : if nb = = num / den : return str ( num ) + " / " + str ( den ) if nb = = num / den * ( - 1 ) : return'-'+ str ( num ) +'/'+ str ( den ) ret...
[ -0.1460411697626114, 0.590837299823761, 0.650280237197876, 0.14248141646385193, -0.12643492221832275, 0.03760509565472603, 0.4760293662548065, -0.6891213059425354, 0.25390711426734924, -0.5860888361930847, 1.3623454570770264, -1.336632251739502, -0.04505128413438797, 0.8159088492393494, ...
def update ( self, state : fieldbase, t : float ) : if self. proc. is _ alive ( ) : try : data = ( state. _ get _ napari _ data ( ), t ) self. data _ channel. put ( ( " update ", data ), block = false ) except queue. full : pass # could not write data else : try : self. data _ channel. get ( block = false ) except queu...
[ -0.2806503176689148, -0.28896138072013855, 0.7100831866264343, -0.43481022119522095, 0.7486640810966492, 0.5667026042938232, -0.8256493806838989, -1.397537350654602, -0.6123405694961548, 0.39345014095306396, -0.5229573249816895, -0.16886083781719208, 0.03304705023765564, 0.2660686671733856...
def ravel ( self ) : return self. reshape ( self. size )
[ 0.7627400159835815, 0.1942588984966278, 0.3417847454547882, -1.1715413331985474, 0.3614446818828583, -0.352449893951416, -0.33456242084503174, 0.24170809984207153, 0.8137934803962708, -0.7374172210693359, -0.4495352506637573, -0.3513454496860504, 0.025913702324032784, -1.340681552886963, ...
def remove _ object ( object _ name ) : minio _ client. remove _ object ( bucket _ name = bucket _ name, object _ name = object _ name, )
[ 0.21842043101787567, -0.8629980683326721, 0.4603523015975952, -0.16899806261062622, -0.8393698334693909, 0.009353113360702991, 0.11886373162269592, 0.426177442073822, 0.36599016189575195, 0.4097999930381775, -1.8752182722091675, 0.227659672498703, -0.1427258849143982, -1.2882771492004395, ...
def test _ create _ even _ stage ( self ) : even _ stage = self. long _ future. create _ even _ stage ( ) self. method _ test _ create _ stage ( stage = even _ stage, name ='even ', expression ='{ price _ a } = = { current _ price } ', detail = {'price _ a': 480. 00,'amount _ a': 0. 0,'price _ b': 0. 0,'amount _ b': 0....
[ -0.4442915916442871, -0.27268216013908386, 0.6893565654754639, -0.16110870242118835, 0.5414949059486389, 0.720022976398468, 0.10139810293912888, -0.054893285036087036, -0.617485761642456, -0.08910088241100311, -0.8075750470161438, -0.0617968812584877, 0.05914124473929405, 1.069364786148071...
def is _ open ( self ) : try : return " in " in self. browser. classes ( self ) except nosuchelementexception : return false
[ -1.619036316871643, -0.2846735119819641, 0.6577740907669067, 0.9870206713676453, -0.08214814960956573, 0.8671324849128723, -0.11066726595163345, 0.9168998003005981, 0.7414794564247131, -0.6568698287010193, 0.4457865059375763, -0.28148865699768066, -0.8625706434249878, 0.6770948767662048, ...
def property _ to _ byte _ list ( self, property _ name : str, chunk _ size : int ) : byte _ str = getattr ( self, property _ name, b " " ) value = [ byte _ str [ i : i + chunk _ size ] for i in range ( 0, len ( byte _ str ), chunk _ size ) ] setattr ( self, property _ name, value )
[ -0.13115902245044708, -0.3947066366672516, 0.6694379448890686, -0.6734015941619873, 0.29382142424583435, -0.40419676899909973, -0.9023309946060181, 0.5440701842308044, 0.1695794016122818, 0.7714807391166687, -0.857094943523407, 0.2866290509700775, 0.24067820608615875, -0.5298179388046265, ...
def movie _ from _ frames ( filename, folder, fps, digits = 6 ) : s = " % " + " % 02d " % digits + " d. png " return [ " ffmpeg ", " - y ", " - f ", " image2 ", " - r ", " % d " % fps, " - i ", os. path. join ( folder, folder ) +'/'+ s, " - b ", " % dk " % bitrate, " - r ", " % d " % self. fps, filename ]
[ -0.6903665065765381, 0.04166091978549957, 0.6738473176956177, 0.3813970983028412, -0.16975384950637817, -0.5510019063949585, -0.2578515410423279, 0.19268083572387695, -0.05221308767795563, 0.22360028326511383, -0.1933366060256958, -0.013284191489219666, 0.5890439748764038, 1.33568465709686...
def google _ dns _ resolver ( target ) : url = f " https : / / dns. google / resolve? name = { target } & type = a " r = requests. get ( url = url ) if r. status _ code! = 200 : return none else : for result in json. loads ( r. text ) [ " answer " ] : try : if not ( ipaddress. ipv4address ( result [ " data " ] ). is _ ...
[ -1.4299029111862183, 0.3663542568683624, 0.7018945217132568, -0.7778650522232056, -0.22034302353858948, -0.6705093383789062, -0.8565548658370972, -0.8530969023704529, 0.20659704506397247, -0.2326657474040985, -0.18398858606815338, 0.8102847337722778, -0.6123450398445129, 0.1072901487350463...
def compute _ a _ parameter ( ago _ removed : int, current _ removed : int, current _ infected : int ) - > float : d _ removed = current _ removed - ago _ removed return d _ removed * ( 1 / ( current _ removed * current _ infected ) )
[ -0.052244823426008224, -0.2730776071548462, 0.4684383273124695, -0.6848381757736206, -0.18186119198799133, -0.08431170135736465, 0.3642653524875641, 0.6056402325630188, -0.04885466396808624, 0.9047198295593262, 1.2513535022735596, 0.9409862160682678, -0.45251595973968506, -0.07775791734457...
def oss _ size ( self ) - > pulumi. output [ str ] : return pulumi. get ( self, " oss _ size " )
[ 0.35484039783477783, 0.4084487855434418, 0.5463303327560425, 0.1495787799358368, -0.21800711750984192, 0.7242589592933655, 0.25195279717445374, 0.022259661927819252, 0.323959082365036, -0.6600989103317261, 0.32102248072624207, 0.1179669201374054, 0.15244203805923462, -1.0523349046707153, ...
def is _ document _ available ( self, document _ tuple ) : self. current _ working _ document _ filepath = none if document _ tuple. filedirectory : document _ html _ filepath = os. path. join ( self. cwd, " { } / { }. html ". format ( document _ tuple. filedirectory, document _ tuple. documentid ) ) if os. path. exist...
[ -1.0582647323608398, -0.32914718985557556, 0.8215949535369873, -0.5512725114822388, -0.34155791997909546, 0.45449748635292053, 1.103131651878357, -0.10608099400997162, -0.3745066225528717, 0.8369714021682739, 1.0512323379516602, -0.30160900950431824, -0.8880708813667297, -0.030404215678572...
def _ validate ( self ) : if self. start > self. end : raise invalidhgvsname ( reason = " coordinates are nonincreasing " )
[ -0.07794222235679626, 0.33204853534698486, 0.4461974501609802, -0.24024200439453125, -0.39046040177345276, 1.0485299825668335, -0.6639156341552734, -0.9937146902084351, -0.910413384437561, -1.0155830383300781, 0.672870397567749, -0.3210075795650482, -0.12313107401132584, 0.0748254209756851...
def load ( self, filepath ) : saved = { } with open ( filepath, " r + " ) as file : saved = json. load ( reduce ( lambda x, y : x + " \ n " + y, file. readlines ) ) self. _ actionlist = saved ['actionlist']
[ -0.7693973183631897, -0.7907339334487915, 0.383585125207901, -0.614803671836853, 0.26827913522720337, -0.44107985496520996, -0.04708256945014, 0.33109477162361145, -0.25446707010269165, 0.8445045351982117, -1.3606449365615845, 0.11144877225160599, 0.3744451105594635, -0.02994106151163578, ...
def changepassword ( self, name, password ) : with self. con : self. cur. execute ( " update users " " set password ='" + password + "'" " where name ='" + name + "'; " )
[ -0.5574902296066284, -0.8786309361457825, 0.41322267055511475, 0.4007672071456909, -0.5570856928825378, -0.05746287852525711, -0.921947717666626, 0.3058494031429291, -0.8069593906402588, 1.915356993675232, -0.4084227383136749, 0.7476988434791565, -0.5918498635292053, -0.17332269251346588, ...
def image _ getter ( self, item ) : try : image _ node = self. browser. element ( '. / span [ contains ( @ class, " node - image " ) or contains ( @ class, " node - icon " ) ] ', parent = item, ) except nosuchelementexception : self. logger. warning ( " no image tag found " ) return none style = self. browser. get _ at...
[ -1.168668270111084, 0.03732407093048096, 0.6389275789260864, 0.6451142430305481, 0.2717709541320801, -0.6922605037689209, 0.5238779783248901, -0.9805590510368347, 0.6742895245552063, 0.3205772340297699, 0.7268673181533813, -0.05513541027903557, 0.5563542246818542, 0.5931182503700256, 0.6...
def metric _ line ( tpl ) : line =''. join ( tpl ) return is _ metric _ line ( line ) and line
[ 0.9533973932266235, 0.5044221878051758, 0.33249199390411377, 0.3370833992958069, -0.10449954867362976, 1.0609099864959717, -0.26565518975257874, -0.30863744020462036, -0.9632114171981812, 0.4911966919898987, 0.4252544343471527, -1.0569599866867065, -0.32176464796066284, -0.0937234833836555...
def box ( * * named ) : return _ newnode ( geometry. vpbox, named )
[ -0.011836412362754345, 1.1074737310409546, 0.3806283473968506, 0.23636804521083832, -0.9728582501411438, 0.13956081867218018, -0.34739890694618225, -0.9580785036087036, -0.21455128490924835, -0.44615909457206726, -1.0802695751190186, 0.28903552889823914, -0.27789270877838135, -0.9277581572...
def check _ rbl _ accreditor ( self, msg, zone _ set, rbl _ server, subtest, accreditor, target = none ) : tags = [ ] try : tags. append ( accreditor _ re. search ( msg. sender _ address ). groups ( ) [ 0 ] ) except ( attributeerror, indexerror ) : pass for header in msg. get _ decoded _ header ( " accreditor " ) : try...
[ 0.23853184282779694, 0.011443611234426498, 0.5666317939758301, 0.16955937445163727, -0.27886009216308594, -0.4082096517086029, -0.09485328197479248, -0.13445770740509033, -0.057044483721256256, 0.3522811830043793, 0.5900624990463257, 0.7184323072433472, -0.44709938764572144, 1.445976018905...
def update _ pipeline ( self ) : raise notimplementederror
[ -0.7054459452629089, -1.2366317510604858, 0.2996601462364197, -0.11756651848554611, -0.5369691252708435, 0.5163165330886841, -0.33538347482681274, 0.24351990222930908, -0.7260428667068481, 0.40006566047668457, 0.009056456387043, 0.6043250560760498, 0.39950644969940186, 0.0933472216129303, ...
def twitter _ setup ( ) : # authentication and access using keys : auth = tweepy. oauthhandler ( consumer _ key, consumer _ secret ) auth. set _ access _ token ( access _ token, access _ secret ) # return api with authentication : api = tweepy. api ( auth ) return api
[ -0.30073580145835876, -1.0363034009933472, 0.5247684121131897, -0.42871910333633423, 0.45235732197761536, -0.6578041315078735, -0.4832797944545746, -0.1782991886138916, -0.2538495361804962, 0.6820632219314575, -0.5689683556556702, 0.4539167881011963, 0.4102749228477478, 0.2760407328605652,...
def _ _ init _ _ ( self, chain _ size = 1, tick _ size = 0. 0001 ) : self. blockchain = blockchain ( ) self. bids = book ( ) self. asks = book ( ) self. chain _ size = chain _ size self. tick _ size = tick _ size
[ 0.48800504207611084, 0.1897515505552292, 0.5824560523033142, 0.9940125942230225, 0.5207194685935974, -0.0570409893989563, -0.24823683500289917, -0.2520609200000763, -0.529619038105011, -0.2630526125431061, -0.4668327569961548, 0.5927594304084778, -0.7350166440010071, 0.730699360370636, 0...
def rotation _ 180 ( self ) : if self. config. displayorientation = = win32con. dmdo _ 90 or \ self. config. displayorientation = = win32con. dmdo _ 270 : self. swap _ pels ( ) self. config. displayorientation = win32con. dmdo _ 180 self. apply _ config ( )
[ -0.910675585269928, 0.3487285375595093, 0.5909721851348877, -0.6560735106468201, -0.5898162722587585, 0.5539627075195312, 1.1647614240646362, -0.2828853726387024, 0.4536411464214325, 0.49926453828811646, -0.07108708471059799, 0.15786956250667572, -0.52625972032547, 0.604189932346344, 1.2...
def get _ datastores ( self, uuid = none, market ='market ', * * kwargs ) : return self. get _ entities ('storage ', uuid = uuid, market = market, * * kwargs )
[ -0.556992769241333, 0.9181783199310303, 0.14472012221813202, 0.8702473044395447, 0.5383142828941345, -0.5252187252044678, -0.5878476500511169, -0.1215623989701271, -0.18494340777397156, -0.09404055029153824, -0.07438673079013824, 0.2812938988208771, -0.6537483930587769, -0.6939026713371277...
def test _ onsite _ score ( my _ team ) : score = onsite _ score ( my _ team ) assert set ( score. keys ( ) ) = = set ( range ( 5 ) ) for v in score. values ( ) : assert 0. < = v < = 1.
[ -0.029709016904234886, -0.12513619661331177, 0.12140993773937225, 0.4510934054851532, 0.5607333779335022, 0.20402616262435913, 0.5167489647865295, -1.134200096130371, 0.08003617823123932, 0.4028767943382263, -0.6572380661964417, -0.9118860960006714, -0.5306478142738342, 0.364618182182312, ...
def show _ stats ( self, display, position ) : # display the spacecraft stats indicators indicators = [ " spacecraft ", " velocity : ", " angle : " ] for i in range ( len ( indicators ) ) : current _ ind = indicators [ i ] draw _ text ( display, current _ ind, ( position [ 0 ], position [ 1 ] + i * 30 ), font _ small, ...
[ 0.6283726096153259, 0.1814301460981369, 0.6414453387260437, -1.0666767358779907, -0.8055838346481323, 0.05287787318229675, -0.1789858192205429, -0.4700716435909271, 0.6283963322639465, 0.3223891854286194, 0.3504054844379425, 0.4747234582901001, -0.23785607516765594, 0.8193302750587463, 0...
def _ qt _ theme _ hint ( self ) : # # to determine what kind of qt based theme ida is using, we create a # test widget and check the colors put into the palette the widget # inherits from the application ( eg, ida ). # test _ widget = qtwidgets. qwidget ( ) # # in order to'realize'the palette used to render ( draw ) t...
[ 0.49251502752304077, -0.07741115242242813, 0.6190037727355957, -1.597865104675293, -0.7430605888366699, 0.4863230884075165, 0.23147715628147125, -0.40797901153564453, 0.5682899951934814, 0.407758504152298, 0.3462376892566681, -0.1282183974981308, -0.6207752227783203, 0.4494095742702484, ...
def test _ singletimetiffpathprocessor _ process _ invalid ( self ) : pp = self. config. path _ processor _ class pp. setup ( self. config. get _ path _ processor _ params ( ) ) with self. assertraises ( indexerror ) : pp. process ( 1, 0, 0, 0 ) with self. assertraises ( indexerror ) : pp. process ( 0, 1, 0, 0 ) with s...
[ -0.16838964819908142, 0.22571958601474762, 0.4148177206516266, 0.1784953624010086, 0.36076024174690247, 0.7996014356613159, 0.9250525236129761, 0.09592492878437042, 0.04146746173501015, 0.2504637837409973, 0.04463596269488335, -0.4778870940208435, -0.45560941100120544, 0.613446831703186, ...
def website _ in _ account ( website : str, keys : keysview [ userhandle ], lookup : dict [ userhandle, str ], threshold : int, ) - > tuple [ str, optional [ str ] ] : result = t. pipe ( keys, t. map ( lambda x : ( x, lookup. get ( x ) ) ), # get websites of candidates ( if existing ) t. filter ( lambda x : x [ 1 ] is ...
[ -0.36526453495025635, 0.35105255246162415, 0.32980552315711975, 0.06515912711620331, -0.6311696171760559, -0.759564995765686, 0.5749251842498779, 0.4448629319667816, 0.43782880902290344, 0.38202640414237976, -0.7490997314453125, 0.5849440097808838, 0.2242751270532608, 0.18212155997753143, ...
def newlistener ( image _ callback, subname = sub _ name ) : global _ nodeexists if not _ nodeexists : raise standarderror ( " node nije stvoren " ) rospy. subscriber ( subname, image, image _ callback )
[ 0.5359176397323608, -0.5392148494720459, 0.37482526898384094, 0.2858727276325226, -0.116761714220047, -0.1530427634716034, -0.2493201494216919, 0.04617316648364067, -0.438750296831131, 0.04529760777950287, -0.2738775908946991, 0.5898838043212891, 0.3722967207431793, 1.0074620246887207, 0...
def dispatch ( self, event ) : if event. src _ path. endswith ( ". json " ) : super ( filechangehandler, self ). dispatch ( event )
[ 0.29079440236091614, 0.013089174404740334, 0.784635066986084, 0.3889949917793274, -0.020548153668642044, 0.21306976675987244, 0.37621134519577026, 0.14147457480430603, -0.07411062717437744, 0.05500271916389465, -0.7931062579154968, 0.0674927681684494, 0.7219624519348145, 1.323534607887268,...
def gettimep ( self, time _ mesh, f ) : projected _ time _ grid = f. _ tloc ( self. projfield ) return time _ mesh. get _ interpolation _ matrix ( self. times, projected _ time _ grid )
[ 0.017415126785635948, 0.4549942910671234, 0.5503082871437073, 0.22237566113471985, 0.3392329812049866, 0.21182358264923096, -0.2218163013458252, 0.006945937871932983, -0.8305902481079102, 1.3121576309204102, 0.5084307789802551, -0.9483803510665894, -0.5098487734794617, 0.0306673813611269, ...
def test _ cancel _ block _ paid _ does _ not _ create _ transfer _ block ( self ) : self. assertfalse ( block. objects. exists ( ) ) event = baker. make _ recipe ('booking. future _ pc ', cost = 10 ) # block paidtest _ cancel _ unpaid _ booking block = baker. make _ recipe ('booking. block ', block _ type _ _ event _ ...
[ 0.9965122938156128, 0.6597004532814026, 0.6712756156921387, 1.1303030252456665, -0.17434468865394592, 1.7094531059265137, 0.06785055249929428, -0.002374890260398388, -0.18367022275924683, -0.36161085963249207, -0.3877030313014984, -0.6102882027626038, -0.3311884105205536, 1.021088123321533...
def optionxform ( self, optionstr ) : return optionstr
[ -0.7428041696548462, -0.6012350916862488, 0.1810716837644577, 0.029212700203061104, -0.2437582015991211, 0.09032709151506424, 0.1153864860534668, -0.29557937383651733, 1.1432793140411377, -0.46767133474349976, 0.3363485336303711, -0.2872956097126007, -0.2527698874473572, -0.325321197509765...
def test _ multiplication _ vector _ by _ scalar ( self ) : vector = self. vector * 3 self. assertequals ( vector, [ 3. 0, 6. 0, 9. 0 ] ) vector = self. vector * 0 self. assertequals ( vector, [ 0. 0, 0. 0, 0. 0 ] ) vector = self. vector * - 1 self. assertequals ( vector, [ - 1. 0, - 2. 0, - 3. 0 ] ) self. assertraises...
[ -0.42629775404930115, -0.09241237491369247, 0.6871930360794067, 0.8564985990524292, 0.5028452277183533, 0.7446677684783936, 0.5924590826034546, -0.3403988182544708, 0.5944118499755859, -0.0992007628083229, -0.4560534358024597, -0.203434556722641, 0.15765094757080078, 0.6972456574440002, ...
def create _ dummy _ computation _ lambda _ identity ( ) : type _ spec = tf. float32 value = computation _ factory. create _ lambda _ identity ( type _ spec ) type _ signature = computation _ types. functiontype ( type _ spec, type _ spec ) return value, type _ signature
[ -0.08121926337480545, -0.16156181693077087, 0.5429566502571106, -0.4572170376777649, 1.4509613513946533, 0.7146275639533997, 0.4363325536251068, -0.5309077501296997, -0.6661801338195801, -0.21423830091953278, -1.4525171518325806, 0.3196268379688263, 0.47665753960609436, 0.40682801604270935...
def connect ( self, username, password ) : pass
[ -0.9319436550140381, -0.9516909718513489, 0.2359970360994339, 0.9601922035217285, -0.09989240020513535, 0.3113086223602295, -0.3296436369419098, 0.2287190705537796, -1.1994580030441284, 0.04737531766295433, -0.586173951625824, -0.036402929574251175, -0.39604827761650085, -0.237765178084373...
def get _ bounding _ boxes ( self, img ) : imgmod = self. compute _ exgexr _ img ( img ) imgmod = self. apply _ threshold ( imgmod ) imgmod = self. apply _ erosion _ and _ dilatation ( imgmod ) imgmod = imgmod. astype ('uint8') contours, _ = cv2. findcontours ( imgmod. copy ( ), cv2. retr _ external, cv2. chain _ appro...
[ -0.7026593685150146, -0.11211193352937698, 0.8309459090232849, 1.3885071277618408, -0.6204633116722107, -0.8893608450889587, 0.16025108098983765, 0.4022258520126343, 0.7868263721466064, -0.12292598187923431, -0.7281922101974487, -0.6768775582313538, 0.20246779918670654, 0.9845452308654785,...
def trace _ n ( bbs, state, nsteps, rand, filt ) : # type : ( program, state, int, randf, choicef ) - > tuple [ list [ trace ], list [ trace ] ] active _ traces = [ [ state ] ] inactive _ traces = [ ] for step in xrange ( nsteps ) : new _ traces = [ ] for t in active _ traces : new _ states = list ( interp _ one ( bbs,...
[ 0.14545142650604248, 0.24996913969516754, 0.7064220309257507, 0.3317999839782715, -0.05277117341756821, 0.11660777032375336, 0.2588077187538147, -0.13597652316093445, 0.3407132029533386, 0.6839330792427063, -0.7992680668830872, -0.2695007920265198, -0.6035065054893494, 0.9366058707237244, ...
def ensure _ correct _ plot ( function _ name, report = main _ report, * * kwargs ) : ensure _ function _ call ( function _ name, * * kwargs ) as _ code = report. format. python _ expression for name, description in plot _ label. items ( ) : if name = = function _ name : continue prevent _ function _ call ( name, * * k...
[ 1.30205500125885, 0.6982454061508179, 0.42938682436943054, 0.12716253101825714, 0.08032068610191345, 0.38573718070983887, -0.19025768339633942, -0.4415539801120758, -0.6902442574501038, 0.005489754024893045, 0.5087811350822449, 0.47952359914779663, -0.2599013149738312, -0.08013968914747238...
def delete _ property ( cls, listing ) : delete _ from _ index ( listing. id ) # delete property in elasticsearch index db. session. delete ( listing ) db. session. commit ( )
[ -0.4527195990085602, -0.16087618470191956, 0.1805848479270935, 0.6139178276062012, 0.592440128326416, -0.3206857442855835, -0.40207791328430176, 1.4880189895629883, 0.9432447552680969, 0.7680397033691406, 0.47046104073524475, -0.014473875053226948, -0.41432562470436096, -1.0772342681884766...
def test _ generated _ note _ to _ pure _ activity ( self, * _ ) : status = models. generatednote. objects. create ( content = " test content ", user = self. local _ user ) status. mention _ books. set ( [ self. book ] ) status. mention _ users. set ( [ self. local _ user ] ) activity = status. to _ activity ( pure = t...
[ -0.21026721596717834, -0.8792656660079956, 0.580984354019165, -0.32229354977607727, 0.7826470136642456, 0.7239292860031128, 0.6790889501571655, -0.3907691538333893, 0.1763763427734375, -0.21782003343105316, -0.5660661458969116, 0.6425291299819946, -0.1803668588399887, -0.5497874021530151, ...
def modificar ( self, objeto ) : if objeto in self. lista _ general : pos = self. lista _ general. index ( objeto ) self. lista _ general [ pos ] = objeto return true return false
[ -1.7044142484664917, -0.019198043271899223, 0.851089596748352, -0.20111852884292603, -0.31098735332489014, 1.1064276695251465, -0.48995712399482727, -0.3420824408531189, 0.22416722774505615, 0.6300408840179443, -0.8818600177764893, 0.4381944537162781, -0.6682283878326416, 0.322426706552505...
def _ _ call _ _ ( self, utterances _ batch : list, history _ batch : list, states _ batch : optional [ list ] = none ) - > union [ tuple [ list, list ], tuple [ list, list, optional [ list ] ] ] :
[ -0.5005881190299988, 0.5602267384529114, 0.40477365255355835, 0.7788900136947632, 0.8180695176124573, 0.059197936207056046, -1.1201810836791992, 1.0685425996780396, 0.09515305608510971, 0.3505602777004242, 0.22032521665096283, 0.08907217532396317, -0.23596352338790894, 0.43503373861312866,...
def test _ register _ input _ and _ post _ and _ email _ bad ( self, * _ ) : self. open ( base _ url +'/ logout') # go to main page self. open ( base _ url +'/ register') # validate that the user is taken to / login assert self. get _ current _ url ( ) = = base _ url +'/ register'self. type ('# email ','test _ frontend...
[ -0.8095669746398926, 0.5780608057975769, 0.5367660522460938, 1.0498846769332886, 0.811612069606781, 0.616291880607605, -0.049029428511857986, 0.20261363685131073, -0.7099219560623169, -0.5843682885169983, 0.0016902509378269315, 0.8232192993164062, -0.4394742548465729, 0.7600865960121155, ...
def rm _ abcsissa ( self, inds ) : d = self. xticks [ inds ] # these points will be removed for ds in self. datasets. values ( ) : keep = [ i for i, a in enumerate ( ds ['xticks'] ) if a not in d ] ds ['xticks'] = ds ['xticks'] [ keep ] ds ['avrgs'] = ds ['avrgs'] [ keep ] ds ['avrgs'] = np. ascontiguousarray ( ds ['av...
[ 0.0052857170812785625, 0.5166455507278442, 0.43916574120521545, -0.30305859446525574, -0.22400270402431488, 0.1390332579612732, 0.4316157102584839, 0.436907023191452, 0.5323199033737183, 0.6720510721206665, 0.2971908450126648, 0.3511676788330078, -0.34970882534980774, -0.6034150123596191, ...
async def async _ added _ to _ hass ( self ) : await super ( ). async _ added _ to _ hass ( ) last _ state = await self. async _ get _ last _ state ( ) if not last _ state : return self. _ state = last _ state. state = = state _ on
[ 0.28613516688346863, 0.32628223299980164, 0.7499473094940186, 0.40608760714530945, 0.9164300560951233, -0.516750156879425, -1.169288992881775, 0.22350138425827026, 1.157148003578186, 0.17110010981559753, -0.4262392520904541, 0.17597350478172302, 0.1006864607334137, 0.2094920128583908, 0....
def lengthoflongestsubstring ( s ) : max _ len = 0 head = tail = 0 visited = [ ] sublen = 0 while tail < len ( s ) : c = s [ tail ] if c in visited : while c in visited : visited. remove ( s [ head ] ) head + = 1 sublen - = 1 visited. append ( c ) sublen + = 1 if sublen > max _ len : max _ len = sublen tail + = 1 retur...
[ 0.9978947043418884, 0.1802062690258026, 0.7134616374969482, -0.42300671339035034, -0.3298693001270294, -0.28946828842163086, 0.3795965909957886, 0.6726071238517761, 0.8830921649932861, -0.009290979243814945, -0.9846907258033752, 0.4366869330406189, 0.10042338818311691, -0.16745950281620026...
def _ _ init _ _ ( self, database ) : # todo : nodetable should be indexed by label # any functions that take rowid should take label self. database = database self. readdatabase ( )
[ -0.23406612873077393, -0.3307417631149292, 0.3262730836868286, -0.07314444333314896, -0.39662009477615356, 0.05071398988366127, 0.43187636137008667, 0.41209396719932556, 0.2012697160243988, 0.26491767168045044, 0.46764707565307617, -0.35452044010162354, 0.027246516197919846, 1.059862852096...
def winbio _ winbiolocatesensorwithcallback ( jitter ) : ret _ ad, args = jitter. func _ args _ stdcall ( [ " sessionhandle ", " locatecallback ", " locatecallbackcontext " ] ) raise runtimeerror ('api not implemented') jitter. func _ ret _ stdcall ( ret _ ad, ret _ value )
[ 0.3150978088378906, -0.5098820924758911, 0.3435136675834656, 0.5874263644218445, -0.15556330978870392, 0.03278399631381035, 1.547446370124817, -1.364824891090393, 1.8336906433105469, 0.06626908481121063, -0.28587669134140015, -0.31102606654167175, -0.6520451903343201, 0.8755053281784058, ...
def propagate _ sziklas _ siegman _ cylindrical _ symmetry ( ht, r, e, k, l, m, axis = none ) : if axis is none : axis = mathx. vector _ dim ( e ) r = ht. points ( r, axis ) p = ht. conj _ points ( r, axis ) # eq. ( 12 ) z0 = l / ( m - 1 ) # eq. ( 13 ) e = np. exp ( - 1j * k * r * * 2 / ( 2 * z0 ) ) * e # propagate a d...
[ 0.7723064422607422, -0.24580730497837067, 0.5649574398994446, 0.2593095302581787, -0.41164329648017883, -0.05852619931101799, 1.2573492527008057, 0.8554839491844177, 0.17231938242912292, 0.5224177837371826, -0.7409561276435852, -0.02931915782392025, -0.545734703540802, -0.11697787046432495...
def send _ text _ file ( file _ name ) : file _ dot _ text = file _ name + '. txt'return app. send _ static _ file ( file _ dot _ text )
[ 0.28586870431900024, -0.629304051399231, 0.3843165934085846, 0.1742786020040512, -0.3499680161476135, 0.44761595129966736, 0.043972037732601166, -0.14122407138347626, -1.233793020248413, 1.171382188796997, -0.2428157478570938, 0.31864261627197266, 0.6772393584251404, -0.2596665322780609, ...
def indices _ to _ subj _ ids ( splits, subj _ ids ) : return [ list ( map ( lambda ids : [ subj _ ids [ i ] for i in ids ], split ) ) for split in splits ]
[ -0.4668899178504944, -0.2723361551761627, 0.33244895935058594, -0.6669130921363831, 0.056810423731803894, -0.23382605612277985, -0.02248338796198368, 0.366232693195343, 0.7291321754455566, 1.376906394958496, -0.16116879880428314, 0.5684204697608948, -0.27094629406929016, -1.099208831787109...
def learning _ by _ newton _ method ( y, tx, w ) : loss, gradient, hessian = logistic _ regression _ helper ( y, tx, w ) print ( loss ) w = w - np. linalg. inv ( hessian ). dot ( gradient ) return loss, w
[ 0.476945698261261, -0.5331775546073914, 0.5099551677703857, -0.40784838795661926, -0.46100831031799316, -0.3123345971107483, -0.03415130078792572, -1.11960768699646, -0.43790403008461, 0.1306823045015335, 0.06629341095685959, 0.6685330271720886, 0.08011432737112045, 0.5278131365776062, 0...
def indices _ elementos _ matcheados ( self ) : return self. elementos _ matcheados
[ -0.9135690331459045, -0.9530025124549866, 0.39292508363723755, 0.5509809255599976, -0.09496656060218811, 1.0761809349060059, 0.5146484375, -0.2375984638929367, 0.8106618523597717, -0.33300262689590454, -0.18892554938793182, 0.39444637298583984, 0.042354267090559006, -0.8438800573348999, ...
def _ _ iter _ _ ( self ) : format _ type = self. _ format _ type format _ kwargs = self. _ format _ kwargs format _ columns = self. _ format _ columns output _ all _ columns = self. _ output _ all _ columns for index in range ( self. num _ rows ) : yield self. _ getitem ( index, format _ type = format _ type, format _...
[ -0.4148937463760376, -0.49983179569244385, 0.3387426733970642, 0.46591317653656006, 0.4569374620914459, -0.6348987221717834, -0.16496019065380096, -0.6533259153366089, -0.3091999590396881, -0.7183183431625366, 0.8918790817260742, 0.4627263844013214, 0.6801183819770813, 0.19874908030033112,...
def forward ( self, x ) : raise notimplementederror
[ -0.4424079656600952, 0.45908039808273315, 0.41453176736831665, -0.005232455208897591, -0.3926519751548767, 1.710323691368103, 0.05202828347682953, -0.4899442195892334, -0.33558470010757446, -1.148586392402649, -0.8595100045204163, 0.4882897138595581, 1.146193504333496, 0.17740227282047272,...
async def git ( self, ctx ) : pass
[ 0.39231887459754944, 0.38404086232185364, 0.3444471061229706, 0.620369017124176, 0.816577136516571, 0.9167304635047913, -0.4433691203594208, -0.03724812716245651, -0.015948057174682617, -0.4463675618171692, 0.2274695485830307, 1.017050862312317, -0.5381514430046082, -0.5062829256057739, ...
def insert _ aligned _ records ( self, device _ ids, times, measurements _ lst, types _ lst, values _ lst ) : type _ values _ lst = [ ] for types in types _ lst : data _ types = [ data _ type. value for data _ type in types ] type _ values _ lst. append ( data _ types ) request = self. gen _ insert _ records _ req ( de...
[ -1.4506282806396484, 1.1009117364883423, 0.6281120777130127, -0.0030582912731915712, 1.5232058763504028, 0.78421550989151, 0.008254331536591053, -0.26337817311286926, -0.9360933899879456, 0.6338026523590088, -0.5685255527496338, -0.6653819680213928, -1.15593421459198, 1.0695465803146362, ...
def plural _ noun ( sn ) : # init i = 1 # if we have many subject, we need to know the conjunction while i < len ( sn ) : if sn [ i ]. _ conjunction! ='and': if plural ( sn [ i ]. noun [ 0 ], sn [ i ]. _ quantifier, sn [ i ]. det ) = = 1 : return 1 else : # if other conjunction, we have just one element return 1 i + = ...
[ -0.5647090673446655, -0.8871945738792419, 0.9130329489707947, -0.28283408284187317, -0.27145740389823914, -0.8292873501777649, -0.3495691418647766, 0.6153659224510193, 0.583857536315918, -0.6561991572380066, -0.24915239214897156, -0.45205041766166687, -0.5077875852584839, 0.427636384963989...
def create _ predicates ( self, sentence _ str ) : if implication in sentence _ str : self. premise, self. conclusion = sentence _ str. split ( implication ) self. is _ implication = true else : self. premise = sentence _ str for literal in self. premise. split ( conjunction ) + [ self. conclusion ] : if literal : pred...
[ 0.13743190467357635, -0.7517039775848389, 0.3379417061805725, 0.07520884275436401, 0.0874427780508995, 0.30963587760925293, -0.8305173516273499, 1.3934473991394043, -0.04406501352787018, 0.3645862340927124, -0.3983323574066162, -0.10127557069063187, -0.6967012882232666, 0.2402922362089157,...
def validate _ input _ layer ( self, incoming ) : assert len ( self. input _ shape ) > 2, ( " [ { } ] input shape error : flatten layer " " requires an input with shape greater than 2. ". format ( self. type ) ) return true
[ -0.8551235795021057, 0.06496267020702362, 0.590084433555603, -0.33446234464645386, -0.1859542578458786, 1.1819102764129639, 0.5583104491233826, -0.48684534430503845, -0.5780514478683472, -0.6183354258537292, -0.583029568195343, 0.437814325094223, -0.9204407930374146, 0.8148709535598755, ...
def parse ( ip ) : apiurl = " http : / / ip. taobao. com / service / getipinfo. php? ip = % s " % ip content = urllib2. urlopen ( apiurl ). read ( ) data = json. loads ( content ) ['data'] code = json. loads ( content ) ['code'] if code = = 0 : locate = data [ " country " ]. encode ('utf - 8') + data [ " region " ]. en...
[ -0.7091178894042969, -0.2185274213552475, 0.6860756874084473, -0.49637457728385925, -1.0711256265640259, 0.10961692035198212, -0.5715820789337158, -0.26413583755493164, 0.3285195827484131, 0.2787618339061737, 0.08739561587572098, -0.8608132004737854, -0.059480391442775726, -0.5139641761779...
def bohr _ parameter ( c, rk, kda = 0. 017, kdi = 0. 002, kswitch = 5. 8 ) : first _ term = - np. log ( rk ) top _ term = ( 1 + ( c / kda ) ) * * 2 bot _ term = ( 1 + ( c / kda ) ) * * 2 + kswitch * ( 1 + ( c / kdi ) ) * * 2 second _ term = np. log ( top _ term / bot _ term ) bohr = first _ term - second _ term return ...
[ 0.4445096254348755, 0.05526230111718178, 0.543840765953064, -0.16704443097114563, -0.4944485127925873, 0.7774298787117004, 0.1135496124625206, -0.5025627017021179, -0.7154773473739624, 0.6372471451759338, 0.20952190458774567, 0.9266805648803711, -0.37568017840385437, 0.3275967836380005, ...
def next _ positions ( cube _ position ) : positions = [ ] for turn, pos in turns. items ( ) : positions. append ( ( pos ( cube _ position ), turn ) ) return positions
[ -1.8032547235488892, -0.05518703535199165, 0.11257866770029068, -0.1243445947766304, -0.14540256559848785, -0.5389567017555237, 0.0845223143696785, 0.8635640740394592, 0.262939989566803, 0.6580889225006104, -1.286327838897705, -1.1442196369171143, -0.10001034289598465, 0.09220998734235764,...
def _ cleanup _ network _ associations ( host _ dom, net _ assns, context, db _ session ) : log. debug ('enter _ cleanup _ network _ associations') # if we have associations to inspect, be sure all sea chains up to date. # do it outside the loop so we just rebuild them once, rather than every # time through the loop. i...
[ -0.3742624819278717, -0.6670035719871521, 0.6172309517860413, -0.531295120716095, 0.15911751985549927, -0.5281120538711548, 1.1158679723739624, -0.4588157534599304, 1.0554304122924805, -0.217629075050354, 0.8205295205116272, 0.5609238743782043, 0.13142146170139313, 0.25292742252349854, 0...
def _ _ getitem _ _ ( self, item ) - > countattribute : return self. _ item _ dict [ item ]
[ -0.0949690043926239, -0.6952570676803589, 0.32821816205978394, -0.15871459245681763, -0.10868901014328003, 0.058628298342227936, 0.6261714696884155, -0.13816913962364197, 0.11658680438995361, -0.28840675950050354, 0.44781428575515747, -0.06569299101829529, 0.2541368305683136, -1.3668637275...
def cmd ( f ) : def g ( * args, * * kwargs ) : mc = args [ 0 ] n = f. func _ code. co _ argcount mc. sasl _ auth _ plain ( args [ 1 ], args [ 2 ] ) f ( mc, * args [ 3 : n + 1 ] ) return g
[ -0.021756621077656746, 0.7953504323959351, 0.5984629988670349, -0.3720817565917969, -0.5985322594642639, 0.10547572374343872, 0.5052573084831238, 0.6466906666755676, -0.06280914694070816, 0.38049212098121643, 0.6365584135055542, 0.3842678666114807, 0.4497392475605011, 0.07267341762781143, ...
def sample _ size ( moe = 0. 1, pop = 10, zval = 2. 58 ) : ss = ( ( zval * * 2 ) * 0. 25 ) / ( moe * * 2 ) if pop : ss = ss / ( 1 + ( ss - 1 ) / pop ) return min ( ss, pop )
[ 0.28084132075309753, 0.0257418192923069, 0.45144668221473694, 0.0037527969107031822, -1.6159957647323608, -0.16250626742839813, 0.7799324989318848, -0.5060462951660156, 0.5657970309257507, 0.6337635517120361, 0.20780451595783234, 0.1299428790807724, -0.13497215509414673, -0.141194865107536...
def get _ cuda _ shared _ memory _ status ( self, region _ name : str =..., headers : dict [ str, t. any ] =..., as _ json : t. literal [ false ] =..., ) - > service _ pb2. cudasharedmemorystatusresponse :
[ -0.29273343086242676, -0.4257493317127228, 0.5456740856170654, -0.07610110193490982, -0.5021008253097534, -0.5228085517883301, 0.37248796224594116, -0.822002649307251, 0.5334409475326538, -0.3110874891281128, -0.6542278528213501, 0.6618483066558838, -0.19905665516853333, 0.2884058654308319...
def get _ start _ stops ( feat, cns ) : if cns [ 0 ] > cns [ 1 ] : cns = cns [ 1 ], cns [ 0 ] if feat ['start'] < cns [ 0 ] and feat ['end'] > cns [ 1 ] : # intronicns cnsns : return cns [ 0 ], cns [ 1 ] featm = ( feat ['start'] + feat ['end'] ) / 2. cnsm = ( cns [ 0 ] + cns [ 1 ] ) / 2. if featm < cnsm : return min ( ...
[ -0.27932941913604736, -0.8205157518386841, 0.49640339612960815, 0.6000953316688538, -0.2644175887107849, -0.28930267691612244, -0.3241628110408783, -0.29923129081726074, -0.596666157245636, 0.026661483570933342, -0.7008399963378906, 0.3340196907520294, 0.764808714389801, -0.211445316672325...
def read _ height _ field ( image _ file ) : image = cv2. imread ( image _ file, - 1 ) if image is none : print ( " the following file does not exist : " ) print ( image _ file ) return none if len ( image. shape ) = = 3 : # in case of rgb image image = cv2. cvtcolor ( image, cv2. color _ rgb2gray ) return np. double (...
[ 0.09814237058162689, 0.22752739489078522, 0.8007407784461975, 1.0366458892822266, 0.3167949616909027, 1.2838308811187744, 0.41810011863708496, -0.3184787631034851, -0.7852274179458618, 1.1437289714813232, 0.04036339744925499, 0.07469311356544495, -0.6527246236801147, 0.31368499994277954, ...
def price ( self, price ) : self. _ price = price
[ -0.6862004995346069, 0.2039334923028946, -0.11570210754871368, 0.7108734250068665, 0.13219337165355682, 1.3055790662765503, -0.36827054619789124, 1.0207226276397705, -0.3075375556945801, 0.433854341506958, -0.9363646507263184, -0.8466286063194275, -0.34588149189949036, 0.4169788062572479, ...
def verify _ circuit ( lib, circuit, sg, quiet = false ) : # add circuit state connections add _ state _ connections ( circuit, lib ) # get encoding and initial _ state encoding, initial _ state = unzip ( circuit [ " initial _ state " ]. iteritems ( ) ) # build a library - independent circuit description ( an " impleme...
[ 0.051352571696043015, -0.210699662566185, 0.6472051739692688, -0.8322689533233643, -0.687906801700592, -0.5447113513946533, 0.9903949499130249, -0.31911227107048035, 0.2769971787929535, 0.2472435086965561, -0.4806721806526184, 0.4414985775947571, 0.6300690174102783, 0.07710970938205719, ...
def get _ oven _ state ( ) : return " error "
[ -1.09735107421875, -0.4965308904647827, 0.18606685101985931, 1.0090476274490356, -0.8334591388702393, -0.1930679976940155, 0.0657583698630333, 0.5650427937507629, 0.6121171712875366, 0.07728374749422073, -0.21329596638679504, 0.7710850238800049, -0.006817344110459089, 0.28337571024894714, ...
def calculate _ rmatrix _ from _ phi _ theta ( phi, theta ) : epsilon = 1e - 7 a = np. array ( [ 0, 0, 1 ], dtype = np. float64 ) # original up - vector # b = spherical _ to _ cartesian ( phi, theta ) # target vector phi = np. deg2rad ( phi ) theta = np. deg2rad ( theta ) x = np. sin ( phi ) * np. cos ( theta ) y = np....
[ 0.1479560285806656, -0.350948303937912, 1.2068361043930054, -0.18818596005439758, -0.1222929060459137, -0.44173499941825867, 0.5910986065864563, 0.5210163593292236, 0.975704550743103, 0.7539310455322266, -0.06159462034702301, 0.12201730161905289, -1.111371397972107, -0.26591747999191284, ...
def build _ wrapping _ formatters ( objs, fields, field _ labels, format _ spec, add _ blank _ line = true, no _ wrap = none, use _ max = false ) : no _ wrap = set _ no _ wrap ( no _ wrap ) if objs is none or len ( objs ) = = 0 : return { } biggest _ word _ pattern = re. compile ( r " [ \. :, ; \! \? \ \ = - \ _ ] " ) ...
[ -1.253222107887268, -0.5557904839515686, 0.7335124015808105, 0.3281470239162445, -0.001841907505877316, -0.2730257511138916, 0.01586257293820381, -0.14452502131462097, -0.21127788722515106, -0.0644461065530777, -0.08111398667097092, 0.5145581960678101, 0.8689538240432739, 0.169247493147850...
def is _ valid _ type ( self ) : if self. datatype = = " type " : if self. value = = " int " or self. value = = " bool " or self. value = = " string " or self. value = = " float " : return true return false
[ -0.5483235120773315, 0.11276556551456451, 0.6768416166305542, 0.23068371415138245, -0.0039032299537211657, 0.4557776153087616, -0.21376636624336243, -0.7554396986961365, -0.2742287516593933, -0.3028104603290558, 0.15378324687480927, 0.944200336933136, -0.9828141331672668, 0.890033185482025...
def test _ simple _ dilation ( ) : _ assert _ inout _ for _ expected _ output ( input _ length = 7, expected = 3, dilation = 2, kernel _ size = 3 )
[ 0.5658045411109924, 1.0806440114974976, 0.5556807518005371, 1.3771612644195557, 0.0032165825832635164, 0.13502877950668335, 0.11201577633619308, 0.31985902786254883, 1.049660563468933, -1.2085857391357422, -0.42973992228507996, -1.0628052949905396, 0.28561440110206604, 0.5325795412063599, ...
def test _ warning _ raised ( self ) : msg = " deprecation message " @ deprecated ( msg ) def f ( ) : return with self. assertwarns ( deprecationwarning, msg = msg ) : f ( )
[ 0.43137115240097046, 0.8615111112594604, 0.2181357592344284, 0.16533687710762024, 0.29121294617652893, -0.8623701333999634, -0.46919625997543335, -0.4198433458805084, -0.16277143359184265, -0.35093027353286743, -0.26737457513809204, 0.17828117311000824, 0.11013138294219971, 0.4056485593318...
def sample ( self ) : # - - - + - - - - | - - - - + - - - - | - - - - + - - - - | - - - - + - - - - | - - - - + - - - - | - - - - + - - - - | - - - - + - - - - | return binomialdistbase. sample ( self )
[ -0.3568305969238281, -1.2855838537216187, 0.5932015776634216, -0.47941216826438904, -0.4854714870452881, 0.031514234840869904, -0.42980846762657166, 0.22816215455532074, 0.22454597055912018, -0.23258428275585175, -0.3579239249229431, 0.8266959190368652, -0.816070020198822, -0.5910691618919...
def _ _ set _ up _ default _ logger ( ) : # set - up the main logger instance. path _ of _ log _ file = os. path. join ( path _ of _ file _ dir, ".. ", ".. ", " logs ", " main _ tab _ log. log " ) return _ logger = coloredlogger ( os. path. basename ( _ _ file _ _ ), log _ file _ path = path _ of _ log _ file ) return ...
[ 0.0762273296713829, -0.8797367811203003, 0.5679150223731995, -0.8515657782554626, 0.3477090299129486, 0.4097948372364044, 0.035882703959941864, 0.3672522008419037, -0.960946261882782, -0.034171074628829956, 0.15026777982711792, -0.05861283093690872, -0.4147941768169403, 0.5645774006843567,...
def parametrize ( testcase _ klass, param = none ) : testloader = unittest. testloader ( ) testnames = testloader. gettestcasenames ( testcase _ klass ) suite = unittest. testsuite ( ) for name in testnames : suite. addtest ( testcase _ klass ( name, param = param ) ) return suite
[ -0.2913492023944855, 0.07448463886976242, 0.4179196059703827, 0.33865782618522644, 0.25133103132247925, -0.33233001828193665, -0.1288307011127472, 0.08073205500841141, 1.067874789237976, 0.6064940094947815, 0.05756572633981705, -0.44885966181755066, -0.5882589221000671, 0.9825931787490845,...
def shard ( self, num _ shards : int, index : int, contiguous : bool = false, keep _ in _ memory : bool = false, indices _ cache _ file _ name : optional [ str ] = none, writer _ batch _ size : optional [ int ] = 1000, ) - > " dataset " : assert 0 < = index < num _ shards, " index should be in [ 0, num _ shards - 1 ] "...
[ -0.24338670074939728, 0.6619383692741394, 0.6486130356788635, -0.15079961717128754, 0.14433036744594574, -0.3283003270626068, 0.27892348170280457, -0.43483036756515503, 0.648760199546814, -0.47549253702163696, 0.5715904831886292, 0.6574395298957825, -0.500109076499939, -1.8474842309951782,...
def child _ widget _ accessed ( self, widget ) :
[ 0.4782210886478424, -0.6302226185798645, 0.408383846282959, -0.7290834784507751, -0.09596587717533112, -0.1223890632390976, 0.4343824088573456, 0.2108764350414276, -0.20162653923034668, -0.630656898021698, -0.8705935478210449, 0.22212569415569305, 0.8062564134597778, 0.03904910758137703, ...
def set _ no _ wrap _ on _ formatters ( no _ wrap, formatters ) : # handle easy case : if not formatters : return { } formatter _ no _ wrap _ settings = { } global _ orig _ no _ wrap = is _ nowrap _ set ( ) set _ no _ wrap ( no _ wrap ) for k, f in formatters. items ( ) : if wrapperformatter. is _ wrapper _ formatter (...
[ -1.973164677619934, -0.9799299240112305, 0.47415217757225037, -0.13798366487026215, -0.7675955295562744, 0.09362174570560455, -0.20075282454490662, 0.11792663484811783, 0.20673562586307526, 0.3802739381790161, -0.3838985860347748, 0.6492620706558228, -0.17133890092372894, 1.437904596328735...
def findsource ( object ) : module = getmodule ( object ) try : file = getfile ( module ) except typeerror : file = none # use readline when working in interpreter ( i. e. _ _ main _ _ and not file ) if module and module. _ _ name _ _ = ='_ _ main _ _'and not file : import readline lbuf = readline. get _ current _ hist...
[ -0.3627021014690399, 0.00696951849386096, 0.933256983757019, 0.1622687131166458, -0.23876510560512543, -0.7501345276832581, 0.48896780610084534, 0.14311431348323822, 0.3532373905181885, 0.803279459476471, -0.49848672747612, 0.421909898519516, 0.4829563498497009, 1.2015279531478882, 0.537...
def classify _ tabular ( self, soup ) : document _ information _ dict = { " newvotingrights " : none, " newinstrumentvotingrights " : none, " newtotalvotingrights " : none, " oldvotingrights " : none, " oldinstrumentvotingrights " : none, " oldtotalvotingrights " : none, " blockholders " : none, " irrelevantblockholder...
[ -0.2962816059589386, -0.018179623410105705, 0.8803695440292358, -0.12821364402770996, -0.47654515504837036, 0.16970005631446838, -0.18617340922355652, 0.24121049046516418, -1.0214366912841797, 1.0491896867752075, 0.5454317331314087, 0.020354030653834343, 0.5017995238304138, 0.4532861411571...
def upper _ frequency ( center, order ) : return center * 2. 0 * * ( + 1. 0 / ( 2. 0 * order ) )
[ 0.2184840738773346, -0.5680865049362183, 0.39456498622894287, 0.5072582960128784, -0.3245651125907898, -0.6506749391555786, -0.27183207869529724, 0.11462944746017456, 0.575441300868988, -0.20336072146892548, 0.44585275650024414, 0.4642413854598999, 0.36470499634742737, -0.26002925634384155...
def show _ temporary ( self, showlist = none, y _ pos = none, x _ pos = none, y _ coord = 0, x _ coord = 0 ) : showlist = fill ( showlist ) y _ dim = len ( showlist ) + 2 x _ dim = len ( showlist [ 0 ] ) + 2 frame = self. make _ rectangle ( height = y _ dim, width = x _ dim, divider = 0, box _ char = box _ char _ doubl...
[ 0.19395963847637177, 0.18161776661872864, 1.1463606357574463, -0.13746023178100586, -1.460715651512146, -0.762347936630249, 0.8678768873214722, 0.7107706069946289, 0.3292517066001892, 0.7296862006187439, -0.42815592885017395, 0.33707818388938904, 0.04585229977965355, 0.18013650178909302, ...
def common _ friends ( user1, user2 ) : result _ set = friends ( user1 ). intersection ( friends ( user2 ) ) return result _ set
[ -0.16914670169353485, 0.44459378719329834, 0.7374142408370972, 1.6373484134674072, -0.2745682895183563, -0.07356192171573639, 0.11170587688684464, -0.4951368272304535, -1.875671148300171, 0.0874204933643341, 0.40564772486686707, 0.29928964376449585, -0.7609947323799133, -0.7281467318534851...
def d _ ml ( tag, messages ) : if not isinstance ( messages, list ) : raise typeerror for message in messages : if message = = " " : continue d ( tag, message )
[ -0.2903350293636322, 0.4285222887992859, 0.4115162193775177, 0.3881984055042267, 0.5233072638511658, -0.02380423992872238, 0.07787788659334183, -0.4430782198905945, -0.4706192910671234, -0.08523815870285034, 0.22753901779651642, -0.4528997242450714, -0.3784104585647583, 1.8441612720489502,...
def delete _ menu _ option ( request ) : if request. user. is _ stylist = ='yes': if request. method = ='post': stylist _ option = stylistmenu. objects. get ( pk = request. post. get ('stylist _ option _ pk') ) stylist _ option. delete ( ) return redirect ( request. meta. get ('http _ referer') ) else : return redirect...
[ -0.39943256974220276, 0.35530152916908264, 0.5144248008728027, 1.094127893447876, -0.15423788130283356, 0.8351141810417175, 0.2001267969608307, 0.3911493718624115, 0.7460663914680481, 0.5037292838096619, 0.08791331946849823, 0.15672075748443604, -0.14522944390773773, 1.0185638666152954, ...
def test _ _ roll _ forward _ paused _ update _ abort ( client ) : res = client. start _ job _ update ( get _ job _ update _ request ('test _ dc _ labrat. yaml'),'create job') key = res. key # sleep for sometime to let peloton transition workflow state # from initialized - > rolling _ forward or let it be as - is time....
[ 0.5641684532165527, -0.5115376710891724, 0.6888123750686646, -0.17653681337833405, -0.26572784781455994, 0.8314188122749329, -0.7837499380111694, -0.03472497686743736, 0.3914583623409271, 0.23281866312026978, 0.191010981798172, -0.20200611650943756, -0.37426334619522095, -0.313060522079467...
def print _ closest ( mode : str, name : str, amount : int, single _ version : bool, filter _ versions : bool ) - > none : print ( f " target repo : { name } " ) print ( " closest repos : \ n " ) closest = predict _ closest ( mode = mode, names = [ name ], amount = amount, single _ version = single _ version, filter _ ...
[ -0.6087188720703125, -0.37447816133499146, 0.8151624202728271, -0.2722283899784088, -0.6030805706977844, 0.6144564151763916, -0.38617441058158875, -0.6208577752113342, -1.0759906768798828, 0.755879282951355, -0.3130609095096588, 0.6600728034973145, -0.2691671848297119, -0.21044203639030457...