text
stringlengths
25
2.19k
embedding
listlengths
768
768
def test _ unit _ register _ with _ get ( self ) : with patch ('user _ auth. views. registerform') as reg : request = magicmock ( ) request. method = " get " reg. return _ value = mock ( ) # for testing if we execute correct else statement. reg. return _ value. is _ valid = mock ( return _ value = false ) with patch ('...
[ -0.9624115228652954, 0.8358635902404785, 0.7536572217941284, 0.2857767343521118, 1.4381647109985352, 0.16663026809692383, -0.001940436544828117, -0.04562659561634064, 0.4197322428226471, -1.2127848863601685, -0.28125178813934326, 0.36441829800605774, -0.10709374397993088, -0.17657366394996...
def getsourcelines ( object, lstrip = false, enclosing = false ) : code, n = getblocks ( object, lstrip = lstrip, enclosing = enclosing, locate = true ) return code [ - 1 ], n [ - 1 ]
[ -0.36292099952697754, -0.15915371477603912, 0.6505802869796753, -0.2962114214897156, -0.5130123496055603, -0.6163368821144104, -0.10137099027633667, -0.41520655155181885, 0.6903010606765747, 0.7466413974761963, -1.0739054679870605, -0.059100229293107986, 0.24600955843925476, 0.235818356275...
def process _ set _ heading _ gload _ cmd ( self, t, dt ) : assert type ( self. direction _ cmd ). _ _ name _ _ = ='setheadinggloadcmd'psi _ c = self. direction _ cmd. psi _ c gload _ c = self. direction _ cmd. gload _ c gload _ max = self. platform. gload _ max gload _ c = gload _ max if gload _ c > gload _ max else g...
[ -0.10778585076332092, -0.3066117465496063, 0.5374876856803894, -0.9396263957023621, 0.11095307767391205, 0.7436105012893677, -0.034485068172216415, -1.187442660331726, -0.4188120365142822, 0.28052249550819397, 0.05967406556010246, 0.8902645707130432, 0.13013611733913422, 0.5672362446784973...
def pub _ cloud ( self, points ) : # pub _ cloud ( self, points : list [ int ] ) new _ point = [ ] # create array for points after conversion for point in points : x = point [ 0 ] # unpack points y = point [ 1 ] x = ( x - 990 ) * 0. 00044 # convert for both y = ( y - 540 ) * 0. 00044 cloud = point32 ( ) # send to new a...
[ 0.04689165577292442, 0.2129811942577362, 0.4859192669391632, 1.0735713243484497, 0.2810401916503906, 0.4423444867134094, -0.493538498878479, -0.03711840137839317, 0.5234946608543396, 0.24662302434444427, -0.0622071735560894, 0.4927997887134552, -0.2601254880428314, 0.5721026062965393, -0...
def wrapper ( self, fname, * args, * * kwargs ) : i = 0 path _ exists = true while path _ exists : path _ exists = os. path. isfile ( fname ) if path _ exists : pieces = fname. split ( ". " ) path = " ". join ( pieces [ 0 : - 1 ] ) ext = pieces [ - 1 ] new _ path = path + " ( " + str ( i ) + " ) " fname = ". ". join ( ...
[ -1.0769983530044556, -0.22108499705791473, 0.7960090637207031, 0.05487678200006485, -0.07099587470293045, -0.48750966787338257, 0.7853943109512329, -0.12191842496395111, -0.19272522628307343, 0.34010934829711914, 0.34250810742378235, -0.14200177788734436, 0.6347740292549133, -0.48590201139...
def stop _ node ( self, simulation, node ) : u = self. base _ api + " / simengine / rest / update / { } / stop? nodes = { } " u = u. format ( simulation, node ) r = self. put ( u, none ) return r
[ -1.68135404586792, 0.5367862582206726, 0.21343517303466797, -0.6206335425376892, 0.0447722002863884, -0.13658727705478668, -0.4184803366661072, 0.07291838526725769, -0.436805784702301, 0.8578668236732483, -0.6119398474693298, 0.5725246071815491, -1.2443875074386597, -0.9515483975410461, ...
def find _ complementary _ edges ( network, inds, asmask = false ) : edge _ prefix = get _ edge _ prefix ( network ) inds = np. unique ( inds ) n = network [ edge _ prefix + '. conns']. shape [ 0 ] mask = np. ones ( shape = n, dtype = bool ) mask [ inds ] = false if asmask : return mask else : return np. arange ( n ) [...
[ -0.7691707611083984, -0.3662101924419403, 0.4986027777194977, 0.839472234249115, 0.4208424985408783, -0.70099937915802, 0.2561204135417938, -0.0811997503042221, 1.0180059671401978, 1.1555125713348389, 0.4405297636985779, -0.27659520506858826, -0.2524775564670563, -0.13457849621772766, -0...
def _ query _ triplestore ( endpoint : str, query : str ) - > pandas. dataframe : sparql = sparqlwrapper ( endpoint, returnformat = _ sparql _ return _ format ) sparql. setquery ( query ) result = sparql. query ( ). convert ( ). decode ( ) return pandas. read _ csv ( io. stringio ( result ) )
[ 0.0579192191362381, -0.06451757997274399, 0.2141961008310318, -0.5053457617759705, -0.7112964987754822, -0.5871660709381104, -1.4703972339630127, 0.4220896065235138, 0.4575686752796173, -0.15864720940589905, 0.8379469513893127, 1.118837833404541, -0.6084319353103638, -2.50119948387146, -...
def fitgh _ mpfit ( xax, data, deggh = 2, err = none, params = none, fixed = none, limitedmin = none, limitedmax = none, minpars = none, maxpars = none, verbose = true, veryverbose = false, * * fcnargs ) : # # set up some default parameters for mpfit if " xtol " not in list ( fcnargs. keys ( ) ) : fcnargs [ " xtol " ] ...
[ 0.5759986042976379, 0.2600352466106415, 0.6741158366203308, -0.04945475235581398, -0.1219765916466713, 0.18907809257507324, -0.27270764112472534, 0.11483016610145569, -0.6138890981674194, 0.009728429839015007, 0.16088582575321198, 1.1075923442840576, -0.967170238494873, 0.9627128839492798,...
def json _ to _ dict ( jsonpath ) : with open ( r " { } ". format ( jsonpath ), " r " ) as read _ file : data = json. load ( read _ file ) return data
[ -0.8985705971717834, -1.550173282623291, 0.3545563817024231, -1.898611068725586, -1.111226201057434, 0.33940771222114563, 0.10089682787656784, -0.7720714211463928, -0.022284943610429764, 0.6001534461975098, -1.1393243074417114, 0.2910939157009125, 0.17040403187274933, -0.07551790028810501,...
def focal _ len _ lens ( n, r1, r2, d ) : return 1 / ( ( n - 1 ) * ( 1 / r1 - 1 / r2 + ( n - 1 ) * d / ( n * r1 * r2 ) ) )
[ 0.20872284471988678, -0.23338083922863007, 0.12416427582502365, -0.3218424618244171, -0.3194471597671509, -0.40508750081062317, -0.06374964118003845, -0.7968732714653015, 0.829647958278656, 0.1496327519416809, 0.19046007096767426, 0.10592775046825409, 0.9195235967636108, -0.235496327280998...
def get _ all _ files _ within _ folder ( path, negative _ condition ) : return [ file for file in os. listdir ( path ) if ( os. path. isfile ( os. path. join ( path, file ) ) and ( negative _ condition not in file ) ) ]
[ 0.4962713122367859, -0.533402144908905, 0.6543223857879639, 1.0675898790359497, -0.7860209941864014, 1.1322094202041626, -0.8708698749542236, 0.3599500060081482, -0.6882573962211609, 0.1489744484424591, 0.3238912522792816, 0.04950795695185661, -0.787926435470581, 0.471518337726593, -0.97...
def remove _ all _ mc ( self, ns _ key ) : ver _ args = [ {'name':'ns _ key ','arg': ns _ key,'t': emunamespacekey }, ] emuvalidator. verify ( ver _ args ) mcs = self. iter _ mc ( ns _ key ) if mcs : return self. emu _ c. _ send _ plugin _ cmd _ to _ ns ('igmp _ ns _ remove ', ns _ key, vec = get _ vec _ mc ( mcs ) ) e...
[ -1.47427499294281, -0.23564694821834564, 0.6257713437080383, 0.1081201583147049, -0.4694349765777588, -0.41081398725509644, 0.202003613114357, -0.3183671236038208, 0.24435485899448395, 0.6731822490692139, -0.4234565496444702, 0.21637222170829773, -1.07881760597229, 1.5849940776824951, -0...
def rescale _ 1 ( out, im, xf, yf ) : _, _, pixels, info = im. asdirect ( ) typecode = " bh " [ info [ " bitdepth " ] > 8 ] planes = info [ " planes " ] resize ( info, xf, yf ) # values per row, target row. vpr = info [ " size " ] [ 0 ] * planes def iterscale ( ) : for row in pixels : bigrow = array. array ( typecode, ...
[ 0.45873701572418213, 0.656632125377655, 0.5368967652320862, 0.2965643107891083, 0.19563286006450653, -0.8738101720809937, -0.1175793930888176, -0.45041942596435547, -0.8505401015281677, 0.4850393533706665, 0.4844430685043335, 0.021463638171553612, 0.6009690165519714, 0.9010946750640869, ...
def gloss ( self ) : return self. _ gloss
[ 1.175477147102356, 0.5559210181236267, 0.2749609053134918, 0.25496241450309753, -0.5543981790542603, 0.8053292632102966, 0.2599530518054962, 0.3611292839050293, 0.3645643889904022, -1.3075364828109741, -0.7635688185691833, 0.8260236382484436, -0.06824573874473572, -0.061714526265859604, ...
def set _ tablename ( self, value ) : super ( addrowinputset, self ). _ set _ input ('tablename ', value )
[ -0.8018099665641785, 0.8788642287254333, 0.3468433618545532, 0.6104791760444641, -0.8641773462295532, 0.39304783940315247, 0.9230486750602722, -0.4800603985786438, -0.09938935190439224, -0.2518463730812073, -0.5136952996253967, -0.2805125117301941, 0.33678948879241943, 0.36271968483924866,...
def alnyawatread ( dirname, max, assystem = false ) : nbabstracts = 0 yawatalignments = { } sentcount = 0 for file in os. listdir ( dirname ) : if file. endswith ( ". aln " ) : datafile = file. replace ( ". aln ", ". crp " ) propertylist = loadpropertylist ( dirname + datafile ) nbabstracts + = 1 curid = file. split ( ...
[ -0.42434173822402954, -0.8244384527206421, 1.0288777351379395, -1.0044915676116943, -1.1594032049179077, -0.3534679114818573, 0.8852139711380005, 0.13519100844860077, -0.17972445487976074, 0.16323252022266388, 0.23674413561820984, -0.13041622936725616, 0.6397117376327515, 0.215572193264961...
def fmod ( arg, mod, queue = none ) : queue = ( queue or arg. queue ) or mod. queue result = arg. _ new _ like _ me ( _ get _ common _ dtype ( arg, mod, queue ) ) _ fmod ( result, arg, mod, queue = queue ) return result
[ -1.0469626188278198, 0.017696429044008255, 0.5285621881484985, -0.25634118914604187, -0.6061456799507141, -0.7664769291877747, -0.025840943679213524, -0.030239209532737732, 0.6601593494415283, -0.003631297033280134, 0.17467404901981354, 0.7328232526779175, 0.3341348469257355, 0.76912218332...
def move ( self, * arguments ) : # przesuniecie o ( x, y ) if len ( arguments ) = = 1 and isinstance ( arguments [ 0 ], point ) : pt = arguments [ 0 ] x1 = self. pt1. x + pt. x y1 = self. pt1. y + pt. y x2 = self. pt2. x + pt. x y2 = self. pt2. y + pt. y return rectangle ( x1, y1, x2, y2 ) elif len ( arguments ) = = 2 ...
[ -0.4896610677242279, -0.35585737228393555, 1.0813591480255127, 0.6539238095283508, 0.06924949586391449, 0.5678168535232544, 0.1235756054520607, -0.7814177870750427, 0.02998923324048519, -0.14171916246414185, 0.4610891044139862, 0.19355864822864532, -0.49747538566589355, -0.7724810242652893...
def parse _ html _ sb8200 ( html ) : logging. info ('parsing html for modem model sb8200') # as of aug 2019 the sb8200 has a bug in its html # the tables have an extra < / tr > in the table headers, we have to remove it so # that beautiful soup can parse it # before : < tr > < th colspan = 7 > < strong > upstream bonde...
[ 0.11764536798000336, 0.3347739279270172, 0.7484926581382751, -1.5359594821929932, -0.7755080461502075, -0.2872069180011749, 0.16466368734836578, -0.2656700611114502, -0.3281015455722809, 0.1183423176407814, -0.025315413251519203, 0.5873424410820007, 0.1947518140077591, 1.2578448057174683, ...
def zone _ id ( self ) - > optional [ pulumi. input [ str ] ] : return pulumi. get ( self, " zone _ id " )
[ 1.3463592529296875, 0.05879561975598335, 0.22835087776184082, 0.7994691729545593, 1.0461885929107666, 1.0993095636367798, 0.5642256736755371, 0.6116927266120911, 1.7778964042663574, -0.12253458797931671, 0.3392316997051239, 0.953534722328186, -0.4954983592033386, -0.5255404114723206, -0....
def copy _ to ( self, src, dest, verbose = true ) : self. _ raise ( )
[ -0.05120851472020149, 0.569216787815094, 0.4747774600982666, 0.6673367023468018, 0.36272358894348145, 0.149613156914711, -0.7919644117355347, -0.21892082691192627, -0.5899434089660645, 0.96820068359375, 0.2455855906009674, 1.0330727100372314, 0.3043212890625, -0.1531665027141571, -0.8366...
def _ validate _ config _ consistency ( ctx : context, check _ aea _ version : bool = true ) - > none : if check _ aea _ version : _ check _ aea _ version ( ctx. agent _ config ) packages _ public _ ids _ to _ types = dict ( [ * map ( lambda x : ( x, packagetype. protocol ), ctx. agent _ config. protocols ), * map ( la...
[ -0.8060469031333923, -0.212602436542511, 0.6357221007347107, 0.2126777172088623, 0.8877871632575989, -0.12948276102542877, 0.3190266191959381, 0.07034172117710114, -0.15110835433006287, 0.9461988806724548, 0.0897861123085022, -0.535000205039978, 0.4961201846599579, 0.9650185704231262, 0....
def get _ encoding ( path ) : encodings = ('utf - 8 ','latin - 1') for enc in encodings : try : with open ( path, encoding = enc ) as fp : fp. read ( ) return enc except unicodedecodeerror : pass return none
[ 0.08327430486679077, -0.1674104928970337, 0.518701434135437, 0.4499390721321106, -0.17018772661685944, -0.09679999202489853, 0.054122939705848694, -0.3338736891746521, -0.5939822793006897, 0.5785109996795654, 0.16113291680812836, -0.5569443106651306, 0.00900792982429266, -0.816436529159545...
def createdialog ( ) : try : ctx = uno. getcomponentcontext ( ) smgr = ctx. servicemanager # create the dialog model and set the properties dialogmodel = smgr. createinstancewithcontext ( " com. sun. star. awt. unocontroldialogmodel ", ctx ) dialogmodel. positionx = 100 dialogmodel. positiony = 100 dialogmodel. width =...
[ 0.5774734616279602, -0.07861993461847305, 1.0114402770996094, -0.5151631832122803, -0.08970081806182861, 0.38528454303741455, -0.1846168041229248, 0.5968679785728455, 0.20375826954841614, -0.9298679232597351, -0.5481088757514954, -0.5139299035072327, 0.34902724623680115, 0.2243270128965377...
def _ terminateprocessesbynameandargsubstr ( self, sname, sarg, sdesc ) : ckilled = 0 ; aoprocesses = utils. processlistall ( ) ; for oprocess in aoprocesses : sbase = oprocess. getbaseimagenamenoexesuff ( ) ; if sbase is not none and sbase. lower ( ) = = sname and any ( sarg in s for s in oprocess. asargs ) : reporter...
[ -0.05258621275424957, -0.4134158492088318, 0.759816586971283, -0.3644455373287201, -0.19173336029052734, -0.4820909798145294, -0.08721093833446503, -0.37776920199394226, -0.2232491672039032, 0.9307239055633545, -0.4604259133338928, -0.18152430653572083, 0.21749624609947205, 0.0419112853705...
def learn ( self ) : if self. _ time _ step > self. _ learning _ starts : for batch in self. _ data _ loader. take ( self. _ c ) : self. _ learn _ from _ experience _ batch ( * batch )
[ 0.2869994640350342, -0.6148794889450073, 0.4445757567882538, 0.6716895699501038, 0.3427877426147461, 0.33697187900543213, 0.18128670752048492, -0.44989684224128723, -1.073049783706665, -0.5362347364425659, -0.03455376252532005, 0.30563613772392273, 0.7930244207382202, 1.6711221933364868, ...
def get _ np ( f _ name ) : f = open ( f _ name,'r') np = f. readlines ( ) np = map ( str. strip, np ) f. close ( ) return np
[ 0.10991925746202469, -1.468340516090393, 0.8147382736206055, -0.7928966879844666, 0.17835919559001923, 0.555138885974884, -0.15842406451702118, 0.7759043574333191, -0.5421409010887146, 0.44906774163246155, -0.5172330141067505, 0.6294036507606506, 1.2017159461975098, -0.2578505873680115, ...
def _ get _ neighbors ( nodes, neigh _ dict ) : return np. unique ( np. concatenate ( [ neigh _ dict [ n ] for n in nodes ] ) )
[ -0.8008875250816345, 0.20016978681087494, 0.5427216291427612, -0.3807476758956909, 0.9115313291549683, 0.012008736841380596, -0.9766987562179565, 0.0846250057220459, -0.960638701915741, 1.1854290962219238, -0.0033865300938487053, 0.569682776927948, 0.2811625897884369, -0.03533974662423134,...
def rebin ( a, ta, da, b, tb, db ) : ia = ( tb - ta ) / / da # compute storage requirements for a na = ( tb + len ( b ) * db - ta ) / / da + 1 if na > len ( a ) : a + = ( [ 0 ] * ( na - len ( a ) ) ) # initialize indices to point to correct elements s0 = tb s1 = s0 + db t0 = ta + ia * da t1 = t0 + da ib = 0 while ib < ...
[ -0.15042708814144135, 0.06818431615829468, 0.694555938243866, 0.2586120367050171, -0.04271528497338295, 0.3500935733318329, 1.5065425634384155, 0.5968082547187805, 0.5201326012611389, 0.6259801983833313, 0.018375858664512634, 0.23268479108810425, 0.19839459657669067, -0.07401257008314133, ...
def test _ reading _ broken _ yaml _ config ( self ) : files = {'empty. yaml':'','nodict. yaml':'100 ','badkey. yaml':'@ : \ n name : device ','noname. yaml':'my _ device : \ n ','allok. yaml':'my device : \ n name : device ','oneok. yaml': ('my device! : \ n name : device \ n'' bad _ device : \ n nme : device') } args...
[ -0.22863472998142242, -0.19297531247138977, 0.720876157283783, -0.14144016802310944, -0.0476686954498291, -0.35106995701789856, -0.01717168651521206, 0.3668525516986847, -0.2378586232662201, 0.05584220588207245, -0.7693328261375427, -0.6088989973068237, 0.14705964922904968, 0.5576312541961...
def createuser ( login _ session ) : newuser = user ( name = login _ session ['username'], email = login _ session ['email'], picture = login _ session ['picture'] ) session. add ( newuser ) session. commit ( ) user = session. query ( user ). filter _ by ( email = login _ session ['email'] ). one ( ) return user. id
[ -0.11235278099775314, -0.4866342842578888, 0.5371362566947937, -0.05226331576704979, 0.6081223487854004, 0.2845037877559662, 0.22220776975154877, -0.35226622223854065, 0.8985261917114258, 0.24839015305042267, -0.89598149061203, -1.2053749561309814, -0.22512534260749817, -0.8080021142959595...
def unispeech _ sat ( refresh = false, * args, * * kwargs ) : return unispeech _ sat _ base _ plus ( refresh = refresh, * args, * * kwargs )
[ 0.24790605902671814, 0.20409360527992249, 0.42420196533203125, -0.10223551094532013, -0.34347444772720337, -0.20806044340133667, -1.0558116436004639, -1.3505865335464478, 1.2570658922195435, -0.19046010076999664, -0.11073754727840424, -0.06193191558122635, 0.0675576850771904, -0.0547426305...
def frame _ all _ images ( color = ( 255, 0, 0 ), directory = none, frame _ width = 0. 05 ) : if directory = = none : directory = os. getcwd ( ) # use working directory if unspecified # create a new directory'modified'new _ directory = os. path. join ( directory,'modified') try : os. mkdir ( new _ directory ) except os...
[ -0.6117990612983704, 0.21809741854667664, 0.726250410079956, 0.29586756229400635, 0.629098653793335, -0.6825780868530273, 0.33893850445747375, 0.41917118430137634, 0.7393524050712585, 0.34258416295051575, 0.002127500018104911, 0.6328620314598083, 0.30834686756134033, 1.8140742778778076, ...
def isapplicableto ( self, actor ) : return any ( [ a. rule. evaluate ( actor ) for a in self. actorplaceholders ] )
[ -0.7994722723960876, -0.23820312321186066, 0.4553360641002655, -0.26785147190093994, -0.3075934946537018, 0.1946592628955841, 0.2937723994255066, 1.2552176713943481, 0.7245413661003113, 0.15770117938518524, 0.4318509101867676, 0.5425469279289246, -0.28718429803848267, 1.722684621810913, ...
def set _ config _ var ( ) : global file _ train, file _ test, file _ pre _ trained _ embed, file _ img _ data, training _ mode, predict _ mode, interactive _ mode, train _ text _ only, train _ vqa, save _ text _ only, debug _ ic, write _ excel global full _ test _ set, nb _ test _ examples _ random, create _ graphical...
[ -0.39330846071243286, -0.1193024069070816, 0.7847685217857361, 0.13186784088611603, -0.07174558937549591, 0.6364945769309998, 1.1469897031784058, 0.3497007489204407, -1.4289363622665405, 0.8263577222824097, -1.1593364477157593, -0.15230372548103333, 0.1828737109899521, 0.8745837807655334, ...
def get _ article _ title ( soup ) : return soup. find ('title'). string
[ -0.14540012180805206, -0.018516898155212402, 0.3287363052368164, -0.9240508079528809, -0.3440597653388977, -0.7418333888053894, -0.3123120665550232, -0.2664150893688202, 0.4638850688934326, 0.841250479221344, 0.46623751521110535, -0.6395329833030701, -0.010453842580318451, -1.2598054409027...
def verts _ to _ verts ( self, sv, gtype ='tri') : if gtype = ='vor': sv _ edges = self. verts _ to _ mids ( sv, gtype ='vor') path _ len _ tri = np. dot ( np. abs ( self. delta _ tri _ 0. t ), self. vor _ edge _ len ) sd = np. dot ( np. abs ( self. delta _ tri _ 0. t ), self. vor _ edge _ len * sv _ edges ) / path _ l...
[ 0.6274378895759583, 0.03549773246049881, 0.7992046475410461, 0.29907000064849854, -0.4829639196395874, 0.46390923857688904, 0.6216816306114197, -0.520439088344574, 1.2069752216339111, 0.6175538301467896, -0.16393572092056274, 0.47364142537117004, -0.16551484167575836, 0.30210793018341064, ...
def scandllsinsection ( config, section, output _ dir, registered _ dll _ list ) : for option in config. options ( section ) : if option. endswith ('dir') : continue dst = config. get ( section, option ) ( x, src _ folder ) = os. path. split ( dst ) for file in glob. glob ( os. path. join ( output _ dir, option ) ) : i...
[ -0.040057532489299774, -0.6632267832756042, 0.6843822598457336, 0.12851767241954803, -0.024099795147776604, -0.45209699869155884, 0.5880554914474487, -0.07643280923366547, -0.034400664269924164, 0.7655792832374573, -0.2744602859020233, 0.7121758460998535, 0.22899655997753143, 1.16298079490...
def converturls ( urls, fn ) : return [ fn ( url ) for url in urls ]
[ -0.9008765816688538, -0.33667877316474915, 0.5734739303588867, 0.3688444197177887, 0.36556392908096313, -1.146892786026001, -1.19500732421875, 1.5337262153625488, 0.28567391633987427, -0.13195879757404327, -0.600073516368866, -0.1097593903541565, 1.0095930099487305, 0.6041222810745239, -...
def disconnect ( self ) : self. _ state = mqtt _ cs _ disconnecting if self. _ sock is none : return mqtt _ err _ no _ conn return self. _ send _ disconnect ( )
[ -0.14126072824001312, 0.06246492639183998, 0.44708478450775146, 0.1573222130537033, -0.30845537781715393, -0.09426077455282211, -0.06289070099592209, -0.2528180480003357, 0.3289305865764618, -0.366421103477478, 0.24984844028949738, -0.4254035949707031, 0.1417206972837448, -0.01655253581702...
def get _ command _ line _ arguments ( ) : return sys. argv [ 1 : ]
[ -0.22225971519947052, -0.5263862013816833, 0.39978209137916565, 0.5627092719078064, 1.5700591802597046, 0.5875623226165771, -0.7006235718727112, -0.15977296233177185, -0.8474349975585938, -0.2029746174812317, -0.3988223075866699, 0.7869415283203125, -0.8128724694252014, -0.2344408929347992...
def get _ subjects _ for _ specific _ user _ by _ year ( self, admission _ no, year ) : self. curr. execute ( " " " select un. unit _ name, un. unit _ code, us. admission _ no, us. firstname, us. lastname, us. surname, a. year, a. semester from subjects as s inner join units as un on s. unit = un. unit _ name inner joi...
[ 0.30294492840766907, -0.36115312576293945, 0.5919364094734192, -0.29347747564315796, -0.9352046847343445, 0.33209821581840515, 0.14588478207588196, -0.4936583340167999, -0.04306894540786743, 0.5044916868209839, 0.6741628050804138, 0.9275069236755371, 0.3058742582798004, -0.0084085157141089...
def prune ( self, prune _ zero = false, prune _ empty _ list = true ) : for key, val in list ( self. items ( ) ) : if ( ( not val ) and ( ( val! = 0 ) or prune _ zero ) and not isinstance ( val, list ) ) : del self [ key ] elif isinstance ( val, dict ) : val. prune ( prune _ zero, prune _ empty _ list ) if not val : de...
[ -0.5344963669776917, 0.6006775498390198, 0.698705792427063, 0.7973982691764832, -0.4020606577396393, 0.3082095682621002, -0.2217642217874527, 0.9890633225440979, 0.014535780996084213, -0.06896940618753433, 0.100594662129879, -0.9653587341308594, -0.7136799097061157, 0.9903858304023743, -...
def test _ ex _ create _ forwarding _ rule _ targetpool _ keyword ( self ) : fwr _ name = " lcforwardingrule " targetpool = " lctargetpool " region = " us - central1 " address = self. driver. ex _ get _ address ( " lcaddress " ) port _ range = " 8000 - 8500 " description = " test forwarding rule " fwr = self. driver. e...
[ 0.7645484209060669, 0.18027368187904358, 0.21952426433563232, -1.30732262134552, 0.6206740736961365, 1.0624303817749023, -0.5240738987922668, 0.18076764047145844, -0.25741541385650635, 0.08503811806440353, 0.2041357457637787, 0.8626179099082947, -0.2137497067451477, 0.37875017523765564, ...
def _ int _ to _ python ( self, v, desc = none ) : return int ( v )
[ -0.5816630721092224, -0.0859699472784996, 0.14956296980381012, -1.473471760749817, 0.13386039435863495, -0.3310357630252838, -0.4169272184371948, -0.11574064940214157, 0.2500605285167694, 0.20432986319065094, -0.3950978219509125, 0.7995287775993347, -0.048316825181245804, -0.40475615859031...
def convert _ list _ to _ str ( l : list ) - > str : s = " " for e in l : s + = f " { e } " return s [ : - 1 ]
[ -0.8396689891815186, 0.0050862920470535755, 0.5417824387550354, -0.12241623550653458, 0.6062012314796448, 0.46151840686798096, -0.9668471813201904, 0.4436647295951843, 0.1759781688451767, 0.7893869280815125, -0.3511492609977722, -0.30938827991485596, -0.22530440986156464, 0.912126123905181...
def deviation _ heuristic ( graph, src, dest, parents ) : current _ weight = graph. edges [ ( src, dest ) ]. get _ distance ( ) # the current weight with no modification # arbitrarily defined constants speed _ thresh = 0. 15 dev _ thresh = 0. 05 reduce = 0. 7 distance = 0 if src not in parents : # if this is the first ...
[ 0.17739027738571167, 0.7510600686073303, 0.8699382543563843, 0.07889179140329361, -0.6915589570999146, 0.24031727015972137, 0.8056749105453491, 0.409457802772522, -0.15458931028842926, 0.3487091660499573, 0.8907169103622437, 0.19243930280208588, -0.4984719157218933, 0.27624696493148804, ...
def get _ iddoc _ pert ( self ) : return self. iddoc _ pert
[ 0.06406211107969284, -0.3204726576805115, 0.541005551815033, -0.7871741652488708, -0.11568169295787811, 0.6913547515869141, 0.41383183002471924, -0.7947185635566711, 0.6301442980766296, 0.06638725101947784, 0.43116700649261475, -0.46304941177368164, -1.7604671716690063, -0.6269420385360718...
def _ _ str _ _ ( self ) - > str : output = " " output + = f " name : { self. name } \ n " output + = f " offset : { self. offset } bits \ n " output + = f " width : { self. width } bits \ n " output + = f " access : { self. access } bits \ n " output + = f " reset val : { self. reset _ value } \ n " output + = f " des...
[ -0.4898386597633362, -1.273705244064331, 0.8819469809532166, -1.041846752166748, -0.6415261626243591, 0.39552953839302063, -0.13301816582679749, -0.94590163230896, -0.36618882417678833, 0.5984177589416504, -0.027836492285132408, 1.117601752281189, -0.027103817090392113, 0.3140079379081726,...
def main ( global _ config, * * settings ) : config = configurator ( settings = settings ) config. include ('pyramid _ chameleon') config. add _ route ('microservice ','/ microservice / { service _ class } / { service _ method } /') config. add _ view ( microservicedispatcher, route _ name ='microservice ', attr ='disp...
[ 0.4321184456348419, 1.0189383029937744, 0.5464190244674683, 0.293865829706192, -0.8391504287719727, 0.31927672028541565, 0.8310813903808594, 0.4003067910671234, -0.018078848719596863, -0.0450718030333519, -0.006872139871120453, -0.3941844701766968, -0.33268648386001587, 0.11180774867534637...
def _ add _ combine _ parts ( args, cur _ out, data ) : base _ data = args [ cur _ out ] file _ key = _ get _ combine _ key ( base _ data ) assert base _ data [ " combine " ] [ file _ key ] [ " out " ] = = data [ " combine " ] [ file _ key ] [ " out " ] base _ data [ " combine " ] [ file _ key ] [ " extras " ]. append ...
[ -0.49992477893829346, -1.101101279258728, 0.5842500329017639, -0.3538992702960968, 0.6989414691925049, 0.17092479765415192, -0.6083609461784363, 0.31088876724243164, -0.25979962944984436, 0.5093480944633484, 0.3327907621860504, 0.09468907862901688, -0.2994330823421478, 0.10663338005542755,...
def commit ( self ) : self. conn. commit ( )
[ -0.10179439932107925, -0.687890350818634, 0.46742385625839233, 0.45302343368530273, 1.064576268196106, 0.5892942547798157, 0.40382882952690125, 0.9556378722190857, -1.493484377861023, 1.0510567426681519, 0.114323191344738, -0.47154393792152405, -0.9571385979652405, -0.14965388178825378, ...
def _ _ init _ _ ( self ) : self. buckets = 1000 self. map = [ [ ] for _ in range ( self. buckets ) ]
[ -0.34321579337120056, -0.3574376106262207, 0.6303021907806396, 0.0664343610405922, -0.001528037479147315, 0.17831696569919586, 0.07193274050951004, 0.3319087028503418, 0.46604111790657043, -0.6606999039649963, -1.2509273290634155, -0.1384950578212738, 0.8960542678833008, 0.7383052706718445...
def load _ pcd ( path ) : # todo : load ply file, for the soma mesh pc2 = pcl. load ( path ) return pc2
[ 0.9085953831672668, -0.5634843111038208, 0.2632530927658081, -0.2516731321811676, -1.5412338972091675, 0.9248021245002747, 0.29848814010620117, -0.5542839765548706, 0.1200782060623169, -0.11512807011604309, 0.4390121400356293, -0.4298551380634308, -1.4118074178695679, -0.8882118463516235, ...
def to _ smash ( total _ candies, number _ of _ candidates ) : return total _ candies % number _ of _ candidates
[ -0.39783862233161926, 0.04613730311393738, 0.4187464714050293, 0.09051867574453354, 0.06433895230293274, -0.6676845550537109, 0.3995912969112396, 1.5848218202590942, 0.3502199053764343, 0.49597665667533875, -0.6162188649177551, -0.18123914301395416, -0.19132199883460999, -0.880116164684295...
def move ( self, * args ) : return _ topods. topods _ shape _ move ( self, * args )
[ -1.25640869140625, -0.26212385296821594, 0.3440873324871063, 0.11501935869455338, 0.447003573179245, 0.8473145365715027, 0.7532615065574646, -0.8946433067321777, -0.5505126714706421, 0.2687712609767914, -0.6485010385513306, -0.1784902662038803, -0.3174395263195038, -0.7838031649589539, -...
def test _ valid _ read ( self ) : valid1 ='n00cchat message00000032 { " message " : " hi ", " from " : " nthn ", " chat _ room " : " gonuts " }'message = read _ message ( valid1, _ proto _ version ) self. assertisinstance ( message, notificationmessage ) self. assertequal ( message. name, " chat message " ) self. asse...
[ 0.1870964616537094, 0.30740976333618164, 0.6868225932121277, 0.3130585849285126, -0.34012386202812195, 0.774440348148346, -0.29665642976760864, -0.2117552012205124, -0.39401739835739136, -0.6783196330070496, 0.009162385016679764, -0.09791265428066254, -0.4168941378593445, -0.22019986808300...
def _ real _ departure _ time ( self ) - > datetime : return self. departure + timedelta ( minutes = self. delay )
[ 0.3823046088218689, 0.27527397871017456, 0.6226020455360413, -0.8149781823158264, -1.3082470893859863, 0.1979951709508896, -1.2515052556991577, 0.16474083065986633, 0.2630176544189453, -0.10163338482379913, -0.15442314743995667, -1.1776537895202637, 0.6532490849494934, -0.00708258943632245...
def restart _ program ( ) : os. execl ( sys. executable,'python ', _ _ file _ _, * sys. argv [ 1 : ] )
[ -0.0420098602771759, -0.6256622076034546, 0.6264927983283997, 0.09943419694900513, 0.7453974485397339, 0.8941019177436829, 0.3514705002307892, 0.3506353795528412, -0.8904796838760376, 0.16445618867874146, -0.15627560019493103, 1.4035359621047974, -0.5374494194984436, -0.7278446555137634, ...
def z _ max ( self ) - > float : return self. nz * self. dz
[ 0.15472543239593506, 0.5085398554801941, 0.27467647194862366, 1.1059436798095703, -0.265321284532547, -0.13005511462688446, 0.10785410553216934, -0.4089955687522888, 0.9381235241889954, -0.19389155507087708, -0.5204502940177917, 0.20884057879447937, -0.2325545847415924, -0.1591612845659256...
def test _ subscription _ api _ with _ paid _ event ( self ) : data = { " event _ id " : self. event. id, " user _ id " : self. user _ id, " no _ of _ tickets " : 4, " card _ number " : 5039303342356004, " expiry _ year " : 2022, " expiry _ month " : 7, " amount " : 400, " discount _ amount " : 0 } response = self. cli...
[ 1.3581968545913696, -0.8272839784622192, 1.1599187850952148, 0.772598147392273, 0.02802419662475586, 0.5293823480606079, -0.6994344592094421, -0.10377001762390137, 0.5756970643997192, -0.48757675290107727, -0.44002899527549744, -0.21070964634418488, 0.06889431923627853, 0.4569779336452484,...
def list _ languages ( target _ language = " english " ) : from google. cloud import translate _ v2 as translate translate _ client = translate. client. from _ service _ account _ json ( translation _ key _ path + " / knowledge - bot - development - b8ed9d8c16cb. json " ). from _ service _ account _ json ( ) languages ...
[ -0.14416281878948212, -0.32562458515167236, 0.49830561876296997, -0.34626924991607666, 0.2715861201286316, 0.06948641687631607, -1.066774606704712, 0.1789560317993164, -0.24196742475032806, 0.4511777460575104, -0.3734234869480133, 1.1623995304107666, 0.8196665644645691, 0.2668975293636322,...
def check _ input ( valid _ number ) : # function which checks all user input, whether it is valid ( whole positive numbers ) or invalid value = none while not value : # creates a loop so it will keep going till user input is valid value = input ( valid _ number ) if not value. isnumeric ( ) : # if input is not a numbe...
[ 0.48287931084632874, -0.42494550347328186, 0.49874192476272583, 1.2183293104171753, -0.30182650685310364, 1.1241801977157593, 0.36071687936782837, 0.30385062098503113, 0.01943771168589592, -1.1769708395004272, 0.7631345987319946, 0.31197208166122437, -0.7681550979614258, -0.110648483037948...
def get _ location _ by _ location _ name ( self, location _ name = false ) : location = false # for loc in self. locations : # if location _ name is false and location is false : # location = loc # elif loc ['locationname'] = = location _ name : # location = loc if location is false : raise exception ('could not selec...
[ -0.4002670645713806, -0.6342509388923645, 0.13870477676391602, 0.43359115719795227, 0.31628480553627014, -0.37948471307754517, 0.7439422011375427, -0.0020869893487542868, 0.12361131608486176, 0.33307185769081116, 0.5050190091133118, -0.49966591596603394, -0.7361660599708557, -0.14400728046...
def _ translate _ _ interfaces _ interface _ ipv4 _ address ( input _ yang _ obj, translated _ yang _ obj = none ) : translated _ yang _ obj. type = " main " if input _ yang _ obj. prefix _ length. _ changed ( ) : translated _ yang _ obj. mask = exchange _ maskint ( input _ yang _ obj. prefix _ length ) if input _ yang...
[ -0.7869313359260559, -0.3575264811515808, 0.422972708940506, -0.7618609666824341, -0.38122478127479553, -0.18107181787490845, 1.2912055253982544, -0.3055393695831299, 1.1755799055099487, 0.4370627701282501, -0.25284767150878906, 0.23022790253162384, -0.14882627129554749, -0.258188992738723...
def do _ post ( cls, data : dict ) : if not type ( data ) = = dict : logging. error ('there is a wrong data trying to do a post') raise typeerror ('data should be a dict') request _ data = {'token': env. pushover _ token,'user': env. pushover _ user } request _ data. update ( data ) return post ( cls. api _ url, data =...
[ -0.7487905621528625, 0.32319051027297974, 0.7200368642807007, 0.4246324598789215, 0.09678179025650024, 0.19931085407733917, -1.4360557794570923, -0.19013741612434387, -0.11117716878652573, -0.24327056109905243, 0.20437899231910706, -0.31457728147506714, -0.4069589078426361, 0.1290203928947...
def run ( self ) : result = self. dlg. exec _ ( ) if result : drone _ map = dronemap ( self. iface, self. dlg. pathlineedit. text ( ) ) drone _ map. process ( step _ guess _ orientation = self. dlg. orientationcheckbox. ischecked ( ), step _ advanced _ alignement = self. dlg. advancedalignementcheckbox. ischecked ( ), ...
[ -0.5611361861228943, -0.33857661485671997, 0.5391721129417419, 0.26019996404647827, 0.20389162003993988, 0.18898355960845947, 0.7188292145729065, -0.1205681785941124, -0.30508390069007874, -0.42556577920913696, -0.35122233629226685, -0.5945085883140564, -0.11868130415678024, 1.175983786582...
def create _ game ( self, needed _ players ) : game = game ( self. latest _ game _ id, self, needed _ players ) self. games [ self. latest _ game _ id ] = game self. latest _ game _ id + = 1 return game
[ -1.1927964687347412, -0.4157697260379791, 0.5817796587944031, -0.4939563274383545, 1.0423901081085205, 1.1197096109390259, -1.4879456758499146, -0.5133215188980103, -0.6238421201705933, 0.7923617959022522, 0.23925575613975525, -0.5976893305778503, -1.473328709602356, 0.22484122216701508, ...
def get _ course _ modules ( course _ id, query _ params ) : dept _ modules = { } if not query _ params. get ('only _ available') is none : if strtobool ( query _ params. get ('only _ available') ) : _ get _ available _ course _ modules ( dept _ modules, course _ id, query _ params ) return dept _ modules if not query ...
[ -1.226999282836914, 0.1270461231470108, 0.5752855539321899, -0.310856431722641, 0.7398287057876587, 0.8273672461509705, -0.11341189593076706, -0.05662275105714798, 0.20805999636650085, 0.47463667392730713, 0.12423612922430038, 0.5863860249519348, 0.20151637494564056, 0.9292048215866089, ...
def print _ next _ steps _ info ( repo ) : logging. info ( " setting up \ " % s \ " repository ", repo )
[ 0.362931489944458, 0.4039930999279022, 0.42980992794036865, 0.10561217367649078, -0.44664663076400757, 0.1718674600124359, 0.0024348553270101547, -0.1222454085946083, -0.44403064250946045, -0.2589030861854553, -0.3207405209541321, 0.02527778595685959, 0.8961608409881592, 0.9875650405883789...
def remove _ item ( self, item ) : self. items. remove ( item )
[ -0.8376655578613281, 0.07533523440361023, -0.05304519459605217, 0.16992272436618805, 0.4187154173851013, 0.8540370464324951, -0.275771826505661, 0.6133840084075928, 0.19596968591213226, 0.004815349821001291, -0.879541277885437, -0.4221624732017517, -0.4277905225753784, -0.3459491729736328,...
def recipient _ checker ( request ) : recipient _ id = request. get. get ('recipient') # sender and recipient must be specified in url if recipient _ id is none : raise musthaverecipient # sender and recipient can't be the same user if int ( recipient _ id ) = = request. user. id : raise recipientcantbeself # check if ...
[ 0.2113708257675171, -0.11781473457813263, 0.7672830820083618, 0.37043777108192444, -0.40380555391311646, 0.08871053904294968, 0.5556274652481079, 0.0639529600739479, 0.41738468408584595, 0.7281941175460815, 1.030914068222046, 0.48003676533699036, -0.22774861752986908, 0.3801640570163727, ...
def create ( self, validated _ data ) : return film. objects. create ( * * validated _ data )
[ -0.2343854010105133, -0.912386953830719, 0.1432550549507141, 1.0433903932571411, -0.22912755608558655, 1.3636871576309204, -0.9385575652122498, 0.22981153428554535, -0.1412506252527237, -0.9619772434234619, -1.400030255317688, 0.1477280706167221, -0.9710635542869568, -0.32583239674568176, ...
def get _ node _ data _ trend ( self ) : data _ loss _ io _ total = self. get _ node _ data _ loss _ io _ total ( ) # monitor _ alert = self. get _ node _ monitor _ alerts ( ) result _ table _ id = self. node _ handler. result _ table _ ids [ 0 ] data _ loss _ io _ total [ result _ table _ id ] [ " alert _ list " ] = m...
[ -0.10362463444471359, 0.1408943086862564, 0.6026663184165955, -0.13967512547969818, 0.4133134186267853, -0.1326894760131836, 0.8655127882957458, -0.8326659202575684, -0.33932024240493774, -0.319164514541626, -1.4891663789749146, 1.1545233726501465, 0.7398002743721008, -0.10809458792209625,...
def _ _ init _ _ ( self, program : optional [ str ] = none ) - > none : self. reset ( ) # if program : # self. eval ( program )
[ 0.0696956217288971, 0.06660733371973038, 0.45335444808006287, 0.42091628909111023, 0.124709352850914, 0.5911970138549805, 0.3851619362831116, 0.9741136431694031, 0.7297829985618591, -0.17939284443855286, -0.2942986488342285, 0.6320950984954834, -0.4982258975505829, 0.051383327692747116, ...
def act ( self, action ) : if action = ='exit': return'', true elif action = =': solve': return self. _ act _ solve ( ) elif action = =': solve - all': return self. _ act _ solve _ all ( ) elif action = =': undo': return self. _ act _ undo ( ) elif action = =': attempts': return self. _ act _ attempts ( ) elif action =...
[ -1.4725139141082764, -0.7602531909942627, 0.7773039937019348, 0.23917505145072937, -0.7923243045806885, 0.23447206616401672, 0.9746283292770386, -0.9230286478996277, 0.7249534726142883, 0.9458158612251282, -0.031877949833869934, 0.22586841881275177, -0.22258450090885162, -0.671461284160614...
def load ( self, prefix _ list ) : for prefix in prefix _ list : self. insert ( prefix )
[ -0.48022252321243286, 0.5410866737365723, 0.22544266283512115, 0.3436552882194519, 0.7237341403961182, 0.3409346640110016, -0.7612772583961487, 0.5965433120727539, 0.5059159398078918, 0.8833669424057007, -1.8193273544311523, -0.5994560122489929, -0.9555865526199341, 0.8226238489151001, -...
def main ( ) : dock _ id = initialize _ dock ( ) # need to initialize with current bike dock = dock ( dock _ id, bike _ id = 1 ) dock. start ( )
[ 0.5187586545944214, 0.5237837433815002, 0.31298309564590454, 1.8710538148880005, 1.1086947917938232, 0.5488976240158081, 1.4319744110107422, 0.5416611433029175, -0.4653432369232178, -0.5114563703536987, 0.14315059781074524, 1.2112942934036255, -0.2034105509519577, 0.9709092378616333, 0.2...
def test _ new _ user _ invalid _ email ( self ) : with self. assertraises ( valueerror ) : get _ user _ model ( ). objects. create _ user ( none,'123456')
[ 0.7539501786231995, 0.7973654866218567, -0.03163386508822441, 0.48647984862327576, 0.6841270327568054, 0.6130332350730896, -0.23800189793109894, 0.4448552131652832, -0.3421485424041748, -0.4428541660308838, -0.9232940673828125, -0.2954312860965729, -0.5478194355964661, 0.3318292200565338, ...
def receive ( self ) : if self. _ socket is none : raise runtimeerror ( " socket must be connected first! " ) return self. _ socketclient. recv ( self. _ buffer _ size ). decode ('utf - 8')
[ 0.4173928499221802, 0.11762841790914536, 0.5928932428359985, -0.7981645464897156, -0.4719734787940979, -0.1769980937242508, -0.8213202357292175, -0.4066120684146881, -0.5441014766693115, -0.5838829278945923, -0.5401889085769653, 0.6550453305244446, -1.028180718421936, -0.6164447069168091, ...
def isnotequal ( self, * args ) : return _ topods. topods _ shape _ isnotequal ( self, * args )
[ -1.0514336824417114, 0.07986707985401154, 0.5189162492752075, 0.22207997739315033, 1.0351371765136719, 0.717185914516449, 0.45009371638298035, -1.0425549745559692, -0.12991148233413696, 0.14070188999176025, -0.7680930495262146, -0.4222007393836975, -1.2239915132522583, 0.5410205125808716, ...
def _ body ( self ) : return self. browser. element ( self. body, parent = self )
[ 0.2549981474876404, -0.10698115080595016, 0.489399790763855, 0.09331142902374268, -0.5021901726722717, 0.7494380474090576, 0.27668169140815735, -1.3531899452209473, 1.3678767681121826, -0.9728024005889893, -0.2322835475206375, 0.3509640097618103, 0.12739525735378265, 0.3212754726409912, ...
def test ( ) : # access the package import p2. calc # make a symbol table model = p2. calc. symboltable ( ) # make a list of numbers values = ( 95, 100, 90, 95, 100, 90, 85 ) # add it to the model as a node grades = model. list ( name = " grades ", value = values ) # check the keys assert set ( model. keys ( ) ) = = { ...
[ -0.09225142002105713, 0.5754136443138123, 0.5235452651977539, -0.40363332629203796, 0.4510652720928192, 0.8708925247192383, -0.08693564683198929, 0.019132941961288452, -0.3954668939113617, -0.5811498165130615, -1.0428547859191895, -0.46522125601768494, 0.7523348331451416, 0.179349973797798...
def special _ vars ( self ) : today = datetime. datetime. today ( ) variables = {'_ timestamp': today. strftime ('% y - % m - % dt % h : % m : % sz'),'_ datetime': today. strftime ('% y - % m - % d % h : % m'),'_ date': today. strftime ('% y - % m - % d'),'_ time': today. strftime ('% h : % m'),'_ year': today. strftim...
[ -0.7813855409622192, -0.5601158738136292, 0.8621473908424377, -0.8728617429733276, -1.1451112031936646, 0.33783698081970215, -1.585003137588501, -0.5793702602386475, -0.8048976063728333, 0.3605536222457886, -0.9124229550361633, 0.6727646589279175, 0.6886780858039856, -0.05303709954023361, ...
def setup ( self ) : self. hass = get _ test _ home _ assistant ( ) self. yaml _ devices = self. hass. config. path ( device _ tracker. yaml _ devices )
[ 0.5439632534980774, -0.009157426655292511, 0.37561044096946716, 0.4714706242084503, 1.134128451347351, -0.13601893186569214, 0.9969766736030579, 0.9161107540130615, 0.5585086941719055, -0.6201372146606445, -0.7434213757514954, -0.019329598173499107, 0.7454017400741577, 1.062269926071167, ...
def predict _ timepoints ( self, labels, trainingtrials = none, datatransform = none, method = sklearn. linear _ model. logisticregressioncv ( ) ) : pass
[ -0.7255546450614929, 0.3036118447780609, 0.2544064521789551, 0.21398480236530304, 0.6165263056755066, -0.19251033663749695, -0.868572473526001, 0.10740344971418381, 0.07700063288211823, -0.0012573587009683251, -0.29978007078170776, -0.31932592391967773, -0.23301224410533905, -0.35448673367...
def user ( request, profile _ id ) : if request. post : display _ post ( request ) # # # # # # # # # # # post message # # # # # # # # # # try : request. post [ " new _ message " ] profile = models. user. objects. filter ( id = profile _ id ) [ 0 ] new _ message = models. message. objects. create ( content = request. po...
[ 0.11896567791700363, -1.0081461668014526, 1.3512119054794312, 0.3094732463359833, 0.34317171573638916, 0.12419673800468445, 1.6818149089813232, -0.9072937369346619, -0.036385077983140945, -0.0636742115020752, -0.3639231324195862, -0.3299223780632019, 0.1030673012137413, 0.7926316857337952,...
def find _ neighbor _ nodes ( network, inds, flatten = true, include _ input = false, logic ='or') : g = network nodes = np. array ( inds, ndmin = 1 ) # short - circuit the function if the input list is already empty if len ( nodes ) = = 0 : return [ ] am _ coo = dict _ to _ am ( g ) am = am _ coo. tolil ( copy = false...
[ -0.3446004092693329, 0.5160694718360901, 0.876900851726532, 0.8127586245536804, -0.3792096674442291, -0.3862609267234802, 0.6094248294830322, 0.3221411406993866, 0.4248007833957672, 1.2006281614303589, 0.5834272503852844, 0.4279100298881531, -0.3782186508178711, 0.36348751187324524, -0.3...
def test _ repr _ makes _ object ( ) : m = morse ( [ " hello, ", " world! " ] ) from _ repr = eval ( repr ( m ) ) assert from _ repr = = m
[ -0.39013388752937317, -0.6764001250267029, 0.39006850123405457, -0.272713840007782, -0.7181674242019653, 0.8899093866348267, 0.34541240334510803, 0.6190010905265808, 1.1534401178359985, -0.5241205096244812, -0.9911404252052307, 0.46807822585105896, 0.20723794400691986, -0.9760439395904541,...
def undo ( self ) : if len ( self. label _ buffer ) > 1 : self. labels = self. label _ buffer [ - 2 ]. copy ( ) self. label _ buffer = self. label _ buffer [ : - 1 ] self. plot ( ) print ( " undid last operation " ) else : print ( " can't undo the last operation " )
[ 0.009849375113844872, 0.13684023916721344, 0.8250128030776978, -0.5135272741317749, 0.14368963241577148, 0.8730970025062561, 1.1895114183425903, 0.9990541338920593, 0.22971488535404205, -0.11080718040466309, 0.3756762742996216, 0.43688488006591797, -0.6867921948432922, -1.1652231216430664,...
def initgui ( self ) : icon = qicon (': / plugins / quick _ drone _ map / icon. png') self. action = qaction ( icon,'run quick drone map ', self. iface. mainwindow ( ) ) self. action. triggered. connect ( self. run ) self. toolbar. addaction ( self. action ) self. iface. addplugintomenu ( self. menu _ name, self. actio...
[ -0.37903907895088196, -0.45017728209495544, 0.5518503785133362, -0.12458784878253937, 0.1592196226119995, -0.13445591926574707, 0.4260745644569397, 0.0019997144117951393, 0.18522702157497406, -0.6336086988449097, -1.312334418296814, 0.3677879869937897, 0.07416316121816635, 0.76480549573898...
def power _ off ( self ) : result = self. manager. api. query ( ). servers ( self. id ). action. post ( { " action " : " poweroff " } ) return result
[ -0.9122653603553772, 0.2240014523267746, 0.4069555103778839, -0.10875459015369415, 0.8715291619300842, -0.06619912385940552, -0.22345194220542908, 0.024095090106129646, -0.05877568945288658, -0.06326596438884735, -0.2336987555027008, 0.9563789367675781, -1.6584721803665161, 0.0847712084650...
def winner ( board ) : for i in range ( 3 ) : if board [ i ] [ 0 ] = = board [ i ] [ 1 ] and board [ i ] [ 1 ] = = board [ i ] [ 2 ] and board [ i ] [ 1 ]! = empty : return board [ i ] [ 0 ] elif board [ 0 ] [ i ] = = board [ 1 ] [ i ] and board [ 1 ] [ i ] = = board [ 2 ] [ i ] and board [ 1 ] [ i ]! = empty : return ...
[ 0.7563433647155762, -0.11499887704849243, 1.3403083086013794, 0.34140652418136597, -0.42603254318237305, 0.24526140093803406, 0.5784752368927002, -0.17009063065052032, 0.6525847911834717, 0.7204037308692932, -0.20478223264217377, -0.06789571791887283, -0.3072737753391266, -0.69816261529922...
def execute ( self ) : self. publish _ numbers ( ) self. spin ( )
[ 0.07180147618055344, -0.16584499180316925, 0.1428031474351883, 1.3057993650436401, 0.7301679849624634, 0.41923749446868896, 0.8393493294715881, 1.3267920017242432, 0.009680820629000664, -0.18685129284858704, -0.28298866748809814, 0.29698237776756287, -0.6503444910049438, 0.2945210635662079...
def put ( org _ id ) : request _ json = request. get _ json ( ) login _ option _ val = request _ json. get ('loginoption') # todo may be add validation here try : login _ option = orgservice. update _ login _ option ( org _ id, login _ option _ val ) response, status = jsonify ( {'login _ option': login _ option. login...
[ -1.4514150619506836, -0.6310324668884277, 0.5909599661827087, 0.10397543013095856, 0.00594452815130353, 0.3871019184589386, -0.04557344317436218, 0.13723905384540558, 0.9406275749206543, 0.9856318831443787, -0.8805702328681946, 0.5972934365272522, -0.5061503648757935, -0.8135362863540649, ...
def julian _ date ( dt = none, year = none, month = 1, day = 1, hour = 0, minute = 0, second = 0, modified = true ) : if all ( p is none for p in ( dt, year ) ) : dt = datetime. datetime. now ( ) if dt is none : dt = datetime. datetime ( year = year, month = month, day = day, hour = hour, minute = minute, second = seco...
[ 0.10319671034812927, 0.23256561160087585, 0.8243056535720825, 0.6534325480461121, -1.1808111667633057, 0.19084033370018005, -0.7744535803794861, 0.08136315643787384, -0.11656932532787323, -0.5974555611610413, 0.37741515040397644, 0.06372883915901184, -0.7785084843635559, 0.3023938238620758...
def _ get _ coop _ documents _ list ( business ) : coop _ documents = { } if not business : return coop _ documents base _ url = current _ app. config. get ('legal _ api _ base _ url') base _ url = base _ url [ : base _ url. find ('/ api') ] business _ id = business. id business _ identifier = business. identifier coop...
[ -0.5629377365112305, -0.6032810807228088, 0.7093337178230286, -0.04012628272175789, -0.030647747218608856, 0.12776735424995422, -0.0010759241413325071, 0.15757760405540466, -0.5251520872116089, 0.9242680072784424, -0.4603124260902405, 0.34661033749580383, -0.4330022931098938, 1.10126662254...
def set _ params _ from _ array ( self, params ) : pass
[ -0.9409613013267517, -0.9035476446151733, 0.15405073761940002, 0.5934968590736389, 0.8336775302886963, 0.7042487859725952, -0.6571018099784851, -0.09147877246141434, -0.2771317660808563, 1.0693087577819824, 0.07976166903972626, 0.777923583984375, -0.23197990655899048, 0.9800848364830017, ...
def solve ( self, use _ cache = true, parallel = true, * * kwargs ) : if parallel : self. _ solve _ all _ parallel ( use _ cache ) else : self. _ solve _ all ( use _ cache )
[ -0.6729515790939331, 1.1703375577926636, 0.5052188038825989, 1.396298885345459, 0.959949254989624, -0.1690165251493454, -0.2060273438692093, 0.4222222864627838, 0.002517744665965438, -0.10652555525302887, -0.37692001461982727, -0.4205191433429718, -0.47897571325302124, 0.31207942962646484,...