text
stringlengths
25
2.19k
embedding
listlengths
768
768
def get _ k _ for _ topk ( k, size ) : ret _ k = - 1 if k < = 0 or size < = 0 : return ret _ k if k < size : ret _ k = k else : # ret _ k is - 1 pass return ret _ k
[ -0.5981347560882568, -0.5530813336372375, 0.6146114468574524, 0.39417335391044617, -0.6806228756904602, 0.2800627648830414, 0.420010507106781, -0.03752951696515083, -0.5707626342773438, -0.5734395384788513, 0.24456092715263367, -0.07409267127513885, -0.19212807714939117, 0.1586412340402603...
def bank _ trade ( self, game _ state ) :
[ 0.08100999146699905, 0.4305616319179535, 0.3626076281070709, 0.4042951166629791, 1.8602724075317383, 0.8919324278831482, 0.40684953331947327, -0.4935293197631836, -0.26249951124191284, 0.01246075239032507, -0.7191535830497742, 0.6252952218055725, 0.12139943987131119, -0.1291431188583374, ...
def backward _ pass ( self, x, y, y _ hat ) : self. w _ - = self. lr _ / x. shape [ 0 ] * ( np. dot ( x. t, ( y _ hat - y ) ) + self. lambda _ * self. w _ )
[ 0.17830273509025574, -0.696495771408081, 0.8011888861656189, -0.7042040228843689, 0.48818740248680115, 0.24128781259059906, 0.05269675701856613, -0.3693493604660034, -0.9198546409606934, -0.31124264001846313, 0.07641887664794922, 1.0699962377548218, 0.9845535159111023, 0.24724863469600677,...
def get _ index _ pages ( base _ url = base _ url ) : index _ url = " { 0 } index _ small / ". format ( base _ url ) get _ resp = requests. get ( index _ url ) soup = beautifulsoup ( get _ resp. text,'html. parser') page _ urls _ rel = [ link. get ('href') for link in soup. find _ all ('a') ] [ 5 : ] page _ urls = [ " ...
[ -0.6420793533325195, -0.07665129750967026, 0.554444432258606, 0.2158745676279068, 0.6258052587509155, -0.0420631542801857, -0.2640250027179718, 0.36117854714393616, 0.7404331564903259, 0.23795318603515625, -0.7660078406333923, -0.2298801988363266, -0.21740242838859558, -0.3169812560081482,...
def to _ dict ( d, default = none ) : if d is none : return { } if isinstance ( d, dict ) : return d res = { } for e in d : if isinstance ( e, list ) or isinstance ( e, tuple ) : res [ d [ 0 ] ] = d [ 1 ] else : res [ d [ 0 ] ] = default return res
[ -1.205973505973816, 1.0796184539794922, 0.4365352392196655, 0.1968410164117813, -0.3216707706451416, -0.6834741830825806, -0.13030840456485748, 0.322172611951828, 0.11459244042634964, 0.39169883728027344, -0.4566631317138672, -0.022325055673718452, 0.0390181690454483, 0.08497384190559387, ...
def get _ all _ volume _ groups ( root _ helper, vg _ name = none ) : cmd = lvm. lvm _ cmd _ prefix + ['vgs ','- - noheadings ','- - unit = g ','- o ','name, size, free, lv _ count, uuid ','- - separator ',': ','- - nosuffix'] if vg _ name is not none : cmd. append ( vg _ name ) ( out, _ err ) = putils. execute ( * cmd...
[ -0.08108731359243393, 0.08344406634569168, 0.5951108336448669, 0.13715195655822754, -0.5555791854858398, -0.5193662047386169, -1.5713164806365967, 0.127329483628273, -0.5740885734558105, 1.0311789512634277, -0.17267927527427673, 0.47953474521636963, -0.41256994009017944, 0.706372082233429,...
def processdocuments ( self, containerlist, styletype = " rowwise _ by _ id ", filtertype = " none ", dataselectors = none, slicefilter = none, usenameflag = true, collectionname = none ) : schemadatadictlist = [ ] containeridlist = [ ] rejectidlist = [ ] for container in containerlist : schemadatadictbyid, _, rl = sel...
[ -1.06735098361969, 0.07696175575256348, 0.8968313336372375, -0.32437074184417725, -0.07782062143087387, -0.17718400061130524, -0.13636177778244019, 0.10759202390909195, 0.6047083735466003, 0.1164109855890274, -0.7252168655395508, -0.2927836775779724, -0.27003946900367737, 0.413825988769531...
def raw _ team _ attributes _ statistics ( ) : team _ attributes = pd. read _ sql ( " select * from team _ attributes ", getdata. conn ) print ('columns : ', len ( team _ attributes. columns ) ) print ('rows with nans : ', len ( team _ attributes ) - len ( team _ attributes. dropna ( ) ) ) print ( team _ attributes. de...
[ 0.1538013219833374, 0.6758428812026978, 0.6015884280204773, -0.8927759528160095, -0.33748793601989746, 0.09628938883543015, 0.3541491627693176, -0.05540716275572777, -0.8562777638435364, 0.120355024933815, -0.053654745221138, 0.7455529570579529, 1.2576967477798462, -0.3957263231277466, 0...
def set _ attribute ( self, key, val, _ flow = _ down ) : key = self. _ attributes _ t _ keycheck ( key ) us _ key = self. _ attributes _ t _ underscore ( key ) return self. _ attributes _ i _ set ( us _ key, val, flow = _ flow )
[ -1.165156602859497, 0.20596857368946075, 0.2758171856403351, 0.04384887218475342, -1.3118754625320435, -0.024419808760285378, -0.05911142751574516, -0.22662684321403503, -0.19370099902153015, 0.8252385854721069, 0.10596213489770889, 0.5119107961654663, 0.2810041010379791, -0.09690048545598...
def two _ sample _ conf _ int ( x, y, cl = 0. 95, alternative = " two - sided ", seed = none, reps = 10 * * 4, stat = " mean ", shift = none, plus1 = true ) : # print warning warnings. warn ('this function is under construction and outputs may be unreliable.') assert alternative in ( " two - sided ", " lower ", " upper...
[ -0.3439663052558899, -0.16614927351474762, 0.9053232669830322, 0.08652641624212265, -1.085585594177246, -0.37468573451042175, 0.1476106345653534, -0.576062023639679, -0.5638751983642578, 0.8563157320022583, 0.35509756207466125, 0.5224884152412415, 0.7066947221755981, -0.26917797327041626, ...
def _ get _ time ( header, keys, name ) : for key in keys : try : return header. pop ( key ). timestamp ( ) except keyerror : continue raise _ objectunsupportedoperation ( name )
[ -0.5335878729820251, 0.2537528872489929, 0.5597195029258728, 0.3699641227722168, -0.5558062791824341, -1.008190631866455, -1.4236291646957397, -0.3806266784667969, -1.2242779731750488, 1.874382495880127, -0.7188656330108643, -0.9731196165084839, -0.41924846172332764, -0.408452570438385, ...
def return _ home ( self ) : if self. current _ pos! = ( 0, 0 ) : self. pen _ up ( ) self. send _ command ( return _ home ) self. current _ pos = ( 0, 0 )
[ 0.1119731217622757, -0.6955875754356384, 0.5348628759384155, 0.9884840846061707, 0.30729636549949646, 0.2758629024028778, 1.440000295639038, -0.3592636287212372, 0.18197782337665558, 0.7828668355941772, 0.29829347133636475, 0.24204018712043762, -1.5539213418960571, -0.7691195607185364, -...
def hint _ pose _ qw ( self ) : return self. get _ input ( " hint _ pose _ qw " )
[ 0.4076964855194092, 0.6366698741912842, 0.5809339880943298, 0.9322331547737122, -0.5571175217628479, 0.6924886107444763, 0.7325479984283447, -1.4882981777191162, 0.6177611947059631, -0.5398034453392029, -0.48784926533699036, 0.22900553047657013, -1.3887832164764404, -0.3261115550994873, ...
def win ( self, victory, die, rack, screen ) : tm = themaze ( ) sd = sound _ and _ message ( ) if victory : sd. victory ( screen ) for i in range ( 0, 24 ) : print ( " you win! " ) elif die : sd. death ( screen ) for i in range ( 0, 24 ) : print ( " you die! " ) print ( " you die with a slow, painful death. " )
[ -0.2040366679430008, 0.19322450459003448, 0.5857028365135193, 1.515702486038208, 0.957654595375061, -0.3635173738002777, 0.17839057743549347, -0.027318982407450676, -0.27940353751182556, -0.2110324501991272, 0.21123556792736053, 0.19684839248657227, 0.16695423424243927, 0.5148829817771912,...
def rotation _ to _ align ( a, b ) : # define an axis of rotation. normal = np. cross ( a, b ) n = normal / np. linalg. norm ( normal ) # compute the cosine and sine of the rotation angle. d = np. linalg. norm ( a ) * np. linalg. norm ( b ) c = a. dot ( b ) / d s = ( 1 - c * * 2 ) * * 0. 5 # the identity. i = np. eye (...
[ 0.2514496147632599, 0.08690749108791351, 0.8156940340995789, -0.45433488488197327, -0.26102185249328613, -0.543746829032898, 0.5060881972312927, 0.6405894756317139, 0.06514593958854675, 1.244490623474121, 0.7610405087471008, 0.05499441921710968, -0.6010543704032898, -1.456482172012329, 0...
def provision _ ec2 _ node ( *, modules, host, identity _ file, cluster _ info ) : with paramiko. client. sshclient ( ) as client : client. load _ system _ host _ keys ( ) client. set _ missing _ host _ key _ policy ( paramiko. client. autoaddpolicy ( ) ) while true : try : client. connect ( username = " ec2 - user ", ...
[ -0.15729542076587677, -0.7557496428489685, 0.6420170068740845, 0.4009964168071747, 0.7153567671775818, 0.694669246673584, -0.6048421263694763, 0.08731940388679504, -0.8354127407073975, 0.8923443555831909, 0.020617425441741943, 0.1309065967798233, -0.03805755451321602, -0.22047379612922668,...
async def join ( self, ctx, *, channel : discord. voicechannel ) : if ctx. voice _ client is not none : return await ctx. voice _ client. move _ to ( channel ) await channel. connect ( )
[ -0.10172444581985474, 0.082045778632164, 0.5825509428977966, -0.231585294008255, 0.6584678888320923, 1.287336826324463, -1.2721644639968872, -0.09870997071266174, 0.40637990832328796, -0.09184282273054123, -0.1430187076330185, 0.9343645572662354, -0.9785708785057068, -0.4699420630931854, ...
def get _ bboxes ( score _ cls, score _ reg, templates, prob _ thresh, rf, scale = 1 ) : num _ templates = templates. shape [ 0 ] fb, fy, fx, fc = np. where ( score _ cls > prob _ thresh ) scores = score _ cls [ fb, fy, fx, fc ] scores = scores. reshape ( ( scores. shape [ 0 ], 1 ) ) stride, offset = rf ['stride'], rf ...
[ -0.31426018476486206, -0.000412824098020792, 1.0403558015823364, -0.347748726606369, 0.289400190114975, -0.612835705280304, 0.6751395463943481, -0.03592543303966522, -0.21847309172153473, 0.6549046039581299, -0.02512005902826786, -0.09303153306245804, 0.09541721642017365, 0.133193582296371...
def advance ( self ) : self. pos + = 1 if self. pos > len ( self. text ) - 1 : self. current _ char = none # indicates end of input else : self. current _ char = self. text [ self. pos ]
[ -0.49606087803840637, -0.9116101264953613, 0.6220614910125732, -0.43100374937057495, -0.5031426548957825, 0.0783395767211914, 0.37460413575172424, 0.34608733654022217, -0.42493876814842224, -0.7033770084381104, -0.1903499811887741, 0.39967989921569824, -0.6942552328109741, 0.30267989635467...
def format _ timestamp ( timestamp ) : return str ( read _ timestamp ( timestamp ) )
[ 0.28388065099716187, -0.5126198530197144, 0.40903472900390625, -0.43215060234069824, -0.20387376844882965, -0.5965423583984375, -0.8607640862464905, -0.7993767261505127, 1.3920295238494873, 0.516362726688385, 1.8534737825393677, 0.024485349655151367, 0.6750156879425049, -0.6841822266578674...
def nllloss ( y, mean, var ) : return ( torch. log ( var ) + torch. pow ( y - mean, 2 ) / var ). mean ( )
[ 0.6813928484916687, -0.6110508441925049, 0.3191082775592804, -0.5365650057792664, -1.196602463722229, -0.2832639813423157, -0.6929413676261902, -1.254744529724121, 0.0423305407166481, 0.7351362705230713, -0.3582057058811188, 0.6722727417945862, 0.5032485127449036, -0.003130395198240876, ...
def _ find ( self ) : pin = input ( " enter a pin : " ) account = self. _ bank. get ( pin ) if account = = none : " pin is not in the bank " else : self. _ account = account print ( self. _ account )
[ 0.5632002353668213, 0.2776039242744446, 0.4507330060005188, -0.017889486625790596, 0.46492478251457214, 0.5260936617851257, 1.442083477973938, -0.8297616839408875, -0.07391344010829926, -0.2153775990009308, 0.6108091473579407, 0.6802487969398499, -0.9406697750091553, -0.00482117710635066, ...
def parse _ args ( ) - > argparse. namespace : parser = argparse. argumentparser ( ) parser. add _ argument ( " files ", nargs = " * ", type = path ) parser. add _ argument ( " - - metric ", choices = { " f1 ", " mae ", " macro _ mae " }, default = " f1 " ) parser. add _ argument ( " - - debug ", dest = " loglevel ", a...
[ 0.7420594096183777, 0.2906179428100586, 0.5730007886886597, -0.33702361583709717, 0.28244858980178833, 0.10729891806840897, -0.07847589254379272, -0.5951914191246033, -0.3553745746612549, -0.2762381136417389, 0.5739101767539978, 0.03815367817878723, -0.1047133207321167, 0.768918514251709, ...
def update _ time _ dependent ( self, dt ) : if self. index = = 7 : return none self. current _ time + = dt if self. current _ time > = self. animation _ time : self. current _ time = 0 self. index = ( self. index + 1 ) % len ( self. images ) self. image = self. images [ self. index ]
[ -0.8202410936355591, 0.03240596130490303, 0.5749860405921936, 0.02987326867878437, -0.5312973856925964, 0.45229771733283997, 0.6799517273902893, -1.1015762090682983, 0.03935441002249718, 0.3754832148551941, -0.022966738790273666, -0.16492745280265808, -0.13116665184497833, 0.96959751844406...
def wtf ( self, alias, timeout ='none ', unity ='none') : if ( timeout = ='none'and unity = ='none') : line _ to _ print = " wtf [ { 0 } ] ". format ( alias ) # + alias + " \ n " self. scn _ line _ list. append ( line _ to _ print ) else : line _ to _ print = " wtf [ { 0 } ] ( { 1 } { 2 } ) ". format ( alias, str ( tim...
[ 0.24310210347175598, -0.21909350156784058, 0.6657232046127319, -0.10940905660390854, 0.9042981863021851, -0.31353241205215454, -0.5346211791038513, 0.550785481929779, -0.31182244420051575, 0.5590606927871704, -0.45716628432273865, 0.7796059250831604, 0.04254649206995964, 0.8722288012504578...
def get _ json _ hash ( filename = json _ filename ) : json _ hash = none error _ msg ='' if os. path. exists ( filename ) : with open ( filename ) as f : try : json _ hash = json. load ( f ) except valueerror : error _ msg =''. join ( [ filename,'is not a valid json file.'] ) except : error _ msg =''. join ( ['unknown...
[ -0.29959630966186523, -0.6434316635131836, 0.7696930170059204, -0.12213142961263657, -0.06170448660850525, 0.3563947081565857, -0.20141203701496124, 0.07387764751911163, -0.9695968627929688, 0.6556974053382874, 0.06577135622501373, 0.7289408445358276, 0.16903279721736908, -0.20559827983379...
def restricted _ positioner _ phi ( radius, theta _ arm, phi _ arm, offset _ p, min _ p, max _ p ) : phi _ zero = np. radians ( offset _ p ) phi _ min = np. radians ( min _ p ) phi _ max = np. radians ( max _ p ) # use law of cosines to find max opening angle opening = np. degrees ( np. arccos ( ( radius * * 2 - theta ...
[ -0.42580223083496094, -0.36781948804855347, 0.5282584428787231, -0.7651095986366272, -1.0134923458099365, 0.9109174013137817, 0.26583272218704224, 1.3219640254974365, 0.22982169687747955, 0.33362245559692383, 0.5557470321655273, 0.4079614281654358, -0.7502648830413818, -0.39506685733795166...
def process _ service _ update _ data ( smodelctx, sdata, * * kwargs ) : # raise exception ('update forbidden for node route - map at path managed - cpe - services / customer / triple - cpe - site / triple - cpe - site - services / cpe - primary / route - maps / route - map') modify = true if modify and kwargs is not n...
[ -0.9224210977554321, -0.46013039350509644, 0.6949575543403625, -0.10985729843378067, -0.5696107745170593, 0.6299014687538147, -0.28899508714675903, -0.03984516113996506, 0.3179210424423218, 0.3053731918334961, 0.44160351157188416, 0.3599196672439575, -0.7376593351364136, 0.2815696597099304...
def event _ dispatcher ( nameko _ config, * * kwargs ) : kwargs = kwargs. copy ( ) retry = kwargs. pop ('retry ', true ) retry _ policy = kwargs. pop ('retry _ policy ', default _ retry _ policy ) def dispatch ( service _ name, event _ type, event _ data ) : conn = connection ( nameko _ config [ amqp _ uri _ config _ k...
[ 0.5926796197891235, -0.36042383313179016, 0.6007687449455261, 0.254867285490036, -0.8331437706947327, -0.5414404273033142, -0.41954830288887024, 0.19037893414497375, 0.5138630270957947, 0.7857795357704163, -0.26178503036499023, 0.41291671991348267, -0.017242826521396637, -0.015894766896963...
def set _ limits ( self, dim, min _ lim, max _ lim, phys = false ) : if phys : min _ lim = int ( np. ceil ( min _ lim / float ( self. voxel _ size [ dim ] ) ) ) max _ lim = int ( np. ceil ( max _ lim / float ( self. voxel _ size [ dim ] ) ) ) self. limits [ dim ] = np. array ( [ min _ lim, max _ lim ] ) self. shape [ 2...
[ 0.22648723423480988, -0.3207874000072479, 0.568390965461731, -0.37976616621017456, 0.27219071984291077, 0.265088826417923, -1.217458963394165, 0.32452306151390076, -0.5603972673416138, -0.17759376764297485, -0.15725281834602356, 0.8869485259056091, 0.04728007689118385, -0.03855562210083008...
def isadultvalidator ( self, birthdate ) : today = self. deps. datetimefactory. gettoday ( ) year = today. year - self. deps. minagefactory. getminage ( ) min _ birthday = datetime. date ( year, today. month, today. day ) diff = birthdate. toordinal ( ) - min _ birthday. toordinal ( ) if diff > 0 : raise ageerror ( )
[ -0.034891966730356216, 0.08159124851226807, 0.6504431366920471, -0.4377489387989044, -0.7696197628974915, 1.522106409072876, -0.07631045579910278, -0.657978892326355, 0.3210930824279785, -0.22425825893878937, 0.4928854703903198, 0.7363547682762146, 0.44194039702415466, 1.5107669830322266, ...
def jail _ code ( command, code = none, files = none, extra _ files = none, argv = none, stdin = none, slug = none ) : if not is _ configured ( command ) : raise exception ( " jail _ code needs to be configured for % r " % command ) # we make a temp directory to serve as the home of the sandboxed code. # it has a writa...
[ 0.18815016746520996, 0.11976519227027893, 0.9317067861557007, 0.7259915471076965, 0.2072390913963318, -0.0476967915892601, 0.9218336939811707, 0.7264165282249451, 0.09071140736341476, -0.03992445766925812, -0.02700326405465603, 0.17717255651950836, -0.407543420791626, 0.4414052665233612, ...
def _ _ init _ _ ( self, model, ser, timeout = 5 ) : self. serial = ser self. timeout = timeout self. model = model res = self. _ verify _ connection ( ) if not res : raise lib. errors. projectorerror ( " could not verify ready - state of projector " # " verify returned { } ". format ( res ) )
[ 0.15774144232273102, 0.15436320006847382, 0.37464162707328796, 0.9873172044754028, -0.7100183367729187, 0.39691081643104553, -0.39614030718803406, -0.22908060252666473, 0.12335604429244995, 0.23915044963359833, -0.4968084692955017, -0.15807344019412994, -0.5418311953544617, -0.421914249658...
def do _ history ( self, arg ) : if readline _ present : nall = readline. get _ current _ history _ length ( ) firstprint = 0 if arg. strip ( ) : firstprint = max ( nall - int ( arg ), 0 ) for index in range ( firstprint, nall ) : print ( index, readline. get _ history _ item ( index ) )
[ 0.044306572526693344, 0.2682845890522003, 0.6384429931640625, 0.6453419327735901, 0.7919896841049194, 0.41146019101142883, 0.5868985652923584, -0.06817620247602463, -0.1083214208483696, -0.40833157300949097, 0.1510990709066391, 1.2981147766113281, 0.3167305290699005, 0.9870332479476929, ...
def test _ cant _ delete _ branch _ invalid _ request ( self ) : json _ response = api _ call ( self, " delete ",'/ branch / delete ', dict ( ), 200, true ) self. assertequal ( json _ response [ " status _ code " ], 400 ) self. assertequal ( json _ response [ " message " ],'missing id') res = self. client. post ('/ bra...
[ 0.039917297661304474, 0.3708224594593048, 0.9228812456130981, 0.8748131990432739, 0.8172192573547363, 1.182166576385498, -0.38498663902282715, 0.20486518740653992, -0.11089678853750229, -0.4973573684692383, -0.12941299378871918, 0.04085298627614975, -0.6284252405166626, 0.8077335357666016,...
def _ _ init _ _ ( self, db _ path = none ) : self. tempdir = none self. con = none if db _ path is not none and os. path. isfile ( db _ path ) : self. _ load _ session ( db _ path ) else : if db _ path : path = db _ path else : self. tempdir = tempfile. mkdtemp ( ) path = os. path. join ( self. tempdir,'tmp. sqlite') ...
[ 0.18725518882274628, -0.3270590305328369, 0.5800085663795471, 0.31410497426986694, -0.04439087212085724, -0.10285208374261856, 0.4125664532184601, 0.27602726221084595, 1.105217695236206, 0.0359404981136322, 0.19195117056369781, -0.9933079481124878, -0.6195626854896545, 0.430392861366272, ...
def test _ zenith _ on _ moon ( moonsky ) : zenith _ source = moonsky zenith _ source. check ( ) zenith _ source _ lmn = zenith _ source. pos _ lmn. squeeze ( ) assert np. allclose ( zenith _ source _ lmn, np. array ( [ 0, 0, 1 ] ) )
[ -0.20013226568698883, -0.48051050305366516, 0.1216975525021553, 0.28551968932151794, 0.3857675790786743, 0.4778488576412201, 0.10650774091482162, 0.4209482967853546, 0.9539947509765625, -0.5654705166816711, -0.7976760864257812, 0.20755243301391602, -0.31351861357688904, 0.8326421976089478,...
def get _ constants ( prefix ) : return { getattr ( socket, n ) : n for n in dir ( socket ) if n. startswith ( prefix ) }
[ -0.6692468523979187, -0.0717879980802536, 0.4811110496520996, -0.8450310826301575, -1.5975430011749268, -1.0352344512939453, -0.6315118670463562, -0.6368588209152222, -0.21431545913219452, 0.6305875778198242, -1.0292805433273315, 0.7867231369018555, 0.4012676477432251, 0.3172517716884613, ...
def _ end _ game ( self ) : print ( self. game ['end _ text'] ) # prompt the user to save if they want to so they can continue and explore more user _ input = input ( " would you like to save the game at this completed state? [ y / n ] : " ) if user _ input in ('y ','y') : self. save _ game ( ) else : print ( " alright...
[ -0.13755643367767334, -0.27482926845550537, 0.6234564185142517, 0.1311967968940735, 0.025050828233361244, 0.3073465824127197, -0.1597011387348175, -0.17578129470348358, -0.6108779311180115, 0.721376895904541, -0.27123385667800903, -0.4405325949192047, -0.42047855257987976, 0.52186948060989...
def _ attributes _ register _ deprecated ( self, key, alias, flow = _ down ) : # we expect keys to be registered as camelcase ( in those cases where # that matters ). but we store attributes in'under _ score'version. us _ alias = self. _ attributes _ t _ underscore ( alias ) us _ key = self. _ attributes _ t _ undersco...
[ -0.5796603560447693, -0.06779416650533676, 0.7552384734153748, -0.7434096932411194, -0.2973470985889435, -0.2118610143661499, -0.44509631395339966, 0.4129301905632019, -0.6705271005630493, 0.3728974163532257, -0.7637117505073547, 0.054034579545259476, 0.6912427544593811, 0.2242770940065384...
async def get _ event _ manager _ app _ by _ message ( self, message _ id : int ) - > list [ str ] : mycursor, db = await the _ database ( ) await mycursor. execute ( " select * from eventmanagerapplication where message _ id = % s ", ( message _ id, ) ) event _ manager _ app = await mycursor. fetchall ( ) await mycurs...
[ 0.5235322117805481, -0.3409586250782013, 0.4136102497577667, 0.33626875281333923, 0.01556684821844101, -0.2619137465953827, -0.28438279032707214, -0.23973053693771362, -0.2205466330051422, 0.9626255631446838, 0.4917868971824646, 0.20084992051124573, -0.24597373604774475, 1.4716103076934814...
def gf _ lshift ( f, n ) : if not f : return f else : return f + [ 0 ] * n
[ 0.706035852432251, 1.0313117504119873, 0.27974340319633484, 0.4374876320362091, 0.6868027448654175, 0.43571460247039795, -1.114461064338684, -0.6231489777565002, -0.09217247366905212, -0.4490944445133209, -0.02704000473022461, 0.31139427423477173, 0.33118417859077454, 0.38922253251075745, ...
def inspectfactions ( self ) : self. recalculatefactions ( ) for cell in self. game. cells : # if faction is unknown, do nothing if cell. isfactionunknown ( ) : continue # look at each side for sidedir in hexsidedir : side = cell. sides [ sidedir ] # if this side is unset, try to see if we can find out using faction cl...
[ -0.005675979889929295, 0.07829053699970245, 0.5942801237106323, -0.13713565468788147, 0.9340696930885315, -1.151068091392517, 0.16199961304664612, -0.14741575717926025, -0.1811116486787796, -0.544055700302124, 0.3096920847892761, -0.5484985709190369, -0.07669472694396973, 0.890548050403595...
def run _ flask ( ) : os. environ ['werkzeug _ run _ main'] ='true'# suppress startup messages in stdout app. run ( host ='0. 0. 0. 0')
[ 0.9761227369308472, -0.6650616526603699, 0.3565574884414673, 1.1619538068771362, 0.5593924522399902, 0.8788397908210754, 0.6718358397483826, 0.23038384318351746, -1.1797595024108887, -0.4875299036502838, 0.2572380602359772, 0.9790390133857727, -0.7916350364685059, 0.9339090585708618, 0.4...
def annotate _ single _ unlabeled ( request ) : # read file text = request. post. get ( " text ", " " ) label = request. post. get ( " label ", " " ) uuid = request. post. get ( " uuid ", " " ) ca = get _ mongo _ client ( uri ='mongodb : / / localhost : 27017 /') raw _ text = ca [ " annotation _ raw _ data " ]. find _ ...
[ -0.7954440712928772, -0.30909064412117004, 0.8078933358192444, -0.551295280456543, 0.08666499704122543, 1.2185254096984863, -0.16577941179275513, 1.401358962059021, 0.15856365859508514, 0.5304898619651794, -0.3355444669723511, 0.35996773838996887, -0.4804278016090393, 0.04536576196551323, ...
def vpnvserver _ vpnintranetapplication _ bindings ( self ) : try : return self. _ vpnvserver _ vpnintranetapplication _ binding except exception as e : raise e
[ -0.723443865776062, -0.5404789447784424, 0.3118796944618225, 0.622166097164154, -0.4592917263507843, 1.1467087268829346, 0.023743441328406334, -0.1821715533733368, 0.5475204586982727, 1.111954927444458, -0.5783694982528687, 0.04938676953315735, -0.5777495503425598, -0.1705259531736374, 0...
def findbyurl ( self, url ) : def normalize _ name ( url ) : while url. endswith ('/') : url = url [ : - 1 ] name = url +'/'target = " " for character in name : if character in string. ascii _ letters : target = target + character else : target = target +'_'return target connectionname = normalize _ name ( url ) if con...
[ -1.2445197105407715, -0.2345883548259735, 0.7308992743492126, -0.15319791436195374, -0.14454945921897888, -0.6507521867752075, -0.23159752786159515, -0.4558321535587311, 0.06540330499410629, 0.4194302558898926, -0.3303612768650055, -0.9254218339920044, -1.3700881004333496, 0.20754353702068...
def on _ epoch _ end ( self, net, dataset _ train = none, dataset _ valid = none, * * kwargs ) :
[ -0.5645900964736938, 0.14089643955230713, 0.30068129301071167, -0.08658398687839508, 0.7667691707611084, 0.25189608335494995, -0.8185216188430786, 0.8791481852531433, -0.39828431606292725, -0.09207097440958023, -0.7514688968658447, 0.09541299939155579, 0.34055623412132263, 0.22751438617706...
def select _ asset _ from _ items ( self ) : items = self. get _ nodes ( selection = false ) nodes = [ ] for item in items. values ( ) : nodes. extend ( item [ " nodes " ] ) commands. select ( nodes )
[ -0.5179455876350403, -1.0540717840194702, 0.21510499715805054, -0.41747528314590454, 1.0188264846801758, -0.4417346715927124, 0.4248538315296173, -0.8657237887382507, 0.12696072459220886, 0.24068468809127808, 0.631552517414093, 0.7285395264625549, 0.6963304877281189, -0.5192260146141052, ...
def player _ search _ name ( self, content ) : vals = [ ] soup = beautifulsoup ( content, " lxml " ) patt = re. compile ( r " \ / player. *? \ d + \ / profile ", re. ignorecase | re. unicode ) for a in soup. find _ all ( " a ", { " href " : patt } ) : nfl _ name, profile _ id = a [ " href " ]. split ( " / " ) [ - 3 : -...
[ -1.247345209121704, -0.33017703890800476, 0.6523516178131104, -0.25595933198928833, 0.4155643582344055, -0.30886393785476685, -0.40518051385879517, -0.8752996921539307, -0.2608286738395691, 0.989093005657196, -0.7040603756904602, -1.0511153936386108, -0.505573034286499, 0.09869169443845749...
def abline ( slope, intercept ) : axes = plt. gca ( ) x _ vals = np. array ( axes. get _ xlim ( ) ) y _ vals = intercept + slope * x _ vals # plt. plot ( x _ vals, y _ vals,'- - ', color ='c1') return x _ vals, y _ vals
[ 0.6666361093521118, -0.4159514307975769, 0.7460041642189026, -0.6271721720695496, 0.16492176055908203, 0.487210750579834, -0.15771052241325378, 0.039253342896699905, 0.004395163152366877, -0.16148161888122559, 0.7325671911239624, 1.5838714838027954, 0.5404928922653198, -0.518247663974762, ...
def _ _ init _ _ ( self, in _ planes, planes, share _ planes = 8, nsample = 16 ) : super ( bottleneck, self ). _ _ init _ _ ( ) self. linear1 = layers. dense ( planes, use _ bias = false ) self. bn1 = layers. batchnormalization ( momentum = 0. 9, epsilon = 1e - 5 ) self. transformer2 = transformer ( planes, planes, sha...
[ 1.3962637186050415, 0.2175387144088745, 0.7423995137214661, 0.7009478807449341, 0.36804404854774475, 0.5627089142799377, 0.17013491690158844, 0.10285568237304688, -0.3753461539745331, -0.06583917886018753, -0.7281512022018433, -0.7220067977905273, -0.5283633470535278, 0.04476036876440048, ...
def create _ pyobj _ from _ swift _ msg ( swiftmsg ) : obj = fswiftml. fswiftml ( ) try : dom. parsestring ( swiftmsg ) return obj. xml _ to _ pyobject ( swiftmsg ) except xml. parsers. expat. expaterror : try : return obj. swift _ to _ pyobject ( swiftmsg ) except exception, e : raise exception ( " error while convert...
[ 0.7633312940597534, 0.06441637873649597, 0.5129761695861816, -0.08943647146224976, -0.38253894448280334, -0.07707975059747696, 0.39370664954185486, -0.6085776686668396, -0.6197205781936646, -1.0467432737350464, 0.3947593569755554, -0.48258689045906067, -0.22353751957416534, 0.0888718590140...
def floating _ ip _ get _ pools ( context ) : return impl. floating _ ip _ get _ pools ( context )
[ -0.8937191367149353, 0.44161054491996765, 0.31080183386802673, 0.6669803261756897, -0.27052825689315796, 0.24048541486263275, 1.163950800895691, -1.6159842014312744, 0.3189106583595276, -0.45543172955513, -0.0632472112774849, 0.5081993341445923, 0.2672903835773468, -0.62124103307724, -1....
def parse ( src ) : parser = lxml. etree. xmlparser ( strip _ cdata = false ) tree = lxml. etree. parse ( src, parser ) return tree
[ 0.24969112873077393, 0.4231632649898529, 0.43370091915130615, -1.2877649068832397, -1.7583221197128296, 0.9063428044319153, -1.1013391017913818, 0.3752651512622833, 0.752954363822937, -0.633001983165741, 0.057340770959854126, -0.48119813203811646, -0.2057335525751114, 0.6061827540397644, ...
def gf _ div _ const ( f, a, p ) : return gf _ mul _ const ( f, zp _ inv ( a, p ), p )
[ 0.762020468711853, 0.685824990272522, 0.42003560066223145, 0.5406571626663208, 0.3602929413318634, 1.084033727645874, 0.49363064765930176, 0.9847575426101685, -1.2483794689178467, 0.7622495293617249, 0.3270259201526642, -0.09666696935892105, -0.320860356092453, -0.8990685343742371, 0.258...
def update _ labels ( ) : frame. add _ label ('' ) label1. set _ text ('player'+ str ( player _ turn. get _ name ( ) + 1 ) ) label2. set _ text ('cash :'+ str ( player _ turn. get _ cash ( ) ) ) label3. set _ text ('houses :') label4. set _ text ('items :') label5. set _ text ('traits :')
[ -1.0566638708114624, -0.6391446590423584, 0.4706873595714569, -1.1587352752685547, 0.24592716991901398, 0.0019623234402388334, -0.5119439959526062, -0.2969655692577362, -0.4159572124481201, 1.1886427402496338, -0.16223543882369995, -0.1267484724521637, -0.2932359278202057, 0.13138771057128...
def pflat ( self ) : for p in self. plst : p. srlst = list ( set ( p. rlst ) ) for r in p. srlst : # print r # print r. _ _ dict _ _ r. plst. append ( p ) for prim in p. primlst : for i in range ( 2 ) : for c in prim [ i ] : if c not in p. sclst : p. sclst. append ( c ) c. cplst. append ( p )
[ -0.7993239164352417, -0.21249689161777496, 0.4270261228084564, -0.9343646168708801, -0.20263434946537018, 1.4223604202270508, 0.01884271949529648, 0.19629986584186554, 0.31688302755355835, -0.10204559564590454, -0.6419922709465027, 0.13720886409282684, -0.6974759101867676, 0.93435424566268...
def bundle _ names ( self, bundle ) : if bundle. xdata. get ('name') : self. linterror ( " explicit - bundle - name ", " deprecated explicit bundle name in % s " % bundle. name ) if bundle. name. endswith ( ". genshi " ) : self. linterror ( " genshi - extension - bundle ", " bundle % s uses deprecated. genshi extension...
[ 0.35699722170829773, 0.7355515956878662, 0.6639042496681213, 0.221350759267807, -0.6317960023880005, 0.07783805578947067, -0.7072345614433289, 0.0717366635799408, -0.17940109968185425, 0.7403968572616577, -0.01578024961054325, 0.21127521991729736, 0.6744765639305115, 1.4923951625823975, ...
def make _ plugin ( audiences = none, token _ url = none, nonce _ timeout = none, * * kwds ) : # you * must * specify the " audiences " parameter since it's integral # to the security of the protocol. if you want it set to none to # allow checking based on http _ host, set it to the empty string. if audiences is none :...
[ 0.2932690978050232, -0.5725497007369995, 0.6033528447151184, 0.36882641911506653, -0.6543855667114258, 0.1592390090227127, -0.3772295415401459, 0.12670764327049255, 0.7891936302185059, -0.015086702071130276, -0.1476275473833084, 0.36981675028800964, -0.2573215067386627, -0.6293599605560303...
def depen _ parse ( self, textpair ) : print ( [ p. tree ( ) for p in self. parser. raw _ parse ( textpair. t1 ) ] ) # print ( list ( self. parser. parse ( textpair. t1. split ( ) ) ) )
[ -0.942002534866333, -0.02422967553138733, 0.6573396921157837, -0.8781429529190063, -0.914718747138977, 0.2565249502658844, -0.27371305227279663, 0.6185013651847839, -0.7999555468559265, 0.18776476383209229, 0.4225258529186249, -0.80604088306427, -0.8791820406913757, 0.3233901858329773, -...
def create _ board ( height, width, record _ height, separators ) : board = [ ] height = height width = width + 1 for y in range ( height ) : temp _ storage = [ ] for x in range ( width ) : if y = = 0 or y = = ( height - 1 ) : temp _ storage. append ('-') elif x = = 0 or x in separators : temp _ storage. append ('|') e...
[ -0.2308393269777298, 0.31141579151153564, 0.8527480959892273, 0.5397494435310364, -0.4929044842720032, 0.4782368540763855, -0.892648458480835, -0.13005514442920685, -0.7231529355049133, -0.021336743608117104, -0.11518536508083344, -0.689021110534668, -0.5118841528892517, 0.2820154428482055...
def getjobfromid ( version, id ) : if ( version = = " v1 " ) : data = none return jsonify ( data ) else : data = { " id " : " ", # todo : id generieren bzw. recherchieren " code " : " 404 ", " message " : " ungultiger api aufruf. ", " links " : [ { " href " : " https : / / example. openeo. org / docs / errors / samplee...
[ -0.0987258180975914, -0.8705607056617737, 0.672508716583252, 0.3726559281349182, -1.0622918605804443, -0.24537265300750732, -0.7260913848876953, 0.13686580955982208, -0.43067020177841187, -0.07817332446575165, -0.6241037845611572, 0.42613786458969116, -0.5483149886131287, -0.24597413837909...
def conforms _ pairs ( query _ relevances, total _ docs ) : total = len ( query _ relevances ) all _ pairs = [ ] true _ pairs = [ ] false _ pairs = [ ] for i in range ( 1, total + 1 ) : if ( len ( query _ relevances [ 1 ] ) = = 0 ) : continue for d in range ( 1, total _ docs + 1 ) : if d in query _ relevances [ i ] : t...
[ -0.7598123550415039, -0.5468559265136719, 0.5510451793670654, -0.8571439385414124, -0.11830642074346542, -0.005060408730059862, 0.8134974241256714, 0.6814003586769104, 0.10937220603227615, 0.583740234375, 0.5438933968544006, -0.9990020394325256, -1.0126948356628418, 0.06679998338222504, ...
def _ set _ neighbor _ route _ map ( self, v, load = false ) : if hasattr ( v, " _ utype " ) : v = v. _ utype ( v ) try : t = yangdynclass ( v, base = neighbor _ route _ map. neighbor _ route _ map, is _ container ='container ', presence = false, yang _ name = " neighbor - route - map ", rest _ name = " route - map ", ...
[ -0.5601729154586792, 0.1711498349905014, 0.6706652641296387, -0.12393634766340256, 0.6757683157920837, 0.046021539717912674, 1.1427785158157349, -0.658366858959198, -0.06626289337873459, 0.19913333654403687, -0.34237897396087646, -0.44144269824028015, -0.7933499217033386, 0.717602789402008...
def projectscope ( project, categories ) : query _ builder ='select distinct page. page _ title, page. page _ namespace from categorylinks inner join page on categorylinks. cl _ from = page. page _ id where ( page _ namespace = 1 or page _ namespace = 119 ) and ('for category in categories : query _ builder + ='cl _ to...
[ -0.6787965893745422, -0.2759668231010437, 0.4952225685119629, -0.5789504051208496, 0.4021243453025818, 0.009081698954105377, -1.2322405576705933, -0.04032400622963905, 0.34153640270233154, 0.010535143315792084, 0.9817715883255005, -0.1600646823644638, 0.09443537145853043, 0.763316333293914...
def metric _ analyser ( df ) : df _ operate = df. reset _ index ( ) for index, row in df _ operate. iterrows ( ) : if index > 0 : backtrack = 1 while backtrack < index and \ ( math. isnan ( df _ operate ['adv'] [ index - backtrack ] ) or math. isnan ( df _ operate ['marktomid 0s'] [ index - backtrack ] ) or math. isnan...
[ 0.02856939658522606, 0.21416111290454865, 0.8669797778129578, -0.2746916115283966, 0.08482147008180618, 0.048507340252399445, 0.695274829864502, -0.4315152168273926, -0.31639960408210754, 0.5400409698486328, 1.2410857677459717, 0.7625318765640259, 0.25896307826042175, 0.9409427642822266, ...
def test _ pool _ list _ not _ empty ( self ) : pool _ name = p _ n ( ) make _ test _ pool ( pool _ name, stratiscertify. disks [ 0 : 1 ] ) self. _ inequality _ test ( stratisdbus. pool _ list ( ), [ ] )
[ -0.36594754457473755, 0.4143447279930115, 0.43754348158836365, 0.47697627544403076, 1.0667330026626587, 1.2751593589782715, 0.30739593505859375, -0.2190367728471756, 0.3082323670387268, -0.005793052725493908, -1.0628300905227661, 0.27005648612976074, -0.42700788378715515, 0.724678695201873...
def create _ charm _ blade _ geom _ file ( leading _ edge, trailing _ edge, thickness, unit _ factor = u. in2ft, bg2charm _ path = default _ bg2charm, nspan _ override = none, nchord = 1, flap _ type = none, flap _ length = none, flap _ defl = none, * * kwargs ) : logger = ul. styleadapter ( logging. getlogger ( _ _ na...
[ 1.0220391750335693, -0.19276341795921326, 0.9636885523796082, -0.16045798361301422, 0.14139993488788605, 0.17592445015907288, 0.7625784873962402, -0.5625707507133484, -0.7712211608886719, -0.3182374835014343, -0.25214043259620667, 0.36132028698921204, -0.0851416364312172, 0.035748399794101...
def modify _ commandline _ options ( parser, is _ train = true ) : assert not is _ train,'testmodel cannot be used during training time'parser. set _ defaults ( dataset _ mode ='single') parser. add _ argument ('- - model _ suffix ', type = str, default ='', help ='in checkpoints _ dir, [ epoch ] _ net _ g [ model _ su...
[ -0.4946378171443939, 0.5599172115325928, 0.6746049523353577, -0.24920649826526642, 1.063598871231079, 0.7824064493179321, 0.525264322757721, 0.6341617703437805, -0.6243470311164856, -0.05892398580908775, -0.6088965535163879, -0.3102281093597412, 0.3997212052345276, 0.697823166847229, -0....
def set _ params ( self, pose = none, beta = none, roottrans = none, shouldereartrans = none, pose _ rotation _ type = none ) : if pose is not none : self. pose = pose if beta is not none : self. beta = beta if roottrans is not none : self. roottrans = roottrans if shouldereartrans is not none : self. shouldereartrans ...
[ -0.43597108125686646, 0.3189562261104584, 0.6604843139648438, 0.1645585596561432, 0.40227508544921875, -0.47596362233161926, -0.2463083416223526, -0.49260929226875305, -0.394793838262558, 0.24191440641880035, -0.6046880483627319, -0.04480426013469696, -0.9265232086181641, 0.993162870407104...
def create _ task ( self, taskdetails ) : # remove the main _ option taskdetails. pop ('main _ option ', none ) # we have to add the current date as the date of setting the task now = datetime. datetime. now ( ) # add the time to the dictionary taskdetails [ " created " ] = now. _ _ str _ _ ( ) taskdetails [ " due " ] ...
[ 0.46263399720191956, 0.5913808345794678, 0.42999640107154846, -0.1933434158563614, 1.0552632808685303, 0.7567504644393921, -0.0650678351521492, 0.7509235143661499, -1.0226795673370361, 0.01369953341782093, -0.7462597489356995, -0.7305082082748413, -0.08928095549345016, 0.5985706448554993, ...
def calculate _ mx _ fitness ( tasks, costs ) : early _ start = tasks ['early _ start'] early _ finish = tasks ['early _ finish'] t = max ( early _ finish ) project _ duration = ( t - start _ date ). days + 1 labour _ resource = costs ['resource \ n ( )'] [ : - 13 ] mx = 0 for i in range ( project _ duration ) : cur _ ...
[ -0.2512969970703125, 0.020043564960360527, 0.5863279700279236, 0.5481464266777039, -0.911324679851532, 0.07404981553554535, -0.08857955783605576, 0.40912389755249023, -0.6381471157073975, -0.6439694762229919, -0.7495060563087463, 0.17208026349544525, 0.39750805497169495, 0.0301022604107856...
def request ( self, method, url, params = none, data = none, headers = none, auth = none, timeout = none, allow _ redirects = false ) : session = session ( ) session. verify = get _ cert _ file ( ) request = request ( method. upper ( ), url, params = params, data = data, headers = headers, auth = auth ) prepped _ reque...
[ -0.7345426678657532, 0.2534765601158142, 0.7034652233123779, 0.8532952666282654, 0.2338077425956726, -0.7414031624794006, 0.002493485575541854, 0.11104165017604828, 0.7647997140884399, 0.12891550362110138, 0.10273618996143341, 0.5381412506103516, -0.18141226470470428, -0.4556078314781189, ...
def in _ order ( self, node ) : if node is none or node = = float ('inf') : return else : left, right = self. _ nodes [ node ] [ 0 : 2 ] for i in self. in _ order ( left ) : yield i yield node for i in self. in _ order ( right ) : yield i
[ -0.47918936610221863, 0.08837335556745529, 0.8077170848846436, 0.19127652049064636, -0.5307599306106567, -0.16776838898658752, -0.4273392856121063, -0.4636671841144562, -0.6933794021606445, 0.37661489844322205, -0.38834822177886963, 0.2603638768196106, -0.4590851962566376, 0.66628664731979...
def _ download _ deviation ( self, deviationid ) : return self. _ api ( f " / deviation / download / { deviationid } " )
[ -0.45761939883232117, -0.485728919506073, 0.4364074170589447, 0.4702015817165375, -0.6940786242485046, 0.10845065861940384, -0.3138953745365143, -0.9451389908790588, 0.8358106017112732, -0.3897289037704468, -0.1754968762397766, 0.617393970489502, -0.6046600937843323, 0.3245038092136383, ...
def label _ binarize ( y, classes, multilabel = false, neg _ label = 0, pos _ label = 1 ) : y _ type = type _ of _ target ( y ) if multilabel or len ( classes ) > 2 : if y _ type = ='multilabel - indicator': # nothing to do as y is already a label indicator matrix return y y = np. zeros ( ( len ( y ), len ( classes ) )...
[ -1.6485190391540527, -0.5806435942649841, 1.1227761507034302, 0.6083095073699951, 0.24975568056106567, 0.19447669386863708, -0.15329505503177643, 0.2778279185295105, 0.39154481887817383, 0.924351155757904, 0.5773252844810486, -0.2460496723651886, 0.03413761779665947, 0.2148551195859909, ...
def mlvb ( a, f, last _ of _ array ) : a _ diff = a - last _ of _ array a _ diff [ a _ diff = = 0 ] = np. nan return np. nanmean ( np. abs ( ( a - f ) / a _ diff ), axis = 0 )
[ 0.05252109467983246, -0.08820614218711853, 0.7428430318832397, 0.355264812707901, -0.09873157739639282, 0.3224150240421295, 0.3824739456176758, 0.028369655832648277, 0.637604832649231, 0.5862418413162231, 0.9325374364852905, 0.8037488460540771, 0.48733654618263245, 0.4726695120334625, 0....
def todatatype ( self ) - > ghidra. program. model. data. datatype :...
[ 0.8425469994544983, 0.6351718306541443, 0.4031578302383423, -0.46677204966545105, 0.9218905568122864, 0.31947606801986694, 0.18111419677734375, -0.3325643241405487, 0.7543147802352905, -1.1355676651000977, -1.1815028190612793, 0.932146430015564, 0.26048019528388977, 0.722705066204071, -0...
def test _ rights _ has _ correct _ fields ( self ) : client = viewrighttests. unauthorized _ client fields = [ " id ", " tags ", " title ", " description ", " text ", " image _ url ", ] response = client. get ( viewrighttests. path _ rights ). data results = response. get ( " results " ) [ 0 ] for field in fields : wi...
[ -0.1469116061925888, 1.0899137258529663, 0.5788735151290894, 0.19986768066883087, 0.7176864743232727, 0.6100281476974487, -0.5349416136741638, -0.22453175485134125, -0.6945165991783142, -0.26646047830581665, -0.5692841410636902, -0.18409162759780884, -0.822547197341919, 0.0864880383014679,...
def _ _ del _ _ ( self ) : moveit _ commander. roscpp _ shutdown ( ) rospy. loginfo ('\ 033 [ 94m'+ " object of class ur5moveit deleted. " +'\ 033 [ 0m')
[ 0.4384317696094513, -1.499599814414978, 0.4168781042098999, -0.13987766206264496, 0.135986790060997, 0.3829287886619568, 0.6122599840164185, -0.36552560329437256, 0.5797889828681946, -0.2027682065963745, 0.39999499917030334, 0.4629274308681488, -0.5784984827041626, -0.3393363654613495, 0...
def test _ list _ recipe _ tags ( self ) : pass
[ 0.25358960032463074, 0.7686936259269714, 0.22927111387252808, 0.5311946868896484, 0.7978776097297668, -0.7866297364234924, 0.09558692574501038, 0.5466740131378174, 0.34216058254241943, -0.4752175211906433, -1.2172993421554565, 0.3438258767127991, 0.21446719765663147, 1.4690144062042236, ...
def mlp _ layers ( conv _ layer _ params = none, fc _ layer _ params = none, dropout _ layer _ params = none, activation _ fn = tf. keras. activations. relu, kernel _ initializer = none, weight _ decay _ params = none, name = none, ) : if kernel _ initializer is none : kernel _ initializer = tf. compat. v1. variance _ ...
[ 0.36128318309783936, -0.42128869891166687, 0.6001251935958862, 0.7240887880325317, -0.27889716625213623, -0.08972715586423874, -0.3222977817058563, 0.50289386510849, 0.18302121758460999, 0.5904523134231567, -0.31999707221984863, -0.20206844806671143, -0.055165987461805344, 0.63053083419799...
def interactive _ menu ( supers, products, prices ) : menu = { 1 :'inflacion por supermercado ', 2 :'inflacion por producto ', 3 :'inflacion general promedio ', 4 :'mejor precio para un producto ', 5 :'salir'} enter _ loop = true while enter _ loop : print _ menu ( menu ) try : choice = int ( input ('opcion :') ) excep...
[ -0.2755531370639801, 0.5021620392799377, 0.7406154870986938, 1.1548500061035156, 0.13317491114139557, 0.5014812350273132, 0.5235533714294434, -0.6171923875808716, -0.34862059354782104, 0.04197053238749504, -0.18390512466430664, 0.10233034938573837, -1.000748872756958, -0.6536721587181091, ...
def expand ( image, border = 0, fill = 0 ) : left, top, right, bottom = _ border ( border ) width = left + image. size [ 0 ] + right height = top + image. size [ 1 ] + bottom out = image. new ( image. mode, ( width, height ), _ color ( fill, image. mode ) ) out. paste ( image, ( left, top ) ) return out
[ 0.23282097280025482, 0.5809352993965149, 0.6088647246360779, -0.18025420606136322, -0.6227789521217346, 0.12333927303552628, -0.01364559680223465, -0.3969898819923401, 0.2693100869655609, -0.014380507171154022, -0.22723141312599182, -0.2874801456928253, -0.02777463011443615, 0.350963979959...
def sign _ in ( self ) : if not self. auth : return admin _ auth _ not _ configured admin = self. authenticated _ admin _ from _ request ( ) if isinstance ( admin, problemdetail ) : redirect _ url = flask. request. args. get ( " redirect " ) return redirect ( self. auth. auth _ uri ( redirect _ url ), response = respon...
[ -0.8157744407653809, -0.12098357081413269, 0.4993363618850708, 0.5480430722236633, 0.328260600566864, 0.7310382127761841, 0.05833394452929497, -0.1216624453663826, 0.9340570569038391, -0.865253746509552, 0.6553704142570496, 0.6168556213378906, -0.2685118317604065, 0.09317360073328018, 0....
def test _ get _ recipe _ access _ permissions ( self ) : pass
[ 0.034236691892147064, 0.9057012796401978, 0.5664170980453491, 1.09452486038208, -0.25219109654426575, -0.5490764379501343, 1.3822121620178223, 0.7272266149520874, -0.24198749661445618, -0.7555095553398132, 0.5686260461807251, 0.09802514314651489, -0.17170050740242004, -0.11783559620380402,...
def requires ( * activities, * * callbacks ) : invalid _ callbacks = set ( callbacks. keys ( ) ). difference ( { " access _ callback ", " activity _ callback " } ) if invalid _ callbacks : raise typeerror ( callback _ error _ template. format ( callbacks = " \ n ". join ( " - { 0 } ". format ( callback ) for callback i...
[ -0.1880836933851242, -0.44788792729377747, 0.6487159729003906, 0.12754712998867035, -0.8909513354301453, 0.013041053898632526, 0.32444536685943604, -0.11690239608287811, 1.007452130317688, -0.02716570347547531, 1.573456883430481, 0.45414263010025024, 0.43650805950164795, -0.008471109904348...
def decimalify ( * xs ) : s = 0 for x in reversed ( xs ) : s = x + s / 60. 0 return s
[ 0.03585980087518692, 0.185538649559021, 0.4607923626899719, -0.38885125517845154, 0.8864679932594299, -0.9508281350135803, -1.150965690612793, -0.14814043045043945, 0.09401726722717285, -0.0580933541059494, -0.8852310180664062, -0.24861189723014832, 0.010376960039138794, -0.088216349482536...
def get _ service _ type _ resources _ view ( request ) : def _ get _ resource _ types _ info ( res _ type _ names ) : res _ type _ classes = [ rtc for rtn, rtc in models. resource _ type _ dict. items ( ) if rtn in res _ type _ names ] return [ sf. format _ service _ resource _ type ( rtc, service _ type _ dict [ serv...
[ -0.36296796798706055, -0.37351664900779724, 0.4358791410923004, -0.4203962981700897, 0.029502786695957184, 0.0681769922375679, 0.5780717730522156, -1.0275741815567017, -0.22746461629867554, 0.24908719956874847, 1.0930982828140259, -0.12487978488206863, 0.1526384949684143, 0.495608448982238...
def attentionqkv ( d _ feature, n _ heads = 1, dropout = 0. 0, mode ='train') : return cb. serial ( cb. parallel ( core. dense ( d _ feature ), core. dense ( d _ feature ), core. dense ( d _ feature ), ), pureattention ( # pylint : disable = no - value - for - parameter n _ heads = n _ heads, dropout = dropout, mode = ...
[ -0.12275071442127228, 0.07686194032430649, 0.5332667827606201, -0.035571906715631485, -0.7847632765769958, -0.7047567963600159, 0.6519607305526733, -0.3478989899158478, 0.24778546392917633, -0.14523926377296448, 0.0773024782538414, 0.8189063668251038, 0.2031218409538269, -0.319995641708374...
def bloch _ vector ( rho ) : u = 2 * np. real ( rho [ :, 0, 1 ] ) v = 2 * np. imag ( rho [ :, 1, 0 ] ) w = rho [ :, 0, 0 ] - rho [ :, 1, 1 ] return np. vstack ( [ u, v, w ] ). t
[ 0.049345534294843674, -0.5087553858757019, 0.8047196269035339, 0.9020898938179016, -0.19057171046733856, 0.4938020706176758, 1.2196896076202393, -0.16693593561649323, -0.34062594175338745, 1.1745634078979492, -1.0617027282714844, 0.5839613676071167, -0.20327988266944885, 0.4127662181854248...
def processed _ ids ( ) : cl = cartodbapikey ( api _ key, domain ) query ='select property _ id from % s'% table try : data = cl. sql ( query ) except cartodbexception as e : print ( " some error ocurred ", e ) return [ x ['property _ id'] for x in data ['rows'] ]
[ -0.23544253408908844, -0.5678483843803406, 0.4405048191547394, 0.011556331068277359, 0.5980665683746338, -0.43065473437309265, -1.0589996576309204, 0.5749189257621765, -0.6643386483192444, 0.6016807556152344, 0.11985113471746445, 0.7166262865066528, -0.16288593411445618, -0.873951852321624...
def return _ subtrees ( self ) : puzzle = [ ] moves = [ ] for subtree in self. _ subtrees : puzzle. append ( subtree. _ puzzle ) moves. append ( subtree. _ user _ input ) return puzzle, moves
[ -0.7342333793640137, -0.09922734647989273, 0.4475446045398712, 0.7967431545257568, -1.2026467323303223, 0.0766029879450798, 0.5386186838150024, -0.331388384103775, -0.14961294829845428, 0.43652838468551636, -0.9885635375976562, 0.299191415309906, -0.29663488268852234, 0.3947490453720093, ...
def quicksort ( bottles, caps, p, r ) : if ( p < r ) : # partition bottles using caps [ r ] as pivot # partition caps using bottles [ q ] as pivot q _ caps = caps [ r ] q = partition ( bottles, p, q _ caps, r ) q _ bottles = bottles [ q ] partition ( caps, p, q _ bottles, r ) # recurse left quicksort ( bottles, caps, p...
[ -0.23761022090911865, -0.817929744720459, 0.44926029443740845, 0.07970082759857178, 0.35038304328918457, 0.40375688672065735, -0.7651671767234802, -0.5856630206108093, 0.7265962958335876, -0.6110957860946655, -0.25777652859687805, -0.5782767534255981, -0.318162739276886, 0.1888122856616974...
def test _ sum _ of _ vectors ( self ) : self. assertequals ( [ 4, 4, 4 ], self. vector + vector ( [ 3, 2, 1 ] ) ) self. assertequals ( [ 4, 4, 4 ], self. vector + [ 3, 2, 1 ] ) self. assertraises ( nonnumericerror, self. vector. _ _ add _ _, [ 1, 2,'a'] ) self. assertraises ( nonvectorerror, self. vector. _ _ add _ _,...
[ -0.6966673731803894, 0.034046221524477005, 0.607681393623352, 0.30071303248405457, 0.40424439311027527, 0.5861924886703491, 0.5901466012001038, -0.6238341927528381, 0.5285879373550415, -0.42360666394233704, -0.31228965520858765, -0.3338235318660736, 0.18287409842014313, 0.43908485770225525...
def totext ( self ) : return self. childrentotext ( )
[ -0.09646166861057281, -0.697860062122345, 0.5199962258338928, -0.5850350856781006, 0.05837405472993851, -0.4861963391304016, -0.15590640902519226, -0.43261435627937317, 0.4062538743019104, 0.2618742883205414, -1.172607183456421, -0.3891369104385376, -0.47973349690437317, -0.530667245388031...
def test _ table _ row _ count ( self ) : table _ count = metrics. row _ count. value profiler = profiler ( table _ count, profiler _ interface = self. sqa _ profiler _ interface, ) res = profiler. compute _ metrics ( ). _ table _ results assert res. get ( metrics. row _ count. name ) = = 30
[ 0.8659749031066895, 1.445923924446106, 0.3484158217906952, 0.6008265614509583, 0.5656653642654419, 0.3143198490142822, 0.5091108083724976, -0.3142480254173279, -0.22067026793956757, -0.15273360908031464, 0.5314376354217529, -0.6595913767814636, 0.6759636998176575, 0.5114893913269043, 0.2...
def get _ rotation _ matrix ( rot _ axis, angle ) : rot _ axis = norm ( rot _ axis ) rad = np. deg2rad ( angle ) r = r. from _ rotvec ( rad * rot _ axis ) return r. as _ dcm ( )
[ -0.1980919986963272, 0.42486122250556946, 0.4345230162143707, -0.42674490809440613, 0.28330254554748535, -0.854508638381958, 0.5339710116386414, -0.2566169500350952, 0.12981824576854706, -0.5407170653343201, 0.12834514677524567, 0.13787047564983368, -0.32079580426216125, -0.704994320869445...
def comment _ delete _ handler ( sender, instance, * * kwargs ) : protest = instance. protest media = getattr ( protest,'media ', none ) parent = getattr ( instance,'parent ', none ) content _ type = contenttype. objects. get _ for _ model ( instance ) notification = notification. objects. filter ( content _ type = con...
[ 1.147283673286438, -0.7830727696418762, 0.7219698429107666, -0.6940203309059143, 0.8764401078224182, -0.12365460395812988, 1.5878938436508179, -0.3465566039085388, -0.29132920503616333, 0.6356326341629028, -0.6473077535629272, -0.8566756844520569, 0.2642174959182739, 0.7339286208152771, ...