text
stringlengths
25
2.19k
embedding
listlengths
768
768
def act ( self ) : # gather information about the game state self. state = mappping ( self ) # increase the counter of total time steps self. total _ steps + = 1 # exploration # if self. state [ 4 ] = = 0 : # simple _ act ( self ) # self. logger. info ('picking simple agent action') # self. idx _ action = self. map _ a...
[ -0.596479594707489, -0.4805717170238495, 0.842031717300415, 0.6660110354423523, 0.24304158985614777, -0.0637887716293335, 0.9730409979820251, -0.05949998274445534, 0.3786185383796692, -0.10826197266578674, -0.07178128510713577, -0.332650750875473, 0.38525015115737915, 0.3210018277168274, ...
def update ( self, data : bytearray ) - > none : if not isinstance ( data, ( bytes, bytearray ) ) : self. clear ( ) raise gostciphererror ('invalid text data') data = set _ pad _ mode _ 3 ( data, self. block _ size ) block = bytearray ( ) prev _ block = self. _ cur _ mac for i in range ( 0, get _ num _ block ( data, se...
[ -0.16274340450763702, 0.10791187733411789, 0.6257897615432739, -0.47901248931884766, -0.9240285158157349, 0.19206032156944275, 0.6401515603065491, -0.6205348968505859, 0.4658645987510681, 0.5825620293617249, -0.6534628868103027, 0.4553857743740082, -1.2790619134902954, 0.35261887311935425,...
def fetchusagereport ( self, execution _ id : str, account _ id : str ='' ) - > response : url = f'{ self. base _ url } / execution / { execution _ id } / report '. format ( account _ id = account _ id or self. oauth. account _ id ) return self. session. get ( url, headers = self. oauth. headers )
[ -0.0055241831578314304, 0.6620214581489563, 0.7517185807228088, 0.17579644918441772, 0.6839931011199951, -1.19002366065979, -0.435024231672287, -0.5908634066581726, 0.7355969548225403, 0.494257390499115, 0.6198685765266418, 0.8664961457252502, -0.922691822052002, 0.24922630190849304, 0.1...
def update _ line ( self, new _ fit _ pixel, new _ fit _ meter, detected, clear _ buffer = false ) : self. detected = detected if clear _ buffer : self. recent _ fits _ pixel = [ ] self. recent _ fits _ meter = [ ] self. last _ fit _ pixel = new _ fit _ pixel self. last _ fit _ meter = new _ fit _ meter self. recent _ ...
[ -0.053240321576595306, -1.16449773311615, 0.477934867143631, 0.4934405982494354, 0.6574862003326416, 0.36412808299064636, -0.574048638343811, -0.46601980924606323, -0.18653932213783264, -0.7539710998535156, -0.3320733308792114, 1.121471643447876, 0.07227309793233871, 0.6602844595909119, ...
def _ build _ binomial _ coefficient _ vector ( filter _ size ) : if filter _ size = = 1 : return np. array ( [ [ 1 ] ] ) base = np. array ( [ 1, 1 ] ) vector = np. array ( [ 1, 1 ] ) while len ( vector ) < filter _ size : vector = np. convolve ( vector, base ) sum _ of _ vector = sum ( vector ) return ( vector / sum _...
[ -0.7507731318473816, -0.4176883399486542, 0.9053628444671631, 0.0373772569000721, 0.13265208899974823, -0.9362258911132812, 0.5855665802955627, -0.20265407860279083, 0.29652518033981323, -0.006333549972623587, 0.10850789397954941, 1.0455151796340942, 0.09674011915922165, -0.620240569114685...
def createwing ( cpacsobj = none, zerowing = none, id = " 1 ", lod = 0. ) : if lod = = wing _ lod. none : return # just for now cpacspath ='/ cpacs / vehicles / aircraft / model / wings / wing ['+ id +']'# the next line is the one to use later on # cpacspath ='/ cpacs / vehicles / aircraft / model [ model ] / wings / w...
[ 0.21538615226745605, -0.981463611125946, 0.5398949384689331, -0.0887971892952919, 0.4440176486968994, 0.10225922614336014, 0.08814646303653717, 0.3572998642921448, -0.17003032565116882, -1.0230141878128052, 0.010409577749669552, 0.04665791243314743, -0.033750973641872406, 1.088912487030029...
def test _ ordenararray ( ) : numeros = [ 1, 3, 5, 7, 9 ] assert 9 = = ordenararray ( numeros )
[ 0.6304559707641602, -0.4513961672782898, 0.29635223746299744, 0.11754783242940903, 1.2677587270736694, -0.09516887366771698, 0.32047972083091736, -0.3498229384422302, 0.36618518829345703, -0.39261776208877563, 0.08108960092067719, -0.2966890335083008, -0.4818466305732727, -0.34579032659530...
def get ( self, request, * args, * * kwargs ) : with translate _ praw _ exceptions ( request. user ) : comment = self. get _ object ( ) # comment. refresh ( ) raises if the comment # isn't found try : comment. refresh ( ) except prawexception : raise notfound ( ) self _ comment = comment. objects. get ( comment _ id = ...
[ -0.4094580411911011, -0.47409313917160034, 0.711725115776062, -0.3460928201675415, 0.42555466294288635, -0.6950706243515015, -0.08949394524097443, -0.7769368886947632, 0.20643790066242218, 0.21688684821128845, 0.20501738786697388, 0.39519280195236206, -0.27002066373825073, -0.2715317606925...
async def async _ step _ change _ plan ( self, _ : none = none ) - > flowresult : cloud : cloud [ cloudclient ] = self. hass. data [ domain ] async def _ async _ wait _ for _ plan _ change ( ) - > none : flow _ manager = repairs _ flow _ manager ( self. hass ) # we cannot get here without a flow manager assert flow _ m...
[ -0.36422979831695557, 0.5867806077003479, 0.7412225008010864, 0.04299023374915123, -0.24203179776668549, -0.360847145318985, -0.7210868000984192, 0.1841513067483902, 0.39205294847488403, 0.1848432421684265, -0.16525617241859436, 0.40275079011917114, 0.18039771914482117, -0.0324156656861305...
def test _ set _ parameter _ 1 ( self ) : pass
[ -1.2064217329025269, 0.30687573552131653, 0.13145531713962555, 1.3853474855422974, 0.368322491645813, 1.0158257484436035, 1.370442271232605, 0.30997031927108765, -0.3584761917591095, 0.5418128967285156, -0.6342703700065613, 0.9856768250465393, -0.5817768573760986, 0.669683575630188, -0.4...
def _ update _ reward _ cost _ within _ step ( self, reward, cost ) : self. running _ budget - = cost self. r _ t + = reward self. cost _ t + = cost self. bids _ t + = 1 self. total _ bids + = 1 self. total _ reward + = reward self. episode _ bids + = 1 self. episode _ reward + = reward if cost > 0. : self. wins _ t + ...
[ -0.6506944298744202, -0.6881523728370667, 0.4804437756538391, 0.10545120388269424, -0.12186082452535629, -0.07954026758670807, -0.2552202045917511, 0.06103510037064552, -0.4316210448741913, 0.9058324694633484, -0.5120978951454163, 0.01798134297132492, -0.08874465525150299, -0.0954576656222...
def get _ ssl _ properties _ file ( config _ name : str ) - > str : return join ( get _ run _ configs _ dir ( ), config _ name, ssl _ properties _ file )
[ 0.7544317245483398, -1.1728081703186035, 0.6823819279670715, -0.2480379045009613, -0.645784318447113, 1.0675139427185059, 0.693593442440033, 0.07455766946077347, -0.9860159158706665, 0.6718330383300781, 0.5050672888755798, 0.22737900912761688, -0.21093955636024475, -0.5755475759506226, 0...
def _ from _ module ( self, module, object ) : if module is none : return true elif inspect. getmodule ( object ) is not none : return module is inspect. getmodule ( object ) elif inspect. isfunction ( object ) : return module. _ _ dict _ _ is object. _ _ globals _ _ elif inspect. ismethoddescriptor ( object ) : if has...
[ -0.3621171712875366, -1.2517427206039429, 0.9577251672744751, 0.130628302693367, -0.5052458047866821, 0.1651935577392578, -0.28193017840385437, -0.4469066858291626, 1.2541325092315674, 0.1409173607826233, 0.17979393899440765, 1.07744300365448, -0.013506008312106133, 0.195900097489357, -0...
def next ( self ) : if self. next _ node is none : raise stopiteration ( ) else : value = self. next _ node. data self. next _ node = self. next _ node. next _ node return value
[ -0.2159937620162964, 0.6018146872520447, 0.3666445314884186, -0.26111748814582825, -0.6793684959411621, 0.044804368168115616, -0.10516075044870377, -0.19656336307525635, -0.2845657765865326, -0.14090335369110107, 0.22927704453468323, 0.798600435256958, -0.5053083896636963, 0.15109814703464...
def settitle ( self, text ) : raise notimplementederror
[ -0.5418977737426758, -0.35808265209198, 0.4074307680130005, 0.10789535939693451, -0.7780189514160156, 0.5677922368049622, -1.207465648651123, 0.12332500517368317, 0.3403080701828003, 0.30010977387428284, -0.944340169429779, -0.17678390443325043, -0.6672965288162231, 0.16263097524642944, ...
def predict ( self, deployment _ name = none, inputs = none, endpoint = none, # pylint : disable = unused - argument params : optional [ dict [ str, any ] ] = none, ) : import boto3 assume _ role _ credentials = _ assume _ role _ and _ get _ credentials ( assume _ role _ arn = self. assumed _ role _ arn ) try : sage _ ...
[ -1.0146077871322632, -0.337187796831131, 0.5971362590789795, -0.12178155779838562, 0.2538894712924957, -0.06779518723487854, -0.8112381100654602, -0.020601822063326836, -0.5919612050056458, 0.8249284625053406, 0.1318208873271942, 0.6499211192131042, -0.7453610897064209, -0.0779100134968757...
def test _ str _ length ( ) : b = direct ( ) s = str ( b ) n _ lines = len ( s. splitlines ( ) ) assert _ equal ( n _ lines, default _ str _ lines + 1 )
[ 0.6477586030960083, 0.2581971287727356, 0.19828781485557556, -0.12896791100502014, 0.6344777345657349, 0.5089141130447388, 0.5835667848587036, 0.3091989755630493, 0.3732600808143616, -1.1571543216705322, -0.6395963430404663, -0.3790293335914612, 0.11668211966753006, -0.2033623903989792, ...
def add _ exposure ( self, imset, bitmask = none, do _ fluxcal = false ) : # - - - read the header and set identifiers - - - hdr = imset. hdr band, expid = imset. band, imset. expid im = imset. im ierr = imset. ierr # - - backgound subtract - - - if imset. bkg is not none : bkg = imset. bkg im - = bkg else : bkg = np. ...
[ -0.07365218549966812, 0.3296048641204834, 0.8117037415504456, 0.20702779293060303, -0.49801114201545715, -0.48253244161605835, 0.3416071832180023, 0.0915863960981369, 0.8879452347755432, -0.2169855386018753, 0.46197694540023804, -0.07678795605897903, -0.509788990020752, 0.8255903720855713,...
def test _ recipients _ with _ reply _ parent _ and _ mentions ( self, * _ ) : parent _ status = models. generatednote. objects. create ( content = " test content ", user = self. remote _ user ) status = models. generatednote. objects. create ( content = " test content ", user = self. local _ user, reply _ parent = par...
[ 0.6672940254211426, -0.5299537181854248, 0.5229877233505249, -0.5806189179420471, 0.7140739560127258, 1.2242275476455688, 0.3785095512866974, -0.12654100358486176, -0.4492170512676239, -0.08815433084964752, -0.7187466025352478, 1.211695909500122, -0.614399790763855, 0.380729079246521, -0...
def create _ padding _ mask ( sequence ) : result = tf. cast ( tf. math. equal ( sequence, 0 ), tf. float32 ) # add extra dimensions to add the padding to the attention logits. return tf. expand _ dims ( tf. expand _ dims ( result, 1 ), 1 )
[ -0.7376141548156738, 0.3618362843990326, 0.34602123498916626, -0.6787289977073669, 0.07584813982248306, 0.3380741477012634, 0.6079229116439819, -0.5488962531089783, 0.9891740679740906, 0.24265706539154053, -0.13406416773796082, 0.5340343117713928, -0.14563877880573273, 0.11812316626310349,...
def test _ logoff _ robot _ controller _ incorrect ( self ) : is _ logged _ off, _ = user _ auth. logoff _ robot _ controller ( 10 ) self. assertfalse ( is _ logged _ off )
[ -0.054713793098926544, 0.07019783556461334, 0.25177058577537537, 0.3328472077846527, 0.5420475006103516, 1.145871877670288, -0.20192070305347443, -0.37094050645828247, 0.4749002754688263, -0.3251965641975403, -0.3498426079750061, 0.38186439871788025, -0.07906422019004822, -0.01772943884134...
def update _ value ( self, inst ) : string _ list = [ ] for x in self. cal. active _ date : string _ list. append ( str ( x ). zfill ( 2 ) ) self. text = " % s. % s. % s " % tuple ( string _ list ) self. focus = false self. calen. ids. ti. text = self. text
[ -1.1044977903366089, -1.099977731704712, 0.42046457529067993, -0.682041585445404, -0.27990448474884033, 0.6550506949424744, 0.2314053475856781, -0.14806582033634186, -0.08934394270181656, 0.901965856552124, -0.19075387716293335, 0.7301322221755981, 0.09128891676664352, -0.42382705211639404...
def _ ensure _ camel ( s ) : allowed _ names = ['_ links'] return s if text _ helpers. iscamel ( s ) or s in allowed _ names else text _ helpers. camel ( s )
[ -0.2528502345085144, -0.12358178198337555, 0.4671601355075836, 0.022922486066818237, -0.7846885323524475, 0.03392619639635086, 0.11845985800027847, 0.08854745328426361, 0.5893582105636597, -0.8261318802833557, 0.9018369317054749, 0.47906494140625, 0.142343670129776, 0.09760404378175735, ...
def execute _ block ( self, block ) : # set base _ url in the symbol table if " base _ url " in block : self. handle _ base _ url ( block. get ( " base _ url " ) ) # enable any environment overrides if " set _ env " in block : self. handle _ set _ env ( block. get ( " set _ env " ) ) actions = block. get ( " actions " ...
[ -0.8750963807106018, -0.39422324299812317, 0.7811559438705444, 1.1712185144424438, 0.7434609532356262, 0.1093224585056305, 0.7185459733009338, -0.15142036974430084, -0.1266075223684311, -0.12299592047929764, -0.2882176637649536, -0.41433849930763245, 0.18621167540550232, 0.8603790998458862...
def get _ params _ as _ array ( self ) : pass
[ -1.1509450674057007, -1.1244137287139893, 0.34435465931892395, 0.3191978633403778, 1.1215957403182983, -0.11556116491556168, -0.8866387009620667, -0.678759753704071, -1.047977328300476, 0.8126972317695618, 0.01959303393959999, 1.4940770864486694, -0.14286638796329498, 1.2377262115478516, ...
def check _ tokenised _ files _ expression ( s, tokens ) : # brackets : all brackets have to closed at the right level number _ of _ brackets = 0 for token in tokens : if token = = " ( " : number _ of _ brackets + = 1 if token = = " ) " : number _ of _ brackets - = 1 if number _ of _ brackets < 0 : raise valueerror ( "...
[ 0.12108845263719559, 0.04385969787836075, 0.7372764945030212, -0.4908125698566437, -0.0015233821468427777, -0.8528333902359009, 0.20073944330215454, 0.2805648446083069, -0.9062076210975647, 0.39635393023490906, 0.2844630777835846, 0.2664627134799957, -0.7834018468856812, 0.7494902014732361...
def _ get _ obs ( self, obs : union [ np. ndarray, dict [ str, np. ndarray ] ] ) - > union [ np. ndarray, dict [ str, np. ndarray ] ] : # remaining time is more general time _ feature = 1 - ( self. _ current _ step / self. _ max _ steps ) if self. _ test _ mode : time _ feature = 1. 0 if isinstance ( obs, dict ) : obs ...
[ -0.4881877899169922, 0.45194369554519653, 0.5474858283996582, -0.30289971828460693, 0.21952296793460846, -0.2821599245071411, -0.5566914677619934, -0.0278484970331192, 0.328276664018631, 0.6402778625488281, 0.48822709918022156, -0.1495792120695114, 0.3417769968509674, 0.8423936367034912, ...
def find _ weight ( parent ) : try : children = all _ children [ parent ] except keyerror : return weights [ parent ] child _ weights = [ ] for child in children : c _ weight = find _ weight ( child ) if c _ weight is none : # only happens when we find a bad weight return child _ weights. append ( c _ weight ) if len (...
[ 0.6056833267211914, 0.010116958059370518, 1.037257432937622, 0.07270652055740356, -0.047252360731363297, -0.3484887182712555, 0.8064353466033936, -0.17905840277671814, -0.41309311985969543, 0.49297863245010376, 0.203337624669075, -0.39594927430152893, -0.7115771770477295, 1.206547975540161...
def _ get _ string _ key _ value ( key, value : str ) - > model _ pb2. keyvalue : return model _ pb2. keyvalue ( key = key, v _ str = value, v _ type = model _ pb2. valuetype. string )
[ 0.35922425985336304, -0.8812552690505981, 0.13504621386528015, -0.3852902054786682, -0.6491596102714539, 0.11098612844944, -1.2574212551116943, -0.8026694059371948, -1.225401520729065, 0.9394564628601074, 0.42397403717041016, 0.8331241607666016, 0.09712420403957367, -0.7121059894561768, ...
def get _ full _ addr ( cot _ host : str ) - > tuple : if':'in cot _ host : addr, port = cot _ host. split (':') else : addr = cot _ host port = spotcot. constants. default _ cot _ port return addr, int ( port )
[ -0.09662982076406479, -0.9296228885650635, 0.5978395938873291, -0.8306292295455933, 0.21149079501628876, -0.2071063071489334, 0.44488829374313354, 0.3033883273601532, -0.16263535618782043, 0.5451040267944336, 0.12962453067302704, 0.013071687892079353, -0.03530535101890564, -0.4793497323989...
def payment _ options ( self, total ) : assert isinstance ( total, int ) total = str ( total ) action = str ( ipagareaction. payment _ options ) response = self. _ make _ request ( action = action, total = total, version ='1') payment _ options = dict ( ipagarepaymentoption ) payment _ forms = dict ( ipagarepaymentform...
[ -1.160967230796814, -0.005977531895041466, 0.7648850083351135, -1.2607914209365845, -0.12707020342350006, -0.7874467372894287, -0.23776595294475555, -0.47179287672042847, 0.3524371385574341, 0.5386581420898438, -0.41529253125190735, -0.8122009634971619, 1.03142249584198, 0.3072550296783447...
def _ _ init _ _ ( self, rng, input, n _ in, n _ hidden, n _ out, activation = t. tanh ) : # the hidden layer self. hiddenlayer = hiddenlayer ( rng = rng, input = input, n _ in = n _ in, n _ out = n _ hidden, activation = activation ) # the selection layer self. selectionlayer = selectionlayer ( input = self. hiddenlay...
[ -0.02630230411887169, -0.5190713405609131, 0.5288954377174377, 0.4725363552570343, -0.16898928582668304, 0.29693323373794556, 0.0625605583190918, -0.12892253696918488, -0.043188855051994324, -0.09037242829799652, -0.7623792290687561, 0.48847368359565735, 0.23853778839111328, 0.776566386222...
def target _ template _ id ( self ) : return self. _ target _ template _ id
[ 0.010414756834506989, -0.8754473328590393, 0.37781429290771484, 0.03471720218658447, 0.21102674305438995, 0.8613439798355103, 0.46861639618873596, 0.492281973361969, 1.1306415796279907, 0.18281593918800354, -0.14028042554855347, 0.8335115313529968, -0.16427576541900635, -0.7166457176208496...
def unmatched ( no _ progress _ bar : bool ) : ensure _ login ( ) plex = factory. plex _ api ( ) mf = factory. media _ factory ( ) pb = factory. progressbar ( not no _ progress _ bar ) walker = walker ( plex, mf, progressbar = pb ) if not walker. is _ valid ( ) : click. echo ( " nothing to scan, this is likely due conf...
[ -0.920069694519043, -0.22694098949432373, 0.7365244626998901, 0.43991079926490784, 0.3791147768497467, 0.5576656460762024, 0.6117381453514099, -0.2778112292289734, -0.47110605239868164, -0.8518900871276855, 0.2579302489757538, -0.045538876205682755, -1.072906255722046, 0.7802188396453857, ...
def export _ ass _ name ( self, rop _ path, session _ id ) : return str ( )
[ -0.5291399359703064, -2.0309035778045654, 0.47304844856262207, -0.1451815515756607, -0.7153818011283875, 0.08238134533166885, -0.33197546005249023, -1.073717713356018, 1.5483900308609009, 0.5698009133338928, 0.5930371880531311, 0.6807199120521545, 1.3580929040908813, -0.9592745900154114, ...
def put ( self, url, expected _ response = none, data = none, auth = none, * * kwargs ) : pnote ( " perform a http put ", " info " ) try : response = self. req. put ( url, data = data, auth = auth, * * kwargs ) except exception as e : status, response = self. catch _ expection _ return _ error ( e, url ) else : status ...
[ -0.922798216342926, -0.276076078414917, 0.578920841217041, -0.39545494318008423, 0.6824842095375061, 0.5435696840286255, 0.3731914460659027, 0.4165571928024292, 0.6266691088676453, -0.15226541459560394, -0.12584184110164642, 0.23244008421897888, -0.975243330001831, -0.5744588375091553, 0...
def update ( adf, bdf ) : adf = true _ copy ( adf ) bdf = true _ copy ( bdf ) adf _ only _ col = [ x for x in adf. columns if x not in bdf. columns ] for col in adf _ only _ col : bdf [ col ] = pd. series ( none, index = bdf. index ) adf. update ( bdf ) return adf. append ( bdf. loc [ bdf. index. difference ( adf. inde...
[ -0.020281946286559105, -0.6308441758155823, 0.6859956979751587, -0.48673126101493835, 0.40160077810287476, 0.03700455278158188, -0.48030802607536316, -0.0823129341006279, 0.2050180286169052, 0.6733313798904419, 0.1546642780303955, 1.563811182975769, -0.20364674925804138, -0.955672204494476...
def w ( k, n, inverse = false ) : r = np. exp ( - 1j * ( 2 * np. pi / n ) * k ) if inverse : return np. conjugate ( r ) return r
[ -0.16959410905838013, 0.743422269821167, 0.6799375414848328, 0.24122631549835205, -0.4204859137535095, -0.17242497205734253, -0.14616268873214722, 0.7925853133201599, 0.167160302400589, 0.8777443170547485, 0.3529350459575653, -0.38831812143325806, -1.0423539876937866, 0.4695602059364319, ...
def build _ dictionary ( station, year, sensor _ l ) : sensor _ d = { } for i in sensor _ l : # example : sensor _ d ['ghi'] = [ [ top 10 rows ], [ main data ], [ whether data has been filled for i month ] sensor _ d [ i ] = [ [ ], [ ], [ 0 ] * 12 ] sensor _ d ['notes'] = none sensor _ d = fill _ ddata ( station, year,...
[ -0.7794021368026733, 0.22994479537010193, 0.4602087736129761, -0.6219481229782104, -0.551506519317627, 0.48764196038246155, -0.011885867454111576, -0.00557428365573287, -0.1287066489458084, -0.6264404058456421, -0.353842169046402, -0.32789167761802673, 0.578392744064331, 0.5443534851074219...
def _ run _ transfer ( self, file _ to, job _ id, source _ file, cache, user = none, group = none, file _ sha1 = none, blueprint = false, ) : def blueprinter ( ) : if blueprint and " args " in cache : with open ( file _ to ) as f : file _ contents = f. read ( ) t _ file _ contents = self. template. from _ string ( file...
[ -0.41015625, 0.14129996299743652, 0.9762144684791565, 0.21306931972503662, 0.24523915350437164, 0.11285529285669327, 0.4168635606765747, -0.22505463659763336, -0.9336389899253845, -0.022498177364468575, 0.16982422769069672, 0.37334439158439636, -0.132782980799675, 0.7936365604400635, -0....
def _ _ getitem _ _ ( self, group : str ) : if group not in self. groups : raise exception ( f'unkown group { group }') return self. class _ groups [ self. groups. index ( group ) ]
[ -1.1298539638519287, 0.42425107955932617, 0.27345916628837585, 0.12008337676525116, -0.26200857758522034, -0.3806106150150299, 0.26429280638694763, -1.4610788822174072, -0.3498418927192688, -0.309274286031723, 1.240215539932251, 0.8804511427879333, -0.07951919734477997, -0.2181118726730346...
def hog _ svm ( data, seed = 35, save = false, save _ loc ='c : \ \ users \ \ lukas \ \ onedrive \ \'\ +'documents \ \ machine learning \ \ pedestrian _ detection \ \ datasets \ \'\ +'inria \ \ 96x160h96 \ \ train \ \ model. pkl') : from sklearn import svm from sklearn. model _ selection import kfold rng = np. random. ...
[ 0.0653635710477829, 0.2665213942527771, 0.841007649898529, 0.3183220624923706, 0.7588968873023987, 0.06398258358240128, 0.5846979022026062, 0.8543540835380554, 0.09945562481880188, 0.21381913125514984, -0.6275352239608765, 0.1840122491121292, 0.17063845694065094, -0.10906006395816803, -0...
def from _ words ( text ) : return " ". join ( to _ words ( text ) )
[ 1.2909365892410278, 0.44465819001197815, 0.10646604001522064, -0.4872330129146576, -0.617867648601532, -0.01938445493578911, -0.8913307189941406, 0.36344823241233826, 0.4786560833454132, 0.8078956604003906, -0.11336351931095123, 0.22498080134391785, -0.4008146822452545, -0.3352246284484863...
def check _ topology _ info ( self ) : new _ ovs _ to _ lport _ mapping = { } add _ ovs _ to _ lport _ mapping = { } delete _ ovs _ to _ lport _ mapping = self. ovs _ to _ lport _ mapping for key, ovs _ port in self. ovs _ ports. items ( ) : if ovs _ port. type = = constants. ovs _ vm _ interface : lport = self. _ get ...
[ 0.10690819472074509, -0.15495997667312622, 0.6885269284248352, -0.7689470052719116, 0.3720405101776123, -0.022073909640312195, 0.03438783064484596, -0.9978517293930054, 1.1235647201538086, -0.01010151207447052, 0.5143376588821411, -0.7142375111579895, 0.5699073672294617, 0.2715957760810852...
def adc2 ( self, ntrig = 1, verbose = false, udelay = 10 ) : if self. module. issingleroc ( ) : self. daq _ select _ deser160 ( self. deseradjust ) # no idea why we need this cmdlist = [ ] # to send sync signal ( following the signalprobedx command ) # cmdlist. append ( dtb. pg _ sync + 10 ) cmdlist. append ( dtb. pg _...
[ -0.12499335408210754, 0.21038812398910522, 0.898948609828949, 0.14106230437755585, -0.14008577167987823, -0.7269479632377625, 0.14434975385665894, -0.5923851132392883, -0.2657303810119629, -0.37918373942375183, 0.13942071795463562, 0.038252729922533035, -0.42085400223731995, 0.343300998210...
def print _ sorted ( self ) : tmp = self. copy ( ) tmp. sort ( ) print ( tmp )
[ 0.33664509654045105, -0.9934895038604736, 0.4747399091720581, 0.3846224248409271, -0.34098032116889954, 0.899392306804657, 0.6304411888122559, -1.718178629875183, -0.6077240705490112, -0.28051668405532837, 0.0829191729426384, 1.593842625617981, -0.2834634482860565, 0.40007483959198, -0.9...
def kafka _ mock ( ) : return mock. magicmock ( spec = kafkaproducer )
[ -0.17223915457725525, -0.40741652250289917, 0.3904991149902344, 0.8499441742897034, -1.114334225654602, 0.019076259806752205, 0.2523702383041382, 0.6711755394935608, 0.2478615641593933, 0.8018368482589722, 1.1456999778747559, -0.34690335392951965, -0.18893350660800934, -0.6951496005058289,...
def change _ state ( ) : global allowuntil c = request. json if " active " not in c : return " missing \ " active \ " field ", 400 if c [ " active " ] = = " true " : allowuntil = datetime. datetime. now ( ) + datetime. timedelta ( minutes = minutes ) if c [ " active " ] = = " false " : allowuntil = datetime. datetime. ...
[ -0.45124948024749756, -0.3700940012931824, 0.5581877827644348, -0.12555882334709167, -1.1731804609298706, 0.2709835171699524, -0.4115312993526459, 0.040455497801303864, -0.0763799399137497, 1.6180499792099, 0.09569645673036575, 0.6855139136314392, -0.34564483165740967, -0.6953015327453613,...
def _ appendgridcommandstomenu ( self, menu, eventwidget, disable = true ) : commandstuple = [ ('& store point ','store the current cursor as point ', self. _ handlerstorecursoraspoint, false ), ('- - - ', ), ('select & all ','select all slices ', self. _ handlerpointsselectall, false ), ('d & eselect all ','deselect a...
[ -0.343909353017807, -0.0683571919798851, 0.93002849817276, 0.5857418775558472, 0.23501703143119812, -0.23932106792926788, -0.19199426472187042, 0.3281676173210144, 0.1436881273984909, 0.10690699517726898, -0.3349519371986389, -0.6669529676437378, -0.4391019344329834, 0.9602980017662048, ...
def size ( self ) - > int : return self. size
[ -0.020764220505952835, 0.56910640001297, 0.19966165721416473, -0.6373490691184998, 0.3383151888847351, 0.6170834302902222, 1.0982136726379395, 0.2844124138355255, 0.3988858759403229, -1.5570539236068726, -0.21260565519332886, -0.03230830654501915, -0.33274510502815247, -0.16969415545463562...
def findcircles ( self, centerdet = centerdet ) : imgtemp = cv2. medianblur ( self. _ image, self. blur ) imgtemp = self. _ converttogray ( ) circles = cv2. houghcircles ( imgtemp, cv. cv _ hough _ gradient, self. dp, self. mindist, param1 = self. edgedet, param2 = centerdet, minradius = self. minrad, maxradius = self....
[ 0.4951953887939453, -0.199399933218956, 0.6241151690483093, -0.4929845631122589, 0.27264121174812317, -0.7080051302909851, -0.17692475020885468, -0.4487391412258148, 0.7014321088790894, 0.46368616819381714, 0.561057448387146, -0.03626429662108421, -0.5556986331939697, 0.22097353637218475, ...
def _ translate _ _ interfaces _ interface _ ipv6 _ neighbor ( input _ yang _ obj, translated _ yang _ obj = none ) : if input _ yang _ obj. link _ layer _ address. _ changed ( ) : input _ yang _ obj. link _ layer _ address = input _ yang _ obj. link _ layer _ address if input _ yang _ obj. origin. _ changed ( ) : inpu...
[ -0.6429287791252136, -0.7011621594429016, 0.501175582408905, -0.3327910304069519, -0.6371452808380127, 0.29906994104385376, 1.0636969804763794, -0.7475666999816895, 0.5332961678504944, 0.24959182739257812, -0.6246889233589172, 0.2846475839614868, -0.3706395924091339, -0.05441911518573761, ...
def read _ words ( filename ) : # load assets word _ file = urllib2. urlopen ( filename ) # read in files as string words = word _ file. read ( ) # template lines and solution lines list of line string word _ list = words. splitlines ( ) print " loaded a dictionary with ", len ( word _ list ), " words " return word _ l...
[ -0.22255444526672363, -0.15857736766338348, 0.5076510906219482, -1.1030421257019043, -0.48243066668510437, 0.03996596485376358, 0.013956804759800434, 1.243621587753296, -0.5973782539367676, 0.6872346997261047, -0.14803184568881989, -0.5203747153282166, 0.3713473677635193, 1.007350206375122...
def _ _ str _ _ ( self ) : indent = " " sio = stringio. stringio ( ) print > > sio, " static library directories and sources " for each _ dir in self. static _ lib _ dirs : print > > sio, indent, each _ dir for each _ src in self. static _ lib _ srcs ( each _ dir ) : print > > sio, indent * 2, each _ src print > > sio,...
[ 0.0522870309650898, -1.4410252571105957, 0.40831512212753296, -0.33016878366470337, -0.305189311504364, 0.6465603709220886, 0.3255968987941742, -0.09690751135349274, -0.4216087758541107, -0.2501741051673889, 0.4315702021121979, -0.43929311633110046, 0.2033873349428177, 0.4708206355571747, ...
def get _ external _ service _ uuid ( name ) : if name in _ external _ services : return _ external _ services [ name ] [ 0 ] else : return none
[ -0.8740673065185547, -0.13694490492343903, 0.7443433403968811, -0.7366753816604614, -1.5230209827423096, -0.016099797561764717, -0.3764047622680664, -0.21269045770168304, 0.030473552644252777, 0.9622471928596497, 0.22924913465976715, -0.20435017347335815, -0.529875636100769, -0.19543464481...
def add _ node ( self, * * kwargs ) : new _ nid = self. redis. get ( self. next _ nid _ key ) new _ node = node ( self, new _ nid ) self. redis. sadd ( self. nodes _ key, new _ nid ) for k in kwargs : new _ node. prop. _ _ setattr _ _ ( k, kwargs [ k ] ) self. _ index ( new _ node. name, k, kwargs [ k ] ) self. redis. ...
[ -1.2734671831130981, 0.7810670137405396, 0.43315431475639343, -0.38165780901908875, 0.2296837866306305, 0.00556024257093668, -0.8673204779624939, -0.2985652685165405, -0.028054725378751755, 0.08855322003364563, 0.075674869120121, -0.0030109744984656572, -0.6741003394126892, 0.1360622644424...
def lemke _ howson ( a, b, initial _ dropped _ label = 0 ) : if np. min ( a ) < = 0 : a = a + abs ( np. min ( a ) ) + 1 if np. min ( b ) < = 0 : b = b + abs ( np. min ( b ) ) + 1 # build tableaux col _ tableau = make _ tableau ( a ) col _ tableau = shift _ tableau ( col _ tableau, a. shape ) row _ tableau = make _ tabl...
[ 0.5290122628211975, -0.08099409937858582, 0.8763626217842102, -0.244862899184227, -0.023307470604777336, -0.03760873153805733, 0.05039893835783005, 0.13844972848892212, 0.18345710635185242, 1.3245347738265991, 0.5018420815467834, 0.5652222037315369, 0.9837758541107178, 0.16373257339000702,...
def jsonresponse ( message, status = 0, content = { } ) : content [ " message " ] = message content [ " status " ] = status json _ content = simplejson. dumps ( content, cls = lazyencoder, ensure _ ascii = false ) return httpresponse ( json _ content, content _ type = " application / json " )
[ -0.1033928170800209, -1.0838028192520142, 0.5090385675430298, -0.8415150046348572, -0.9523839950561523, -0.5127626061439514, -0.44461876153945923, -0.431476891040802, -0.015758898109197617, 0.26454663276672363, -1.070943832397461, 0.04826629161834717, -0.8498996496200562, 0.279345184564590...
def set _ property ( self, property : str, value : any ) : if isinstance ( value, list ) : self. properties [ property ] = value else : self. properties [ property ] = [ value ]
[ -0.4812891483306885, -0.35835549235343933, 0.32203397154808044, 0.3736284077167511, 0.10314030200242996, 0.3958803117275238, -1.278639316558838, 0.6986490488052368, 0.5311133861541748, 0.061093952506780624, -0.2889067530632019, -0.00697715999558568, -0.5678172707557678, 0.30820950865745544...
def test _ backoff _ seq ( self ) : # progressive delay backoff = [ 1, 2, 3 ] with mock. patch ('time. sleep') as sleep : @ retried ( retries = 3, backoff = backoff ) def f ( ) : raise valueerror with self. assertraises ( valueerror ) : f ( ) calls = [ mock. call ( b ) for b in backoff ] sleep. assert _ has _ calls ( c...
[ 0.34097832441329956, 0.718652069568634, 0.45710262656211853, 0.5887512564659119, 0.847366452217102, 0.5786548256874084, 0.021998286247253418, -0.1805412918329239, -0.25603431463241577, 0.3312014043331146, -0.38931459188461304, -0.9309871196746826, -0.741496741771698, -0.07205065339803696, ...
def _ detector ( self ) : # xxx introduces dependency on cctbx. xfel! should probably be # merged into the code here! from xfel. cftbx. detector. metrology import _ transform, get _ projection _ matrix # apply the detector distance to the translation of the root # detector object. d = self. _ metrology _ params. detect...
[ 0.4659006893634796, 0.3295626640319824, 0.5245843529701233, 0.06905300915241241, -0.5581563115119934, 0.03580259531736374, -0.05959073826670647, -0.24829839169979095, -0.19734793901443481, -0.3601994812488556, 0.1348995417356491, -0.13857918977737427, 0.9283310770988464, 0.4228441417217254...
def read _ timestamp ( timestamp ) : return datetime. strptime ( timestamp,'% y % m % d % h % m % s')
[ -0.11769124865531921, -0.05872448906302452, 0.7807011008262634, -0.8283978700637817, -0.48692587018013, -0.15435290336608887, -0.9556747078895569, -0.30229708552360535, 0.9389106631278992, 0.5215355157852173, 0.3641129434108734, -0.10770616680383682, 0.15306036174297333, -1.574820160865783...
def streamer ( self, gen ) : try : for reply in gen : yield self. sender. write ( reply ) yield except keyerror : # propagate exception self. sender. write ( self. syntax _ error _ code ) yield
[ -0.7690000534057617, 0.17633697390556335, 0.570650577545166, -0.2306165099143982, -0.3322131335735321, -0.24028033018112183, 0.5455272793769836, -1.0821837186813354, -0.604199230670929, -0.17423534393310547, -0.20955146849155426, 0.27384719252586365, -0.9344807267189026, 0.9981027245521545...
def test _ signal ( ) : # ieee std 802. 11 - 2016 : table i - 7 — bit assignment for signal field input = bits ('101100010011000000000000') # ieee std 802. 11 - 2016 : table i - 8 — signal field bits after encoding expected = bits ('110100011010000100000010001111100111000000000000') output = do ( input ) assert output ...
[ 0.03531002625823021, 0.38909515738487244, 0.5082008242607117, 0.02165311947464943, -0.10504516214132309, 0.4180847406387329, 1.1470420360565186, -0.8098562359809875, 0.220987007021904, -0.3106571137905121, -1.289425015449524, 0.4935620129108429, -0.47095775604248047, 0.09534399211406708, ...
def increment ( self, key, value = 1 ) : return self. _ memcache. incr ( self. _ prefix + key, value )
[ -1.003304362297058, 0.7048317193984985, 0.43299224972724915, 0.2879635691642761, -1.5945297479629517, -0.015378008596599102, -0.3668932318687439, -0.15703430771827698, 0.17938421666622162, -0.262565016746521, -0.13211201131343842, 0.19076740741729736, -0.40841445326805115, -0.1625493317842...
def get _ parameters ( self ) : # return self. net. parameters ( ) return self. parameters ( )
[ -0.2979234755039215, -0.5818855166435242, 0.3719348907470703, -0.010148551315069199, 0.5389704704284668, 0.12649622559547424, -0.45928317308425903, -0.6209142804145813, 0.20220813155174255, -0.08752990514039993, 0.014481492340564728, 0.2042856365442276, -1.0256073474884033, 0.8988358974456...
def act ( self, s ) : if random. random ( ) < self. epsilon : # exploration : random action between 0 and ( n actions - 1 ) return random. randint ( 0, self. actioncnt - 1 ) else : # exploitation : select action with max q - value return np. argmax ( self. brain. predictone ( s ) )
[ -1.1942938566207886, -0.1736181676387787, 0.44751501083374023, 0.03231996297836304, 0.3178802728652954, -0.09933806955814362, 0.7795711755752563, -0.5472733974456787, 1.804203748703003, -0.034584350883960724, 0.3672567307949066, 0.7915955781936646, -0.25835418701171875, -0.4133320748806, ...
def add _ state _ connections ( circuit, lib ) : for module in circuit [ " modules " ]. values ( ) : gate = lib [ module [ " type " ] ] if gate [ " type " ] = = " latch " : state _ pin = gate [ " state _ input " ] output _ net = module [ " connections " ] [ gate [ " output " ] ] module [ " connections " ] [ state _ pin...
[ -0.33314648270606995, -0.3665822744369507, 0.5352333188056946, -0.29948994517326355, 0.3085751533508301, 0.3003075420856476, 0.24434083700180054, -0.49195775389671326, 0.04164073243737221, -0.04829251021146774, 0.06098201498389244, -0.05093370005488396, -0.13619102537631989, 0.997040212154...
def filter _ getmode ( ) : andor _ solis. filter _ getmode. restype = ctypes. c _ uint mode = ctypes. c _ uint ( ) result = andor _ solis. filter _ getmode ( ctypes. byref ( mode ) ) check _ status ( result ) return int ( mode. value )
[ -0.6026296019554138, 0.0774521678686142, 0.5445268750190735, 0.3017394542694092, -0.30915403366088867, -0.4956289529800415, 0.7345377802848816, -0.12785924971103668, 0.45509621500968933, -0.09269538521766663, 0.155938521027565, 0.5165168046951294, -0.456533282995224, -0.5087765455245972, ...
def recreate _ image ( codebook, labels, w, h ) : d = codebook. shape [ 1 ] image = np. zeros ( ( w, h, d ) ) label _ idx = 0 for i in range ( w ) : for j in range ( h ) : image [ i ] [ j ] = codebook [ labels [ label _ idx ] ] label _ idx + = 1 return image
[ -1.3322511911392212, -0.13050243258476257, 0.33343636989593506, -0.049144063144922256, 0.14650145173072815, 0.46610227227211, -0.43898341059684753, 0.02749750390648842, -1.2343113422393799, 0.2734910249710083, 0.4062742590904236, 0.9151507616043091, -0.29507026076316833, -0.114874444901943...
def check _ reach ( self ) : if self. count _ distance ( ) < = self. decider. horizon * self. decider. steplen : return true else : return false
[ -0.41163161396980286, -0.07469388842582703, 0.6469014286994934, 0.8131006956100464, 0.3387838900089264, 1.330483317375183, -0.3196721076965332, 0.33832257986068726, -1.9800771474838257, 0.24528083205223083, -0.18476714193820953, -0.2775565981864929, -0.7285292148590088, 0.46105772256851196...
async def top _ game ( ctx ) : if is _ channel _ block ( ctx ) : return prefix = await bot. get _ prefix ( ctx. message ) async with ctx. typing ( ) : image _ path = get _ top _ games ( ) msg = " top live games : dota2api " embed = discord. embed ( color = discord. color. green ( ) ) embed. title = msg image _ file = d...
[ -0.7264256477355957, 0.2944868803024292, 1.2129642963409424, 0.06386299431324005, -0.2183663696050644, 0.2975160479545593, -0.04857223853468895, -0.19601590931415558, 0.15969684720039368, 0.11640386283397675, 0.10288916528224945, 0.9769355058670044, -0.03274460509419441, 0.0533308461308479...
def test _ vasp _ no _ potcar _ in _ repo ( run _ vasp _ process ) : # let us add an additional object to the retrieve _ list ( which do not delete the object after parse ) # and check if it is actually there inputs = { } _, node = run _ vasp _ process ( inputs ) repo _ objects = node. base. repository. list _ object _...
[ -0.43951427936553955, -0.8711656928062439, 0.24188359081745148, -0.286531001329422, 0.4266342520713806, 0.43859654664993286, -0.5378455519676208, -0.15003260970115662, 0.14463084936141968, -0.6190594434738159, -0.447444885969162, -0.7277275323867798, -0.34027940034866333, 0.052260246127843...
def set _ mute _ failures ( self, v ) : self. _ mute _ failures = v
[ -0.12492530047893524, -0.39772576093673706, 0.3894912600517273, -0.2809878885746002, -0.2439228594303131, 0.5845829248428345, 0.33231472969055176, -0.6592650413513184, 1.0517200231552124, -0.6317565441131592, -1.3461546897888184, 0.4496670365333557, -0.7960872054100037, 0.06860147416591644...
def svcscan ( self ) : log. debug ( " executing volatility svcscan plugin on { 0 } ". format ( self. memdump ) ) self. _ _ config ( ) results = [ ] command = self. plugins [ " svcscan " ] ( self. config ) for rec in command. calculate ( ) : new = { " service _ offset " : " { 0 : # x } ". format ( rec. obj _ offset ), "...
[ -0.641697883605957, -0.5660967826843262, 0.6533055305480957, -0.795440137386322, -0.3590758144855499, -1.032753825187683, -0.37721309065818787, -0.39418286085128784, -0.30120041966438293, 0.2892313301563263, -0.28609776496887207, 0.4532826542854309, -0.506004810333252, 0.2597244679927826, ...
def chebyshev _ polynomials ( adj, k ) : print ( " calculating chebyshev polynomials up to order { }... ". format ( k ) ) adj _ normalized = normalize _ adj ( adj ) laplacian = sp. eye ( adj. shape [ 0 ] ) - adj _ normalized largest _ eigval, _ = eigsh ( laplacian, 1, which ='lm') scaled _ laplacian = ( 2. / largest _ ...
[ 0.4201219975948334, 0.2450660616159439, 0.7910573482513428, -0.5623047351837158, -0.3319740891456604, -0.03878401592373848, -0.6674821376800537, 0.8586983680725098, -0.10570952296257019, 1.538570761680603, -0.9547753930091858, -0.2976245582103729, 0.33714327216148376, -0.2387191355228424, ...
def train ( self, train _ loader, val _ loader = none ) : start _ epoch = self. cur _ epoch for self. cur _ epoch in range ( start _ epoch, self. max _ epoch + 1 ) : self. adjust _ lr ( self. cur _ epoch ) train _ state = self. process _ epoch ( train _ loader,'train') self. update _ checkpoint ( self. cur _ epoch ) if...
[ -0.25753921270370483, 0.041380513459444046, 0.3692355751991272, 0.9772917032241821, 0.12492194026708603, 0.06932875514030457, -0.6695117950439453, 0.5814720988273621, -0.8937484622001648, -0.31822633743286133, -0.07486552745103836, -0.10081411153078079, 0.7182903289794922, 0.32297772169113...
def test _ count _ connections ( self ) : response = self. client. get ( self. url ) self. assertequal ( 200, response. status _ code ) self. assertgreaterequal ( response. data. get ('total'), 0 )
[ -0.18823567032814026, -0.3478572368621826, 0.6180521845817566, -0.5267115831375122, 1.569061040878296, 0.7652031183242798, -0.35986077785491943, -0.1320660561323166, -0.3487164080142975, -0.8290599584579468, -0.13768477737903595, -0.6812936067581177, 0.1958625614643097, -0.1164612323045730...
def train ( self, x : np. ndarray, y : np. ndarray ) : for datum, label in zip ( x, y ) : y _ pred = self. feedforward ( datum ) print ( f " label : { label } vs pred : { y _ pred } " ) if y _ pred! = label : # missclasified for j in range ( len ( self. perceptron ) ) : if label : print ( f " pred : { y _ pred } - actu...
[ -0.2641398012638092, 0.01940208300948143, 0.686310350894928, -0.6679632067680359, 0.2094161957502365, 0.8420498371124268, -0.2837263345718384, -0.1479078233242035, 0.1544724851846695, 0.25227588415145874, -0.17353032529354095, 1.0777685642242432, 0.21735870838165283, 0.6791242361068726, ...
def recon ( targets, mode ) : raise notimplementederror ('recon : { } { } '. format ( targets, mode ) )
[ -0.9095136523246765, -0.5445960164070129, 0.4678175747394562, 0.44189468026161194, 0.2989926040172577, 0.029115792363882065, 0.3375326693058014, 0.978831946849823, -0.20855148136615753, 0.5993291139602661, -1.076330542564392, 0.19712525606155396, 0.3386809229850769, -0.9927940368652344, ...
def friend _ request _ status ( self, friend _ request _ status ) : self. _ friend _ request _ status = friend _ request _ status
[ -0.9114351868629456, -1.1370781660079956, 0.09919711202383041, 0.5070716142654419, 0.20939816534519196, 1.2899630069732666, -0.43250545859336853, -0.29690277576446533, -0.7171396613121033, -0.9160891175270081, -0.5475624203681946, -1.4613356590270996, 0.7379141449928284, -0.133940532803535...
def _ ios _ coord _ to _ decimal ( coord, ref = none ) : coord = map ( ratio _ to _ frac, coord. values ) sign = 1 if not ref else ref _ to _ sign ( ref ) return sign * decimalify ( * coord )
[ 0.11770384758710861, 0.2176414430141449, 0.6265990734100342, 0.09783097356557846, 0.4111342430114746, -1.1736609935760498, 0.10392105579376221, -0.585847795009613, -0.21876145899295807, 0.013561850413680077, 0.3776370882987976, -0.6395321488380432, 0.495159775018692, -0.766083300113678, ...
def id ( self ) : return self. id _ value
[ 0.5557023882865906, -1.0174838304519653, 0.23704218864440918, -0.02816053293645382, 0.6399872899055481, 1.3834609985351562, 0.36909642815589905, 0.4744376242160797, 0.7871689796447754, -0.7517759799957275, -0.3131900727748871, 0.5707597136497498, -0.36688828468322754, 0.07981998473405838, ...
def visit _ tryfinally ( self, node ) : # pylint : disable = invalid - name try _ id = self. create _ ast _ component ( node, component. try _ finally ) self. create _ composition ( try _ id, * self. composition _ edge ) new _ node = copy ( node ) new _ node. body = self. process _ body ( new _ node. body, try _ id ) n...
[ -0.9225625991821289, 0.015589653514325619, 0.6756916046142578, -1.168688416481018, -0.18742872774600983, -0.36100897192955017, 0.12200307846069336, -0.19962508976459503, 0.25569552183151245, 0.3509846031665802, 0.05011990666389465, 0.1503692865371704, -0.05086424946784973, -0.0936798378825...
def create _ map _ from _ txt ( path ) : mst = codecs. open ( path,'r ', encoding = " utf - 8 " ) all _ lines = mst. read ( ). splitlines ( ) mapping = { } for i in range ( 0, len ( all _ lines ) ) : line = all _ lines [ i ] if i = = 0 and " # " in line : continue ; # skip comments else : var _ val = line. split ( " " ...
[ 0.04233429208397865, -1.3418800830841064, 0.6723471879959106, -0.795012354850769, -2.247859001159668, 1.0307663679122925, -0.24507012963294983, 0.930137038230896, -0.8809412717819214, 0.6952833533287048, -0.4955970346927643, -0.059709902852773666, 0.9124888181686401, -0.07920901477336884, ...
def _ _ init _ _ ( self ) : self. hash _ map = { } self. queue = [ ]
[ 0.14881503582000732, -1.2130931615829468, 0.44461867213249207, -0.00285167689435184, 0.4408257305622101, -0.044483184814453125, -0.6129366159439087, 0.931395947933197, -0.09097698330879211, -0.3371373116970062, -0.8463115096092224, 0.09343650937080383, 0.3383926749229431, 1.437998652458191...
def archive ( self, espn, config ) : period _ stats = espn. scoring _ period _ stats ( self. scoring _ period ) logger. info ( f " storing { len ( period _ stats ) } teams'stats " ) store = statstore ( config. league _ id, espn. year ) for team, stats in period _ stats. items ( ) : store. store _ stats ( stats, team, s...
[ -0.008116240613162518, 0.6917360424995422, 0.32105427980422974, -0.34838029742240906, 0.08882477134466171, 0.7824591398239136, 0.19321615993976593, -0.03330295532941818, 0.2922762334346771, -0.6113494634628296, -0.2654951512813568, -0.3299306631088257, 0.11862730234861374, -0.8404068350791...
def match _ matlab _ config ( ice, illumination, rt _ config, model _ config, input _ file ) : nbr _ lyr = 5 # make sure ice config matches matlab benchmark ice. ri = 2 ice. shp = [ 0 ] * nbr _ lyr ice. shp _ fctr = [ 0 ] * nbr _ lyr ice. ar = [ 0 ] * nbr _ lyr ice. sfc = np. array ( [ 0. 25 ] * model _ config. nbr _ w...
[ 0.16981029510498047, -0.45926544070243835, 0.524214506149292, 0.17676295340061188, 0.42619243264198303, 0.886215329170227, 0.4530026614665985, 0.398063063621521, -0.5666933059692383, 0.7517291307449341, -0.3928253650665283, -0.6876712441444397, -1.000478744506836, 0.252112478017807, 0.37...
def filter _ positive ( num _ list ) : positif _ list = [ ] for i in num _ list : if i > 0 : positif _ list. append ( i ) return positif _ list
[ -0.5463787913322449, -0.7796686887741089, 0.5540413856506348, 1.0547007322311401, -0.23272812366485596, 1.2601258754730225, -0.5919156074523926, 1.3526006937026978, -0.5939548015594482, 0.08662599325180054, -0.9527257680892944, -0.7497032284736633, -0.6074681282043457, 0.329254150390625, ...
def print ( self ) : # inspect solution. total _ dist = 0 for vehicle _ id in xrange ( self. data. num _ vehicles ) : index = self. routing. start ( vehicle _ id ) plan _ output ='route for vehicle { 0 } : \ n '. format ( vehicle _ id ) route _ dist = 0 route _ load = 0 while not self. routing. isend ( index ) : node _...
[ -0.26428893208503723, -0.6311297416687012, 0.8409231305122375, -0.9078203439712524, -0.1388295739889145, 0.004017955623567104, 0.3635144829750061, -0.1814197450876236, -0.43638312816619873, 0.380060613155365, 0.0665314719080925, 0.4643072783946991, 0.39792847633361816, 0.13334788382053375,...
def test _ fourier _ synthesis _ rms _ height _ more _ wavevectors ( ) : n = 256 h = 0. 74 rms _ height = 7. s = 1. np. random. seed ( 0 ) realised _ rms _ heights = [ ] for i in range ( 100 ) : topography = fourier _ synthesis ( ( n, n ), ( s, s ), h, rms _ height = rms _ height, rolloff = 0, long _ cutoff = s / 8, sh...
[ 0.2646676301956177, 0.07275371998548508, 0.4680846035480499, 0.5890488028526306, -0.07003037631511688, 0.29860374331474304, 0.5979312658309937, -0.1249772384762764, 0.2361765205860138, -0.8558193445205688, -0.40458765625953674, 0.18424467742443085, 0.4215473234653473, 0.946731686592102, ...
def node _ exists ( self, path, print _ error = true ) : path = self. fix _ path ( path ) if self. get _ node ( path ) is none : return false else : return true
[ -0.6613804697990417, 0.024450605735182762, 0.7433483600616455, -0.23800550401210785, 1.0010921955108643, 0.38505983352661133, -0.666414201259613, 0.30766114592552185, -0.48806726932525635, 0.34529054164886475, 0.3334053158760071, 0.31299889087677, -0.059512678533792496, -0.709138810634613,...
def get _ values ( self ) - > dict [ str, str ] : values : dict [ str, str ] = { } for provider in self. _ providers. values ( ) : values. update ( provider. get _ values ( ) ) return values
[ -0.7253443598747253, -0.08082150667905807, 0.2552158832550049, -0.664824903011322, -0.12917397916316986, 0.06267891824245453, -1.1410548686981201, -0.33290913701057434, -0.28842440247535706, 0.06832077354192734, -0.5849073529243469, 0.5073956251144409, 0.19415175914764404, 1.00267767906188...
def checked ( self, * args ) : return _ topods. topods _ shape _ checked ( self, * args )
[ -0.29917362332344055, 0.14188113808631897, 0.3567846119403839, 0.42800450325012207, 0.31999826431274414, 0.7408291697502136, 1.119478702545166, -1.1334484815597534, -0.8273940086364746, 0.285203754901886, -0.13512267172336578, 0.005676762200891972, -0.30164408683776855, 0.01527372188866138...
def test _ _ array _ delete _ last _ element ( self ) : arr = array ( 10, 0 ) arr [ 0 ] = 10 arr [ 1 ] = 20 arr [ 2 ] = 30 arr [ 3 ] = 40 # print ( arr ) delete ( arr, 40 ) # print ( arr ) res = arr [ 3 ] # print ( res ) self. assertequal ( res, none )
[ 0.1794457733631134, -0.7001203894615173, 0.8393808603286743, 0.05348990485072136, 0.6245793104171753, 0.2960529327392578, 0.2913578450679779, 0.24440182745456696, 1.2859705686569214, 0.27180424332618713, -0.3619282841682434, -0.014888654462993145, -0.9542515873908997, -0.0680176317691803, ...
def report _ response _ status ( cls, status, expected _ response, action ) : result = false if expected _ response is none or expected _ response is false or \ expected _ response = = [ ] or expected _ response = = " " : pattern = re. compile ('^ 2 [ 0 - 9 ] [ 0 - 9 ] $') if pattern. match ( str ( status ) ) is not no...
[ -0.48995187878608704, -0.8162729144096375, 0.6456317901611328, 0.25750038027763367, 0.4134809076786041, 0.2589647173881531, 0.06997863203287125, 0.13921938836574554, 0.11464820802211761, 0.04198813438415527, -0.6527315378189087, -0.0585123747587204, -0.01277116034179926, -0.260995775461196...
def _ get ( self, resource ) : uri = self. _ mk _ uri ( resource ) rsp = requests. get ( uri, headers = self. _ mk _ headers ( ) ) self. _ check _ response ( rsp, uri ) return rsp
[ -0.4824340045452118, -0.5099604725837708, 0.3875923752784729, -0.6821290850639343, 0.011765239760279655, -0.44367650151252747, -0.695339024066925, -1.3471739292144775, 0.3307177424430847, -0.3157810866832733, 0.6662937998771667, -0.16587235033512115, -0.560734748840332, -1.4089245796203613...
def setimage ( hbin, vbin, hstart, hend, vstart, vend ) : return none
[ -0.3502228260040283, -0.5934130549430847, 0.22171272337436676, 0.7035242915153503, 0.4414917528629303, 0.14959953725337982, 0.41831642389297485, -0.35647502541542053, -0.9213592410087585, 0.13272914290428162, -0.2576492428779602, 0.9074802398681641, -1.3379666805267334, 0.599525511264801, ...
def get _ state _ values ( self, nn _ input, internal _ states = none ) : nn _ output = self. get _ nn _ output ( nn _ input, internal _ states ) if self. value _ unfold _ time _ rank is true : state _ values = self. value _ network. apply ( nn _ output [ " output " ], nn _ input ) else : state _ values = self. value _...
[ -0.5946407914161682, 0.20657978951931, 0.3689521253108978, 0.21593956649303436, -0.2759193181991577, -1.1390151977539062, -0.3496074080467224, -0.22974370419979095, -0.2727055549621582, -0.36589381098747253, -0.20474520325660706, -0.859200656414032, 0.10209653526544571, 0.7219196557998657,...
def description ( self, obj ) : return obj. description [ : 20 ]
[ 0.36671945452690125, -0.15166105329990387, 0.3059101104736328, -1.059817910194397, 0.3509126305580139, 0.11407049745321274, 0.1147954985499382, -0.5191937685012817, 0.48909345269203186, 0.6648315787315369, -0.6324042081832886, 0.301939994096756, 0.2570529282093048, -0.7434558868408203, 0...