content
stringlengths
7
1.05M
# |---------------------| # <module> | | # |---------------------| # # |---------------------| # print_n | s--->'Hello' n--->2 | | # |---------------------| # # |---------------------| # print_n | s--->'Hello' n--->1 | | # |---------------------| def print_n(s, n): if n <= 0: return print(s) print_n(s, n-1) print_n('Hello', 2)
num_waves = 3 num_eqn = 3 # Conserved quantities pressure = 0 x_velocity = 1 y_velocity = 2
class RangeQuery: def __init__(self, data, func=min): self.func = func self._data = _data = [list(data)] i, n = 1, len(_data[0]) while 2 * i <= n: prev = _data[-1] _data.append([func(prev[j], prev[j + i]) for j in range(n - 2 * i + 1)]) i <<= 1 def query(self, begin, end): depth = (end - begin).bit_length() - 1 return self.func(self._data[depth][begin], self._data[depth][end - (1 << depth)]) class LCA: def __init__(self, root, graph): self.time = [-1] * len(graph) self.path = [-1] * len(graph) P = [-1] * len(graph) t = -1 dfs = [root] while dfs: node = dfs.pop() self.path[t] = P[node] self.time[node] = t = t + 1 for nei in graph[node]: if self.time[nei] == -1: P[nei] = node dfs.append(nei) self.rmq = RangeQuery(self.time[node] for node in self.path) def __call__(self, a, b): if a == b: return a a = self.time[a] b = self.time[b] if a > b: a, b = b, a return self.path[self.rmq.query(a, b)]
# Source and destination file names. test_source = "compact_lists.txt" test_destination = "compact_lists.html" # Keyword parameters passed to publish_file. reader_name = "standalone" parser_name = "rst" writer_name = "html" # Settings # local copy of stylesheets: # (Test runs in ``docutils/test/``, we need relative path from there.) settings_overrides['stylesheet_dirs'] = ('.', 'functional/input/data')
#!/usr/bin/env python dic = {'nome': 'Shirley Manson', 'banda': 'Garbage'} print(dic['nome']) del dic dic = {'Yes': ['Close To The Edge', 'Fragile'], 'Genesis': ['Foxtrot', 'The Nursery Crime'], 'ELP': ['Brain Salad Surgery']} print(dic['Yes'])
class Student(object): def __init__(self, name, score): self.__name = name self.__score = score def print_score(self): print('%s: %s' % (self.__name, self.__score)) a = Student('xiaoqiang', 60) a.print_score() # error # print(a.__score) # 不规范的使用 print(a._Student__score)
#!/usr/bin/env python3 """Configuration of builddataset.""" buildcfg = {} # === Selection requirements === # # Minimum clear pixel coverage in the constructed Source Mask # Note: Due to water vapour, most rivers and lakes will be marked as not clear buildcfg['min_clearance'] = 0.75 # Minimum number of LR images per set # Note: SR requires at the very minimum n^2 LR images, where n is scale factor buildcfg['nmin'] = 12 # === File and Folder names === # buildcfg['normfilename'] = 'norm' # Name of the file containing the norm buildcfg['HRname'] = 'HR' # Name of HR files buildcfg['scoremaskname'] = 'SM' # Name of the score mask file buildcfg['sources'] = 'sources.txt' # File name of list of source files buildcfg['dirvalidate'] = 'validate' # Folder name of validation HRs buildcfg['dirsubtest'] = 'submission-test' # Name of submission test folder buildcfg['SRname'] = 'SR' # Name of SR submission-test files buildcfg['subtestnoise'] = 1000 # standard dev of noise of sub test
class DictHelper: @staticmethod def split_path(path): if isinstance(path, str): path = path.split(" ") elif isinstance(path, int): path = str(path) filename, *rpath = path return (filename, rpath) @staticmethod def get_dict_by_path(dict_var, path): head, *tail = path if tail: try: return DictHelper.get_dict_by_path(dict_var[head], tail) except TypeError: try: return DictHelper.get_dict_by_path(dict_var[int(head)], tail) except ValueError: raise KeyError("Could not get "+str(path)+" in "+str(dict_var)) else: return dict_var @staticmethod def get_value_by_path(var, path): head, *tail = path if tail: try: return DictHelper.get_value_by_path(var[head], tail) except TypeError: try: return DictHelper.get_value_by_path(var[int(head)], tail) except ValueError: raise KeyError("Could not get "+str(path)+" in "+str(var)) else: try: return var[head] except TypeError: try: return var[int(head)] except ValueError: raise KeyError("Could not get "+str(path)+" in "+str(var))
coordinates = (1,2,3) # bu değişkendeki ögeleri tek tek kullanalım # kullanacağımız yerde ögeleri indeks numaralarına göre çağırabiliriz coordinates[0],coordinates[1],coordinates[2] print(coordinates[0]) # veya ögeleri değişkenlere atayabiliriz x = coordinates[0] y = coordinates[1] z = coordinates[2] print(y) # veya ve en kullanışlı yöntem ise toplu olarak değişkenlere atamaktır x1,y1,z1 = coordinates[0],coordinates[1],coordinates[2] print(z1) # bu şekil toplu olarak ögeleri veya değerleri değişkenlere atayabiliriz
"""Support ODT formatting. Part of the PyWriter project. Copyright (c) 2020 Peter Triesberger For further information see https://github.com/peter88213/PyWriter Published under the MIT License (https://opensource.org/licenses/mit-license.php) """ def to_odt(text): """Convert yw7 raw markup to odt. Return an xml string.""" try: # process italics and bold markup reaching across linebreaks italics = False bold = False newlines = [] lines = text.split('\n') for line in lines: if italics: line = '[i]' + line italics = False while line.count('[i]') > line.count('[/i]'): line += '[/i]' italics = True while line.count('[/i]') > line.count('[i]'): line = '[i]' + line line = line.replace('[i][/i]', '') if bold: line = '[b]' + line bold = False while line.count('[b]') > line.count('[/b]'): line += '[/b]' bold = True while line.count('[/b]') > line.count('[b]'): line = '[b]' + line line = line.replace('[b][/b]', '') newlines.append(line) text = '\n'.join(newlines) text = text.replace('&', '&amp;') text = text.replace('>', '&gt;') text = text.replace('<', '&lt;') text = text.rstrip().replace( '\n', '</text:p>\n<text:p text:style-name="First_20_line_20_indent">') text = text.replace( '[i]', '<text:span text:style-name="Emphasis">') text = text.replace('[/i]', '</text:span>') text = text.replace( '[b]', '<text:span text:style-name="Strong_20_Emphasis">') text = text.replace('[/b]', '</text:span>') except: pass return text if __name__ == '__main__': pass
''' A program for warshall algorithm.It is a shortest path algorithm which is used to find the distance from source node,which is the first node,to all the other nodes. If there is no direct distance between two vertices then it is considered as -1 ''' def warshall(g,ver): dist = list(map(lambda i: list(map(lambda j: j, i)), g)) for i in range(0,ver): for j in range(0,ver): dist[i][j] = g[i][j] #Finding the shortest distance if found for k in range(0,ver): for i in range(0,ver): for j in range(0,ver): if dist[i][k] + dist[k][j] < dist[i][j] and dist[i][k]!=-1 and dist[k][j]!=-1: dist[i][j] = dist[i][k] + dist[k][j] #Prnting the complete short distance matrix print("the distance matrix is") for i in range(0,ver): for j in range(0,ver): if dist[i][j]>=0: print(dist[i][j],end=" ") else: print(-1,end=" ") print("\n") #Driver's code def main(): print("Enter number of vertices\n") ver=int(input()) graph=[] #Creating the distance matrix graph print("Enter the distance matrix") for i in range(ver): a =[] for j in range(ver): a.append(int(input())) graph.append(a) warshall(graph,ver) if __name__=="__main__": main() ''' Time Complexity:O(ver^3) Space Complexity:O(ver^2) Input/Output: Enter number of vertices 4 Enter the graph 0 8 -1 1 -1 0 1 -1 4 -1 0 -1 -1 2 9 0 The distance matrix is 0 3 -1 1 -1 0 1 -1 4 -1 0 -1 -1 2 3 0 '''
class Solution: """ @param S: A set of numbers. @return: A list of lists. All valid subsets. """ def subsetsWithDup(self, S): # write your code here # Revursive if (not S): return [[]] S = sorted(S) tmp = self.subsetsWithDup(S[:-1]) locked = True res = [] + tmp count = 0 for i in S[:-1]: if (i == S[-1]): count += 1 for i in tmp: if ([S[-1]] * count == i): locked = False if (not locked): res.append(i + [S[-1]]) return res # Iterative # res = [[]] # S = sorted(S) # for index, v in enumerate(S): # locked = True # count = 0 # for j in S[:index]: # if (j == v): # count += 1 # tmp = [] # for a in res: # if ([v]*count == a): # locked = False # if (not locked): # tmp.append(a + [v]) # res += tmp # return res
#------------------------------------------------------------------------------- # importation #------------------------------------------------------------------------------- # Main class Ml_tools class ml_tools: def __init__(self): pass
text = " I love apples very much " # The number of characters in the text text_size = len(text) # Initialize a pointer to the position of the first character of 'text' pos = 0 # This is a flag to indicate whether the character we are comparing # to is a white space or not is_space = text[0].isspace() # Start tokenization for i, char in enumerate(text): # We are looking for a character that is the opposit of 'is_space' # if 'is_space' is True, then we want to find a character that is # not a space. and vice versa. This event marks the end of a token. is_current_space = char.isspace() if is_current_space != is_space: print(text[pos:i]) if is_current_space: pos = i + 1 else: pos = i # Update the character type of which we are searching # the opposite (space vs. not space). # prevent 'pos' from being out of bound if pos < text_size: is_space = text[pos].isspace() # Create the last token if the end of the string is reached if i == text_size - 1 and pos <= i: print(text[pos:])
"""Issue. """ class Issue: """Issue. Issue must not contain subelements and attributes. @see RPCBase._parse_issue(element) :param creator: element.attrib["creator"] :param value: element.text """ def __init__(self, creator=None, value=None): self.creator = creator self.value = value
# PyJS does not support weak references, # so this module provides stubs with usual references typecls = __builtins__.TypeClass class ReferenceType(typecls): pass class CallableProxyType(typecls): pass class ProxyType(typecls): pass ProxyTypes = (ProxyType, CallableProxyType) WeakValueDictionary = dict WeakKeyDictionary = dict
# # PySNMP MIB module TCP-ESTATS-MIB (http://pysnmp.sf.net) # ASN.1 source http://mibs.snmplabs.com:80/asn1/TCP-ESTATS-MIB # Produced by pysmi-0.0.7 at Sun Feb 14 00:31:06 2016 # On host bldfarm platform Linux version 4.1.13-100.fc21.x86_64 by user goose # Using Python version 3.5.0 (default, Jan 5 2016, 17:11:52) # ( Integer, ObjectIdentifier, OctetString, ) = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString") ( NamedValues, ) = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ( ValueRangeConstraint, ValueSizeConstraint, ConstraintsUnion, ConstraintsIntersection, SingleValueConstraint, ) = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "ValueSizeConstraint", "ConstraintsUnion", "ConstraintsIntersection", "SingleValueConstraint") ( ZeroBasedCounter64, ) = mibBuilder.importSymbols("HCNUM-TC", "ZeroBasedCounter64") ( ZeroBasedCounter32, ) = mibBuilder.importSymbols("RMON2-MIB", "ZeroBasedCounter32") ( ModuleCompliance, ObjectGroup, NotificationGroup, ) = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "ObjectGroup", "NotificationGroup") ( MibScalar, MibTable, MibTableRow, MibTableColumn, MibIdentifier, mib_2, Integer32, ModuleIdentity, IpAddress, Bits, ObjectIdentity, iso, NotificationType, Gauge32, Counter64, Counter32, Unsigned32, TimeTicks, ) = mibBuilder.importSymbols("SNMPv2-SMI", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "MibIdentifier", "mib-2", "Integer32", "ModuleIdentity", "IpAddress", "Bits", "ObjectIdentity", "iso", "NotificationType", "Gauge32", "Counter64", "Counter32", "Unsigned32", "TimeTicks") ( DateAndTime, TextualConvention, TimeStamp, DisplayString, TruthValue, ) = mibBuilder.importSymbols("SNMPv2-TC", "DateAndTime", "TextualConvention", "TimeStamp", "DisplayString", "TruthValue") ( tcpListenerEntry, tcpConnectionEntry, ) = mibBuilder.importSymbols("TCP-MIB", "tcpListenerEntry", "tcpConnectionEntry") tcpEStatsMIB = ModuleIdentity((1, 3, 6, 1, 2, 1, 156)).setRevisions(("2007-05-18 00:00",)) if mibBuilder.loadTexts: tcpEStatsMIB.setLastUpdated('200705180000Z') if mibBuilder.loadTexts: tcpEStatsMIB.setOrganization('IETF TSV Working Group') if mibBuilder.loadTexts: tcpEStatsMIB.setContactInfo('Matt Mathis\n John Heffner\n Web100 Project\n Pittsburgh Supercomputing Center\n 300 S. Craig St.\n Pittsburgh, PA 15213\n Email: mathis@psc.edu, jheffner@psc.edu\n\n Rajiv Raghunarayan\n Cisco Systems Inc.\n San Jose, CA 95134\n Phone: 408 853 9612\n Email: raraghun@cisco.com\n\n Jon Saperia\n 84 Kettell Plain Road\n Stow, MA 01775\n Phone: 617-201-2655\n Email: saperia@jdscons.com ') if mibBuilder.loadTexts: tcpEStatsMIB.setDescription('Documentation of TCP Extended Performance Instrumentation\n variables from the Web100 project. [Web100]\n\n All of the objects in this MIB MUST have the same\n persistence properties as the underlying TCP implementation.\n On a reboot, all zero-based counters MUST be cleared, all\n dynamically created table rows MUST be deleted, and all\n read-write objects MUST be restored to their default values.\n\n It is assumed that all TCP implementation have some\n initialization code (if nothing else to set IP addresses)\n that has the opportunity to adjust tcpEStatsConnTableLatency\n and other read-write scalars controlling the creation of the\n various tables, before establishing the first TCP\n connection. Implementations MAY also choose to make these\n control scalars persist across reboots.\n\n Copyright (C) The IETF Trust (2007). This version\n of this MIB module is a part of RFC 4898; see the RFC\n itself for full legal notices.') tcpEStatsNotifications = MibIdentifier((1, 3, 6, 1, 2, 1, 156, 0)) tcpEStatsMIBObjects = MibIdentifier((1, 3, 6, 1, 2, 1, 156, 1)) tcpEStatsConformance = MibIdentifier((1, 3, 6, 1, 2, 1, 156, 2)) tcpEStats = MibIdentifier((1, 3, 6, 1, 2, 1, 156, 1, 1)) tcpEStatsControl = MibIdentifier((1, 3, 6, 1, 2, 1, 156, 1, 2)) tcpEStatsScalar = MibIdentifier((1, 3, 6, 1, 2, 1, 156, 1, 3)) class TcpEStatsNegotiated(Integer32, TextualConvention): subtypeSpec = Integer32.subtypeSpec+ConstraintsUnion(SingleValueConstraint(1, 2, 3,)) namedValues = NamedValues(("enabled", 1), ("selfDisabled", 2), ("peerDisabled", 3),) tcpEStatsListenerTableLastChange = MibScalar((1, 3, 6, 1, 2, 1, 156, 1, 3, 3), TimeStamp()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsListenerTableLastChange.setDescription('The value of sysUpTime at the time of the last\n creation or deletion of an entry in the tcpListenerTable.\n If the number of entries has been unchanged since the\n last re-initialization of the local network management\n subsystem, then this object contains a zero value.') tcpEStatsControlPath = MibScalar((1, 3, 6, 1, 2, 1, 156, 1, 2, 1), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: tcpEStatsControlPath.setDescription("Controls the activation of the TCP Path Statistics\n table.\n\n A value 'true' indicates that the TCP Path Statistics\n table is active, while 'false' indicates that the\n table is inactive.") tcpEStatsControlStack = MibScalar((1, 3, 6, 1, 2, 1, 156, 1, 2, 2), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: tcpEStatsControlStack.setDescription("Controls the activation of the TCP Stack Statistics\n table.\n\n A value 'true' indicates that the TCP Stack Statistics\n table is active, while 'false' indicates that the\n table is inactive.") tcpEStatsControlApp = MibScalar((1, 3, 6, 1, 2, 1, 156, 1, 2, 3), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: tcpEStatsControlApp.setDescription("Controls the activation of the TCP Application\n Statistics table.\n\n A value 'true' indicates that the TCP Application\n Statistics table is active, while 'false' indicates\n that the table is inactive.") tcpEStatsControlTune = MibScalar((1, 3, 6, 1, 2, 1, 156, 1, 2, 4), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: tcpEStatsControlTune.setDescription("Controls the activation of the TCP Tuning table.\n\n A value 'true' indicates that the TCP Tuning\n table is active, while 'false' indicates that the\n table is inactive.") tcpEStatsControlNotify = MibScalar((1, 3, 6, 1, 2, 1, 156, 1, 2, 5), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: tcpEStatsControlNotify.setDescription("Controls the generation of all notifications defined in\n this MIB.\n\n A value 'true' indicates that the notifications\n are active, while 'false' indicates that the\n notifications are inactive.") tcpEStatsConnTableLatency = MibScalar((1, 3, 6, 1, 2, 1, 156, 1, 2, 6), Unsigned32()).setUnits('seconds').setMaxAccess("readwrite") if mibBuilder.loadTexts: tcpEStatsConnTableLatency.setDescription('Specifies the number of seconds that the entity will\n retain entries in the TCP connection tables, after the\n connection first enters the closed state. The entity\n SHOULD provide a configuration option to enable\n\n\n\n customization of this value. A value of 0\n results in entries being removed from the tables as soon as\n the connection enters the closed state. The value of\n this object pertains to the following tables:\n tcpEStatsConnectIdTable\n tcpEStatsPerfTable\n tcpEStatsPathTable\n tcpEStatsStackTable\n tcpEStatsAppTable\n tcpEStatsTuneTable') tcpEStatsListenerTable = MibTable((1, 3, 6, 1, 2, 1, 156, 1, 1, 1), ) if mibBuilder.loadTexts: tcpEStatsListenerTable.setDescription('This table contains information about TCP Listeners,\n in addition to the information maintained by the\n tcpListenerTable RFC 4022.') tcpEStatsListenerEntry = MibTableRow((1, 3, 6, 1, 2, 1, 156, 1, 1, 1, 1), ) tcpListenerEntry.registerAugmentions(("TCP-ESTATS-MIB", "tcpEStatsListenerEntry")) tcpEStatsListenerEntry.setIndexNames(*tcpListenerEntry.getIndexNames()) if mibBuilder.loadTexts: tcpEStatsListenerEntry.setDescription('Each entry in the table contains information about\n a specific TCP Listener.') tcpEStatsListenerStartTime = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 1, 1, 1), TimeStamp()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsListenerStartTime.setDescription('The value of sysUpTime at the time this listener was\n established. If the current state was entered prior to\n the last re-initialization of the local network management\n subsystem, then this object contains a zero value.') tcpEStatsListenerSynRcvd = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 1, 1, 2), ZeroBasedCounter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsListenerSynRcvd.setDescription('The number of SYNs which have been received for this\n listener. The total number of failed connections for\n all reasons can be estimated to be tcpEStatsListenerSynRcvd\n minus tcpEStatsListenerAccepted and\n tcpEStatsListenerCurBacklog.') tcpEStatsListenerInitial = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 1, 1, 3), ZeroBasedCounter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsListenerInitial.setDescription('The total number of connections for which the Listener\n has allocated initial state and placed the\n connection in the backlog. This may happen in the\n SYN-RCVD or ESTABLISHED states, depending on the\n implementation.') tcpEStatsListenerEstablished = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 1, 1, 4), ZeroBasedCounter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsListenerEstablished.setDescription('The number of connections that have been established to\n this endpoint (e.g., the number of first ACKs that have\n been received for this listener).') tcpEStatsListenerAccepted = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 1, 1, 5), ZeroBasedCounter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsListenerAccepted.setDescription('The total number of connections for which the Listener\n has successfully issued an accept, removing the connection\n from the backlog.') tcpEStatsListenerExceedBacklog = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 1, 1, 6), ZeroBasedCounter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsListenerExceedBacklog.setDescription('The total number of connections dropped from the\n backlog by this listener due to all reasons. This\n includes all connections that are allocated initial\n resources, but are not accepted for some reason.') tcpEStatsListenerHCSynRcvd = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 1, 1, 7), ZeroBasedCounter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsListenerHCSynRcvd.setDescription('The number of SYNs that have been received for this\n listener on systems that can process (or reject) more\n than 1 million connections per second. See\n tcpEStatsListenerSynRcvd.') tcpEStatsListenerHCInitial = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 1, 1, 8), ZeroBasedCounter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsListenerHCInitial.setDescription('The total number of connections for which the Listener\n has allocated initial state and placed the connection\n in the backlog on systems that can process (or reject)\n more than 1 million connections per second. See\n tcpEStatsListenerInitial.') tcpEStatsListenerHCEstablished = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 1, 1, 9), ZeroBasedCounter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsListenerHCEstablished.setDescription('The number of connections that have been established to\n this endpoint on systems that can process (or reject) more\n than 1 million connections per second. See\n tcpEStatsListenerEstablished.') tcpEStatsListenerHCAccepted = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 1, 1, 10), ZeroBasedCounter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsListenerHCAccepted.setDescription('The total number of connections for which the Listener\n has successfully issued an accept, removing the connection\n from the backlog on systems that can process (or reject)\n more than 1 million connections per second. See\n tcpEStatsListenerAccepted.') tcpEStatsListenerHCExceedBacklog = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 1, 1, 11), ZeroBasedCounter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsListenerHCExceedBacklog.setDescription('The total number of connections dropped from the\n backlog by this listener due to all reasons on\n systems that can process (or reject) more than\n 1 million connections per second. See\n tcpEStatsListenerExceedBacklog.') tcpEStatsListenerCurConns = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 1, 1, 12), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsListenerCurConns.setDescription('The current number of connections in the ESTABLISHED\n state, which have also been accepted. It excludes\n connections that have been established but not accepted\n because they are still subject to being discarded to\n shed load without explicit action by either endpoint.') tcpEStatsListenerMaxBacklog = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 1, 1, 13), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsListenerMaxBacklog.setDescription('The maximum number of connections allowed in the\n backlog at one time.') tcpEStatsListenerCurBacklog = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 1, 1, 14), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsListenerCurBacklog.setDescription('The current number of connections that are in the backlog.\n This gauge includes connections in ESTABLISHED or\n SYN-RECEIVED states for which the Listener has not yet\n issued an accept.\n\n If this listener is using some technique to implicitly\n represent the SYN-RECEIVED states (e.g., by\n cryptographically encoding the state information in the\n initial sequence number, ISS), it MAY elect to exclude\n connections in the SYN-RECEIVED state from the backlog.') tcpEStatsListenerCurEstabBacklog = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 1, 1, 15), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsListenerCurEstabBacklog.setDescription('The current number of connections in the backlog that are\n in the ESTABLISHED state, but for which the Listener has\n not yet issued an accept.') tcpEStatsConnectIdTable = MibTable((1, 3, 6, 1, 2, 1, 156, 1, 1, 2), ) if mibBuilder.loadTexts: tcpEStatsConnectIdTable.setDescription('This table maps information that uniquely identifies\n each active TCP connection to the connection ID used by\n\n\n\n other tables in this MIB Module. It is an extension of\n tcpConnectionTable in RFC 4022.\n\n Entries are retained in this table for the number of\n seconds indicated by the tcpEStatsConnTableLatency\n object, after the TCP connection first enters the closed\n state.') tcpEStatsConnectIdEntry = MibTableRow((1, 3, 6, 1, 2, 1, 156, 1, 1, 2, 1), ) tcpConnectionEntry.registerAugmentions(("TCP-ESTATS-MIB", "tcpEStatsConnectIdEntry")) tcpEStatsConnectIdEntry.setIndexNames(*tcpConnectionEntry.getIndexNames()) if mibBuilder.loadTexts: tcpEStatsConnectIdEntry.setDescription('Each entry in this table maps a TCP connection\n 4-tuple to a connection index.') tcpEStatsConnectIndex = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 2, 1, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1,4294967295))).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsConnectIndex.setDescription('A unique integer value assigned to each TCP Connection\n entry.\n\n The RECOMMENDED algorithm is to begin at 1 and increase to\n some implementation-specific maximum value and then start\n again at 1 skipping values already in use.') tcpEStatsPerfTable = MibTable((1, 3, 6, 1, 2, 1, 156, 1, 1, 3), ) if mibBuilder.loadTexts: tcpEStatsPerfTable.setDescription('This table contains objects that are useful for\n\n\n\n measuring TCP performance and first line problem\n diagnosis. Most objects in this table directly expose\n some TCP state variable or are easily implemented as\n simple functions (e.g., the maximum value) of TCP\n state variables.\n\n Entries are retained in this table for the number of\n seconds indicated by the tcpEStatsConnTableLatency\n object, after the TCP connection first enters the closed\n state.') tcpEStatsPerfEntry = MibTableRow((1, 3, 6, 1, 2, 1, 156, 1, 1, 3, 1), ).setIndexNames((0, "TCP-ESTATS-MIB", "tcpEStatsConnectIndex")) if mibBuilder.loadTexts: tcpEStatsPerfEntry.setDescription('Each entry in this table has information about the\n characteristics of each active and recently closed TCP\n connection.') tcpEStatsPerfSegsOut = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 3, 1, 1), ZeroBasedCounter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsPerfSegsOut.setDescription('The total number of segments sent.') tcpEStatsPerfDataSegsOut = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 3, 1, 2), ZeroBasedCounter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsPerfDataSegsOut.setDescription('The number of segments sent containing a positive length\n data segment.') tcpEStatsPerfDataOctetsOut = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 3, 1, 3), ZeroBasedCounter32()).setUnits('octets').setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsPerfDataOctetsOut.setDescription('The number of octets of data contained in transmitted\n segments, including retransmitted data. Note that this does\n not include TCP headers.') tcpEStatsPerfHCDataOctetsOut = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 3, 1, 4), ZeroBasedCounter64()).setUnits('octets').setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsPerfHCDataOctetsOut.setDescription('The number of octets of data contained in transmitted\n segments, including retransmitted data, on systems that can\n transmit more than 10 million bits per second. Note that\n this does not include TCP headers.') tcpEStatsPerfSegsRetrans = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 3, 1, 5), ZeroBasedCounter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsPerfSegsRetrans.setDescription('The number of segments transmitted containing at least some\n retransmitted data.') tcpEStatsPerfOctetsRetrans = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 3, 1, 6), ZeroBasedCounter32()).setUnits('octets').setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsPerfOctetsRetrans.setDescription('The number of octets retransmitted.') tcpEStatsPerfSegsIn = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 3, 1, 7), ZeroBasedCounter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsPerfSegsIn.setDescription('The total number of segments received.') tcpEStatsPerfDataSegsIn = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 3, 1, 8), ZeroBasedCounter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsPerfDataSegsIn.setDescription('The number of segments received containing a positive\n\n\n\n length data segment.') tcpEStatsPerfDataOctetsIn = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 3, 1, 9), ZeroBasedCounter32()).setUnits('octets').setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsPerfDataOctetsIn.setDescription('The number of octets contained in received data segments,\n including retransmitted data. Note that this does not\n include TCP headers.') tcpEStatsPerfHCDataOctetsIn = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 3, 1, 10), ZeroBasedCounter64()).setUnits('octets').setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsPerfHCDataOctetsIn.setDescription('The number of octets contained in received data segments,\n including retransmitted data, on systems that can receive\n more than 10 million bits per second. Note that this does\n not include TCP headers.') tcpEStatsPerfElapsedSecs = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 3, 1, 11), ZeroBasedCounter32()).setUnits('seconds').setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsPerfElapsedSecs.setDescription('The seconds part of the time elapsed between\n tcpEStatsPerfStartTimeStamp and the most recent protocol\n event (segment sent or received).') tcpEStatsPerfElapsedMicroSecs = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 3, 1, 12), ZeroBasedCounter32()).setUnits('microseconds').setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsPerfElapsedMicroSecs.setDescription('The micro-second part of time elapsed between\n tcpEStatsPerfStartTimeStamp to the most recent protocol\n event (segment sent or received). This may be updated in\n whatever time granularity is the system supports.') tcpEStatsPerfStartTimeStamp = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 3, 1, 13), DateAndTime()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsPerfStartTimeStamp.setDescription('Time at which this row was created and all\n ZeroBasedCounters in the row were initialized to zero.') tcpEStatsPerfCurMSS = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 3, 1, 14), Gauge32()).setUnits('octets').setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsPerfCurMSS.setDescription('The current maximum segment size (MSS), in octets.') tcpEStatsPerfPipeSize = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 3, 1, 15), Gauge32()).setUnits('octets').setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsPerfPipeSize.setDescription("The TCP senders current estimate of the number of\n unacknowledged data octets in the network.\n\n While not in recovery (e.g., while the receiver is not\n reporting missing data to the sender), this is precisely the\n same as 'Flight size' as defined in RFC 2581, which can be\n computed as SND.NXT minus SND.UNA. [RFC793]\n\n During recovery, the TCP sender has incomplete information\n about the state of the network (e.g., which segments are\n lost vs reordered, especially if the return path is also\n dropping TCP acknowledgments). Current TCP standards do not\n mandate any specific algorithm for estimating the number of\n unacknowledged data octets in the network.\n\n RFC 3517 describes a conservative algorithm to use SACK\n\n\n\n information to estimate the number of unacknowledged data\n octets in the network. tcpEStatsPerfPipeSize object SHOULD\n be the same as 'pipe' as defined in RFC 3517 if it is\n implemented. (Note that while not in recovery the pipe\n algorithm yields the same values as flight size).\n\n If RFC 3517 is not implemented, the data octets in flight\n SHOULD be estimated as SND.NXT minus SND.UNA adjusted by\n some measure of the data that has left the network and\n retransmitted data. For example, with Reno or NewReno style\n TCP, the number of duplicate acknowledgment is used to\n count the number of segments that have left the network.\n That is,\n PipeSize=SND.NXT-SND.UNA+(retransmits-dupacks)*CurMSS") tcpEStatsPerfMaxPipeSize = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 3, 1, 16), Gauge32()).setUnits('octets').setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsPerfMaxPipeSize.setDescription('The maximum value of tcpEStatsPerfPipeSize, for this\n connection.') tcpEStatsPerfSmoothedRTT = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 3, 1, 17), Gauge32()).setUnits('milliseconds').setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsPerfSmoothedRTT.setDescription('The smoothed round trip time used in calculation of the\n RTO. See SRTT in [RFC2988].') tcpEStatsPerfCurRTO = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 3, 1, 18), Gauge32()).setUnits('milliseconds').setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsPerfCurRTO.setDescription('The current value of the retransmit timer RTO.') tcpEStatsPerfCongSignals = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 3, 1, 19), ZeroBasedCounter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsPerfCongSignals.setDescription('The number of multiplicative downward congestion window\n adjustments due to all forms of congestion signals,\n including Fast Retransmit, Explicit Congestion Notification\n (ECN), and timeouts. This object summarizes all events that\n invoke the MD portion of Additive Increase Multiplicative\n Decrease (AIMD) congestion control, and as such is the best\n indicator of how a cwnd is being affected by congestion.\n\n Note that retransmission timeouts multiplicatively reduce\n the window implicitly by setting ssthresh, and SHOULD be\n included in tcpEStatsPerfCongSignals. In order to minimize\n spurious congestion indications due to out-of-order\n segments, tcpEStatsPerfCongSignals SHOULD be incremented in\n association with the Fast Retransmit algorithm.') tcpEStatsPerfCurCwnd = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 3, 1, 20), Gauge32()).setUnits('octets').setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsPerfCurCwnd.setDescription('The current congestion window, in octets.') tcpEStatsPerfCurSsthresh = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 3, 1, 21), Gauge32()).setUnits('octets').setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsPerfCurSsthresh.setDescription('The current slow start threshold in octets.') tcpEStatsPerfTimeouts = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 3, 1, 22), ZeroBasedCounter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsPerfTimeouts.setDescription('The number of times the retransmit timeout has expired when\n the RTO backoff multiplier is equal to one.') tcpEStatsPerfCurRwinSent = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 3, 1, 23), Gauge32()).setUnits('octets').setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsPerfCurRwinSent.setDescription('The most recent window advertisement sent, in octets.') tcpEStatsPerfMaxRwinSent = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 3, 1, 24), Gauge32()).setUnits('octets').setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsPerfMaxRwinSent.setDescription('The maximum window advertisement sent, in octets.') tcpEStatsPerfZeroRwinSent = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 3, 1, 25), ZeroBasedCounter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsPerfZeroRwinSent.setDescription('The number of acknowledgments sent announcing a zero\n\n\n\n receive window, when the previously announced window was\n not zero.') tcpEStatsPerfCurRwinRcvd = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 3, 1, 26), Gauge32()).setUnits('octets').setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsPerfCurRwinRcvd.setDescription('The most recent window advertisement received, in octets.') tcpEStatsPerfMaxRwinRcvd = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 3, 1, 27), Gauge32()).setUnits('octets').setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsPerfMaxRwinRcvd.setDescription('The maximum window advertisement received, in octets.') tcpEStatsPerfZeroRwinRcvd = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 3, 1, 28), ZeroBasedCounter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsPerfZeroRwinRcvd.setDescription('The number of acknowledgments received announcing a zero\n receive window, when the previously announced window was\n not zero.') tcpEStatsPerfSndLimTransRwin = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 3, 1, 31), ZeroBasedCounter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsPerfSndLimTransRwin.setDescription("The number of transitions into the 'Receiver Limited' state\n from either the 'Congestion Limited' or 'Sender Limited'\n states. This state is entered whenever TCP transmission\n stops because the sender has filled the announced receiver\n window, i.e., when SND.NXT has advanced to SND.UNA +\n SND.WND - 1 as described in RFC 793.") tcpEStatsPerfSndLimTransCwnd = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 3, 1, 32), ZeroBasedCounter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsPerfSndLimTransCwnd.setDescription("The number of transitions into the 'Congestion Limited'\n state from either the 'Receiver Limited' or 'Sender\n Limited' states. This state is entered whenever TCP\n transmission stops because the sender has reached some\n limit defined by congestion control (e.g., cwnd) or other\n algorithms (retransmission timeouts) designed to control\n network traffic. See the definition of 'CONGESTION WINDOW'\n\n\n\n in RFC 2581.") tcpEStatsPerfSndLimTransSnd = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 3, 1, 33), ZeroBasedCounter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsPerfSndLimTransSnd.setDescription("The number of transitions into the 'Sender Limited' state\n from either the 'Receiver Limited' or 'Congestion Limited'\n states. This state is entered whenever TCP transmission\n stops due to some sender limit such as running out of\n application data or other resources and the Karn algorithm.\n When TCP stops sending data for any reason, which cannot be\n classified as Receiver Limited or Congestion Limited, it\n MUST be treated as Sender Limited.") tcpEStatsPerfSndLimTimeRwin = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 3, 1, 34), ZeroBasedCounter32()).setUnits('milliseconds').setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsPerfSndLimTimeRwin.setDescription("The cumulative time spent in the 'Receiver Limited' state.\n See tcpEStatsPerfSndLimTransRwin.") tcpEStatsPerfSndLimTimeCwnd = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 3, 1, 35), ZeroBasedCounter32()).setUnits('milliseconds').setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsPerfSndLimTimeCwnd.setDescription("The cumulative time spent in the 'Congestion Limited'\n state. See tcpEStatsPerfSndLimTransCwnd. When there is a\n retransmission timeout, it SHOULD be counted in\n tcpEStatsPerfSndLimTimeCwnd (and not the cumulative time\n for some other state.)") tcpEStatsPerfSndLimTimeSnd = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 3, 1, 36), ZeroBasedCounter32()).setUnits('milliseconds').setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsPerfSndLimTimeSnd.setDescription("The cumulative time spent in the 'Sender Limited' state.\n See tcpEStatsPerfSndLimTransSnd.") tcpEStatsPathTable = MibTable((1, 3, 6, 1, 2, 1, 156, 1, 1, 4), ) if mibBuilder.loadTexts: tcpEStatsPathTable.setDescription('This table contains objects that can be used to infer\n detailed behavior of the Internet path, such as the\n extent that there is reordering, ECN bits, and if\n RTT fluctuations are correlated to losses.\n\n Entries are retained in this table for the number of\n seconds indicated by the tcpEStatsConnTableLatency\n object, after the TCP connection first enters the closed\n state.') tcpEStatsPathEntry = MibTableRow((1, 3, 6, 1, 2, 1, 156, 1, 1, 4, 1), ).setIndexNames((0, "TCP-ESTATS-MIB", "tcpEStatsConnectIndex")) if mibBuilder.loadTexts: tcpEStatsPathEntry.setDescription('Each entry in this table has information about the\n characteristics of each active and recently closed TCP\n connection.') tcpEStatsPathRetranThresh = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 4, 1, 1), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsPathRetranThresh.setDescription('The number of duplicate acknowledgments required to trigger\n Fast Retransmit. Note that although this is constant in\n traditional Reno TCP implementations, it is adaptive in\n many newer TCPs.') tcpEStatsPathNonRecovDAEpisodes = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 4, 1, 2), ZeroBasedCounter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsPathNonRecovDAEpisodes.setDescription("The number of duplicate acknowledgment episodes that did\n not trigger a Fast Retransmit because ACK advanced prior to\n the number of duplicate acknowledgments reaching\n RetranThresh.\n\n\n\n\n In many implementations this is the number of times the\n 'dupacks' counter is set to zero when it is non-zero but\n less than RetranThresh.\n\n Note that the change in tcpEStatsPathNonRecovDAEpisodes\n divided by the change in tcpEStatsPerfDataSegsOut is an\n estimate of the frequency of data reordering on the forward\n path over some interval.") tcpEStatsPathSumOctetsReordered = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 4, 1, 3), ZeroBasedCounter32()).setUnits('octets').setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsPathSumOctetsReordered.setDescription('The sum of the amounts SND.UNA advances on the\n acknowledgment which ends a dup-ack episode without a\n retransmission.\n\n Note the change in tcpEStatsPathSumOctetsReordered divided\n by the change in tcpEStatsPathNonRecovDAEpisodes is an\n estimates of the average reordering distance, over some\n interval.') tcpEStatsPathNonRecovDA = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 4, 1, 4), ZeroBasedCounter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsPathNonRecovDA.setDescription("Duplicate acks (or SACKS) that did not trigger a Fast\n Retransmit because ACK advanced prior to the number of\n duplicate acknowledgments reaching RetranThresh.\n\n In many implementations, this is the sum of the 'dupacks'\n counter, just before it is set to zero because ACK advanced\n without a Fast Retransmit.\n\n Note that the change in tcpEStatsPathNonRecovDA divided by\n the change in tcpEStatsPathNonRecovDAEpisodes is an\n estimate of the average reordering distance in segments\n over some interval.") tcpEStatsPathSampleRTT = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 4, 1, 11), Gauge32()).setUnits('milliseconds').setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsPathSampleRTT.setDescription('The most recent raw round trip time measurement used in\n calculation of the RTO.') tcpEStatsPathRTTVar = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 4, 1, 12), Gauge32()).setUnits('milliseconds').setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsPathRTTVar.setDescription('The round trip time variation used in calculation of the\n RTO. See RTTVAR in [RFC2988].') tcpEStatsPathMaxRTT = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 4, 1, 13), Gauge32()).setUnits('milliseconds').setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsPathMaxRTT.setDescription('The maximum sampled round trip time.') tcpEStatsPathMinRTT = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 4, 1, 14), Gauge32()).setUnits('milliseconds').setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsPathMinRTT.setDescription('The minimum sampled round trip time.') tcpEStatsPathSumRTT = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 4, 1, 15), ZeroBasedCounter32()).setUnits('milliseconds').setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsPathSumRTT.setDescription('The sum of all sampled round trip times.\n\n Note that the change in tcpEStatsPathSumRTT divided by the\n change in tcpEStatsPathCountRTT is the mean RTT, uniformly\n averaged over an enter interval.') tcpEStatsPathHCSumRTT = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 4, 1, 16), ZeroBasedCounter64()).setUnits('milliseconds').setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsPathHCSumRTT.setDescription('The sum of all sampled round trip times, on all systems\n that implement multiple concurrent RTT measurements.\n\n Note that the change in tcpEStatsPathHCSumRTT divided by\n the change in tcpEStatsPathCountRTT is the mean RTT,\n uniformly averaged over an enter interval.') tcpEStatsPathCountRTT = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 4, 1, 17), ZeroBasedCounter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsPathCountRTT.setDescription('The number of round trip time samples included in\n tcpEStatsPathSumRTT and tcpEStatsPathHCSumRTT.') tcpEStatsPathMaxRTO = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 4, 1, 18), Gauge32()).setUnits('milliseconds').setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsPathMaxRTO.setDescription('The maximum value of the retransmit timer RTO.') tcpEStatsPathMinRTO = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 4, 1, 19), Gauge32()).setUnits('milliseconds').setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsPathMinRTO.setDescription('The minimum value of the retransmit timer RTO.') tcpEStatsPathIpTtl = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 4, 1, 20), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsPathIpTtl.setDescription('The value of the TTL field carried in the most recently\n received IP header. This is sometimes useful to detect\n changing or unstable routes.') tcpEStatsPathIpTosIn = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 4, 1, 21), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1,1)).setFixedLength(1)).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsPathIpTosIn.setDescription('The value of the IPv4 Type of Service octet, or the IPv6\n traffic class octet, carried in the most recently received\n IP header.\n\n This is useful to diagnose interactions between TCP and any\n IP layer packet scheduling and delivery policy, which might\n be in effect to implement Diffserv.') tcpEStatsPathIpTosOut = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 4, 1, 22), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1,1)).setFixedLength(1)).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsPathIpTosOut.setDescription('The value of the IPv4 Type Of Service octet, or the IPv6\n traffic class octet, carried in the most recently\n transmitted IP header.\n\n This is useful to diagnose interactions between TCP and any\n IP layer packet scheduling and delivery policy, which might\n be in effect to implement Diffserv.') tcpEStatsPathPreCongSumCwnd = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 4, 1, 23), ZeroBasedCounter32()).setUnits('octets').setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsPathPreCongSumCwnd.setDescription('The sum of the values of the congestion window, in octets,\n captured each time a congestion signal is received. This\n MUST be updated each time tcpEStatsPerfCongSignals is\n incremented, such that the change in\n tcpEStatsPathPreCongSumCwnd divided by the change in\n tcpEStatsPerfCongSignals is the average window (over some\n interval) just prior to a congestion signal.') tcpEStatsPathPreCongSumRTT = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 4, 1, 24), ZeroBasedCounter32()).setUnits('milliseconds').setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsPathPreCongSumRTT.setDescription('Sum of the last sample of the RTT (tcpEStatsPathSampleRTT)\n prior to the received congestion signals. This MUST be\n updated each time tcpEStatsPerfCongSignals is incremented,\n such that the change in tcpEStatsPathPreCongSumRTT divided by\n the change in tcpEStatsPerfCongSignals is the average RTT\n (over some interval) just prior to a congestion signal.') tcpEStatsPathPostCongSumRTT = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 4, 1, 25), ZeroBasedCounter32()).setUnits('octets').setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsPathPostCongSumRTT.setDescription('Sum of the first sample of the RTT (tcpEStatsPathSampleRTT)\n following each congestion signal. Such that the change in\n tcpEStatsPathPostCongSumRTT divided by the change in\n tcpEStatsPathPostCongCountRTT is the average RTT (over some\n interval) just after a congestion signal.') tcpEStatsPathPostCongCountRTT = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 4, 1, 26), ZeroBasedCounter32()).setUnits('milliseconds').setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsPathPostCongCountRTT.setDescription('The number of RTT samples included in\n tcpEStatsPathPostCongSumRTT such that the change in\n tcpEStatsPathPostCongSumRTT divided by the change in\n tcpEStatsPathPostCongCountRTT is the average RTT (over some\n interval) just after a congestion signal.') tcpEStatsPathECNsignals = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 4, 1, 27), ZeroBasedCounter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsPathECNsignals.setDescription('The number of congestion signals delivered to the TCP\n sender via explicit congestion notification (ECN). This is\n typically the number of segments bearing Echo Congestion\n\n\n\n Experienced (ECE) bits, but\n should also include segments failing the ECN nonce check or\n other explicit congestion signals.') tcpEStatsPathDupAckEpisodes = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 4, 1, 28), ZeroBasedCounter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsPathDupAckEpisodes.setDescription('The number of Duplicate Acks Sent when prior Ack was not\n duplicate. This is the number of times that a contiguous\n series of duplicate acknowledgments have been sent.\n\n This is an indication of the number of data segments lost\n or reordered on the path from the remote TCP endpoint to\n the near TCP endpoint.') tcpEStatsPathRcvRTT = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 4, 1, 29), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsPathRcvRTT.setDescription("The receiver's estimate of the Path RTT.\n\n Adaptive receiver window algorithms depend on the receiver\n to having a good estimate of the path RTT.") tcpEStatsPathDupAcksOut = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 4, 1, 30), ZeroBasedCounter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsPathDupAcksOut.setDescription('The number of duplicate ACKs sent. The ratio of the change\n in tcpEStatsPathDupAcksOut to the change in\n tcpEStatsPathDupAckEpisodes is an indication of reorder or\n recovery distance over some interval.') tcpEStatsPathCERcvd = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 4, 1, 31), ZeroBasedCounter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsPathCERcvd.setDescription('The number of segments received with IP headers bearing\n Congestion Experienced (CE) markings.') tcpEStatsPathECESent = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 4, 1, 32), ZeroBasedCounter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsPathECESent.setDescription('Number of times the Echo Congestion Experienced (ECE) bit\n in the TCP header has been set (transitioned from 0 to 1),\n due to a Congestion Experienced (CE) marking on an IP\n header. Note that ECE can be set and reset only once per\n RTT, while CE can be set on many segments per RTT.') tcpEStatsStackTable = MibTable((1, 3, 6, 1, 2, 1, 156, 1, 1, 5), ) if mibBuilder.loadTexts: tcpEStatsStackTable.setDescription('This table contains objects that are most useful for\n determining how well some of the TCP control\n algorithms are coping with this particular\n\n\n\n path.\n\n Entries are retained in this table for the number of\n seconds indicated by the tcpEStatsConnTableLatency\n object, after the TCP connection first enters the closed\n state.') tcpEStatsStackEntry = MibTableRow((1, 3, 6, 1, 2, 1, 156, 1, 1, 5, 1), ).setIndexNames((0, "TCP-ESTATS-MIB", "tcpEStatsConnectIndex")) if mibBuilder.loadTexts: tcpEStatsStackEntry.setDescription('Each entry in this table has information about the\n characteristics of each active and recently closed TCP\n connection.') tcpEStatsStackActiveOpen = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 5, 1, 1), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsStackActiveOpen.setDescription('True(1) if the local connection traversed the SYN-SENT\n state, else false(2).') tcpEStatsStackMSSSent = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 5, 1, 2), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsStackMSSSent.setDescription('The value sent in an MSS option, or zero if none.') tcpEStatsStackMSSRcvd = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 5, 1, 3), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsStackMSSRcvd.setDescription('The value received in an MSS option, or zero if none.') tcpEStatsStackWinScaleSent = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 5, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-1,14))).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsStackWinScaleSent.setDescription('The value of the transmitted window scale option if one was\n sent; otherwise, a value of -1.\n\n Note that if both tcpEStatsStackWinScaleSent and\n tcpEStatsStackWinScaleRcvd are not -1, then Rcv.Wind.Scale\n will be the same as this value and used to scale receiver\n window announcements from the local host to the remote\n host.') tcpEStatsStackWinScaleRcvd = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 5, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-1,14))).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsStackWinScaleRcvd.setDescription('The value of the received window scale option if one was\n received; otherwise, a value of -1.\n\n Note that if both tcpEStatsStackWinScaleSent and\n tcpEStatsStackWinScaleRcvd are not -1, then Snd.Wind.Scale\n will be the same as this value and used to scale receiver\n window announcements from the remote host to the local\n host.') tcpEStatsStackTimeStamps = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 5, 1, 6), TcpEStatsNegotiated()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsStackTimeStamps.setDescription('Enabled(1) if TCP timestamps have been negotiated on,\n selfDisabled(2) if they are disabled or not implemented on\n the local host, or peerDisabled(3) if not negotiated by the\n remote hosts.') tcpEStatsStackECN = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 5, 1, 7), TcpEStatsNegotiated()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsStackECN.setDescription('Enabled(1) if Explicit Congestion Notification (ECN) has\n been negotiated on, selfDisabled(2) if it is disabled or\n not implemented on the local host, or peerDisabled(3) if\n not negotiated by the remote hosts.') tcpEStatsStackWillSendSACK = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 5, 1, 8), TcpEStatsNegotiated()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsStackWillSendSACK.setDescription('Enabled(1) if the local host will send SACK options,\n selfDisabled(2) if SACK is disabled or not implemented on\n the local host, or peerDisabled(3) if the remote host did\n not send the SACK-permitted option.\n\n Note that SACK negotiation is not symmetrical. SACK can\n enabled on one side of the connection and not the other.') tcpEStatsStackWillUseSACK = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 5, 1, 9), TcpEStatsNegotiated()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsStackWillUseSACK.setDescription('Enabled(1) if the local host will process SACK options,\n selfDisabled(2) if SACK is disabled or not implemented on\n the local host, or peerDisabled(3) if the remote host sends\n\n\n\n duplicate ACKs without SACK options, or the local host\n otherwise decides not to process received SACK options.\n\n Unlike other TCP options, the remote data receiver cannot\n explicitly indicate if it is able to generate SACK options.\n When sending data, the local host has to deduce if the\n remote receiver is sending SACK options. This object can\n transition from Enabled(1) to peerDisabled(3) after the SYN\n exchange.\n\n Note that SACK negotiation is not symmetrical. SACK can\n enabled on one side of the connection and not the other.') tcpEStatsStackState = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 5, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,))).clone(namedValues=NamedValues(("tcpESStateClosed", 1), ("tcpESStateListen", 2), ("tcpESStateSynSent", 3), ("tcpESStateSynReceived", 4), ("tcpESStateEstablished", 5), ("tcpESStateFinWait1", 6), ("tcpESStateFinWait2", 7), ("tcpESStateCloseWait", 8), ("tcpESStateLastAck", 9), ("tcpESStateClosing", 10), ("tcpESStateTimeWait", 11), ("tcpESStateDeleteTcb", 12),))).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsStackState.setDescription('An integer value representing the connection state from the\n TCP State Transition Diagram.\n\n The value listen(2) is included only for parallelism to the\n old tcpConnTable, and SHOULD NOT be used because the listen\n state in managed by the tcpListenerTable.\n\n The value DeleteTcb(12) is included only for parallelism to\n the tcpConnTable mechanism for terminating connections,\n\n\n\n although this table does not permit writing.') tcpEStatsStackNagle = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 5, 1, 11), TruthValue()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsStackNagle.setDescription('True(1) if the Nagle algorithm is being used, else\n false(2).') tcpEStatsStackMaxSsCwnd = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 5, 1, 12), Gauge32()).setUnits('octets').setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsStackMaxSsCwnd.setDescription('The maximum congestion window used during Slow Start, in\n octets.') tcpEStatsStackMaxCaCwnd = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 5, 1, 13), Gauge32()).setUnits('octets').setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsStackMaxCaCwnd.setDescription('The maximum congestion window used during Congestion\n Avoidance, in octets.') tcpEStatsStackMaxSsthresh = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 5, 1, 14), Gauge32()).setUnits('octets').setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsStackMaxSsthresh.setDescription('The maximum slow start threshold, excluding the initial\n value.') tcpEStatsStackMinSsthresh = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 5, 1, 15), Gauge32()).setUnits('octets').setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsStackMinSsthresh.setDescription('The minimum slow start threshold.') tcpEStatsStackInRecovery = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 5, 1, 16), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3,))).clone(namedValues=NamedValues(("tcpESDataContiguous", 1), ("tcpESDataUnordered", 2), ("tcpESDataRecovery", 3),))).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsStackInRecovery.setDescription('An integer value representing the state of the loss\n recovery for this connection.\n\n tcpESDataContiguous(1) indicates that the remote receiver\n is reporting contiguous data (no duplicate acknowledgments\n or SACK options) and that there are no unacknowledged\n retransmissions.\n\n tcpESDataUnordered(2) indicates that the remote receiver is\n reporting missing or out-of-order data (e.g., sending\n duplicate acknowledgments or SACK options) and that there\n are no unacknowledged retransmissions (because the missing\n data has not yet been retransmitted).\n\n tcpESDataRecovery(3) indicates that the sender has\n outstanding retransmitted data that is still\n\n\n\n unacknowledged.') tcpEStatsStackDupAcksIn = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 5, 1, 17), ZeroBasedCounter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsStackDupAcksIn.setDescription('The number of duplicate ACKs received.') tcpEStatsStackSpuriousFrDetected = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 5, 1, 18), ZeroBasedCounter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsStackSpuriousFrDetected.setDescription("The number of acknowledgments reporting out-of-order\n segments after the Fast Retransmit algorithm has already\n retransmitted the segments. (For example as detected by the\n Eifel algorithm).'") tcpEStatsStackSpuriousRtoDetected = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 5, 1, 19), ZeroBasedCounter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsStackSpuriousRtoDetected.setDescription('The number of acknowledgments reporting segments that have\n already been retransmitted due to a Retransmission Timeout.') tcpEStatsStackSoftErrors = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 5, 1, 21), ZeroBasedCounter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsStackSoftErrors.setDescription('The number of segments that fail various consistency tests\n during TCP input processing. Soft errors might cause the\n segment to be discarded but some do not. Some of these soft\n errors cause the generation of a TCP acknowledgment, while\n others are silently discarded.') tcpEStatsStackSoftErrorReason = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 5, 1, 22), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8,))).clone(namedValues=NamedValues(("belowDataWindow", 1), ("aboveDataWindow", 2), ("belowAckWindow", 3), ("aboveAckWindow", 4), ("belowTSWindow", 5), ("aboveTSWindow", 6), ("dataCheckSum", 7), ("otherSoftError", 8),))).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsStackSoftErrorReason.setDescription('This object identifies which consistency test most recently\n failed during TCP input processing. This object SHOULD be\n set every time tcpEStatsStackSoftErrors is incremented. The\n codes are as follows:\n\n belowDataWindow(1) - All data in the segment is below\n SND.UNA. (Normal for keep-alives and zero window probes).\n\n aboveDataWindow(2) - Some data in the segment is above\n SND.WND. (Indicates an implementation bug or possible\n attack).\n\n belowAckWindow(3) - ACK below SND.UNA. (Indicates that the\n return path is reordering ACKs)\n\n aboveAckWindow(4) - An ACK for data that we have not sent.\n (Indicates an implementation bug or possible attack).\n\n belowTSWindow(5) - TSecr on the segment is older than the\n current TS.Recent (Normal for the rare case where PAWS\n detects data reordered by the network).\n\n aboveTSWindow(6) - TSecr on the segment is newer than the\n current TS.Recent. (Indicates an implementation bug or\n possible attack).\n\n\n\n\n dataCheckSum(7) - Incorrect checksum. Note that this value\n is intrinsically fragile, because the header fields used to\n identify the connection may have been corrupted.\n\n otherSoftError(8) - All other soft errors not listed\n above.') tcpEStatsStackSlowStart = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 5, 1, 23), ZeroBasedCounter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsStackSlowStart.setDescription('The number of times the congestion window has been\n increased by the Slow Start algorithm.') tcpEStatsStackCongAvoid = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 5, 1, 24), ZeroBasedCounter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsStackCongAvoid.setDescription('The number of times the congestion window has been\n increased by the Congestion Avoidance algorithm.') tcpEStatsStackOtherReductions = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 5, 1, 25), ZeroBasedCounter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsStackOtherReductions.setDescription('The number of congestion window reductions made as a result\n of anything other than AIMD congestion control algorithms.\n Examples of non-multiplicative window reductions include\n Congestion Window Validation [RFC2861] and experimental\n algorithms such as Vegas [Bra94].\n\n\n\n\n All window reductions MUST be counted as either\n tcpEStatsPerfCongSignals or tcpEStatsStackOtherReductions.') tcpEStatsStackCongOverCount = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 5, 1, 26), ZeroBasedCounter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsStackCongOverCount.setDescription("The number of congestion events that were 'backed out' of\n the congestion control state machine such that the\n congestion window was restored to a prior value. This can\n happen due to the Eifel algorithm [RFC3522] or other\n algorithms that can be used to detect and cancel spurious\n invocations of the Fast Retransmit Algorithm.\n\n Although it may be feasible to undo the effects of spurious\n invocation of the Fast Retransmit congestion events cannot\n easily be backed out of tcpEStatsPerfCongSignals and\n tcpEStatsPathPreCongSumCwnd, etc.") tcpEStatsStackFastRetran = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 5, 1, 27), ZeroBasedCounter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsStackFastRetran.setDescription('The number of invocations of the Fast Retransmit algorithm.') tcpEStatsStackSubsequentTimeouts = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 5, 1, 28), ZeroBasedCounter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsStackSubsequentTimeouts.setDescription('The number of times the retransmit timeout has expired after\n the RTO has been doubled. See Section 5.5 of RFC 2988.') tcpEStatsStackCurTimeoutCount = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 5, 1, 29), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsStackCurTimeoutCount.setDescription('The current number of times the retransmit timeout has\n expired without receiving an acknowledgment for new data.\n tcpEStatsStackCurTimeoutCount is reset to zero when new\n data is acknowledged and incremented for each invocation of\n Section 5.5 of RFC 2988.') tcpEStatsStackAbruptTimeouts = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 5, 1, 30), ZeroBasedCounter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsStackAbruptTimeouts.setDescription('The number of timeouts that occurred without any\n immediately preceding duplicate acknowledgments or other\n indications of congestion. Abrupt Timeouts indicate that\n the path lost an entire window of data or acknowledgments.\n\n Timeouts that are preceded by duplicate acknowledgments or\n other congestion signals (e.g., ECN) are not counted as\n abrupt, and might have been avoided by a more sophisticated\n Fast Retransmit algorithm.') tcpEStatsStackSACKsRcvd = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 5, 1, 31), ZeroBasedCounter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsStackSACKsRcvd.setDescription('The number of SACK options received.') tcpEStatsStackSACKBlocksRcvd = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 5, 1, 32), ZeroBasedCounter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsStackSACKBlocksRcvd.setDescription('The number of SACK blocks received (within SACK options).') tcpEStatsStackSendStall = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 5, 1, 33), ZeroBasedCounter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsStackSendStall.setDescription('The number of interface stalls or other sender local\n resource limitations that are treated as congestion\n signals.') tcpEStatsStackDSACKDups = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 5, 1, 34), ZeroBasedCounter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsStackDSACKDups.setDescription('The number of duplicate segments reported to the local host\n by D-SACK blocks.') tcpEStatsStackMaxMSS = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 5, 1, 35), Gauge32()).setUnits('octets').setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsStackMaxMSS.setDescription('The maximum MSS, in octets.') tcpEStatsStackMinMSS = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 5, 1, 36), Gauge32()).setUnits('octets').setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsStackMinMSS.setDescription('The minimum MSS, in octets.') tcpEStatsStackSndInitial = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 5, 1, 37), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsStackSndInitial.setDescription('Initial send sequence number. Note that by definition\n tcpEStatsStackSndInitial never changes for a given\n connection.') tcpEStatsStackRecInitial = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 5, 1, 38), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsStackRecInitial.setDescription('Initial receive sequence number. Note that by definition\n tcpEStatsStackRecInitial never changes for a given\n connection.') tcpEStatsStackCurRetxQueue = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 5, 1, 39), Gauge32()).setUnits('octets').setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsStackCurRetxQueue.setDescription('The current number of octets of data occupying the\n retransmit queue.') tcpEStatsStackMaxRetxQueue = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 5, 1, 40), Gauge32()).setUnits('octets').setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsStackMaxRetxQueue.setDescription('The maximum number of octets of data occupying the\n retransmit queue.') tcpEStatsStackCurReasmQueue = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 5, 1, 41), Gauge32()).setUnits('octets').setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsStackCurReasmQueue.setDescription('The current number of octets of sequence space spanned by\n the reassembly queue. This is generally the difference\n between rcv.nxt and the sequence number of the right most\n edge of the reassembly queue.') tcpEStatsStackMaxReasmQueue = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 5, 1, 42), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsStackMaxReasmQueue.setDescription('The maximum value of tcpEStatsStackCurReasmQueue') tcpEStatsAppTable = MibTable((1, 3, 6, 1, 2, 1, 156, 1, 1, 6), ) if mibBuilder.loadTexts: tcpEStatsAppTable.setDescription('This table contains objects that are useful for\n determining if the application using TCP is\n\n\n\n limiting TCP performance.\n\n Entries are retained in this table for the number of\n seconds indicated by the tcpEStatsConnTableLatency\n object, after the TCP connection first enters the closed\n state.') tcpEStatsAppEntry = MibTableRow((1, 3, 6, 1, 2, 1, 156, 1, 1, 6, 1), ).setIndexNames((0, "TCP-ESTATS-MIB", "tcpEStatsConnectIndex")) if mibBuilder.loadTexts: tcpEStatsAppEntry.setDescription('Each entry in this table has information about the\n characteristics of each active and recently closed TCP\n connection.') tcpEStatsAppSndUna = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 6, 1, 1), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsAppSndUna.setDescription('The value of SND.UNA, the oldest unacknowledged sequence\n number.\n\n Note that SND.UNA is a TCP state variable that is congruent\n to Counter32 semantics.') tcpEStatsAppSndNxt = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 6, 1, 2), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsAppSndNxt.setDescription('The value of SND.NXT, the next sequence number to be sent.\n Note that tcpEStatsAppSndNxt is not monotonic (and thus not\n a counter) because TCP sometimes retransmits lost data by\n pulling tcpEStatsAppSndNxt back to the missing data.') tcpEStatsAppSndMax = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 6, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsAppSndMax.setDescription('The farthest forward (right most or largest) SND.NXT value.\n Note that this will be equal to tcpEStatsAppSndNxt except\n when tcpEStatsAppSndNxt is pulled back during recovery.') tcpEStatsAppThruOctetsAcked = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 6, 1, 4), ZeroBasedCounter32()).setUnits('octets').setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsAppThruOctetsAcked.setDescription('The number of octets for which cumulative acknowledgments\n have been received. Note that this will be the sum of\n changes to tcpEStatsAppSndUna.') tcpEStatsAppHCThruOctetsAcked = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 6, 1, 5), ZeroBasedCounter64()).setUnits('octets').setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsAppHCThruOctetsAcked.setDescription('The number of octets for which cumulative acknowledgments\n have been received, on systems that can receive more than\n 10 million bits per second. Note that this will be the sum\n of changes in tcpEStatsAppSndUna.') tcpEStatsAppRcvNxt = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 6, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsAppRcvNxt.setDescription('The value of RCV.NXT. The next sequence number expected on\n an incoming segment, and the left or lower edge of the\n receive window.\n\n Note that RCV.NXT is a TCP state variable that is congruent\n to Counter32 semantics.') tcpEStatsAppThruOctetsReceived = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 6, 1, 7), ZeroBasedCounter32()).setUnits('octets').setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsAppThruOctetsReceived.setDescription('The number of octets for which cumulative acknowledgments\n have been sent. Note that this will be the sum of changes\n to tcpEStatsAppRcvNxt.') tcpEStatsAppHCThruOctetsReceived = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 6, 1, 8), ZeroBasedCounter64()).setUnits('octets').setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsAppHCThruOctetsReceived.setDescription('The number of octets for which cumulative acknowledgments\n have been sent, on systems that can transmit more than 10\n million bits per second. Note that this will be the sum of\n changes in tcpEStatsAppRcvNxt.') tcpEStatsAppCurAppWQueue = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 6, 1, 11), Gauge32()).setUnits('octets').setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsAppCurAppWQueue.setDescription('The current number of octets of application data buffered\n by TCP, pending first transmission, i.e., to the left of\n SND.NXT or SndMax. This data will generally be transmitted\n (and SND.NXT advanced to the left) as soon as there is an\n available congestion window (cwnd) or receiver window\n (rwin). This is the amount of data readily available for\n transmission, without scheduling the application. TCP\n performance may suffer if there is insufficient queued\n write data.') tcpEStatsAppMaxAppWQueue = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 6, 1, 12), Gauge32()).setUnits('octets').setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsAppMaxAppWQueue.setDescription('The maximum number of octets of application data buffered\n by TCP, pending first transmission. This is the maximum\n value of tcpEStatsAppCurAppWQueue. This pair of objects can\n be used to determine if insufficient queued data is steady\n state (suggesting insufficient queue space) or transient\n (suggesting insufficient application performance or\n excessive CPU load or scheduler latency).') tcpEStatsAppCurAppRQueue = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 6, 1, 13), Gauge32()).setUnits('octets').setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsAppCurAppRQueue.setDescription('The current number of octets of application data that has\n been acknowledged by TCP but not yet delivered to the\n application.') tcpEStatsAppMaxAppRQueue = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 6, 1, 14), Gauge32()).setUnits('octets').setMaxAccess("readonly") if mibBuilder.loadTexts: tcpEStatsAppMaxAppRQueue.setDescription('The maximum number of octets of application data that has\n been acknowledged by TCP but not yet delivered to the\n application.') tcpEStatsTuneTable = MibTable((1, 3, 6, 1, 2, 1, 156, 1, 1, 7), ) if mibBuilder.loadTexts: tcpEStatsTuneTable.setDescription('This table contains per-connection controls that can\n be used to work around a number of common problems that\n plague TCP over some paths. All can be characterized as\n limiting the growth of the congestion window so as to\n prevent TCP from overwhelming some component in the\n path.\n\n Entries are retained in this table for the number of\n seconds indicated by the tcpEStatsConnTableLatency\n object, after the TCP connection first enters the closed\n state.') tcpEStatsTuneEntry = MibTableRow((1, 3, 6, 1, 2, 1, 156, 1, 1, 7, 1), ).setIndexNames((0, "TCP-ESTATS-MIB", "tcpEStatsConnectIndex")) if mibBuilder.loadTexts: tcpEStatsTuneEntry.setDescription('Each entry in this table is a control that can be used to\n place limits on each active TCP connection.') tcpEStatsTuneLimCwnd = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 7, 1, 1), Unsigned32()).setUnits('octets').setMaxAccess("readwrite") if mibBuilder.loadTexts: tcpEStatsTuneLimCwnd.setDescription('A control to set the maximum congestion window that may be\n used, in octets.') tcpEStatsTuneLimSsthresh = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 7, 1, 2), Unsigned32()).setUnits('octets').setMaxAccess("readwrite") if mibBuilder.loadTexts: tcpEStatsTuneLimSsthresh.setDescription('A control to limit the maximum queue space (in octets) that\n this TCP connection is likely to occupy during slowstart.\n\n It can be implemented with the algorithm described in\n RFC 3742 by setting the max_ssthresh parameter to twice\n tcpEStatsTuneLimSsthresh.\n\n This algorithm can be used to overcome some TCP performance\n problems over network paths that do not have sufficient\n buffering to withstand the bursts normally present during\n slowstart.') tcpEStatsTuneLimRwin = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 7, 1, 3), Unsigned32()).setUnits('octets').setMaxAccess("readwrite") if mibBuilder.loadTexts: tcpEStatsTuneLimRwin.setDescription('A control to set the maximum window advertisement that may\n be sent, in octets.') tcpEStatsTuneLimMSS = MibTableColumn((1, 3, 6, 1, 2, 1, 156, 1, 1, 7, 1, 4), Unsigned32()).setUnits('octets').setMaxAccess("readwrite") if mibBuilder.loadTexts: tcpEStatsTuneLimMSS.setDescription('A control to limit the maximum segment size in octets, that\n this TCP connection can use.') tcpEStatsEstablishNotification = NotificationType((1, 3, 6, 1, 2, 1, 156, 0, 1)).setObjects(*(("TCP-ESTATS-MIB", "tcpEStatsConnectIndex"),)) if mibBuilder.loadTexts: tcpEStatsEstablishNotification.setDescription('The indicated connection has been accepted\n (or alternatively entered the established state).') tcpEStatsCloseNotification = NotificationType((1, 3, 6, 1, 2, 1, 156, 0, 2)).setObjects(*(("TCP-ESTATS-MIB", "tcpEStatsConnectIndex"),)) if mibBuilder.loadTexts: tcpEStatsCloseNotification.setDescription('The indicated connection has left the\n established state') tcpEStatsCompliances = MibIdentifier((1, 3, 6, 1, 2, 1, 156, 2, 1)) tcpEStatsGroups = MibIdentifier((1, 3, 6, 1, 2, 1, 156, 2, 2)) tcpEStatsCompliance = ModuleCompliance((1, 3, 6, 1, 2, 1, 156, 2, 1, 1)).setObjects(*(("TCP-ESTATS-MIB", "tcpEStatsListenerGroup"), ("TCP-ESTATS-MIB", "tcpEStatsConnectIdGroup"), ("TCP-ESTATS-MIB", "tcpEStatsPerfGroup"), ("TCP-ESTATS-MIB", "tcpEStatsPathGroup"), ("TCP-ESTATS-MIB", "tcpEStatsStackGroup"), ("TCP-ESTATS-MIB", "tcpEStatsAppGroup"), ("TCP-ESTATS-MIB", "tcpEStatsListenerHCGroup"), ("TCP-ESTATS-MIB", "tcpEStatsPerfOptionalGroup"), ("TCP-ESTATS-MIB", "tcpEStatsPerfHCGroup"), ("TCP-ESTATS-MIB", "tcpEStatsPathOptionalGroup"), ("TCP-ESTATS-MIB", "tcpEStatsPathHCGroup"), ("TCP-ESTATS-MIB", "tcpEStatsStackOptionalGroup"), ("TCP-ESTATS-MIB", "tcpEStatsAppHCGroup"), ("TCP-ESTATS-MIB", "tcpEStatsAppOptionalGroup"), ("TCP-ESTATS-MIB", "tcpEStatsTuneOptionalGroup"), ("TCP-ESTATS-MIB", "tcpEStatsNotificationsGroup"), ("TCP-ESTATS-MIB", "tcpEStatsNotificationsCtlGroup"),)) if mibBuilder.loadTexts: tcpEStatsCompliance.setDescription('Compliance statement for all systems that implement TCP\n extended statistics.') tcpEStatsListenerGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 156, 2, 2, 1)).setObjects(*(("TCP-ESTATS-MIB", "tcpEStatsListenerTableLastChange"), ("TCP-ESTATS-MIB", "tcpEStatsListenerStartTime"), ("TCP-ESTATS-MIB", "tcpEStatsListenerSynRcvd"), ("TCP-ESTATS-MIB", "tcpEStatsListenerInitial"), ("TCP-ESTATS-MIB", "tcpEStatsListenerEstablished"), ("TCP-ESTATS-MIB", "tcpEStatsListenerAccepted"), ("TCP-ESTATS-MIB", "tcpEStatsListenerExceedBacklog"), ("TCP-ESTATS-MIB", "tcpEStatsListenerCurConns"), ("TCP-ESTATS-MIB", "tcpEStatsListenerMaxBacklog"), ("TCP-ESTATS-MIB", "tcpEStatsListenerCurBacklog"), ("TCP-ESTATS-MIB", "tcpEStatsListenerCurEstabBacklog"),)) if mibBuilder.loadTexts: tcpEStatsListenerGroup.setDescription('The tcpEStatsListener group includes objects that\n provide valuable statistics and debugging\n information for TCP Listeners.') tcpEStatsListenerHCGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 156, 2, 2, 2)).setObjects(*(("TCP-ESTATS-MIB", "tcpEStatsListenerHCSynRcvd"), ("TCP-ESTATS-MIB", "tcpEStatsListenerHCInitial"), ("TCP-ESTATS-MIB", "tcpEStatsListenerHCEstablished"), ("TCP-ESTATS-MIB", "tcpEStatsListenerHCAccepted"), ("TCP-ESTATS-MIB", "tcpEStatsListenerHCExceedBacklog"),)) if mibBuilder.loadTexts: tcpEStatsListenerHCGroup.setDescription('The tcpEStatsListenerHC group includes 64-bit\n counters in tcpEStatsListenerTable.') tcpEStatsConnectIdGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 156, 2, 2, 3)).setObjects(*(("TCP-ESTATS-MIB", "tcpEStatsConnTableLatency"), ("TCP-ESTATS-MIB", "tcpEStatsConnectIndex"),)) if mibBuilder.loadTexts: tcpEStatsConnectIdGroup.setDescription('The tcpEStatsConnectId group includes objects that\n identify TCP connections and control how long TCP\n connection entries are retained in the tables.') tcpEStatsPerfGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 156, 2, 2, 4)).setObjects(*(("TCP-ESTATS-MIB", "tcpEStatsPerfSegsOut"), ("TCP-ESTATS-MIB", "tcpEStatsPerfDataSegsOut"), ("TCP-ESTATS-MIB", "tcpEStatsPerfDataOctetsOut"), ("TCP-ESTATS-MIB", "tcpEStatsPerfSegsRetrans"), ("TCP-ESTATS-MIB", "tcpEStatsPerfOctetsRetrans"), ("TCP-ESTATS-MIB", "tcpEStatsPerfSegsIn"), ("TCP-ESTATS-MIB", "tcpEStatsPerfDataSegsIn"), ("TCP-ESTATS-MIB", "tcpEStatsPerfDataOctetsIn"), ("TCP-ESTATS-MIB", "tcpEStatsPerfElapsedSecs"), ("TCP-ESTATS-MIB", "tcpEStatsPerfElapsedMicroSecs"), ("TCP-ESTATS-MIB", "tcpEStatsPerfStartTimeStamp"), ("TCP-ESTATS-MIB", "tcpEStatsPerfCurMSS"), ("TCP-ESTATS-MIB", "tcpEStatsPerfPipeSize"), ("TCP-ESTATS-MIB", "tcpEStatsPerfMaxPipeSize"), ("TCP-ESTATS-MIB", "tcpEStatsPerfSmoothedRTT"), ("TCP-ESTATS-MIB", "tcpEStatsPerfCurRTO"), ("TCP-ESTATS-MIB", "tcpEStatsPerfCongSignals"), ("TCP-ESTATS-MIB", "tcpEStatsPerfCurCwnd"), ("TCP-ESTATS-MIB", "tcpEStatsPerfCurSsthresh"), ("TCP-ESTATS-MIB", "tcpEStatsPerfTimeouts"), ("TCP-ESTATS-MIB", "tcpEStatsPerfCurRwinSent"), ("TCP-ESTATS-MIB", "tcpEStatsPerfMaxRwinSent"), ("TCP-ESTATS-MIB", "tcpEStatsPerfZeroRwinSent"), ("TCP-ESTATS-MIB", "tcpEStatsPerfCurRwinRcvd"), ("TCP-ESTATS-MIB", "tcpEStatsPerfMaxRwinRcvd"), ("TCP-ESTATS-MIB", "tcpEStatsPerfZeroRwinRcvd"),)) if mibBuilder.loadTexts: tcpEStatsPerfGroup.setDescription('The tcpEStatsPerf group includes those objects that\n provide basic performance data for a TCP connection.') tcpEStatsPerfOptionalGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 156, 2, 2, 5)).setObjects(*(("TCP-ESTATS-MIB", "tcpEStatsPerfSndLimTransRwin"), ("TCP-ESTATS-MIB", "tcpEStatsPerfSndLimTransCwnd"), ("TCP-ESTATS-MIB", "tcpEStatsPerfSndLimTransSnd"), ("TCP-ESTATS-MIB", "tcpEStatsPerfSndLimTimeRwin"), ("TCP-ESTATS-MIB", "tcpEStatsPerfSndLimTimeCwnd"), ("TCP-ESTATS-MIB", "tcpEStatsPerfSndLimTimeSnd"),)) if mibBuilder.loadTexts: tcpEStatsPerfOptionalGroup.setDescription('The tcpEStatsPerf group includes those objects that\n provide basic performance data for a TCP connection.') tcpEStatsPerfHCGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 156, 2, 2, 6)).setObjects(*(("TCP-ESTATS-MIB", "tcpEStatsPerfHCDataOctetsOut"), ("TCP-ESTATS-MIB", "tcpEStatsPerfHCDataOctetsIn"),)) if mibBuilder.loadTexts: tcpEStatsPerfHCGroup.setDescription('The tcpEStatsPerfHC group includes 64-bit\n counters in the tcpEStatsPerfTable.') tcpEStatsPathGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 156, 2, 2, 7)).setObjects(*(("TCP-ESTATS-MIB", "tcpEStatsControlPath"), ("TCP-ESTATS-MIB", "tcpEStatsPathRetranThresh"), ("TCP-ESTATS-MIB", "tcpEStatsPathNonRecovDAEpisodes"), ("TCP-ESTATS-MIB", "tcpEStatsPathSumOctetsReordered"), ("TCP-ESTATS-MIB", "tcpEStatsPathNonRecovDA"),)) if mibBuilder.loadTexts: tcpEStatsPathGroup.setDescription('The tcpEStatsPath group includes objects that\n control the creation of the tcpEStatsPathTable,\n and provide information about the path\n for each TCP connection.') tcpEStatsPathOptionalGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 156, 2, 2, 8)).setObjects(*(("TCP-ESTATS-MIB", "tcpEStatsPathSampleRTT"), ("TCP-ESTATS-MIB", "tcpEStatsPathRTTVar"), ("TCP-ESTATS-MIB", "tcpEStatsPathMaxRTT"), ("TCP-ESTATS-MIB", "tcpEStatsPathMinRTT"), ("TCP-ESTATS-MIB", "tcpEStatsPathSumRTT"), ("TCP-ESTATS-MIB", "tcpEStatsPathCountRTT"), ("TCP-ESTATS-MIB", "tcpEStatsPathMaxRTO"), ("TCP-ESTATS-MIB", "tcpEStatsPathMinRTO"), ("TCP-ESTATS-MIB", "tcpEStatsPathIpTtl"), ("TCP-ESTATS-MIB", "tcpEStatsPathIpTosIn"), ("TCP-ESTATS-MIB", "tcpEStatsPathIpTosOut"), ("TCP-ESTATS-MIB", "tcpEStatsPathPreCongSumCwnd"), ("TCP-ESTATS-MIB", "tcpEStatsPathPreCongSumRTT"), ("TCP-ESTATS-MIB", "tcpEStatsPathPostCongSumRTT"), ("TCP-ESTATS-MIB", "tcpEStatsPathPostCongCountRTT"), ("TCP-ESTATS-MIB", "tcpEStatsPathECNsignals"), ("TCP-ESTATS-MIB", "tcpEStatsPathDupAckEpisodes"), ("TCP-ESTATS-MIB", "tcpEStatsPathRcvRTT"), ("TCP-ESTATS-MIB", "tcpEStatsPathDupAcksOut"), ("TCP-ESTATS-MIB", "tcpEStatsPathCERcvd"), ("TCP-ESTATS-MIB", "tcpEStatsPathECESent"),)) if mibBuilder.loadTexts: tcpEStatsPathOptionalGroup.setDescription('The tcpEStatsPath group includes objects that\n provide additional information about the path\n for each TCP connection.') tcpEStatsPathHCGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 156, 2, 2, 9)).setObjects(*(("TCP-ESTATS-MIB", "tcpEStatsPathHCSumRTT"),)) if mibBuilder.loadTexts: tcpEStatsPathHCGroup.setDescription('The tcpEStatsPathHC group includes 64-bit\n counters in the tcpEStatsPathTable.') tcpEStatsStackGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 156, 2, 2, 10)).setObjects(*(("TCP-ESTATS-MIB", "tcpEStatsControlStack"), ("TCP-ESTATS-MIB", "tcpEStatsStackActiveOpen"), ("TCP-ESTATS-MIB", "tcpEStatsStackMSSSent"), ("TCP-ESTATS-MIB", "tcpEStatsStackMSSRcvd"), ("TCP-ESTATS-MIB", "tcpEStatsStackWinScaleSent"), ("TCP-ESTATS-MIB", "tcpEStatsStackWinScaleRcvd"), ("TCP-ESTATS-MIB", "tcpEStatsStackTimeStamps"), ("TCP-ESTATS-MIB", "tcpEStatsStackECN"), ("TCP-ESTATS-MIB", "tcpEStatsStackWillSendSACK"), ("TCP-ESTATS-MIB", "tcpEStatsStackWillUseSACK"), ("TCP-ESTATS-MIB", "tcpEStatsStackState"), ("TCP-ESTATS-MIB", "tcpEStatsStackNagle"), ("TCP-ESTATS-MIB", "tcpEStatsStackMaxSsCwnd"), ("TCP-ESTATS-MIB", "tcpEStatsStackMaxCaCwnd"), ("TCP-ESTATS-MIB", "tcpEStatsStackMaxSsthresh"), ("TCP-ESTATS-MIB", "tcpEStatsStackMinSsthresh"), ("TCP-ESTATS-MIB", "tcpEStatsStackInRecovery"), ("TCP-ESTATS-MIB", "tcpEStatsStackDupAcksIn"), ("TCP-ESTATS-MIB", "tcpEStatsStackSpuriousFrDetected"), ("TCP-ESTATS-MIB", "tcpEStatsStackSpuriousRtoDetected"),)) if mibBuilder.loadTexts: tcpEStatsStackGroup.setDescription('The tcpEStatsConnState group includes objects that\n control the creation of the tcpEStatsStackTable,\n and provide information about the operation of\n algorithms used within TCP.') tcpEStatsStackOptionalGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 156, 2, 2, 11)).setObjects(*(("TCP-ESTATS-MIB", "tcpEStatsStackSoftErrors"), ("TCP-ESTATS-MIB", "tcpEStatsStackSoftErrorReason"), ("TCP-ESTATS-MIB", "tcpEStatsStackSlowStart"), ("TCP-ESTATS-MIB", "tcpEStatsStackCongAvoid"), ("TCP-ESTATS-MIB", "tcpEStatsStackOtherReductions"), ("TCP-ESTATS-MIB", "tcpEStatsStackCongOverCount"), ("TCP-ESTATS-MIB", "tcpEStatsStackFastRetran"), ("TCP-ESTATS-MIB", "tcpEStatsStackSubsequentTimeouts"), ("TCP-ESTATS-MIB", "tcpEStatsStackCurTimeoutCount"), ("TCP-ESTATS-MIB", "tcpEStatsStackAbruptTimeouts"), ("TCP-ESTATS-MIB", "tcpEStatsStackSACKsRcvd"), ("TCP-ESTATS-MIB", "tcpEStatsStackSACKBlocksRcvd"), ("TCP-ESTATS-MIB", "tcpEStatsStackSendStall"), ("TCP-ESTATS-MIB", "tcpEStatsStackDSACKDups"), ("TCP-ESTATS-MIB", "tcpEStatsStackMaxMSS"), ("TCP-ESTATS-MIB", "tcpEStatsStackMinMSS"), ("TCP-ESTATS-MIB", "tcpEStatsStackSndInitial"), ("TCP-ESTATS-MIB", "tcpEStatsStackRecInitial"), ("TCP-ESTATS-MIB", "tcpEStatsStackCurRetxQueue"), ("TCP-ESTATS-MIB", "tcpEStatsStackMaxRetxQueue"), ("TCP-ESTATS-MIB", "tcpEStatsStackCurReasmQueue"), ("TCP-ESTATS-MIB", "tcpEStatsStackMaxReasmQueue"),)) if mibBuilder.loadTexts: tcpEStatsStackOptionalGroup.setDescription('The tcpEStatsConnState group includes objects that\n provide additional information about the operation of\n algorithms used within TCP.') tcpEStatsAppGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 156, 2, 2, 12)).setObjects(*(("TCP-ESTATS-MIB", "tcpEStatsControlApp"), ("TCP-ESTATS-MIB", "tcpEStatsAppSndUna"), ("TCP-ESTATS-MIB", "tcpEStatsAppSndNxt"), ("TCP-ESTATS-MIB", "tcpEStatsAppSndMax"), ("TCP-ESTATS-MIB", "tcpEStatsAppThruOctetsAcked"), ("TCP-ESTATS-MIB", "tcpEStatsAppRcvNxt"), ("TCP-ESTATS-MIB", "tcpEStatsAppThruOctetsReceived"),)) if mibBuilder.loadTexts: tcpEStatsAppGroup.setDescription('The tcpEStatsConnState group includes objects that\n control the creation of the tcpEStatsAppTable,\n and provide information about the operation of\n algorithms used within TCP.') tcpEStatsAppHCGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 156, 2, 2, 13)).setObjects(*(("TCP-ESTATS-MIB", "tcpEStatsAppHCThruOctetsAcked"), ("TCP-ESTATS-MIB", "tcpEStatsAppHCThruOctetsReceived"),)) if mibBuilder.loadTexts: tcpEStatsAppHCGroup.setDescription('The tcpEStatsStackHC group includes 64-bit\n counters in the tcpEStatsStackTable.') tcpEStatsAppOptionalGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 156, 2, 2, 14)).setObjects(*(("TCP-ESTATS-MIB", "tcpEStatsAppCurAppWQueue"), ("TCP-ESTATS-MIB", "tcpEStatsAppMaxAppWQueue"), ("TCP-ESTATS-MIB", "tcpEStatsAppCurAppRQueue"), ("TCP-ESTATS-MIB", "tcpEStatsAppMaxAppRQueue"),)) if mibBuilder.loadTexts: tcpEStatsAppOptionalGroup.setDescription('The tcpEStatsConnState group includes objects that\n provide additional information about how applications\n are interacting with each TCP connection.') tcpEStatsTuneOptionalGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 156, 2, 2, 15)).setObjects(*(("TCP-ESTATS-MIB", "tcpEStatsControlTune"), ("TCP-ESTATS-MIB", "tcpEStatsTuneLimCwnd"), ("TCP-ESTATS-MIB", "tcpEStatsTuneLimSsthresh"), ("TCP-ESTATS-MIB", "tcpEStatsTuneLimRwin"), ("TCP-ESTATS-MIB", "tcpEStatsTuneLimMSS"),)) if mibBuilder.loadTexts: tcpEStatsTuneOptionalGroup.setDescription('The tcpEStatsConnState group includes objects that\n control the creation of the tcpEStatsConnectionTable,\n which can be used to set tuning parameters\n for each TCP connection.') tcpEStatsNotificationsGroup = NotificationGroup((1, 3, 6, 1, 2, 1, 156, 2, 2, 16)).setObjects(*(("TCP-ESTATS-MIB", "tcpEStatsEstablishNotification"), ("TCP-ESTATS-MIB", "tcpEStatsCloseNotification"),)) if mibBuilder.loadTexts: tcpEStatsNotificationsGroup.setDescription('Notifications sent by a TCP extended statistics agent.') tcpEStatsNotificationsCtlGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 156, 2, 2, 17)).setObjects(*(("TCP-ESTATS-MIB", "tcpEStatsControlNotify"),)) if mibBuilder.loadTexts: tcpEStatsNotificationsCtlGroup.setDescription('The tcpEStatsNotificationsCtl group includes the\n object that controls the creation of the events\n in the tcpEStatsNotificationsGroup.') mibBuilder.exportSymbols("TCP-ESTATS-MIB", tcpEStatsPerfSegsIn=tcpEStatsPerfSegsIn, tcpEStatsAppHCThruOctetsAcked=tcpEStatsAppHCThruOctetsAcked, tcpEStatsStackMSSSent=tcpEStatsStackMSSSent, tcpEStatsTuneLimRwin=tcpEStatsTuneLimRwin, tcpEStatsStackTimeStamps=tcpEStatsStackTimeStamps, tcpEStatsStackState=tcpEStatsStackState, tcpEStatsPerfZeroRwinRcvd=tcpEStatsPerfZeroRwinRcvd, tcpEStatsStackSpuriousFrDetected=tcpEStatsStackSpuriousFrDetected, tcpEStatsStackMaxMSS=tcpEStatsStackMaxMSS, tcpEStatsPerfDataOctetsIn=tcpEStatsPerfDataOctetsIn, tcpEStatsStackSACKsRcvd=tcpEStatsStackSACKsRcvd, tcpEStatsTuneTable=tcpEStatsTuneTable, TcpEStatsNegotiated=TcpEStatsNegotiated, tcpEStatsPathCERcvd=tcpEStatsPathCERcvd, tcpEStatsPerfEntry=tcpEStatsPerfEntry, tcpEStatsConnectIndex=tcpEStatsConnectIndex, tcpEStatsPerfSndLimTransSnd=tcpEStatsPerfSndLimTransSnd, tcpEStatsPerfZeroRwinSent=tcpEStatsPerfZeroRwinSent, tcpEStatsStackSACKBlocksRcvd=tcpEStatsStackSACKBlocksRcvd, tcpEStatsPerfSndLimTimeRwin=tcpEStatsPerfSndLimTimeRwin, tcpEStatsPerfTable=tcpEStatsPerfTable, tcpEStatsPathSampleRTT=tcpEStatsPathSampleRTT, tcpEStatsEstablishNotification=tcpEStatsEstablishNotification, tcpEStatsPerfMaxRwinRcvd=tcpEStatsPerfMaxRwinRcvd, tcpEStatsAppMaxAppRQueue=tcpEStatsAppMaxAppRQueue, tcpEStatsPerfCurSsthresh=tcpEStatsPerfCurSsthresh, tcpEStatsStackDSACKDups=tcpEStatsStackDSACKDups, tcpEStatsCloseNotification=tcpEStatsCloseNotification, tcpEStatsAppEntry=tcpEStatsAppEntry, tcpEStatsControlApp=tcpEStatsControlApp, tcpEStatsStackRecInitial=tcpEStatsStackRecInitial, tcpEStatsStackMaxReasmQueue=tcpEStatsStackMaxReasmQueue, tcpEStatsStackWillSendSACK=tcpEStatsStackWillSendSACK, tcpEStatsAppRcvNxt=tcpEStatsAppRcvNxt, tcpEStatsPerfHCGroup=tcpEStatsPerfHCGroup, tcpEStatsPerfSndLimTimeCwnd=tcpEStatsPerfSndLimTimeCwnd, tcpEStatsPerfStartTimeStamp=tcpEStatsPerfStartTimeStamp, tcpEStatsConnectIdTable=tcpEStatsConnectIdTable, tcpEStatsControlStack=tcpEStatsControlStack, tcpEStatsStackDupAcksIn=tcpEStatsStackDupAcksIn, tcpEStatsListenerGroup=tcpEStatsListenerGroup, tcpEStatsControlPath=tcpEStatsControlPath, tcpEStatsPathIpTosIn=tcpEStatsPathIpTosIn, tcpEStatsStackOtherReductions=tcpEStatsStackOtherReductions, tcpEStatsStackCurRetxQueue=tcpEStatsStackCurRetxQueue, tcpEStatsTuneEntry=tcpEStatsTuneEntry, tcpEStatsPerfHCDataOctetsIn=tcpEStatsPerfHCDataOctetsIn, tcpEStatsStackMaxSsCwnd=tcpEStatsStackMaxSsCwnd, tcpEStatsPathNonRecovDA=tcpEStatsPathNonRecovDA, tcpEStatsStackSoftErrorReason=tcpEStatsStackSoftErrorReason, tcpEStatsStackTable=tcpEStatsStackTable, tcpEStatsPathECESent=tcpEStatsPathECESent, tcpEStatsPerfPipeSize=tcpEStatsPerfPipeSize, tcpEStatsStackSlowStart=tcpEStatsStackSlowStart, tcpEStatsStackMSSRcvd=tcpEStatsStackMSSRcvd, tcpEStatsListenerAccepted=tcpEStatsListenerAccepted, tcpEStatsAppGroup=tcpEStatsAppGroup, tcpEStatsStackAbruptTimeouts=tcpEStatsStackAbruptTimeouts, tcpEStatsPathPostCongCountRTT=tcpEStatsPathPostCongCountRTT, tcpEStatsPathSumRTT=tcpEStatsPathSumRTT, tcpEStatsPathEntry=tcpEStatsPathEntry, tcpEStatsPathHCGroup=tcpEStatsPathHCGroup, tcpEStatsListenerSynRcvd=tcpEStatsListenerSynRcvd, tcpEStatsStackMinMSS=tcpEStatsStackMinMSS, tcpEStatsPathSumOctetsReordered=tcpEStatsPathSumOctetsReordered, tcpEStatsAppSndUna=tcpEStatsAppSndUna, tcpEStatsPerfTimeouts=tcpEStatsPerfTimeouts, tcpEStatsListenerExceedBacklog=tcpEStatsListenerExceedBacklog, tcpEStatsPathMinRTO=tcpEStatsPathMinRTO, tcpEStatsPerfOctetsRetrans=tcpEStatsPerfOctetsRetrans, tcpEStatsStackMaxSsthresh=tcpEStatsStackMaxSsthresh, tcpEStatsAppOptionalGroup=tcpEStatsAppOptionalGroup, tcpEStatsPathPreCongSumCwnd=tcpEStatsPathPreCongSumCwnd, tcpEStatsListenerMaxBacklog=tcpEStatsListenerMaxBacklog, tcpEStatsPerfCongSignals=tcpEStatsPerfCongSignals, tcpEStatsStackFastRetran=tcpEStatsStackFastRetran, tcpEStatsTuneOptionalGroup=tcpEStatsTuneOptionalGroup, tcpEStatsCompliance=tcpEStatsCompliance, tcpEStatsListenerCurBacklog=tcpEStatsListenerCurBacklog, tcpEStatsStackMaxCaCwnd=tcpEStatsStackMaxCaCwnd, tcpEStatsPathIpTosOut=tcpEStatsPathIpTosOut, tcpEStatsControlNotify=tcpEStatsControlNotify, tcpEStatsNotificationsCtlGroup=tcpEStatsNotificationsCtlGroup, tcpEStatsAppTable=tcpEStatsAppTable, tcpEStatsPerfSndLimTimeSnd=tcpEStatsPerfSndLimTimeSnd, tcpEStatsPathRcvRTT=tcpEStatsPathRcvRTT, tcpEStatsStackEntry=tcpEStatsStackEntry, tcpEStatsStackWillUseSACK=tcpEStatsStackWillUseSACK, tcpEStatsPerfSmoothedRTT=tcpEStatsPerfSmoothedRTT, tcpEStatsControl=tcpEStatsControl, tcpEStatsPathMaxRTO=tcpEStatsPathMaxRTO, tcpEStatsAppHCThruOctetsReceived=tcpEStatsAppHCThruOctetsReceived, tcpEStatsAppCurAppWQueue=tcpEStatsAppCurAppWQueue, tcpEStatsGroups=tcpEStatsGroups, tcpEStatsMIBObjects=tcpEStatsMIBObjects, tcpEStatsListenerEstablished=tcpEStatsListenerEstablished, tcpEStatsPerfCurMSS=tcpEStatsPerfCurMSS, tcpEStatsListenerHCEstablished=tcpEStatsListenerHCEstablished, tcpEStatsPathECNsignals=tcpEStatsPathECNsignals, tcpEStatsPerfCurCwnd=tcpEStatsPerfCurCwnd, tcpEStatsNotifications=tcpEStatsNotifications, tcpEStatsListenerHCExceedBacklog=tcpEStatsListenerHCExceedBacklog, tcpEStatsPerfSegsRetrans=tcpEStatsPerfSegsRetrans, tcpEStatsPerfMaxRwinSent=tcpEStatsPerfMaxRwinSent, tcpEStatsPathCountRTT=tcpEStatsPathCountRTT, tcpEStatsPerfSegsOut=tcpEStatsPerfSegsOut, tcpEStatsAppSndNxt=tcpEStatsAppSndNxt, tcpEStatsPerfDataSegsIn=tcpEStatsPerfDataSegsIn, tcpEStatsControlTune=tcpEStatsControlTune, tcpEStatsTuneLimMSS=tcpEStatsTuneLimMSS, tcpEStatsStackSpuriousRtoDetected=tcpEStatsStackSpuriousRtoDetected, tcpEStatsStackSendStall=tcpEStatsStackSendStall, tcpEStatsListenerTable=tcpEStatsListenerTable, tcpEStatsStackInRecovery=tcpEStatsStackInRecovery, tcpEStatsAppThruOctetsAcked=tcpEStatsAppThruOctetsAcked, tcpEStatsStackGroup=tcpEStatsStackGroup, tcpEStatsPathRTTVar=tcpEStatsPathRTTVar, tcpEStatsConnectIdEntry=tcpEStatsConnectIdEntry, tcpEStatsPathHCSumRTT=tcpEStatsPathHCSumRTT, tcpEStatsListenerHCInitial=tcpEStatsListenerHCInitial, tcpEStatsAppMaxAppWQueue=tcpEStatsAppMaxAppWQueue, tcpEStatsListenerCurEstabBacklog=tcpEStatsListenerCurEstabBacklog, tcpEStatsListenerHCSynRcvd=tcpEStatsListenerHCSynRcvd, tcpEStatsStackWinScaleRcvd=tcpEStatsStackWinScaleRcvd, tcpEStatsPerfOptionalGroup=tcpEStatsPerfOptionalGroup, tcpEStatsConformance=tcpEStatsConformance, tcpEStatsPerfHCDataOctetsOut=tcpEStatsPerfHCDataOctetsOut, tcpEStatsStackCurTimeoutCount=tcpEStatsStackCurTimeoutCount, tcpEStatsListenerInitial=tcpEStatsListenerInitial, tcpEStatsStackNagle=tcpEStatsStackNagle, tcpEStatsAppCurAppRQueue=tcpEStatsAppCurAppRQueue, tcpEStatsPerfElapsedMicroSecs=tcpEStatsPerfElapsedMicroSecs, tcpEStatsStackCurReasmQueue=tcpEStatsStackCurReasmQueue, tcpEStatsStackSubsequentTimeouts=tcpEStatsStackSubsequentTimeouts, tcpEStatsStackECN=tcpEStatsStackECN, tcpEStatsAppHCGroup=tcpEStatsAppHCGroup, tcpEStatsConnTableLatency=tcpEStatsConnTableLatency, tcpEStatsPathDupAckEpisodes=tcpEStatsPathDupAckEpisodes, tcpEStatsStackMinSsthresh=tcpEStatsStackMinSsthresh, tcpEStatsPathMaxRTT=tcpEStatsPathMaxRTT, tcpEStatsMIB=tcpEStatsMIB, tcpEStatsPathRetranThresh=tcpEStatsPathRetranThresh, tcpEStatsConnectIdGroup=tcpEStatsConnectIdGroup, tcpEStatsTuneLimSsthresh=tcpEStatsTuneLimSsthresh, tcpEStatsPerfSndLimTransCwnd=tcpEStatsPerfSndLimTransCwnd, tcpEStatsPerfCurRTO=tcpEStatsPerfCurRTO, tcpEStatsPathTable=tcpEStatsPathTable, PYSNMP_MODULE_ID=tcpEStatsMIB, tcpEStatsAppSndMax=tcpEStatsAppSndMax, tcpEStatsListenerHCGroup=tcpEStatsListenerHCGroup, tcpEStatsPathIpTtl=tcpEStatsPathIpTtl, tcpEStatsStackCongAvoid=tcpEStatsStackCongAvoid, tcpEStatsPathGroup=tcpEStatsPathGroup, tcpEStatsStackSndInitial=tcpEStatsStackSndInitial, tcpEStatsPathPostCongSumRTT=tcpEStatsPathPostCongSumRTT, tcpEStatsPathMinRTT=tcpEStatsPathMinRTT, tcpEStats=tcpEStats, tcpEStatsPathPreCongSumRTT=tcpEStatsPathPreCongSumRTT, tcpEStatsPathDupAcksOut=tcpEStatsPathDupAcksOut, tcpEStatsStackCongOverCount=tcpEStatsStackCongOverCount, tcpEStatsPathOptionalGroup=tcpEStatsPathOptionalGroup, tcpEStatsNotificationsGroup=tcpEStatsNotificationsGroup, tcpEStatsPerfMaxPipeSize=tcpEStatsPerfMaxPipeSize, tcpEStatsListenerEntry=tcpEStatsListenerEntry, tcpEStatsPerfSndLimTransRwin=tcpEStatsPerfSndLimTransRwin, tcpEStatsPerfGroup=tcpEStatsPerfGroup, tcpEStatsListenerHCAccepted=tcpEStatsListenerHCAccepted, tcpEStatsTuneLimCwnd=tcpEStatsTuneLimCwnd, tcpEStatsPerfElapsedSecs=tcpEStatsPerfElapsedSecs, tcpEStatsListenerStartTime=tcpEStatsListenerStartTime, tcpEStatsPerfCurRwinSent=tcpEStatsPerfCurRwinSent, tcpEStatsPathNonRecovDAEpisodes=tcpEStatsPathNonRecovDAEpisodes, tcpEStatsStackMaxRetxQueue=tcpEStatsStackMaxRetxQueue, tcpEStatsStackSoftErrors=tcpEStatsStackSoftErrors, tcpEStatsStackWinScaleSent=tcpEStatsStackWinScaleSent, tcpEStatsListenerTableLastChange=tcpEStatsListenerTableLastChange, tcpEStatsPerfDataSegsOut=tcpEStatsPerfDataSegsOut, tcpEStatsCompliances=tcpEStatsCompliances, tcpEStatsStackActiveOpen=tcpEStatsStackActiveOpen, tcpEStatsPerfCurRwinRcvd=tcpEStatsPerfCurRwinRcvd, tcpEStatsAppThruOctetsReceived=tcpEStatsAppThruOctetsReceived, tcpEStatsPerfDataOctetsOut=tcpEStatsPerfDataOctetsOut, tcpEStatsListenerCurConns=tcpEStatsListenerCurConns, tcpEStatsScalar=tcpEStatsScalar, tcpEStatsStackOptionalGroup=tcpEStatsStackOptionalGroup)
''' Faça um Programa que peça um número e informe se o número é inteiro ou decimal. Dica: utilize uma função de arredondamento. ''' ### ALGORITMO ### num = float(input('Digite um número: ')) a = num // 1 if num - a == 0: b = int(num) print('{0} é INTEIRO'.format(b)) else: print('{0} é DECIMAL'.format(num)) ### FUNÇÃO ### def intDec(num): a = num // 1 if num - a == 0: b = int(num) print('{0} é INTEIRO'.format(b)) else: print('{0} é DECIMAL'.format(num))
def solve(arr: list) -> int: """ This function returns the difference between the count of even numbers and the count of odd numbers. """ even = [] odd = [] for item in arr: if str(item).isdigit(): if item % 2 == 0: even.append(item) else: odd.append(item) return len(even) - len(odd)
class Client: def __init__(self, client_id): self.client_id = client_id self.available = 0 self.held = 0 self.total = 0 self.locked = False def get_client_id(self): return self.client_id def get_available(self): return self.available def lock_client(self): self.locked = True def unlock_client(self): self.locked = False def modify_available(self, value): self.available = self.available + value def modify_held(self, value): self.held = self.held + value def modify_total(self, value): self.total = self.total + value def get_client_data(self): return self.client_id, self.available, self.held, self.total, self.locked
description = 'W&T Box * 0-10V * Nr. 2' includes = [] _wutbox = 'wut-0-10-02' _wutbox_dev = _wutbox.replace('-','_') devices = { _wutbox_dev +'_1': device('nicos_mlz.sans1.devices.wut.WutValue', hostname = _wutbox + '.sans1.frm2', port = '1', description = 'input 1 voltage', fmtstr = '%.3F', lowlevel = False, loglevel = 'info', pollinterval = 5, maxage = 20, unit = 'V', ), _wutbox_dev +'_2': device('nicos_mlz.sans1.devices.wut.WutValue', hostname = _wutbox + '.sans1.frm2', port = '2', description = 'input 2 voltage', fmtstr = '%.3F', lowlevel = False, loglevel = 'info', pollinterval = 5, maxage = 20, unit = 'V', ), }
#!/usr/bin/env python CLIENT_ID = "zlrUKliWyT65ng" CLIENT_SECRET = "GKZ4G2df_YZOZ5V9mF-J-lJDDDo" USERNAME = "entsnack" PASSWORD = "claustrophobic" SUBREDDIT = "ChangeMyView" FLAIR_HIDING_TEMPLATE_ID = "FLAIR_TEMPLATE_ID" USER_GROUPS_FILENAME = "user_flair_group" USER_AGENT = "web:zlrUKliWyT65ng:0.1 (by u/entsnack)" MAX_STRATUM = 7 VALID_DELTA_INDICATORS = ["!delta", "Δ", "∆", "&#916;", "&#8710;", "&Delta;", "∆", "∇", "▲", "△"] # from deltabot four def get_stratum(d): if d == 0: return 0 elif d >= 1 and d < 10: return 1 elif d >= 10 and d < 20: return 2 elif d >= 20 and d < 30: return 3 elif d >= 30 and d < 40: return 4 elif d >= 40 and d < 50: return 5 elif d >= 50 and d < 100: return 6 elif d >= 100: return 7
#!/usr/bin/env python class ProxyAtom(object): """docstring for ProxyAtom""" def __init__(self, ips, ports): super(ProxyAtom, self).__init__() result = dict(zip(ips, ports)) self.items = set([':'.join((host, port)) for host, port in result.items()])
#!/usr/bin/env python NAME = 'FortiWeb (Fortinet)' def is_waf(self): if self.matchcookie(r'^FORTIWAFSID='): return True for attack in self.attacks: r = attack(self) if r is None: return _, responsepage = r # Found a site running a tweaked version of Fortiweb block page. Picked those only # in common. Discarded others. if all(m in responsepage for m in (b'fgd_icon', b'Web Page Blocked', b'URL:', b'Attack ID', b'Message ID', b'Client IP')): return True return False
def checkResult(netSales, eps): try: crfo = float(netSales[0]) except: crfo = 0.0 try: prfo = float(netSales[1]) except: prfo = 0.0 try: lrfo = float(netSales[2]) except: lrfo = 0.0 try: cqe = float(eps[0]) except: cqe = 0.0 try: pqe = float(eps[1]) except: pqe = 0.0 try: lqe = float(eps[2]) except: lqe = 0.0 if(cqe > lqe and crfo > prfo): if(cqe <= 1 and (cqe >= pqe + 0.25)): return True elif(cqe <= 2 and (cqe >= pqe+0.5)): return True elif(cqe <= 10 and cqe > 2 and (cqe >= pqe+1)): return True elif(cqe > 10 and (cqe >= pqe + 1.5)): return True return False
''' A centered decagonal number is a centered figurate number that represents a decagon with a dot in the center and all other dots surrounding the center dot in successive decagonal layers. The centered decagonal number for n is given by the formula 5n^2+5n+1 ''' def centeredDecagonal (num): # Using formula return 5 * num * num + 5 * num + 1 # Driver code num = int(input()) print(num, "centered decagonal number :", centeredDecagonal(num)) ''' Input: 6 output: 6 centered decagonal number : 211 '''
# class Solution: # def convert(self, s: str, numRows: int) -> str: # lst = [] # N = len(s) # print (N//(2*numRows-2)) # [lst.append([s[i]]) for i in range(numRows)] # step = 2*numRows-2 # for k in range(N//step): # if k: # [lst[i].append(s[k * step + i]) for i in range(numRows)] # [lst[i].append(s[k*step+numRows-1-i+numRows-1]) for i in range(numRows-2,0, -1)] # for k in range(N%step): # lst[k].append(s[N//step *step + k]) # return lst # class Solution: # def convert(self, s: str, numRows: int) -> str: # lst = [] # N = len(s) # if numRows == 1 or N <= 2 or numRows >= N: # return s # # print (N//(2*numRows-2)) # [lst.append(s[i]) for i in range(numRows)] # step = 2*numRows-2 # if N < step: # for i in range(numRows-2, 2, -1): # # j = i # # a = numRows-1-i + numRows-1 # lst[i] += (s[numRows-1-i + numRows-1]) # for k in range(N//step): # if k: # for i in range(numRows): # lst[i]+=(s[k * step + i]) # for i in range(numRows - 2, 0, -1): # lst[i]+=(s[k*step+numRows-1-i+numRows-1]) # if N > step: # for k in range(min(N%step, numRows)): # a = N//step *step + k # lst[k]+=(s[N//step *step + k]) # if N%step - numRows>0: # for i in range(N%step - numRows): # lst[numRows-i-2]+=s[N//step *step + numRows+i] # # # return "".join(lst) # # class Solution: def convert(self, s: str, numRows: int) -> str: lst, idx = [], 0 p_down, p_up = 0, numRows-2 # p_down [0,numRows-1], p_up [numRows-2,1] N = len(s) if numRows == 1 or N <= 2 or numRows >= N: return s [lst.append(s[i]) for i in range(numRows)] idx += numRows while idx < N: if p_up <= 1: p_up = numRows-2 if p_down >= numRows-1: p_down = 0 while p_up >= 1: if idx >= N: break lst[p_up] += s[idx] p_up -= 1 idx += 1 while p_down <= numRows-1: if idx >= N: break lst[p_down] += s[idx] p_down += 1 idx += 1 return "".join(lst) s = "PAYPALISHIRINGXYZU" # s = "PAYPALISHIRING" numRows = 5 sol = Solution() print(sol.convert(s, numRows))
""" moe.py A set of functions that can be used to select an item from a list using the "Eeny, Meeny, Miny, Moe" method. There are a few versions of the rhyme. The "regular" one is as follows: Eeny, Meeny, Miny, Moe Catch a tiger by his toe If he hollers let him go Eeny, Meeny, Miny, Moe My mother told me To pick the very best one And you are it This script will deal with a few different versions of the rhyme: "regular" - As written above "short" - Does not contain the last three lines "not" - Has a "not" before the "it" on the final line. """ # Lengths of the various versions of the rhyme REGULAR_LENGTH = 30 NOT_LENGTH = 31 SHORT_LENGTH = 16 """ Performs the selection on the given list with the given rhyme length. :param items list to select from. :param rhyme_length Number of words in version of rhyme. :return selected item from given items. """ def pick(items, rhyme_length): if items is None or rhyme_length is None or len(items) == 0: return None else: num_items = len(items) if num_items >= rhyme_length: return items[rhyme_length - 1] elif rhyme_length % num_items == 0: return items[-1] else: index = rhyme_length % num_items return items[index - 1] """ Calls the pick method with the short rhyme length. :param items items to select from. :return selected item. """ def short_moe(items): global SHORT_LENGTH return pick(items, SHORT_LENGTH) """ Calls the pick method with the regular rhyme length. :param items items to select from. :return selected item. """ def moe(items): global REGULAR_LENGTH return pick(items, REGULAR_LENGTH) """ Calls the pick method with the "not" rhyme length. :param items items to select from. :return selected item. """ def not_moe(items): global NOT_LENGTH return pick(items, NOT_LENGTH)
# -*- coding: utf-8 -*- """ Created on Tue Jun 4 16:01:51 2019 @author: Administrator """ class Solution: def sortArray(self, nums: list) -> list: # return self.heap_sort(nums) self.heap_sort(nums) return nums # def adjust_heap(self, nums, size, k): # lchild = 2*k+1 # rchild = 2*k+2 # Max = k # if k < size // 2: # while lchild < size: # if lchild < size and nums[lchild] > nums[Max]: # Max = lchild # if rchild < size and nums[rchild] > nums[Max]: # Max = rchild # if Max != k: # nums[Max], nums[k] = nums[k], nums[Max] # self.adjust_heap(nums, size, Max) ## else: ## break ## k = Max ## lchild = 2*k+1 ## rchild = 2*k+2 # # def build_heap(self, nums, size): # for k in range(size//2)[::-1]: # self.adjust_heap(nums, size, k) # # def heap_sort(self, nums): # size = len(nums) # self.build_heap(nums, size) # for k in range(size)[::-1]: # nums[0], nums[k] = nums[k], nums[0] # self.adjust_heap(nums, k, 0) # return nums def adjust_heap(self, nums, size, k): lchild = 2*k + 1 rchild = 2*k + 2 Max = k if k < size//2: while lchild < size and nums[lchild] > nums[Max]: Max = lchild while rchild < size and nums[rchild] > nums[Max]: Max = rchild if Max != k: nums[k], nums[Max] = nums[Max], nums[k] self.adjust_heap(nums, size, Max) def build_heap(self, nums, size): for k in range(size//2)[::-1]: self.adjust_heap(nums, size, k) def heap_sort(self, nums): size = len(nums) self.build_heap(nums, size) for k in range(size)[::-1]: nums[0], nums[k] = nums[k], nums[0] self.adjust_heap(nums, k, 0) # int[] a = new int[]{1,23,234,234,22,1,-1,0,3}; # for (int i = a.length/2 -1; i >= 0; i--) { // 构建堆,因为a.length/2后面的数据都不会有左右节点了 # buildHeap(a, i, a.length); # } # System.out.println("开始排序前,构建的大根堆:"); # for (int i : a) { # System.out.print(i + " "); # } # # System.out.println(); # # // 开始不断的交换,移除,构建堆 # for (int i = a.length - 1; i >=0; i--) { # swap(a, 0, i); // 每次都把堆中第一个数和最后一个数交换 # buildHeap(a, 0, i); // 第二个参数是i,就相当于是把i(最后一个数)移除堆,剩下的重新构建堆 # System.out.println("第" + (a.length - i) + "次排序后的数组:"); # for (int j : a) { # System.out.print(j + " "); # } # System.out.println(); # } # # # public class HeapSort { # public static void buildHeap(int[] a, int i, int n) { # int leftChild = i * 2 + 1; # int rightChild = i * 2 + 2; # int largest = i; # /** # * 循环找出父节点和左右节点中最大的值, # * 并将最大值节点交换为父节点 # */ # while (leftChild < n) { # if (a[leftChild] > a[i]) { # largest = leftChild; # } # if (rightChild < n && a[rightChild] > a[largest]) { # largest = rightChild; # } # if (largest != i) { # swap(a, largest, i); # } else { # break; # } # # i = largest; # leftChild = i * 2 + 1; # rightChild = i * 2 + 2; # } # # } # # public static void swap(int[] a, int i, int j) { # int tmp = a[i]; # a[i] = a[j]; # a[j] = tmp; # } # # public static void main(String[] args) { # int[] a = new int[]{1,23,234,234,22,1,-1,0,3}; # for (int i = a.length/2 -1; i >= 0; i--) { // 构建堆,因为a.length/2后面的数据都不会有左右节点了 # buildHeap(a, i, a.length); # } # System.out.println("开始排序前,构建的大根堆:"); # for (int i : a) { # System.out.print(i + " "); # } # # System.out.println(); # # // 开始不断的交换,移除,构建堆 # for (int i = a.length - 1; i >=0; i--) { # swap(a, 0, i); // 每次都把堆中第一个数和最后一个数交换 # buildHeap(a, 0, i); // 第二个参数是i,就相当于是把i(最后一个数)移除堆,剩下的重新构建堆 # System.out.println("第" + (a.length - i) + "次排序后的数组:"); # for (int j : a) { # System.out.print(j + " "); # } # System.out.println(); # } # # } # } solu = Solution() nums = [3,7,6,4,1,9] print(solu.sortArray(nums))
def cpu_processing_time(cycles: int, freq: float): """ :param cycles :param freq: MHz :return: seconds """ return (cycles / (freq * pow(10, 6))) * pow(10, 3) if __name__ == "__main__": print(cpu_processing_time(1.05149 * pow(10, 6), 1300))
""" 21.25% """ class Solution(object): def firstMissingPositive(self, nums): """ :type nums: List[int] :rtype: int """ if not nums: return 1 nums = sorted(list(set(nums))) n = 0 for index, num in enumerate(nums): if num <= 0: n += 1 continue if index+1-n != num: return index+1-n return nums[-1]+1
class Solution(object): def exclusiveTime(self, n, logs): """ :type n: int :type logs: List[str] :rtype: List[int] """ stack = [] overhead = [0] res = [0 for i in range(n)] for log_str in logs: log = log_str.split(':') if log[1] == 'start': overhead.append(0) stack.append(log) else: start_log = stack.pop() topped = overhead.pop() duration = int(log[2]) - int(start_log[2]) - topped + 1 overhead[-1] += duration + topped res[int(log[0])] += duration return res z = Solution() n = 4 logs = ["0:start:0","1:start:2", "2:start:3", "2:end:4", "1:end:5","3:start:7", "3:end:9", "0:end:12"] # n = 1 # logs = ["0:start:0","0:start:2","0:end:5","0:start:6","0:end:6","0:end:7"] # n = 1 # logs = ["0:start:0","0:start:1","0:start:2","0:end:3","0:end:4","0:end:5"] res = z.exclusiveTime(n, logs) print(res)
#!/usr/bin/env python # encoding: utf-8 """ remove_dups_from_sorted_list_ii.py Created by Shengwei on 2014-07-05. """ # https://oj.leetcode.com/problems/remove-duplicates-from-sorted-list-ii/ # tags: medium, linked-list, pointer, dups, edge cases """ Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list. For example, Given 1->2->3->3->4->4->5, return 1->2->5. Given 1->1->1->2->3, return 2->3. """ # TODO: other solutions # 1. use counter to distinguish the situation where current value is not the same as the next # if counter is 0, current node is unique; otherwise, start from the next node # changejian's code and https://oj.leetcode.com/discuss/5743/how-can-i-improve-my-code) # 2. use two pointers, move prior one when necessary # https://github.com/MaskRay/LeetCode/blob/master/remove-duplicates-from-sorted-list-ii.cc # Definition for singly-linked list. # class ListNode: # def __init__(self, x): # self.val = x # self.next = None class Solution: # @param head, a ListNode # @return a ListNode def deleteDuplicates(self, head): if head is None: return head pre = dummy_head = ListNode(0) dummy_head.next = head walker, runner = head, head.next while walker and walker.next: if walker.val != walker.next.val: pre.next = walker pre = walker walker = walker.next else: # look for next unique node or None runner = walker.next while runner.next and runner.next.val == walker.val: runner = runner.next # runner.next can be either None or a node with different value walker = runner.next # walker is either None (last node is also a dup) or last unique node pre.next = walker return dummy_head.next
"""This question was asked by BufferBox. Given a binary tree where all nodes are either 0 or 1, prune the tree so that subtrees containing all 0s are removed. For example, given the following tree: 0 / \ 1 0 / \ 1 0 / \ 0 0 should be pruned to: 0 / \ 1 0 / 1 We do not remove the tree at the root or its left child because it still has a 1 as a descendant. """
NO_RESET = 0b0 BATCH_RESET = 0b1 EPOCH_RESET = 0b10 NONE_METER = 'none' SCALAR_METER = 'scalar' TEXT_METER = 'text' IMAGE_METER = 'image' HIST_METER = 'hist' GRAPH_METER = 'graph' AUDIO_METER = 'audio'
""" 2) Reverse a given integer number """ num = int(input("Digite um número inteiro: ")) texto = str(num) num = texto[::-1] print(int(num))
''' Crie um programa que tenha uma tupla com várias palavras (não usar acentos). Depois disso, você deve mostrar, para cada palavra, quais são as suas vogais. ''' palavras = (('aprender','programar','linguagem','python', 'curso','gratis','estudar','praticar', 'trabalhar','mercado','programador','futuro')) for p in palavras: print(f'\nNa palvra {p.upper()} temos: ', end='') for letra in p: #Cada palavra já é uma lista de letras if letra.lower() in 'aeiou': # Se a lestra estiver no conjunto de vogais print(letra, end=' ')
lower=100 upper=999 for num in range(lower,upper+1): order=len(str(num)) sum=0 temp=num while temp>0: digit=temp%10 sum+=digit**order temp//=10 if num==sum: print(num)
def is_interesting(number, awesome_phrases): if number<98: return 0 elif check(number, awesome_phrases) and number>=100: return 2 for i in range(number+1, number+3): if i>=100 and check(i, awesome_phrases): return 1 return 0 def check(n, awesome_phrases): return equal(n) or all_zero(n) or increase(n) or decrease(n) or palindrome(n) or awesome(n, awesome_phrases) def equal(n): return True if len(set(str(n)))==1 else False def all_zero(n): res=str(n) return True if int(res[1:])==0 else False def increase(n): res=str(n) for i in range(len(res)-1): if not ((int(res[i+1])-int(res[i]))==1 or ((int(res[i+1])==0 and int(res[i]))==9)): return False return True def decrease(n): res=str(n) for i in range(len(res)-1): if not (int(res[i])-int(res[i+1]))==1: return False return True def palindrome(n): return str(n)==str(n)[::-1] def awesome(n, awesome_phrases): if not awesome_phrases: return False return n in awesome_phrases
with open('input', 'r') as expense_report: expenses = [ int(a.strip()) for a in expense_report.readlines() ] expenses = sorted(expenses) def part1(): for a in expenses: for b in expenses: if a + b == 2020: print(f"{a} + {b} = 2020, {a} * {b} = {a * b}") return(a * b) def part2(): for a in expenses: for b in expenses: for c in expenses: if a + b + c == 2020: print(f"{a} + {b} + {c} = 2020, {a} * {b} * {c} = {a * b * c}") return(a * b * c) part1() part2()
"""Migration for a given Submitty course database.""" def up(config, database, semester, course): """ Run up migration. :param config: Object holding configuration details about Submitty :type config: migrator.config.Config :param database: Object for interacting with given database for environment :type database: migrator.db.Database :param semester: Semester of the course being migrated :type semester: str :param course: Code of course being migrated :type course: str """ database.execute("ALTER TABLE queue_settings ADD IF NOT EXISTS token TEXT NOT null DEFAULT 'temp_token'"); database.execute("Update queue_settings SET token = code Where token = 'temp_token';"); def down(config, database, semester, course): """ Run down migration (rollback). :param config: Object holding configuration details about Submitty :type config: migrator.config.Config :param database: Object for interacting with given database for environment :type database: migrator.db.Database :param semester: Semester of the course being migrated :type semester: str :param course: Code of course being migrated :type course: str """ database.execute("ALTER TABLE queue_settings DROP COLUMN IF EXISTS token;");
## # \file exceptions.py # \brief User-specific exceptions # # \author Michael Ebner (michael.ebner.14@ucl.ac.uk) # \date June 2017 # ## # Error handling in case the directory does not contain valid nifti file # \date 2017-06-14 11:11:37+0100 # class InputFilesNotValid(Exception): ## # \date 2017-06-14 11:12:55+0100 # # \param self The object # \param directory Path to empty folder, string # def __init__(self, directory): self.directory = directory def __str__(self): error = "Folder '%s' does not contain valid nifti files." % ( self.directory) return error ## # Error handling in case of an attempted object access which is not being # created yet # \date 2017-06-14 11:20:33+0100 # class ObjectNotCreated(Exception): ## # Store name of function which shall be executed to create desired object. # \date 2017-06-14 11:20:52+0100 # # \param self The object # \param function_call function call missing to create the object # def __init__(self, function_call): self.function_call = function_call def __str__(self): error = "Object has not been created yet. Run '%s' first." % ( self.function_call) return error ## # Error handling in case specified file does not exist # class FileNotExistent(Exception): ## # Store information on the missing file # \date 2017-06-29 12:49:18+0100 # # \param self The object # \param missing_file string of missing file # def __init__(self, missing_file): self.missing_file = missing_file def __str__(self): error = "File '%s' does not exist" % (self.missing_file) return error ## # Error handling in case specified directory does not exist # \date 2017-07-11 17:02:12+0100 # class DirectoryNotExistent(Exception): ## # Store information on the missing directory # \date 2017-07-11 17:02:46+0100 # # \param self The object # \param missing_directory string of missing directory # def __init__(self, missing_directory): self.missing_directory = missing_directory def __str__(self): error = "Directory '%s' does not exist" % (self.missing_directory) return error ## # Error handling in case multiple filenames exist # (e.g. same filename but two different extensions) # \date 2017-06-29 14:09:27+0100 # class FilenameAmbiguous(Exception): ## # Store information on the ambiguous file # \date 2017-06-29 14:10:34+0100 # # \param self The object # \param ambiguous_filename string of ambiguous file # def __init__(self, ambiguous_filename): self.ambiguous_filename = ambiguous_filename def __str__(self): error = "Filename '%s' ambiguous" % (self.ambiguous_filename) return error ## # Error handling in case IO is not correct # \date 2017-07-11 20:21:19+0100 # class IOError(Exception): ## # Store information on the IO error # \date 2017-07-11 20:21:38+0100 # # \param self The object # \param error The error # def __init__(self, error): self.error = error def __str__(self): return self.error
# Testing with open("stuck_in_a_rut.in") as file1: N = int(file1.readline().strip()) cows = [[value if index == 0 else int(value) for index, value in enumerate(i.strip().split())] for i in file1.readlines()] # Actual # N = int(input()) # cow_numbers = [input() for _ in range(N)] # cows = [[value if index == 0 else int(value) for index, value in enumerate(i.strip().split())] for i in cow_numbers] future_path = {} max_x, max_y = max(cows, key=lambda x: x[1])[1], max(cows, key=lambda x: x[2])[2] for i in range(1, N+1): tmp_lst = [[1, cows[i-1][1], cows[i-1][2]]] if cows[i-1][0] == "E": tmp_1 = 2 for x in range(cows[i-1][1]+1, max_x+1): tmp_lst.append([tmp_1, x, cows[i-1][2]]) tmp_1 += 1 elif cows[i-1][0] == "N": tmp_1 = 2 for x in range(cows[i-1][2]+1, max_x+1): tmp_lst.append([tmp_1, cows[i-1][1], x]) tmp_1 += 1 future_path[i] = tmp_lst future_path_list = [x for key, value in future_path.items() for x in value] for key, value in future_path.items(): print(key, ": ", value, sep="") finish = {i: None for i in range(1, N+1)} for key, value in future_path.items(): x = True number_eaten = 0 for i in value: for y in future_path_list: if i[1:] == y[1:]: if i[0] > y[0]: n = True for g in future_path_list: if y[1:] == g[1:]: if y == [5, 11, 6]: print("**********************************") print(y, g) print("**********************************") if y[0] > g[0]: n = False print(i, y, key) if n: x = False if x: number_eaten += 1 finish[key] = [number_eaten, x] print(finish)
__all__ = [ 'DataFSError', 'UnsupportedOperation', 'InvalidOpenMode', 'DataFileNotExist', 'MetaKeyNotExist', ] class DataFSError(Exception): """Base class for all :class:`DataFS` errors.""" class UnsupportedOperation(DataFSError): """ Class to indicate that a requested operation is not supported by the specific :class:`DataFS` subclass. """ class InvalidOpenMode(UnsupportedOperation): """ Class to indicate that the specified open mode is not supported. """ def __init__(self, mode): super(InvalidOpenMode, self).__init__(mode) @property def mode(self): return self.args[0] def __str__(self): return 'Invalid open mode: {!r}'.format(self.mode) class DataFileNotExist(DataFSError): """Class to indicate a requested data file does not exist.""" def __init__(self, filename): super(DataFileNotExist, self).__init__(filename) @property def filename(self): return self.args[0] def __str__(self): return 'Data file not exist: {!r}'.format(self.filename) class MetaKeyNotExist(DataFSError): """Class to indicate a requested meta key does not exist.""" def __init__(self, filename, meta_key): super(MetaKeyNotExist, self).__init__(filename, meta_key) @property def filename(self): return self.args[0] @property def meta_key(self): return self.args[1] def __str__(self): return 'In file {!r}: meta key not exist: {!r}'. \ format(self.filename, self.meta_key)
''' Este programa lê o número de dias, horas, minutos e segundos. Calcula a quantidade de segundos que existem nesse intervalo. ''' print("Este programa lê a quantidade de dias, horas, minutos e segundos e informa quantos segundos existem neles") dias = int(input("Informe o número de dias: ")) horas = int(input("Informe o número de horas: ")) minutos = int(input("Informe o número de minutos: ")) segundos = int(input("Informe o número de segundos: ")) qtdSegundosDia = dias * 24 * 60 * 60 qtdSegundosHora = horas * 60 * 60 qtdSegundosMinuto = minutos * 60 totalSegundos= qtdSegundosDia + qtdSegundosHora + qtdSegundosMinuto + segundos print("Existem ", totalSegundos, "s em ", str(dias), "dias ", str(horas), "horas ", str(minutos), "minutos ", str(segundos), "segundos") ''' Este programa soma os números pares. A entrada define o limite. ''' print("Este programa soma os números pares.") print("O número informado define o limite da soma.") print("*"*48) limite = int(input("Informe um número: ")) contador = 2 soma = 0 while contador <= limite: print(contador) contador = contador + 2 soma = soma + contador-2 print("A soma é: ", str(soma)) ''' Programa responsavel por calcular o valor do aluguel de um carro ''' tipoDeCarro = input("Qual a categoria do carro que você alugou? (E para Economico, S para Esportivo, F para Família): " ) dias = int(input("Quantos dias você utilizou o veiculo? " )) km = float(input("Quantos quilometros você rodou com o carro? ")) if tipoDeCarro[0] in "ESF": if tipoDeCarro == "E": valor = 60.0*dias + km*0.15 elif tipoDeCarro == "S": valor = 100.0*dias + km*0.20 elif tipoDeCarro == "F": valor = 70.0*dias + km*0.18 print("Valor a pagar: ", str(valor), "reais") else: print("Categoria não cadastrada!") ''' Função responsável por validar o tipo de dado em uma variável Necessário informar a varíavel e o tipo de dado que se quer testar (int, float, str...) Retorna 1 caso corresponda ao tipo informado ou 0 em caso negativo ''' def tipoDeDado(variavel, tipoDesejado): tipoVariavel = type(variavel) if tipoVariavel == tipoDesejado: return 1 else: return 0 ''' Este programa divide dois números, porém, utiliza somente soma e subtração. Este programa considera dividendo >= divisor ''' dividendo = int(input("Digite o primeiro número - dividendo: ")) divisor = int(input("Digite o segundo número - divisor: ")) var = 0 quociente = 0 while (var < dividendo) and (dividendo-var >= divisor): var = var + divisor quociente = quociente + 1 if var == dividendo: print("A divisão é inteira. Resultado: ", str(quociente)) else: print("A divisão não é inteira. Resultado: ", str(quociente), " e o resto é: ", str(dividendo-var))
# Time: O(max(h, k)) # Space: O(h) # 230 # Given a binary search tree, write a function kthSmallest to find the kth smallest element in it. # # Note: # You may assume k is always valid, 1 <= k <= BST's total elements. # # Follow up: # What if the BST is modified (insert/delete operations) often and # you need to find the kth smallest frequently? How would you optimize the kthSmallest routine? # # Definition for a binary tree node. class TreeNode: def __init__(self, x): self.val = x self.left = None self.right = None class Solution: # @param {TreeNode} root # @param {integer} k # @return {integer} def kthSmallest(self, root, k): # USE THIS, inOrder_clean stack = [(root, False)] while stack: cur, visited = stack.pop() if cur: if visited: k -= 1 if k == 0: return cur.val else: stack.append((cur.right, False)) stack.append((cur, True)) stack.append((cur.left, False)) def kthSmallest_recur_woGlobalVar(self, root, k): # pass k and node as param def dfs(node, k): if node is None: return None, k # left subtree retVal, k = dfs(node.left, k) if retVal is not None: return retVal, k # process one node, decrement k if k == 1: return node.val, 0 k -= 1 # right subtree retVal, k = dfs(node.right, k) if retVal is not None: return retVal, k return None, k return dfs(root, k)[0] def kthSmallest_recur(self, root, k): self.ans = -1 self.k = k def inorder(root): if not root: return inorder(root.left) self.k -= 1 if self.k == 0: self.ans = root.val inorder(root.right) inorder(root) return self.ans def kthSmallest3(self, root, k): def pushLeft(node): while node: stack.append(node) node = node.left stack = [] pushLeft(root) while stack and k > 0: node = stack.pop() k -= 1 pushLeft(node.right) return node.val def kthSmallest4(self, root, k): s, cur, rank = [], root, 0 while s or cur: if cur: s.append(cur) cur = cur.left else: cur = s.pop() rank += 1 if rank == k: return cur.val cur = cur.right return float("-inf") root = TreeNode(3) root.left, root.right = TreeNode(1), TreeNode(4) root.left.right = TreeNode(2) print(Solution().kthSmallest(root, 1))
height = int(input("Height: ")) width = int(input("Width: ")) for i in range(height): for j in range(width): print("* ",end='') print()
shader_assignment = [] for shadingEngine in renderPartition.inputs(): if not shadingEngine.members(): continue if shadingEngine.name() == 'initialShadingGroup': continue nameSE = shadingEngine.name() nameSH = shadingEngine.surfaceShader.inputs()[0].name() shader_assignment.append([nameSE, nameSH, shadingEngine.listHistory(pruneDagObjects=True), shadingEngine.asSelectionSet().getSelectionStrings()]) if not shading_network_dir.exists(): shading_network_dir.makedirs() for nameSG, nameSH, shading_network, objects in shader_assignment: pm.select(deselect=True) pm.select(shading_network, noExpand=True) shading_network_path = shading_network_dir / nameSG + '.ma' pm.exportSelected(shading_network_path) for mesh in pm.ls(type='mesh'): pm.select(mesh, replace=True) pm.hyperShade(assign='lambert1') for shadingEngine in renderPartition.inputs(): if shadingEngine.name() in ('initialShadingGroup', 'initialParticleSE'): continue if not shadingEngine.members(): shading_network = shadingEngine.listHistory(pruneDagObjects=True) pm.select(shading_network, noExpand=True, replace=True) pm.delete() for snfile in shading_network_dir.listdir(): nodes = pm.importFile(snfile) newNodes.append((snfile.namebase, nodes)) for nameSG, nameSH, shading_network, objects in shader_assignment: for object in objects: pm.select(object, replace=True) pm.hyperShade(assign=nameSH)
# Python - 2.7.6 Test.assert_equals(calculate_tip(30, 'poor'), 2) Test.assert_equals(calculate_tip(20, 'Excellent'), 4) Test.assert_equals(calculate_tip(20, 'hi'), 'Rating not recognised') Test.assert_equals(calculate_tip(107.65, 'GReat'), 17) Test.assert_equals(calculate_tip(20, 'great!'), 'Rating not recognised')
class CNmoney: cdict = {} gdict = {} xdict = {} def __init__(self): self.cdict = {1: u'', 2: u'拾', 3: u'佰', 4: u'仟'} self.xdict = {1: u'元', 2: u'万', 3: u'亿', 4: u'兆'} # 数字标识符 self.gdict = {0: u'零', 1: u'壹', 2: u'贰', 3: u'叁', 4: u'肆', 5: u'伍', 6: u'陆', 7: u'柒', 8: u'捌', 9: u'玖'} def csplit(self, cdata): # 拆分函数,将整数字符串拆分成[亿,万,仟]的list g = len(cdata) % 4 csdata = [] lx = len(cdata) - 1 if g > 0: csdata.append(cdata[0:g]) k = g while k <= lx: csdata.append(cdata[k:k + 4]) k += 4 return csdata def cschange(self, cki): # 对[亿,万,仟]的list中每个字符串分组进行大写化再合并 lenki = len(cki) i = 0 lk = lenki chk = u'' for i in range(lenki): if int(cki[i]) == 0: if i < lenki - 1: if int(cki[i + 1]) != 0: chk = chk + self.gdict[int(cki[i])] else: chk = chk + self.gdict[int(cki[i])] + self.cdict[lk] lk -= 1 return chk def cwchange(self, data): if str(data).lstrip('0') == '': return '零' cdata = str(data).split('.') cki = cdata[0] if len(cdata) == 1: i = 0 chk = u'' # 分解字符数组[亿,万,仟]三组List:['0000','0000','0000'] cski = self.csplit(cki) ikl = len(cski) # 获取拆分后的List长度 # 大写合并 for i in range(ikl): if self.cschange(cski[i]) == '': # 有可能一个字符串全是0的情况 chk = chk + self.cschange(cski[i]) + self.xdict[ikl - i] # 此时不需要将数字标识符引入 else: # 合并:前字符串大写+当前字符串大写+标识符 chk = chk + self.cschange(cski[i]) + self.xdict[ikl - i] chk = chk + u'整' else: i = 0 chk = u'' # 分解字符数组[亿,万,仟]三组List:['0000','0000','0000'] cski = self.csplit(cki) ikl = len(cski) # 获取拆分后的List长度 # 大写合并 for i in range(ikl): if self.cschange(cski[i]) == '': # 有可能一个字符串全是0的情况 chk = chk + self.cschange(cski[i]) # 此时不需要将数字标识符引入 else: # 合并:前字符串大写+当前字符串大写+标识符 chk = chk + self.cschange(cski[i]) + self.xdict[ikl - i] # 处理小数部分 ckj = cdata[1] lenkj = len(ckj) if lenkj == 1: # 若小数只有1位 if int(ckj[0]) == 0: chk = chk + u'元整' else: chk = chk + self.gdict[int(ckj[0])] + u'角整' else: # 若小数有两位的四种情况 if int(ckj[0]) == 0 and int(ckj[1]) != 0: chk = chk + u'零' + self.gdict[int(ckj[1])] + u'分' elif int(ckj[0]) == 0 and int(ckj[1]) == 0: chk = chk + u'元整' elif int(ckj[0]) != 0 and int(ckj[1]) != 0: chk = chk + self.gdict[int(ckj[0])] + \ u'角' + self.gdict[int(ckj[1])] + u'分' else: chk = chk + self.gdict[int(ckj[0])] + u'角整' return chk if __name__ == '__main__': pt = CNmoney() print(pt.cwchange('18000')) print(pt.cwchange('30000.0')) print(pt.cwchange('30000.00')) print(pt.cwchange(19990))
# -*- coding: utf-8 -*- ################################################################################# # Author : Webkul Software Pvt. Ltd. (<https://webkul.com/>) # Copyright(c): 2015-Present Webkul Software Pvt. Ltd. # All Rights Reserved. # # # # This program is copyright property of the author mentioned above. # You can`t redistribute it and/or modify it. # # # You should have received a copy of the License along with this program. # If not, see <https://store.webkul.com/license.html/> ################################################################################# { "name" : "Website Webkul Addons", "summary" : "Manage Webkul Website Addons", "category" : "Website", "version" : "2.0.1", "author" : "Webkul Software Pvt. Ltd.", "website" : "https://store.webkul.com/Odoo.html", "description" : "Website Webkul Addons", "live_test_url" : "http://odoodemo.webkul.com/?module=website_webkul_addons&version=12.0", "depends" : [ 'website', ], "data" : [ 'wizard/wk_website_wizard_view.xml', 'views/webkul_addons_config_view.xml', ], "images" : ['static/description/Banner.png'], "application" : True, "installable" : True, "auto_install" : False, }
# Aula passada: '''for c in range(1, 10): print(c) print('Fim')''' # Nessa aula: # Sei o limite, pode usar ambos, dá no mesmo c = 1 while c < 10: print(c) c = c + 1 # ie c+= 1 print('Fim') # Não sei o limite: somente while n = 1 while n != 0: n = int(input('Digite um valor: ')) print('Fim') r = 'S' while r == 'S': n = int(input('Digite um valor: ')) r = str(input('Quer continuar [S/N]?')).upper() print('Fim') n = 1 par = impar = 0 while n != 0: n = int(input('Digite um valor: ')) if n != 0: if n % 2 == 0: par += 1 else: impar += 1 print('Você digitou {} par(es) e {} ímpar(es)'.format(par, impar))
#------------------------------------------------------------------------------ # simple_universe/room.py # Copyright 2011 Joseph Schilz # Licensed under Apache v2 #------------------------------------------------------------------------------ class SimpleRoom(object): ID = [-1, -1] exits = [] description = "" def __init__(self, ID=[-1, -1], exits=False, description=False, contents=False): self.ID = ID self.exits = exits self.description = description self.THIS_WORLD = False self.contents = [] if contents: for content in contents: content.move_to(self, self.contents) def resolve_exit(self, the_exit): if type(the_exit[1]) == type([]): return self.THIS_WORLD.zones[the_exit[1][0]][the_exit[1][1]] else: return self.THIS_WORLD.zones[self.ID[0]][the_exit[1]] def zone(self): return self.THIS_WORLD.zones[self.ID[0]] def set_world(self, world): self.THIS_WORLD = world
# Time: O(n) # Space: O(1) # 751 # Given a start IP address ip and a number of ips we need to cover n, # return a representation of the range as a list (of smallest possible length) of CIDR blocks. # # A CIDR block is a string consisting of an IP, followed by a slash, # and then the prefix length. For example: "123.45.67.89/20". # That prefix length "20" represents the number of common prefix bits in the specified range. # # IP: 32 bits, CIDR: classless inter-domain routing # Example 1: # Input: ip = "255.0.0.7", n = 10 # Output: ["255.0.0.7/32","255.0.0.8/29","255.0.0.16/32"] # Explanation: # The initial ip address, when converted to binary, looks like this (spaces added for clarity): # 255.0.0.7 -> 11111111 00000000 00000000 00000111 # The address "255.0.0.7/32" specifies all addresses with a common prefix of 32 bits to the given address, # ie. just this one address. # # The address "255.0.0.8/29" specifies all addresses with a common prefix of 29 bits to the given address: # 255.0.0.8 -> 11111111 00000000 00000000 00001000 # Addresses with common prefix of 29 bits are: # 11111111 00000000 00000000 00001000 # 11111111 00000000 00000000 00001001 # 11111111 00000000 00000000 00001010 # 11111111 00000000 00000000 00001011 # 11111111 00000000 00000000 00001100 # 11111111 00000000 00000000 00001101 # 11111111 00000000 00000000 00001110 # 11111111 00000000 00000000 00001111 # # The address "255.0.0.16/32" specifies all addresses with a common prefix of 32 bits to the given address, # ie. just 11111111 00000000 00000000 00010000. # # In total, the answer specifies the range of 10 ips starting with the address 255.0.0.7 . # # There were other representations, such as: # ["255.0.0.7/32","255.0.0.8/30", "255.0.0.12/30", "255.0.0.16/32"], # but our answer was the shortest possible. # # Also note that a representation beginning with say, "255.0.0.7/30" would be incorrect, # because it includes addresses like 255.0.0.4 = 11111111 00000000 00000000 00000100 # that are outside the specified range. # Note: # - ip will be a valid IPv4 address. # - Every implied address ip + x (for x < n) will be a valid IPv4 address. # - n will be an integer in the range [1, 1000]. class Solution(object): def ipToCIDR(self, ip, n): """ :type ip: str :type n: int :rtype: List[str] """ def ip2int(ip): result = 0 for i in ip.split('.'): result = 256 * result + int(i) return result def int2ip(n): ans = [] for _ in range(4): n, rem = divmod(n, 256) ans.append(str(rem)) return '.'.join(ans[::-1]) #return ".".join(str((n >> i) % 256) for i in (24, 16, 8, 0)) start = ip2int(ip) result = [] while n: rightOne = start & (-start) flexibleBits = min(rightOne.bit_length(), n.bit_length()) - 1 mask = 32 - flexibleBits result.append(int2ip(start) + '/' + str(mask)) start += 1 << flexibleBits n -= 1 << flexibleBits return result print(Solution().ipToCIDR("0.0.0.8", 2)) # ["0.0.0.8/31"] print(Solution().ipToCIDR("0.0.0.8", 3)) # ["0.0.0.8/31","0.0.0.10/32"] print(Solution().ipToCIDR("0.0.0.9", 2)) # ["0.0.0.9/32","0.0.0.10/32"] print(Solution().ipToCIDR("0.0.0.9", 3)) # ["0.0.0.9/32","0.0.0.10/31"] print(Solution().ipToCIDR("0.0.0.7", 10)) # ["0.0.0.7/32","0.0.0.8/29","0.0.0.16/32"] print(Solution().ipToCIDR("0.0.0.6", 10)) # ["0.0.0.6/31","0.0.0.8/29""]
print('====== EX 015 ======') dias = int(input('Quantos dias o carro foi alugado: ')) km = float(input('E quantos Km foram percorridos: ')) p = (dias * 60) + (km * 0.15) print('O total a pagar é de R${:.2f}'.format(p))
def example_bytes_slice(): word = b'the lazy brown dog jumped' for i in range(10): # Memoryview slicing is 10x faster than bytes slicing if word[0:i] == 'the': return True def example_bytes_slice_as_arg(word: bytes): for i in range(10): # Memoryview slicing is 10x faster than bytes slicing if word[0:i] == 'the': return True
prve_stiri = [2, 3, 5, 7] def je_prastevilo(n): i = 2 while i * i <= n: if n % i == 0: return False i += 1 return n > 1 def trunctable_z_desne(n): for indeks in range(1, len(str(n))): if not je_prastevilo(int(str(n)[0:indeks])): return False return n > 10 def trunctable_z_leve(n): for indeks in range(len(str(n))): if not je_prastevilo(int(str(n)[indeks:])): return False return n > 10 seznam = list() vsota = 0 for stevilo in range(1, 10 ** 6): if trunctable_z_desne(stevilo) and trunctable_z_leve(stevilo): vsota += stevilo seznam.append(stevilo)
low=1 high=2 third=0 sum=0 temp=0 while(third<4000000): third=low+high if(third%2==0): sum+=third low=high high=third print(sum+2)
#Skill: array iteration #You are given an array of integers. Return the smallest positive integer that is not present in the array. The array may contain duplicate entries. #For example, the input [3, 4, -1, 1] should return 2 because it is the smallest positive integer that doesn't exist in the array. #Your solution should run in linear time and use constant space. #Here's your starting point: class Solution: #Cost: O(N), Space(1) def first_missing_positive(self, nums): #First pass to find +ve boundaries low = (1<<31) - 1 high = 0 for i in nums: if low > i and i>0: low = i if high < i: high = i # K pass to find first missing positive firstMiss = low + 1 searchmiss = firstMiss found = False kill = False l = len(nums) inx = 0 while (not kill) and (not found) : if nums[inx] < low or nums[inx] > high: inx += 1 continue if nums[inx] == searchmiss: searchmiss = searchmiss + 1 inx += 1 if inx < l: continue else: inx = 0 if searchmiss == firstMiss: found = True else: firstMiss = searchmiss if firstMiss > high or firstMiss < low: return None else: return firstMiss def first_missing_positive(nums): solu = Solution() return solu.first_missing_positive(nums) if __name__ == "__main__": print(first_missing_positive([8, 7, 2, 3, 4, 5, -1, 10, 6, 1])) print(first_missing_positive([7, 2, 3, 4, 5, -1, 10, 6, 1])) print(first_missing_positive([7, 2, 3, 4, 5, -1, 1])) print (first_missing_positive([3, 4, -1, 1])) # 2
class Solution: def maxProfit(self, inventory: List[int], orders: int) -> int: # [5, 5, 2] inventory.sort(reverse=True) inventory.append(0) ans = 0 idx = 0 n = len(inventory) while orders: # find the first index such that inv[j] < inv[i] lo, hi = idx + 1, n - 1 while lo < hi: mid = (lo + hi) // 2 if inventory[mid] == inventory[idx]: lo = mid + 1 else: hi = mid if lo >= n: break mult = lo if mult * (inventory[idx] - inventory[lo]) >= orders: # from inventory[idx] to inventory[lo] q, r = divmod(orders, mult) ans += mult * (inventory[idx] + inventory[idx] - q + 1) * q // 2 ans += r * (inventory[idx] - q) orders = 0 else: orders -= mult * (inventory[idx] - inventory[lo]) ans += mult * (inventory[idx] + inventory[lo] + 1) * (inventory[idx] - inventory[lo]) // 2 idx = lo ans %= 1_000_000_007 return ans
# Copyright (c) 2014 Mirantis Inc. # Copyright (c) 2016 Codethink Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or # implied. # See the License for the specific language governing permissions and # limitations under the License. """ This module defines types for comment entries. """ STORY_CREATED = "story_created" STORY_DETAILS_CHANGED = "story_details_changed" TAGS_ADDED = "tags_added" TAGS_DELETED = "tags_deleted" USER_COMMENT = "user_comment" TASK_CREATED = "task_created" TASK_DETAILS_CHANGED = "task_details_changed" TASK_STATUS_CHANGED = "task_status_changed" TASK_PRIORITY_CHANGED = "task_priority_changed" TASK_ASSIGNEE_CHANGED = "task_assignee_changed" TASK_DELETED = "task_deleted" WORKLIST_CREATED = "worklist_created" # WORKLIST_DETAILS_CHANGED should occur when a value in any of the fields # in the `worklists` database table is changed. Changes in related tables # such as worklist_permissions, worklist_filters, and worklist_items have # their own event types. WORKLIST_DETAILS_CHANGED = "worklist_details_changed" WORKLIST_PERMISSION_CREATED = "worklist_permission_created" WORKLIST_PERMISSIONS_CHANGED = "worklist_permissions_changed" WORKLIST_FILTERS_CHANGED = "worklist_filters_changed" WORKLIST_CONTENTS_CHANGED = "worklist_contents_changed" BOARD_CREATED = "board_created" # BOARD_DETAILS_CHANGED should occur when a value in any of the fields # in the `boards` database table is changed. Changes in related tables # such as board_permissions, and board_worklists have their own event # types. BOARD_DETAILS_CHANGED = "board_details_changed" BOARD_PERMISSION_CREATED = "board_permission_created" BOARD_PERMISSIONS_CHANGED = "board_permissions_changed" BOARD_LANES_CHANGED = "board_lanes_changed" ALL = ( STORY_CREATED, STORY_DETAILS_CHANGED, USER_COMMENT, TAGS_ADDED, TAGS_DELETED, TASK_CREATED, TASK_ASSIGNEE_CHANGED, TASK_DETAILS_CHANGED, TASK_STATUS_CHANGED, TASK_PRIORITY_CHANGED, TASK_DELETED, WORKLIST_CREATED, WORKLIST_DETAILS_CHANGED, WORKLIST_PERMISSION_CREATED, WORKLIST_PERMISSIONS_CHANGED, WORKLIST_FILTERS_CHANGED, WORKLIST_CONTENTS_CHANGED, BOARD_CREATED, BOARD_DETAILS_CHANGED, BOARD_PERMISSION_CREATED, BOARD_PERMISSIONS_CHANGED, BOARD_LANES_CHANGED )
""" This module defines the AtlasMetaData container type. """ class AtlasMetaData(object): """ Container class for an Atlas's metadata. Readable metadata fields: number_of_points (long) number_of_lines (long) number_of_areas (long) number_of_nodes (long) number_of_edges (long) number_of_relations (long) original (bool) code_version (string) data_version (string) country (string) shard_name (string) tags (dict) """ def __init__(self): self.number_of_edges = 0 self.number_of_nodes = 0 self.number_of_areas = 0 self.number_of_lines = 0 self.number_of_points = 0 self.number_of_relations = 0 self.original = False self.code_version = "" self.data_version = "" self.country = "" self.shard_name = "" self.tags = {} def _get_atlas_metadata_from_proto(proto_atlas_metadata): """ Take a decoded ProtoAtlasMetaData object and turn it into a more user friendly AtlasMetaData object. """ new_atlas_metadata = AtlasMetaData() new_atlas_metadata.number_of_edges = proto_atlas_metadata.edgeNumber new_atlas_metadata.number_of_nodes = proto_atlas_metadata.nodeNumber new_atlas_metadata.number_of_areas = proto_atlas_metadata.areaNumber new_atlas_metadata.number_of_lines = proto_atlas_metadata.lineNumber new_atlas_metadata.number_of_points = proto_atlas_metadata.pointNumber new_atlas_metadata.number_of_relations = proto_atlas_metadata.relationNumber new_atlas_metadata.original = proto_atlas_metadata.original new_atlas_metadata.code_version = proto_atlas_metadata.codeVersion new_atlas_metadata.data_version = proto_atlas_metadata.dataVersion new_atlas_metadata.country = proto_atlas_metadata.country new_atlas_metadata.shard_name = proto_atlas_metadata.shardName # convert prototags and fill the tag dict for proto_tag in proto_atlas_metadata.tags: new_atlas_metadata.tags[proto_tag.key] = proto_tag.value return new_atlas_metadata
""" A Harness for creating and using GPs for inference. -- kandasamy@cs.cmu.edu """
''' A non-empty array A consisting of N integers is given. The array contains an odd number of elements, and each element of the array can be paired with another element that has the same value, except for one element that is left unpaired. For example, in array A such that: A[0] = 9 A[1] = 3 A[2] = 9 A[3] = 3 A[4] = 9 A[5] = 7 A[6] = 9 the elements at indexes 0 and 2 have value 9, the elements at indexes 1 and 3 have value 3, the elements at indexes 4 and 6 have value 9, the element at index 5 has value 7 and is unpaired. Write a function: def solution(A) that, given an array A consisting of N integers fulfilling the above conditions, returns the value of the unpaired element. For example, given array A such that: A[0] = 9 A[1] = 3 A[2] = 9 A[3] = 3 A[4] = 9 A[5] = 7 A[6] = 9 the function should return 7, as explained in the example above. Write an efficient algorithm for the following assumptions: N is an odd integer within the range [1..1,000,000]; each element of array A is an integer within the range [1..1,000,000,000]; all but one of the values in A occur an even number of times. ''' def solution(A): A.sort() #print(A) for i in range(0,len(A),2): if(len(A)==1): return A[i] # print(A[i]) if(i+1==len(A)): return A[i] if(A[i]!=A[i+1]): # pass return A[i] A = [9,3,9,3,9,7,9] p=solution(A) #print(p)
def maven_dependencies(callback): callback({"artifact": "antlr:antlr:2.7.6", "lang": "java", "sha1": "cf4f67dae5df4f9932ae7810f4548ef3e14dd35e", "repository": "https://repo.maven.apache.org/maven2/", "name": "antlr_antlr", "actual": "@antlr_antlr//jar", "bind": "jar/antlr/antlr"}) callback({"artifact": "aopalliance:aopalliance:1.0", "lang": "java", "sha1": "0235ba8b489512805ac13a8f9ea77a1ca5ebe3e8", "repository": "https://repo.maven.apache.org/maven2/", "name": "aopalliance_aopalliance", "actual": "@aopalliance_aopalliance//jar", "bind": "jar/aopalliance/aopalliance"}) callback({"artifact": "args4j:args4j:2.0.31", "lang": "java", "sha1": "6b870d81551ce93c5c776c3046299db8ad6c39d2", "repository": "https://repo.maven.apache.org/maven2/", "name": "args4j_args4j", "actual": "@args4j_args4j//jar", "bind": "jar/args4j/args4j"}) callback({"artifact": "com.cloudbees:groovy-cps:1.12", "lang": "java", "sha1": "d766273a59e0b954c016e805779106bca22764b9", "repository": "https://repo.maven.apache.org/maven2/", "name": "com_cloudbees_groovy_cps", "actual": "@com_cloudbees_groovy_cps//jar", "bind": "jar/com/cloudbees/groovy_cps"}) callback({"artifact": "com.github.jnr:jffi:1.2.15", "lang": "java", "sha1": "f480f0234dd8f053da2421e60574cfbd9d85e1f5", "repository": "https://repo.maven.apache.org/maven2/", "name": "com_github_jnr_jffi", "actual": "@com_github_jnr_jffi//jar", "bind": "jar/com/github/jnr/jffi"}) callback({"artifact": "com.github.jnr:jnr-constants:0.9.8", "lang": "java", "sha1": "478036404879bd582be79e9a7939f3a161601c8b", "repository": "https://repo.maven.apache.org/maven2/", "name": "com_github_jnr_jnr_constants", "actual": "@com_github_jnr_jnr_constants//jar", "bind": "jar/com/github/jnr/jnr_constants"}) callback({"artifact": "com.github.jnr:jnr-ffi:2.1.4", "lang": "java", "sha1": "0a63bbd4af5cee55d820ef40dc5347d45765b788", "repository": "https://repo.maven.apache.org/maven2/", "name": "com_github_jnr_jnr_ffi", "actual": "@com_github_jnr_jnr_ffi//jar", "bind": "jar/com/github/jnr/jnr_ffi"}) callback({"artifact": "com.github.jnr:jnr-posix:3.0.41", "lang": "java", "sha1": "36eff018149e53ed814a340ddb7de73ceb66bf96", "repository": "https://repo.maven.apache.org/maven2/", "name": "com_github_jnr_jnr_posix", "actual": "@com_github_jnr_jnr_posix//jar", "bind": "jar/com/github/jnr/jnr_posix"}) callback({"artifact": "com.github.jnr:jnr-x86asm:1.0.2", "lang": "java", "sha1": "006936bbd6c5b235665d87bd450f5e13b52d4b48", "repository": "https://repo.maven.apache.org/maven2/", "name": "com_github_jnr_jnr_x86asm", "actual": "@com_github_jnr_jnr_x86asm//jar", "bind": "jar/com/github/jnr/jnr_x86asm"}) callback({"artifact": "com.google.code.findbugs:jsr305:1.3.9", "lang": "java", "sha1": "40719ea6961c0cb6afaeb6a921eaa1f6afd4cfdf", "repository": "https://repo.maven.apache.org/maven2/", "name": "com_google_code_findbugs_jsr305", "actual": "@com_google_code_findbugs_jsr305//jar", "bind": "jar/com/google/code/findbugs/jsr305"}) callback({"artifact": "com.google.guava:guava:11.0.1", "lang": "java", "sha1": "57b40a943725d43610c898ac0169adf1b2d55742", "repository": "https://repo.maven.apache.org/maven2/", "name": "com_google_guava_guava", "actual": "@com_google_guava_guava//jar", "bind": "jar/com/google/guava/guava"}) callback({"artifact": "com.google.inject:guice:4.0", "lang": "java", "sha1": "0f990a43d3725781b6db7cd0acf0a8b62dfd1649", "repository": "https://repo.maven.apache.org/maven2/", "name": "com_google_inject_guice", "actual": "@com_google_inject_guice//jar", "bind": "jar/com/google/inject/guice"}) callback({"artifact": "com.infradna.tool:bridge-method-annotation:1.13", "lang": "java", "sha1": "18cdce50cde6f54ee5390d0907384f72183ff0fe", "repository": "https://repo.maven.apache.org/maven2/", "name": "com_infradna_tool_bridge_method_annotation", "actual": "@com_infradna_tool_bridge_method_annotation//jar", "bind": "jar/com/infradna/tool/bridge_method_annotation"}) callback({"artifact": "com.jcraft:jzlib:1.1.3-kohsuke-1", "lang": "java", "sha1": "af5d27e1de29df05db95da5d76b546d075bc1bc5", "repository": "http://repo.jenkins-ci.org/public/", "name": "com_jcraft_jzlib", "actual": "@com_jcraft_jzlib//jar", "bind": "jar/com/jcraft/jzlib"}) callback({"artifact": "com.lesfurets:jenkins-pipeline-unit:1.0", "lang": "java", "sha1": "3aa90c606c541e88c268df3cc9e87306af69b29f", "repository": "https://repo.maven.apache.org/maven2/", "name": "com_lesfurets_jenkins_pipeline_unit", "actual": "@com_lesfurets_jenkins_pipeline_unit//jar", "bind": "jar/com/lesfurets/jenkins_pipeline_unit"}) callback({"artifact": "com.sun.solaris:embedded_su4j:1.1", "lang": "java", "sha1": "9404130cc4e60670429f1ab8dbf94d669012725d", "repository": "https://repo.maven.apache.org/maven2/", "name": "com_sun_solaris_embedded_su4j", "actual": "@com_sun_solaris_embedded_su4j//jar", "bind": "jar/com/sun/solaris/embedded_su4j"}) callback({"artifact": "com.sun.xml.txw2:txw2:20110809", "lang": "java", "sha1": "46afa3f3c468680875adb8f2a26086a126c89902", "repository": "https://repo.maven.apache.org/maven2/", "name": "com_sun_xml_txw2_txw2", "actual": "@com_sun_xml_txw2_txw2//jar", "bind": "jar/com/sun/xml/txw2/txw2"}) callback({"artifact": "commons-beanutils:commons-beanutils:1.8.3", "lang": "java", "sha1": "686ef3410bcf4ab8ce7fd0b899e832aaba5facf7", "repository": "https://repo.maven.apache.org/maven2/", "name": "commons_beanutils_commons_beanutils", "actual": "@commons_beanutils_commons_beanutils//jar", "bind": "jar/commons_beanutils/commons_beanutils"}) callback({"artifact": "commons-codec:commons-codec:1.8", "lang": "java", "sha1": "af3be3f74d25fc5163b54f56a0d394b462dafafd", "repository": "https://repo.maven.apache.org/maven2/", "name": "commons_codec_commons_codec", "actual": "@commons_codec_commons_codec//jar", "bind": "jar/commons_codec/commons_codec"}) callback({"artifact": "commons-collections:commons-collections:3.2.2", "lang": "java", "sha1": "8ad72fe39fa8c91eaaf12aadb21e0c3661fe26d5", "repository": "https://repo.maven.apache.org/maven2/", "name": "commons_collections_commons_collections", "actual": "@commons_collections_commons_collections//jar", "bind": "jar/commons_collections/commons_collections"}) callback({"artifact": "commons-digester:commons-digester:2.1", "lang": "java", "sha1": "73a8001e7a54a255eef0f03521ec1805dc738ca0", "repository": "https://repo.maven.apache.org/maven2/", "name": "commons_digester_commons_digester", "actual": "@commons_digester_commons_digester//jar", "bind": "jar/commons_digester/commons_digester"}) callback({"artifact": "commons-discovery:commons-discovery:0.4", "lang": "java", "sha1": "9e3417d3866d9f71e83b959b229b35dc723c7bea", "repository": "https://repo.maven.apache.org/maven2/", "name": "commons_discovery_commons_discovery", "actual": "@commons_discovery_commons_discovery//jar", "bind": "jar/commons_discovery/commons_discovery"}) callback({"artifact": "commons-fileupload:commons-fileupload:1.3.1-jenkins-1", "lang": "java", "sha1": "5d0270b78ad9d5344ce4a8e35482ad8802526aca", "repository": "http://repo.jenkins-ci.org/public/", "name": "commons_fileupload_commons_fileupload", "actual": "@commons_fileupload_commons_fileupload//jar", "bind": "jar/commons_fileupload/commons_fileupload"}) callback({"artifact": "commons-httpclient:commons-httpclient:3.1", "lang": "java", "sha1": "964cd74171f427720480efdec40a7c7f6e58426a", "repository": "https://repo.maven.apache.org/maven2/", "name": "commons_httpclient_commons_httpclient", "actual": "@commons_httpclient_commons_httpclient//jar", "bind": "jar/commons_httpclient/commons_httpclient"}) # duplicates in commons-io:commons-io promoted to 2.5. Versions: 2.4 2.5 callback({"artifact": "commons-io:commons-io:2.5", "lang": "java", "sha1": "2852e6e05fbb95076fc091f6d1780f1f8fe35e0f", "repository": "https://repo.maven.apache.org/maven2/", "name": "commons_io_commons_io", "actual": "@commons_io_commons_io//jar", "bind": "jar/commons_io/commons_io"}) callback({"artifact": "commons-jelly:commons-jelly-tags-fmt:1.0", "lang": "java", "sha1": "2107da38fdd287ab78a4fa65c1300b5ad9999274", "repository": "https://repo.maven.apache.org/maven2/", "name": "commons_jelly_commons_jelly_tags_fmt", "actual": "@commons_jelly_commons_jelly_tags_fmt//jar", "bind": "jar/commons_jelly/commons_jelly_tags_fmt"}) callback({"artifact": "commons-jelly:commons-jelly-tags-xml:1.1", "lang": "java", "sha1": "cc0efc2ae0ff81ef7737afc786a0ce16a8540efc", "repository": "https://repo.maven.apache.org/maven2/", "name": "commons_jelly_commons_jelly_tags_xml", "actual": "@commons_jelly_commons_jelly_tags_xml//jar", "bind": "jar/commons_jelly/commons_jelly_tags_xml"}) callback({"artifact": "commons-lang:commons-lang:2.6", "lang": "java", "sha1": "0ce1edb914c94ebc388f086c6827e8bdeec71ac2", "repository": "https://repo.maven.apache.org/maven2/", "name": "commons_lang_commons_lang", "actual": "@commons_lang_commons_lang//jar", "bind": "jar/commons_lang/commons_lang"}) callback({"artifact": "javax.annotation:javax.annotation-api:1.2", "lang": "java", "sha1": "479c1e06db31c432330183f5cae684163f186146", "repository": "https://repo.maven.apache.org/maven2/", "name": "javax_annotation_javax_annotation_api", "actual": "@javax_annotation_javax_annotation_api//jar", "bind": "jar/javax/annotation/javax_annotation_api"}) callback({"artifact": "javax.inject:javax.inject:1", "lang": "java", "sha1": "6975da39a7040257bd51d21a231b76c915872d38", "repository": "https://repo.maven.apache.org/maven2/", "name": "javax_inject_javax_inject", "actual": "@javax_inject_javax_inject//jar", "bind": "jar/javax/inject/javax_inject"}) callback({"artifact": "javax.mail:mail:1.4.4", "lang": "java", "sha1": "b907ef0a02ff6e809392b1e7149198497fcc8e49", "repository": "https://repo.maven.apache.org/maven2/", "name": "javax_mail_mail", "actual": "@javax_mail_mail//jar", "bind": "jar/javax/mail/mail"}) callback({"artifact": "javax.servlet:jstl:1.1.0", "lang": "java", "sha1": "bca201e52333629c59e459e874e5ecd8f9899e15", "repository": "https://repo.maven.apache.org/maven2/", "name": "javax_servlet_jstl", "actual": "@javax_servlet_jstl//jar", "bind": "jar/javax/servlet/jstl"}) callback({"artifact": "javax.xml.stream:stax-api:1.0-2", "lang": "java", "sha1": "d6337b0de8b25e53e81b922352fbea9f9f57ba0b", "repository": "https://repo.maven.apache.org/maven2/", "name": "javax_xml_stream_stax_api", "actual": "@javax_xml_stream_stax_api//jar", "bind": "jar/javax/xml/stream/stax_api"}) callback({"artifact": "jaxen:jaxen:1.1-beta-11", "lang": "java", "sha1": "81e32b8bafcc778e5deea4e784670299f1c26b96", "repository": "https://repo.maven.apache.org/maven2/", "name": "jaxen_jaxen", "actual": "@jaxen_jaxen//jar", "bind": "jar/jaxen/jaxen"}) callback({"artifact": "jfree:jcommon:1.0.12", "lang": "java", "sha1": "737f02607d2f45bb1a589a85c63b4cd907e5e634", "repository": "https://repo.maven.apache.org/maven2/", "name": "jfree_jcommon", "actual": "@jfree_jcommon//jar", "bind": "jar/jfree/jcommon"}) callback({"artifact": "jfree:jfreechart:1.0.9", "lang": "java", "sha1": "6e522aa603bf7ac69da59edcf519b335490e93a6", "repository": "https://repo.maven.apache.org/maven2/", "name": "jfree_jfreechart", "actual": "@jfree_jfreechart//jar", "bind": "jar/jfree/jfreechart"}) callback({"artifact": "jline:jline:2.12", "lang": "java", "sha1": "ce9062c6a125e0f9ad766032573c041ae8ecc986", "repository": "https://repo.maven.apache.org/maven2/", "name": "jline_jline", "actual": "@jline_jline//jar", "bind": "jar/jline/jline"}) callback({"artifact": "junit:junit:4.12", "lang": "java", "sha1": "2973d150c0dc1fefe998f834810d68f278ea58ec", "repository": "https://repo.maven.apache.org/maven2/", "name": "junit_junit", "actual": "@junit_junit//jar", "bind": "jar/junit/junit"}) callback({"artifact": "net.i2p.crypto:eddsa:0.2.0", "lang": "java", "sha1": "0856a92559c4daf744cb27c93cd8b7eb1f8c4780", "repository": "https://repo.maven.apache.org/maven2/", "name": "net_i2p_crypto_eddsa", "actual": "@net_i2p_crypto_eddsa//jar", "bind": "jar/net/i2p/crypto/eddsa"}) callback({"artifact": "net.java.dev.jna:jna:4.2.1", "lang": "java", "sha1": "fcc5b10cb812c41b00708e7b57baccc3aee5567c", "repository": "https://repo.maven.apache.org/maven2/", "name": "net_java_dev_jna_jna", "actual": "@net_java_dev_jna_jna//jar", "bind": "jar/net/java/dev/jna/jna"}) callback({"artifact": "net.java.sezpoz:sezpoz:1.12", "lang": "java", "sha1": "01f7e4a04e06fdbc91d66ddf80c443c3f7c6503c", "repository": "https://repo.maven.apache.org/maven2/", "name": "net_java_sezpoz_sezpoz", "actual": "@net_java_sezpoz_sezpoz//jar", "bind": "jar/net/java/sezpoz/sezpoz"}) callback({"artifact": "net.sf.ezmorph:ezmorph:1.0.6", "lang": "java", "sha1": "01e55d2a0253ea37745d33062852fd2c90027432", "repository": "https://repo.maven.apache.org/maven2/", "name": "net_sf_ezmorph_ezmorph", "actual": "@net_sf_ezmorph_ezmorph//jar", "bind": "jar/net/sf/ezmorph/ezmorph"}) callback({"artifact": "org.acegisecurity:acegi-security:1.0.7", "lang": "java", "sha1": "72901120d299e0c6ed2f6a23dd37f9186eeb8cc3", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_acegisecurity_acegi_security", "actual": "@org_acegisecurity_acegi_security//jar", "bind": "jar/org/acegisecurity/acegi_security"}) callback({"artifact": "org.apache.ant:ant-launcher:1.8.4", "lang": "java", "sha1": "22f1e0c32a2bfc8edd45520db176bac98cebbbfe", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_apache_ant_ant_launcher", "actual": "@org_apache_ant_ant_launcher//jar", "bind": "jar/org/apache/ant/ant_launcher"}) callback({"artifact": "org.apache.ant:ant:1.8.4", "lang": "java", "sha1": "8acff3fb57e74bc062d4675d9dcfaffa0d524972", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_apache_ant_ant", "actual": "@org_apache_ant_ant//jar", "bind": "jar/org/apache/ant/ant"}) callback({"artifact": "org.apache.commons:commons-compress:1.10", "lang": "java", "sha1": "5eeb27c57eece1faf2d837868aeccc94d84dcc9a", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_apache_commons_commons_compress", "actual": "@org_apache_commons_commons_compress//jar", "bind": "jar/org/apache/commons/commons_compress"}) callback({"artifact": "org.apache.ivy:ivy:2.4.0", "lang": "java", "sha1": "5abe4c24bbe992a9ac07ca563d5bd3e8d569e9ed", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_apache_ivy_ivy", "actual": "@org_apache_ivy_ivy//jar", "bind": "jar/org/apache/ivy/ivy"}) # duplicates in org.codehaus.groovy:groovy-all fixed to 2.4.6. Versions: 2.4.6 2.4.11 callback({"artifact": "org.codehaus.groovy:groovy-all:2.4.6", "lang": "java", "sha1": "478feadca929a946b2f1fb962bb2179264759821", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_codehaus_groovy_groovy_all", "actual": "@org_codehaus_groovy_groovy_all//jar", "bind": "jar/org/codehaus/groovy/groovy_all"}) callback({"artifact": "org.codehaus.woodstox:wstx-asl:3.2.9", "lang": "java", "sha1": "c82b6e8f225bb799540e558b10ee24d268035597", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_codehaus_woodstox_wstx_asl", "actual": "@org_codehaus_woodstox_wstx_asl//jar", "bind": "jar/org/codehaus/woodstox/wstx_asl"}) callback({"artifact": "org.connectbot.jbcrypt:jbcrypt:1.0.0", "lang": "java", "sha1": "f37bba2b8b78fcc8111bb932318b621dcc6c5194", "repository": "http://repo.jenkins-ci.org/public/", "name": "org_connectbot_jbcrypt_jbcrypt", "actual": "@org_connectbot_jbcrypt_jbcrypt//jar", "bind": "jar/org/connectbot/jbcrypt/jbcrypt"}) callback({"artifact": "org.fusesource.jansi:jansi:1.11", "lang": "java", "sha1": "655c643309c2f45a56a747fda70e3fadf57e9f11", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_fusesource_jansi_jansi", "actual": "@org_fusesource_jansi_jansi//jar", "bind": "jar/org/fusesource/jansi/jansi"}) callback({"artifact": "org.hamcrest:hamcrest-all:1.3", "lang": "java", "sha1": "63a21ebc981131004ad02e0434e799fd7f3a8d5a", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_hamcrest_hamcrest_all", "actual": "@org_hamcrest_hamcrest_all//jar", "bind": "jar/org/hamcrest/hamcrest_all"}) callback({"artifact": "org.hamcrest:hamcrest-core:1.3", "lang": "java", "sha1": "42a25dc3219429f0e5d060061f71acb49bf010a0", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_hamcrest_hamcrest_core", "actual": "@org_hamcrest_hamcrest_core//jar", "bind": "jar/org/hamcrest/hamcrest_core"}) callback({"artifact": "org.jboss.marshalling:jboss-marshalling-river:1.4.9.Final", "lang": "java", "sha1": "d41e3e1ed9cf4afd97d19df8ecc7f2120effeeb4", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_jboss_marshalling_jboss_marshalling_river", "actual": "@org_jboss_marshalling_jboss_marshalling_river//jar", "bind": "jar/org/jboss/marshalling/jboss_marshalling_river"}) callback({"artifact": "org.jboss.marshalling:jboss-marshalling:1.4.9.Final", "lang": "java", "sha1": "8fd342ee3dde0448c7600275a936ea1b17deb494", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_jboss_marshalling_jboss_marshalling", "actual": "@org_jboss_marshalling_jboss_marshalling//jar", "bind": "jar/org/jboss/marshalling/jboss_marshalling"}) callback({"artifact": "org.jenkins-ci.dom4j:dom4j:1.6.1-jenkins-4", "lang": "java", "sha1": "9a370b2010b5a1223c7a43dae6c05226918e17b1", "repository": "http://repo.jenkins-ci.org/public/", "name": "org_jenkins_ci_dom4j_dom4j", "actual": "@org_jenkins_ci_dom4j_dom4j//jar", "bind": "jar/org/jenkins_ci/dom4j/dom4j"}) callback({"artifact": "org.jenkins-ci.main:cli:2.73.1", "lang": "java", "sha1": "03ae1decd36ee069108e66e70cd6ffcdd4320aec", "repository": "http://repo.jenkins-ci.org/public/", "name": "org_jenkins_ci_main_cli", "actual": "@org_jenkins_ci_main_cli//jar", "bind": "jar/org/jenkins_ci/main/cli"}) callback({"artifact": "org.jenkins-ci.main:jenkins-core:2.73.1", "lang": "java", "sha1": "30c9e7029d46fd18a8720f9a491bf41ab8f2bdb2", "repository": "http://repo.jenkins-ci.org/public/", "name": "org_jenkins_ci_main_jenkins_core", "actual": "@org_jenkins_ci_main_jenkins_core//jar", "bind": "jar/org/jenkins_ci/main/jenkins_core"}) callback({"artifact": "org.jenkins-ci.main:remoting:3.10", "lang": "java", "sha1": "19905fa1550ab34a33bb92a5e27e2a86733c9d15", "repository": "http://repo.jenkins-ci.org/public/", "name": "org_jenkins_ci_main_remoting", "actual": "@org_jenkins_ci_main_remoting//jar", "bind": "jar/org/jenkins_ci/main/remoting"}) callback({"artifact": "org.jenkins-ci.plugins.icon-shim:icon-set:1.0.5", "lang": "java", "sha1": "dedc76ac61797dafc66f31e8507d65b98c9e57df", "repository": "http://repo.jenkins-ci.org/public/", "name": "org_jenkins_ci_plugins_icon_shim_icon_set", "actual": "@org_jenkins_ci_plugins_icon_shim_icon_set//jar", "bind": "jar/org/jenkins_ci/plugins/icon_shim/icon_set"}) callback({"artifact": "org.jenkins-ci.plugins.workflow:workflow-api:2.11", "lang": "java", "sha1": "3a8a6e221a8b32fd9faabb33939c28f79fd961d7", "repository": "http://repo.jenkins-ci.org/public/", "name": "org_jenkins_ci_plugins_workflow_workflow_api", "actual": "@org_jenkins_ci_plugins_workflow_workflow_api//jar", "bind": "jar/org/jenkins_ci/plugins/workflow/workflow_api"}) callback({"artifact": "org.jenkins-ci.plugins.workflow:workflow-step-api:2.9", "lang": "java", "sha1": "7d1ad140c092cf4a68a7763db9eac459b5ed86ff", "repository": "http://repo.jenkins-ci.org/public/", "name": "org_jenkins_ci_plugins_workflow_workflow_step_api", "actual": "@org_jenkins_ci_plugins_workflow_workflow_step_api//jar", "bind": "jar/org/jenkins_ci/plugins/workflow/workflow_step_api"}) callback({"artifact": "org.jenkins-ci.plugins.workflow:workflow-support:2.14", "lang": "java", "sha1": "cd5f68c533ddd46fea3332ce788dffc80707ddb5", "repository": "http://repo.jenkins-ci.org/public/", "name": "org_jenkins_ci_plugins_workflow_workflow_support", "actual": "@org_jenkins_ci_plugins_workflow_workflow_support//jar", "bind": "jar/org/jenkins_ci/plugins/workflow/workflow_support"}) callback({"artifact": "org.jenkins-ci.plugins:script-security:1.26", "lang": "java", "sha1": "44aacd104c0d5c8fe5d0f93e4a4001cae0e48c2b", "repository": "http://repo.jenkins-ci.org/public/", "name": "org_jenkins_ci_plugins_script_security", "actual": "@org_jenkins_ci_plugins_script_security//jar", "bind": "jar/org/jenkins_ci/plugins/script_security"}) callback({"artifact": "org.jenkins-ci.plugins:structs:1.5", "lang": "java", "sha1": "72d429f749151f1c983c1fadcb348895cc6da20e", "repository": "http://repo.jenkins-ci.org/public/", "name": "org_jenkins_ci_plugins_structs", "actual": "@org_jenkins_ci_plugins_structs//jar", "bind": "jar/org/jenkins_ci/plugins/structs"}) # duplicates in org.jenkins-ci:annotation-indexer promoted to 1.12. Versions: 1.9 1.12 callback({"artifact": "org.jenkins-ci:annotation-indexer:1.12", "lang": "java", "sha1": "8f6ee0cd64c305dcca29e2f5b46631d50890208f", "repository": "http://repo.jenkins-ci.org/public/", "name": "org_jenkins_ci_annotation_indexer", "actual": "@org_jenkins_ci_annotation_indexer//jar", "bind": "jar/org/jenkins_ci/annotation_indexer"}) callback({"artifact": "org.jenkins-ci:bytecode-compatibility-transformer:1.8", "lang": "java", "sha1": "aded88ffe12f1904758397f96f16957e97b88e6e", "repository": "http://repo.jenkins-ci.org/public/", "name": "org_jenkins_ci_bytecode_compatibility_transformer", "actual": "@org_jenkins_ci_bytecode_compatibility_transformer//jar", "bind": "jar/org/jenkins_ci/bytecode_compatibility_transformer"}) callback({"artifact": "org.jenkins-ci:commons-jelly:1.1-jenkins-20120928", "lang": "java", "sha1": "2720a0d54b7f32479b08970d7738041362e1f410", "repository": "http://repo.jenkins-ci.org/public/", "name": "org_jenkins_ci_commons_jelly", "actual": "@org_jenkins_ci_commons_jelly//jar", "bind": "jar/org/jenkins_ci/commons_jelly"}) callback({"artifact": "org.jenkins-ci:commons-jexl:1.1-jenkins-20111212", "lang": "java", "sha1": "0a990a77bea8c5a400d58a6f5d98122236300f7d", "repository": "http://repo.jenkins-ci.org/public/", "name": "org_jenkins_ci_commons_jexl", "actual": "@org_jenkins_ci_commons_jexl//jar", "bind": "jar/org/jenkins_ci/commons_jexl"}) callback({"artifact": "org.jenkins-ci:constant-pool-scanner:1.2", "lang": "java", "sha1": "e5e0b7c7fcb67767dbd195e0ca1f0ee9406dd423", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_jenkins_ci_constant_pool_scanner", "actual": "@org_jenkins_ci_constant_pool_scanner//jar", "bind": "jar/org/jenkins_ci/constant_pool_scanner"}) callback({"artifact": "org.jenkins-ci:crypto-util:1.1", "lang": "java", "sha1": "3a199a4c3748012b9dbbf3080097dc9f302493d8", "repository": "http://repo.jenkins-ci.org/public/", "name": "org_jenkins_ci_crypto_util", "actual": "@org_jenkins_ci_crypto_util//jar", "bind": "jar/org/jenkins_ci/crypto_util"}) callback({"artifact": "org.jenkins-ci:jmdns:3.4.0-jenkins-3", "lang": "java", "sha1": "264d0c402b48c365f34d072b864ed57f25e92e63", "repository": "http://repo.jenkins-ci.org/public/", "name": "org_jenkins_ci_jmdns", "actual": "@org_jenkins_ci_jmdns//jar", "bind": "jar/org/jenkins_ci/jmdns"}) callback({"artifact": "org.jenkins-ci:memory-monitor:1.9", "lang": "java", "sha1": "1935bfb46474e3043ee2310a9bb790d42dde2ed7", "repository": "http://repo.jenkins-ci.org/public/", "name": "org_jenkins_ci_memory_monitor", "actual": "@org_jenkins_ci_memory_monitor//jar", "bind": "jar/org/jenkins_ci/memory_monitor"}) # duplicates in org.jenkins-ci:symbol-annotation promoted to 1.5. Versions: 1.1 1.5 callback({"artifact": "org.jenkins-ci:symbol-annotation:1.5", "lang": "java", "sha1": "17694feb24cb69793914d0c1c11ff479ee4c1b38", "repository": "http://repo.jenkins-ci.org/public/", "name": "org_jenkins_ci_symbol_annotation", "actual": "@org_jenkins_ci_symbol_annotation//jar", "bind": "jar/org/jenkins_ci/symbol_annotation"}) callback({"artifact": "org.jenkins-ci:task-reactor:1.4", "lang": "java", "sha1": "b89e501a3bc64fe9f28cb91efe75ed8745974ef8", "repository": "http://repo.jenkins-ci.org/public/", "name": "org_jenkins_ci_task_reactor", "actual": "@org_jenkins_ci_task_reactor//jar", "bind": "jar/org/jenkins_ci/task_reactor"}) callback({"artifact": "org.jenkins-ci:trilead-ssh2:build-217-jenkins-11", "lang": "java", "sha1": "f10f4dd4121cc233cac229c51adb4775960fee0a", "repository": "http://repo.jenkins-ci.org/public/", "name": "org_jenkins_ci_trilead_ssh2", "actual": "@org_jenkins_ci_trilead_ssh2//jar", "bind": "jar/org/jenkins_ci/trilead_ssh2"}) callback({"artifact": "org.jenkins-ci:version-number:1.4", "lang": "java", "sha1": "5d0f2ea16514c0ec8de86c102ce61a7837e45eb8", "repository": "http://repo.jenkins-ci.org/public/", "name": "org_jenkins_ci_version_number", "actual": "@org_jenkins_ci_version_number//jar", "bind": "jar/org/jenkins_ci/version_number"}) callback({"artifact": "org.jruby.ext.posix:jna-posix:1.0.3-jenkins-1", "lang": "java", "sha1": "fb1148cc8192614ec1418d414f7b6026cc0ec71b", "repository": "http://repo.jenkins-ci.org/public/", "name": "org_jruby_ext_posix_jna_posix", "actual": "@org_jruby_ext_posix_jna_posix//jar", "bind": "jar/org/jruby/ext/posix/jna_posix"}) callback({"artifact": "org.jvnet.hudson:activation:1.1.1-hudson-1", "lang": "java", "sha1": "7957d80444223277f84676aabd5b0421b65888c4", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_jvnet_hudson_activation", "actual": "@org_jvnet_hudson_activation//jar", "bind": "jar/org/jvnet/hudson/activation"}) callback({"artifact": "org.jvnet.hudson:commons-jelly-tags-define:1.0.1-hudson-20071021", "lang": "java", "sha1": "8b952d0e504ee505d234853119e5648441894234", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_jvnet_hudson_commons_jelly_tags_define", "actual": "@org_jvnet_hudson_commons_jelly_tags_define//jar", "bind": "jar/org/jvnet/hudson/commons_jelly_tags_define"}) callback({"artifact": "org.jvnet.hudson:jtidy:4aug2000r7-dev-hudson-1", "lang": "java", "sha1": "ad8553d0acfa6e741d21d5b2c2beb737972ab7c7", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_jvnet_hudson_jtidy", "actual": "@org_jvnet_hudson_jtidy//jar", "bind": "jar/org/jvnet/hudson/jtidy"}) callback({"artifact": "org.jvnet.hudson:xstream:1.4.7-jenkins-1", "lang": "java", "sha1": "161ed1603117c2d37b864f81a0d62f36cf7e958a", "repository": "http://repo.jenkins-ci.org/public/", "name": "org_jvnet_hudson_xstream", "actual": "@org_jvnet_hudson_xstream//jar", "bind": "jar/org/jvnet/hudson/xstream"}) callback({"artifact": "org.jvnet.localizer:localizer:1.24", "lang": "java", "sha1": "e20e7668dbf36e8d354dab922b89adb6273b703f", "repository": "http://repo.jenkins-ci.org/public/", "name": "org_jvnet_localizer_localizer", "actual": "@org_jvnet_localizer_localizer//jar", "bind": "jar/org/jvnet/localizer/localizer"}) callback({"artifact": "org.jvnet.robust-http-client:robust-http-client:1.2", "lang": "java", "sha1": "dee9fda92ad39a94a77ec6cf88300d4dd6db8a4d", "repository": "http://repo.jenkins-ci.org/public/", "name": "org_jvnet_robust_http_client_robust_http_client", "actual": "@org_jvnet_robust_http_client_robust_http_client//jar", "bind": "jar/org/jvnet/robust_http_client/robust_http_client"}) callback({"artifact": "org.jvnet.winp:winp:1.25", "lang": "java", "sha1": "1c88889f80c0e03a7fb62c26b706d68813f8e657", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_jvnet_winp_winp", "actual": "@org_jvnet_winp_winp//jar", "bind": "jar/org/jvnet/winp/winp"}) callback({"artifact": "org.jvnet:tiger-types:2.2", "lang": "java", "sha1": "7ddc6bbc8ca59be8879d3a943bf77517ec190f39", "repository": "http://repo.jenkins-ci.org/public/", "name": "org_jvnet_tiger_types", "actual": "@org_jvnet_tiger_types//jar", "bind": "jar/org/jvnet/tiger_types"}) callback({"artifact": "org.kohsuke.jinterop:j-interop:2.0.6-kohsuke-1", "lang": "java", "sha1": "b2e243227608c1424ab0084564dc71659d273007", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_kohsuke_jinterop_j_interop", "actual": "@org_kohsuke_jinterop_j_interop//jar", "bind": "jar/org/kohsuke/jinterop/j_interop"}) callback({"artifact": "org.kohsuke.jinterop:j-interopdeps:2.0.6-kohsuke-1", "lang": "java", "sha1": "778400517a3419ce8c361498c194036534851736", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_kohsuke_jinterop_j_interopdeps", "actual": "@org_kohsuke_jinterop_j_interopdeps//jar", "bind": "jar/org/kohsuke/jinterop/j_interopdeps"}) callback({"artifact": "org.kohsuke.stapler:json-lib:2.4-jenkins-2", "lang": "java", "sha1": "7f4f9016d8c8b316ecbe68afe7c26df06d301366", "repository": "http://repo.jenkins-ci.org/public/", "name": "org_kohsuke_stapler_json_lib", "actual": "@org_kohsuke_stapler_json_lib//jar", "bind": "jar/org/kohsuke/stapler/json_lib"}) callback({"artifact": "org.kohsuke.stapler:stapler-adjunct-codemirror:1.3", "lang": "java", "sha1": "fd1d45544400d2a4da6dfee9e60edd4ec3368806", "repository": "http://repo.jenkins-ci.org/public/", "name": "org_kohsuke_stapler_stapler_adjunct_codemirror", "actual": "@org_kohsuke_stapler_stapler_adjunct_codemirror//jar", "bind": "jar/org/kohsuke/stapler/stapler_adjunct_codemirror"}) callback({"artifact": "org.kohsuke.stapler:stapler-adjunct-timeline:1.5", "lang": "java", "sha1": "3fa806cbb94679ceab9c1ecaaf5fea8207390cb7", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_kohsuke_stapler_stapler_adjunct_timeline", "actual": "@org_kohsuke_stapler_stapler_adjunct_timeline//jar", "bind": "jar/org/kohsuke/stapler/stapler_adjunct_timeline"}) callback({"artifact": "org.kohsuke.stapler:stapler-adjunct-zeroclipboard:1.3.5-1", "lang": "java", "sha1": "20184ea79888b55b6629e4479615b52f88b55173", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_kohsuke_stapler_stapler_adjunct_zeroclipboard", "actual": "@org_kohsuke_stapler_stapler_adjunct_zeroclipboard//jar", "bind": "jar/org/kohsuke/stapler/stapler_adjunct_zeroclipboard"}) callback({"artifact": "org.kohsuke.stapler:stapler-groovy:1.250", "lang": "java", "sha1": "a8b910923b8eef79dd99c8aa6418d8ada0de4c86", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_kohsuke_stapler_stapler_groovy", "actual": "@org_kohsuke_stapler_stapler_groovy//jar", "bind": "jar/org/kohsuke/stapler/stapler_groovy"}) callback({"artifact": "org.kohsuke.stapler:stapler-jelly:1.250", "lang": "java", "sha1": "6ac2202bf40e48a63623803697cd1801ee716273", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_kohsuke_stapler_stapler_jelly", "actual": "@org_kohsuke_stapler_stapler_jelly//jar", "bind": "jar/org/kohsuke/stapler/stapler_jelly"}) callback({"artifact": "org.kohsuke.stapler:stapler-jrebel:1.250", "lang": "java", "sha1": "b6f10cb14cf3462f5a51d03a7a00337052355c8c", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_kohsuke_stapler_stapler_jrebel", "actual": "@org_kohsuke_stapler_stapler_jrebel//jar", "bind": "jar/org/kohsuke/stapler/stapler_jrebel"}) callback({"artifact": "org.kohsuke.stapler:stapler:1.250", "lang": "java", "sha1": "d5afb2c46a2919d22e5bc3adccf5f09fbb0fb4e3", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_kohsuke_stapler_stapler", "actual": "@org_kohsuke_stapler_stapler//jar", "bind": "jar/org/kohsuke/stapler/stapler"}) callback({"artifact": "org.kohsuke:access-modifier-annotation:1.11", "lang": "java", "sha1": "d1ca3a10d8be91d1525f51dbc6a3c7644e0fc6ea", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_kohsuke_access_modifier_annotation", "actual": "@org_kohsuke_access_modifier_annotation//jar", "bind": "jar/org/kohsuke/access_modifier_annotation"}) callback({"artifact": "org.kohsuke:akuma:1.10", "lang": "java", "sha1": "0e2c6a1f79f17e3fab13332ab8e9b9016eeab0b6", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_kohsuke_akuma", "actual": "@org_kohsuke_akuma//jar", "bind": "jar/org/kohsuke/akuma"}) callback({"artifact": "org.kohsuke:asm5:5.0.1", "lang": "java", "sha1": "71ab0620a41ed37f626b96d80c2a7c58165550df", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_kohsuke_asm5", "actual": "@org_kohsuke_asm5//jar", "bind": "jar/org/kohsuke/asm5"}) callback({"artifact": "org.kohsuke:groovy-sandbox:1.10", "lang": "java", "sha1": "f4f33a2122cca74ce8beaaf6a3c5ab9c8644d977", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_kohsuke_groovy_sandbox", "actual": "@org_kohsuke_groovy_sandbox//jar", "bind": "jar/org/kohsuke/groovy_sandbox"}) callback({"artifact": "org.kohsuke:libpam4j:1.8", "lang": "java", "sha1": "548d4a1177adad8242fe03a6930c335669d669ad", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_kohsuke_libpam4j", "actual": "@org_kohsuke_libpam4j//jar", "bind": "jar/org/kohsuke/libpam4j"}) callback({"artifact": "org.kohsuke:libzfs:0.8", "lang": "java", "sha1": "5bb311276283921f7e1082c348c0253b17922dcc", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_kohsuke_libzfs", "actual": "@org_kohsuke_libzfs//jar", "bind": "jar/org/kohsuke/libzfs"}) callback({"artifact": "org.kohsuke:trilead-putty-extension:1.2", "lang": "java", "sha1": "0f2f41517e1f73be8e319da27a69e0dc0c524bf6", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_kohsuke_trilead_putty_extension", "actual": "@org_kohsuke_trilead_putty_extension//jar", "bind": "jar/org/kohsuke/trilead_putty_extension"}) callback({"artifact": "org.kohsuke:windows-package-checker:1.2", "lang": "java", "sha1": "86b5d2f9023633808d65dbcfdfd50dc5ad3ca31f", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_kohsuke_windows_package_checker", "actual": "@org_kohsuke_windows_package_checker//jar", "bind": "jar/org/kohsuke/windows_package_checker"}) callback({"artifact": "org.mindrot:jbcrypt:0.4", "lang": "java", "sha1": "af7e61017f73abb18ac4e036954f9f28c6366c07", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_mindrot_jbcrypt", "actual": "@org_mindrot_jbcrypt//jar", "bind": "jar/org/mindrot/jbcrypt"}) callback({"artifact": "org.ow2.asm:asm-analysis:5.0.3", "lang": "java", "sha1": "c7126aded0e8e13fed5f913559a0dd7b770a10f3", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_ow2_asm_asm_analysis", "actual": "@org_ow2_asm_asm_analysis//jar", "bind": "jar/org/ow2/asm/asm_analysis"}) callback({"artifact": "org.ow2.asm:asm-commons:5.0.3", "lang": "java", "sha1": "a7111830132c7f87d08fe48cb0ca07630f8cb91c", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_ow2_asm_asm_commons", "actual": "@org_ow2_asm_asm_commons//jar", "bind": "jar/org/ow2/asm/asm_commons"}) callback({"artifact": "org.ow2.asm:asm-tree:5.0.3", "lang": "java", "sha1": "287749b48ba7162fb67c93a026d690b29f410bed", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_ow2_asm_asm_tree", "actual": "@org_ow2_asm_asm_tree//jar", "bind": "jar/org/ow2/asm/asm_tree"}) callback({"artifact": "org.ow2.asm:asm-util:5.0.3", "lang": "java", "sha1": "1512e5571325854b05fb1efce1db75fcced54389", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_ow2_asm_asm_util", "actual": "@org_ow2_asm_asm_util//jar", "bind": "jar/org/ow2/asm/asm_util"}) callback({"artifact": "org.ow2.asm:asm:5.0.3", "lang": "java", "sha1": "dcc2193db20e19e1feca8b1240dbbc4e190824fa", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_ow2_asm_asm", "actual": "@org_ow2_asm_asm//jar", "bind": "jar/org/ow2/asm/asm"}) callback({"artifact": "org.samba.jcifs:jcifs:1.3.17-kohsuke-1", "lang": "java", "sha1": "6c9114dc4075277d829ea09e15d6ffab52f2d0c0", "repository": "http://repo.jenkins-ci.org/public/", "name": "org_samba_jcifs_jcifs", "actual": "@org_samba_jcifs_jcifs//jar", "bind": "jar/org/samba/jcifs/jcifs"}) callback({"artifact": "org.slf4j:jcl-over-slf4j:1.7.7", "lang": "java", "sha1": "56003dcd0a31deea6391b9e2ef2f2dc90b205a92", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_slf4j_jcl_over_slf4j", "actual": "@org_slf4j_jcl_over_slf4j//jar", "bind": "jar/org/slf4j/jcl_over_slf4j"}) callback({"artifact": "org.slf4j:log4j-over-slf4j:1.7.7", "lang": "java", "sha1": "d521cb26a9c4407caafcec302e7804b048b07cea", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_slf4j_log4j_over_slf4j", "actual": "@org_slf4j_log4j_over_slf4j//jar", "bind": "jar/org/slf4j/log4j_over_slf4j"}) callback({"artifact": "org.slf4j:slf4j-api:1.7.7", "lang": "java", "sha1": "2b8019b6249bb05d81d3a3094e468753e2b21311", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_slf4j_slf4j_api", "actual": "@org_slf4j_slf4j_api//jar", "bind": "jar/org/slf4j/slf4j_api"}) callback({"artifact": "org.springframework:spring-aop:2.5.6.SEC03", "lang": "java", "sha1": "6468695557500723a18630b712ce112ec58827c1", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_springframework_spring_aop", "actual": "@org_springframework_spring_aop//jar", "bind": "jar/org/springframework/spring_aop"}) callback({"artifact": "org.springframework:spring-beans:2.5.6.SEC03", "lang": "java", "sha1": "79b2c86ff12c21b2420b4c46dca51f0e58762aae", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_springframework_spring_beans", "actual": "@org_springframework_spring_beans//jar", "bind": "jar/org/springframework/spring_beans"}) callback({"artifact": "org.springframework:spring-context-support:2.5.6.SEC03", "lang": "java", "sha1": "edf496f4ce066edc6b212e0e5521cb11ff97d55e", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_springframework_spring_context_support", "actual": "@org_springframework_spring_context_support//jar", "bind": "jar/org/springframework/spring_context_support"}) callback({"artifact": "org.springframework:spring-context:2.5.6.SEC03", "lang": "java", "sha1": "5f1c24b26308afedc48a90a1fe2ed334a6475921", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_springframework_spring_context", "actual": "@org_springframework_spring_context//jar", "bind": "jar/org/springframework/spring_context"}) callback({"artifact": "org.springframework:spring-core:2.5.6.SEC03", "lang": "java", "sha1": "644a23805a7ea29903bde0ccc1cd1a8b5f0432d6", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_springframework_spring_core", "actual": "@org_springframework_spring_core//jar", "bind": "jar/org/springframework/spring_core"}) callback({"artifact": "org.springframework:spring-dao:1.2.9", "lang": "java", "sha1": "6f90baf86fc833cac3c677a8f35d3333ed86baea", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_springframework_spring_dao", "actual": "@org_springframework_spring_dao//jar", "bind": "jar/org/springframework/spring_dao"}) callback({"artifact": "org.springframework:spring-jdbc:1.2.9", "lang": "java", "sha1": "8a81d42995e61e2deac49c2bc75cfacbb28e7218", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_springframework_spring_jdbc", "actual": "@org_springframework_spring_jdbc//jar", "bind": "jar/org/springframework/spring_jdbc"}) callback({"artifact": "org.springframework:spring-web:2.5.6.SEC03", "lang": "java", "sha1": "699f171339f20126f1d09dde2dd17d6db2943fce", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_springframework_spring_web", "actual": "@org_springframework_spring_web//jar", "bind": "jar/org/springframework/spring_web"}) callback({"artifact": "org.springframework:spring-webmvc:2.5.6.SEC03", "lang": "java", "sha1": "275c5ac6ade12819f49e984c8e06b114a4e23458", "repository": "https://repo.maven.apache.org/maven2/", "name": "org_springframework_spring_webmvc", "actual": "@org_springframework_spring_webmvc//jar", "bind": "jar/org/springframework/spring_webmvc"}) callback({"artifact": "oro:oro:2.0.8", "lang": "java", "sha1": "5592374f834645c4ae250f4c9fbb314c9369d698", "repository": "https://repo.maven.apache.org/maven2/", "name": "oro_oro", "actual": "@oro_oro//jar", "bind": "jar/oro/oro"}) callback({"artifact": "relaxngDatatype:relaxngDatatype:20020414", "lang": "java", "sha1": "de7952cecd05b65e0e4370cc93fc03035175eef5", "repository": "https://repo.maven.apache.org/maven2/", "name": "relaxngDatatype_relaxngDatatype", "actual": "@relaxngDatatype_relaxngDatatype//jar", "bind": "jar/relaxngDatatype/relaxngDatatype"}) callback({"artifact": "stax:stax-api:1.0.1", "lang": "java", "sha1": "49c100caf72d658aca8e58bd74a4ba90fa2b0d70", "repository": "https://repo.maven.apache.org/maven2/", "name": "stax_stax_api", "actual": "@stax_stax_api//jar", "bind": "jar/stax/stax_api"}) callback({"artifact": "xpp3:xpp3:1.1.4c", "lang": "java", "sha1": "9b988ea84b9e4e9f1874e390ce099b8ac12cfff5", "repository": "https://repo.maven.apache.org/maven2/", "name": "xpp3_xpp3", "actual": "@xpp3_xpp3//jar", "bind": "jar/xpp3/xpp3"})
def solve(lines): longest_intersec = [] for line in lines: (r1, r2) = line.split("-") (r1_start, r1_end) = map(int, r1.split(",")) (r2_start, r2_end) = map(int, r2.split(",")) current_longest_intersec = set(range(r1_start, r1_end + 1)) & set(range(r2_start, r2_end + 1)) if len(current_longest_intersec) > len(longest_intersec): longest_intersec = current_longest_intersec print(f"Longest intersection is {sorted(longest_intersec)} with length {len(longest_intersec)}") num_lines = int(input()) lines = [input() for _ in range(num_lines)] solve(lines)
valor_casa = float(input('QUAL O VALOR TOTAL DA CASA? ')) salario = float(input('QUAL O SEU SALARIO EM REAIS? ')) parcelas = int(input('QUANTOS ANOS QUER PAGAR A CASA ?? ')) parcelas = parcelas * 12 valor_parcela = valor_casa / parcelas if salario > (valor_parcela * 100) / 30: print('Emprestimo aprovado') else: print('Infelizmente o emprestimo foi negado') print('Você tem que pagar em {} meses o valor de R$ {:.2f} reais'.format(parcelas,valor_parcela))
def make_dist(): return default_python_distribution( python_version="3.8" ) def make_exe(dist): policy = dist.make_python_packaging_policy() policy.extension_module_filter = "all" # policy.file_scanner_classify_files = True policy.allow_files = True policy.file_scanner_emit_files = True # policy.include_classified_resources = True policy.resources_location = "in-memory" python_config = dist.make_python_interpreter_config() python_config.run_module = 'game' exe = dist.to_python_executable( name="synacor-challenge", packaging_policy=policy, config=python_config, ) exe.add_python_resources(exe.read_package_root( path=".", packages=["game", "machine", "datafiles"], )) exe.add_python_resources(exe.pip_download( ["-r", "requirements.txt"] )) return exe def make_embedded_resources(exe): return exe.to_embedded_resources() def make_install(exe): files = FileManifest() files.add_python_resource(".", exe) return files register_target("dist", make_dist) register_target("exe", make_exe, depends=["dist"], default=True) register_target("resources", make_embedded_resources, depends=["exe"], default_build_script=True) register_target("install", make_install, depends=["exe"]) resolve_targets() PYOXIDIZER_VERSION = "0.10.3" PYOXIDIZER_COMMIT = "UNKNOWN"
def double(num): return num * 2 # way 1 multiply = lambda x,y: x*y print(multiply(5,10)) # way 2 print((lambda x,y: x+y)(6, 82)) numbers = [23, 73, 62, 3] added = [ x*2 for x in numbers] print(added) added = [double(x) for x in numbers] print(added) added = [ (lambda x: x*2)(x) for x in numbers] print(added) added = map(double, numbers) print(added) print(list(added)) added = list(map(lambda x:x*2, numbers)) print(added)
class AspectManager(object): def __init__(self): super(AspectManager, self).__init__() def get_module_hooker(self, name): return None def load_aspects(self): pass
def percent(p): return (p/soma)*100 def b_mb(r): return float(r)/(1024**2) arq = open('usuarios.txt','r') cont = 0 l = [1,2,3,4,5,6] for linha in arq: linha= linha.strip() l[cont] = linha cont = cont + 1 p =[] for n in range(0,6): p.append(l[n].split()) arq.close() e=[1,2,3,4,5,6] soma = 0 for k in range(0,6): e[k] = b_mb(p[k][1]) soma = soma + e[k] ç = [1,2,3,4,5,6] for w in range(0,6): ç[w] = percent(e[w]) media = soma/6 for w in range(0,6): p[w][0] = p[w][0] + ' ' * (15 - len(p[w][0])) t = open('relatorio.txt','w') t.write('ACME Inc. Uso de espaço em disco pelo usuario \n') t.write('- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n') t.write('Nr . Usuário Espaço Utilizado % do uso \n') t.write('\n') t.write('\n') for y in range(0,6): t.write('{} {} {:>8.2f}MB {:>8.2f}%\n'.format(y+1,p[y][0],e[y],ç[y])) t.write('\n') t.write('\n') t.write('Espaço total ocupado: {:.2f}\n'.format(soma)) t.write('Espaço médio ocupado: {:.2f}'.format(media)) t.close()
SECRET_KEY = 'example' TIME_ZONE = 'Asia/Shanghai' DEFAULT_XFILES_FACTOR = 0 URL_PREFIX = '/' LOG_DIR = '/var/log/graphite' GRAPHITE_ROOT = '/opt/graphite' CONF_DIR = '/etc/graphite' DASHBOARD_CONF = '/etc/graphite/dashboard.conf' GRAPHTEMPLATES_CONF = '/etc/graphite/graphTemplates.conf' # STORAGE_DIR = '/opt/graphite/storage' # STATIC_ROOT = '/opt/graphite/static' # INDEX_FILE = '/opt/graphite/storage/index' # CERES_DIR = '/opt/graphite/storage/ceres' # WHISPER_DIR = '/opt/graphite/storage/whisper' # RRD_DIR = '/opt/graphite/storage/rrd' # MEMCACHE_HOSTS = ['10.10.10.10:11211', '10.10.10.11:11211', '10.10.10.12:11211'] STORAGE_FINDERS = ( 'graphite.graphouse.GraphouseFinder', )
n = int(input("Enter a number: ")) for x in range(1,16): print(n,"x",x,"=",(n*x))
# there are two ways of representing a graph # we can use an adjacency list # the other way is to use an adjacency matrix # its easier to represent weighted graphs using an adjacency matrix # we can represent a directed graph using both structures # so which is better # dense graph is where number of Edges is Vertex squared # sparese garph is where edges is equal to vertices # an adjacent list is faster and uses less space for sparse garphs # a con is that is it slower for dense graphs # Adjacency matrix is faster for dense graphs # simpler for weighted edges. # con is that it uses more space # implemetation of an undirected graph using adjacency lists # graphs and trees are recursive data strctures class Graph(): def __init__(self, edges): self.edges = edges self.graph_dict = {} for start, end in self.edges: if start in self.graph_dict: self.graph_dict[start].append(end) else: self.graph_dict[start] = [end] print("Graph Dictionary is ", self.graph_dict, "\n\n\n") def get_paths(self, start, end, path=[]): path = path+[start] if start == end: return [path] if start not in self.graph_dict: return [] paths = [] for node in self.graph_dict[start]: if node not in path: new_paths = self.get_paths(node, end, path) for p in new_paths: paths.append(p) return paths def get_shortest_path(self, start, end, path=[]): path = path+[start] if start == end: return path if start not in self.graph_dict: return [] shortest_path = None for node in self.graph_dict[start]: if node not in path: new_path = self.get_shortest_path(node, end, path) if shortest_path == None: shortest_path = new_path if len(new_path) < len(shortest_path): shortest_path = new_path return shortest_path if __name__ == '__main__': routes = [ ("Mumbai", "Paris"), ("Mumbai", "Dubai"), ("Paris", "Dubai"), ("Paris", "New York"), ("Dubai", "New York"), ("New York", "Toronto") ] route_graph = Graph(routes) start = "Paris" end = "Toronto" print("These are all the possible paths between", start, "and", end, "\n", route_graph.get_paths( start, end)) print("\nThe shortest path between", start, "and", end, route_graph.get_shortest_path(start, end)) # ┌───────► paris──────────────┐ # │ │ │ # │ │ │ # mumbai │ ▼ # │ │ new york──────────────► toronto # │ │ ◄┐ # │ │ │ # │ │ │ # │ ▼ │ # └────────►dubai ───────────────┘ # for reference
print('Digite três valores, para ver se é um trinângulo, e se forem se é um triânguulo escaleno, equilátero ou isóceles') A = float(input('Lado A: ')) B = float(input('Lado B: ')) C = float(input('Lado C: ')) soma = A + B soma1 = A + C soma2 = B + C if A and B and C < soma and soma1 and soma2: if A == B == C: print('Triângulo Equilátero') if A == B != C or A == C != B or B == C != A: print('Triângulo isóceles') if A != B and A != C and B != C: print('Triângulo escaleno') else: print('Não formam um triângulo')
# # PySNMP MIB module TIMETRA-LLDP-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/TIMETRA-LLDP-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 21:11:14 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # ObjectIdentifier, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsUnion, ValueSizeConstraint, SingleValueConstraint, ConstraintsIntersection, ValueRangeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "ValueSizeConstraint", "SingleValueConstraint", "ConstraintsIntersection", "ValueRangeConstraint") AddressFamilyNumbers, = mibBuilder.importSymbols("IANA-ADDRESS-FAMILY-NUMBERS-MIB", "AddressFamilyNumbers") ifIndex, = mibBuilder.importSymbols("IF-MIB", "ifIndex") LldpManAddrIfSubtype, lldpLocManAddr, LldpPortIdSubtype, LldpChassisIdSubtype, LldpPortId, LldpSystemCapabilitiesMap, LldpChassisId, lldpLocManAddrSubtype, LldpManAddress = mibBuilder.importSymbols("LLDP-MIB", "LldpManAddrIfSubtype", "lldpLocManAddr", "LldpPortIdSubtype", "LldpChassisIdSubtype", "LldpPortId", "LldpSystemCapabilitiesMap", "LldpChassisId", "lldpLocManAddrSubtype", "LldpManAddress") TimeFilter, ZeroBasedCounter32 = mibBuilder.importSymbols("RMON2-MIB", "TimeFilter", "ZeroBasedCounter32") SnmpAdminString, = mibBuilder.importSymbols("SNMP-FRAMEWORK-MIB", "SnmpAdminString") ObjectGroup, NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "ObjectGroup", "NotificationGroup", "ModuleCompliance") NotificationType, iso, Gauge32, IpAddress, Bits, ObjectIdentity, MibIdentifier, Unsigned32, TimeTicks, Counter64, Integer32, MibScalar, MibTable, MibTableRow, MibTableColumn, ModuleIdentity, Counter32 = mibBuilder.importSymbols("SNMPv2-SMI", "NotificationType", "iso", "Gauge32", "IpAddress", "Bits", "ObjectIdentity", "MibIdentifier", "Unsigned32", "TimeTicks", "Counter64", "Integer32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "ModuleIdentity", "Counter32") DisplayString, MacAddress, TextualConvention, TruthValue = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "MacAddress", "TextualConvention", "TruthValue") tmnxSRConfs, timetraSRMIBModules, tmnxSRNotifyPrefix, tmnxSRObjs = mibBuilder.importSymbols("TIMETRA-GLOBAL-MIB", "tmnxSRConfs", "timetraSRMIBModules", "tmnxSRNotifyPrefix", "tmnxSRObjs") TmnxEnabledDisabled, = mibBuilder.importSymbols("TIMETRA-TC-MIB", "TmnxEnabledDisabled") tmnxLldpMIBModule = ModuleIdentity((1, 3, 6, 1, 4, 1, 6527, 1, 1, 3, 59)) tmnxLldpMIBModule.setRevisions(('1909-02-28 00:00', '1902-02-02 02:00',)) if mibBuilder.loadTexts: tmnxLldpMIBModule.setLastUpdated('0902280000Z') if mibBuilder.loadTexts: tmnxLldpMIBModule.setOrganization('Alcatel-Lucent') tmnxLldpNotifications = MibIdentifier((1, 3, 6, 1, 4, 1, 6527, 3, 1, 3, 59)) tmnxLldpObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59)) tmnxLldpConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 6527, 3, 1, 1, 59)) tmnxLldpConfiguration = MibIdentifier((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1)) tmnxLldpStatistics = MibIdentifier((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 2)) tmnxLldpLocalSystemData = MibIdentifier((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 3)) tmnxLldpRemoteSystemsData = MibIdentifier((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4)) class TmnxLldpDestAddressTableIndex(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(1, 4096) class TmnxLldpManAddressIndex(TextualConvention, Integer32): status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1)) namedValues = NamedValues(("system", 1)) tmnxLldpTxCreditMax = MibScalar((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 100)).clone(5)).setMaxAccess("readwrite") if mibBuilder.loadTexts: tmnxLldpTxCreditMax.setStatus('current') tmnxLldpMessageFastTx = MibScalar((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 3600)).clone(1)).setUnits('seconds').setMaxAccess("readwrite") if mibBuilder.loadTexts: tmnxLldpMessageFastTx.setStatus('current') tmnxLldpMessageFastTxInit = MibScalar((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 8)).clone(4)).setMaxAccess("readwrite") if mibBuilder.loadTexts: tmnxLldpMessageFastTxInit.setStatus('current') tmnxLldpAdminStatus = MibScalar((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1, 4), TmnxEnabledDisabled()).setMaxAccess("readwrite") if mibBuilder.loadTexts: tmnxLldpAdminStatus.setStatus('current') tmnxLldpPortConfigTable = MibTable((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1, 5), ) if mibBuilder.loadTexts: tmnxLldpPortConfigTable.setStatus('current') tmnxLldpPortConfigEntry = MibTableRow((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1, 5, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"), (0, "TIMETRA-LLDP-MIB", "tmnxLldpPortCfgDestAddressIndex")) if mibBuilder.loadTexts: tmnxLldpPortConfigEntry.setStatus('current') tmnxLldpPortCfgDestAddressIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1, 5, 1, 1), TmnxLldpDestAddressTableIndex()) if mibBuilder.loadTexts: tmnxLldpPortCfgDestAddressIndex.setStatus('current') tmnxLldpPortCfgAdminStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1, 5, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("txOnly", 1), ("rxOnly", 2), ("txAndRx", 3), ("disabled", 4))).clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: tmnxLldpPortCfgAdminStatus.setStatus('current') tmnxLldpPortCfgNotifyEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1, 5, 1, 3), TruthValue().clone('false')).setMaxAccess("readwrite") if mibBuilder.loadTexts: tmnxLldpPortCfgNotifyEnable.setStatus('current') tmnxLldpPortCfgTLVsTxEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1, 5, 1, 4), Bits().clone(namedValues=NamedValues(("portDesc", 0), ("sysName", 1), ("sysDesc", 2), ("sysCap", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: tmnxLldpPortCfgTLVsTxEnable.setStatus('current') tmnxLldpConfigManAddrPortsTable = MibTable((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1, 6), ) if mibBuilder.loadTexts: tmnxLldpConfigManAddrPortsTable.setStatus('current') tmnxLldpConfigManAddrPortsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1, 6, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"), (0, "TIMETRA-LLDP-MIB", "tmnxLldpPortCfgDestAddressIndex"), (0, "TIMETRA-LLDP-MIB", "tmnxLldpPortCfgAddressIndex")) if mibBuilder.loadTexts: tmnxLldpConfigManAddrPortsEntry.setStatus('current') tmnxLldpPortCfgAddressIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1, 6, 1, 1), TmnxLldpManAddressIndex()) if mibBuilder.loadTexts: tmnxLldpPortCfgAddressIndex.setStatus('current') tmnxLldpPortCfgManAddrTxEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1, 6, 1, 2), TmnxEnabledDisabled().clone('disabled')).setMaxAccess("readwrite") if mibBuilder.loadTexts: tmnxLldpPortCfgManAddrTxEnabled.setStatus('current') tmnxLldpPortCfgManAddrSubtype = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1, 6, 1, 3), AddressFamilyNumbers()).setMaxAccess("readonly") if mibBuilder.loadTexts: tmnxLldpPortCfgManAddrSubtype.setStatus('current') tmnxLldpPortCfgManAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1, 6, 1, 4), LldpManAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: tmnxLldpPortCfgManAddress.setStatus('current') tmnxLldpDestAddressTable = MibTable((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1, 7), ) if mibBuilder.loadTexts: tmnxLldpDestAddressTable.setStatus('current') tmnxLldpDestAddressTableEntry = MibTableRow((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1, 7, 1), ).setIndexNames((0, "TIMETRA-LLDP-MIB", "tmnxLldpAddressTableIndex")) if mibBuilder.loadTexts: tmnxLldpDestAddressTableEntry.setStatus('current') tmnxLldpAddressTableIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1, 7, 1, 1), TmnxLldpDestAddressTableIndex()) if mibBuilder.loadTexts: tmnxLldpAddressTableIndex.setStatus('current') tmnxLldpDestMacAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 1, 7, 1, 2), MacAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: tmnxLldpDestMacAddress.setStatus('current') tmnxLldpStatsTxPortTable = MibTable((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 2, 1), ) if mibBuilder.loadTexts: tmnxLldpStatsTxPortTable.setStatus('current') tmnxLldpStatsTxPortEntry = MibTableRow((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 2, 1, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"), (0, "TIMETRA-LLDP-MIB", "tmnxLldpStatsTxDestMACAddress")) if mibBuilder.loadTexts: tmnxLldpStatsTxPortEntry.setStatus('current') tmnxLldpStatsTxDestMACAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 2, 1, 1, 1), TmnxLldpDestAddressTableIndex()) if mibBuilder.loadTexts: tmnxLldpStatsTxDestMACAddress.setStatus('current') tmnxLldpStatsTxPortFrames = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 2, 1, 1, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tmnxLldpStatsTxPortFrames.setStatus('current') tmnxLldpStatsTxLLDPDULengthErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 2, 1, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tmnxLldpStatsTxLLDPDULengthErrs.setStatus('current') tmnxLldpStatsRxPortTable = MibTable((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 2, 2), ) if mibBuilder.loadTexts: tmnxLldpStatsRxPortTable.setStatus('current') tmnxLldpStatsRxPortEntry = MibTableRow((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 2, 2, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"), (0, "TIMETRA-LLDP-MIB", "tmnxLldpStatsRxDestMACAddress")) if mibBuilder.loadTexts: tmnxLldpStatsRxPortEntry.setStatus('current') tmnxLldpStatsRxDestMACAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 2, 2, 1, 1), TmnxLldpDestAddressTableIndex()) if mibBuilder.loadTexts: tmnxLldpStatsRxDestMACAddress.setStatus('current') tmnxLldpStatsRxPortFrameDiscard = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 2, 2, 1, 2), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tmnxLldpStatsRxPortFrameDiscard.setStatus('current') tmnxLldpStatsRxPortFrameErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 2, 2, 1, 3), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tmnxLldpStatsRxPortFrameErrs.setStatus('current') tmnxLldpStatsRxPortFrames = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 2, 2, 1, 4), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tmnxLldpStatsRxPortFrames.setStatus('current') tmnxLldpStatsRxPortTLVDiscard = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 2, 2, 1, 5), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tmnxLldpStatsRxPortTLVDiscard.setStatus('current') tmnxLldpStatsRxPortTLVUnknown = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 2, 2, 1, 6), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tmnxLldpStatsRxPortTLVUnknown.setStatus('current') tmnxLldpStatsRxPortAgeouts = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 2, 2, 1, 7), ZeroBasedCounter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tmnxLldpStatsRxPortAgeouts.setStatus('current') tmnxLldpLocPortTable = MibTable((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 3, 1), ) if mibBuilder.loadTexts: tmnxLldpLocPortTable.setStatus('current') tmnxLldpLocPortEntry = MibTableRow((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 3, 1, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"), (0, "TIMETRA-LLDP-MIB", "tmnxLldpLocPortDestMACAddress")) if mibBuilder.loadTexts: tmnxLldpLocPortEntry.setStatus('current') tmnxLldpLocPortDestMACAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 3, 1, 1, 1), TmnxLldpDestAddressTableIndex()) if mibBuilder.loadTexts: tmnxLldpLocPortDestMACAddress.setStatus('current') tmnxLldpLocPortIdSubtype = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 3, 1, 1, 2), LldpPortIdSubtype()).setMaxAccess("readonly") if mibBuilder.loadTexts: tmnxLldpLocPortIdSubtype.setStatus('current') tmnxLldpLocPortId = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 3, 1, 1, 3), LldpPortId()).setMaxAccess("readonly") if mibBuilder.loadTexts: tmnxLldpLocPortId.setStatus('current') tmnxLldpLocPortDesc = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 3, 1, 1, 4), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: tmnxLldpLocPortDesc.setStatus('current') tmnxLldpRemTable = MibTable((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 1), ) if mibBuilder.loadTexts: tmnxLldpRemTable.setStatus('current') tmnxLldpRemEntry = MibTableRow((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 1, 1), ).setIndexNames((0, "TIMETRA-LLDP-MIB", "tmnxLldpRemTimeMark"), (0, "IF-MIB", "ifIndex"), (0, "TIMETRA-LLDP-MIB", "tmnxLldpRemLocalDestMACAddress"), (0, "TIMETRA-LLDP-MIB", "tmnxLldpRemIndex")) if mibBuilder.loadTexts: tmnxLldpRemEntry.setStatus('current') tmnxLldpRemTimeMark = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 1, 1, 1), TimeFilter()) if mibBuilder.loadTexts: tmnxLldpRemTimeMark.setStatus('current') tmnxLldpRemLocalDestMACAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 1, 1, 2), TmnxLldpDestAddressTableIndex()) if mibBuilder.loadTexts: tmnxLldpRemLocalDestMACAddress.setStatus('current') tmnxLldpRemIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 1, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647))) if mibBuilder.loadTexts: tmnxLldpRemIndex.setStatus('current') tmnxLldpRemChassisIdSubtype = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 1, 1, 4), LldpChassisIdSubtype()).setMaxAccess("readonly") if mibBuilder.loadTexts: tmnxLldpRemChassisIdSubtype.setStatus('current') tmnxLldpRemChassisId = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 1, 1, 5), LldpChassisId()).setMaxAccess("readonly") if mibBuilder.loadTexts: tmnxLldpRemChassisId.setStatus('current') tmnxLldpRemPortIdSubtype = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 1, 1, 6), LldpPortIdSubtype()).setMaxAccess("readonly") if mibBuilder.loadTexts: tmnxLldpRemPortIdSubtype.setStatus('current') tmnxLldpRemPortId = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 1, 1, 7), LldpPortId()).setMaxAccess("readonly") if mibBuilder.loadTexts: tmnxLldpRemPortId.setStatus('current') tmnxLldpRemPortDesc = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 1, 1, 8), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: tmnxLldpRemPortDesc.setStatus('current') tmnxLldpRemSysName = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 1, 1, 9), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: tmnxLldpRemSysName.setStatus('current') tmnxLldpRemSysDesc = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 1, 1, 10), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: tmnxLldpRemSysDesc.setStatus('current') tmnxLldpRemSysCapSupported = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 1, 1, 11), LldpSystemCapabilitiesMap()).setMaxAccess("readonly") if mibBuilder.loadTexts: tmnxLldpRemSysCapSupported.setStatus('current') tmnxLldpRemSysCapEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 1, 1, 12), LldpSystemCapabilitiesMap()).setMaxAccess("readonly") if mibBuilder.loadTexts: tmnxLldpRemSysCapEnabled.setStatus('current') tmnxLldpRemManAddrTable = MibTable((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 2), ) if mibBuilder.loadTexts: tmnxLldpRemManAddrTable.setStatus('current') tmnxLldpRemManAddrEntry = MibTableRow((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 2, 1), ).setIndexNames((0, "TIMETRA-LLDP-MIB", "tmnxLldpRemTimeMark"), (0, "IF-MIB", "ifIndex"), (0, "TIMETRA-LLDP-MIB", "tmnxLldpRemLocalDestMACAddress"), (0, "TIMETRA-LLDP-MIB", "tmnxLldpRemIndex"), (0, "TIMETRA-LLDP-MIB", "tmnxLldpRemManAddrSubtype"), (0, "TIMETRA-LLDP-MIB", "tmnxLldpRemManAddr")) if mibBuilder.loadTexts: tmnxLldpRemManAddrEntry.setStatus('current') tmnxLldpRemManAddrSubtype = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 2, 1, 1), AddressFamilyNumbers()) if mibBuilder.loadTexts: tmnxLldpRemManAddrSubtype.setStatus('current') tmnxLldpRemManAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 2, 1, 2), LldpManAddress()) if mibBuilder.loadTexts: tmnxLldpRemManAddr.setStatus('current') tmnxLldpRemManAddrIfSubtype = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 2, 1, 3), LldpManAddrIfSubtype()).setMaxAccess("readonly") if mibBuilder.loadTexts: tmnxLldpRemManAddrIfSubtype.setStatus('current') tmnxLldpRemManAddrIfId = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 2, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: tmnxLldpRemManAddrIfId.setStatus('current') tmnxLldpRemManAddrOID = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 3, 1, 2, 59, 4, 2, 1, 5), ObjectIdentifier()).setMaxAccess("readonly") if mibBuilder.loadTexts: tmnxLldpRemManAddrOID.setStatus('current') tmnxLldpCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 6527, 3, 1, 1, 59, 1)) tmnxLldpGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 6527, 3, 1, 1, 59, 2)) tmnxLldpCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 6527, 3, 1, 1, 59, 1, 1)).setObjects(("TIMETRA-LLDP-MIB", "tmnxLldpConfigGroup"), ("TIMETRA-LLDP-MIB", "tmnxLldpStatsRxGroup"), ("TIMETRA-LLDP-MIB", "tmnxLldpStatsTxGroup"), ("TIMETRA-LLDP-MIB", "tmnxLldpLocSysGroup"), ("TIMETRA-LLDP-MIB", "tmnxLldpRemSysGroup"), ("TIMETRA-LLDP-MIB", "tmnxLldpRemManAddrGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): tmnxLldpCompliance = tmnxLldpCompliance.setStatus('current') tmnxLldpConfigGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 6527, 3, 1, 1, 59, 2, 1)).setObjects(("TIMETRA-LLDP-MIB", "tmnxLldpTxCreditMax"), ("TIMETRA-LLDP-MIB", "tmnxLldpMessageFastTx"), ("TIMETRA-LLDP-MIB", "tmnxLldpMessageFastTxInit"), ("TIMETRA-LLDP-MIB", "tmnxLldpAdminStatus"), ("TIMETRA-LLDP-MIB", "tmnxLldpPortCfgAdminStatus"), ("TIMETRA-LLDP-MIB", "tmnxLldpPortCfgNotifyEnable"), ("TIMETRA-LLDP-MIB", "tmnxLldpPortCfgTLVsTxEnable"), ("TIMETRA-LLDP-MIB", "tmnxLldpPortCfgManAddrTxEnabled"), ("TIMETRA-LLDP-MIB", "tmnxLldpPortCfgManAddrSubtype"), ("TIMETRA-LLDP-MIB", "tmnxLldpPortCfgManAddress"), ("TIMETRA-LLDP-MIB", "tmnxLldpDestMacAddress")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): tmnxLldpConfigGroup = tmnxLldpConfigGroup.setStatus('current') tmnxLldpStatsRxGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 6527, 3, 1, 1, 59, 2, 2)).setObjects(("TIMETRA-LLDP-MIB", "tmnxLldpStatsRxPortFrameDiscard"), ("TIMETRA-LLDP-MIB", "tmnxLldpStatsRxPortFrameErrs"), ("TIMETRA-LLDP-MIB", "tmnxLldpStatsRxPortFrames"), ("TIMETRA-LLDP-MIB", "tmnxLldpStatsRxPortTLVDiscard"), ("TIMETRA-LLDP-MIB", "tmnxLldpStatsRxPortTLVUnknown"), ("TIMETRA-LLDP-MIB", "tmnxLldpStatsRxPortAgeouts")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): tmnxLldpStatsRxGroup = tmnxLldpStatsRxGroup.setStatus('current') tmnxLldpStatsTxGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 6527, 3, 1, 1, 59, 2, 3)).setObjects(("TIMETRA-LLDP-MIB", "tmnxLldpStatsTxPortFrames"), ("TIMETRA-LLDP-MIB", "tmnxLldpStatsTxLLDPDULengthErrs")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): tmnxLldpStatsTxGroup = tmnxLldpStatsTxGroup.setStatus('current') tmnxLldpLocSysGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 6527, 3, 1, 1, 59, 2, 4)).setObjects(("TIMETRA-LLDP-MIB", "tmnxLldpLocPortIdSubtype"), ("TIMETRA-LLDP-MIB", "tmnxLldpLocPortId"), ("TIMETRA-LLDP-MIB", "tmnxLldpLocPortDesc")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): tmnxLldpLocSysGroup = tmnxLldpLocSysGroup.setStatus('current') tmnxLldpRemSysGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 6527, 3, 1, 1, 59, 2, 5)).setObjects(("TIMETRA-LLDP-MIB", "tmnxLldpRemChassisIdSubtype"), ("TIMETRA-LLDP-MIB", "tmnxLldpRemChassisId"), ("TIMETRA-LLDP-MIB", "tmnxLldpRemPortIdSubtype"), ("TIMETRA-LLDP-MIB", "tmnxLldpRemPortId"), ("TIMETRA-LLDP-MIB", "tmnxLldpRemPortDesc"), ("TIMETRA-LLDP-MIB", "tmnxLldpRemSysName"), ("TIMETRA-LLDP-MIB", "tmnxLldpRemSysDesc"), ("TIMETRA-LLDP-MIB", "tmnxLldpRemSysCapSupported"), ("TIMETRA-LLDP-MIB", "tmnxLldpRemSysCapEnabled")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): tmnxLldpRemSysGroup = tmnxLldpRemSysGroup.setStatus('current') tmnxLldpRemManAddrGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 6527, 3, 1, 1, 59, 2, 6)).setObjects(("TIMETRA-LLDP-MIB", "tmnxLldpRemManAddrIfSubtype"), ("TIMETRA-LLDP-MIB", "tmnxLldpRemManAddrIfId"), ("TIMETRA-LLDP-MIB", "tmnxLldpRemManAddrOID")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): tmnxLldpRemManAddrGroup = tmnxLldpRemManAddrGroup.setStatus('current') mibBuilder.exportSymbols("TIMETRA-LLDP-MIB", tmnxLldpLocPortDestMACAddress=tmnxLldpLocPortDestMACAddress, tmnxLldpStatsRxPortTable=tmnxLldpStatsRxPortTable, tmnxLldpRemSysCapEnabled=tmnxLldpRemSysCapEnabled, tmnxLldpStatsRxPortFrameErrs=tmnxLldpStatsRxPortFrameErrs, tmnxLldpLocSysGroup=tmnxLldpLocSysGroup, tmnxLldpStatsTxPortTable=tmnxLldpStatsTxPortTable, tmnxLldpLocalSystemData=tmnxLldpLocalSystemData, tmnxLldpStatsTxPortEntry=tmnxLldpStatsTxPortEntry, tmnxLldpPortConfigTable=tmnxLldpPortConfigTable, tmnxLldpStatsTxDestMACAddress=tmnxLldpStatsTxDestMACAddress, tmnxLldpPortCfgTLVsTxEnable=tmnxLldpPortCfgTLVsTxEnable, tmnxLldpStatsRxDestMACAddress=tmnxLldpStatsRxDestMACAddress, tmnxLldpStatsRxPortFrames=tmnxLldpStatsRxPortFrames, tmnxLldpPortCfgManAddrSubtype=tmnxLldpPortCfgManAddrSubtype, tmnxLldpPortCfgAddressIndex=tmnxLldpPortCfgAddressIndex, tmnxLldpRemSysName=tmnxLldpRemSysName, tmnxLldpRemManAddrIfId=tmnxLldpRemManAddrIfId, tmnxLldpTxCreditMax=tmnxLldpTxCreditMax, tmnxLldpLocPortEntry=tmnxLldpLocPortEntry, tmnxLldpStatsRxPortEntry=tmnxLldpStatsRxPortEntry, tmnxLldpRemManAddr=tmnxLldpRemManAddr, tmnxLldpDestAddressTable=tmnxLldpDestAddressTable, tmnxLldpDestAddressTableEntry=tmnxLldpDestAddressTableEntry, tmnxLldpGroups=tmnxLldpGroups, tmnxLldpPortCfgManAddrTxEnabled=tmnxLldpPortCfgManAddrTxEnabled, tmnxLldpDestMacAddress=tmnxLldpDestMacAddress, tmnxLldpRemoteSystemsData=tmnxLldpRemoteSystemsData, tmnxLldpPortCfgDestAddressIndex=tmnxLldpPortCfgDestAddressIndex, tmnxLldpRemManAddrSubtype=tmnxLldpRemManAddrSubtype, tmnxLldpRemPortIdSubtype=tmnxLldpRemPortIdSubtype, tmnxLldpRemChassisIdSubtype=tmnxLldpRemChassisIdSubtype, tmnxLldpRemSysGroup=tmnxLldpRemSysGroup, tmnxLldpPortCfgNotifyEnable=tmnxLldpPortCfgNotifyEnable, tmnxLldpRemManAddrOID=tmnxLldpRemManAddrOID, tmnxLldpLocPortIdSubtype=tmnxLldpLocPortIdSubtype, PYSNMP_MODULE_ID=tmnxLldpMIBModule, tmnxLldpStatsRxPortFrameDiscard=tmnxLldpStatsRxPortFrameDiscard, tmnxLldpStatsRxPortAgeouts=tmnxLldpStatsRxPortAgeouts, tmnxLldpCompliances=tmnxLldpCompliances, tmnxLldpStatsRxPortTLVDiscard=tmnxLldpStatsRxPortTLVDiscard, tmnxLldpMIBModule=tmnxLldpMIBModule, TmnxLldpManAddressIndex=TmnxLldpManAddressIndex, tmnxLldpLocPortTable=tmnxLldpLocPortTable, tmnxLldpConfigManAddrPortsTable=tmnxLldpConfigManAddrPortsTable, tmnxLldpConfiguration=tmnxLldpConfiguration, tmnxLldpRemPortId=tmnxLldpRemPortId, tmnxLldpRemTable=tmnxLldpRemTable, tmnxLldpPortCfgManAddress=tmnxLldpPortCfgManAddress, tmnxLldpRemLocalDestMACAddress=tmnxLldpRemLocalDestMACAddress, tmnxLldpObjects=tmnxLldpObjects, tmnxLldpLocPortId=tmnxLldpLocPortId, tmnxLldpPortCfgAdminStatus=tmnxLldpPortCfgAdminStatus, tmnxLldpRemTimeMark=tmnxLldpRemTimeMark, tmnxLldpRemSysCapSupported=tmnxLldpRemSysCapSupported, tmnxLldpConfigGroup=tmnxLldpConfigGroup, tmnxLldpRemManAddrTable=tmnxLldpRemManAddrTable, tmnxLldpRemEntry=tmnxLldpRemEntry, tmnxLldpAddressTableIndex=tmnxLldpAddressTableIndex, tmnxLldpRemChassisId=tmnxLldpRemChassisId, tmnxLldpNotifications=tmnxLldpNotifications, tmnxLldpRemManAddrIfSubtype=tmnxLldpRemManAddrIfSubtype, tmnxLldpCompliance=tmnxLldpCompliance, tmnxLldpRemIndex=tmnxLldpRemIndex, tmnxLldpMessageFastTx=tmnxLldpMessageFastTx, tmnxLldpStatsTxLLDPDULengthErrs=tmnxLldpStatsTxLLDPDULengthErrs, TmnxLldpDestAddressTableIndex=TmnxLldpDestAddressTableIndex, tmnxLldpRemManAddrEntry=tmnxLldpRemManAddrEntry, tmnxLldpAdminStatus=tmnxLldpAdminStatus, tmnxLldpStatistics=tmnxLldpStatistics, tmnxLldpRemManAddrGroup=tmnxLldpRemManAddrGroup, tmnxLldpPortConfigEntry=tmnxLldpPortConfigEntry, tmnxLldpStatsTxGroup=tmnxLldpStatsTxGroup, tmnxLldpMessageFastTxInit=tmnxLldpMessageFastTxInit, tmnxLldpConfigManAddrPortsEntry=tmnxLldpConfigManAddrPortsEntry, tmnxLldpRemSysDesc=tmnxLldpRemSysDesc, tmnxLldpStatsRxPortTLVUnknown=tmnxLldpStatsRxPortTLVUnknown, tmnxLldpRemPortDesc=tmnxLldpRemPortDesc, tmnxLldpConformance=tmnxLldpConformance, tmnxLldpLocPortDesc=tmnxLldpLocPortDesc, tmnxLldpStatsRxGroup=tmnxLldpStatsRxGroup, tmnxLldpStatsTxPortFrames=tmnxLldpStatsTxPortFrames)
class kdtree: def __init__(self, points, dimensions): self.dimensions = dimensions self.tree = self._build([(i, p) for i,p in enumerate(points)]) def closest(self, point): return self._closest(self.tree, point) def _build(self,points, depth=0): n = len(points) if n<= 0: return None dimension = depth % self.dimensions sorted_points = sorted(points, key=lambda point:point[1][dimension]) mid = n//2 return { 'mid':sorted_points[mid], 'left':self._build(sorted_points[:mid], depth+1), 'right':self._build(sorted_points[mid+1:], depth+1) } def _distance(self, point, node): if point == None or node == None: return float('Inf') d = 0 for p,n in zip(list(point),list(node[1])): d += (p - n)**2 return d def _closest(self, root, point, depth=0): if root is None: return None dimension = depth % self.dimensions mid_point = root['mid'] next_branch = root['left'] if point[dimension] < mid_point[1][dimension] else root['right'] opposite_branch = root['right'] if point[dimension] < mid_point[1][dimension] else root['left'] best_in_next_branch = self._closest(next_branch, point, depth+1) distance_to_mid_point = self._distance(point, mid_point) distance_to_next_branch = self._distance(point, best_in_next_branch) best = best_in_next_branch if distance_to_next_branch < distance_to_mid_point else mid_point best_distance = min(distance_to_next_branch, distance_to_mid_point) if best_distance > abs(point[dimension] - mid_point[1][dimension]): best_in_opposite_branch = self._closest(opposite_branch, point, depth+1) distance_to_opposite_branch = self._distance(point, best_in_opposite_branch) best = best_in_opposite_branch if distance_to_opposite_branch < best_distance else best return best
def A_type_annotation(integer: int, boolean: bool, string: str): pass def B_annotation_as_documentation(argument: 'One of the usages in PEP-3107'): pass def C_annotation_and_default(integer: int=42, list_: list=None): pass def D_annotated_kw_only_args(*, kwo: int, with_default: str='value'): pass def E_annotated_varags_and_kwargs(*varargs: int, **kwargs: "This feels odd..."): pass
class Solution: def addSpaces(self, s: str, spaces: List[int]) -> str: ans = "" prev = 0 for sp in spaces: ans += s[prev:sp] + " " prev = sp return ans + s[prev:]
print('Congratulations on running this script!!') msg = 'hello world' print(msg)
def test_post_sub_category(app, client): mock_request_data = { "category_fk": "47314685-54c1-4863-9918-09f58b981eea", "name": "teste", "description": "testado testando" } response = client.post('/sub_categorys', json=mock_request_data) assert response.status_code == 201 expected = 'successfully registered' assert expected in response.get_data(as_text=True) def test_get_sub_categorys(app, client): response = client.get('/sub_categorys') assert response.status_code == 200 expected = 'successfully fetched' assert expected in response.get_data(as_text=True) def test_get_sub_category_by_id(app, client): response = client.get('/sub_categorys/d61829b1-3e6b-4cc5-83d4-8381b71a613c') assert response.status_code == 201 expected = 'successfully fetched' assert expected in response.get_data(as_text=True) def test_update_sub_catgeory(app, client): mock_request_data = { "category_fk": "47314685-54c1-4863-9918-09f58b981eea", "name": "teste update", "description": "update com sucesso" } response = client.put('/sub_categorys/d61829b1-3e6b-4cc5-83d4-8381b71a613c', json=mock_request_data) assert response.status_code == 201 expected = 'successfully updated' assert expected in response.get_data(as_text=True) def test_delete_sub_catgeory(app, client): response = client.delete('/sub_categorys/e59999a5-ba37-4e05-9b06-18ca88c3ffce') assert response.status_code == 404 expected = 'sub category dont exist' assert expected in response.get_data(as_text=True)
# %% class WalletSwiss: coversion_rates = {"usd" :1.10, "gpd": 0.81, "euro": 0.95, "yen": 123.84 } #shows swiss conversion rates for each each currency starting at $1 def __init__(self,currency_amount): self.currency_amount = currency_amount self.currency_type = "franc" def convert_currency(self,currency_type): conversion_rate = WalletSwiss.coversion_rates[currency_type] converted_amount = self.currency_amount * conversion_rate return converted_amount # TODO Updating conversion rate function # %%
# # from src/whrnd.c # # void init_rnd(int, int, int) to whrnd; .init # double rnd(void) to whrnd; .__call__ # class whrnd: def __init__(self, x=1, y=1, z=1): self.init(x, y, z) def init(self, x, y, z): self.x, self.y, self.z = x, y, z def __call__(self): self.x = 171 * (self.x % 177) - 2 * (self.x // 177) self.y = 172 * (self.y % 176) - 35 * (self.y // 176) self.z = 170 * (self.z % 178) - 63 * (self.z // 178) if self.x < 0: self.x += 30269 if self.y < 0: self.y += 30307 if self.z < 0: self.z += 30323 r = self.x / 30269 + self.y / 30307 + self.z / 30323 while r >= 1: r -= 1 return r
# Copyright 2019 École Polytechnique # # Authorship # Luciano Di Palma <luciano.di-palma@polytechnique.edu> # Enhui Huang <enhui.huang@polytechnique.edu> # Le Ha Vy Nguyen <nguyenlehavy@gmail.com> # Laurent Cetinsoy <laurent.cetinsoy@gmail.com> # # Disclaimer # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED # TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF # CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. SIMPLE_MARGIN_CONFIGURATION = { "activeLearner": {"name": "SimpleMargin", "params": {"C": 100000.0}}, "subsampling": 50000, } VERSION_SPACE_CONFIGURATION = { "activeLearner": { "name": "KernelVersionSpace", "params": { "decompose": True, "n_samples": 16, "warmup": 100, "thin": 100, "rounding": True, "rounding_cache": True, "rounding_options": {"strategy": "opt", "z_cut": True, "sphere_cuts": True}, }, }, "subsampling": 50000, } FACTORIZED_SIMPLE_MARGIN_CONFIGURATION = { "activeLearner": { "name": "FactorizedDualSpaceModel", "params": { "active_learner": {"name": "SimpleMargin", "params": {"C": 100000.0}} }, }, "subsampling": 50000, "factorization": { "partition": [[1, 3], [2]], }, } FACTORIZED_VERSION_SPACE_CONFIGURATION = { "activeLearner": { "name": "SubspatialVersionSpace", "params": { "loss": "PRODUCT", "decompose": True, "n_samples": 16, "warmup": 100, "thin": 100, "rounding": True, "rounding_cache": True, "rounding_options": {"strategy": "opt", "z_cut": True, "sphere_cuts": True}, }, }, "subsampling": 50000, "factorization": { "partition": [[1, 3], [2, 3]], }, }
# # PySNMP MIB module DNOS-DCBX-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/DNOS-DCBX-MIB # Produced by pysmi-0.3.4 at Wed May 1 12:51:23 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # ObjectIdentifier, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsIntersection, SingleValueConstraint, ValueSizeConstraint, ConstraintsUnion, ValueRangeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "SingleValueConstraint", "ValueSizeConstraint", "ConstraintsUnion", "ValueRangeConstraint") dnOS, = mibBuilder.importSymbols("DELL-REF-MIB", "dnOS") InterfaceIndex, = mibBuilder.importSymbols("IF-MIB", "InterfaceIndex") NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") MibScalar, MibTable, MibTableRow, MibTableColumn, IpAddress, Integer32, Counter32, MibIdentifier, TimeTicks, ObjectIdentity, NotificationType, Gauge32, ModuleIdentity, Unsigned32, Counter64, iso, Bits = mibBuilder.importSymbols("SNMPv2-SMI", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "IpAddress", "Integer32", "Counter32", "MibIdentifier", "TimeTicks", "ObjectIdentity", "NotificationType", "Gauge32", "ModuleIdentity", "Unsigned32", "Counter64", "iso", "Bits") TextualConvention, MacAddress, RowStatus, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "MacAddress", "RowStatus", "DisplayString") fastPathDCBX = ModuleIdentity((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58)) fastPathDCBX.setRevisions(('2011-04-20 00:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: fastPathDCBX.setRevisionsDescriptions(('Initial version.',)) if mibBuilder.loadTexts: fastPathDCBX.setLastUpdated('201101260000Z') if mibBuilder.loadTexts: fastPathDCBX.setOrganization('Dell, Inc.') if mibBuilder.loadTexts: fastPathDCBX.setContactInfo('') if mibBuilder.loadTexts: fastPathDCBX.setDescription('The MIB definitions Data Center Bridging Exchange Protocol.') class DcbxPortRole(TextualConvention, Integer32): description = '.' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4)) namedValues = NamedValues(("manual", 1), ("autoup", 2), ("autodown", 3), ("configSource", 4)) class DcbxVersion(TextualConvention, Integer32): description = '.' status = 'current' subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4)) namedValues = NamedValues(("auto", 1), ("ieee", 2), ("cin", 3), ("cee", 4)) agentDcbxGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1)) agentDcbxTable = MibTable((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 1), ) if mibBuilder.loadTexts: agentDcbxTable.setStatus('current') if mibBuilder.loadTexts: agentDcbxTable.setDescription('A table providing configuration of DCBX per interface.') agentDcbxEntry = MibTableRow((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 1, 1), ).setIndexNames((0, "DNOS-DCBX-MIB", "agentDcbxIntfIndex")) if mibBuilder.loadTexts: agentDcbxEntry.setStatus('current') if mibBuilder.loadTexts: agentDcbxEntry.setDescription('DCBX configuration for a port.') agentDcbxIntfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 1, 1, 1), InterfaceIndex()) if mibBuilder.loadTexts: agentDcbxIntfIndex.setStatus('current') if mibBuilder.loadTexts: agentDcbxIntfIndex.setDescription('This is a unique index for an entry in the agentDcbxTable. A non-zero value indicates the ifIndex for the corresponding interface entry in the ifTable.') agentDcbxAutoCfgPortRole = MibTableColumn((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 1, 1, 2), DcbxPortRole().clone(1)).setMaxAccess("readwrite") if mibBuilder.loadTexts: agentDcbxAutoCfgPortRole.setStatus('current') if mibBuilder.loadTexts: agentDcbxAutoCfgPortRole.setDescription(' Ports operating in the manual role do not have their configuration affected by peer devices or by internal propagation of configuration. These ports will advertise their configuration to their peer if DCBX is enabled on that port. Auto-up: Advertises a configuration, but is also willing to accept a configuration from the link-partner and propagate it internally to the auto-downstream ports as well as receive configuration propagated internally by other auto-upstream ports. Auto-down: Advertises a configuration but is not willing to accept one from the link partner. However, the port will accept a configuration propagated internally by the configuration source. Configuration Source:In this role, the port has been manually selected to be the configuration source. Configuration received over this port is propagated to the other auto-configuration ports.') agentDcbxVersion = MibTableColumn((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 1, 1, 3), DcbxVersion().clone(1)).setMaxAccess("readwrite") if mibBuilder.loadTexts: agentDcbxVersion.setStatus('deprecated') if mibBuilder.loadTexts: agentDcbxVersion.setDescription('CIN is Cisco Intel Nuova DCBX (version 1.0). CEE is converged enhanced ethernet DCBX (version 1.06). IEEE is 802-1 az version. The default value is auto. DCBX supports the legacy implementations v1.0 (CIN) and v1.06 (CEE) in addition to standard IEEE version 2.4 DCBX. 1.DCBX starts in standard IEEE mode by sending an IEEE standard version 2.4 DCBX frame. If the peer responds, then IEEE standard version 2.4 DCBX is used,Starts means after a link up, a DCBX timeout (or multiple peer condition) or when commanded by the network operator. If DCBX receives a DCBX frame with an OUI indicating a legacy version, it immediately switches into legacy mode for the detected version and does not wait for the 3x LLDP fast timeout. 2.If no IEEE DCBX response is received within 3 times the LLDP fast transmit timeout period, DCBX immediately transmits a version 1.06 DCBX frame with the appropriate version number. If DCBX receives a DCBX frame with an OUI indicating IEEE standard support, it immediately switches into IEEE standard mode and does not wait for the timer. If DCBX receives a DCBX frame with an OUI indicating legacy mode and a version number indicating version 1.0 support, it immediately switches into legacy 1.0 mode and does not wait for the timer. 3.If no version 1.06 response is received within 3 times the DCBX fast transmit timeout period, DCBX falls back to version 1.0 and immediately transmits a version 1.0 frame. If no response is received within 3 times the DCBX fast transmit period, DCBX waits the standard LLDP timeout period, and then begins again with step 1. If DCBX receives a DCBX frame with an OUI indicating IEEE standard mode, it immediately switches into IEEE standard mode.') agentDcbxSupportedTLVs = MibTableColumn((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 1, 1, 4), Bits().clone(namedValues=NamedValues(("pfc", 0), ("etsConfig", 1), ("etsRecom", 2), ("applicationPriority", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: agentDcbxSupportedTLVs.setStatus('current') if mibBuilder.loadTexts: agentDcbxSupportedTLVs.setDescription("Bitmap that includes the supported set of DCBX LLDP TLVs the device is capable of and whose transmission is allowed on the local LLDP agent by network management. Having the bit 'pfc(0)' set indicates that the LLDP transmit PFC TLV as part of DCBX TLVs. Having the bit 'etcConfig(1)' set indicates that the LLDP transmit ETS configuration TLV as part of DCBX TLVs. Having the bit 'etsRecom(2)' set indicates that transmit ETS Recomdenation TLV as part of DCBX TLVs. Having the bit 'applicationPriority(3)' set indicates that the LLDP transmit applicationPriority TLV as part of DCBX TLVs.") agentDcbxConfigTLVsTxEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 1, 1, 5), Bits().clone(namedValues=NamedValues(("pfc", 0), ("etsConfig", 1), ("etsRecom", 2), ("applicationPriority", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: agentDcbxConfigTLVsTxEnable.setStatus('current') if mibBuilder.loadTexts: agentDcbxConfigTLVsTxEnable.setDescription("Bitmap that includes the DCBX defined set of LLDP TLVs the device is capable of and whose transmission is allowed on the local LLDP agent by network management. Having the bit 'pfc(0)' set indicates that the LLDP transmit PFC TLV as part of DCBX TLVs. Having the bit 'etcConfig(1)' set indicates that the LLDP transmit ETS configuration TLV as part of DCBX TLVs. Having the bit 'etsRecom(2)' set indicates that transmit ETS Recomdenation TLV as part of DCBX TLVs. Having the bit 'applicationPriority(3)' set indicates that the LLDP transmit applicationPriority TLV as part of DCBX TLVs.") agentDcbxStatusTable = MibTable((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 2), ) if mibBuilder.loadTexts: agentDcbxStatusTable.setStatus('current') if mibBuilder.loadTexts: agentDcbxStatusTable.setDescription('.') agentDcbxStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 2, 1), ).setIndexNames((0, "DNOS-DCBX-MIB", "agentDcbxIntfIndex")) if mibBuilder.loadTexts: agentDcbxStatusEntry.setStatus('current') if mibBuilder.loadTexts: agentDcbxStatusEntry.setDescription('.') agentDcbxOperVersion = MibTableColumn((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 2, 1, 2), DcbxVersion().clone(1)).setMaxAccess("readonly") if mibBuilder.loadTexts: agentDcbxOperVersion.setStatus('current') if mibBuilder.loadTexts: agentDcbxOperVersion.setDescription('Specifies the DCBX mode in which the interface is currently operating.') agentDcbxPeerMACaddress = MibTableColumn((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 2, 1, 3), MacAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: agentDcbxPeerMACaddress.setStatus('current') if mibBuilder.loadTexts: agentDcbxPeerMACaddress.setDescription('MAC Address of the DCBX peer.') agentDcbxCfgSource = MibTableColumn((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 2, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 0))).clone(namedValues=NamedValues(("true", 1), ("false", 0)))).setMaxAccess("readonly") if mibBuilder.loadTexts: agentDcbxCfgSource.setStatus('current') if mibBuilder.loadTexts: agentDcbxCfgSource.setDescription('Indicates if this port is the source of configuration information for auto-* ports.') agentDcbxMultiplePeerCount = MibTableColumn((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 2, 1, 5), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: agentDcbxMultiplePeerCount.setStatus('current') if mibBuilder.loadTexts: agentDcbxMultiplePeerCount.setDescription('Indicates number of times multiple peers were detected. A duplicate peer is when more than one DCBX peer is detected on a port.') agentDcbxPeerRemovedCount = MibTableColumn((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 2, 1, 6), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: agentDcbxPeerRemovedCount.setStatus('current') if mibBuilder.loadTexts: agentDcbxPeerRemovedCount.setDescription('.') agentDcbxPeerOperVersionNum = MibTableColumn((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 2, 1, 7), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: agentDcbxPeerOperVersionNum.setStatus('current') if mibBuilder.loadTexts: agentDcbxPeerOperVersionNum.setDescription('Specifies the operational version of the peer DCBX device. Valid only when peer device is a CEE/CIN DCBX device.') agentDcbxPeerMaxVersion = MibTableColumn((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 2, 1, 8), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: agentDcbxPeerMaxVersion.setStatus('current') if mibBuilder.loadTexts: agentDcbxPeerMaxVersion.setDescription('Specifies the max version of the peer DCBX device. Valid only when peer device is CEE/CIN DCBX device.') agentDcbxSeqNum = MibTableColumn((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 2, 1, 9), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: agentDcbxSeqNum.setStatus('current') if mibBuilder.loadTexts: agentDcbxSeqNum.setDescription('Specifies the current sequence number that is sent in DCBX control TLVs in CEE/CIN Mode.') agentDcbxAckNum = MibTableColumn((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 2, 1, 10), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: agentDcbxAckNum.setStatus('current') if mibBuilder.loadTexts: agentDcbxAckNum.setDescription('Specifies the current ACK number that is to be sent to peer in DCBX control TLVs in CEE/CIN Mode.') agentDcbxPeerRcvdAckNum = MibTableColumn((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 2, 1, 11), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: agentDcbxPeerRcvdAckNum.setStatus('current') if mibBuilder.loadTexts: agentDcbxPeerRcvdAckNum.setDescription('Specifies the current ACK number that is sent by peer in DCBX control TLV in CEE/CIN Mode.') agentDcbxTxCount = MibTableColumn((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 2, 1, 12), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: agentDcbxTxCount.setStatus('current') if mibBuilder.loadTexts: agentDcbxTxCount.setDescription('The number of DCBX frames transmitted per interface.') agentDcbxRxCount = MibTableColumn((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 2, 1, 13), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: agentDcbxRxCount.setStatus('current') if mibBuilder.loadTexts: agentDcbxRxCount.setDescription('The number of DCBX frames received per interface.') agentDcbxErrorFramesCount = MibTableColumn((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 2, 1, 14), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: agentDcbxErrorFramesCount.setStatus('current') if mibBuilder.loadTexts: agentDcbxErrorFramesCount.setDescription('The number of DCBX frames discarded due to errors in the frame.') agentDcbxUnknownTLVsCount = MibTableColumn((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 2, 1, 15), Unsigned32()).setMaxAccess("readonly") if mibBuilder.loadTexts: agentDcbxUnknownTLVsCount.setStatus('current') if mibBuilder.loadTexts: agentDcbxUnknownTLVsCount.setDescription('The number of DCBX (PFC, ETS, Application Priority or other) TLVs not recognized.') agentDcbxGroupGlobalConfGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 3)) agentDcbxGlobalConfVersion = MibScalar((1, 3, 6, 1, 4, 1, 674, 10895, 5000, 2, 6132, 1, 1, 58, 1, 3, 1), DcbxVersion().clone(1)).setMaxAccess("readwrite") if mibBuilder.loadTexts: agentDcbxGlobalConfVersion.setStatus('current') if mibBuilder.loadTexts: agentDcbxGlobalConfVersion.setDescription('CIN is Cisco Intel Nuova DCBX (version 1.0). CEE is converged enhanced ethernet DCBX (version 1.06). IEEE is 802-1 az version. The default value is auto. DCBX supports the legacy implementations v1.0 (CIN) and v1.06 (CEE) in addition to standard IEEE version 2.4 DCBX. 1.DCBX starts in standard IEEE mode by sending an IEEE standard version 2.4 DCBX frame. If the peer responds, then IEEE standard version 2.4 DCBX is used,Starts means after a link up, a DCBX timeout (or multiple peer condition) or when commanded by the network operator. If DCBX receives a DCBX frame with an OUI indicating a legacy version, it immediately switches into legacy mode for the detected version and does not wait for the 3x LLDP fast timeout. 2.If no IEEE DCBX response is received within 3 times the LLDP fast transmit timeout period, DCBX immediately transmits a version 1.06 DCBX frame with the appropriate version number. If DCBX receives a DCBX frame with an OUI indicating IEEE standard support, it immediately switches into IEEE standard mode and does not wait for the timer. If DCBX receives a DCBX frame with an OUI indicating legacy mode and a version number indicating version 1.0 support, it immediately switches into legacy 1.0 mode and does not wait for the timer. 3.If no version 1.06 response is received within 3 times the DCBX fast transmit timeout period, DCBX falls back to version 1.0 and immediately transmits a version 1.0 frame. If no response is received within 3 times the DCBX fast transmit period, DCBX waits the standard LLDP timeout period, and then begins again with step 1. If DCBX receives a DCBX frame with an OUI indicating IEEE standard mode, it immediately switches into IEEE standard mode.') mibBuilder.exportSymbols("DNOS-DCBX-MIB", agentDcbxGroupGlobalConfGroup=agentDcbxGroupGlobalConfGroup, agentDcbxOperVersion=agentDcbxOperVersion, agentDcbxAckNum=agentDcbxAckNum, agentDcbxSupportedTLVs=agentDcbxSupportedTLVs, agentDcbxStatusEntry=agentDcbxStatusEntry, agentDcbxUnknownTLVsCount=agentDcbxUnknownTLVsCount, agentDcbxEntry=agentDcbxEntry, agentDcbxTable=agentDcbxTable, agentDcbxRxCount=agentDcbxRxCount, agentDcbxPeerRemovedCount=agentDcbxPeerRemovedCount, agentDcbxCfgSource=agentDcbxCfgSource, agentDcbxPeerRcvdAckNum=agentDcbxPeerRcvdAckNum, agentDcbxVersion=agentDcbxVersion, DcbxPortRole=DcbxPortRole, agentDcbxGroup=agentDcbxGroup, agentDcbxPeerOperVersionNum=agentDcbxPeerOperVersionNum, agentDcbxPeerMaxVersion=agentDcbxPeerMaxVersion, fastPathDCBX=fastPathDCBX, agentDcbxIntfIndex=agentDcbxIntfIndex, agentDcbxStatusTable=agentDcbxStatusTable, agentDcbxAutoCfgPortRole=agentDcbxAutoCfgPortRole, DcbxVersion=DcbxVersion, PYSNMP_MODULE_ID=fastPathDCBX, agentDcbxTxCount=agentDcbxTxCount, agentDcbxErrorFramesCount=agentDcbxErrorFramesCount, agentDcbxConfigTLVsTxEnable=agentDcbxConfigTLVsTxEnable, agentDcbxPeerMACaddress=agentDcbxPeerMACaddress, agentDcbxGlobalConfVersion=agentDcbxGlobalConfVersion, agentDcbxMultiplePeerCount=agentDcbxMultiplePeerCount, agentDcbxSeqNum=agentDcbxSeqNum)
description = 'system setup' group = 'lowlevel' display_order = 90 sysconfig = dict( cache = 'localhost', instrument = 'NEUTRA', experiment = 'Exp', datasinks = ['conssink', 'dmnsink', 'livesink', 'asciisink', 'shuttersink'], notifiers = ['email'], ) requires = ['shutters'] modules = [ 'nicos.commands.standard', 'nicos_sinq.commands.sics', 'nicos.commands.imaging', 'nicos_sinq.commands.hmcommands', 'nicos_sinq.commands.epicscommands'] includes = ['notifiers'] devices = dict( NEUTRA = device('nicos.devices.instrument.Instrument', description = 'instrument object', instrument = 'SINQ NEUTRA', responsible = 'Pavel Trtik <pavel.trtik@psi.ch>', operators = ['Paul-Scherrer-Institut (PSI)'], facility = 'SINQ, PSI', doi = 'http://dx.doi.org/10.1080/10589750108953075', website = 'https://www.psi.ch/sinq/NEUTRA/', ), Sample = device('nicos.devices.experiment.Sample', description = 'The defaultsample', ), Exp = device('nicos_sinq.devices.experiment.SinqExperiment', description = 'experiment object', dataroot = configdata('config.DATA_PATH'), sendmail = False, serviceexp = 'Service', sample = 'Sample', ), Space = device('nicos.devices.generic.FreeSpace', description = 'The amount of free space for storing data', path = None, minfree = 5, ), conssink = device('nicos.devices.datasinks.ConsoleScanSink'), asciisink = device('nicos.devices.datasinks.AsciiScanfileSink', filenametemplate = ['neutra%(year)sn%(scancounter)06d.dat'] ), dmnsink = device('nicos.devices.datasinks.DaemonSink'), livesink = device('nicos.devices.datasinks.LiveViewSink', description = "Sink for forwarding live data to the GUI", ), img_index = device('nicos.devices.generic.manual.ManualMove', description = 'Keeps the index of the last measured image', unit = '', abslimits = (0, 1e9), visibility = set(), ), )
''' 给你一个字符串 s,由若干单词组成,单词之间用空格隔开。返回字符串中最后一个单词的长度。如果不存在最后一个单词,请返回 0 。 ''' class Solution: def lengthOfLastWord(self, s: str) -> int: length = 0 start = False for i in range(len(s) - 1, -1, -1): if not start and s[i] == ' ': pass elif not start: length += 1 start = True elif s[i] != ' ': length += 1 else: return length return length s = Solution() print(s.lengthOfLastWord("Hello World") == 5) print(s.lengthOfLastWord(" ") == 0)
# 幸运N串,允许最多改变两个大写字母,求得最大的N串长度 tests = [ 'NNNGN', 'NNNNNSSNN', 'NNNNXXNNXXNNNNNNN', 'NNNXNNNNNNXNNNNNNXXNNNNNNNNNNNNNNNNN' ] def lucky(string): # 存放最终结果 best = 0 # 记录可以改变的次数 chance = 0 # 记录回溯位置 back = [0, 0] # 当前长度 length = 0 # 字符串索引 i = 0 while i < len(string): c = string[i] # 如果是N,直接加 if c == 'N': length += 1 i += 1 # 如果不是N,但还有改变次数 elif chance < 2: length += 1 # 记录需要改变的位置,用于回溯 back[chance] = i chance += 1 i += 1 else: # 否则进行回溯 best = max(length, best) chance = 0 length = 0 # 回溯 if back[0] + 1 == back[1]: i = back[1] + 1 else: i = back[0] + 1 best = max(best, length) return best for s in tests: best = lucky(s) print(best)
''' Log in color from https://stackoverflow.com/questions/287871/how-to-print-colored-text-in-terminal-in-python usage : import log log.info("Hello World") log.err("System Error") ''' HEADER = '\033[95m' OKBLUE = '\033[94m' OKGREEN = '\033[92m' WARNING = '\033[93m' FAIL = '\033[91m' ENDC = '\033[0m' BOLD = "\033[1m" def disable(): HEADER = '' OKBLUE = '' OKGREEN = '' WARNING = '' FAIL = '' ENDC = '' def infog( msg): print(OKGREEN + msg + ENDC) def info( msg): print(OKBLUE + msg + ENDC) def warn( msg): print(WARNING + msg + ENDC) def err( msg): print(FAIL + msg + ENDC)
class SpecialError(Exception): """ Exception raised when there is an error while parsing a special. """ def __init__(self, attribute, content=None): self.attribute = attribute self.content = content def __str__(self): return (f"Unable to parse '{self.attribute}'\n" f"Content: '{self.content}'\n")
shema = """ ------------------- | {} | {} | {} | | {} | {} | {} | | {} | {} | {} | ------------------- """ print(""" --------------------------------- | Tik-Tac-Toe | --------------------------------- | Yapımcı : Beetlejuicetr (MID) | | Dil : Python 3.9.7 | | Sürüm : v1.1 | --------------------------------- {} """.format(shema.format(" "," "," "," "," "," "," "," "," "))) slots=" " newslot = "" hamle_sayisi = 0 while True: if hamle_sayisi == 9: print("Berabere !") break birinciOyuncu = input("Birinci oyuncu (1-9) : ") # Birinci oyuncudan bir yer seçmesini istiyorum try: # her hangi bir hata olursa bunu idare edelim diye try kullanıyorum newslot = "" # yeni olusturulacak slotu temizliyorum bir birini kopyalama olmasın birinciOyuncu = int(birinciOyuncu) # oyuncudan aldığım değeri sayıya çeviriyorum if birinciOyuncu <= 9 and birinciOyuncu >= 0: # Oyuncunun girdiği değeri kontrol ediyorum 0-9 arasında girmesi gerekli! for i in range(0,9): # oyuncunun seçtiği yere işaret koymak için for döngüsüyle #print("newslot",newslot) if i == birinciOyuncu -1: # oyuncunun girdiği sayı mı değil mi? kontrol ediyorum if slots[i] != "O" and slots[i] != "X": # oyuncunun sayısı her hangi bir işaretle çakışıyor mu? newslot = newslot + "X" # Hiç bir karakterle çakışmıyorsa karakterimizi ekliyorum hamle_sayisi += 1 # Seçimimiz başka bir karakterle çakışırsa gösterilecek mesaj else: print("\nBurası zaten dolu!") print("Üzgünüm fakat artık sıran 2.oyuncuya geçti :/ \n") newslot = newslot + slots[i] else: # oyuncumuzun girdiği sayı değilse yapılacak işlem newslot = newslot + slots[i] slots = newslot # Yukarıda oyuncumuzun girdisiyle oluşan yeni tabloyu kullanıdığımız tabloya aktarıyorum print(shema.format(slots[0],slots[1],slots[2],slots[3],slots[4],slots[5],slots[6],slots[7],slots[8])) # tabloyu gösterir # Başarım durumları # Soldaçn - Sağa if slots[0] == slots[1] == slots[2] == "X": print("Birinci oyuncu kazandı!") break elif slots[3] == slots[4] == slots[5] == "X": print("Birinci oyuncu kazandı!") break elif slots[6] == slots[7] == slots[8] == "X": print("Birinci oyuncu kazandı!") break # Yukarıdan - Aşağıya elif slots[0] == slots[3] == slots[6] == "X": print("Birinci oyuncu kazandı!") break elif slots[1] == slots[4] == slots[7] == "X": print("Birinci oyuncu kazandı!") break elif slots[2] == slots[5] == slots[8] == "X": print("Birinci oyuncu kazandı!") break # Çapraz elif slots[0] == slots[4] == slots[8] == "X": print("Birinci oyuncu kazandı!") break elif slots[2] == slots[4] == slots[6] == "X": print("Birinci oyuncu kazandı!") break pass else: # oyuncunun girdiği sayı istediğimiz sayı aralığının dışındaysa print("Sadece 1 ve 9 arasında sayı giriniz!") break #------------------------------------------------------------------------# # ---------- Üstteki Aynı Açıklamalar 2. Oyuncu içinde Geçerli ----------# #------------------------------------------------------------------------# newslot = "" ikinciOyuncu = input("İkinci oyuncu (1-9) : ") ikinciOyuncu = int(ikinciOyuncu) if ikinciOyuncu <= 9 and ikinciOyuncu >= 0: for i in range(0,9): #print("newslot",newslot) if i == ikinciOyuncu -1: if slots[i] != "X" and slots[i] != "O": newslot = newslot + "O" hamle_sayisi += 1 else: print("\nBurası zaten dolu!") print("Üzgünüm fakat artık sıran 1.oyuncuya geçti :/ \n") newslot = newslot + slots[i] else: newslot = newslot + slots[i] slots = newslot print(shema.format(slots[0],slots[1],slots[2],slots[3],slots[4],slots[5],slots[6],slots[7],slots[8])) # Soldan - Sağa if slots[0] == slots[1] == slots[2] == "O": print("İkinci oyuncu kazandı!") break elif slots[3] == slots[4] == slots[5] == "O": print("İkinci oyuncu kazandı!") break elif slots[6] == slots[7] == slots[8] == "O": print("İkinci oyuncu kazandı!") break # Yukarıdan - Aşağıya elif slots[0] == slots[3] == slots[6] == "O": print("İkinci oyuncu kazandı!") break elif slots[1] == slots[4] == slots[7] == "O": print("İkinci oyuncu kazandı!") break elif slots[2] == slots[5] == slots[8] == "O": print("İkinci oyuncu kazandı!") break # Çapraz elif slots[0] == slots[4] == slots[8] == "O": print("İkinci oyuncu kazandı!") break elif slots[2] == slots[4] == slots[6] == "O": print("İkinci oyuncu kazandı!") break pass else: print("Sadece 1 ve 9 arasında sayı giriniz!") break except ValueError: # sayı dışında bir karakter girildiğinde çıkarılacak hata print("Hata! Sadece sayı giriniz.") break pass
#!/usr/bin/python # # Provides __ROR4__, __ROR8__, __ROL4__ and __ROL8__ functions. # # Author: Satoshi Tanda # ################################################################################ # The MIT License (MIT) # # Copyright (c) 2014 tandasat # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software without restriction, including without limitation the rights to # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ################################################################################ def _rol(val, bits, bit_size): return (val << bits % bit_size) & (2 ** bit_size - 1) | \ ((val & (2 ** bit_size - 1)) >> (bit_size - (bits % bit_size))) def _ror(val, bits, bit_size): return ((val & (2 ** bit_size - 1)) >> bits % bit_size) | \ (val << (bit_size - (bits % bit_size)) & (2 ** bit_size - 1)) __ROR4__ = lambda val, bits: _ror(val, bits, 32) __ROR8__ = lambda val, bits: _ror(val, bits, 64) __ROL4__ = lambda val, bits: _rol(val, bits, 32) __ROL8__ = lambda val, bits: _rol(val, bits, 64) print('__ROR4__, __ROR8__, __ROL4__ and __ROL8__ were defined.') print('Try this in the Python interpreter:') print('hex(__ROR8__(0xD624722D3A28E80F, 0xD6))')
#crie um pgm q pergunte a dist de uma viagem em Km. #Calcule o preço da passagem, cobrando R$0,50 por Km para viagens de até 200Km e R$0,45 para viagens mais longas. viagem = int(input('Digite a distancia da viagem: Km')) '''if viagem <= 200: print('O valor da passagem esta R${:.2f}, boa viagem'.format(viagem * 0.50)) else: print('Sua passagem teve R${:.2f} de desconto e sai por R${:.2f}. Boa viagem.'.format(viagem * 0.05, viagem * 0.45))''' preço = viagem * 0.50 if viagem <= 200 else viagem * 0.45 print('E o preço da sua passagem será de R${:.2f}'.format(preço))
''' PARTITION PROBLEM The problem is to identify if a given set of n elements can be divided into two separate subsets such that sum of elements of both the subsets is equal. ''' def check(a, total, ind): if total == 0: return True if ind == -1 or total < 0: return False if a[ind] > total: return check(a, total, ind - 1) return check(a, total - a[ind], ind - 1) or \ check(a, total, ind - 1) n = int(input()) a = [] total = 0 for i in range(0, n): a.append(int(input())) total = total + a[i] if total % 2 == 1: print("Not Possible") else: if check(a, total / 2, n - 1): print("Possible") else: print("Not Possible") ''' INPUT : n = 4 a = [1, 4, 3, 2] OUTPUT : Possible VERIFICATION : Set can be divided into two sets : [1, 4] and [3, 2], both of whose sum is 5. '''
n = int(input()) arr = list(map(str, input().split()))[:n] ans = "" for i in range(len(arr)): ans += chr(int(arr[i], 16)) print(ans)
# File: D (Python 2.4) GAME_DURATION = 300 GAME_COUNTDOWN = 10 GAME_OFF = 0 GAME_ON = 1 COOP_MODE = 0 TEAM_MODE = 1 FREE_MODE = 2 SHIP_DEPOSIT = 0 AV_DEPOSIT = 1 AV_MAX_CARRY = 200 GameTypes = [ 'Cooperative', 'Team vs. Team', 'Free For All'] TeamNames = [ 'Red', 'Blue', 'Green', 'Orange', 'England', 'France', 'Iraq'] TeamColors = [ (0.58799999999999997, 0.0, 0.058999999999999997), (0.031, 0.65900000000000003, 1.0), (0.0, 0.63900000000000001, 0.36899999999999999), (0.62, 0.47099999999999997, 0.81200000000000006), (0.10000000000000001, 0.10000000000000001, 0.20000000000000001), (0.20000000000000001, 0.10000000000000001, 0.10000000000000001), (0.10000000000000001, 0.10000000000000001, 0.10000000000000001)] TeamSpawnPoints = [ [ (-759, -45, 9.0999999999999996, -24, 0, 0)], [ (-760, -43, 9.0999999999999996, -24, 0, 0), (761, 70, 9.0999999999999996, 117, 0, 0)], [ (-760, -43, 9.0999999999999996, -133, 0, 0), (761, 70, 9.0999999999999996, 117, 0, 0), (-5, 760, 9.0999999999999996, -171, 0, 0), (-43, -760, 9.0999999999999996, 32, 0, 0)]] PlayerTeams = [ [ 0, 0, 0, 0], [ 0, 0, 1, 1], [ 0, 1, 2, 3]] PlayerShipIndex = 0 NumPlayerShips = [ 2, 2, 4] ShipPos = [ [ (-688, 10.800000000000001, 0, -21, 0, 0), (-708, -65, 0, -30, 0, 0)], [ (-688, 10.800000000000001, 0, -21, 0, 0), (688, -10, 0, 158, 0, 0)], [ (-688, 10.800000000000001, 0, -21, 0, 0), (688, -10, 0, 158, 0, 0), (-10.800000000000001, 688.0, 0, -111, 0, 0), (10.800000000000001, -688.0, 0, 65, 0, 0)]] ShipTeams = [ [ 0, 0], [ 0, 1], [ 0, 1, 2, 3]] AITeams = [ [ 4, 5], [ 4, 5], [ 4, 5]] SHIP_MAX_GOLD = [ 1000, 5000] SHIP_MAX_HP = [ 300, 1000] SHIP_CANNON_DAMAGE = [ 25, 25] NUM_AI_SHIPS = 6 Teams = [ [ 0], [ 0, 1], [ 0, 1, 2, 3]] TreasureSpawnPoints = [ (-578.0, -116.233, 0), (-477.43847656299999, 24.839570999100001, 0.0), (22.945888519299999, 474.46429443400001, 0.0), (577.84405517599998, 355.778076172, 0.0), (518.77471923799999, -544.80145263700001, 0.0)] DemoPlayerDNAs = [ ('sf', 'a', 'a', 'm'), ('ms', 'b', 'b', 'm'), ('tm', 'c', 'c', 'm'), ('tp', 'd', 'd', 'm')]
# -*- coding: utf-8 -*- """ Created on Wed Dec 19 13:58:37 2018 @author: Nihar """ sqr=[] for i in range(10): sq=(i+1)*(i+1) sqr.append(sq) print(sqr) cube=[] for i in range(10): sq=(i+1)**3 cube.append(sq) print(cube)
""" PredictGrade.py ================================================ This module contains the runner code for the predict grade package. """ # from DataSet import DataSet # from Models import Models # from Predictor import Predictor # from ModelType import ModelType # from Grade import Grade # from TextInterface import TextInterface DATA_PATH = "gradesComparison.cvs" NUM_COLUMNS = 2 VALIDATION_SIZE = 5 SEED = 7 def main(dataLocation : str, numColumns : int, validationSize : int, seed : int) -> None: """ This method is the runner for the predict gardes package. The method initialises all the other neccessary objects and then created a peciction based upon the model selected and the inputted data from the user. :param dataLocation: The path of the database (.csv) file which holds the existing data to be used by the sklearn model. :type dataLocation: string :param numColumns: The number of columns in the dataset. :type numCulumns: integer :param validationSize: The validation size of the data set. :type validationSize: integer :param seed: The seed of the data set. :type seed: integer :return : None :rtype : None """ # Initialise the objects currentInterface = TextInterface() data = DataSet(dataLocation, numColumns, validationSize, seed) models = Models() # Get the user's data for the predicted grade inputedPredictions = currentInterface.getPredictionValue() # Calculate the prediction newPredictionMeathod = Predictor(ModelType.KNeighborsClassifier, data) prediction = newPredictionMeathod.predict(inputedPredictions) # Display the prediction currentInterface.showPrediction(Grade(prediction)) if __name__ == "__main__": main(DATA_PATH, NUM_COLUMNS, VALIDATION_SIZE, SEED)
"""Coins. Given an infinite supply of quarters dimes, nickels, and pennies, wrote code to represent the number of ways to represent n cents. """ def calc_num_coins(n): """Calc the num of coins.""" def add_coin(total=0): """.""" if total > n: return 0 if total == n: return 1 return add_coin(total + 1) + add_coin(total + 5) + add_coin(total + 10) + add_coin(total + 25) return add_coin()
#!/usr/bin/python class TaggedAttribute(object): """Simple container object to tag values with attributes. Feel free to initialize any node with a TA instead of its actual value only and it will then have the desired metadata. For example: from pylink import TaggedAttribute as TA tx_power = TA(2, part_number='234x', test_report='http://reports.co/234x') m = DAGModel([pylink.Transmitter(tx_power_at_pa_dbw=tx_power)]) """ def __init__(self, value, **kwargs): self.meta = kwargs self.value = value