text
stringlengths
25
2.19k
embedding
listlengths
768
768
def add _ intersection ( self, b _ c _ typ, branch _ or _ cusp, b _ i _ typ, branch _ or _ interval, with _ sign = 1 ) : x = self. get _ intersections ( b _ i _ typ, branch _ or _ interval ) idx = self. _ path _ idx ( b _ c _ typ, branch _ or _ cusp ) x [ idx ] + = with _ sign
[ -0.2691192328929901, -0.28192567825317383, 0.6774019598960876, 1.015769362449646, 0.7148076295852661, 0.6373596787452698, 0.3866473436355591, 0.26086151599884033, -0.41565650701522827, 0.39933767914772034, -0.2760646939277649, -0.2752782106399536, -1.1067150831222534, -0.5868697166442871, ...
def xdivy ( x, y, name = none ) : with ops. name _ scope ( name, " xdivy ", [ x ] ) : return gen _ math _ ops. xdivy ( x, y )
[ -0.3880382776260376, 0.7714728713035583, 0.7044947743415833, 0.32790908217430115, -0.6967198848724365, -0.5769815444946289, -0.9921035766601562, -1.2505651712417603, -0.5858433246612549, 0.3294214904308319, -0.06127143278717995, 0.7729209661483765, 1.0664631128311157, -1.091201901435852, ...
def rightclickreviewitem ( self, inputevent = none ) : if self. flatreviewcontext : self. flatreviewcontext. clickcurrent ( 3 ) else : try : eventsynthesizer. clickcharacter ( orca _ state. locusoffocus, 3 ) except : try : eventsynthesizer. clickobject ( orca _ state. locusoffocus, 3 ) except : full = messages. locatio...
[ -0.2678201198577881, -0.02685331553220749, 0.3639095425605774, 0.31424906849861145, -0.3305269777774811, 0.5955612063407898, 0.14581379294395447, 0.04775724187493324, 0.4481445848941803, -0.20023706555366516, 0.5372334122657776, -0.04808296635746956, -1.0100977420806885, -0.313729733228683...
def fit _ cluster ( data, assignments, k, p _ init, r _ init, means ) : for c in range ( k ) : if data [ :, assignments = = c ]. shape [ 1 ] = = 0 : _, assignments = kmeans _ pp ( data, k ) genes, cells = data. shape nb _ gene _ indices = np. array ( [ true for i in range ( genes ) ] ) for c in range ( k ) : c _ data =...
[ -0.36126217246055603, -0.17736966907978058, 0.6363998651504517, 0.2709766626358032, -0.4620438516139984, -0.25568342208862305, 0.02729242667555809, 1.2107481956481934, -1.087854027748108, 0.46835190057754517, 0.12289120256900787, 0.9977633953094482, -0.6270073056221008, 0.04535714909434318...
def plot _ knee ( self, figsize : optional [ tuple [ int, int ] ] = none ) : import matplotlib. pyplot as plt if figsize is none : figsize = ( 6, 6 ) plt. figure ( figsize = figsize ) plt. title ( " knee point " ) plt. plot ( self. x, self. y, " b ", label = " data " ) plt. vlines ( self. knee, plt. ylim ( ) [ 0 ], plt...
[ 0.531521201133728, 0.3892662227153778, 0.5249474048614502, -1.3427231311798096, -0.13948574662208557, 0.15448835492134094, 0.18131688237190247, 0.41340962052345276, 0.6223891973495483, -0.2311791479587555, -0.3751383423805237, 1.354956865310669, -0.02231684885919094, 0.3218504786491394, ...
def _ open _ for _ csv ( self, path ) : if sys. version _ info [ 0 ] < 3 : return open ( path,'rb') else : return open ( path,'r ', newline ='' )
[ -0.3680972754955292, -0.2149783819913864, 0.5091164112091064, -0.27627915143966675, -1.065774917602539, 0.4959034025669098, -0.17688621580600739, -0.0054532624781131744, 0.03723013401031494, -0.5188658833503723, 0.9319125413894653, 0.003898750990629196, 0.19583936035633087, -0.843938171863...
def no _ permissions _ fail ( self, request = none ) : return redirect _ to _ login ( request. get _ full _ path ( ), self. get _ login _ url ( ), self. get _ redirect _ field _ name ( ) )
[ -1.8225812911987305, 0.7556778192520142, 0.5292401909828186, 0.14270150661468506, -0.27316465973854065, 0.6692495346069336, 0.8525995016098022, -0.8043525218963623, -0.20344580709934235, -1.3063663244247437, 0.804123044013977, -0.08092594146728516, -0.511132001876831, 0.010993598029017448,...
def calc _ region _ attributes ( org _ img, label _ img, dsm = none, dtm = none ) : # define index numbers index = np. unique ( label _ img ) # calculate grvi and ndvi if args. att = ='rgb'or'rgbheight': print ( " calculating greennes.. " ) grvi = 200 * ( org _ img [ :, :, 1 ] * 100. 0 ) / ( org _ img [ :, :, 1 ] * 100...
[ -0.3839403986930847, -0.6818936467170715, 1.0800714492797852, -0.3788803219795227, -0.2433369755744934, 0.25123998522758484, 0.5705796480178833, -0.17017503082752228, -0.33514106273651123, 0.5642831325531006, -0.044793564826250076, 0.6284623146057129, 0.4049255847930908, 0.5352873206138611...
async def handle _ simple _ reaction ( self, message : message, content : str ) : target = await self. _ get _ shortcut _ target ( message ) await self. _ handle _ reaction ( target, content [ 1 ], content [ 0 ] = ='+')
[ 0.09822597354650497, -0.11818955093622208, 0.42861562967300415, 0.3472268283367157, 0.39268073439598083, -0.5533148646354675, -0.41430339217185974, 0.03578280657529831, 0.48855406045913696, -0.8598045706748962, -0.16244839131832123, 0.16166456043720245, -0.48640176653862, -0.94087815284729...
def abnormalstories ( self, firm, date ) : dates = list ( self. dates. keys ( ) ) if ( date not in dates ) or ( dates. index ( date ) - 60 ) < 0 : return - 1 dateless60 = dates. index ( date ) - 60 stories5to1 = 0 stories60to6 = 0 for i in range ( 60 ) : if i < 55 : if dates [ dateless60 + i ] not in self. data [ firm ...
[ -0.024029197171330452, -0.05745212361216545, 0.6178820729255676, -0.084404855966568, -0.7200903296470642, 0.12284289300441742, 0.5728257298469543, -0.18032477796077728, -0.1750720888376236, -0.13773472607135773, 0.12486287206411362, 0.14167872071266174, 0.353465735912323, 0.128526479005813...
def decode ( self, session, test _ x ) : # input _ feed = { } # fill in this feed _ dictionary like : # input _ feed ['test _ x'] = test _ x output _ feed = [ self. yp1, self. yp2 ] outputs = session. run ( output _ feed, test _ x ) return outputs
[ -0.6002731323242188, -1.0637353658676147, 0.31328657269477844, 0.03784659504890442, 0.060990847647190094, -0.7188190817832947, -0.1343563199043274, -0.38955748081207275, 0.05069713667035103, -0.7836475372314453, -1.0263264179229736, 0.3642542064189911, -0.4268789291381836, -0.4949395358562...
def get _ name ( self ) - > str : return self. name
[ -0.6285831332206726, -1.236804723739624, 0.27721747756004333, -0.11474688351154327, -0.5165417790412903, 0.7949835062026978, -0.20168423652648926, -0.31007084250450134, -0.2633669674396515, 0.3518163859844208, -0.027564670890569687, 0.3688957095146179, 0.1970635950565338, -0.29497352242469...
def set _ mode ( self, x _ min, labels ) : # extracting the number of different labels ( noise is not used ) safe = np. sum ( labels = ='saf') danger = np. sum ( labels = ='dan') if safe = = 0 : mode ='no _ safe'elif danger > 0. 3 * len ( x _ min ) : mode ='high _ complexity'else : mode ='low _ complexity'_ logger. inf...
[ -0.6501445174217224, 0.14634010195732117, 0.444684773683548, -0.005687510594725609, 0.7031328678131104, 0.5009152889251709, -0.5417331457138062, -0.2174241542816162, 0.035892728716135025, 0.298124760389328, -0.1338777095079422, -0.0271696075797081, -0.45255112648010254, -0.3790767788887024...
def updateparameters ( self, parameters ) : return
[ -1.9449983835220337, -0.8708345293998718, 0.06251711398363113, 0.06009416654706001, 0.4059431552886963, 0.571754515171051, -0.10067426413297653, -0.0010319426655769348, -0.16476279497146606, 1.023703694343567, 0.03198045492172241, 0.41552600264549255, -1.8317619562149048, 0.762618482112884...
def from _ models ( cls, models, min _ track _ length = 2, max _ track _ length = none ) : if max _ track _ length is none : max _ track _ length = sys. maxint # tracks are lists of pairs ( image _ num, feature _ num ) # compute the largest image num so we can hash these tuples to one int max _ image _ num = np. max ( ...
[ 0.19023248553276062, 0.14682486653327942, 0.8311223983764648, 0.5704664587974548, -0.3787557780742645, 0.4683937132358551, -0.3336069583892822, -0.19026388227939606, -0.6100143790245056, 0.08531104028224945, 0.02597576193511486, -0.9166455268859863, 0.14763116836547852, -0.5802546143531799...
def get _ link _ axis ( self, link : str, q : arraytype, axis : union [ str, arraytype ], base _ link : str ) - > casadiarraytype : tf = self. get _ link _ transform ( link, q, base _ link ) axis2index = { " x " : 0, " y " : 1, " z " : 2 } if isinstance ( axis, str ) : assert axis in axis2index, " axis must be either'x...
[ 0.038378071039915085, -0.3539963960647583, 0.4953019320964813, 0.2661035656929016, -0.04671650007367134, -0.19091635942459106, 0.34704360365867615, 0.08965961635112762, 0.46695321798324585, -0.6383042931556702, 0.15212994813919067, 1.6016231775283813, -0.30117282271385193, -1.0475412607192...
def test _ handle _ exceptions ( ) : # let's simulate division by zero exception. exception _ has _ been _ handled = false try : result = 10 * ( 1 / 0 ) # divsion by zero # we should not get here at all. assert result except zerodivisionerror : # we should get here because of division by zero exception _ has _ been _ h...
[ 0.49793538451194763, 0.43640297651290894, 0.6156283020973206, 0.1605144739151001, 0.7190818786621094, -0.14222265779972076, 0.5986993312835693, -0.19803372025489807, -0.22247135639190674, -0.9655141830444336, -0.4005955755710602, -1.0710437297821045, -0.25141486525535583, 0.251468718051910...
def display _ board ( board ) : print ( " \ n \ t ", board [ 0 ], " | ", board [ 1 ], " | ", board [ 2 ] ) print ( " \ t ", " - - - - - - - - " ) print ( " \ t ", board [ 3 ], " | ", board [ 4 ], " | ", board [ 5 ] ) print ( " \ t ", " - - - - - - - - " ) print ( " \ t ", board [ 6 ], " | ", board [ 7 ], " | ", board [...
[ 0.46203598380088806, 0.4446515440940857, 1.1376625299453735, -0.044522833079099655, -0.12613055109977722, 1.0021123886108398, 0.18920710682868958, 0.08150985091924667, -0.5389998555183411, 0.42762237787246704, 0.5184632539749146, 0.18623670935630798, -0.26360219717025757, 0.628610789775848...
def itksubtractconstantfromimagefilterius3dius3 _ cast ( * args ) : return _ itksubtractconstantfromimagefilterpython. itksubtractconstantfromimagefilterius3dius3 _ cast ( * args )
[ 0.5279131531715393, 0.04854276031255722, 0.41130027174949646, -0.9371023774147034, -0.4359143078327179, 0.7465259432792664, -0.2989477813243866, 0.25318649411201477, 0.3460065722465515, 0.36148181557655334, -0.3198072612285614, -0.1991776078939438, -0.47364330291748047, -0.8706395030021667...
def get _ stream ( program _ id ) : # get stream url = " http : / / cosmos. bcst. yahoo. com / rest / v2 / pops ; id = % s ; lmsoverride = 1 ; element = stream ; bw = 1200 " % program _ id index = fetch _ url ( url ) result = { } try : result ['rtmp _ host'] = re. findall ('url = " (. *? ) " ', index ) [ 0 ] result ['r...
[ -0.11307038366794586, -0.2154269814491272, 0.5185366868972778, 0.036275479942560196, 0.18552212417125702, -0.5965949892997742, -0.03105694241821766, 0.3997829556465149, 0.1515173465013504, -0.11895807087421417, -0.7527875304222107, 0.9276455640792847, -0.8475413918495178, 1.192941069602966...
def agg _ maxabs _ sign _ at _ 4 ( m ) : return agg _ maxabs _ sign _ at _ n ( m, n = 4 )
[ -0.39889654517173767, -0.07687867432832718, 0.5430793762207031, 0.4369143843650818, -1.2018063068389893, -0.16818015277385712, -0.2890709936618805, -0.555088996887207, -0.5252698659896851, 0.7652013301849365, 0.030965624377131462, -0.6538882851600647, 0.460734486579895, 0.32438498735427856...
def query1col ( dbname, query _ str = " select abseventstart from metadata where processingstatus ='normal'and restime > 0. 02 order by abseventstart asc " ) : db = sql. sqlite3mdio ( ) db. opendb ( dbname ) q = db. querydb ( query _ str ) db. closedb ( ) return np. hstack ( q )
[ 0.1915328949689865, 0.21103408932685852, 0.5970084071159363, 0.3502279222011566, -0.7122233510017395, 0.179350346326828, -0.3467152714729309, -0.1540755033493042, -0.3668173551559448, 0.6650803089141846, 1.129338264465332, 0.3069790005683899, -0.22708182036876678, -0.33367273211479187, -...
def transform _ types ( ) : return jsonify ( [ " rotation ", " translation " ] )
[ -1.0459060668945312, -0.38629481196403503, 0.5206457376480103, -0.7804620862007141, 0.43206092715263367, -1.0109666585922241, -0.39855578541755676, -0.6044700741767883, 0.029508817940950394, 1.0049852132797241, -2.1074931621551514, -0.09629793465137482, 0.16362464427947998, -0.155947864055...
def dataptr ( s ) : return cast ( s. value + rsession. offset, dataptr _ type ( s ) )
[ -0.3294508755207062, -0.8774988055229187, 0.22438396513462067, -1.4294644594192505, -1.0280587673187256, 0.8720857501029968, -0.5837170481681824, -1.4516011476516724, 1.8076568841934204, 0.3056594729423523, 0.43245023488998413, 1.3712499141693115, -0.21284058690071106, -0.75814288854599, ...
def load _ index ( path : str ) - > list [ str ] : with open ( f " { path } / chapters _ index. txt ", " r ", encoding = " utf8 " ) as f : return f. read ( ). splitlines ( )
[ -0.2799129784107208, -1.016646146774292, 0.33203405141830444, -1.0693000555038452, -0.29056257009506226, 0.3024655282497406, -1.0669370889663696, 0.7888488173484802, -0.10065816342830658, 1.3194855451583862, -0.46458184719085693, 0.09113813936710358, -0.35637810826301575, -1.17729187011718...
def validate _ refresh _ token ( self, refresh _ token, client, request, * args, * * kwargs ) : raise notimplementederror ('subclasses must implement this method.')
[ -0.014118745923042297, -0.686258852481842, 0.5604168772697449, 0.895058274269104, -0.4578075706958771, 0.9267109632492065, -0.05874625965952873, -1.4182223081588745, -0.3869922161102295, -0.13495120406150818, -0.260329931974411, 0.49678361415863037, 0.17675194144248962, 0.2679952085018158,...
def test _ atomic _ any _ uri _ white _ space _ nistxml _ sv _ iv _ atomic _ any _ uri _ white _ space _ 1 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / anyuri / schema + instance / nistschema - sv - iv - atomic - anyuri - whitespace - 1. xsd ", instance = " nistdata ...
[ -0.6469240188598633, 0.02846084162592888, 0.46560877561569214, 0.6527673006057739, -0.02756904438138008, 0.1781577318906784, 0.05636068433523178, -0.3764120042324066, 0.6484925150871277, 0.00488625280559063, 0.7840607166290283, -0.22267574071884155, -0.5709917545318604, 0.7393105030059814,...
def forward ( self, x, y = none ) : return self. model ( x ) if y is none else self. model ( x, y )
[ 0.05506213381886482, 0.8057500123977661, 0.422780841588974, -0.06162847578525543, -0.07540492713451385, 0.2857110798358917, -0.7281554341316223, -0.628894567489624, -0.03285690397024155, -0.8531311750411987, -0.07108933478593826, 0.35143667459487915, 0.5719628930091858, -0.0477130189538002...
def to _ bfloat16 ( x, name = " tobfloat16 " ) : return cast ( x, dtypes. bfloat16, name = name )
[ 0.7334233522415161, 0.6200243830680847, 0.5825645327568054, 1.1353886127471924, 0.8030194640159607, -0.20337070524692535, -0.4576595425605774, -1.1725891828536987, 0.777195930480957, -0.3231736719608307, -1.3555898666381836, 1.2716912031173706, 0.2147880494594574, -0.0813545361161232, 0....
def parse _ next _ row _ for _ import ( self, data ) : doctypes = self. header. doctypes # first row is included by default first _ row = data [ 0 ] rows = [ first _ row ] # if there are child doctypes, find the subsequent rows if len ( doctypes ) > 1 : # subsequent rows that have blank values in parent columns # are c...
[ 0.18339833617210388, 0.683210551738739, 0.6870009303092957, 0.2527197301387787, -0.8615180850028992, -0.5785616636276245, 0.589009702205658, -0.2562529742717743, 0.27386486530303955, -0.1243058368563652, -0.0017618451965972781, -0.340990275144577, -0.14776134490966797, 0.8478171229362488, ...
def get _ track _ id ( self, search _ query, limit = 1 ) : track _ id _ data = self. _ make _ request ( " https : / / api. spotify. com / v1 / search ", { " query " : search _ query, " type " : " track ", " limit " : limit } ) if track _ id _ data : track _ id _ json = track _ id _ data. json ( ) if track _ id _ json [...
[ -0.3615737855434418, 0.2849801480770111, 0.6968443393707275, 0.28259700536727905, 0.8049265742301941, -0.04908141866326332, -1.1316170692443848, -0.5404979586601257, 0.2885116934776306, 0.38695859909057617, 0.3963091969490051, 0.4985378682613373, -1.3828836679458618, -0.5689271688461304, ...
def _ get _ bank _ statements _ available _ import _ formats ( self ) : rslt = super ( accountjournal, self ). _ get _ bank _ statements _ available _ import _ formats ( ) rslt. append ('ktb') return rslt
[ 0.9137051105499268, -0.4276004433631897, 0.29834088683128357, 0.4724878668785095, 0.23631085455417633, 0.6484545469284058, -0.15949870645999908, -0.4669189751148224, 0.8231862783432007, 0.1817367821931839, 0.3405107855796814, -0.5443966388702393, -0.70140141248703, 0.9046052098274231, -0...
def plot _ spectrum ( ) : def make _ stems ( ) : " " " calculate where the stems of the spectrum peaks are going to be " " " x = numpy. zeros ( [ 2, self. peaks. mz. size ], dtype = " float " ) y = numpy. zeros ( x. shape ) x [ :, : ] = numpy. tile ( self. peaks. mz, ( 2, 1 ) ) y [ 1, : ] = self. peaks. intensities ret...
[ 0.6165632605552673, -0.22375810146331787, 0.6782373189926147, -0.2006792575120926, -0.5111452341079712, 0.4611666798591614, 0.14312005043029785, 0.8994881510734558, 0.16378739476203918, -0.36187154054641724, 0.25557568669319153, 0.859118640422821, -0.22301964461803436, -0.04632513597607612...
def parse ( self, parsed _ class, class _ dict ) : try : self. logger. debug ( " parsing { 0 }... ". format ( class _ dict ) ) return parsed _ class ( * * class _ dict ) except jsondecodeerror : self. logger. exception ( " an error occurred when parsing { 0 } with { 1 } ". format ( parsed _ class, class _ dict ) ) exce...
[ -0.04031553491950035, -0.6697996258735657, 0.7518678903579712, -0.5929332971572876, -0.09769777953624725, 0.053103119134902954, -0.8732690215110779, 0.2803724706172943, 0.5345692038536072, -0.46796828508377075, 0.4062989056110382, 0.2507770359516144, -0.17661796510219574, -0.19680982828140...
def get ( self, request ) : form = reservationoptionsform ( ) return render ( request, " add _ option. html ", {'form': form } )
[ 0.09914804250001907, 1.2985155582427979, 0.49089673161506653, -0.4943601191043854, 0.5674532055854797, 0.09890621900558472, -0.6556316018104553, 0.3427887558937073, -0.056547146290540695, 0.06472371518611908, 0.5890703201293945, -0.6460379362106323, 0.2001693844795227, -0.25635918974876404...
def test _ video _ youtube ( self ) : def save _ info ( cls, youtube _ video ) : info = cls. _ get _ info ( ) assert info is not none data = {'event': info. event. pk,'description _ html':'< p style = " color : red > some text < / p > ','config _ type': info. config _ type _ video,'youtube _ video': youtube _ video } f...
[ -0.23235812783241272, -0.10029241442680359, 0.8334335684776306, -0.10876638442277908, 0.7490890026092529, 0.11198914796113968, 0.4085482358932495, 0.5527299046516418, -0.10122524946928024, -0.6964367628097534, -1.3763980865478516, 0.4496442973613739, 0.5277320742607117, 0.8044037818908691,...
def changeheadings ( self, name _ heading _ pairs ) : # refuse strings because str is an iterable that we do not handle. if isinstance ( name _ heading _ pairs, str ) : raise valueerror ( " changes must be iterable of string pairs : " + repr ( name _ heading _ pairs ) ) new _ instance = self. _ _ class _ _ ( [ ] ) chan...
[ -1.4413613080978394, -0.09938779473304749, 0.5380479693412781, 0.26598691940307617, -0.9990260601043701, -0.5871322751045227, -0.32759740948677063, -0.6846102476119995, -1.0197519063949585, 0.32446935772895813, -0.39110854268074036, -0.367659330368042, -0.39247506856918335, 0.0324648320674...
def _ resolve _ arm _ id _ for _ command _ job ( self, job : command, resolver : callable ) - > job : if job. code is not none and is _ registry _ id _ for _ resource ( job. code ) : msg = " format not supported for code asset : { } " raise validationexception ( message = msg. format ( job. code ), target = errortarget...
[ 0.4406430721282959, 0.004309306852519512, 0.516683042049408, -0.18324540555477142, 0.33255714178085327, 0.29692816734313965, -0.6998350620269775, 0.16149653494358063, -0.21727727353572845, -0.632308840751648, 0.6987576484680176, 0.480133980512619, -0.33462539315223694, 1.14724862575531, ...
def test _ atomic _ boolean _ white _ space _ nistxml _ sv _ iv _ atomic _ boolean _ white _ space _ 1 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / boolean / schema + instance / nistschema - sv - iv - atomic - boolean - whitespace - 1. xsd ", instance = " nistdata / ...
[ -0.4019811749458313, 0.24751579761505127, 0.5139265656471252, 0.49393489956855774, 0.08901774138212204, 0.49778562784194946, 0.2597343325614929, -0.31883010268211365, 0.5362876653671265, 1.0097620487213135, 0.1922851800918579, 0.12734279036521912, -0.2494346797466278, 0.38802146911621094, ...
def normal _ probability _ of _ improvement ( best _ observed, mean, stddev ) : dtype = dtype _ util. common _ dtype ( [ best _ observed, mean, stddev ] ) best _ observed = tf. convert _ to _ tensor ( best _ observed, dtype = dtype ) mean = tf. convert _ to _ tensor ( mean, dtype = dtype ) stddev = tf. convert _ to _ t...
[ -0.2950557768344879, -0.09826625883579254, 0.47324058413505554, 0.3711496591567993, -1.1882550716400146, -0.1076745018362999, -0.20544768869876862, 0.1341896653175354, -0.6190648674964905, 0.8022714853286743, -0.032579146325588226, 1.2489020824432373, -0.027046166360378265, -1.478992700576...
def send _ reminder ( timezone ) : tomorrow = datetime. now ( pytz. timezone ( timezone ) ). date ( ) + timedelta ( days = 1 ) appointments = ( appointment. query. filter ( appointment. date = = tomorrow ). filter ( appointment. bookable _ booked = = " booked " ). join ( appointment. user ). join ( user. branch ). filt...
[ -0.7292718291282654, 0.16465014219284058, 0.4952636957168579, 0.9821498990058899, -0.42141976952552795, -0.10155762732028961, -0.0842331275343895, 0.04015945643186569, -0.0062155104242265224, 0.9542831778526306, -0.36247098445892334, -0.2583819627761841, -0.7254963517189026, 1.184997320175...
def insertrows ( self, position, rows = 1, index = qmodelindex ( ) ) : self. begininsertrows ( qmodelindex ( ), position, position + rows - 1 ) for row in range ( rows ) : self. cars. insert ( position + row, { " carid " : " ", " make " : " ", " model " : " ", " year " : " ", " color " : " " } ) self. endinsertrows ( )...
[ -1.140072226524353, 1.2953088283538818, 0.751129686832428, -0.8361548781394958, 0.2504095733165741, 0.12301882356405258, -0.506160318851471, 0.3300130069255829, -0.24691125750541687, -0.27273276448249817, -1.0359559059143066, -1.5943962335586548, -1.221550464630127, 0.4248063266277313, -...
async def main ( loop _ ) : app = web. application ( ) app. router. add _ route ('get ','/ ', handle ) app. router. add _ get ('/ { name } ', handle ) redis = await aioredis. create _ redis _ pool ( f'redis : / / { redis _ host } ', loop = loop _ ) app ['redis'] = redis aiohttp _ jinja2. setup ( app, loader = jinja2. f...
[ -0.08319654315710068, -0.19565518200397491, 0.6591963768005371, -0.09328563511371613, -0.26399967074394226, 0.34482839703559875, 0.19553866982460022, -0.45289576053619385, 0.1869392842054367, 0.050537221133708954, 0.22625361382961273, 0.4833904206752777, 0.7006325125694275, 0.7529917359352...
def _ set _ initial _ status ( presentation, step _ config, exc _ result ) : # todo ( iannucci ) : make steppresentation. status enumey instead of stringy. presentation. had _ timeout = exc _ result. had _ timeout if exc _ result. had _ exception : presentation. status ='exception'return # todo ( iannucci ) : add a rea...
[ 0.2496873289346695, -0.7927793264389038, 0.3225359320640564, 0.15257859230041504, -0.10915099084377289, 0.09774430096149445, -0.3660123348236084, 1.6306486129760742, 0.10586381703615189, 0.37698498368263245, -0.17865397036075592, -0.1560729295015335, -0.011105983518064022, 0.80492985248565...
def _ _ create _ shortlog ( self ) : shortlog = utils. run ('git ', ['shortlog ','- s ','- n ','- - no - merges'], self. _ _ project. location ) mapped _ log = [ ] for line in shortlog. split ('\ n') : if line : match = re. search ('\ s * ( \ d * ) \ s * (. * ) ', line ) # ( number of commits, author name ) mapped _ lo...
[ 0.027527809143066406, -0.7444828748703003, 0.5478114485740662, -0.1921105980873108, -0.5597571730613708, 0.4079269468784332, -0.2945663332939148, 0.3145539164543152, -0.08820327371358871, 0.29432642459869385, -0.585971474647522, 0.18167608976364136, 0.6389678120613098, 0.321507066488266, ...
def forward ( self, seq _ cont _ data, seq _ cat _ data, non _ seq _ cat _ data, non _ seq _ cont _ data ) : # noqa : r0914 if self. no _ of _ embs _ non _ seq! = 0 : non _ seq _ cat _ data = non _ seq _ cat _ data. type ( torch. longtensor ). to ( self. device ) # across all rows and column i - useful for batches non ...
[ -0.05816158279776573, -0.2400427609682083, 0.7745185494422913, 0.5957581400871277, -0.25149720907211304, 0.5727876424789429, 0.5785619616508484, 0.27389323711395264, -0.3430798053741455, 0.3087097108364105, 0.21001622080802917, -0.04089305177330971, 0.30248749256134033, 0.7021738290786743,...
def exitcode ( self ) : return self. _ exitcode
[ 0.41348645091056824, -0.6461840271949768, 0.35154950618743896, 0.4445410966873169, 0.08844678848981857, 0.8401299715042114, 0.6932214498519897, 1.3291071653366089, -0.1321767270565033, -0.37717607617378235, 0.45714667439460754, -0.014007659628987312, 0.09533442556858063, 0.0679090917110443...
def send ( id, msg ) : msg = simplejson. dumps ( msg, cls = customjsonencoder ) try : request. write ('id : % s \ ndata : % s \ n \ n'% ( id, msg ) ) except socket. error : request. finish ( ) finally : pass
[ -1.2200276851654053, -0.03771691769361496, 0.4631173610687256, -0.3686997592449188, -0.13248863816261292, -0.047427304089069366, -1.0471071004867554, -0.8490096926689148, -0.2646963596343994, -0.24453869462013245, -0.8840531706809998, 1.1028571128845215, -1.0373446941375732, 0.398102074861...
def print _ mst ( parent, graph, places ) : num _ vertices = graph. num _ vertices adj _ matrix = graph. adjacency _ matrix print ( " edge \ tweight \ tplace " ) for i in range ( 1, num _ vertices ) : print ( parent [ i ], " - ", i, " \ t ", adj _ matrix [ i ] [ parent [ i ] ], " ", \ places [ i - 1 ], " to ", places [...
[ 1.0516388416290283, 0.025134870782494545, 0.6385233998298645, -0.655229389667511, -0.8939079642295837, 0.5788490772247314, 0.459951251745224, 0.19029584527015686, 0.03576129674911499, 0.6032692193984985, 0.26030227541923523, 0.31650301814079285, 0.07055841386318207, 0.5948343873023987, -...
def get _ algo _ object ( algo _ name, key, environ = none, rel _ path = none, how ='pickle') : if algo _ name is none : return none folder = get _ algo _ folder ( algo _ name, environ ) if rel _ path is not none : folder = os. path. join ( folder, rel _ path ) name ='{ }. p '. format ( key ) if how = ='pickle'else'{ }...
[ 0.28190118074417114, -0.4818969666957855, 0.9001757502555847, -0.652798056602478, -0.4718247056007385, -0.3726493716239929, -0.24275292456150055, 0.001929247984662652, -0.23024602234363556, 1.2998294830322266, 0.20241126418113708, 0.8293289542198181, 0.42514723539352417, -0.836919069290161...
def togmsh _ old ( self, do _ 3d ) - > list : print ( " \ t " + 50 * " - " ) files _ geo = [ ] domain _ size = ( self. nodes [ 0 ], self. nodes [ 1 ] ) for config in range ( len ( self. eps _ 11 ) ) : print ( " \ t > configuration ", config, " to gmsh. " ) for sample in range ( self. samples [ config ] ) : print ( " \ ...
[ 0.49706947803497314, 0.32063019275665283, 0.7775782942771912, 0.10116338729858398, 0.6767684817314148, 0.6635782718658447, 0.12209708988666534, 0.2944869101047516, -0.5533725023269653, 0.8196245431900024, -0.5087758898735046, 0.4639624357223511, 0.24511821568012238, 0.47890520095825195, ...
def _ get _ task _ id ( self ) : schedules _ obj = schedules ( self. class _ object ) return schedules _ obj. schedules. get ( self. schedule _ id ). get ('task _ id')
[ 0.863239049911499, -0.29451361298561096, 0.5326871275901794, 0.036815281957387924, -0.04227815195918083, 0.4237483739852905, 0.7395808696746826, 0.02234571799635887, 0.5559180974960327, 0.8422579169273376, -0.2218557447195053, 0.5368968844413757, 0.8447572588920593, 0.25760701298713684, ...
def test _ decorator ( self ) : unit1 = unit ( ) unit2 = unit ( ) unit1 = buffcurseunitdecorator ( unit1 ) self. assertequal ( unit1. coordinate, 0 ) self. assertequal ( unit1. health, 100 ) self. assertequal ( unit1. speed, 5 ) unit1. move _ forward ( ) self. assertequal ( unit1. coordinate, 5 ) self. assertequal ( un...
[ -0.7220551371574402, -0.03947829455137253, 0.4820813536643982, -0.23990094661712646, 1.3347705602645874, 0.6800234317779541, 0.7496844530105591, -0.16438302397727966, 0.402912437915802, -1.1912257671356201, -0.2404835969209671, 0.726413905620575, 0.24374555051326752, -0.1918463259935379, ...
def triangulate ( x1, x2, p1, p2 ) : n = x1. shape [ 1 ] if x2. shape [ 1 ]! = n : raise valueerror ( " number of points don't match. " ) x = [ triangulate _ point ( x1 [ :, i ], x2 [ :, i ], p1, p2 ) for i in range ( n ) ] return np. array ( x ). t
[ 0.26857152581214905, 0.9640129804611206, 0.4610121548175812, 0.24095968902111053, 0.9199188947677612, -0.605316698551178, -0.6809808611869812, 0.08896362781524658, -0.8616043925285339, 0.8695142269134521, -0.3954533040523529, 0.15503227710723877, 0.11213889718055725, -1.5505706071853638, ...
def _ _ format _ date ( d ) : return d. strftime ( " % a % b % - d " )
[ -0.23934248089790344, -0.23831313848495483, 0.7887076139450073, -1.254681944847107, -0.7611100077629089, 0.6957893371582031, -0.9460251331329346, -0.4184631109237671, 0.3165976107120514, -0.038698285818099976, 1.6278276443481445, 0.34349483251571655, 1.1506075859069824, 0.32156598567962646...
def convert _ to _ point ( location, location _ format ) : if isinstance ( location, point ) : return location try : if ( isinstance ( location, dict ) and'lat'in location and'lon'in location ) : return point ( location ['lon'], location ['lat'] ) if location _ format. lower ( ). startswith ('lat') : location = reverse...
[ -0.03121659718453884, -1.2133070230484009, 0.4309055209159851, -0.10843674093484879, 0.232577383518219, -0.15912316739559174, -0.6177584528923035, 0.8366407752037048, 0.5017748475074768, 0.523135781288147, 0.7885794639587402, 0.031324602663517, 0.14664669334888458, -0.3672280013561249, 0...
def test _ atomic _ any _ uri _ enumeration _ 3 _ nistxml _ sv _ iv _ atomic _ any _ uri _ enumeration _ 4 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / anyuri / schema + instance / nistschema - sv - iv - atomic - anyuri - enumeration - 4. xsd ", instance = " nistdata...
[ -0.7548694610595703, -0.7796689867973328, 0.5559766888618469, 0.6388786435127258, -0.04570627957582474, -0.3647221028804779, 0.11031531542539597, -0.2880689799785614, 0.16901250183582306, -0.21608537435531616, 0.12100455164909363, -0.7845500707626343, -0.5688126683235168, -0.23660473525524...
def listforaccount ( ctx, # mandatory main parameter accountid, # optional main parameter startvolumeid = none, # optional main parameter limit = none, # optional main parameter includevirtualvolumes = none ) : cli _ utils. establish _ connection ( ctx ) ctx. logger. info ( " " " : " " " " " " accountid = " " " + str (...
[ 0.4069044888019562, -0.844413697719574, 0.8325918912887573, -0.19139344990253448, 0.34042122960090637, -0.39773112535476685, 0.19129657745361328, 0.00043127170647494495, 0.6394897103309631, 0.5732430815696716, 0.2433561533689499, 1.2028396129608154, -0.15046283602714539, 0.0206393003463745...
def _ _ eq _ _ ( self, other ) : if not isinstance ( other, deleteprivatezoneresponse ) : return false return self. _ _ dict _ _ = = other. _ _ dict _ _
[ -0.4408060908317566, -1.1243665218353271, 0.6082478165626526, -0.18557827174663544, 0.08586140722036362, -0.004591945093125105, 0.6685945987701416, -0.9229958653450012, 2.263580083847046, 0.05354173481464386, -1.3737622499465942, 0.04904849827289581, -0.6717284321784973, -0.336649745702743...
def ping _ client ( database _ uri ) : client = mongoclient ( database _ uri ) return client. server _ info ( )
[ -0.49312514066696167, 0.4437582492828369, 0.24518494307994843, -0.23042739927768707, 0.9393128156661987, -0.08965218812227249, -0.24623826146125793, -0.43724310398101807, -0.5937675833702087, 0.5230233073234558, 0.004036964848637581, -0.19504287838935852, -1.3229026794433594, -0.5153883695...
def test _ request _ do _ update _ all ( test _ dao, test _ configuration ) : dut = dtcsimilaritem ( test _ dao, test _ configuration, test ='true') dut. request _ do _ select _ all ( revision _ id = 1 ) assert not dut. request _ do _ update _ all ( )
[ -0.5063873529434204, 0.8368924856185913, 0.5569613575935364, 1.009063482284546, 0.4502630829811096, 0.4996848702430725, -0.00016535643953830004, 0.1896657794713974, 0.2875598073005676, -0.4805247187614441, -0.6490060091018677, 0.16337627172470093, 0.15436984598636627, -0.322068989276886, ...
def _ finalize ( self ) : try : transactions = self. m _ tsd. transactions. values ( ) except attributeerror : transactions = [ ] for tnx in transactions : tnx. _ finalize ( ) self. m _ tsd. _ _ dict _ _. clear ( )
[ -0.3933798670768738, 0.38936299085617065, 0.3054817318916321, -0.9934905767440796, -0.5716880559921265, -0.7875525951385498, -0.33275407552719116, -0.6890548467636108, -0.19290976226329803, 0.40426620841026306, 0.32394546270370483, -0.648284912109375, 0.6503796577453613, 1.1462737321853638...
def _ initialize _ sim ( self, sim _ data ) : # pytau. start ( self. timers ['_ initialize _ sim'] ) # start ( self. timers ['_ initialize _ sim'] ) sim _ conf = sim _ data. sim _ conf sim _ name = sim _ data. sim _ name ports _ config = sim _ conf ['ports'] ports _ list = ports _ config ['names']. split ( ) simrootdir...
[ 0.10604413598775864, 0.39177948236465454, 0.43687519431114197, 0.10472572594881058, 0.009285148233175278, -0.3959493935108185, 0.5537547469139099, 0.0335083045065403, 0.127217099070549, 0.05296783894300461, -0.35141459107398987, -0.1324949860572815, 0.5295934081077576, 0.7740538120269775, ...
def process ( self, job : reportjob ) - > jobresult : cmd = self. build _ cmd ( job ) report = none success = false error = " " path = none try : path = path ( tempfile. mkdtemp ( ) ) job. get _ report ( ). get _ fs ( ). get _ backend ( ). zip ( ). extractall ( path ) subprocess. run ( cmd, cwd = path, check = true ) r...
[ 0.866757333278656, -0.24778792262077332, 1.057855248451233, -0.33696651458740234, -0.09377846121788025, -0.4905115067958832, 0.4634420871734619, 0.06274702399969101, -0.16157327592372894, -0.4000493288040161, 0.20219570398330688, -0.872700572013855, -0.5906001925468445, -0.1272803992033004...
def _ append _ params ( oauth _ params, params ) : merged = list ( params ) merged. extend ( oauth _ params ) # the request uri / entity - body may include other request - specific # parameters, in which case, the protocol parameters should be appended # following the request - specific parameters, properly separated b...
[ -0.8930395245552063, -0.16599465906620026, 0.5906098484992981, 0.188899964094162, 0.6021741628646851, 0.48810815811157227, -1.5728833675384521, -0.28595295548439026, 0.38220635056495667, 0.3153054714202881, 1.1794450283050537, 0.8571075201034546, -0.6060303449630737, 0.490784227848053, -...
def get _ wav _ duration ( wav _ bytes : bytes ) - > float : with io. bytesio ( wav _ bytes ) as wav _ buffer : wav _ file : wave. wave _ read = wave. open ( wav _ buffer, " rb " ) with wav _ file : frames = wav _ file. getnframes ( ) rate = wav _ file. getframerate ( ) return frames / float ( rate )
[ 0.9058218002319336, 0.15258559584617615, 0.32907894253730774, -0.32614773511886597, 0.007998570799827576, -0.0428791344165802, 0.8602259159088135, 0.3608293831348419, 1.1384159326553345, 0.6859807968139648, -0.7720925211906433, -0.24259325861930847, -1.1094906330108643, 1.0464576482772827,...
def run ( self, image ) : width, height = image. size resize _ ratio = 1. 0 * input _ size / max ( width, height ) target _ size = ( int ( resize _ ratio * width ), int ( resize _ ratio * height ) ) resized _ image = image. convert ('rgb'). resize ( target _ size, image. antialias ) the _ input = [ np. asarray ( resize...
[ -1.0933266878128052, -0.28217238187789917, 0.7833768725395203, -0.035309456288814545, 0.7823583483695984, -0.5142700672149658, 0.38217124342918396, -0.5919201970100403, 0.3521457612514496, 0.45430710911750793, -0.1706744134426117, -0.01748935878276825, 0.11252359300851822, 0.16875417530536...
def get _ filesystem ( self, filesystem _ id ) : return self. bitstore. filesystems ( ). get ( id = filesystem _ id ). execute ( )
[ -0.34062260389328003, -0.15549315512180328, 0.040659382939338684, -0.12131564319133759, 1.0393882989883423, -1.7489649057388306, -0.7432876229286194, -1.501750111579895, 1.1369500160217285, -1.112013578414917, 0.40430229902267456, 0.5160439014434814, -0.31802603602409363, 0.076550148427486...
def extract _ newegg _ num _ pages ( source ) : soup = bs4. beautifulsoup ( source,'lxml') num _ pages = int ( soup. find _ all ( class _ = " list - tool - pagination - text " ) [ 0 ]. contents [ 3 ]. contents [ 4 ] ) return num _ pages
[ -0.8184110522270203, 0.5174434781074524, 0.4763680100440979, -0.5989645719528198, -0.2598996162414551, -0.605843722820282, 0.2581900656223297, 0.3406273424625397, 0.5085019469261169, 0.7857769727706909, -0.7070258259773254, -1.035994291305542, 0.6273391246795654, 0.7094451189041138, 1.19...
def power _ law _ eval ( amplitude, gamma, index ) : return amplitude * gamma * * ( - index )
[ 0.49461156129837036, -1.0213799476623535, 0.16759997606277466, -0.9598129987716675, 0.2670752704143524, 0.5936664342880249, -0.7950292825698853, 1.0873533487319946, -0.493847131729126, 0.8284150958061218, 0.45438340306282043, 0.346137136220932, -0.3414374589920044, -0.7606887221336365, 0...
def testexecutequery ( self, mock _ gcl _ api ) : query = mock _ gcl _ api. return _ value. entries. return _ value. list query. return _ value. execute. return _ value = mock _ log _ entries qfilter ='*'query _ logs = fake _ logs. executequery ( qfilter ) self. assertequal ( 2, len ( query _ logs ) ) self. assertequal...
[ -0.20912140607833862, 0.5061577558517456, 0.4850081503391266, 0.33990293741226196, 1.2028460502624512, 0.5659932494163513, -0.7373057007789612, 0.07277261465787888, -0.09745873510837555, 0.558434784412384, -0.13339227437973022, 0.24526013433933258, 0.11649490892887115, 0.22702088952064514,...
def quadratic ( x ) : ones = np. array ( [ 1 for i in x ] ) xsquared = x * * 2 xmat = np. matrix. transpose ( np. array ( [ xsquared, x, ones ] ) ) return xmat
[ -0.27520623803138733, -0.48791763186454773, 0.3665240705013275, 0.11844566464424133, -0.1052405908703804, -0.7596143484115601, -0.6268386840820312, -0.9938729405403137, 0.5013588666915894, 0.04117221757769585, -0.8292525410652161, -0.0702228844165802, 0.47526082396507263, -0.84397178888320...
def reduce _ prod _ v1 ( input _ tensor, axis = none, keepdims = none, name = none, reduction _ indices = none, keep _ dims = none ) : axis = deprecation. deprecated _ argument _ lookup ( " axis ", axis, " reduction _ indices ", reduction _ indices ) keepdims = deprecation. deprecated _ argument _ lookup ( " keepdims "...
[ 0.22955739498138428, 0.24711807072162628, 0.9543695449829102, 0.9411966800689697, -0.6015459299087524, 0.18510577082633972, 0.10331736505031586, -0.014989004470407963, 0.22576363384723663, 1.0300835371017456, -0.1424247920513153, 1.031121015548706, 0.3287774324417114, -0.8960880637168884, ...
def test _ list _ integer _ min _ length _ nistxml _ sv _ iv _ list _ integer _ min _ length _ 1 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / integer / schema + instance / nistschema - sv - iv - list - integer - minlength - 1. xsd ", instance = " nistdata / list / inte...
[ -0.2122272104024887, -0.5026216506958008, 0.29613688588142395, 0.5377113223075867, -0.3963581621646881, -0.014639202505350113, -0.30091992020606995, -0.08990361541509628, 1.4377297163009644, 0.49736738204956055, -0.837253749370575, -0.3391932249069214, -1.1150490045547485, 0.80691367387771...
def get _ latest _ event _ id ( self, event, filter ) : raise notimplementederror
[ 0.1821737140417099, -0.7208848595619202, 0.7560990452766418, 0.6330947875976562, -0.22628609836101532, 0.6807886958122253, -0.1133350357413292, 0.5817720293998718, 0.2221025973558426, 0.621181845664978, 0.3235994279384613, 0.9562892913818359, 0.1466853767633438, 0.019594306126236916, -0....
def plotsimulation ( x, y, usim, bsim, v, sim ) : pu = usim [ sim ] pb = bsim [ sim ] pv = v [ sim, : : 144, : ] for i in range ( len ( pu ) ) : f, ( ax1, ax2 ) = plt. subplots ( 1, 2, sharex ='col ', sharey ='row ', figsize = ( 10, 4 ) ) temp = ax1. imshow ( pu [ i ], origin = " lower ", alpha = 0. 7, extent = [ x [ 0...
[ -0.011602195911109447, 0.5671566128730774, 0.988214373588562, -0.1503152996301651, -0.16653504967689514, -0.024579891934990883, 0.17203480005264282, -0.2397545427083969, -0.048414599150419235, 0.3514544367790222, 0.5189064145088196, 0.5209426283836365, 0.38899171352386475, 0.17055262625217...
def velocity _ actuated _ joint _ limits ( self ) - > cs. dm : return cs. dm ( [ self. get _ velocity _ joint _ limit ( jnt ) for jnt in self. urdf. joints if jnt. type! = " fixed " ] )
[ 0.6078521609306335, -0.3554708957672119, 0.20846037566661835, 0.6754366755485535, 0.05223440006375313, 0.00725027360022068, -0.14808763563632965, -0.10772838443517685, 0.049403924494981766, -0.022467177361249924, -0.29044973850250244, 0.6512284874916077, -0.5891745686531067, -0.69459640979...
def spectral _ normed _ weight ( weights, num _ iters = 1, update _ collection = none, with _ sigma = false ) : w _ shape = weights. shape. as _ list ( ) w _ mat = tf. reshape ( weights, [ - 1, w _ shape [ - 1 ] ] ) # [ - 1, output _ channel ] u = tf. get _ variable ('u ', [ 1, w _ shape [ - 1 ] ], initializer = tf. tr...
[ -0.3860355019569397, -0.19849954545497894, 0.7168709635734558, 0.37788018584251404, -0.854686975479126, -0.08057208359241486, 0.9761799573898315, 0.27608639001846313, -0.3450339436531067, 0.6068791747093201, 0.5093345046043396, 0.2688968777656555, -0.7036306262016296, 0.7947695255279541, ...
def test _ atomic _ language _ enumeration _ 4 _ nistxml _ sv _ iv _ atomic _ language _ enumeration _ 5 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / language / schema + instance / nistschema - sv - iv - atomic - language - enumeration - 5. xsd ", instance = " nistda...
[ -0.3771655559539795, -1.0975018739700317, 0.3405396640300751, 0.4266664981842041, -0.7790421843528748, -0.21196894347667694, 0.326402485370636, -0.5699366331100464, -0.45475906133651733, 1.0205645561218262, -0.787014365196228, -0.0876087173819542, -0.06532187759876251, 0.4099399447441101, ...
def credential _ name ( self, credential _ name ) : self. _ credential _ name = credential _ name
[ 0.7461700439453125, -1.1623324155807495, -0.1287975311279297, 0.6825505495071411, -0.5419170260429382, 0.8518623113632202, 0.005504043772816658, 1.523680329322815, -0.034646328538656235, 0.5814538598060608, -1.3541560173034668, -0.31506600975990295, 0.33898481726646423, 0.01173001527786254...
def test _ host _ from _ uri ( self ) : self. assertequal ( host _ from _ uri ('http : / / a. b - c. com : 8080'), ('a. b - c. com ','8080') ) self. assertequal ( host _ from _ uri ('https : / / a. b. com : 8080'), ('a. b. com ','8080') ) self. assertequal ( host _ from _ uri ('http : / / www. example. com'), ('www. ex...
[ -0.15998098254203796, -0.17159530520439148, 0.6726699471473694, 0.28648123145103455, -0.08688770979642868, 0.7665116786956787, 0.34176304936408997, -0.12642793357372284, -0.08463689684867859, -0.998507022857666, -0.06430388987064362, -0.23917695879936218, -0.25265663862228394, -1.015053272...
def findcirclespos ( im, boardconfiguration, ccolor ='r ', bdebug = false ) : circles = findcircles ( im, ccolor, bdebug = bdebug ) ; if ( bdebug ) : print ( " inf : findcirclespos : circles : % s " % circles ) ; if ( len ( circles )! = 4 ) : return none ; # avgx = circles [ 0 ] [ 0 ] - circles [ 0 ] [ 0 ] ; # ~ acamer...
[ -0.33300483226776123, 0.15125280618667603, 0.8864701390266418, -0.2489510029554367, 0.07748924195766449, -0.8827341794967651, 0.4844011664390564, -1.0390496253967285, 0.1080734133720398, 0.9808032512664795, -0.08703482151031494, -0.3333682715892792, -0.29147446155548096, 0.3275544345378876...
def calculate _ phi _ loss _ constant ( branches, index _ set _ branch, index _ set _ bus, approximation _ type = approximationtype. ptdf _ losses ) : _ len _ bus = len ( index _ set _ bus ) _ mapping _ bus = { i : index _ set _ bus [ i ] for i in list ( range ( 0, _ len _ bus ) ) } _ len _ branch = len ( index _ set _...
[ -1.0968142747879028, -0.20993193984031677, 0.734171986579895, -0.768004834651947, -0.5716386437416077, 0.33027225732803345, 0.21691948175430298, 0.4755541980266571, -0.548629105091095, 0.6701043844223022, 0.039850473403930664, 0.8867553472518921, -0.5196733474731445, 0.47135069966316223, ...
def policy _ exploration ( self, state, epsilon = 0. 0 ) : na = self. g. shape [ 1 ] action _ probs = np. ones ( na, dtype = float ) * epsilon / na best _ action = np. argmax ( self. g [ state, : ] ) action _ probs [ best _ action ] + = ( 1. 0 - epsilon ) return np. random. choice ( np. arange ( na ), p = action _ prob...
[ 0.09494079649448395, 0.4266776740550995, 0.544739305973053, -0.22141508758068085, 0.5546910762786865, 0.08157489448785782, -0.2603999078273773, 0.15331795811653137, 1.4031941890716553, 1.0933197736740112, 0.3822779059410095, 0.156729593873024, 0.511542558670044, 0.02722419612109661, -0.1...
def cleanup ( self ) : for f in [ self. temp _ config ] : try : os. remove ( f ) except oserror : os. system ('rm { } '. format ( f ) ) try : os. removedirs ( self. test _ dir ) except oserror : os. system ('rm - rf { } '. format ( self. test _ dir ) )
[ 0.09059421718120575, -0.5364579558372498, 0.4073794186115265, -0.15911921858787537, 0.4987022280693054, 0.1351628303527832, 1.4877806901931763, 0.5941146612167358, 0.31254705786705017, -0.13033002614974976, 0.1217137798666954, -0.5347533226013184, -0.279366672039032, 1.3686065673828125, ...
def _ _ imul _ _ ( self, obj ) : # calls _ _ mul _ _ tmp = self * obj self. data = tmp. data self. m, self. n = tmp. dim ( ) return self
[ -0.7410191893577576, 0.031894709914922714, 0.5688798427581787, -0.24395835399627686, -1.1021912097930908, 0.704033613204956, 0.29409268498420715, -0.33110183477401733, 1.2011373043060303, -0.1879311352968216, -0.8736855983734131, 0.07468035817146301, 0.3393711447715759, -0.4342165589332580...
def process _ event ( self, event ) : if event is none or event. handle in self. referenced [ " event " ] : return self. referenced [ " event " ]. add ( event. handle ) self. process _ citation _ ref _ list ( event ) self. process _ notes ( event ) self. process _ media _ ref _ list ( event ) self. process _ attributes...
[ 0.054884687066078186, -0.07139094918966293, 0.6830375790596008, -0.1847379058599472, 1.013150691986084, 0.6425384283065796, 0.8211032748222351, -0.04478980973362923, 0.8583804965019226, -0.5433537364006042, -0.12595093250274658, -0.41174763441085815, -0.0689748004078865, 1.5031458139419556...
def from _ data ( cls, data ) : self = object. _ _ new _ _ ( cls ) self. id = parse _ id ( data ) self. name = parse _ name ( data ) self. position = parse _ position ( data ) return self
[ -0.014386392198503017, -1.2201786041259766, 0.5655768513679504, -0.23353958129882812, -0.49053189158439636, 0.453342467546463, -0.9302859306335449, -0.16405360400676727, 0.7996703386306763, -0.6717920899391174, -1.2100802659988403, -0.7308197617530823, 0.19000546634197235, -0.6575407385826...
def test _ atomic _ language _ min _ length _ 2 _ nistxml _ sv _ iv _ atomic _ language _ min _ length _ 3 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / language / schema + instance / nistschema - sv - iv - atomic - language - minlength - 3. xsd ", instance = " nistda...
[ 0.688680112361908, -0.5019389390945435, 0.39986392855644226, 0.13497398793697357, -0.3492644429206848, 0.1786169856786728, -0.6439542770385742, -0.44358301162719727, 0.5908767580986023, 0.44950395822525024, -0.2846253514289856, 0.021931231021881104, -0.5246676206588745, -0.3479885458946228...
def save _ bearer _ token ( self, token, request, * args, * * kwargs ) : raise notimplementederror ('subclasses must implement this method.')
[ -1.3911738395690918, -0.7813785076141357, 0.755774736404419, 0.49209824204444885, 0.7000386714935303, 0.44747525453567505, -0.19576343894004822, 0.009489554911851883, -0.23575951159000397, -0.5103054642677307, -1.8417725563049316, -0.3203113377094269, -0.18266421556472778, 0.39386311173439...
def getawssecrets ( key ) : session = boto3. session. session ( ) client = session. client ( service _ name ='secretsmanager ', region _ name ='us - east - 1') secret _ string = client. get _ secret _ value ( secretid = key ) return secret _ string
[ -0.6054583787918091, 0.5487924218177795, 0.37255755066871643, -0.4110614061355591, -0.7049967050552368, -0.035308897495269775, -1.2839317321777344, -1.3174707889556885, 0.4412423372268677, 0.6537065505981445, -0.5276892781257629, 0.8961054682731628, 0.6181580424308777, 0.5759477019309998, ...
def test _ extend _ neg ( self ) : self. assertequal ( bitfield. sign _ extend ( 7, 4 ), 7 )
[ 0.5104988217353821, 1.0031975507736206, 0.5167993307113647, 1.0891395807266235, -0.11046529561281204, 1.6162313222885132, -0.8765928745269775, 0.04607667773962021, 0.3495525121688843, -0.08441588282585144, -1.0578761100769043, -0.7572523951530457, -1.1205275058746338, 0.029658544808626175,...
def test _ atomic _ any _ uri _ max _ length _ 1 _ nistxml _ sv _ iv _ atomic _ any _ uri _ max _ length _ 2 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / anyuri / schema + instance / nistschema - sv - iv - atomic - anyuri - maxlength - 2. xsd ", instance = " nistdata...
[ -0.20662112534046173, -0.5378729701042175, 0.42680883407592773, 1.5008147954940796, -0.429889976978302, -0.03160030394792557, -0.3895430564880371, 0.26461443305015564, -0.11866830289363861, -0.18988366425037384, 0.13990508019924164, 0.1076437383890152, 0.22134941816329956, 0.45097938179969...
def test _ atomic _ qname _ length _ 4 _ nistxml _ sv _ iv _ atomic _ qname _ length _ 5 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / qname / schema + instance / nistschema - sv - iv - atomic - qname - length - 5. xsd ", instance = " nistdata / atomic / qname / schem...
[ 0.2187042385339737, -0.08678103238344193, 0.3069027066230774, -0.40564900636672974, -0.5108319520950317, 0.18090301752090454, -0.275579571723938, -0.8803979754447937, 0.18446505069732666, 0.5637156963348389, -0.8496039509773254, -0.49588650465011597, -0.4268902540206909, -0.148103639483451...
def setclusterid ( self, cutoff ) : ( nclusts, clusterids, bt ) = \ self. getclusterid ( self. pos, cutoff, conoptdistancecython ) self. nclusts = nclusts self. clusterids = clusterids return bt
[ -0.32797086238861084, -0.5851165652275085, 0.33382606506347656, -0.3225760757923126, 0.27185240387916565, 0.4695436954498291, 0.45479077100753784, 0.012026898562908173, 0.8645520210266113, 0.7321696281433105, -0.4624129831790924, 0.8320760130882263, -1.1011477708816528, -0.4866664409637451...
def private _ message ( sender, receiver, message _ text ) : login = clients [ sender ] target = clients [ receiver ] time _ stamp = time. ctime ( time. time ( ) ) receiver. send ( bytes ( login + " - > " + target + " : " + message _ text, " utf - 8 " ) ) sender. send ( bytes ( login + " - > " + target + " : " + messag...
[ -1.1907423734664917, -0.3060377538204193, 0.7006494402885437, -0.5446193218231201, -0.022973524406552315, -0.27578386664390564, -0.5642408728599548, -0.454153448343277, -0.1251886934041977, -0.4190150499343872, 0.05148008093237877, 0.8675612211227417, -0.7355733513832092, -0.08284176141023...
def test _ not _ implemented ( self ) : code, reply = self. do _ cmd ( b " helo ", flush = true ) self. assertequal ( code, 502, reply )
[ 0.12012401223182678, 0.6174669861793518, 0.24220050871372223, -0.214789479970932, 0.9613659381866455, 1.2693949937820435, 0.34528419375419617, 0.16553226113319397, -0.15068039298057556, -0.31193187832832336, -0.2370966374874115, 0.1288597732782364, -0.3781905174255371, 1.1177737712860107, ...
def test _ rate _ my _ own _ article ( self ) : data _ string, status _ code = self. rate ( user = self. author ) self. assertin ('you cannot rate your own article ', data _ string ) self. assertequal ( 400, status _ code )
[ 0.2780231833457947, 0.2203769087791443, 0.21063177287578583, 0.10641305893659592, 0.4385972321033478, 0.5886905789375305, -0.3118889033794403, -0.17989479005336761, -0.2564336657524109, -0.26713407039642334, -0.12970563769340515, 0.7112458944320679, -1.306843876838684, -0.3491348922252655,...
def _ _ init _ _ ( self, processors = [ ] ) : self. processors = processors
[ -0.1204969510436058, 0.45558157563209534, 0.3999275863170624, 0.08675612509250641, 0.2857579290866852, 0.13221295177936554, -0.6449972987174988, 0.6926413774490356, 0.35407862067222595, -0.36246439814567566, -0.34335458278656006, 0.7709076404571533, -1.2809488773345947, 0.5633261799812317,...
def create ( self, validated _ data ) : user = user ( email = validated _ data ['email'], first _ name = validated _ data ['first _ name'], last _ name = validated _ data ['last _ name'], phone _ number = validated _ data ['phone _ number'], gender = validated _ data ['gender'] ) user. set _ password ( validated _ data...
[ 0.051026035100221634, -0.5829558372497559, 0.539343535900116, 0.09348303824663162, 0.16903330385684967, 1.1229833364486694, -0.8394161462783813, -0.016103118658065796, -0.15205593407154083, -0.4029797613620758, -1.0841675996780396, -0.7418437600135803, -0.5935985445976257, -0.4303561747074...