content
stringlengths 7
1.05M
| fixed_cases
stringlengths 1
1.28M
|
|---|---|
SUCCESS_RESPONSE_CODE = 'Success'
METHOD_NOT_ALLOWED = 'Failure'
UNAUTHORIZED = 'Warning'
SUCCESS_RESPONSE_CREATED = 'Success'
PAGE_NOT_FOUND = 'Error'
INTERNAL_SERVER_ERROR = 'Error'
BAD_REQUEST_CODE = 'Error'
SUCCESS_MESSAGE = 'Success'
FAILURE_MESSAGE = 'Failure'
|
success_response_code = 'Success'
method_not_allowed = 'Failure'
unauthorized = 'Warning'
success_response_created = 'Success'
page_not_found = 'Error'
internal_server_error = 'Error'
bad_request_code = 'Error'
success_message = 'Success'
failure_message = 'Failure'
|
class Stream(MarshalByRefObject):
""" Provides a generic view of a sequence of bytes. """
def ZZZ(self):
"""hardcoded/mock instance of the class"""
return Stream()
instance=ZZZ()
"""hardcoded/returns an instance of the class"""
def BeginRead(self,buffer,offset,count,callback,state):
"""
BeginRead(self: Stream,buffer: Array[Byte],offset: int,count: int,callback: AsyncCallback,state: object) -> IAsyncResult
Begins an asynchronous read operation.
buffer: The buffer to read the data into.
offset: The byte offset in buffer at which to begin writing data read from the stream.
count: The maximum number of bytes to read.
callback: An optional asynchronous callback,to be called when the read is complete.
state: A user-provided object that distinguishes this particular asynchronous read request from other requests.
Returns: An System.IAsyncResult that represents the asynchronous read,which could still be pending.
"""
pass
def BeginWrite(self,buffer,offset,count,callback,state):
"""
BeginWrite(self: Stream,buffer: Array[Byte],offset: int,count: int,callback: AsyncCallback,state: object) -> IAsyncResult
Begins an asynchronous write operation.
buffer: The buffer to write data from.
offset: The byte offset in buffer from which to begin writing.
count: The maximum number of bytes to write.
callback: An optional asynchronous callback,to be called when the write is complete.
state: A user-provided object that distinguishes this particular asynchronous write request from other requests.
Returns: An IAsyncResult that represents the asynchronous write,which could still be pending.
"""
pass
def Close(self):
"""
Close(self: Stream)
Closes the current stream and releases any resources (such as sockets and file handles) associated with the current stream.
"""
pass
def CopyTo(self,destination,bufferSize=None):
"""
CopyTo(self: Stream,destination: Stream)
Reads the bytes from the current stream and writes them to the destination stream.
destination: The stream that will contain the contents of the current stream.
CopyTo(self: Stream,destination: Stream,bufferSize: int)
Reads all the bytes from the current stream and writes them to a destination stream,using a specified buffer size.
destination: The stream that will contain the contents of the current stream.
bufferSize: The size of the buffer. This value must be greater than zero. The default size is 4096.
"""
pass
def CopyToAsync(self,destination,bufferSize=None,cancellationToken=None):
"""
CopyToAsync(self: Stream,destination: Stream) -> Task
CopyToAsync(self: Stream,destination: Stream,bufferSize: int) -> Task
CopyToAsync(self: Stream,destination: Stream,bufferSize: int,cancellationToken: CancellationToken) -> Task
"""
pass
def CreateWaitHandle(self,*args):
"""
CreateWaitHandle(self: Stream) -> WaitHandle
Allocates a System.Threading.WaitHandle object.
Returns: A reference to the allocated WaitHandle.
"""
pass
def Dispose(self):
"""
Dispose(self: Stream)
Releases all resources used by the System.IO.Stream.
"""
pass
def EndRead(self,asyncResult):
"""
EndRead(self: Stream,asyncResult: IAsyncResult) -> int
Waits for the pending asynchronous read to complete.
asyncResult: The reference to the pending asynchronous request to finish.
Returns: The number of bytes read from the stream,between zero (0) and the number of bytes you requested. Streams return zero (0) only at the end of the stream,otherwise,they
should block until at least one byte is available.
"""
pass
def EndWrite(self,asyncResult):
"""
EndWrite(self: Stream,asyncResult: IAsyncResult)
Ends an asynchronous write operation.
asyncResult: A reference to the outstanding asynchronous I/O request.
"""
pass
def Flush(self):
"""
Flush(self: Stream)
When overridden in a derived class,clears all buffers for this stream and causes any buffered data to be written to the underlying device.
"""
pass
def FlushAsync(self,cancellationToken=None):
"""
FlushAsync(self: Stream) -> Task
FlushAsync(self: Stream,cancellationToken: CancellationToken) -> Task
"""
pass
def MemberwiseClone(self,*args):
"""
MemberwiseClone(self: MarshalByRefObject,cloneIdentity: bool) -> MarshalByRefObject
Creates a shallow copy of the current System.MarshalByRefObject object.
cloneIdentity: false to delete the current System.MarshalByRefObject object's identity,which will cause the object to be assigned a new identity when it is marshaled across a remoting
boundary. A value of false is usually appropriate. true to copy the current System.MarshalByRefObject object's identity to its clone,which will cause remoting client calls
to be routed to the remote server object.
Returns: A shallow copy of the current System.MarshalByRefObject object.
MemberwiseClone(self: object) -> object
Creates a shallow copy of the current System.Object.
Returns: A shallow copy of the current System.Object.
"""
pass
def ObjectInvariant(self,*args):
"""
ObjectInvariant(self: Stream)
Provides support for a System.Diagnostics.Contracts.Contract.
"""
pass
def Read(self,buffer,offset,count):
"""
Read(self: Stream,offset: int,count: int) -> (int,Array[Byte])
When overridden in a derived class,reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read.
offset: The zero-based byte offset in buffer at which to begin storing the data read from the current stream.
count: The maximum number of bytes to be read from the current stream.
Returns: The total number of bytes read into the buffer. This can be less than the number of bytes requested if that many bytes are not currently available,or zero (0) if the end
of the stream has been reached.
"""
pass
def ReadAsync(self,buffer,offset,count,cancellationToken=None):
"""
ReadAsync(self: Stream,buffer: Array[Byte],offset: int,count: int) -> Task[int]
ReadAsync(self: Stream,buffer: Array[Byte],offset: int,count: int,cancellationToken: CancellationToken) -> Task[int]
"""
pass
def ReadByte(self):
"""
ReadByte(self: Stream) -> int
Reads a byte from the stream and advances the position within the stream by one byte,or returns -1 if at the end of the stream.
Returns: The unsigned byte cast to an Int32,or -1 if at the end of the stream.
"""
pass
def Seek(self,offset,origin):
"""
Seek(self: Stream,offset: Int64,origin: SeekOrigin) -> Int64
When overridden in a derived class,sets the position within the current stream.
offset: A byte offset relative to the origin parameter.
origin: A value of type System.IO.SeekOrigin indicating the reference point used to obtain the new position.
Returns: The new position within the current stream.
"""
pass
def SetLength(self,value):
"""
SetLength(self: Stream,value: Int64)
When overridden in a derived class,sets the length of the current stream.
value: The desired length of the current stream in bytes.
"""
pass
@staticmethod
def Synchronized(stream):
"""
Synchronized(stream: Stream) -> Stream
Creates a thread-safe (synchronized) wrapper around the specified System.IO.Stream object.
stream: The System.IO.Stream object to synchronize.
Returns: A thread-safe System.IO.Stream object.
"""
pass
def Write(self,buffer,offset,count):
"""
Write(self: Stream,buffer: Array[Byte],offset: int,count: int)
When overridden in a derived class,writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written.
buffer: An array of bytes. This method copies count bytes from buffer to the current stream.
offset: The zero-based byte offset in buffer at which to begin copying bytes to the current stream.
count: The number of bytes to be written to the current stream.
"""
pass
def WriteAsync(self,buffer,offset,count,cancellationToken=None):
"""
WriteAsync(self: Stream,buffer: Array[Byte],offset: int,count: int) -> Task
WriteAsync(self: Stream,buffer: Array[Byte],offset: int,count: int,cancellationToken: CancellationToken) -> Task
"""
pass
def WriteByte(self,value):
"""
WriteByte(self: Stream,value: Byte)
Writes a byte to the current position in the stream and advances the position within the stream by one byte.
value: The byte to write to the stream.
"""
pass
def __enter__(self,*args):
""" __enter__(self: IDisposable) -> object """
pass
def __exit__(self,*args):
""" __exit__(self: IDisposable,exc_type: object,exc_value: object,exc_back: object) """
pass
def __init__(self,*args):
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
def __reduce_ex__(self,*args):
pass
CanRead=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""When overridden in a derived class,gets a value indicating whether the current stream supports reading.
Get: CanRead(self: Stream) -> bool
"""
CanSeek=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""When overridden in a derived class,gets a value indicating whether the current stream supports seeking.
Get: CanSeek(self: Stream) -> bool
"""
CanTimeout=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Gets a value that determines whether the current stream can time out.
Get: CanTimeout(self: Stream) -> bool
"""
CanWrite=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""When overridden in a derived class,gets a value indicating whether the current stream supports writing.
Get: CanWrite(self: Stream) -> bool
"""
Length=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""When overridden in a derived class,gets the length in bytes of the stream.
Get: Length(self: Stream) -> Int64
"""
Position=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""When overridden in a derived class,gets or sets the position within the current stream.
Get: Position(self: Stream) -> Int64
Set: Position(self: Stream)=value
"""
ReadTimeout=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Gets or sets a value,in miliseconds,that determines how long the stream will attempt to read before timing out.
Get: ReadTimeout(self: Stream) -> int
Set: ReadTimeout(self: Stream)=value
"""
WriteTimeout=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Gets or sets a value,in miliseconds,that determines how long the stream will attempt to write before timing out.
Get: WriteTimeout(self: Stream) -> int
Set: WriteTimeout(self: Stream)=value
"""
Null=None
|
class Stream(MarshalByRefObject):
""" Provides a generic view of a sequence of bytes. """
def zzz(self):
"""hardcoded/mock instance of the class"""
return stream()
instance = zzz()
'hardcoded/returns an instance of the class'
def begin_read(self, buffer, offset, count, callback, state):
"""
BeginRead(self: Stream,buffer: Array[Byte],offset: int,count: int,callback: AsyncCallback,state: object) -> IAsyncResult
Begins an asynchronous read operation.
buffer: The buffer to read the data into.
offset: The byte offset in buffer at which to begin writing data read from the stream.
count: The maximum number of bytes to read.
callback: An optional asynchronous callback,to be called when the read is complete.
state: A user-provided object that distinguishes this particular asynchronous read request from other requests.
Returns: An System.IAsyncResult that represents the asynchronous read,which could still be pending.
"""
pass
def begin_write(self, buffer, offset, count, callback, state):
"""
BeginWrite(self: Stream,buffer: Array[Byte],offset: int,count: int,callback: AsyncCallback,state: object) -> IAsyncResult
Begins an asynchronous write operation.
buffer: The buffer to write data from.
offset: The byte offset in buffer from which to begin writing.
count: The maximum number of bytes to write.
callback: An optional asynchronous callback,to be called when the write is complete.
state: A user-provided object that distinguishes this particular asynchronous write request from other requests.
Returns: An IAsyncResult that represents the asynchronous write,which could still be pending.
"""
pass
def close(self):
"""
Close(self: Stream)
Closes the current stream and releases any resources (such as sockets and file handles) associated with the current stream.
"""
pass
def copy_to(self, destination, bufferSize=None):
"""
CopyTo(self: Stream,destination: Stream)
Reads the bytes from the current stream and writes them to the destination stream.
destination: The stream that will contain the contents of the current stream.
CopyTo(self: Stream,destination: Stream,bufferSize: int)
Reads all the bytes from the current stream and writes them to a destination stream,using a specified buffer size.
destination: The stream that will contain the contents of the current stream.
bufferSize: The size of the buffer. This value must be greater than zero. The default size is 4096.
"""
pass
def copy_to_async(self, destination, bufferSize=None, cancellationToken=None):
"""
CopyToAsync(self: Stream,destination: Stream) -> Task
CopyToAsync(self: Stream,destination: Stream,bufferSize: int) -> Task
CopyToAsync(self: Stream,destination: Stream,bufferSize: int,cancellationToken: CancellationToken) -> Task
"""
pass
def create_wait_handle(self, *args):
"""
CreateWaitHandle(self: Stream) -> WaitHandle
Allocates a System.Threading.WaitHandle object.
Returns: A reference to the allocated WaitHandle.
"""
pass
def dispose(self):
"""
Dispose(self: Stream)
Releases all resources used by the System.IO.Stream.
"""
pass
def end_read(self, asyncResult):
"""
EndRead(self: Stream,asyncResult: IAsyncResult) -> int
Waits for the pending asynchronous read to complete.
asyncResult: The reference to the pending asynchronous request to finish.
Returns: The number of bytes read from the stream,between zero (0) and the number of bytes you requested. Streams return zero (0) only at the end of the stream,otherwise,they
should block until at least one byte is available.
"""
pass
def end_write(self, asyncResult):
"""
EndWrite(self: Stream,asyncResult: IAsyncResult)
Ends an asynchronous write operation.
asyncResult: A reference to the outstanding asynchronous I/O request.
"""
pass
def flush(self):
"""
Flush(self: Stream)
When overridden in a derived class,clears all buffers for this stream and causes any buffered data to be written to the underlying device.
"""
pass
def flush_async(self, cancellationToken=None):
"""
FlushAsync(self: Stream) -> Task
FlushAsync(self: Stream,cancellationToken: CancellationToken) -> Task
"""
pass
def memberwise_clone(self, *args):
"""
MemberwiseClone(self: MarshalByRefObject,cloneIdentity: bool) -> MarshalByRefObject
Creates a shallow copy of the current System.MarshalByRefObject object.
cloneIdentity: false to delete the current System.MarshalByRefObject object's identity,which will cause the object to be assigned a new identity when it is marshaled across a remoting
boundary. A value of false is usually appropriate. true to copy the current System.MarshalByRefObject object's identity to its clone,which will cause remoting client calls
to be routed to the remote server object.
Returns: A shallow copy of the current System.MarshalByRefObject object.
MemberwiseClone(self: object) -> object
Creates a shallow copy of the current System.Object.
Returns: A shallow copy of the current System.Object.
"""
pass
def object_invariant(self, *args):
"""
ObjectInvariant(self: Stream)
Provides support for a System.Diagnostics.Contracts.Contract.
"""
pass
def read(self, buffer, offset, count):
"""
Read(self: Stream,offset: int,count: int) -> (int,Array[Byte])
When overridden in a derived class,reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read.
offset: The zero-based byte offset in buffer at which to begin storing the data read from the current stream.
count: The maximum number of bytes to be read from the current stream.
Returns: The total number of bytes read into the buffer. This can be less than the number of bytes requested if that many bytes are not currently available,or zero (0) if the end
of the stream has been reached.
"""
pass
def read_async(self, buffer, offset, count, cancellationToken=None):
"""
ReadAsync(self: Stream,buffer: Array[Byte],offset: int,count: int) -> Task[int]
ReadAsync(self: Stream,buffer: Array[Byte],offset: int,count: int,cancellationToken: CancellationToken) -> Task[int]
"""
pass
def read_byte(self):
"""
ReadByte(self: Stream) -> int
Reads a byte from the stream and advances the position within the stream by one byte,or returns -1 if at the end of the stream.
Returns: The unsigned byte cast to an Int32,or -1 if at the end of the stream.
"""
pass
def seek(self, offset, origin):
"""
Seek(self: Stream,offset: Int64,origin: SeekOrigin) -> Int64
When overridden in a derived class,sets the position within the current stream.
offset: A byte offset relative to the origin parameter.
origin: A value of type System.IO.SeekOrigin indicating the reference point used to obtain the new position.
Returns: The new position within the current stream.
"""
pass
def set_length(self, value):
"""
SetLength(self: Stream,value: Int64)
When overridden in a derived class,sets the length of the current stream.
value: The desired length of the current stream in bytes.
"""
pass
@staticmethod
def synchronized(stream):
"""
Synchronized(stream: Stream) -> Stream
Creates a thread-safe (synchronized) wrapper around the specified System.IO.Stream object.
stream: The System.IO.Stream object to synchronize.
Returns: A thread-safe System.IO.Stream object.
"""
pass
def write(self, buffer, offset, count):
"""
Write(self: Stream,buffer: Array[Byte],offset: int,count: int)
When overridden in a derived class,writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written.
buffer: An array of bytes. This method copies count bytes from buffer to the current stream.
offset: The zero-based byte offset in buffer at which to begin copying bytes to the current stream.
count: The number of bytes to be written to the current stream.
"""
pass
def write_async(self, buffer, offset, count, cancellationToken=None):
"""
WriteAsync(self: Stream,buffer: Array[Byte],offset: int,count: int) -> Task
WriteAsync(self: Stream,buffer: Array[Byte],offset: int,count: int,cancellationToken: CancellationToken) -> Task
"""
pass
def write_byte(self, value):
"""
WriteByte(self: Stream,value: Byte)
Writes a byte to the current position in the stream and advances the position within the stream by one byte.
value: The byte to write to the stream.
"""
pass
def __enter__(self, *args):
""" __enter__(self: IDisposable) -> object """
pass
def __exit__(self, *args):
""" __exit__(self: IDisposable,exc_type: object,exc_value: object,exc_back: object) """
pass
def __init__(self, *args):
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
def __reduce_ex__(self, *args):
pass
can_read = property(lambda self: object(), lambda self, v: None, lambda self: None)
'When overridden in a derived class,gets a value indicating whether the current stream supports reading.\n\n\n\nGet: CanRead(self: Stream) -> bool\n\n\n\n'
can_seek = property(lambda self: object(), lambda self, v: None, lambda self: None)
'When overridden in a derived class,gets a value indicating whether the current stream supports seeking.\n\n\n\nGet: CanSeek(self: Stream) -> bool\n\n\n\n'
can_timeout = property(lambda self: object(), lambda self, v: None, lambda self: None)
'Gets a value that determines whether the current stream can time out.\n\n\n\nGet: CanTimeout(self: Stream) -> bool\n\n\n\n'
can_write = property(lambda self: object(), lambda self, v: None, lambda self: None)
'When overridden in a derived class,gets a value indicating whether the current stream supports writing.\n\n\n\nGet: CanWrite(self: Stream) -> bool\n\n\n\n'
length = property(lambda self: object(), lambda self, v: None, lambda self: None)
'When overridden in a derived class,gets the length in bytes of the stream.\n\n\n\nGet: Length(self: Stream) -> Int64\n\n\n\n'
position = property(lambda self: object(), lambda self, v: None, lambda self: None)
'When overridden in a derived class,gets or sets the position within the current stream.\n\n\n\nGet: Position(self: Stream) -> Int64\n\n\n\nSet: Position(self: Stream)=value\n\n'
read_timeout = property(lambda self: object(), lambda self, v: None, lambda self: None)
'Gets or sets a value,in miliseconds,that determines how long the stream will attempt to read before timing out.\n\n\n\nGet: ReadTimeout(self: Stream) -> int\n\n\n\nSet: ReadTimeout(self: Stream)=value\n\n'
write_timeout = property(lambda self: object(), lambda self, v: None, lambda self: None)
'Gets or sets a value,in miliseconds,that determines how long the stream will attempt to write before timing out.\n\n\n\nGet: WriteTimeout(self: Stream) -> int\n\n\n\nSet: WriteTimeout(self: Stream)=value\n\n'
null = None
|
class Solution(object):
def intToRoman(self, num):
"""
:type num: int
:rtype: str
"""
roman = {1: 'I', 5: 'V', 10: 'X', 50: 'L', 100: 'C', 500: 'D', 1000: 'M', 5000: ''}
ret = ''
for i, s in enumerate(str(num)[::-1]):
if s in ['4', '9']:
ret = roman[10**i] + roman[(int(s)+1)*10**i] + ret
elif s != '0':
ret = roman[5 * 10**i] * (int(s) >= 5) + roman[10**i] * (int(s) % 5) + ret
return ret
if __name__ == '__main__':
s = Solution()
for i in range(20):
print(i+1, s.intToRoman(i+1))
|
class Solution(object):
def int_to_roman(self, num):
"""
:type num: int
:rtype: str
"""
roman = {1: 'I', 5: 'V', 10: 'X', 50: 'L', 100: 'C', 500: 'D', 1000: 'M', 5000: ''}
ret = ''
for (i, s) in enumerate(str(num)[::-1]):
if s in ['4', '9']:
ret = roman[10 ** i] + roman[(int(s) + 1) * 10 ** i] + ret
elif s != '0':
ret = roman[5 * 10 ** i] * (int(s) >= 5) + roman[10 ** i] * (int(s) % 5) + ret
return ret
if __name__ == '__main__':
s = solution()
for i in range(20):
print(i + 1, s.intToRoman(i + 1))
|
#!/usr/bin/env python
"""Docstring"""
__author__ = "Petar Stoyanov"
def main():
"""Docstring"""
text = input().lower()
search_term = input().lower()
counter = 0
index = 0
while True:
if text.find(search_term, index) == -1:
break
else:
counter += 1
index = text.find(search_term, index) + 1
print(counter)
if __name__ == '__main__':
main()
|
"""Docstring"""
__author__ = 'Petar Stoyanov'
def main():
"""Docstring"""
text = input().lower()
search_term = input().lower()
counter = 0
index = 0
while True:
if text.find(search_term, index) == -1:
break
else:
counter += 1
index = text.find(search_term, index) + 1
print(counter)
if __name__ == '__main__':
main()
|
"""Test data files."""
def test():
pass
|
"""Test data files."""
def test():
pass
|
#!/usr/bin/env python
"""
https://leetcode.com/problems/implement-strstr/description/
Created on 2018-11-13
@author: 'Jiezhi.G@gmail.com'
Reference:
"""
class Solution:
def strStr(self, haystack, needle):
"""
:type haystack: str
:type needle: str
:rtype: int
"""
if not needle or haystack == needle:
return 0
len_n = len(needle)
for i in range(len(haystack) - len_n + 1):
if haystack[i:i + len_n] == needle:
return i
return -1
def test():
assert Solution().strStr("test", "") == 0
assert Solution().strStr("hello", "ll") == 2
assert Solution().strStr("hello", "k") == -1
assert Solution().strStr("hello", "hello") == 0
assert Solution().strStr("mississippi", "pi") == 9
|
"""
https://leetcode.com/problems/implement-strstr/description/
Created on 2018-11-13
@author: 'Jiezhi.G@gmail.com'
Reference:
"""
class Solution:
def str_str(self, haystack, needle):
"""
:type haystack: str
:type needle: str
:rtype: int
"""
if not needle or haystack == needle:
return 0
len_n = len(needle)
for i in range(len(haystack) - len_n + 1):
if haystack[i:i + len_n] == needle:
return i
return -1
def test():
assert solution().strStr('test', '') == 0
assert solution().strStr('hello', 'll') == 2
assert solution().strStr('hello', 'k') == -1
assert solution().strStr('hello', 'hello') == 0
assert solution().strStr('mississippi', 'pi') == 9
|
def phonehome():
relax()
sleep(1)
i01.setHeadSpeed(1.0,1.0,1.0,1.0,1.0)
i01.setArmSpeed("left",1.0,1.0,1.0,1.0)
i01.setArmSpeed("right",1.0,1.0,1.0,1.0)
i01.setHandSpeed("left",1.0,1.0,1.0,1.0,1.0,1.0)
i01.setHandSpeed("right",1.0,1.0,1.0,1.0,1.0,1.0)
i01.setTorsoSpeed(1.0,1.0,1.0)
i01.moveHead(160,68)
i01.moveArm("left",5,86,30,20)
i01.moveArm("right",86,140,83,80)
i01.moveHand("left",99,140,173,167,130,26)
i01.moveHand("right",135,6,170,145,168,180)
i01.moveTorso(25,80,90)
sleep(2)
#i01.mouth.speakBlocking("E,T phone the big home of the inmoov nation")
AudioPlayer.playFile(RuningFolder+'/system/sounds/E,T phone the big home of the inmoov nation.mp3')
sleep(2)
rest()
sleep(1)
relax()
|
def phonehome():
relax()
sleep(1)
i01.setHeadSpeed(1.0, 1.0, 1.0, 1.0, 1.0)
i01.setArmSpeed('left', 1.0, 1.0, 1.0, 1.0)
i01.setArmSpeed('right', 1.0, 1.0, 1.0, 1.0)
i01.setHandSpeed('left', 1.0, 1.0, 1.0, 1.0, 1.0, 1.0)
i01.setHandSpeed('right', 1.0, 1.0, 1.0, 1.0, 1.0, 1.0)
i01.setTorsoSpeed(1.0, 1.0, 1.0)
i01.moveHead(160, 68)
i01.moveArm('left', 5, 86, 30, 20)
i01.moveArm('right', 86, 140, 83, 80)
i01.moveHand('left', 99, 140, 173, 167, 130, 26)
i01.moveHand('right', 135, 6, 170, 145, 168, 180)
i01.moveTorso(25, 80, 90)
sleep(2)
AudioPlayer.playFile(RuningFolder + '/system/sounds/E,T phone the big home of the inmoov nation.mp3')
sleep(2)
rest()
sleep(1)
relax()
|
n1 = int(input('Digite um Valor: '))
n2 = int(input('Digite outro valor: '))
n = n1 + n2
print('A soma entre {} e {} resulta em: {} !'.format(n1,n2,n))
print(type(n1))
|
n1 = int(input('Digite um Valor: '))
n2 = int(input('Digite outro valor: '))
n = n1 + n2
print('A soma entre {} e {} resulta em: {} !'.format(n1, n2, n))
print(type(n1))
|
class JUMP_GE:
def __init__(self, stack):
self.phase = 0
self.ip = 0
self.stack = stack
self.a = 0
def exec(self, ip, data):
if (self.phase == 0):
self.ip = ip + 1
self.a = self.stack.pop()
self.phase = 1
return False
elif (self.phase == 1):
b = self.stack.pop()
if b > self.a:
self.phase = 2
return False
else:
self.phase = 0
return True
elif (self.phase == 2):
self.ip = data - 1
self.phase = 3
return False
else:
assert(self.phase == 3)
self.phase = 0
return True
|
class Jump_Ge:
def __init__(self, stack):
self.phase = 0
self.ip = 0
self.stack = stack
self.a = 0
def exec(self, ip, data):
if self.phase == 0:
self.ip = ip + 1
self.a = self.stack.pop()
self.phase = 1
return False
elif self.phase == 1:
b = self.stack.pop()
if b > self.a:
self.phase = 2
return False
else:
self.phase = 0
return True
elif self.phase == 2:
self.ip = data - 1
self.phase = 3
return False
else:
assert self.phase == 3
self.phase = 0
return True
|
class TriggerListener(object):
def __init__(self, state_machine, **kwargs):
self._state_machine = state_machine
def __call__(self, msg):
self._state_machine.trigger(msg.data)
|
class Triggerlistener(object):
def __init__(self, state_machine, **kwargs):
self._state_machine = state_machine
def __call__(self, msg):
self._state_machine.trigger(msg.data)
|
# 78. Subsets
# Runtime: 32 ms, faster than 85.43% of Python3 online submissions for Subsets.
# Memory Usage: 14.3 MB, less than 78.59% of Python3 online submissions for Subsets.
class Solution:
# Cascading
def subsets(self, nums: list[int]) -> list[list[int]]:
res = [[]]
for n in nums:
res += [curr + [n] for curr in res]
return res
|
class Solution:
def subsets(self, nums: list[int]) -> list[list[int]]:
res = [[]]
for n in nums:
res += [curr + [n] for curr in res]
return res
|
def on_enter(event_data):
""" """
pocs = event_data.model
# Clear any current observation
pocs.observatory.current_observation = None
pocs.observatory.current_offset_info = None
pocs.next_state = 'parked'
if pocs.observatory.has_dome:
pocs.say('Closing dome')
if not pocs.observatory.close_dome():
pocs.logger.critical('Unable to close dome!')
pocs.say('Unable to close dome!')
pocs.say("I'm takin' it on home and then parking.")
pocs.observatory.mount.home_and_park()
|
def on_enter(event_data):
""" """
pocs = event_data.model
pocs.observatory.current_observation = None
pocs.observatory.current_offset_info = None
pocs.next_state = 'parked'
if pocs.observatory.has_dome:
pocs.say('Closing dome')
if not pocs.observatory.close_dome():
pocs.logger.critical('Unable to close dome!')
pocs.say('Unable to close dome!')
pocs.say("I'm takin' it on home and then parking.")
pocs.observatory.mount.home_and_park()
|
"""
Nothing, but in a friendly way. Good for filling in for objects you want to
hide. If $form.f1 is a RecursiveNull object, then
$form.f1.anything["you"].might("use") will resolve to the empty string.
This module was contributed by Ian Bicking.
"""
class RecursiveNull(object):
def __getattr__(self, attr):
return self
def __getitem__(self, item):
return self
def __call__(self, *args, **kwargs):
return self
def __str__(self):
return ''
def __repr__(self):
return ''
def __nonzero__(self):
return 0
def __eq__(self, x):
if x:
return False
return True
def __ne__(self, x):
return x and True or False
|
"""
Nothing, but in a friendly way. Good for filling in for objects you want to
hide. If $form.f1 is a RecursiveNull object, then
$form.f1.anything["you"].might("use") will resolve to the empty string.
This module was contributed by Ian Bicking.
"""
class Recursivenull(object):
def __getattr__(self, attr):
return self
def __getitem__(self, item):
return self
def __call__(self, *args, **kwargs):
return self
def __str__(self):
return ''
def __repr__(self):
return ''
def __nonzero__(self):
return 0
def __eq__(self, x):
if x:
return False
return True
def __ne__(self, x):
return x and True or False
|
class BitVector(object):
"""docstring for BitVector"""
"""infinite array of bits is present in bitvector"""
def __init__(self):
self.BitNum=0
self.length=0
def set(self,i):
self.BitNum=self.BitNum | 1 << i
self.length=self.BitNum.bit_length()
def reset(self,i):
resetValue=1<<i
self.BitNum=self.BitNum - resetValue
self.length=self.BitNum.bit_length()
def at(self,i):
if(i<0):
raise ValueError
if(i >=self.length):
return 0
return int(bin(self.BitNum)[-(i+1)])
def __repr__(self):
return bin(self.BitNum)[2:]
def __str__(self):
return bin(self.BitNum)[2:]
|
class Bitvector(object):
"""docstring for BitVector"""
'infinite array of bits is present in bitvector'
def __init__(self):
self.BitNum = 0
self.length = 0
def set(self, i):
self.BitNum = self.BitNum | 1 << i
self.length = self.BitNum.bit_length()
def reset(self, i):
reset_value = 1 << i
self.BitNum = self.BitNum - resetValue
self.length = self.BitNum.bit_length()
def at(self, i):
if i < 0:
raise ValueError
if i >= self.length:
return 0
return int(bin(self.BitNum)[-(i + 1)])
def __repr__(self):
return bin(self.BitNum)[2:]
def __str__(self):
return bin(self.BitNum)[2:]
|
class Constand_Hs:
HEADERSIZE=1024
Dangkyvantay=str('FDK')
Dangkythetu=str('CDK')
Van_tay_mo_tu_F=str('Fopen\n')
Van_tay_dong_tu_F=str('Fclose\n')
Van_Tay_Su_Dung_Tu=str('Fused\n')
The_Tu_Su_Dung_Tu=str('Cused\n')
Van_tay_mo_tu_C=str('Copen')
Van_tay_dong_tu_C=str('Cclose')
Server=('192.168.1.128',3003)
lstouputtemp = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
lstinputtemp = [7,6,5,4,3,2,1,0,11,10,9,8,15,14,13,12]
dooropen=str('Dooropen')
Dongtu=False
Motu=True
def __init__(self):
pass
|
class Constand_Hs:
headersize = 1024
dangkyvantay = str('FDK')
dangkythetu = str('CDK')
van_tay_mo_tu_f = str('Fopen\n')
van_tay_dong_tu_f = str('Fclose\n')
van__tay__su__dung__tu = str('Fused\n')
the__tu__su__dung__tu = str('Cused\n')
van_tay_mo_tu_c = str('Copen')
van_tay_dong_tu_c = str('Cclose')
server = ('192.168.1.128', 3003)
lstouputtemp = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
lstinputtemp = [7, 6, 5, 4, 3, 2, 1, 0, 11, 10, 9, 8, 15, 14, 13, 12]
dooropen = str('Dooropen')
dongtu = False
motu = True
def __init__(self):
pass
|
list1 = ['phisics','chemistry',1997,2000]
print("Value available at index 2 is ", list1[2])
list1[2] = 2003
print("New Value available at index 2 is ", list1[2])
|
list1 = ['phisics', 'chemistry', 1997, 2000]
print('Value available at index 2 is ', list1[2])
list1[2] = 2003
print('New Value available at index 2 is ', list1[2])
|
expected_output = {
'mst_instances': {
6: {
'bridge_address': '5897.bdff.3b3a',
'bridge_priority': 20486,
'interfaces': {
'GigabitEthernet1/7': {
'cost': 20000,
'counters': {
'bpdu_received': 0,
'bpdu_sent': 836828,
},
'designated_bridge_address': '5897.bdff.3b3a',
'designated_bridge_port_id': '128.7',
'designated_bridge_priority': 20486,
'designated_root_address': '58ac.78ff.c3f5',
'designated_root_cost': 2000,
'designated_root_priority': 8198,
'forward_delay': 0,
'forward_transitions': 1,
'message_expires': 0,
'name': 'GigabitEthernet1/7',
'port_id': '128.7',
'port_priority': 128,
'status': 'designated forwarding',
},
'TenGigabitEthernet2/10': {
'cost': 2000,
'counters': {
'bpdu_received': 0,
'bpdu_sent': 1285480,
},
'designated_bridge_address': '5897.bdff.3b3a',
'designated_bridge_port_id': '128.138',
'designated_bridge_priority': 20486,
'designated_root_address': '58ac.78ff.c3f5',
'designated_root_cost': 2000,
'designated_root_priority': 8198,
'forward_delay': 0,
'forward_transitions': 2,
'message_expires': 0,
'name': 'TenGigabitEthernet2/10',
'port_id': '128.138',
'port_priority': 128,
'status': 'designated forwarding',
},
'TenGigabitEthernet2/3': {
'cost': 2000,
'counters': {
'bpdu_received': 0,
'bpdu_sent': 1285495,
},
'designated_bridge_address': '5897.bdff.3b3a',
'designated_bridge_port_id': '128.131',
'designated_bridge_priority': 20486,
'designated_root_address': '58ac.78ff.c3f5',
'designated_root_cost': 2000,
'designated_root_priority': 8198,
'forward_delay': 0,
'forward_transitions': 2,
'message_expires': 0,
'name': 'TenGigabitEthernet2/3',
'port_id': '128.131',
'port_priority': 128,
'status': 'designated forwarding',
},
'TenGigabitEthernet2/4': {
'cost': 2000,
'counters': {
'bpdu_received': 0,
'bpdu_sent': 1285500,
},
'designated_bridge_address': '5897.bdff.3b3a',
'designated_bridge_port_id': '128.132',
'designated_bridge_priority': 20486,
'designated_root_address': '58ac.78ff.c3f5',
'designated_root_cost': 2000,
'designated_root_priority': 8198,
'forward_delay': 0,
'forward_transitions': 2,
'message_expires': 0,
'name': 'TenGigabitEthernet2/4',
'port_id': '128.132',
'port_priority': 128,
'status': 'designated forwarding',
},
'TenGigabitEthernet2/5': {
'cost': 2000,
'counters': {
'bpdu_received': 0,
'bpdu_sent': 1285475,
},
'designated_bridge_address': '5897.bdff.3b3a',
'designated_bridge_port_id': '128.133',
'designated_bridge_priority': 20486,
'designated_root_address': '58ac.78ff.c3f5',
'designated_root_cost': 2000,
'designated_root_priority': 8198,
'forward_delay': 0,
'forward_transitions': 2,
'message_expires': 0,
'name': 'TenGigabitEthernet2/5',
'port_id': '128.133',
'port_priority': 128,
'status': 'designated forwarding',
},
'TenGigabitEthernet2/6': {
'cost': 2000,
'counters': {
'bpdu_received': 0,
'bpdu_sent': 1285487,
},
'designated_bridge_address': '5897.bdff.3b3a',
'designated_bridge_port_id': '128.134',
'designated_bridge_priority': 20486,
'designated_root_address': '58ac.78ff.c3f5',
'designated_root_cost': 2000,
'designated_root_priority': 8198,
'forward_delay': 0,
'forward_transitions': 2,
'message_expires': 0,
'name': 'TenGigabitEthernet2/6',
'port_id': '128.134',
'port_priority': 128,
'status': 'designated forwarding',
},
'TenGigabitEthernet2/7': {
'cost': 2000,
'counters': {
'bpdu_received': 0,
'bpdu_sent': 1285497,
},
'designated_bridge_address': '5897.bdff.3b3a',
'designated_bridge_port_id': '128.135',
'designated_bridge_priority': 20486,
'designated_root_address': '58ac.78ff.c3f5',
'designated_root_cost': 2000,
'designated_root_priority': 8198,
'forward_delay': 0,
'forward_transitions': 2,
'message_expires': 0,
'name': 'TenGigabitEthernet2/7',
'port_id': '128.135',
'port_priority': 128,
'status': 'designated forwarding',
},
'TenGigabitEthernet2/8': {
'cost': 2000,
'counters': {
'bpdu_received': 0,
'bpdu_sent': 1285497,
},
'designated_bridge_address': '5897.bdff.3b3a',
'designated_bridge_port_id': '128.136',
'designated_bridge_priority': 20486,
'designated_root_address': '58ac.78ff.c3f5',
'designated_root_cost': 2000,
'designated_root_priority': 8198,
'forward_delay': 0,
'forward_transitions': 2,
'message_expires': 0,
'name': 'TenGigabitEthernet2/8',
'port_id': '128.136',
'port_priority': 128,
'status': 'designated forwarding',
},
'TenGigabitEthernet2/9': {
'cost': 2000,
'counters': {
'bpdu_received': 0,
'bpdu_sent': 1285494,
},
'designated_bridge_address': '5897.bdff.3b3a',
'designated_bridge_port_id': '128.137',
'designated_bridge_priority': 20486,
'designated_root_address': '58ac.78ff.c3f5',
'designated_root_cost': 2000,
'designated_root_priority': 8198,
'forward_delay': 0,
'forward_transitions': 2,
'message_expires': 0,
'name': 'TenGigabitEthernet2/9',
'port_id': '128.137',
'port_priority': 128,
'status': 'designated forwarding',
},
},
'mst_id': 6,
'root_address': '58ac.78ff.c3f5',
'root_priority': 8198,
'sysid': 6,
'vlan': '500-501,504-505,507-554,556-599',
},
},
}
|
expected_output = {'mst_instances': {6: {'bridge_address': '5897.bdff.3b3a', 'bridge_priority': 20486, 'interfaces': {'GigabitEthernet1/7': {'cost': 20000, 'counters': {'bpdu_received': 0, 'bpdu_sent': 836828}, 'designated_bridge_address': '5897.bdff.3b3a', 'designated_bridge_port_id': '128.7', 'designated_bridge_priority': 20486, 'designated_root_address': '58ac.78ff.c3f5', 'designated_root_cost': 2000, 'designated_root_priority': 8198, 'forward_delay': 0, 'forward_transitions': 1, 'message_expires': 0, 'name': 'GigabitEthernet1/7', 'port_id': '128.7', 'port_priority': 128, 'status': 'designated forwarding'}, 'TenGigabitEthernet2/10': {'cost': 2000, 'counters': {'bpdu_received': 0, 'bpdu_sent': 1285480}, 'designated_bridge_address': '5897.bdff.3b3a', 'designated_bridge_port_id': '128.138', 'designated_bridge_priority': 20486, 'designated_root_address': '58ac.78ff.c3f5', 'designated_root_cost': 2000, 'designated_root_priority': 8198, 'forward_delay': 0, 'forward_transitions': 2, 'message_expires': 0, 'name': 'TenGigabitEthernet2/10', 'port_id': '128.138', 'port_priority': 128, 'status': 'designated forwarding'}, 'TenGigabitEthernet2/3': {'cost': 2000, 'counters': {'bpdu_received': 0, 'bpdu_sent': 1285495}, 'designated_bridge_address': '5897.bdff.3b3a', 'designated_bridge_port_id': '128.131', 'designated_bridge_priority': 20486, 'designated_root_address': '58ac.78ff.c3f5', 'designated_root_cost': 2000, 'designated_root_priority': 8198, 'forward_delay': 0, 'forward_transitions': 2, 'message_expires': 0, 'name': 'TenGigabitEthernet2/3', 'port_id': '128.131', 'port_priority': 128, 'status': 'designated forwarding'}, 'TenGigabitEthernet2/4': {'cost': 2000, 'counters': {'bpdu_received': 0, 'bpdu_sent': 1285500}, 'designated_bridge_address': '5897.bdff.3b3a', 'designated_bridge_port_id': '128.132', 'designated_bridge_priority': 20486, 'designated_root_address': '58ac.78ff.c3f5', 'designated_root_cost': 2000, 'designated_root_priority': 8198, 'forward_delay': 0, 'forward_transitions': 2, 'message_expires': 0, 'name': 'TenGigabitEthernet2/4', 'port_id': '128.132', 'port_priority': 128, 'status': 'designated forwarding'}, 'TenGigabitEthernet2/5': {'cost': 2000, 'counters': {'bpdu_received': 0, 'bpdu_sent': 1285475}, 'designated_bridge_address': '5897.bdff.3b3a', 'designated_bridge_port_id': '128.133', 'designated_bridge_priority': 20486, 'designated_root_address': '58ac.78ff.c3f5', 'designated_root_cost': 2000, 'designated_root_priority': 8198, 'forward_delay': 0, 'forward_transitions': 2, 'message_expires': 0, 'name': 'TenGigabitEthernet2/5', 'port_id': '128.133', 'port_priority': 128, 'status': 'designated forwarding'}, 'TenGigabitEthernet2/6': {'cost': 2000, 'counters': {'bpdu_received': 0, 'bpdu_sent': 1285487}, 'designated_bridge_address': '5897.bdff.3b3a', 'designated_bridge_port_id': '128.134', 'designated_bridge_priority': 20486, 'designated_root_address': '58ac.78ff.c3f5', 'designated_root_cost': 2000, 'designated_root_priority': 8198, 'forward_delay': 0, 'forward_transitions': 2, 'message_expires': 0, 'name': 'TenGigabitEthernet2/6', 'port_id': '128.134', 'port_priority': 128, 'status': 'designated forwarding'}, 'TenGigabitEthernet2/7': {'cost': 2000, 'counters': {'bpdu_received': 0, 'bpdu_sent': 1285497}, 'designated_bridge_address': '5897.bdff.3b3a', 'designated_bridge_port_id': '128.135', 'designated_bridge_priority': 20486, 'designated_root_address': '58ac.78ff.c3f5', 'designated_root_cost': 2000, 'designated_root_priority': 8198, 'forward_delay': 0, 'forward_transitions': 2, 'message_expires': 0, 'name': 'TenGigabitEthernet2/7', 'port_id': '128.135', 'port_priority': 128, 'status': 'designated forwarding'}, 'TenGigabitEthernet2/8': {'cost': 2000, 'counters': {'bpdu_received': 0, 'bpdu_sent': 1285497}, 'designated_bridge_address': '5897.bdff.3b3a', 'designated_bridge_port_id': '128.136', 'designated_bridge_priority': 20486, 'designated_root_address': '58ac.78ff.c3f5', 'designated_root_cost': 2000, 'designated_root_priority': 8198, 'forward_delay': 0, 'forward_transitions': 2, 'message_expires': 0, 'name': 'TenGigabitEthernet2/8', 'port_id': '128.136', 'port_priority': 128, 'status': 'designated forwarding'}, 'TenGigabitEthernet2/9': {'cost': 2000, 'counters': {'bpdu_received': 0, 'bpdu_sent': 1285494}, 'designated_bridge_address': '5897.bdff.3b3a', 'designated_bridge_port_id': '128.137', 'designated_bridge_priority': 20486, 'designated_root_address': '58ac.78ff.c3f5', 'designated_root_cost': 2000, 'designated_root_priority': 8198, 'forward_delay': 0, 'forward_transitions': 2, 'message_expires': 0, 'name': 'TenGigabitEthernet2/9', 'port_id': '128.137', 'port_priority': 128, 'status': 'designated forwarding'}}, 'mst_id': 6, 'root_address': '58ac.78ff.c3f5', 'root_priority': 8198, 'sysid': 6, 'vlan': '500-501,504-505,507-554,556-599'}}}
|
#It is highly recommended that you check your code first in IDLE first for syntax errors and then Test it here.
#If your code has syntax errors ,Open-Palm will freeze. You have to restart it in that case
def check_even(n):
if n%2 == 0:
return True
else:
return False
|
def check_even(n):
if n % 2 == 0:
return True
else:
return False
|
def expand(maze, fill):
length=len(maze)
res=[[fill]*(length*2) for i in range(length*2)]
for i in range(length//2, length//2+length):
for j in range(length//2, length//2+length):
res[i][j]=maze[i-length//2][j-length//2]
return res
|
def expand(maze, fill):
length = len(maze)
res = [[fill] * (length * 2) for i in range(length * 2)]
for i in range(length // 2, length // 2 + length):
for j in range(length // 2, length // 2 + length):
res[i][j] = maze[i - length // 2][j - length // 2]
return res
|
# -*- coding: utf-8 -*-
"""
Branca plugins
--------------
Add different objects/effects in a branca webpage.
"""
__all__ = []
|
"""
Branca plugins
--------------
Add different objects/effects in a branca webpage.
"""
__all__ = []
|
number = int(input())
if any(number % int(i) for i in input().split()):
print('not divisible by all')
else:
print('divisible by all')
|
number = int(input())
if any((number % int(i) for i in input().split())):
print('not divisible by all')
else:
print('divisible by all')
|
#
# PySNMP MIB module ALTIGA-MULTILINK-STATS-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ALTIGA-MULTILINK-STATS-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 17:05:49 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)
#
alMultiLinkMibModule, = mibBuilder.importSymbols("ALTIGA-GLOBAL-REG", "alMultiLinkMibModule")
alMultiLinkGroup, alStatsMultiLink = mibBuilder.importSymbols("ALTIGA-MIB", "alMultiLinkGroup", "alStatsMultiLink")
ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueSizeConstraint, SingleValueConstraint, ValueRangeConstraint, ConstraintsUnion, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "SingleValueConstraint", "ValueRangeConstraint", "ConstraintsUnion", "ConstraintsIntersection")
ObjectGroup, NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "ObjectGroup", "NotificationGroup", "ModuleCompliance")
MibIdentifier, IpAddress, ObjectIdentity, Counter32, TimeTicks, Bits, Unsigned32, MibScalar, MibTable, MibTableRow, MibTableColumn, Integer32, ModuleIdentity, Gauge32, NotificationType, iso, Counter64 = mibBuilder.importSymbols("SNMPv2-SMI", "MibIdentifier", "IpAddress", "ObjectIdentity", "Counter32", "TimeTicks", "Bits", "Unsigned32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Integer32", "ModuleIdentity", "Gauge32", "NotificationType", "iso", "Counter64")
DisplayString, TextualConvention, RowStatus = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention", "RowStatus")
altigaMultiLinkStatsMibModule = ModuleIdentity((1, 3, 6, 1, 4, 1, 3076, 1, 1, 39, 2))
altigaMultiLinkStatsMibModule.setRevisions(('2002-09-05 13:00', '2002-07-10 00:00',))
if mibBuilder.loadTexts: altigaMultiLinkStatsMibModule.setLastUpdated('200209051300Z')
if mibBuilder.loadTexts: altigaMultiLinkStatsMibModule.setOrganization('Cisco Systems, Inc.')
alStatsMultiLinkGlobal = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 2, 1, 2, 34, 1))
alMultiLinkStatsTable = MibTable((1, 3, 6, 1, 4, 1, 3076, 2, 1, 2, 34, 2), )
if mibBuilder.loadTexts: alMultiLinkStatsTable.setStatus('current')
alMultiLinkStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 3076, 2, 1, 2, 34, 2, 1), ).setIndexNames((0, "ALTIGA-MULTILINK-STATS-MIB", "alMultiLinkStatsIndex"))
if mibBuilder.loadTexts: alMultiLinkStatsEntry.setStatus('current')
alMultiLinkStatsRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 3076, 2, 1, 2, 34, 2, 1, 1), RowStatus()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: alMultiLinkStatsRowStatus.setStatus('current')
alMultiLinkStatsIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 3076, 2, 1, 2, 34, 2, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: alMultiLinkStatsIndex.setStatus('current')
alMultiLinkStatsTxOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 3076, 2, 1, 2, 34, 2, 1, 3), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: alMultiLinkStatsTxOctets.setStatus('current')
alMultiLinkStatsTxPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 3076, 2, 1, 2, 34, 2, 1, 4), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: alMultiLinkStatsTxPackets.setStatus('current')
alMultiLinkStatsTxMlpFragments = MibTableColumn((1, 3, 6, 1, 4, 1, 3076, 2, 1, 2, 34, 2, 1, 5), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: alMultiLinkStatsTxMlpFragments.setStatus('current')
alMultiLinkStatsTxMlpPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 3076, 2, 1, 2, 34, 2, 1, 6), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: alMultiLinkStatsTxMlpPackets.setStatus('current')
alMultiLinkStatsTxNonMlpPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 3076, 2, 1, 2, 34, 2, 1, 7), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: alMultiLinkStatsTxNonMlpPackets.setStatus('current')
alMultiLinkStatsTxThroughput = MibTableColumn((1, 3, 6, 1, 4, 1, 3076, 2, 1, 2, 34, 2, 1, 8), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: alMultiLinkStatsTxThroughput.setStatus('current')
alMultiLinkStatsRxOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 3076, 2, 1, 2, 34, 2, 1, 9), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: alMultiLinkStatsRxOctets.setStatus('current')
alMultiLinkStatsRxPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 3076, 2, 1, 2, 34, 2, 1, 10), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: alMultiLinkStatsRxPackets.setStatus('current')
alMultiLinkStatsRxMlpFragments = MibTableColumn((1, 3, 6, 1, 4, 1, 3076, 2, 1, 2, 34, 2, 1, 11), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: alMultiLinkStatsRxMlpFragments.setStatus('current')
alMultiLinkStatsRxMlpPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 3076, 2, 1, 2, 34, 2, 1, 12), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: alMultiLinkStatsRxMlpPackets.setStatus('current')
alMultiLinkStatsRxNonMlpPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 3076, 2, 1, 2, 34, 2, 1, 13), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: alMultiLinkStatsRxNonMlpPackets.setStatus('current')
alMultiLinkStatsRxThroughput = MibTableColumn((1, 3, 6, 1, 4, 1, 3076, 2, 1, 2, 34, 2, 1, 14), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: alMultiLinkStatsRxThroughput.setStatus('current')
alMultiLinkStatsRxLostEnd = MibTableColumn((1, 3, 6, 1, 4, 1, 3076, 2, 1, 2, 34, 2, 1, 15), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: alMultiLinkStatsRxLostEnd.setStatus('current')
alMultiLinkStatsRxStalePackets = MibTableColumn((1, 3, 6, 1, 4, 1, 3076, 2, 1, 2, 34, 2, 1, 16), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: alMultiLinkStatsRxStalePackets.setStatus('current')
alMultiLinkStatsRxStaleFragments = MibTableColumn((1, 3, 6, 1, 4, 1, 3076, 2, 1, 2, 34, 2, 1, 17), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: alMultiLinkStatsRxStaleFragments.setStatus('current')
alMultiLinkStatsRxDroppedFragments = MibTableColumn((1, 3, 6, 1, 4, 1, 3076, 2, 1, 2, 34, 2, 1, 18), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: alMultiLinkStatsRxDroppedFragments.setStatus('current')
alMultiLinkStatsRxOOSFragments = MibTableColumn((1, 3, 6, 1, 4, 1, 3076, 2, 1, 2, 34, 2, 1, 19), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: alMultiLinkStatsRxOOSFragments.setStatus('current')
alMultiLinkStatsIdleTmrCleanup = MibTableColumn((1, 3, 6, 1, 4, 1, 3076, 2, 1, 2, 34, 2, 1, 20), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: alMultiLinkStatsIdleTmrCleanup.setStatus('current')
altigaMultiLinkStatsMibConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 39, 2, 1))
altigaMultiLinkStatsMibCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 39, 2, 1, 1))
altigaMultiLinkStatsMibCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 3076, 1, 1, 39, 2, 1, 1, 1)).setObjects(("ALTIGA-MULTILINK-STATS-MIB", "altigaMultiLinkStatsGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
altigaMultiLinkStatsMibCompliance = altigaMultiLinkStatsMibCompliance.setStatus('current')
altigaMultiLinkStatsGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 3076, 2, 1, 1, 1, 34, 2)).setObjects(("ALTIGA-MULTILINK-STATS-MIB", "alMultiLinkStatsRowStatus"), ("ALTIGA-MULTILINK-STATS-MIB", "alMultiLinkStatsIndex"), ("ALTIGA-MULTILINK-STATS-MIB", "alMultiLinkStatsTxOctets"), ("ALTIGA-MULTILINK-STATS-MIB", "alMultiLinkStatsTxPackets"), ("ALTIGA-MULTILINK-STATS-MIB", "alMultiLinkStatsTxMlpFragments"), ("ALTIGA-MULTILINK-STATS-MIB", "alMultiLinkStatsTxMlpPackets"), ("ALTIGA-MULTILINK-STATS-MIB", "alMultiLinkStatsTxNonMlpPackets"), ("ALTIGA-MULTILINK-STATS-MIB", "alMultiLinkStatsTxThroughput"), ("ALTIGA-MULTILINK-STATS-MIB", "alMultiLinkStatsRxOctets"), ("ALTIGA-MULTILINK-STATS-MIB", "alMultiLinkStatsRxPackets"), ("ALTIGA-MULTILINK-STATS-MIB", "alMultiLinkStatsRxMlpFragments"), ("ALTIGA-MULTILINK-STATS-MIB", "alMultiLinkStatsRxMlpPackets"), ("ALTIGA-MULTILINK-STATS-MIB", "alMultiLinkStatsRxNonMlpPackets"), ("ALTIGA-MULTILINK-STATS-MIB", "alMultiLinkStatsRxThroughput"), ("ALTIGA-MULTILINK-STATS-MIB", "alMultiLinkStatsRxLostEnd"), ("ALTIGA-MULTILINK-STATS-MIB", "alMultiLinkStatsRxStalePackets"), ("ALTIGA-MULTILINK-STATS-MIB", "alMultiLinkStatsRxStaleFragments"), ("ALTIGA-MULTILINK-STATS-MIB", "alMultiLinkStatsRxDroppedFragments"), ("ALTIGA-MULTILINK-STATS-MIB", "alMultiLinkStatsRxOOSFragments"), ("ALTIGA-MULTILINK-STATS-MIB", "alMultiLinkStatsIdleTmrCleanup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
altigaMultiLinkStatsGroup = altigaMultiLinkStatsGroup.setStatus('current')
mibBuilder.exportSymbols("ALTIGA-MULTILINK-STATS-MIB", altigaMultiLinkStatsMibConformance=altigaMultiLinkStatsMibConformance, altigaMultiLinkStatsMibModule=altigaMultiLinkStatsMibModule, alMultiLinkStatsRxOctets=alMultiLinkStatsRxOctets, alMultiLinkStatsTxMlpFragments=alMultiLinkStatsTxMlpFragments, alMultiLinkStatsRowStatus=alMultiLinkStatsRowStatus, alMultiLinkStatsTxPackets=alMultiLinkStatsTxPackets, alMultiLinkStatsRxThroughput=alMultiLinkStatsRxThroughput, alMultiLinkStatsRxStalePackets=alMultiLinkStatsRxStalePackets, alMultiLinkStatsTxThroughput=alMultiLinkStatsTxThroughput, alMultiLinkStatsEntry=alMultiLinkStatsEntry, alMultiLinkStatsIndex=alMultiLinkStatsIndex, alMultiLinkStatsRxNonMlpPackets=alMultiLinkStatsRxNonMlpPackets, alMultiLinkStatsRxMlpFragments=alMultiLinkStatsRxMlpFragments, alMultiLinkStatsTxOctets=alMultiLinkStatsTxOctets, alMultiLinkStatsRxLostEnd=alMultiLinkStatsRxLostEnd, alMultiLinkStatsRxOOSFragments=alMultiLinkStatsRxOOSFragments, PYSNMP_MODULE_ID=altigaMultiLinkStatsMibModule, altigaMultiLinkStatsMibCompliance=altigaMultiLinkStatsMibCompliance, altigaMultiLinkStatsGroup=altigaMultiLinkStatsGroup, alMultiLinkStatsTxMlpPackets=alMultiLinkStatsTxMlpPackets, alMultiLinkStatsTxNonMlpPackets=alMultiLinkStatsTxNonMlpPackets, altigaMultiLinkStatsMibCompliances=altigaMultiLinkStatsMibCompliances, alStatsMultiLinkGlobal=alStatsMultiLinkGlobal, alMultiLinkStatsRxDroppedFragments=alMultiLinkStatsRxDroppedFragments, alMultiLinkStatsRxMlpPackets=alMultiLinkStatsRxMlpPackets, alMultiLinkStatsTable=alMultiLinkStatsTable, alMultiLinkStatsRxPackets=alMultiLinkStatsRxPackets, alMultiLinkStatsRxStaleFragments=alMultiLinkStatsRxStaleFragments, alMultiLinkStatsIdleTmrCleanup=alMultiLinkStatsIdleTmrCleanup)
|
(al_multi_link_mib_module,) = mibBuilder.importSymbols('ALTIGA-GLOBAL-REG', 'alMultiLinkMibModule')
(al_multi_link_group, al_stats_multi_link) = mibBuilder.importSymbols('ALTIGA-MIB', 'alMultiLinkGroup', 'alStatsMultiLink')
(object_identifier, integer, octet_string) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'Integer', 'OctetString')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(value_size_constraint, single_value_constraint, value_range_constraint, constraints_union, constraints_intersection) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueSizeConstraint', 'SingleValueConstraint', 'ValueRangeConstraint', 'ConstraintsUnion', 'ConstraintsIntersection')
(object_group, notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'ObjectGroup', 'NotificationGroup', 'ModuleCompliance')
(mib_identifier, ip_address, object_identity, counter32, time_ticks, bits, unsigned32, mib_scalar, mib_table, mib_table_row, mib_table_column, integer32, module_identity, gauge32, notification_type, iso, counter64) = mibBuilder.importSymbols('SNMPv2-SMI', 'MibIdentifier', 'IpAddress', 'ObjectIdentity', 'Counter32', 'TimeTicks', 'Bits', 'Unsigned32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Integer32', 'ModuleIdentity', 'Gauge32', 'NotificationType', 'iso', 'Counter64')
(display_string, textual_convention, row_status) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention', 'RowStatus')
altiga_multi_link_stats_mib_module = module_identity((1, 3, 6, 1, 4, 1, 3076, 1, 1, 39, 2))
altigaMultiLinkStatsMibModule.setRevisions(('2002-09-05 13:00', '2002-07-10 00:00'))
if mibBuilder.loadTexts:
altigaMultiLinkStatsMibModule.setLastUpdated('200209051300Z')
if mibBuilder.loadTexts:
altigaMultiLinkStatsMibModule.setOrganization('Cisco Systems, Inc.')
al_stats_multi_link_global = mib_identifier((1, 3, 6, 1, 4, 1, 3076, 2, 1, 2, 34, 1))
al_multi_link_stats_table = mib_table((1, 3, 6, 1, 4, 1, 3076, 2, 1, 2, 34, 2))
if mibBuilder.loadTexts:
alMultiLinkStatsTable.setStatus('current')
al_multi_link_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 3076, 2, 1, 2, 34, 2, 1)).setIndexNames((0, 'ALTIGA-MULTILINK-STATS-MIB', 'alMultiLinkStatsIndex'))
if mibBuilder.loadTexts:
alMultiLinkStatsEntry.setStatus('current')
al_multi_link_stats_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 3076, 2, 1, 2, 34, 2, 1, 1), row_status()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
alMultiLinkStatsRowStatus.setStatus('current')
al_multi_link_stats_index = mib_table_column((1, 3, 6, 1, 4, 1, 3076, 2, 1, 2, 34, 2, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alMultiLinkStatsIndex.setStatus('current')
al_multi_link_stats_tx_octets = mib_table_column((1, 3, 6, 1, 4, 1, 3076, 2, 1, 2, 34, 2, 1, 3), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alMultiLinkStatsTxOctets.setStatus('current')
al_multi_link_stats_tx_packets = mib_table_column((1, 3, 6, 1, 4, 1, 3076, 2, 1, 2, 34, 2, 1, 4), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alMultiLinkStatsTxPackets.setStatus('current')
al_multi_link_stats_tx_mlp_fragments = mib_table_column((1, 3, 6, 1, 4, 1, 3076, 2, 1, 2, 34, 2, 1, 5), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alMultiLinkStatsTxMlpFragments.setStatus('current')
al_multi_link_stats_tx_mlp_packets = mib_table_column((1, 3, 6, 1, 4, 1, 3076, 2, 1, 2, 34, 2, 1, 6), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alMultiLinkStatsTxMlpPackets.setStatus('current')
al_multi_link_stats_tx_non_mlp_packets = mib_table_column((1, 3, 6, 1, 4, 1, 3076, 2, 1, 2, 34, 2, 1, 7), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alMultiLinkStatsTxNonMlpPackets.setStatus('current')
al_multi_link_stats_tx_throughput = mib_table_column((1, 3, 6, 1, 4, 1, 3076, 2, 1, 2, 34, 2, 1, 8), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alMultiLinkStatsTxThroughput.setStatus('current')
al_multi_link_stats_rx_octets = mib_table_column((1, 3, 6, 1, 4, 1, 3076, 2, 1, 2, 34, 2, 1, 9), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alMultiLinkStatsRxOctets.setStatus('current')
al_multi_link_stats_rx_packets = mib_table_column((1, 3, 6, 1, 4, 1, 3076, 2, 1, 2, 34, 2, 1, 10), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alMultiLinkStatsRxPackets.setStatus('current')
al_multi_link_stats_rx_mlp_fragments = mib_table_column((1, 3, 6, 1, 4, 1, 3076, 2, 1, 2, 34, 2, 1, 11), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alMultiLinkStatsRxMlpFragments.setStatus('current')
al_multi_link_stats_rx_mlp_packets = mib_table_column((1, 3, 6, 1, 4, 1, 3076, 2, 1, 2, 34, 2, 1, 12), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alMultiLinkStatsRxMlpPackets.setStatus('current')
al_multi_link_stats_rx_non_mlp_packets = mib_table_column((1, 3, 6, 1, 4, 1, 3076, 2, 1, 2, 34, 2, 1, 13), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alMultiLinkStatsRxNonMlpPackets.setStatus('current')
al_multi_link_stats_rx_throughput = mib_table_column((1, 3, 6, 1, 4, 1, 3076, 2, 1, 2, 34, 2, 1, 14), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alMultiLinkStatsRxThroughput.setStatus('current')
al_multi_link_stats_rx_lost_end = mib_table_column((1, 3, 6, 1, 4, 1, 3076, 2, 1, 2, 34, 2, 1, 15), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alMultiLinkStatsRxLostEnd.setStatus('current')
al_multi_link_stats_rx_stale_packets = mib_table_column((1, 3, 6, 1, 4, 1, 3076, 2, 1, 2, 34, 2, 1, 16), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alMultiLinkStatsRxStalePackets.setStatus('current')
al_multi_link_stats_rx_stale_fragments = mib_table_column((1, 3, 6, 1, 4, 1, 3076, 2, 1, 2, 34, 2, 1, 17), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alMultiLinkStatsRxStaleFragments.setStatus('current')
al_multi_link_stats_rx_dropped_fragments = mib_table_column((1, 3, 6, 1, 4, 1, 3076, 2, 1, 2, 34, 2, 1, 18), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alMultiLinkStatsRxDroppedFragments.setStatus('current')
al_multi_link_stats_rx_oos_fragments = mib_table_column((1, 3, 6, 1, 4, 1, 3076, 2, 1, 2, 34, 2, 1, 19), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alMultiLinkStatsRxOOSFragments.setStatus('current')
al_multi_link_stats_idle_tmr_cleanup = mib_table_column((1, 3, 6, 1, 4, 1, 3076, 2, 1, 2, 34, 2, 1, 20), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
alMultiLinkStatsIdleTmrCleanup.setStatus('current')
altiga_multi_link_stats_mib_conformance = mib_identifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 39, 2, 1))
altiga_multi_link_stats_mib_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 3076, 1, 1, 39, 2, 1, 1))
altiga_multi_link_stats_mib_compliance = module_compliance((1, 3, 6, 1, 4, 1, 3076, 1, 1, 39, 2, 1, 1, 1)).setObjects(('ALTIGA-MULTILINK-STATS-MIB', 'altigaMultiLinkStatsGroup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
altiga_multi_link_stats_mib_compliance = altigaMultiLinkStatsMibCompliance.setStatus('current')
altiga_multi_link_stats_group = object_group((1, 3, 6, 1, 4, 1, 3076, 2, 1, 1, 1, 34, 2)).setObjects(('ALTIGA-MULTILINK-STATS-MIB', 'alMultiLinkStatsRowStatus'), ('ALTIGA-MULTILINK-STATS-MIB', 'alMultiLinkStatsIndex'), ('ALTIGA-MULTILINK-STATS-MIB', 'alMultiLinkStatsTxOctets'), ('ALTIGA-MULTILINK-STATS-MIB', 'alMultiLinkStatsTxPackets'), ('ALTIGA-MULTILINK-STATS-MIB', 'alMultiLinkStatsTxMlpFragments'), ('ALTIGA-MULTILINK-STATS-MIB', 'alMultiLinkStatsTxMlpPackets'), ('ALTIGA-MULTILINK-STATS-MIB', 'alMultiLinkStatsTxNonMlpPackets'), ('ALTIGA-MULTILINK-STATS-MIB', 'alMultiLinkStatsTxThroughput'), ('ALTIGA-MULTILINK-STATS-MIB', 'alMultiLinkStatsRxOctets'), ('ALTIGA-MULTILINK-STATS-MIB', 'alMultiLinkStatsRxPackets'), ('ALTIGA-MULTILINK-STATS-MIB', 'alMultiLinkStatsRxMlpFragments'), ('ALTIGA-MULTILINK-STATS-MIB', 'alMultiLinkStatsRxMlpPackets'), ('ALTIGA-MULTILINK-STATS-MIB', 'alMultiLinkStatsRxNonMlpPackets'), ('ALTIGA-MULTILINK-STATS-MIB', 'alMultiLinkStatsRxThroughput'), ('ALTIGA-MULTILINK-STATS-MIB', 'alMultiLinkStatsRxLostEnd'), ('ALTIGA-MULTILINK-STATS-MIB', 'alMultiLinkStatsRxStalePackets'), ('ALTIGA-MULTILINK-STATS-MIB', 'alMultiLinkStatsRxStaleFragments'), ('ALTIGA-MULTILINK-STATS-MIB', 'alMultiLinkStatsRxDroppedFragments'), ('ALTIGA-MULTILINK-STATS-MIB', 'alMultiLinkStatsRxOOSFragments'), ('ALTIGA-MULTILINK-STATS-MIB', 'alMultiLinkStatsIdleTmrCleanup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
altiga_multi_link_stats_group = altigaMultiLinkStatsGroup.setStatus('current')
mibBuilder.exportSymbols('ALTIGA-MULTILINK-STATS-MIB', altigaMultiLinkStatsMibConformance=altigaMultiLinkStatsMibConformance, altigaMultiLinkStatsMibModule=altigaMultiLinkStatsMibModule, alMultiLinkStatsRxOctets=alMultiLinkStatsRxOctets, alMultiLinkStatsTxMlpFragments=alMultiLinkStatsTxMlpFragments, alMultiLinkStatsRowStatus=alMultiLinkStatsRowStatus, alMultiLinkStatsTxPackets=alMultiLinkStatsTxPackets, alMultiLinkStatsRxThroughput=alMultiLinkStatsRxThroughput, alMultiLinkStatsRxStalePackets=alMultiLinkStatsRxStalePackets, alMultiLinkStatsTxThroughput=alMultiLinkStatsTxThroughput, alMultiLinkStatsEntry=alMultiLinkStatsEntry, alMultiLinkStatsIndex=alMultiLinkStatsIndex, alMultiLinkStatsRxNonMlpPackets=alMultiLinkStatsRxNonMlpPackets, alMultiLinkStatsRxMlpFragments=alMultiLinkStatsRxMlpFragments, alMultiLinkStatsTxOctets=alMultiLinkStatsTxOctets, alMultiLinkStatsRxLostEnd=alMultiLinkStatsRxLostEnd, alMultiLinkStatsRxOOSFragments=alMultiLinkStatsRxOOSFragments, PYSNMP_MODULE_ID=altigaMultiLinkStatsMibModule, altigaMultiLinkStatsMibCompliance=altigaMultiLinkStatsMibCompliance, altigaMultiLinkStatsGroup=altigaMultiLinkStatsGroup, alMultiLinkStatsTxMlpPackets=alMultiLinkStatsTxMlpPackets, alMultiLinkStatsTxNonMlpPackets=alMultiLinkStatsTxNonMlpPackets, altigaMultiLinkStatsMibCompliances=altigaMultiLinkStatsMibCompliances, alStatsMultiLinkGlobal=alStatsMultiLinkGlobal, alMultiLinkStatsRxDroppedFragments=alMultiLinkStatsRxDroppedFragments, alMultiLinkStatsRxMlpPackets=alMultiLinkStatsRxMlpPackets, alMultiLinkStatsTable=alMultiLinkStatsTable, alMultiLinkStatsRxPackets=alMultiLinkStatsRxPackets, alMultiLinkStatsRxStaleFragments=alMultiLinkStatsRxStaleFragments, alMultiLinkStatsIdleTmrCleanup=alMultiLinkStatsIdleTmrCleanup)
|
class Solution:
def isPalindrome(self, s: str) -> bool:
l,r = 0, len(s)-1
while l<r:
if not s[l].isalnum():
l+=1
elif not s[r].isalnum():
r-=1
elif s[l].lower() == s[r].lower():
l+=1
r-=1
else:
return False
return True
|
class Solution:
def is_palindrome(self, s: str) -> bool:
(l, r) = (0, len(s) - 1)
while l < r:
if not s[l].isalnum():
l += 1
elif not s[r].isalnum():
r -= 1
elif s[l].lower() == s[r].lower():
l += 1
r -= 1
else:
return False
return True
|
"""
Entrez is an API that provides access to many databases, with most databases
dealing with the biomedical and molecular fields.
In this project we are concerned with the PubMed and the PubMed Central
databases that hold biomedical literature.
See:
- Links to API documentation & examples: https://www.ncbi.nlm.nih.gov/pmc/tools/developers/
- Documentation about the E-utilities APIs: https://www.ncbi.nlm.nih.gov/books/NBK25501/
- List of the databases available through Entrez: https://www.ncbi.nlm.nih.gov/books/NBK3837/
"""
|
"""
Entrez is an API that provides access to many databases, with most databases
dealing with the biomedical and molecular fields.
In this project we are concerned with the PubMed and the PubMed Central
databases that hold biomedical literature.
See:
- Links to API documentation & examples: https://www.ncbi.nlm.nih.gov/pmc/tools/developers/
- Documentation about the E-utilities APIs: https://www.ncbi.nlm.nih.gov/books/NBK25501/
- List of the databases available through Entrez: https://www.ncbi.nlm.nih.gov/books/NBK3837/
"""
|
class Solution:
def rankTeams(self, votes: List[str]) -> str:
# Create 2D data structure A : 0, 0, 0, 'A', C: 0, 0, 0, 'B'
rnk = {v:[0] * len(votes[0]) + [v] for v in votes[0]}
# Tally votes in reverse because sort defaults ascending
for v in votes:
for i, c in enumerate(v):
rnk[c][i] -= 1
# Sort
return "".join(sorted(rnk, key = lambda x: rnk[x]))
|
class Solution:
def rank_teams(self, votes: List[str]) -> str:
rnk = {v: [0] * len(votes[0]) + [v] for v in votes[0]}
for v in votes:
for (i, c) in enumerate(v):
rnk[c][i] -= 1
return ''.join(sorted(rnk, key=lambda x: rnk[x]))
|
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution:
def findMode(self, root: TreeNode) -> List[int]:
if not root:
return
dic = {}
def record(node):
if not node:
return
if node.val not in dic:
dic[node.val] = 1
else:
dic[node.val] += 1
record(node.left)
record(node.right)
record(root)
self.modes = []
max_count = None
for key, val in dic.items():
if not max_count:
self.modes.append(key)
max_count = val
elif val == max_count:
self.modes.append(key)
elif val > max_count:
self.modes = [key]
max_count = val
return self.modes
|
class Solution:
def find_mode(self, root: TreeNode) -> List[int]:
if not root:
return
dic = {}
def record(node):
if not node:
return
if node.val not in dic:
dic[node.val] = 1
else:
dic[node.val] += 1
record(node.left)
record(node.right)
record(root)
self.modes = []
max_count = None
for (key, val) in dic.items():
if not max_count:
self.modes.append(key)
max_count = val
elif val == max_count:
self.modes.append(key)
elif val > max_count:
self.modes = [key]
max_count = val
return self.modes
|
#
# PySNMP MIB module TPT-DDOS-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/TPT-DDOS-MIB
# Produced by pysmi-0.3.4 at Wed May 1 15:26:17 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)
#
OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ConstraintsIntersection, ConstraintsUnion, ValueRangeConstraint, ValueSizeConstraint, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "ConstraintsUnion", "ValueRangeConstraint", "ValueSizeConstraint", "SingleValueConstraint")
ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup")
NotificationType, Unsigned32, Counter32, Bits, ModuleIdentity, TimeTicks, Gauge32, ObjectIdentity, IpAddress, Integer32, iso, MibIdentifier, Counter64, MibScalar, MibTable, MibTableRow, MibTableColumn = mibBuilder.importSymbols("SNMPv2-SMI", "NotificationType", "Unsigned32", "Counter32", "Bits", "ModuleIdentity", "TimeTicks", "Gauge32", "ObjectIdentity", "IpAddress", "Integer32", "iso", "MibIdentifier", "Counter64", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn")
DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention")
tpt_tpa_objs, = mibBuilder.importSymbols("TPT-TPAMIBS-MIB", "tpt-tpa-objs")
tpt_ddos = ModuleIdentity((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9)).setLabel("tpt-ddos")
tpt_ddos.setRevisions(('2016-05-25 18:54',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: tpt_ddos.setRevisionsDescriptions(('Updated copyright information. Minor MIB syntax fixes.',))
if mibBuilder.loadTexts: tpt_ddos.setLastUpdated('201605251854Z')
if mibBuilder.loadTexts: tpt_ddos.setOrganization('Trend Micro, Inc.')
if mibBuilder.loadTexts: tpt_ddos.setContactInfo('www.trendmicro.com')
if mibBuilder.loadTexts: tpt_ddos.setDescription("DDoS management (statistics). Copyright (C) 2016 Trend Micro Incorporated. All Rights Reserved. Trend Micro makes no warranty of any kind with regard to this material, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. Trend Micro shall not be liable for errors contained herein or for incidental or consequential damages in connection with the furnishing, performance, or use of this material. This document contains proprietary information, which is protected by copyright. No part of this document may be photocopied, reproduced, or translated into another language without the prior written consent of Trend Micro. The information is provided 'as is' without warranty of any kind and is subject to change without notice. The only warranties for Trend Micro products and services are set forth in the express warranty statements accompanying such products and services. Nothing herein should be construed as constituting an additional warranty. Trend Micro shall not be liable for technical or editorial errors or omissions contained herein. TippingPoint(R), the TippingPoint logo, and Digital Vaccine(R) are registered trademarks of Trend Micro. All other company and product names may be trademarks of their respective holders. All rights reserved. This document contains confidential information, trade secrets or both, which are the property of Trend Micro. No part of this documentation may be reproduced in any form or by any means or used to make any derivative work (such as translation, transformation, or adaptation) without written permission from Trend Micro or one of its subsidiaries. All other company and product names may be trademarks of their respective holders. ")
rejectSynHistSecondsTable = MibTable((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 5), )
if mibBuilder.loadTexts: rejectSynHistSecondsTable.setStatus('current')
if mibBuilder.loadTexts: rejectSynHistSecondsTable.setDescription('Historical (sampled) data every second for a minute.')
rejectSynHistSecondsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 5, 1), ).setIndexNames((0, "TPT-DDOS-MIB", "rejectSynHistSecondsGlobalID"), (0, "TPT-DDOS-MIB", "rejectSynHistSecondsIndex"))
if mibBuilder.loadTexts: rejectSynHistSecondsEntry.setStatus('current')
if mibBuilder.loadTexts: rejectSynHistSecondsEntry.setDescription('An entry in the rejected SYNs per second history seconds table. Rows cannot be created or deleted. ')
rejectSynHistSecondsGlobalID = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 5, 1, 1), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 40)))
if mibBuilder.loadTexts: rejectSynHistSecondsGlobalID.setStatus('current')
if mibBuilder.loadTexts: rejectSynHistSecondsGlobalID.setDescription('The global identifier of a DDoS filter group.')
rejectSynHistSecondsIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 5, 1, 2), Unsigned32())
if mibBuilder.loadTexts: rejectSynHistSecondsIndex.setStatus('current')
if mibBuilder.loadTexts: rejectSynHistSecondsIndex.setDescription('The index (0-59) of the second.')
rejectSynHistSecondsUnitCount = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 5, 1, 3), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rejectSynHistSecondsUnitCount.setStatus('current')
if mibBuilder.loadTexts: rejectSynHistSecondsUnitCount.setDescription('The count of filter-specific units matching the criteria for this filter in the specified second.')
rejectSynHistSecondsTimestamp = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 5, 1, 4), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rejectSynHistSecondsTimestamp.setStatus('current')
if mibBuilder.loadTexts: rejectSynHistSecondsTimestamp.setDescription('The time SecondsUnitCount was updated (in seconds since January 1, 1970).')
rejectSynHistMinutesTable = MibTable((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 6), )
if mibBuilder.loadTexts: rejectSynHistMinutesTable.setStatus('current')
if mibBuilder.loadTexts: rejectSynHistMinutesTable.setDescription('Historical (sampled) data every minute for an hour.')
rejectSynHistMinutesEntry = MibTableRow((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 6, 1), ).setIndexNames((0, "TPT-DDOS-MIB", "rejectSynHistMinutesGlobalID"), (0, "TPT-DDOS-MIB", "rejectSynHistMinutesIndex"))
if mibBuilder.loadTexts: rejectSynHistMinutesEntry.setStatus('current')
if mibBuilder.loadTexts: rejectSynHistMinutesEntry.setDescription('An entry in the rejected SYNs per second history minutes table. Rows cannot be created or deleted. ')
rejectSynHistMinutesGlobalID = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 6, 1, 1), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 40)))
if mibBuilder.loadTexts: rejectSynHistMinutesGlobalID.setStatus('current')
if mibBuilder.loadTexts: rejectSynHistMinutesGlobalID.setDescription('The global identifier of a DDoS filter group.')
rejectSynHistMinutesIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 6, 1, 2), Unsigned32())
if mibBuilder.loadTexts: rejectSynHistMinutesIndex.setStatus('current')
if mibBuilder.loadTexts: rejectSynHistMinutesIndex.setDescription('The index (0-59) of the minute.')
rejectSynHistMinutesUnitCount = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 6, 1, 3), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rejectSynHistMinutesUnitCount.setStatus('current')
if mibBuilder.loadTexts: rejectSynHistMinutesUnitCount.setDescription('The average of the SecondsUnitCount values corresponding to this minute.')
rejectSynHistMinutesTimestamp = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 6, 1, 4), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rejectSynHistMinutesTimestamp.setStatus('current')
if mibBuilder.loadTexts: rejectSynHistMinutesTimestamp.setDescription('The time MinutesUnitCount was updated (in seconds since January 1, 1970).')
rejectSynHistHoursTable = MibTable((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 7), )
if mibBuilder.loadTexts: rejectSynHistHoursTable.setStatus('current')
if mibBuilder.loadTexts: rejectSynHistHoursTable.setDescription('Historical (sampled) data every hour for a day.')
rejectSynHistHoursEntry = MibTableRow((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 7, 1), ).setIndexNames((0, "TPT-DDOS-MIB", "rejectSynHistHoursGlobalID"), (0, "TPT-DDOS-MIB", "rejectSynHistHoursIndex"))
if mibBuilder.loadTexts: rejectSynHistHoursEntry.setStatus('current')
if mibBuilder.loadTexts: rejectSynHistHoursEntry.setDescription('An entry in the rejected SYNs per second history hours table. Rows cannot be created or deleted. ')
rejectSynHistHoursGlobalID = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 7, 1, 1), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 40)))
if mibBuilder.loadTexts: rejectSynHistHoursGlobalID.setStatus('current')
if mibBuilder.loadTexts: rejectSynHistHoursGlobalID.setDescription('The global identifier of a DDoS filter group.')
rejectSynHistHoursIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 7, 1, 2), Unsigned32())
if mibBuilder.loadTexts: rejectSynHistHoursIndex.setStatus('current')
if mibBuilder.loadTexts: rejectSynHistHoursIndex.setDescription('The index (0-23) of the hour.')
rejectSynHistHoursUnitCount = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 7, 1, 3), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rejectSynHistHoursUnitCount.setStatus('current')
if mibBuilder.loadTexts: rejectSynHistHoursUnitCount.setDescription('The average of the MinutesUnitCount values corresponding to this hour.')
rejectSynHistHoursTimestamp = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 7, 1, 4), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rejectSynHistHoursTimestamp.setStatus('current')
if mibBuilder.loadTexts: rejectSynHistHoursTimestamp.setDescription('The time HoursUnitCount was updated (in seconds since January 1, 1970).')
rejectSynHistDaysTable = MibTable((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 8), )
if mibBuilder.loadTexts: rejectSynHistDaysTable.setStatus('current')
if mibBuilder.loadTexts: rejectSynHistDaysTable.setDescription('Historical (sampled) data every day for 35 days.')
rejectSynHistDaysEntry = MibTableRow((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 8, 1), ).setIndexNames((0, "TPT-DDOS-MIB", "rejectSynHistDaysGlobalID"), (0, "TPT-DDOS-MIB", "rejectSynHistDaysIndex"))
if mibBuilder.loadTexts: rejectSynHistDaysEntry.setStatus('current')
if mibBuilder.loadTexts: rejectSynHistDaysEntry.setDescription('An entry in the rejected SYNs per second history days table. Rows cannot be created or deleted. ')
rejectSynHistDaysGlobalID = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 8, 1, 1), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 40)))
if mibBuilder.loadTexts: rejectSynHistDaysGlobalID.setStatus('current')
if mibBuilder.loadTexts: rejectSynHistDaysGlobalID.setDescription('The global identifier of a DDoS filter group.')
rejectSynHistDaysIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 8, 1, 2), Unsigned32())
if mibBuilder.loadTexts: rejectSynHistDaysIndex.setStatus('current')
if mibBuilder.loadTexts: rejectSynHistDaysIndex.setDescription('The index (0-34) of the day.')
rejectSynHistDaysUnitCount = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 8, 1, 3), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rejectSynHistDaysUnitCount.setStatus('current')
if mibBuilder.loadTexts: rejectSynHistDaysUnitCount.setDescription('The average of the HoursUnitCount values corresponding to this day.')
rejectSynHistDaysTimestamp = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 8, 1, 4), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rejectSynHistDaysTimestamp.setStatus('current')
if mibBuilder.loadTexts: rejectSynHistDaysTimestamp.setDescription('The time DaysUnitCount was updated (in seconds since January 1, 1970).')
proxyConnHistSecondsTable = MibTable((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 9), )
if mibBuilder.loadTexts: proxyConnHistSecondsTable.setStatus('current')
if mibBuilder.loadTexts: proxyConnHistSecondsTable.setDescription('Historical (sampled) data every second for a minute.')
proxyConnHistSecondsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 9, 1), ).setIndexNames((0, "TPT-DDOS-MIB", "proxyConnHistSecondsGlobalID"), (0, "TPT-DDOS-MIB", "proxyConnHistSecondsIndex"))
if mibBuilder.loadTexts: proxyConnHistSecondsEntry.setStatus('current')
if mibBuilder.loadTexts: proxyConnHistSecondsEntry.setDescription('An entry in the proxied connections per second history seconds table. Rows cannot be created or deleted. ')
proxyConnHistSecondsGlobalID = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 9, 1, 1), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 40)))
if mibBuilder.loadTexts: proxyConnHistSecondsGlobalID.setStatus('current')
if mibBuilder.loadTexts: proxyConnHistSecondsGlobalID.setDescription('The global identifier of a DDoS filter group.')
proxyConnHistSecondsIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 9, 1, 2), Unsigned32())
if mibBuilder.loadTexts: proxyConnHistSecondsIndex.setStatus('current')
if mibBuilder.loadTexts: proxyConnHistSecondsIndex.setDescription('The index (0-59) of the second.')
proxyConnHistSecondsUnitCount = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 9, 1, 3), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: proxyConnHistSecondsUnitCount.setStatus('current')
if mibBuilder.loadTexts: proxyConnHistSecondsUnitCount.setDescription('The count of filter-specific units matching the traffic criteria for this filter in the specified second.')
proxyConnHistSecondsTimestamp = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 9, 1, 4), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: proxyConnHistSecondsTimestamp.setStatus('current')
if mibBuilder.loadTexts: proxyConnHistSecondsTimestamp.setDescription('The time SecondsUnitCount was updated (in seconds since January 1, 1970).')
proxyConnHistMinutesTable = MibTable((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 10), )
if mibBuilder.loadTexts: proxyConnHistMinutesTable.setStatus('current')
if mibBuilder.loadTexts: proxyConnHistMinutesTable.setDescription('Historical (sampled) data every minute for an hour.')
proxyConnHistMinutesEntry = MibTableRow((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 10, 1), ).setIndexNames((0, "TPT-DDOS-MIB", "proxyConnHistMinutesGlobalID"), (0, "TPT-DDOS-MIB", "proxyConnHistMinutesIndex"))
if mibBuilder.loadTexts: proxyConnHistMinutesEntry.setStatus('current')
if mibBuilder.loadTexts: proxyConnHistMinutesEntry.setDescription('An entry in the proxied connections per second history minutes table. Rows cannot be created or deleted. ')
proxyConnHistMinutesGlobalID = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 10, 1, 1), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 40)))
if mibBuilder.loadTexts: proxyConnHistMinutesGlobalID.setStatus('current')
if mibBuilder.loadTexts: proxyConnHistMinutesGlobalID.setDescription('The global identifier of a DDoS filter group.')
proxyConnHistMinutesIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 10, 1, 2), Unsigned32())
if mibBuilder.loadTexts: proxyConnHistMinutesIndex.setStatus('current')
if mibBuilder.loadTexts: proxyConnHistMinutesIndex.setDescription('The index (0-59) of the minute.')
proxyConnHistMinutesUnitCount = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 10, 1, 3), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: proxyConnHistMinutesUnitCount.setStatus('current')
if mibBuilder.loadTexts: proxyConnHistMinutesUnitCount.setDescription('The average of the SecondsUnitCount values corresponding to this minute.')
proxyConnHistMinutesTimestamp = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 10, 1, 4), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: proxyConnHistMinutesTimestamp.setStatus('current')
if mibBuilder.loadTexts: proxyConnHistMinutesTimestamp.setDescription('The time MinutesUnitCount was updated (in seconds since January 1, 1970).')
proxyConnHistHoursTable = MibTable((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 11), )
if mibBuilder.loadTexts: proxyConnHistHoursTable.setStatus('current')
if mibBuilder.loadTexts: proxyConnHistHoursTable.setDescription('Historical (sampled) data every hour for a day.')
proxyConnHistHoursEntry = MibTableRow((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 11, 1), ).setIndexNames((0, "TPT-DDOS-MIB", "proxyConnHistHoursGlobalID"), (0, "TPT-DDOS-MIB", "proxyConnHistHoursIndex"))
if mibBuilder.loadTexts: proxyConnHistHoursEntry.setStatus('current')
if mibBuilder.loadTexts: proxyConnHistHoursEntry.setDescription('An entry in the proxied connections per second history hours table. Rows cannot be created or deleted. ')
proxyConnHistHoursGlobalID = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 11, 1, 1), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 40)))
if mibBuilder.loadTexts: proxyConnHistHoursGlobalID.setStatus('current')
if mibBuilder.loadTexts: proxyConnHistHoursGlobalID.setDescription('The global identifier of a DDoS filter group.')
proxyConnHistHoursIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 11, 1, 2), Unsigned32())
if mibBuilder.loadTexts: proxyConnHistHoursIndex.setStatus('current')
if mibBuilder.loadTexts: proxyConnHistHoursIndex.setDescription('The index (0-23) of the hour.')
proxyConnHistHoursUnitCount = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 11, 1, 3), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: proxyConnHistHoursUnitCount.setStatus('current')
if mibBuilder.loadTexts: proxyConnHistHoursUnitCount.setDescription('The average of the MinutesUnitCount values corresponding to this hour.')
proxyConnHistHoursTimestamp = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 11, 1, 4), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: proxyConnHistHoursTimestamp.setStatus('current')
if mibBuilder.loadTexts: proxyConnHistHoursTimestamp.setDescription('The time HoursUnitCount was updated (in seconds since January 1, 1970).')
proxyConnHistDaysTable = MibTable((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 12), )
if mibBuilder.loadTexts: proxyConnHistDaysTable.setStatus('current')
if mibBuilder.loadTexts: proxyConnHistDaysTable.setDescription('Historical (sampled) data every day for 35 days.')
proxyConnHistDaysEntry = MibTableRow((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 12, 1), ).setIndexNames((0, "TPT-DDOS-MIB", "proxyConnHistDaysGlobalID"), (0, "TPT-DDOS-MIB", "proxyConnHistDaysIndex"))
if mibBuilder.loadTexts: proxyConnHistDaysEntry.setStatus('current')
if mibBuilder.loadTexts: proxyConnHistDaysEntry.setDescription('An entry in the proxied connections per second history days table. Rows cannot be created or deleted. ')
proxyConnHistDaysGlobalID = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 12, 1, 1), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 40)))
if mibBuilder.loadTexts: proxyConnHistDaysGlobalID.setStatus('current')
if mibBuilder.loadTexts: proxyConnHistDaysGlobalID.setDescription('The global identifier of a DDoS filter group.')
proxyConnHistDaysIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 12, 1, 2), Unsigned32())
if mibBuilder.loadTexts: proxyConnHistDaysIndex.setStatus('current')
if mibBuilder.loadTexts: proxyConnHistDaysIndex.setDescription('The index (0-34) of the day.')
proxyConnHistDaysUnitCount = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 12, 1, 3), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: proxyConnHistDaysUnitCount.setStatus('current')
if mibBuilder.loadTexts: proxyConnHistDaysUnitCount.setDescription('The average of the HoursUnitCount values corresponding to this day.')
proxyConnHistDaysTimestamp = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 12, 1, 4), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: proxyConnHistDaysTimestamp.setStatus('current')
if mibBuilder.loadTexts: proxyConnHistDaysTimestamp.setDescription('The time DaysUnitCount was updated (in seconds since January 1, 1970).')
rejectCpsHistSecondsTable = MibTable((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 15), )
if mibBuilder.loadTexts: rejectCpsHistSecondsTable.setStatus('current')
if mibBuilder.loadTexts: rejectCpsHistSecondsTable.setDescription('Historical (sampled) data every second for a minute.')
rejectCpsHistSecondsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 15, 1), ).setIndexNames((0, "TPT-DDOS-MIB", "rejectCpsHistSecondsGlobalID"), (0, "TPT-DDOS-MIB", "rejectCpsHistSecondsIndex"))
if mibBuilder.loadTexts: rejectCpsHistSecondsEntry.setStatus('current')
if mibBuilder.loadTexts: rejectCpsHistSecondsEntry.setDescription('An entry in the rejected connections per sec (CPS) history seconds table. Rows cannot be created or deleted. ')
rejectCpsHistSecondsGlobalID = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 15, 1, 1), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 40)))
if mibBuilder.loadTexts: rejectCpsHistSecondsGlobalID.setStatus('current')
if mibBuilder.loadTexts: rejectCpsHistSecondsGlobalID.setDescription('The global identifier of a DDoS filter group.')
rejectCpsHistSecondsIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 15, 1, 2), Unsigned32())
if mibBuilder.loadTexts: rejectCpsHistSecondsIndex.setStatus('current')
if mibBuilder.loadTexts: rejectCpsHistSecondsIndex.setDescription('The index (0-59) of the second.')
rejectCpsHistSecondsUnitCount = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 15, 1, 3), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rejectCpsHistSecondsUnitCount.setStatus('current')
if mibBuilder.loadTexts: rejectCpsHistSecondsUnitCount.setDescription('The count of filter-specific units matching the criteria for this filter in the specified second.')
rejectCpsHistSecondsTimestamp = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 15, 1, 4), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rejectCpsHistSecondsTimestamp.setStatus('current')
if mibBuilder.loadTexts: rejectCpsHistSecondsTimestamp.setDescription('The time SecondsUnitCount was updated (in seconds since January 1, 1970).')
rejectCpsHistMinutesTable = MibTable((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 16), )
if mibBuilder.loadTexts: rejectCpsHistMinutesTable.setStatus('current')
if mibBuilder.loadTexts: rejectCpsHistMinutesTable.setDescription('Historical (sampled) data every minute for an hour.')
rejectCpsHistMinutesEntry = MibTableRow((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 16, 1), ).setIndexNames((0, "TPT-DDOS-MIB", "rejectCpsHistMinutesGlobalID"), (0, "TPT-DDOS-MIB", "rejectCpsHistMinutesIndex"))
if mibBuilder.loadTexts: rejectCpsHistMinutesEntry.setStatus('current')
if mibBuilder.loadTexts: rejectCpsHistMinutesEntry.setDescription('An entry in the rejected connections per sec (CPS) history minutes table. Rows cannot be created or deleted. ')
rejectCpsHistMinutesGlobalID = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 16, 1, 1), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 40)))
if mibBuilder.loadTexts: rejectCpsHistMinutesGlobalID.setStatus('current')
if mibBuilder.loadTexts: rejectCpsHistMinutesGlobalID.setDescription('The global identifier of a DDoS filter group.')
rejectCpsHistMinutesIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 16, 1, 2), Unsigned32())
if mibBuilder.loadTexts: rejectCpsHistMinutesIndex.setStatus('current')
if mibBuilder.loadTexts: rejectCpsHistMinutesIndex.setDescription('The index (0-59) of the minute.')
rejectCpsHistMinutesUnitCount = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 16, 1, 3), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rejectCpsHistMinutesUnitCount.setStatus('current')
if mibBuilder.loadTexts: rejectCpsHistMinutesUnitCount.setDescription('The average of the SecondsUnitCount values corresponding to this minute.')
rejectCpsHistMinutesTimestamp = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 16, 1, 4), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rejectCpsHistMinutesTimestamp.setStatus('current')
if mibBuilder.loadTexts: rejectCpsHistMinutesTimestamp.setDescription('The time MinutesUnitCount was updated (in seconds since January 1, 1970).')
rejectCpsHistHoursTable = MibTable((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 17), )
if mibBuilder.loadTexts: rejectCpsHistHoursTable.setStatus('current')
if mibBuilder.loadTexts: rejectCpsHistHoursTable.setDescription('Historical (sampled) data every hour for a day.')
rejectCpsHistHoursEntry = MibTableRow((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 17, 1), ).setIndexNames((0, "TPT-DDOS-MIB", "rejectCpsHistHoursGlobalID"), (0, "TPT-DDOS-MIB", "rejectCpsHistHoursIndex"))
if mibBuilder.loadTexts: rejectCpsHistHoursEntry.setStatus('current')
if mibBuilder.loadTexts: rejectCpsHistHoursEntry.setDescription('An entry in the rejected connections per sec (CPS) history hours table. Rows cannot be created or deleted. ')
rejectCpsHistHoursGlobalID = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 17, 1, 1), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 40)))
if mibBuilder.loadTexts: rejectCpsHistHoursGlobalID.setStatus('current')
if mibBuilder.loadTexts: rejectCpsHistHoursGlobalID.setDescription('The global identifier of a DDoS filter group.')
rejectCpsHistHoursIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 17, 1, 2), Unsigned32())
if mibBuilder.loadTexts: rejectCpsHistHoursIndex.setStatus('current')
if mibBuilder.loadTexts: rejectCpsHistHoursIndex.setDescription('The index (0-23) of the hour.')
rejectCpsHistHoursUnitCount = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 17, 1, 3), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rejectCpsHistHoursUnitCount.setStatus('current')
if mibBuilder.loadTexts: rejectCpsHistHoursUnitCount.setDescription('The average of the MinutesUnitCount values corresponding to this hour.')
rejectCpsHistHoursTimestamp = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 17, 1, 4), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rejectCpsHistHoursTimestamp.setStatus('current')
if mibBuilder.loadTexts: rejectCpsHistHoursTimestamp.setDescription('The time HoursUnitCount was updated (in seconds since January 1, 1970).')
rejectCpsHistDaysTable = MibTable((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 18), )
if mibBuilder.loadTexts: rejectCpsHistDaysTable.setStatus('current')
if mibBuilder.loadTexts: rejectCpsHistDaysTable.setDescription('Historical (sampled) data every day for 35 days.')
rejectCpsHistDaysEntry = MibTableRow((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 18, 1), ).setIndexNames((0, "TPT-DDOS-MIB", "rejectCpsHistDaysGlobalID"), (0, "TPT-DDOS-MIB", "rejectCpsHistDaysIndex"))
if mibBuilder.loadTexts: rejectCpsHistDaysEntry.setStatus('current')
if mibBuilder.loadTexts: rejectCpsHistDaysEntry.setDescription('An entry in the rejected connections per sec (CPS) history days table. Rows cannot be created or deleted. ')
rejectCpsHistDaysGlobalID = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 18, 1, 1), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 40)))
if mibBuilder.loadTexts: rejectCpsHistDaysGlobalID.setStatus('current')
if mibBuilder.loadTexts: rejectCpsHistDaysGlobalID.setDescription('The global identifier of a DDoS filter group.')
rejectCpsHistDaysIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 18, 1, 2), Unsigned32())
if mibBuilder.loadTexts: rejectCpsHistDaysIndex.setStatus('current')
if mibBuilder.loadTexts: rejectCpsHistDaysIndex.setDescription('The index (0-34) of the day.')
rejectCpsHistDaysUnitCount = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 18, 1, 3), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rejectCpsHistDaysUnitCount.setStatus('current')
if mibBuilder.loadTexts: rejectCpsHistDaysUnitCount.setDescription('The average of the HoursUnitCount values corresponding to this day.')
rejectCpsHistDaysTimestamp = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 18, 1, 4), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rejectCpsHistDaysTimestamp.setStatus('current')
if mibBuilder.loadTexts: rejectCpsHistDaysTimestamp.setDescription('The time DaysUnitCount was updated (in seconds since January 1, 1970).')
acceptCpsHistSecondsTable = MibTable((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 19), )
if mibBuilder.loadTexts: acceptCpsHistSecondsTable.setStatus('current')
if mibBuilder.loadTexts: acceptCpsHistSecondsTable.setDescription('Historical (sampled) data every second for a minute.')
acceptCpsHistSecondsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 19, 1), ).setIndexNames((0, "TPT-DDOS-MIB", "acceptCpsHistSecondsGlobalID"), (0, "TPT-DDOS-MIB", "acceptCpsHistSecondsIndex"))
if mibBuilder.loadTexts: acceptCpsHistSecondsEntry.setStatus('current')
if mibBuilder.loadTexts: acceptCpsHistSecondsEntry.setDescription('An entry in the accepted connections per sec (CPS) history seconds table. Rows cannot be created or deleted. ')
acceptCpsHistSecondsGlobalID = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 19, 1, 1), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 40)))
if mibBuilder.loadTexts: acceptCpsHistSecondsGlobalID.setStatus('current')
if mibBuilder.loadTexts: acceptCpsHistSecondsGlobalID.setDescription('The global identifier of a DDoS filter group.')
acceptCpsHistSecondsIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 19, 1, 2), Unsigned32())
if mibBuilder.loadTexts: acceptCpsHistSecondsIndex.setStatus('current')
if mibBuilder.loadTexts: acceptCpsHistSecondsIndex.setDescription('The index (0-59) of the second.')
acceptCpsHistSecondsUnitCount = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 19, 1, 3), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: acceptCpsHistSecondsUnitCount.setStatus('current')
if mibBuilder.loadTexts: acceptCpsHistSecondsUnitCount.setDescription('The count of filter-specific units matching the criteria for this filter in the specified second.')
acceptCpsHistSecondsTimestamp = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 19, 1, 4), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: acceptCpsHistSecondsTimestamp.setStatus('current')
if mibBuilder.loadTexts: acceptCpsHistSecondsTimestamp.setDescription('The time SecondsUnitCount was updated (in seconds since January 1, 1970).')
acceptCpsHistMinutesTable = MibTable((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 20), )
if mibBuilder.loadTexts: acceptCpsHistMinutesTable.setStatus('current')
if mibBuilder.loadTexts: acceptCpsHistMinutesTable.setDescription('Historical (sampled) data every minute for an hour.')
acceptCpsHistMinutesEntry = MibTableRow((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 20, 1), ).setIndexNames((0, "TPT-DDOS-MIB", "acceptCpsHistMinutesGlobalID"), (0, "TPT-DDOS-MIB", "acceptCpsHistMinutesIndex"))
if mibBuilder.loadTexts: acceptCpsHistMinutesEntry.setStatus('current')
if mibBuilder.loadTexts: acceptCpsHistMinutesEntry.setDescription('An entry in the accepted connections per sec (CPS) history minutes table. Rows cannot be created or deleted. ')
acceptCpsHistMinutesGlobalID = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 20, 1, 1), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 40)))
if mibBuilder.loadTexts: acceptCpsHistMinutesGlobalID.setStatus('current')
if mibBuilder.loadTexts: acceptCpsHistMinutesGlobalID.setDescription('The global identifier of a DDoS filter group.')
acceptCpsHistMinutesIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 20, 1, 2), Unsigned32())
if mibBuilder.loadTexts: acceptCpsHistMinutesIndex.setStatus('current')
if mibBuilder.loadTexts: acceptCpsHistMinutesIndex.setDescription('The index (0-59) of the minute.')
acceptCpsHistMinutesUnitCount = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 20, 1, 3), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: acceptCpsHistMinutesUnitCount.setStatus('current')
if mibBuilder.loadTexts: acceptCpsHistMinutesUnitCount.setDescription('The average of the SecondsUnitCount values corresponding to this minute.')
acceptCpsHistMinutesTimestamp = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 20, 1, 4), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: acceptCpsHistMinutesTimestamp.setStatus('current')
if mibBuilder.loadTexts: acceptCpsHistMinutesTimestamp.setDescription('The time MinutesUnitCount was updated (in seconds since January 1, 1970).')
acceptCpsHistHoursTable = MibTable((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 21), )
if mibBuilder.loadTexts: acceptCpsHistHoursTable.setStatus('current')
if mibBuilder.loadTexts: acceptCpsHistHoursTable.setDescription('Historical (sampled) data every hour for a day.')
acceptCpsHistHoursEntry = MibTableRow((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 21, 1), ).setIndexNames((0, "TPT-DDOS-MIB", "acceptCpsHistHoursGlobalID"), (0, "TPT-DDOS-MIB", "acceptCpsHistHoursIndex"))
if mibBuilder.loadTexts: acceptCpsHistHoursEntry.setStatus('current')
if mibBuilder.loadTexts: acceptCpsHistHoursEntry.setDescription('An entry in the accepted connections per sec (CPS) history hours table. Rows cannot be created or deleted. ')
acceptCpsHistHoursGlobalID = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 21, 1, 1), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 40)))
if mibBuilder.loadTexts: acceptCpsHistHoursGlobalID.setStatus('current')
if mibBuilder.loadTexts: acceptCpsHistHoursGlobalID.setDescription('The global identifier of a DDoS filter group.')
acceptCpsHistHoursIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 21, 1, 2), Unsigned32())
if mibBuilder.loadTexts: acceptCpsHistHoursIndex.setStatus('current')
if mibBuilder.loadTexts: acceptCpsHistHoursIndex.setDescription('The index (0-23) of the hour.')
acceptCpsHistHoursUnitCount = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 21, 1, 3), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: acceptCpsHistHoursUnitCount.setStatus('current')
if mibBuilder.loadTexts: acceptCpsHistHoursUnitCount.setDescription('The average of the MinutesUnitCount values corresponding to this hour.')
acceptCpsHistHoursTimestamp = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 21, 1, 4), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: acceptCpsHistHoursTimestamp.setStatus('current')
if mibBuilder.loadTexts: acceptCpsHistHoursTimestamp.setDescription('The time HoursUnitCount was updated (in seconds since January 1, 1970).')
acceptCpsHistDaysTable = MibTable((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 22), )
if mibBuilder.loadTexts: acceptCpsHistDaysTable.setStatus('current')
if mibBuilder.loadTexts: acceptCpsHistDaysTable.setDescription('Historical (sampled) data every day for 35 days.')
acceptCpsHistDaysEntry = MibTableRow((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 22, 1), ).setIndexNames((0, "TPT-DDOS-MIB", "acceptCpsHistDaysGlobalID"), (0, "TPT-DDOS-MIB", "acceptCpsHistDaysIndex"))
if mibBuilder.loadTexts: acceptCpsHistDaysEntry.setStatus('current')
if mibBuilder.loadTexts: acceptCpsHistDaysEntry.setDescription('An entry in the accepted connections per sec (CPS) history days table. Rows cannot be created or deleted. ')
acceptCpsHistDaysGlobalID = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 22, 1, 1), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 40)))
if mibBuilder.loadTexts: acceptCpsHistDaysGlobalID.setStatus('current')
if mibBuilder.loadTexts: acceptCpsHistDaysGlobalID.setDescription('The global identifier of a DDoS filter group.')
acceptCpsHistDaysIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 22, 1, 2), Unsigned32())
if mibBuilder.loadTexts: acceptCpsHistDaysIndex.setStatus('current')
if mibBuilder.loadTexts: acceptCpsHistDaysIndex.setDescription('The index (0-34) of the day.')
acceptCpsHistDaysUnitCount = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 22, 1, 3), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: acceptCpsHistDaysUnitCount.setStatus('current')
if mibBuilder.loadTexts: acceptCpsHistDaysUnitCount.setDescription('The average of the HoursUnitCount values corresponding to this day.')
acceptCpsHistDaysTimestamp = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 22, 1, 4), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: acceptCpsHistDaysTimestamp.setStatus('current')
if mibBuilder.loadTexts: acceptCpsHistDaysTimestamp.setDescription('The time DaysUnitCount was updated (in seconds since January 1, 1970).')
rejectEstHistSecondsTable = MibTable((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 25), )
if mibBuilder.loadTexts: rejectEstHistSecondsTable.setStatus('current')
if mibBuilder.loadTexts: rejectEstHistSecondsTable.setDescription('Historical (sampled) data every second for a minute.')
rejectEstHistSecondsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 25, 1), ).setIndexNames((0, "TPT-DDOS-MIB", "rejectEstHistSecondsGlobalID"), (0, "TPT-DDOS-MIB", "rejectEstHistSecondsIndex"))
if mibBuilder.loadTexts: rejectEstHistSecondsEntry.setStatus('current')
if mibBuilder.loadTexts: rejectEstHistSecondsEntry.setDescription('An entry in the rejected connections per sec (EST) history seconds table. Rows cannot be created or deleted. ')
rejectEstHistSecondsGlobalID = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 25, 1, 1), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 40)))
if mibBuilder.loadTexts: rejectEstHistSecondsGlobalID.setStatus('current')
if mibBuilder.loadTexts: rejectEstHistSecondsGlobalID.setDescription('The global identifier of a DDoS filter group.')
rejectEstHistSecondsIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 25, 1, 2), Unsigned32())
if mibBuilder.loadTexts: rejectEstHistSecondsIndex.setStatus('current')
if mibBuilder.loadTexts: rejectEstHistSecondsIndex.setDescription('The index (0-59) of the second.')
rejectEstHistSecondsUnitCount = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 25, 1, 3), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rejectEstHistSecondsUnitCount.setStatus('current')
if mibBuilder.loadTexts: rejectEstHistSecondsUnitCount.setDescription('The count of filter-specific units matching the criteria for this filter in the specified second.')
rejectEstHistSecondsTimestamp = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 25, 1, 4), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rejectEstHistSecondsTimestamp.setStatus('current')
if mibBuilder.loadTexts: rejectEstHistSecondsTimestamp.setDescription('The time SecondsUnitCount was updated (in seconds since January 1, 1970).')
rejectEstHistMinutesTable = MibTable((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 26), )
if mibBuilder.loadTexts: rejectEstHistMinutesTable.setStatus('current')
if mibBuilder.loadTexts: rejectEstHistMinutesTable.setDescription('Historical (sampled) data every minute for an hour.')
rejectEstHistMinutesEntry = MibTableRow((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 26, 1), ).setIndexNames((0, "TPT-DDOS-MIB", "rejectEstHistMinutesGlobalID"), (0, "TPT-DDOS-MIB", "rejectEstHistMinutesIndex"))
if mibBuilder.loadTexts: rejectEstHistMinutesEntry.setStatus('current')
if mibBuilder.loadTexts: rejectEstHistMinutesEntry.setDescription('An entry in the rejected connections per sec (EST) history minutes table. Rows cannot be created or deleted. ')
rejectEstHistMinutesGlobalID = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 26, 1, 1), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 40)))
if mibBuilder.loadTexts: rejectEstHistMinutesGlobalID.setStatus('current')
if mibBuilder.loadTexts: rejectEstHistMinutesGlobalID.setDescription('The global identifier of a DDoS filter group.')
rejectEstHistMinutesIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 26, 1, 2), Unsigned32())
if mibBuilder.loadTexts: rejectEstHistMinutesIndex.setStatus('current')
if mibBuilder.loadTexts: rejectEstHistMinutesIndex.setDescription('The index (0-59) of the minute.')
rejectEstHistMinutesUnitCount = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 26, 1, 3), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rejectEstHistMinutesUnitCount.setStatus('current')
if mibBuilder.loadTexts: rejectEstHistMinutesUnitCount.setDescription('The average of the SecondsUnitCount values corresponding to this minute.')
rejectEstHistMinutesTimestamp = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 26, 1, 4), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rejectEstHistMinutesTimestamp.setStatus('current')
if mibBuilder.loadTexts: rejectEstHistMinutesTimestamp.setDescription('The time MinutesUnitCount was updated (in seconds since January 1, 1970).')
rejectEstHistHoursTable = MibTable((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 27), )
if mibBuilder.loadTexts: rejectEstHistHoursTable.setStatus('current')
if mibBuilder.loadTexts: rejectEstHistHoursTable.setDescription('Historical (sampled) data every hour for a day.')
rejectEstHistHoursEntry = MibTableRow((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 27, 1), ).setIndexNames((0, "TPT-DDOS-MIB", "rejectEstHistHoursGlobalID"), (0, "TPT-DDOS-MIB", "rejectEstHistHoursIndex"))
if mibBuilder.loadTexts: rejectEstHistHoursEntry.setStatus('current')
if mibBuilder.loadTexts: rejectEstHistHoursEntry.setDescription('An entry in the rejected connections per sec (EST) history hours table. Rows cannot be created or deleted. ')
rejectEstHistHoursGlobalID = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 27, 1, 1), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 40)))
if mibBuilder.loadTexts: rejectEstHistHoursGlobalID.setStatus('current')
if mibBuilder.loadTexts: rejectEstHistHoursGlobalID.setDescription('The global identifier of a DDoS filter group.')
rejectEstHistHoursIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 27, 1, 2), Unsigned32())
if mibBuilder.loadTexts: rejectEstHistHoursIndex.setStatus('current')
if mibBuilder.loadTexts: rejectEstHistHoursIndex.setDescription('The index (0-23) of the hour.')
rejectEstHistHoursUnitCount = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 27, 1, 3), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rejectEstHistHoursUnitCount.setStatus('current')
if mibBuilder.loadTexts: rejectEstHistHoursUnitCount.setDescription('The average of the MinutesUnitCount values corresponding to this hour.')
rejectEstHistHoursTimestamp = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 27, 1, 4), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rejectEstHistHoursTimestamp.setStatus('current')
if mibBuilder.loadTexts: rejectEstHistHoursTimestamp.setDescription('The time HoursUnitCount was updated (in seconds since January 1, 1970).')
rejectEstHistDaysTable = MibTable((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 28), )
if mibBuilder.loadTexts: rejectEstHistDaysTable.setStatus('current')
if mibBuilder.loadTexts: rejectEstHistDaysTable.setDescription('Historical (sampled) data every day for 35 days.')
rejectEstHistDaysEntry = MibTableRow((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 28, 1), ).setIndexNames((0, "TPT-DDOS-MIB", "rejectEstHistDaysGlobalID"), (0, "TPT-DDOS-MIB", "rejectEstHistDaysIndex"))
if mibBuilder.loadTexts: rejectEstHistDaysEntry.setStatus('current')
if mibBuilder.loadTexts: rejectEstHistDaysEntry.setDescription('An entry in the rejected connections per sec (EST) history days table. Rows cannot be created or deleted. ')
rejectEstHistDaysGlobalID = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 28, 1, 1), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 40)))
if mibBuilder.loadTexts: rejectEstHistDaysGlobalID.setStatus('current')
if mibBuilder.loadTexts: rejectEstHistDaysGlobalID.setDescription('The global identifier of a DDoS filter group.')
rejectEstHistDaysIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 28, 1, 2), Unsigned32())
if mibBuilder.loadTexts: rejectEstHistDaysIndex.setStatus('current')
if mibBuilder.loadTexts: rejectEstHistDaysIndex.setDescription('The index (0-34) of the day.')
rejectEstHistDaysUnitCount = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 28, 1, 3), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rejectEstHistDaysUnitCount.setStatus('current')
if mibBuilder.loadTexts: rejectEstHistDaysUnitCount.setDescription('The average of the HoursUnitCount values corresponding to this day.')
rejectEstHistDaysTimestamp = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 28, 1, 4), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rejectEstHistDaysTimestamp.setStatus('current')
if mibBuilder.loadTexts: rejectEstHistDaysTimestamp.setDescription('The time DaysUnitCount was updated (in seconds since January 1, 1970).')
acceptEstHistSecondsTable = MibTable((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 29), )
if mibBuilder.loadTexts: acceptEstHistSecondsTable.setStatus('current')
if mibBuilder.loadTexts: acceptEstHistSecondsTable.setDescription('Historical (sampled) data every second for a minute.')
acceptEstHistSecondsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 29, 1), ).setIndexNames((0, "TPT-DDOS-MIB", "acceptEstHistSecondsGlobalID"), (0, "TPT-DDOS-MIB", "acceptEstHistSecondsIndex"))
if mibBuilder.loadTexts: acceptEstHistSecondsEntry.setStatus('current')
if mibBuilder.loadTexts: acceptEstHistSecondsEntry.setDescription('An entry in the accepted connections per sec (EST) history seconds table. Rows cannot be created or deleted. ')
acceptEstHistSecondsGlobalID = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 29, 1, 1), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 40)))
if mibBuilder.loadTexts: acceptEstHistSecondsGlobalID.setStatus('current')
if mibBuilder.loadTexts: acceptEstHistSecondsGlobalID.setDescription('The global identifier of a DDoS filter group.')
acceptEstHistSecondsIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 29, 1, 2), Unsigned32())
if mibBuilder.loadTexts: acceptEstHistSecondsIndex.setStatus('current')
if mibBuilder.loadTexts: acceptEstHistSecondsIndex.setDescription('The index (0-59) of the second.')
acceptEstHistSecondsUnitCount = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 29, 1, 3), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: acceptEstHistSecondsUnitCount.setStatus('current')
if mibBuilder.loadTexts: acceptEstHistSecondsUnitCount.setDescription('The count of filter-specific units matching the criteria for this filter in the specified second.')
acceptEstHistSecondsTimestamp = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 29, 1, 4), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: acceptEstHistSecondsTimestamp.setStatus('current')
if mibBuilder.loadTexts: acceptEstHistSecondsTimestamp.setDescription('The time SecondsUnitCount was updated (in seconds since January 1, 1970).')
acceptEstHistMinutesTable = MibTable((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 30), )
if mibBuilder.loadTexts: acceptEstHistMinutesTable.setStatus('current')
if mibBuilder.loadTexts: acceptEstHistMinutesTable.setDescription('Historical (sampled) data every minute for an hour.')
acceptEstHistMinutesEntry = MibTableRow((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 30, 1), ).setIndexNames((0, "TPT-DDOS-MIB", "acceptEstHistMinutesGlobalID"), (0, "TPT-DDOS-MIB", "acceptEstHistMinutesIndex"))
if mibBuilder.loadTexts: acceptEstHistMinutesEntry.setStatus('current')
if mibBuilder.loadTexts: acceptEstHistMinutesEntry.setDescription('An entry in the accepted connections per sec (EST) history minutes table. Rows cannot be created or deleted. ')
acceptEstHistMinutesGlobalID = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 30, 1, 1), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 40)))
if mibBuilder.loadTexts: acceptEstHistMinutesGlobalID.setStatus('current')
if mibBuilder.loadTexts: acceptEstHistMinutesGlobalID.setDescription('The global identifier of a DDoS filter group.')
acceptEstHistMinutesIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 30, 1, 2), Unsigned32())
if mibBuilder.loadTexts: acceptEstHistMinutesIndex.setStatus('current')
if mibBuilder.loadTexts: acceptEstHistMinutesIndex.setDescription('The index (0-59) of the minute.')
acceptEstHistMinutesUnitCount = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 30, 1, 3), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: acceptEstHistMinutesUnitCount.setStatus('current')
if mibBuilder.loadTexts: acceptEstHistMinutesUnitCount.setDescription('The average of the SecondsUnitCount values corresponding to this minute.')
acceptEstHistMinutesTimestamp = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 30, 1, 4), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: acceptEstHistMinutesTimestamp.setStatus('current')
if mibBuilder.loadTexts: acceptEstHistMinutesTimestamp.setDescription('The time MinutesUnitCount was updated (in seconds since January 1, 1970).')
acceptEstHistHoursTable = MibTable((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 31), )
if mibBuilder.loadTexts: acceptEstHistHoursTable.setStatus('current')
if mibBuilder.loadTexts: acceptEstHistHoursTable.setDescription('Historical (sampled) data every hour for a day.')
acceptEstHistHoursEntry = MibTableRow((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 31, 1), ).setIndexNames((0, "TPT-DDOS-MIB", "acceptEstHistHoursGlobalID"), (0, "TPT-DDOS-MIB", "acceptEstHistHoursIndex"))
if mibBuilder.loadTexts: acceptEstHistHoursEntry.setStatus('current')
if mibBuilder.loadTexts: acceptEstHistHoursEntry.setDescription('An entry in the accepted connections per sec (EST) history hours table. Rows cannot be created or deleted. ')
acceptEstHistHoursGlobalID = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 31, 1, 1), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 40)))
if mibBuilder.loadTexts: acceptEstHistHoursGlobalID.setStatus('current')
if mibBuilder.loadTexts: acceptEstHistHoursGlobalID.setDescription('The global identifier of a DDoS filter group.')
acceptEstHistHoursIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 31, 1, 2), Unsigned32())
if mibBuilder.loadTexts: acceptEstHistHoursIndex.setStatus('current')
if mibBuilder.loadTexts: acceptEstHistHoursIndex.setDescription('The index (0-23) of the hour.')
acceptEstHistHoursUnitCount = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 31, 1, 3), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: acceptEstHistHoursUnitCount.setStatus('current')
if mibBuilder.loadTexts: acceptEstHistHoursUnitCount.setDescription('The average of the MinutesUnitCount values corresponding to this hour.')
acceptEstHistHoursTimestamp = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 31, 1, 4), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: acceptEstHistHoursTimestamp.setStatus('current')
if mibBuilder.loadTexts: acceptEstHistHoursTimestamp.setDescription('The time HoursUnitCount was updated (in seconds since January 1, 1970).')
acceptEstHistDaysTable = MibTable((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 32), )
if mibBuilder.loadTexts: acceptEstHistDaysTable.setStatus('current')
if mibBuilder.loadTexts: acceptEstHistDaysTable.setDescription('Historical (sampled) data every day for 35 days.')
acceptEstHistDaysEntry = MibTableRow((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 32, 1), ).setIndexNames((0, "TPT-DDOS-MIB", "acceptEstHistDaysGlobalID"), (0, "TPT-DDOS-MIB", "acceptEstHistDaysIndex"))
if mibBuilder.loadTexts: acceptEstHistDaysEntry.setStatus('current')
if mibBuilder.loadTexts: acceptEstHistDaysEntry.setDescription('An entry in the accepted connections per sec (EST) history days table. Rows cannot be created or deleted. ')
acceptEstHistDaysGlobalID = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 32, 1, 1), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 40)))
if mibBuilder.loadTexts: acceptEstHistDaysGlobalID.setStatus('current')
if mibBuilder.loadTexts: acceptEstHistDaysGlobalID.setDescription('The global identifier of a DDoS filter group.')
acceptEstHistDaysIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 32, 1, 2), Unsigned32())
if mibBuilder.loadTexts: acceptEstHistDaysIndex.setStatus('current')
if mibBuilder.loadTexts: acceptEstHistDaysIndex.setDescription('The index (0-34) of the day.')
acceptEstHistDaysUnitCount = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 32, 1, 3), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: acceptEstHistDaysUnitCount.setStatus('current')
if mibBuilder.loadTexts: acceptEstHistDaysUnitCount.setDescription('The average of the HoursUnitCount values corresponding to this day.')
acceptEstHistDaysTimestamp = MibTableColumn((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 32, 1, 4), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: acceptEstHistDaysTimestamp.setStatus('current')
if mibBuilder.loadTexts: acceptEstHistDaysTimestamp.setDescription('The time DaysUnitCount was updated (in seconds since January 1, 1970).')
mibBuilder.exportSymbols("TPT-DDOS-MIB", rejectEstHistMinutesTable=rejectEstHistMinutesTable, proxyConnHistHoursGlobalID=proxyConnHistHoursGlobalID, rejectCpsHistSecondsTable=rejectCpsHistSecondsTable, proxyConnHistDaysGlobalID=proxyConnHistDaysGlobalID, acceptEstHistDaysUnitCount=acceptEstHistDaysUnitCount, acceptCpsHistMinutesGlobalID=acceptCpsHistMinutesGlobalID, proxyConnHistHoursEntry=proxyConnHistHoursEntry, acceptCpsHistHoursIndex=acceptCpsHistHoursIndex, acceptEstHistDaysTimestamp=acceptEstHistDaysTimestamp, rejectEstHistDaysEntry=rejectEstHistDaysEntry, acceptEstHistSecondsTable=acceptEstHistSecondsTable, rejectEstHistHoursEntry=rejectEstHistHoursEntry, acceptEstHistDaysGlobalID=acceptEstHistDaysGlobalID, rejectEstHistSecondsTable=rejectEstHistSecondsTable, rejectEstHistSecondsEntry=rejectEstHistSecondsEntry, acceptCpsHistSecondsEntry=acceptCpsHistSecondsEntry, acceptCpsHistSecondsUnitCount=acceptCpsHistSecondsUnitCount, proxyConnHistSecondsUnitCount=proxyConnHistSecondsUnitCount, acceptCpsHistDaysTable=acceptCpsHistDaysTable, acceptEstHistMinutesIndex=acceptEstHistMinutesIndex, rejectSynHistHoursUnitCount=rejectSynHistHoursUnitCount, rejectEstHistDaysTable=rejectEstHistDaysTable, rejectSynHistMinutesEntry=rejectSynHistMinutesEntry, acceptEstHistDaysTable=acceptEstHistDaysTable, acceptCpsHistHoursEntry=acceptCpsHistHoursEntry, rejectEstHistMinutesEntry=rejectEstHistMinutesEntry, acceptCpsHistDaysIndex=acceptCpsHistDaysIndex, acceptEstHistHoursGlobalID=acceptEstHistHoursGlobalID, rejectEstHistHoursGlobalID=rejectEstHistHoursGlobalID, acceptEstHistSecondsTimestamp=acceptEstHistSecondsTimestamp, rejectCpsHistDaysUnitCount=rejectCpsHistDaysUnitCount, rejectEstHistSecondsUnitCount=rejectEstHistSecondsUnitCount, acceptEstHistSecondsGlobalID=acceptEstHistSecondsGlobalID, proxyConnHistHoursIndex=proxyConnHistHoursIndex, rejectEstHistSecondsGlobalID=rejectEstHistSecondsGlobalID, rejectSynHistMinutesTable=rejectSynHistMinutesTable, rejectSynHistSecondsIndex=rejectSynHistSecondsIndex, acceptCpsHistMinutesIndex=acceptCpsHistMinutesIndex, acceptEstHistMinutesTimestamp=acceptEstHistMinutesTimestamp, rejectEstHistDaysTimestamp=rejectEstHistDaysTimestamp, acceptCpsHistDaysGlobalID=acceptCpsHistDaysGlobalID, rejectCpsHistSecondsIndex=rejectCpsHistSecondsIndex, acceptCpsHistMinutesUnitCount=acceptCpsHistMinutesUnitCount, proxyConnHistMinutesUnitCount=proxyConnHistMinutesUnitCount, acceptCpsHistDaysEntry=acceptCpsHistDaysEntry, proxyConnHistMinutesEntry=proxyConnHistMinutesEntry, rejectCpsHistMinutesGlobalID=rejectCpsHistMinutesGlobalID, acceptEstHistHoursEntry=acceptEstHistHoursEntry, rejectEstHistHoursIndex=rejectEstHistHoursIndex, rejectSynHistMinutesGlobalID=rejectSynHistMinutesGlobalID, acceptCpsHistHoursTable=acceptCpsHistHoursTable, rejectEstHistDaysIndex=rejectEstHistDaysIndex, rejectSynHistSecondsTable=rejectSynHistSecondsTable, rejectEstHistSecondsTimestamp=rejectEstHistSecondsTimestamp, rejectSynHistDaysGlobalID=rejectSynHistDaysGlobalID, rejectEstHistHoursTimestamp=rejectEstHistHoursTimestamp, acceptCpsHistSecondsGlobalID=acceptCpsHistSecondsGlobalID, rejectCpsHistSecondsUnitCount=rejectCpsHistSecondsUnitCount, rejectSynHistHoursTimestamp=rejectSynHistHoursTimestamp, acceptEstHistMinutesTable=acceptEstHistMinutesTable, rejectSynHistDaysUnitCount=rejectSynHistDaysUnitCount, acceptEstHistMinutesUnitCount=acceptEstHistMinutesUnitCount, PYSNMP_MODULE_ID=tpt_ddos, rejectEstHistHoursUnitCount=rejectEstHistHoursUnitCount, rejectCpsHistSecondsEntry=rejectCpsHistSecondsEntry, proxyConnHistMinutesIndex=proxyConnHistMinutesIndex, rejectCpsHistHoursEntry=rejectCpsHistHoursEntry, rejectEstHistMinutesIndex=rejectEstHistMinutesIndex, acceptEstHistSecondsUnitCount=acceptEstHistSecondsUnitCount, rejectSynHistSecondsUnitCount=rejectSynHistSecondsUnitCount, rejectCpsHistMinutesIndex=rejectCpsHistMinutesIndex, acceptCpsHistMinutesTimestamp=acceptCpsHistMinutesTimestamp, rejectSynHistMinutesTimestamp=rejectSynHistMinutesTimestamp, rejectCpsHistMinutesTable=rejectCpsHistMinutesTable, rejectEstHistMinutesUnitCount=rejectEstHistMinutesUnitCount, rejectSynHistDaysTable=rejectSynHistDaysTable, proxyConnHistDaysTimestamp=proxyConnHistDaysTimestamp, acceptCpsHistSecondsTable=acceptCpsHistSecondsTable, acceptCpsHistDaysTimestamp=acceptCpsHistDaysTimestamp, acceptCpsHistSecondsTimestamp=acceptCpsHistSecondsTimestamp, acceptEstHistDaysIndex=acceptEstHistDaysIndex, rejectSynHistSecondsTimestamp=rejectSynHistSecondsTimestamp, rejectCpsHistMinutesEntry=rejectCpsHistMinutesEntry, rejectEstHistHoursTable=rejectEstHistHoursTable, rejectCpsHistMinutesTimestamp=rejectCpsHistMinutesTimestamp, proxyConnHistDaysIndex=proxyConnHistDaysIndex, acceptEstHistSecondsIndex=acceptEstHistSecondsIndex, rejectCpsHistMinutesUnitCount=rejectCpsHistMinutesUnitCount, proxyConnHistSecondsTable=proxyConnHistSecondsTable, acceptCpsHistDaysUnitCount=acceptCpsHistDaysUnitCount, rejectEstHistDaysUnitCount=rejectEstHistDaysUnitCount, rejectCpsHistHoursIndex=rejectCpsHistHoursIndex, proxyConnHistMinutesGlobalID=proxyConnHistMinutesGlobalID, tpt_ddos=tpt_ddos, proxyConnHistSecondsGlobalID=proxyConnHistSecondsGlobalID, rejectCpsHistHoursGlobalID=rejectCpsHistHoursGlobalID, proxyConnHistDaysUnitCount=proxyConnHistDaysUnitCount, acceptEstHistDaysEntry=acceptEstHistDaysEntry, rejectSynHistSecondsEntry=rejectSynHistSecondsEntry, acceptCpsHistHoursTimestamp=acceptCpsHistHoursTimestamp, rejectCpsHistSecondsGlobalID=rejectCpsHistSecondsGlobalID, rejectCpsHistHoursUnitCount=rejectCpsHistHoursUnitCount, proxyConnHistSecondsTimestamp=proxyConnHistSecondsTimestamp, acceptEstHistHoursUnitCount=acceptEstHistHoursUnitCount, rejectCpsHistDaysTable=rejectCpsHistDaysTable, rejectSynHistHoursIndex=rejectSynHistHoursIndex, proxyConnHistSecondsIndex=proxyConnHistSecondsIndex, acceptEstHistMinutesGlobalID=acceptEstHistMinutesGlobalID, acceptEstHistHoursTimestamp=acceptEstHistHoursTimestamp, rejectSynHistSecondsGlobalID=rejectSynHistSecondsGlobalID, rejectCpsHistDaysIndex=rejectCpsHistDaysIndex, rejectEstHistDaysGlobalID=rejectEstHistDaysGlobalID, rejectSynHistDaysEntry=rejectSynHistDaysEntry, rejectSynHistMinutesUnitCount=rejectSynHistMinutesUnitCount, rejectSynHistHoursEntry=rejectSynHistHoursEntry, proxyConnHistSecondsEntry=proxyConnHistSecondsEntry, rejectCpsHistHoursTable=rejectCpsHistHoursTable, rejectSynHistHoursTable=rejectSynHistHoursTable, rejectCpsHistDaysEntry=rejectCpsHistDaysEntry, acceptEstHistSecondsEntry=acceptEstHistSecondsEntry, rejectSynHistDaysTimestamp=rejectSynHistDaysTimestamp, rejectEstHistMinutesGlobalID=rejectEstHistMinutesGlobalID, acceptEstHistHoursIndex=acceptEstHistHoursIndex, rejectSynHistMinutesIndex=rejectSynHistMinutesIndex, rejectSynHistHoursGlobalID=rejectSynHistHoursGlobalID, rejectCpsHistHoursTimestamp=rejectCpsHistHoursTimestamp, proxyConnHistHoursTimestamp=proxyConnHistHoursTimestamp, acceptEstHistMinutesEntry=acceptEstHistMinutesEntry, proxyConnHistDaysEntry=proxyConnHistDaysEntry, acceptCpsHistSecondsIndex=acceptCpsHistSecondsIndex, rejectEstHistSecondsIndex=rejectEstHistSecondsIndex, proxyConnHistMinutesTable=proxyConnHistMinutesTable, rejectCpsHistDaysTimestamp=rejectCpsHistDaysTimestamp, proxyConnHistMinutesTimestamp=proxyConnHistMinutesTimestamp, rejectSynHistDaysIndex=rejectSynHistDaysIndex, proxyConnHistHoursUnitCount=proxyConnHistHoursUnitCount, rejectCpsHistSecondsTimestamp=rejectCpsHistSecondsTimestamp, acceptEstHistHoursTable=acceptEstHistHoursTable, proxyConnHistHoursTable=proxyConnHistHoursTable, proxyConnHistDaysTable=proxyConnHistDaysTable, acceptCpsHistMinutesTable=acceptCpsHistMinutesTable, acceptCpsHistHoursGlobalID=acceptCpsHistHoursGlobalID, acceptCpsHistHoursUnitCount=acceptCpsHistHoursUnitCount, rejectEstHistMinutesTimestamp=rejectEstHistMinutesTimestamp, acceptCpsHistMinutesEntry=acceptCpsHistMinutesEntry, rejectCpsHistDaysGlobalID=rejectCpsHistDaysGlobalID)
|
(octet_string, object_identifier, integer) = mibBuilder.importSymbols('ASN1', 'OctetString', 'ObjectIdentifier', 'Integer')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(constraints_intersection, constraints_union, value_range_constraint, value_size_constraint, single_value_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsIntersection', 'ConstraintsUnion', 'ValueRangeConstraint', 'ValueSizeConstraint', 'SingleValueConstraint')
(module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup')
(notification_type, unsigned32, counter32, bits, module_identity, time_ticks, gauge32, object_identity, ip_address, integer32, iso, mib_identifier, counter64, mib_scalar, mib_table, mib_table_row, mib_table_column) = mibBuilder.importSymbols('SNMPv2-SMI', 'NotificationType', 'Unsigned32', 'Counter32', 'Bits', 'ModuleIdentity', 'TimeTicks', 'Gauge32', 'ObjectIdentity', 'IpAddress', 'Integer32', 'iso', 'MibIdentifier', 'Counter64', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn')
(display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention')
(tpt_tpa_objs,) = mibBuilder.importSymbols('TPT-TPAMIBS-MIB', 'tpt-tpa-objs')
tpt_ddos = module_identity((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9)).setLabel('tpt-ddos')
tpt_ddos.setRevisions(('2016-05-25 18:54',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts:
tpt_ddos.setRevisionsDescriptions(('Updated copyright information. Minor MIB syntax fixes.',))
if mibBuilder.loadTexts:
tpt_ddos.setLastUpdated('201605251854Z')
if mibBuilder.loadTexts:
tpt_ddos.setOrganization('Trend Micro, Inc.')
if mibBuilder.loadTexts:
tpt_ddos.setContactInfo('www.trendmicro.com')
if mibBuilder.loadTexts:
tpt_ddos.setDescription("DDoS management (statistics). Copyright (C) 2016 Trend Micro Incorporated. All Rights Reserved. Trend Micro makes no warranty of any kind with regard to this material, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. Trend Micro shall not be liable for errors contained herein or for incidental or consequential damages in connection with the furnishing, performance, or use of this material. This document contains proprietary information, which is protected by copyright. No part of this document may be photocopied, reproduced, or translated into another language without the prior written consent of Trend Micro. The information is provided 'as is' without warranty of any kind and is subject to change without notice. The only warranties for Trend Micro products and services are set forth in the express warranty statements accompanying such products and services. Nothing herein should be construed as constituting an additional warranty. Trend Micro shall not be liable for technical or editorial errors or omissions contained herein. TippingPoint(R), the TippingPoint logo, and Digital Vaccine(R) are registered trademarks of Trend Micro. All other company and product names may be trademarks of their respective holders. All rights reserved. This document contains confidential information, trade secrets or both, which are the property of Trend Micro. No part of this documentation may be reproduced in any form or by any means or used to make any derivative work (such as translation, transformation, or adaptation) without written permission from Trend Micro or one of its subsidiaries. All other company and product names may be trademarks of their respective holders. ")
reject_syn_hist_seconds_table = mib_table((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 5))
if mibBuilder.loadTexts:
rejectSynHistSecondsTable.setStatus('current')
if mibBuilder.loadTexts:
rejectSynHistSecondsTable.setDescription('Historical (sampled) data every second for a minute.')
reject_syn_hist_seconds_entry = mib_table_row((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 5, 1)).setIndexNames((0, 'TPT-DDOS-MIB', 'rejectSynHistSecondsGlobalID'), (0, 'TPT-DDOS-MIB', 'rejectSynHistSecondsIndex'))
if mibBuilder.loadTexts:
rejectSynHistSecondsEntry.setStatus('current')
if mibBuilder.loadTexts:
rejectSynHistSecondsEntry.setDescription('An entry in the rejected SYNs per second history seconds table. Rows cannot be created or deleted. ')
reject_syn_hist_seconds_global_id = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 5, 1, 1), octet_string().subtype(subtypeSpec=value_size_constraint(0, 40)))
if mibBuilder.loadTexts:
rejectSynHistSecondsGlobalID.setStatus('current')
if mibBuilder.loadTexts:
rejectSynHistSecondsGlobalID.setDescription('The global identifier of a DDoS filter group.')
reject_syn_hist_seconds_index = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 5, 1, 2), unsigned32())
if mibBuilder.loadTexts:
rejectSynHistSecondsIndex.setStatus('current')
if mibBuilder.loadTexts:
rejectSynHistSecondsIndex.setDescription('The index (0-59) of the second.')
reject_syn_hist_seconds_unit_count = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 5, 1, 3), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rejectSynHistSecondsUnitCount.setStatus('current')
if mibBuilder.loadTexts:
rejectSynHistSecondsUnitCount.setDescription('The count of filter-specific units matching the criteria for this filter in the specified second.')
reject_syn_hist_seconds_timestamp = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 5, 1, 4), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rejectSynHistSecondsTimestamp.setStatus('current')
if mibBuilder.loadTexts:
rejectSynHistSecondsTimestamp.setDescription('The time SecondsUnitCount was updated (in seconds since January 1, 1970).')
reject_syn_hist_minutes_table = mib_table((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 6))
if mibBuilder.loadTexts:
rejectSynHistMinutesTable.setStatus('current')
if mibBuilder.loadTexts:
rejectSynHistMinutesTable.setDescription('Historical (sampled) data every minute for an hour.')
reject_syn_hist_minutes_entry = mib_table_row((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 6, 1)).setIndexNames((0, 'TPT-DDOS-MIB', 'rejectSynHistMinutesGlobalID'), (0, 'TPT-DDOS-MIB', 'rejectSynHistMinutesIndex'))
if mibBuilder.loadTexts:
rejectSynHistMinutesEntry.setStatus('current')
if mibBuilder.loadTexts:
rejectSynHistMinutesEntry.setDescription('An entry in the rejected SYNs per second history minutes table. Rows cannot be created or deleted. ')
reject_syn_hist_minutes_global_id = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 6, 1, 1), octet_string().subtype(subtypeSpec=value_size_constraint(0, 40)))
if mibBuilder.loadTexts:
rejectSynHistMinutesGlobalID.setStatus('current')
if mibBuilder.loadTexts:
rejectSynHistMinutesGlobalID.setDescription('The global identifier of a DDoS filter group.')
reject_syn_hist_minutes_index = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 6, 1, 2), unsigned32())
if mibBuilder.loadTexts:
rejectSynHistMinutesIndex.setStatus('current')
if mibBuilder.loadTexts:
rejectSynHistMinutesIndex.setDescription('The index (0-59) of the minute.')
reject_syn_hist_minutes_unit_count = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 6, 1, 3), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rejectSynHistMinutesUnitCount.setStatus('current')
if mibBuilder.loadTexts:
rejectSynHistMinutesUnitCount.setDescription('The average of the SecondsUnitCount values corresponding to this minute.')
reject_syn_hist_minutes_timestamp = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 6, 1, 4), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rejectSynHistMinutesTimestamp.setStatus('current')
if mibBuilder.loadTexts:
rejectSynHistMinutesTimestamp.setDescription('The time MinutesUnitCount was updated (in seconds since January 1, 1970).')
reject_syn_hist_hours_table = mib_table((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 7))
if mibBuilder.loadTexts:
rejectSynHistHoursTable.setStatus('current')
if mibBuilder.loadTexts:
rejectSynHistHoursTable.setDescription('Historical (sampled) data every hour for a day.')
reject_syn_hist_hours_entry = mib_table_row((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 7, 1)).setIndexNames((0, 'TPT-DDOS-MIB', 'rejectSynHistHoursGlobalID'), (0, 'TPT-DDOS-MIB', 'rejectSynHistHoursIndex'))
if mibBuilder.loadTexts:
rejectSynHistHoursEntry.setStatus('current')
if mibBuilder.loadTexts:
rejectSynHistHoursEntry.setDescription('An entry in the rejected SYNs per second history hours table. Rows cannot be created or deleted. ')
reject_syn_hist_hours_global_id = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 7, 1, 1), octet_string().subtype(subtypeSpec=value_size_constraint(0, 40)))
if mibBuilder.loadTexts:
rejectSynHistHoursGlobalID.setStatus('current')
if mibBuilder.loadTexts:
rejectSynHistHoursGlobalID.setDescription('The global identifier of a DDoS filter group.')
reject_syn_hist_hours_index = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 7, 1, 2), unsigned32())
if mibBuilder.loadTexts:
rejectSynHistHoursIndex.setStatus('current')
if mibBuilder.loadTexts:
rejectSynHistHoursIndex.setDescription('The index (0-23) of the hour.')
reject_syn_hist_hours_unit_count = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 7, 1, 3), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rejectSynHistHoursUnitCount.setStatus('current')
if mibBuilder.loadTexts:
rejectSynHistHoursUnitCount.setDescription('The average of the MinutesUnitCount values corresponding to this hour.')
reject_syn_hist_hours_timestamp = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 7, 1, 4), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rejectSynHistHoursTimestamp.setStatus('current')
if mibBuilder.loadTexts:
rejectSynHistHoursTimestamp.setDescription('The time HoursUnitCount was updated (in seconds since January 1, 1970).')
reject_syn_hist_days_table = mib_table((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 8))
if mibBuilder.loadTexts:
rejectSynHistDaysTable.setStatus('current')
if mibBuilder.loadTexts:
rejectSynHistDaysTable.setDescription('Historical (sampled) data every day for 35 days.')
reject_syn_hist_days_entry = mib_table_row((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 8, 1)).setIndexNames((0, 'TPT-DDOS-MIB', 'rejectSynHistDaysGlobalID'), (0, 'TPT-DDOS-MIB', 'rejectSynHistDaysIndex'))
if mibBuilder.loadTexts:
rejectSynHistDaysEntry.setStatus('current')
if mibBuilder.loadTexts:
rejectSynHistDaysEntry.setDescription('An entry in the rejected SYNs per second history days table. Rows cannot be created or deleted. ')
reject_syn_hist_days_global_id = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 8, 1, 1), octet_string().subtype(subtypeSpec=value_size_constraint(0, 40)))
if mibBuilder.loadTexts:
rejectSynHistDaysGlobalID.setStatus('current')
if mibBuilder.loadTexts:
rejectSynHistDaysGlobalID.setDescription('The global identifier of a DDoS filter group.')
reject_syn_hist_days_index = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 8, 1, 2), unsigned32())
if mibBuilder.loadTexts:
rejectSynHistDaysIndex.setStatus('current')
if mibBuilder.loadTexts:
rejectSynHistDaysIndex.setDescription('The index (0-34) of the day.')
reject_syn_hist_days_unit_count = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 8, 1, 3), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rejectSynHistDaysUnitCount.setStatus('current')
if mibBuilder.loadTexts:
rejectSynHistDaysUnitCount.setDescription('The average of the HoursUnitCount values corresponding to this day.')
reject_syn_hist_days_timestamp = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 8, 1, 4), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rejectSynHistDaysTimestamp.setStatus('current')
if mibBuilder.loadTexts:
rejectSynHistDaysTimestamp.setDescription('The time DaysUnitCount was updated (in seconds since January 1, 1970).')
proxy_conn_hist_seconds_table = mib_table((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 9))
if mibBuilder.loadTexts:
proxyConnHistSecondsTable.setStatus('current')
if mibBuilder.loadTexts:
proxyConnHistSecondsTable.setDescription('Historical (sampled) data every second for a minute.')
proxy_conn_hist_seconds_entry = mib_table_row((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 9, 1)).setIndexNames((0, 'TPT-DDOS-MIB', 'proxyConnHistSecondsGlobalID'), (0, 'TPT-DDOS-MIB', 'proxyConnHistSecondsIndex'))
if mibBuilder.loadTexts:
proxyConnHistSecondsEntry.setStatus('current')
if mibBuilder.loadTexts:
proxyConnHistSecondsEntry.setDescription('An entry in the proxied connections per second history seconds table. Rows cannot be created or deleted. ')
proxy_conn_hist_seconds_global_id = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 9, 1, 1), octet_string().subtype(subtypeSpec=value_size_constraint(0, 40)))
if mibBuilder.loadTexts:
proxyConnHistSecondsGlobalID.setStatus('current')
if mibBuilder.loadTexts:
proxyConnHistSecondsGlobalID.setDescription('The global identifier of a DDoS filter group.')
proxy_conn_hist_seconds_index = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 9, 1, 2), unsigned32())
if mibBuilder.loadTexts:
proxyConnHistSecondsIndex.setStatus('current')
if mibBuilder.loadTexts:
proxyConnHistSecondsIndex.setDescription('The index (0-59) of the second.')
proxy_conn_hist_seconds_unit_count = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 9, 1, 3), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
proxyConnHistSecondsUnitCount.setStatus('current')
if mibBuilder.loadTexts:
proxyConnHistSecondsUnitCount.setDescription('The count of filter-specific units matching the traffic criteria for this filter in the specified second.')
proxy_conn_hist_seconds_timestamp = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 9, 1, 4), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
proxyConnHistSecondsTimestamp.setStatus('current')
if mibBuilder.loadTexts:
proxyConnHistSecondsTimestamp.setDescription('The time SecondsUnitCount was updated (in seconds since January 1, 1970).')
proxy_conn_hist_minutes_table = mib_table((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 10))
if mibBuilder.loadTexts:
proxyConnHistMinutesTable.setStatus('current')
if mibBuilder.loadTexts:
proxyConnHistMinutesTable.setDescription('Historical (sampled) data every minute for an hour.')
proxy_conn_hist_minutes_entry = mib_table_row((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 10, 1)).setIndexNames((0, 'TPT-DDOS-MIB', 'proxyConnHistMinutesGlobalID'), (0, 'TPT-DDOS-MIB', 'proxyConnHistMinutesIndex'))
if mibBuilder.loadTexts:
proxyConnHistMinutesEntry.setStatus('current')
if mibBuilder.loadTexts:
proxyConnHistMinutesEntry.setDescription('An entry in the proxied connections per second history minutes table. Rows cannot be created or deleted. ')
proxy_conn_hist_minutes_global_id = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 10, 1, 1), octet_string().subtype(subtypeSpec=value_size_constraint(0, 40)))
if mibBuilder.loadTexts:
proxyConnHistMinutesGlobalID.setStatus('current')
if mibBuilder.loadTexts:
proxyConnHistMinutesGlobalID.setDescription('The global identifier of a DDoS filter group.')
proxy_conn_hist_minutes_index = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 10, 1, 2), unsigned32())
if mibBuilder.loadTexts:
proxyConnHistMinutesIndex.setStatus('current')
if mibBuilder.loadTexts:
proxyConnHistMinutesIndex.setDescription('The index (0-59) of the minute.')
proxy_conn_hist_minutes_unit_count = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 10, 1, 3), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
proxyConnHistMinutesUnitCount.setStatus('current')
if mibBuilder.loadTexts:
proxyConnHistMinutesUnitCount.setDescription('The average of the SecondsUnitCount values corresponding to this minute.')
proxy_conn_hist_minutes_timestamp = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 10, 1, 4), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
proxyConnHistMinutesTimestamp.setStatus('current')
if mibBuilder.loadTexts:
proxyConnHistMinutesTimestamp.setDescription('The time MinutesUnitCount was updated (in seconds since January 1, 1970).')
proxy_conn_hist_hours_table = mib_table((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 11))
if mibBuilder.loadTexts:
proxyConnHistHoursTable.setStatus('current')
if mibBuilder.loadTexts:
proxyConnHistHoursTable.setDescription('Historical (sampled) data every hour for a day.')
proxy_conn_hist_hours_entry = mib_table_row((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 11, 1)).setIndexNames((0, 'TPT-DDOS-MIB', 'proxyConnHistHoursGlobalID'), (0, 'TPT-DDOS-MIB', 'proxyConnHistHoursIndex'))
if mibBuilder.loadTexts:
proxyConnHistHoursEntry.setStatus('current')
if mibBuilder.loadTexts:
proxyConnHistHoursEntry.setDescription('An entry in the proxied connections per second history hours table. Rows cannot be created or deleted. ')
proxy_conn_hist_hours_global_id = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 11, 1, 1), octet_string().subtype(subtypeSpec=value_size_constraint(0, 40)))
if mibBuilder.loadTexts:
proxyConnHistHoursGlobalID.setStatus('current')
if mibBuilder.loadTexts:
proxyConnHistHoursGlobalID.setDescription('The global identifier of a DDoS filter group.')
proxy_conn_hist_hours_index = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 11, 1, 2), unsigned32())
if mibBuilder.loadTexts:
proxyConnHistHoursIndex.setStatus('current')
if mibBuilder.loadTexts:
proxyConnHistHoursIndex.setDescription('The index (0-23) of the hour.')
proxy_conn_hist_hours_unit_count = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 11, 1, 3), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
proxyConnHistHoursUnitCount.setStatus('current')
if mibBuilder.loadTexts:
proxyConnHistHoursUnitCount.setDescription('The average of the MinutesUnitCount values corresponding to this hour.')
proxy_conn_hist_hours_timestamp = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 11, 1, 4), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
proxyConnHistHoursTimestamp.setStatus('current')
if mibBuilder.loadTexts:
proxyConnHistHoursTimestamp.setDescription('The time HoursUnitCount was updated (in seconds since January 1, 1970).')
proxy_conn_hist_days_table = mib_table((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 12))
if mibBuilder.loadTexts:
proxyConnHistDaysTable.setStatus('current')
if mibBuilder.loadTexts:
proxyConnHistDaysTable.setDescription('Historical (sampled) data every day for 35 days.')
proxy_conn_hist_days_entry = mib_table_row((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 12, 1)).setIndexNames((0, 'TPT-DDOS-MIB', 'proxyConnHistDaysGlobalID'), (0, 'TPT-DDOS-MIB', 'proxyConnHistDaysIndex'))
if mibBuilder.loadTexts:
proxyConnHistDaysEntry.setStatus('current')
if mibBuilder.loadTexts:
proxyConnHistDaysEntry.setDescription('An entry in the proxied connections per second history days table. Rows cannot be created or deleted. ')
proxy_conn_hist_days_global_id = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 12, 1, 1), octet_string().subtype(subtypeSpec=value_size_constraint(0, 40)))
if mibBuilder.loadTexts:
proxyConnHistDaysGlobalID.setStatus('current')
if mibBuilder.loadTexts:
proxyConnHistDaysGlobalID.setDescription('The global identifier of a DDoS filter group.')
proxy_conn_hist_days_index = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 12, 1, 2), unsigned32())
if mibBuilder.loadTexts:
proxyConnHistDaysIndex.setStatus('current')
if mibBuilder.loadTexts:
proxyConnHistDaysIndex.setDescription('The index (0-34) of the day.')
proxy_conn_hist_days_unit_count = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 12, 1, 3), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
proxyConnHistDaysUnitCount.setStatus('current')
if mibBuilder.loadTexts:
proxyConnHistDaysUnitCount.setDescription('The average of the HoursUnitCount values corresponding to this day.')
proxy_conn_hist_days_timestamp = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 12, 1, 4), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
proxyConnHistDaysTimestamp.setStatus('current')
if mibBuilder.loadTexts:
proxyConnHistDaysTimestamp.setDescription('The time DaysUnitCount was updated (in seconds since January 1, 1970).')
reject_cps_hist_seconds_table = mib_table((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 15))
if mibBuilder.loadTexts:
rejectCpsHistSecondsTable.setStatus('current')
if mibBuilder.loadTexts:
rejectCpsHistSecondsTable.setDescription('Historical (sampled) data every second for a minute.')
reject_cps_hist_seconds_entry = mib_table_row((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 15, 1)).setIndexNames((0, 'TPT-DDOS-MIB', 'rejectCpsHistSecondsGlobalID'), (0, 'TPT-DDOS-MIB', 'rejectCpsHistSecondsIndex'))
if mibBuilder.loadTexts:
rejectCpsHistSecondsEntry.setStatus('current')
if mibBuilder.loadTexts:
rejectCpsHistSecondsEntry.setDescription('An entry in the rejected connections per sec (CPS) history seconds table. Rows cannot be created or deleted. ')
reject_cps_hist_seconds_global_id = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 15, 1, 1), octet_string().subtype(subtypeSpec=value_size_constraint(0, 40)))
if mibBuilder.loadTexts:
rejectCpsHistSecondsGlobalID.setStatus('current')
if mibBuilder.loadTexts:
rejectCpsHistSecondsGlobalID.setDescription('The global identifier of a DDoS filter group.')
reject_cps_hist_seconds_index = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 15, 1, 2), unsigned32())
if mibBuilder.loadTexts:
rejectCpsHistSecondsIndex.setStatus('current')
if mibBuilder.loadTexts:
rejectCpsHistSecondsIndex.setDescription('The index (0-59) of the second.')
reject_cps_hist_seconds_unit_count = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 15, 1, 3), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rejectCpsHistSecondsUnitCount.setStatus('current')
if mibBuilder.loadTexts:
rejectCpsHistSecondsUnitCount.setDescription('The count of filter-specific units matching the criteria for this filter in the specified second.')
reject_cps_hist_seconds_timestamp = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 15, 1, 4), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rejectCpsHistSecondsTimestamp.setStatus('current')
if mibBuilder.loadTexts:
rejectCpsHistSecondsTimestamp.setDescription('The time SecondsUnitCount was updated (in seconds since January 1, 1970).')
reject_cps_hist_minutes_table = mib_table((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 16))
if mibBuilder.loadTexts:
rejectCpsHistMinutesTable.setStatus('current')
if mibBuilder.loadTexts:
rejectCpsHistMinutesTable.setDescription('Historical (sampled) data every minute for an hour.')
reject_cps_hist_minutes_entry = mib_table_row((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 16, 1)).setIndexNames((0, 'TPT-DDOS-MIB', 'rejectCpsHistMinutesGlobalID'), (0, 'TPT-DDOS-MIB', 'rejectCpsHistMinutesIndex'))
if mibBuilder.loadTexts:
rejectCpsHistMinutesEntry.setStatus('current')
if mibBuilder.loadTexts:
rejectCpsHistMinutesEntry.setDescription('An entry in the rejected connections per sec (CPS) history minutes table. Rows cannot be created or deleted. ')
reject_cps_hist_minutes_global_id = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 16, 1, 1), octet_string().subtype(subtypeSpec=value_size_constraint(0, 40)))
if mibBuilder.loadTexts:
rejectCpsHistMinutesGlobalID.setStatus('current')
if mibBuilder.loadTexts:
rejectCpsHistMinutesGlobalID.setDescription('The global identifier of a DDoS filter group.')
reject_cps_hist_minutes_index = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 16, 1, 2), unsigned32())
if mibBuilder.loadTexts:
rejectCpsHistMinutesIndex.setStatus('current')
if mibBuilder.loadTexts:
rejectCpsHistMinutesIndex.setDescription('The index (0-59) of the minute.')
reject_cps_hist_minutes_unit_count = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 16, 1, 3), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rejectCpsHistMinutesUnitCount.setStatus('current')
if mibBuilder.loadTexts:
rejectCpsHistMinutesUnitCount.setDescription('The average of the SecondsUnitCount values corresponding to this minute.')
reject_cps_hist_minutes_timestamp = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 16, 1, 4), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rejectCpsHistMinutesTimestamp.setStatus('current')
if mibBuilder.loadTexts:
rejectCpsHistMinutesTimestamp.setDescription('The time MinutesUnitCount was updated (in seconds since January 1, 1970).')
reject_cps_hist_hours_table = mib_table((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 17))
if mibBuilder.loadTexts:
rejectCpsHistHoursTable.setStatus('current')
if mibBuilder.loadTexts:
rejectCpsHistHoursTable.setDescription('Historical (sampled) data every hour for a day.')
reject_cps_hist_hours_entry = mib_table_row((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 17, 1)).setIndexNames((0, 'TPT-DDOS-MIB', 'rejectCpsHistHoursGlobalID'), (0, 'TPT-DDOS-MIB', 'rejectCpsHistHoursIndex'))
if mibBuilder.loadTexts:
rejectCpsHistHoursEntry.setStatus('current')
if mibBuilder.loadTexts:
rejectCpsHistHoursEntry.setDescription('An entry in the rejected connections per sec (CPS) history hours table. Rows cannot be created or deleted. ')
reject_cps_hist_hours_global_id = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 17, 1, 1), octet_string().subtype(subtypeSpec=value_size_constraint(0, 40)))
if mibBuilder.loadTexts:
rejectCpsHistHoursGlobalID.setStatus('current')
if mibBuilder.loadTexts:
rejectCpsHistHoursGlobalID.setDescription('The global identifier of a DDoS filter group.')
reject_cps_hist_hours_index = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 17, 1, 2), unsigned32())
if mibBuilder.loadTexts:
rejectCpsHistHoursIndex.setStatus('current')
if mibBuilder.loadTexts:
rejectCpsHistHoursIndex.setDescription('The index (0-23) of the hour.')
reject_cps_hist_hours_unit_count = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 17, 1, 3), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rejectCpsHistHoursUnitCount.setStatus('current')
if mibBuilder.loadTexts:
rejectCpsHistHoursUnitCount.setDescription('The average of the MinutesUnitCount values corresponding to this hour.')
reject_cps_hist_hours_timestamp = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 17, 1, 4), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rejectCpsHistHoursTimestamp.setStatus('current')
if mibBuilder.loadTexts:
rejectCpsHistHoursTimestamp.setDescription('The time HoursUnitCount was updated (in seconds since January 1, 1970).')
reject_cps_hist_days_table = mib_table((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 18))
if mibBuilder.loadTexts:
rejectCpsHistDaysTable.setStatus('current')
if mibBuilder.loadTexts:
rejectCpsHistDaysTable.setDescription('Historical (sampled) data every day for 35 days.')
reject_cps_hist_days_entry = mib_table_row((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 18, 1)).setIndexNames((0, 'TPT-DDOS-MIB', 'rejectCpsHistDaysGlobalID'), (0, 'TPT-DDOS-MIB', 'rejectCpsHistDaysIndex'))
if mibBuilder.loadTexts:
rejectCpsHistDaysEntry.setStatus('current')
if mibBuilder.loadTexts:
rejectCpsHistDaysEntry.setDescription('An entry in the rejected connections per sec (CPS) history days table. Rows cannot be created or deleted. ')
reject_cps_hist_days_global_id = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 18, 1, 1), octet_string().subtype(subtypeSpec=value_size_constraint(0, 40)))
if mibBuilder.loadTexts:
rejectCpsHistDaysGlobalID.setStatus('current')
if mibBuilder.loadTexts:
rejectCpsHistDaysGlobalID.setDescription('The global identifier of a DDoS filter group.')
reject_cps_hist_days_index = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 18, 1, 2), unsigned32())
if mibBuilder.loadTexts:
rejectCpsHistDaysIndex.setStatus('current')
if mibBuilder.loadTexts:
rejectCpsHistDaysIndex.setDescription('The index (0-34) of the day.')
reject_cps_hist_days_unit_count = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 18, 1, 3), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rejectCpsHistDaysUnitCount.setStatus('current')
if mibBuilder.loadTexts:
rejectCpsHistDaysUnitCount.setDescription('The average of the HoursUnitCount values corresponding to this day.')
reject_cps_hist_days_timestamp = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 18, 1, 4), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rejectCpsHistDaysTimestamp.setStatus('current')
if mibBuilder.loadTexts:
rejectCpsHistDaysTimestamp.setDescription('The time DaysUnitCount was updated (in seconds since January 1, 1970).')
accept_cps_hist_seconds_table = mib_table((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 19))
if mibBuilder.loadTexts:
acceptCpsHistSecondsTable.setStatus('current')
if mibBuilder.loadTexts:
acceptCpsHistSecondsTable.setDescription('Historical (sampled) data every second for a minute.')
accept_cps_hist_seconds_entry = mib_table_row((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 19, 1)).setIndexNames((0, 'TPT-DDOS-MIB', 'acceptCpsHistSecondsGlobalID'), (0, 'TPT-DDOS-MIB', 'acceptCpsHistSecondsIndex'))
if mibBuilder.loadTexts:
acceptCpsHistSecondsEntry.setStatus('current')
if mibBuilder.loadTexts:
acceptCpsHistSecondsEntry.setDescription('An entry in the accepted connections per sec (CPS) history seconds table. Rows cannot be created or deleted. ')
accept_cps_hist_seconds_global_id = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 19, 1, 1), octet_string().subtype(subtypeSpec=value_size_constraint(0, 40)))
if mibBuilder.loadTexts:
acceptCpsHistSecondsGlobalID.setStatus('current')
if mibBuilder.loadTexts:
acceptCpsHistSecondsGlobalID.setDescription('The global identifier of a DDoS filter group.')
accept_cps_hist_seconds_index = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 19, 1, 2), unsigned32())
if mibBuilder.loadTexts:
acceptCpsHistSecondsIndex.setStatus('current')
if mibBuilder.loadTexts:
acceptCpsHistSecondsIndex.setDescription('The index (0-59) of the second.')
accept_cps_hist_seconds_unit_count = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 19, 1, 3), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
acceptCpsHistSecondsUnitCount.setStatus('current')
if mibBuilder.loadTexts:
acceptCpsHistSecondsUnitCount.setDescription('The count of filter-specific units matching the criteria for this filter in the specified second.')
accept_cps_hist_seconds_timestamp = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 19, 1, 4), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
acceptCpsHistSecondsTimestamp.setStatus('current')
if mibBuilder.loadTexts:
acceptCpsHistSecondsTimestamp.setDescription('The time SecondsUnitCount was updated (in seconds since January 1, 1970).')
accept_cps_hist_minutes_table = mib_table((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 20))
if mibBuilder.loadTexts:
acceptCpsHistMinutesTable.setStatus('current')
if mibBuilder.loadTexts:
acceptCpsHistMinutesTable.setDescription('Historical (sampled) data every minute for an hour.')
accept_cps_hist_minutes_entry = mib_table_row((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 20, 1)).setIndexNames((0, 'TPT-DDOS-MIB', 'acceptCpsHistMinutesGlobalID'), (0, 'TPT-DDOS-MIB', 'acceptCpsHistMinutesIndex'))
if mibBuilder.loadTexts:
acceptCpsHistMinutesEntry.setStatus('current')
if mibBuilder.loadTexts:
acceptCpsHistMinutesEntry.setDescription('An entry in the accepted connections per sec (CPS) history minutes table. Rows cannot be created or deleted. ')
accept_cps_hist_minutes_global_id = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 20, 1, 1), octet_string().subtype(subtypeSpec=value_size_constraint(0, 40)))
if mibBuilder.loadTexts:
acceptCpsHistMinutesGlobalID.setStatus('current')
if mibBuilder.loadTexts:
acceptCpsHistMinutesGlobalID.setDescription('The global identifier of a DDoS filter group.')
accept_cps_hist_minutes_index = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 20, 1, 2), unsigned32())
if mibBuilder.loadTexts:
acceptCpsHistMinutesIndex.setStatus('current')
if mibBuilder.loadTexts:
acceptCpsHistMinutesIndex.setDescription('The index (0-59) of the minute.')
accept_cps_hist_minutes_unit_count = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 20, 1, 3), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
acceptCpsHistMinutesUnitCount.setStatus('current')
if mibBuilder.loadTexts:
acceptCpsHistMinutesUnitCount.setDescription('The average of the SecondsUnitCount values corresponding to this minute.')
accept_cps_hist_minutes_timestamp = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 20, 1, 4), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
acceptCpsHistMinutesTimestamp.setStatus('current')
if mibBuilder.loadTexts:
acceptCpsHistMinutesTimestamp.setDescription('The time MinutesUnitCount was updated (in seconds since January 1, 1970).')
accept_cps_hist_hours_table = mib_table((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 21))
if mibBuilder.loadTexts:
acceptCpsHistHoursTable.setStatus('current')
if mibBuilder.loadTexts:
acceptCpsHistHoursTable.setDescription('Historical (sampled) data every hour for a day.')
accept_cps_hist_hours_entry = mib_table_row((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 21, 1)).setIndexNames((0, 'TPT-DDOS-MIB', 'acceptCpsHistHoursGlobalID'), (0, 'TPT-DDOS-MIB', 'acceptCpsHistHoursIndex'))
if mibBuilder.loadTexts:
acceptCpsHistHoursEntry.setStatus('current')
if mibBuilder.loadTexts:
acceptCpsHistHoursEntry.setDescription('An entry in the accepted connections per sec (CPS) history hours table. Rows cannot be created or deleted. ')
accept_cps_hist_hours_global_id = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 21, 1, 1), octet_string().subtype(subtypeSpec=value_size_constraint(0, 40)))
if mibBuilder.loadTexts:
acceptCpsHistHoursGlobalID.setStatus('current')
if mibBuilder.loadTexts:
acceptCpsHistHoursGlobalID.setDescription('The global identifier of a DDoS filter group.')
accept_cps_hist_hours_index = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 21, 1, 2), unsigned32())
if mibBuilder.loadTexts:
acceptCpsHistHoursIndex.setStatus('current')
if mibBuilder.loadTexts:
acceptCpsHistHoursIndex.setDescription('The index (0-23) of the hour.')
accept_cps_hist_hours_unit_count = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 21, 1, 3), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
acceptCpsHistHoursUnitCount.setStatus('current')
if mibBuilder.loadTexts:
acceptCpsHistHoursUnitCount.setDescription('The average of the MinutesUnitCount values corresponding to this hour.')
accept_cps_hist_hours_timestamp = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 21, 1, 4), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
acceptCpsHistHoursTimestamp.setStatus('current')
if mibBuilder.loadTexts:
acceptCpsHistHoursTimestamp.setDescription('The time HoursUnitCount was updated (in seconds since January 1, 1970).')
accept_cps_hist_days_table = mib_table((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 22))
if mibBuilder.loadTexts:
acceptCpsHistDaysTable.setStatus('current')
if mibBuilder.loadTexts:
acceptCpsHistDaysTable.setDescription('Historical (sampled) data every day for 35 days.')
accept_cps_hist_days_entry = mib_table_row((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 22, 1)).setIndexNames((0, 'TPT-DDOS-MIB', 'acceptCpsHistDaysGlobalID'), (0, 'TPT-DDOS-MIB', 'acceptCpsHistDaysIndex'))
if mibBuilder.loadTexts:
acceptCpsHistDaysEntry.setStatus('current')
if mibBuilder.loadTexts:
acceptCpsHistDaysEntry.setDescription('An entry in the accepted connections per sec (CPS) history days table. Rows cannot be created or deleted. ')
accept_cps_hist_days_global_id = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 22, 1, 1), octet_string().subtype(subtypeSpec=value_size_constraint(0, 40)))
if mibBuilder.loadTexts:
acceptCpsHistDaysGlobalID.setStatus('current')
if mibBuilder.loadTexts:
acceptCpsHistDaysGlobalID.setDescription('The global identifier of a DDoS filter group.')
accept_cps_hist_days_index = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 22, 1, 2), unsigned32())
if mibBuilder.loadTexts:
acceptCpsHistDaysIndex.setStatus('current')
if mibBuilder.loadTexts:
acceptCpsHistDaysIndex.setDescription('The index (0-34) of the day.')
accept_cps_hist_days_unit_count = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 22, 1, 3), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
acceptCpsHistDaysUnitCount.setStatus('current')
if mibBuilder.loadTexts:
acceptCpsHistDaysUnitCount.setDescription('The average of the HoursUnitCount values corresponding to this day.')
accept_cps_hist_days_timestamp = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 22, 1, 4), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
acceptCpsHistDaysTimestamp.setStatus('current')
if mibBuilder.loadTexts:
acceptCpsHistDaysTimestamp.setDescription('The time DaysUnitCount was updated (in seconds since January 1, 1970).')
reject_est_hist_seconds_table = mib_table((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 25))
if mibBuilder.loadTexts:
rejectEstHistSecondsTable.setStatus('current')
if mibBuilder.loadTexts:
rejectEstHistSecondsTable.setDescription('Historical (sampled) data every second for a minute.')
reject_est_hist_seconds_entry = mib_table_row((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 25, 1)).setIndexNames((0, 'TPT-DDOS-MIB', 'rejectEstHistSecondsGlobalID'), (0, 'TPT-DDOS-MIB', 'rejectEstHistSecondsIndex'))
if mibBuilder.loadTexts:
rejectEstHistSecondsEntry.setStatus('current')
if mibBuilder.loadTexts:
rejectEstHistSecondsEntry.setDescription('An entry in the rejected connections per sec (EST) history seconds table. Rows cannot be created or deleted. ')
reject_est_hist_seconds_global_id = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 25, 1, 1), octet_string().subtype(subtypeSpec=value_size_constraint(0, 40)))
if mibBuilder.loadTexts:
rejectEstHistSecondsGlobalID.setStatus('current')
if mibBuilder.loadTexts:
rejectEstHistSecondsGlobalID.setDescription('The global identifier of a DDoS filter group.')
reject_est_hist_seconds_index = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 25, 1, 2), unsigned32())
if mibBuilder.loadTexts:
rejectEstHistSecondsIndex.setStatus('current')
if mibBuilder.loadTexts:
rejectEstHistSecondsIndex.setDescription('The index (0-59) of the second.')
reject_est_hist_seconds_unit_count = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 25, 1, 3), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rejectEstHistSecondsUnitCount.setStatus('current')
if mibBuilder.loadTexts:
rejectEstHistSecondsUnitCount.setDescription('The count of filter-specific units matching the criteria for this filter in the specified second.')
reject_est_hist_seconds_timestamp = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 25, 1, 4), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rejectEstHistSecondsTimestamp.setStatus('current')
if mibBuilder.loadTexts:
rejectEstHistSecondsTimestamp.setDescription('The time SecondsUnitCount was updated (in seconds since January 1, 1970).')
reject_est_hist_minutes_table = mib_table((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 26))
if mibBuilder.loadTexts:
rejectEstHistMinutesTable.setStatus('current')
if mibBuilder.loadTexts:
rejectEstHistMinutesTable.setDescription('Historical (sampled) data every minute for an hour.')
reject_est_hist_minutes_entry = mib_table_row((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 26, 1)).setIndexNames((0, 'TPT-DDOS-MIB', 'rejectEstHistMinutesGlobalID'), (0, 'TPT-DDOS-MIB', 'rejectEstHistMinutesIndex'))
if mibBuilder.loadTexts:
rejectEstHistMinutesEntry.setStatus('current')
if mibBuilder.loadTexts:
rejectEstHistMinutesEntry.setDescription('An entry in the rejected connections per sec (EST) history minutes table. Rows cannot be created or deleted. ')
reject_est_hist_minutes_global_id = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 26, 1, 1), octet_string().subtype(subtypeSpec=value_size_constraint(0, 40)))
if mibBuilder.loadTexts:
rejectEstHistMinutesGlobalID.setStatus('current')
if mibBuilder.loadTexts:
rejectEstHistMinutesGlobalID.setDescription('The global identifier of a DDoS filter group.')
reject_est_hist_minutes_index = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 26, 1, 2), unsigned32())
if mibBuilder.loadTexts:
rejectEstHistMinutesIndex.setStatus('current')
if mibBuilder.loadTexts:
rejectEstHistMinutesIndex.setDescription('The index (0-59) of the minute.')
reject_est_hist_minutes_unit_count = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 26, 1, 3), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rejectEstHistMinutesUnitCount.setStatus('current')
if mibBuilder.loadTexts:
rejectEstHistMinutesUnitCount.setDescription('The average of the SecondsUnitCount values corresponding to this minute.')
reject_est_hist_minutes_timestamp = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 26, 1, 4), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rejectEstHistMinutesTimestamp.setStatus('current')
if mibBuilder.loadTexts:
rejectEstHistMinutesTimestamp.setDescription('The time MinutesUnitCount was updated (in seconds since January 1, 1970).')
reject_est_hist_hours_table = mib_table((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 27))
if mibBuilder.loadTexts:
rejectEstHistHoursTable.setStatus('current')
if mibBuilder.loadTexts:
rejectEstHistHoursTable.setDescription('Historical (sampled) data every hour for a day.')
reject_est_hist_hours_entry = mib_table_row((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 27, 1)).setIndexNames((0, 'TPT-DDOS-MIB', 'rejectEstHistHoursGlobalID'), (0, 'TPT-DDOS-MIB', 'rejectEstHistHoursIndex'))
if mibBuilder.loadTexts:
rejectEstHistHoursEntry.setStatus('current')
if mibBuilder.loadTexts:
rejectEstHistHoursEntry.setDescription('An entry in the rejected connections per sec (EST) history hours table. Rows cannot be created or deleted. ')
reject_est_hist_hours_global_id = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 27, 1, 1), octet_string().subtype(subtypeSpec=value_size_constraint(0, 40)))
if mibBuilder.loadTexts:
rejectEstHistHoursGlobalID.setStatus('current')
if mibBuilder.loadTexts:
rejectEstHistHoursGlobalID.setDescription('The global identifier of a DDoS filter group.')
reject_est_hist_hours_index = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 27, 1, 2), unsigned32())
if mibBuilder.loadTexts:
rejectEstHistHoursIndex.setStatus('current')
if mibBuilder.loadTexts:
rejectEstHistHoursIndex.setDescription('The index (0-23) of the hour.')
reject_est_hist_hours_unit_count = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 27, 1, 3), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rejectEstHistHoursUnitCount.setStatus('current')
if mibBuilder.loadTexts:
rejectEstHistHoursUnitCount.setDescription('The average of the MinutesUnitCount values corresponding to this hour.')
reject_est_hist_hours_timestamp = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 27, 1, 4), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rejectEstHistHoursTimestamp.setStatus('current')
if mibBuilder.loadTexts:
rejectEstHistHoursTimestamp.setDescription('The time HoursUnitCount was updated (in seconds since January 1, 1970).')
reject_est_hist_days_table = mib_table((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 28))
if mibBuilder.loadTexts:
rejectEstHistDaysTable.setStatus('current')
if mibBuilder.loadTexts:
rejectEstHistDaysTable.setDescription('Historical (sampled) data every day for 35 days.')
reject_est_hist_days_entry = mib_table_row((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 28, 1)).setIndexNames((0, 'TPT-DDOS-MIB', 'rejectEstHistDaysGlobalID'), (0, 'TPT-DDOS-MIB', 'rejectEstHistDaysIndex'))
if mibBuilder.loadTexts:
rejectEstHistDaysEntry.setStatus('current')
if mibBuilder.loadTexts:
rejectEstHistDaysEntry.setDescription('An entry in the rejected connections per sec (EST) history days table. Rows cannot be created or deleted. ')
reject_est_hist_days_global_id = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 28, 1, 1), octet_string().subtype(subtypeSpec=value_size_constraint(0, 40)))
if mibBuilder.loadTexts:
rejectEstHistDaysGlobalID.setStatus('current')
if mibBuilder.loadTexts:
rejectEstHistDaysGlobalID.setDescription('The global identifier of a DDoS filter group.')
reject_est_hist_days_index = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 28, 1, 2), unsigned32())
if mibBuilder.loadTexts:
rejectEstHistDaysIndex.setStatus('current')
if mibBuilder.loadTexts:
rejectEstHistDaysIndex.setDescription('The index (0-34) of the day.')
reject_est_hist_days_unit_count = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 28, 1, 3), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rejectEstHistDaysUnitCount.setStatus('current')
if mibBuilder.loadTexts:
rejectEstHistDaysUnitCount.setDescription('The average of the HoursUnitCount values corresponding to this day.')
reject_est_hist_days_timestamp = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 28, 1, 4), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rejectEstHistDaysTimestamp.setStatus('current')
if mibBuilder.loadTexts:
rejectEstHistDaysTimestamp.setDescription('The time DaysUnitCount was updated (in seconds since January 1, 1970).')
accept_est_hist_seconds_table = mib_table((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 29))
if mibBuilder.loadTexts:
acceptEstHistSecondsTable.setStatus('current')
if mibBuilder.loadTexts:
acceptEstHistSecondsTable.setDescription('Historical (sampled) data every second for a minute.')
accept_est_hist_seconds_entry = mib_table_row((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 29, 1)).setIndexNames((0, 'TPT-DDOS-MIB', 'acceptEstHistSecondsGlobalID'), (0, 'TPT-DDOS-MIB', 'acceptEstHistSecondsIndex'))
if mibBuilder.loadTexts:
acceptEstHistSecondsEntry.setStatus('current')
if mibBuilder.loadTexts:
acceptEstHistSecondsEntry.setDescription('An entry in the accepted connections per sec (EST) history seconds table. Rows cannot be created or deleted. ')
accept_est_hist_seconds_global_id = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 29, 1, 1), octet_string().subtype(subtypeSpec=value_size_constraint(0, 40)))
if mibBuilder.loadTexts:
acceptEstHistSecondsGlobalID.setStatus('current')
if mibBuilder.loadTexts:
acceptEstHistSecondsGlobalID.setDescription('The global identifier of a DDoS filter group.')
accept_est_hist_seconds_index = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 29, 1, 2), unsigned32())
if mibBuilder.loadTexts:
acceptEstHistSecondsIndex.setStatus('current')
if mibBuilder.loadTexts:
acceptEstHistSecondsIndex.setDescription('The index (0-59) of the second.')
accept_est_hist_seconds_unit_count = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 29, 1, 3), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
acceptEstHistSecondsUnitCount.setStatus('current')
if mibBuilder.loadTexts:
acceptEstHistSecondsUnitCount.setDescription('The count of filter-specific units matching the criteria for this filter in the specified second.')
accept_est_hist_seconds_timestamp = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 29, 1, 4), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
acceptEstHistSecondsTimestamp.setStatus('current')
if mibBuilder.loadTexts:
acceptEstHistSecondsTimestamp.setDescription('The time SecondsUnitCount was updated (in seconds since January 1, 1970).')
accept_est_hist_minutes_table = mib_table((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 30))
if mibBuilder.loadTexts:
acceptEstHistMinutesTable.setStatus('current')
if mibBuilder.loadTexts:
acceptEstHistMinutesTable.setDescription('Historical (sampled) data every minute for an hour.')
accept_est_hist_minutes_entry = mib_table_row((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 30, 1)).setIndexNames((0, 'TPT-DDOS-MIB', 'acceptEstHistMinutesGlobalID'), (0, 'TPT-DDOS-MIB', 'acceptEstHistMinutesIndex'))
if mibBuilder.loadTexts:
acceptEstHistMinutesEntry.setStatus('current')
if mibBuilder.loadTexts:
acceptEstHistMinutesEntry.setDescription('An entry in the accepted connections per sec (EST) history minutes table. Rows cannot be created or deleted. ')
accept_est_hist_minutes_global_id = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 30, 1, 1), octet_string().subtype(subtypeSpec=value_size_constraint(0, 40)))
if mibBuilder.loadTexts:
acceptEstHistMinutesGlobalID.setStatus('current')
if mibBuilder.loadTexts:
acceptEstHistMinutesGlobalID.setDescription('The global identifier of a DDoS filter group.')
accept_est_hist_minutes_index = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 30, 1, 2), unsigned32())
if mibBuilder.loadTexts:
acceptEstHistMinutesIndex.setStatus('current')
if mibBuilder.loadTexts:
acceptEstHistMinutesIndex.setDescription('The index (0-59) of the minute.')
accept_est_hist_minutes_unit_count = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 30, 1, 3), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
acceptEstHistMinutesUnitCount.setStatus('current')
if mibBuilder.loadTexts:
acceptEstHistMinutesUnitCount.setDescription('The average of the SecondsUnitCount values corresponding to this minute.')
accept_est_hist_minutes_timestamp = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 30, 1, 4), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
acceptEstHistMinutesTimestamp.setStatus('current')
if mibBuilder.loadTexts:
acceptEstHistMinutesTimestamp.setDescription('The time MinutesUnitCount was updated (in seconds since January 1, 1970).')
accept_est_hist_hours_table = mib_table((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 31))
if mibBuilder.loadTexts:
acceptEstHistHoursTable.setStatus('current')
if mibBuilder.loadTexts:
acceptEstHistHoursTable.setDescription('Historical (sampled) data every hour for a day.')
accept_est_hist_hours_entry = mib_table_row((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 31, 1)).setIndexNames((0, 'TPT-DDOS-MIB', 'acceptEstHistHoursGlobalID'), (0, 'TPT-DDOS-MIB', 'acceptEstHistHoursIndex'))
if mibBuilder.loadTexts:
acceptEstHistHoursEntry.setStatus('current')
if mibBuilder.loadTexts:
acceptEstHistHoursEntry.setDescription('An entry in the accepted connections per sec (EST) history hours table. Rows cannot be created or deleted. ')
accept_est_hist_hours_global_id = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 31, 1, 1), octet_string().subtype(subtypeSpec=value_size_constraint(0, 40)))
if mibBuilder.loadTexts:
acceptEstHistHoursGlobalID.setStatus('current')
if mibBuilder.loadTexts:
acceptEstHistHoursGlobalID.setDescription('The global identifier of a DDoS filter group.')
accept_est_hist_hours_index = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 31, 1, 2), unsigned32())
if mibBuilder.loadTexts:
acceptEstHistHoursIndex.setStatus('current')
if mibBuilder.loadTexts:
acceptEstHistHoursIndex.setDescription('The index (0-23) of the hour.')
accept_est_hist_hours_unit_count = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 31, 1, 3), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
acceptEstHistHoursUnitCount.setStatus('current')
if mibBuilder.loadTexts:
acceptEstHistHoursUnitCount.setDescription('The average of the MinutesUnitCount values corresponding to this hour.')
accept_est_hist_hours_timestamp = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 31, 1, 4), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
acceptEstHistHoursTimestamp.setStatus('current')
if mibBuilder.loadTexts:
acceptEstHistHoursTimestamp.setDescription('The time HoursUnitCount was updated (in seconds since January 1, 1970).')
accept_est_hist_days_table = mib_table((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 32))
if mibBuilder.loadTexts:
acceptEstHistDaysTable.setStatus('current')
if mibBuilder.loadTexts:
acceptEstHistDaysTable.setDescription('Historical (sampled) data every day for 35 days.')
accept_est_hist_days_entry = mib_table_row((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 32, 1)).setIndexNames((0, 'TPT-DDOS-MIB', 'acceptEstHistDaysGlobalID'), (0, 'TPT-DDOS-MIB', 'acceptEstHistDaysIndex'))
if mibBuilder.loadTexts:
acceptEstHistDaysEntry.setStatus('current')
if mibBuilder.loadTexts:
acceptEstHistDaysEntry.setDescription('An entry in the accepted connections per sec (EST) history days table. Rows cannot be created or deleted. ')
accept_est_hist_days_global_id = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 32, 1, 1), octet_string().subtype(subtypeSpec=value_size_constraint(0, 40)))
if mibBuilder.loadTexts:
acceptEstHistDaysGlobalID.setStatus('current')
if mibBuilder.loadTexts:
acceptEstHistDaysGlobalID.setDescription('The global identifier of a DDoS filter group.')
accept_est_hist_days_index = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 32, 1, 2), unsigned32())
if mibBuilder.loadTexts:
acceptEstHistDaysIndex.setStatus('current')
if mibBuilder.loadTexts:
acceptEstHistDaysIndex.setDescription('The index (0-34) of the day.')
accept_est_hist_days_unit_count = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 32, 1, 3), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
acceptEstHistDaysUnitCount.setStatus('current')
if mibBuilder.loadTexts:
acceptEstHistDaysUnitCount.setDescription('The average of the HoursUnitCount values corresponding to this day.')
accept_est_hist_days_timestamp = mib_table_column((1, 3, 6, 1, 4, 1, 10734, 3, 3, 2, 9, 32, 1, 4), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
acceptEstHistDaysTimestamp.setStatus('current')
if mibBuilder.loadTexts:
acceptEstHistDaysTimestamp.setDescription('The time DaysUnitCount was updated (in seconds since January 1, 1970).')
mibBuilder.exportSymbols('TPT-DDOS-MIB', rejectEstHistMinutesTable=rejectEstHistMinutesTable, proxyConnHistHoursGlobalID=proxyConnHistHoursGlobalID, rejectCpsHistSecondsTable=rejectCpsHistSecondsTable, proxyConnHistDaysGlobalID=proxyConnHistDaysGlobalID, acceptEstHistDaysUnitCount=acceptEstHistDaysUnitCount, acceptCpsHistMinutesGlobalID=acceptCpsHistMinutesGlobalID, proxyConnHistHoursEntry=proxyConnHistHoursEntry, acceptCpsHistHoursIndex=acceptCpsHistHoursIndex, acceptEstHistDaysTimestamp=acceptEstHistDaysTimestamp, rejectEstHistDaysEntry=rejectEstHistDaysEntry, acceptEstHistSecondsTable=acceptEstHistSecondsTable, rejectEstHistHoursEntry=rejectEstHistHoursEntry, acceptEstHistDaysGlobalID=acceptEstHistDaysGlobalID, rejectEstHistSecondsTable=rejectEstHistSecondsTable, rejectEstHistSecondsEntry=rejectEstHistSecondsEntry, acceptCpsHistSecondsEntry=acceptCpsHistSecondsEntry, acceptCpsHistSecondsUnitCount=acceptCpsHistSecondsUnitCount, proxyConnHistSecondsUnitCount=proxyConnHistSecondsUnitCount, acceptCpsHistDaysTable=acceptCpsHistDaysTable, acceptEstHistMinutesIndex=acceptEstHistMinutesIndex, rejectSynHistHoursUnitCount=rejectSynHistHoursUnitCount, rejectEstHistDaysTable=rejectEstHistDaysTable, rejectSynHistMinutesEntry=rejectSynHistMinutesEntry, acceptEstHistDaysTable=acceptEstHistDaysTable, acceptCpsHistHoursEntry=acceptCpsHistHoursEntry, rejectEstHistMinutesEntry=rejectEstHistMinutesEntry, acceptCpsHistDaysIndex=acceptCpsHistDaysIndex, acceptEstHistHoursGlobalID=acceptEstHistHoursGlobalID, rejectEstHistHoursGlobalID=rejectEstHistHoursGlobalID, acceptEstHistSecondsTimestamp=acceptEstHistSecondsTimestamp, rejectCpsHistDaysUnitCount=rejectCpsHistDaysUnitCount, rejectEstHistSecondsUnitCount=rejectEstHistSecondsUnitCount, acceptEstHistSecondsGlobalID=acceptEstHistSecondsGlobalID, proxyConnHistHoursIndex=proxyConnHistHoursIndex, rejectEstHistSecondsGlobalID=rejectEstHistSecondsGlobalID, rejectSynHistMinutesTable=rejectSynHistMinutesTable, rejectSynHistSecondsIndex=rejectSynHistSecondsIndex, acceptCpsHistMinutesIndex=acceptCpsHistMinutesIndex, acceptEstHistMinutesTimestamp=acceptEstHistMinutesTimestamp, rejectEstHistDaysTimestamp=rejectEstHistDaysTimestamp, acceptCpsHistDaysGlobalID=acceptCpsHistDaysGlobalID, rejectCpsHistSecondsIndex=rejectCpsHistSecondsIndex, acceptCpsHistMinutesUnitCount=acceptCpsHistMinutesUnitCount, proxyConnHistMinutesUnitCount=proxyConnHistMinutesUnitCount, acceptCpsHistDaysEntry=acceptCpsHistDaysEntry, proxyConnHistMinutesEntry=proxyConnHistMinutesEntry, rejectCpsHistMinutesGlobalID=rejectCpsHistMinutesGlobalID, acceptEstHistHoursEntry=acceptEstHistHoursEntry, rejectEstHistHoursIndex=rejectEstHistHoursIndex, rejectSynHistMinutesGlobalID=rejectSynHistMinutesGlobalID, acceptCpsHistHoursTable=acceptCpsHistHoursTable, rejectEstHistDaysIndex=rejectEstHistDaysIndex, rejectSynHistSecondsTable=rejectSynHistSecondsTable, rejectEstHistSecondsTimestamp=rejectEstHistSecondsTimestamp, rejectSynHistDaysGlobalID=rejectSynHistDaysGlobalID, rejectEstHistHoursTimestamp=rejectEstHistHoursTimestamp, acceptCpsHistSecondsGlobalID=acceptCpsHistSecondsGlobalID, rejectCpsHistSecondsUnitCount=rejectCpsHistSecondsUnitCount, rejectSynHistHoursTimestamp=rejectSynHistHoursTimestamp, acceptEstHistMinutesTable=acceptEstHistMinutesTable, rejectSynHistDaysUnitCount=rejectSynHistDaysUnitCount, acceptEstHistMinutesUnitCount=acceptEstHistMinutesUnitCount, PYSNMP_MODULE_ID=tpt_ddos, rejectEstHistHoursUnitCount=rejectEstHistHoursUnitCount, rejectCpsHistSecondsEntry=rejectCpsHistSecondsEntry, proxyConnHistMinutesIndex=proxyConnHistMinutesIndex, rejectCpsHistHoursEntry=rejectCpsHistHoursEntry, rejectEstHistMinutesIndex=rejectEstHistMinutesIndex, acceptEstHistSecondsUnitCount=acceptEstHistSecondsUnitCount, rejectSynHistSecondsUnitCount=rejectSynHistSecondsUnitCount, rejectCpsHistMinutesIndex=rejectCpsHistMinutesIndex, acceptCpsHistMinutesTimestamp=acceptCpsHistMinutesTimestamp, rejectSynHistMinutesTimestamp=rejectSynHistMinutesTimestamp, rejectCpsHistMinutesTable=rejectCpsHistMinutesTable, rejectEstHistMinutesUnitCount=rejectEstHistMinutesUnitCount, rejectSynHistDaysTable=rejectSynHistDaysTable, proxyConnHistDaysTimestamp=proxyConnHistDaysTimestamp, acceptCpsHistSecondsTable=acceptCpsHistSecondsTable, acceptCpsHistDaysTimestamp=acceptCpsHistDaysTimestamp, acceptCpsHistSecondsTimestamp=acceptCpsHistSecondsTimestamp, acceptEstHistDaysIndex=acceptEstHistDaysIndex, rejectSynHistSecondsTimestamp=rejectSynHistSecondsTimestamp, rejectCpsHistMinutesEntry=rejectCpsHistMinutesEntry, rejectEstHistHoursTable=rejectEstHistHoursTable, rejectCpsHistMinutesTimestamp=rejectCpsHistMinutesTimestamp, proxyConnHistDaysIndex=proxyConnHistDaysIndex, acceptEstHistSecondsIndex=acceptEstHistSecondsIndex, rejectCpsHistMinutesUnitCount=rejectCpsHistMinutesUnitCount, proxyConnHistSecondsTable=proxyConnHistSecondsTable, acceptCpsHistDaysUnitCount=acceptCpsHistDaysUnitCount, rejectEstHistDaysUnitCount=rejectEstHistDaysUnitCount, rejectCpsHistHoursIndex=rejectCpsHistHoursIndex, proxyConnHistMinutesGlobalID=proxyConnHistMinutesGlobalID, tpt_ddos=tpt_ddos, proxyConnHistSecondsGlobalID=proxyConnHistSecondsGlobalID, rejectCpsHistHoursGlobalID=rejectCpsHistHoursGlobalID, proxyConnHistDaysUnitCount=proxyConnHistDaysUnitCount, acceptEstHistDaysEntry=acceptEstHistDaysEntry, rejectSynHistSecondsEntry=rejectSynHistSecondsEntry, acceptCpsHistHoursTimestamp=acceptCpsHistHoursTimestamp, rejectCpsHistSecondsGlobalID=rejectCpsHistSecondsGlobalID, rejectCpsHistHoursUnitCount=rejectCpsHistHoursUnitCount, proxyConnHistSecondsTimestamp=proxyConnHistSecondsTimestamp, acceptEstHistHoursUnitCount=acceptEstHistHoursUnitCount, rejectCpsHistDaysTable=rejectCpsHistDaysTable, rejectSynHistHoursIndex=rejectSynHistHoursIndex, proxyConnHistSecondsIndex=proxyConnHistSecondsIndex, acceptEstHistMinutesGlobalID=acceptEstHistMinutesGlobalID, acceptEstHistHoursTimestamp=acceptEstHistHoursTimestamp, rejectSynHistSecondsGlobalID=rejectSynHistSecondsGlobalID, rejectCpsHistDaysIndex=rejectCpsHistDaysIndex, rejectEstHistDaysGlobalID=rejectEstHistDaysGlobalID, rejectSynHistDaysEntry=rejectSynHistDaysEntry, rejectSynHistMinutesUnitCount=rejectSynHistMinutesUnitCount, rejectSynHistHoursEntry=rejectSynHistHoursEntry, proxyConnHistSecondsEntry=proxyConnHistSecondsEntry, rejectCpsHistHoursTable=rejectCpsHistHoursTable, rejectSynHistHoursTable=rejectSynHistHoursTable, rejectCpsHistDaysEntry=rejectCpsHistDaysEntry, acceptEstHistSecondsEntry=acceptEstHistSecondsEntry, rejectSynHistDaysTimestamp=rejectSynHistDaysTimestamp, rejectEstHistMinutesGlobalID=rejectEstHistMinutesGlobalID, acceptEstHistHoursIndex=acceptEstHistHoursIndex, rejectSynHistMinutesIndex=rejectSynHistMinutesIndex, rejectSynHistHoursGlobalID=rejectSynHistHoursGlobalID, rejectCpsHistHoursTimestamp=rejectCpsHistHoursTimestamp, proxyConnHistHoursTimestamp=proxyConnHistHoursTimestamp, acceptEstHistMinutesEntry=acceptEstHistMinutesEntry, proxyConnHistDaysEntry=proxyConnHistDaysEntry, acceptCpsHistSecondsIndex=acceptCpsHistSecondsIndex, rejectEstHistSecondsIndex=rejectEstHistSecondsIndex, proxyConnHistMinutesTable=proxyConnHistMinutesTable, rejectCpsHistDaysTimestamp=rejectCpsHistDaysTimestamp, proxyConnHistMinutesTimestamp=proxyConnHistMinutesTimestamp, rejectSynHistDaysIndex=rejectSynHistDaysIndex, proxyConnHistHoursUnitCount=proxyConnHistHoursUnitCount, rejectCpsHistSecondsTimestamp=rejectCpsHistSecondsTimestamp, acceptEstHistHoursTable=acceptEstHistHoursTable, proxyConnHistHoursTable=proxyConnHistHoursTable, proxyConnHistDaysTable=proxyConnHistDaysTable, acceptCpsHistMinutesTable=acceptCpsHistMinutesTable, acceptCpsHistHoursGlobalID=acceptCpsHistHoursGlobalID, acceptCpsHistHoursUnitCount=acceptCpsHistHoursUnitCount, rejectEstHistMinutesTimestamp=rejectEstHistMinutesTimestamp, acceptCpsHistMinutesEntry=acceptCpsHistMinutesEntry, rejectCpsHistDaysGlobalID=rejectCpsHistDaysGlobalID)
|
#
# PySNMP MIB module CNT251-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CNT251-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 18:09:31 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)
#
Integer, OctetString, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "Integer", "OctetString", "ObjectIdentifier")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueRangeConstraint, ConstraintsUnion, ValueSizeConstraint, SingleValueConstraint, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "ConstraintsUnion", "ValueSizeConstraint", "SingleValueConstraint", "ConstraintsIntersection")
cnt2CfgSystemProbe, = mibBuilder.importSymbols("CNT25-MIB", "cnt2CfgSystemProbe")
NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance")
Bits, MibIdentifier, Unsigned32, IpAddress, ModuleIdentity, Integer32, iso, Counter64, NotificationType, Gauge32, Counter32, TimeTicks, MibScalar, MibTable, MibTableRow, MibTableColumn, ObjectIdentity = mibBuilder.importSymbols("SNMPv2-SMI", "Bits", "MibIdentifier", "Unsigned32", "IpAddress", "ModuleIdentity", "Integer32", "iso", "Counter64", "NotificationType", "Gauge32", "Counter32", "TimeTicks", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "ObjectIdentity")
TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString")
cnt2SysChassisType = MibScalar((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(2, 6, 12, 13, 14, 15, 16, 17))).clone(namedValues=NamedValues(("slot-2", 2), ("slot-6", 6), ("slot-12", 12), ("osg", 13), ("usg", 14), ("usd6", 15), ("usd12", 16), ("tm", 17)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cnt2SysChassisType.setStatus('mandatory')
cnt2SysZachCardType = MibScalar((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("not-present", 1), ("rs232", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cnt2SysZachCardType.setStatus('mandatory')
cnt2SysHmbFirmwareRevision = MibScalar((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 3), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cnt2SysHmbFirmwareRevision.setStatus('mandatory')
cnt2SysScnrcVersion = MibScalar((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 4), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cnt2SysScnrcVersion.setStatus('mandatory')
cnt2SysDatPresent = MibScalar((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("yes", 1), ("no", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cnt2SysDatPresent.setStatus('mandatory')
cnt2SysCdRomPresent = MibScalar((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("yes", 1), ("no", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cnt2SysCdRomPresent.setStatus('mandatory')
cnt2SysProbeDateTime = MibScalar((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 7), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cnt2SysProbeDateTime.setStatus('mandatory')
cnt2SysSlotCount = MibScalar((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 8), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cnt2SysSlotCount.setStatus('mandatory')
cnt2SysPowerSupplyTable = MibTable((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 9), )
if mibBuilder.loadTexts: cnt2SysPowerSupplyTable.setStatus('mandatory')
cnt2SysPowerSupplyEntry = MibTableRow((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 9, 1), ).setIndexNames((0, "CNT251-MIB", "cnt2SysPowerSupplyIndex"))
if mibBuilder.loadTexts: cnt2SysPowerSupplyEntry.setStatus('mandatory')
cnt2SysPowerSupplyIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 9, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cnt2SysPowerSupplyIndex.setStatus('mandatory')
cnt2SysPowerSupplyPresent = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 9, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("yes", 1), ("no", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cnt2SysPowerSupplyPresent.setStatus('mandatory')
cnt2SysFanTable = MibTable((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 10), )
if mibBuilder.loadTexts: cnt2SysFanTable.setStatus('mandatory')
cnt2SysFanEntry = MibTableRow((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 10, 1), ).setIndexNames((0, "CNT251-MIB", "cnt2SysFanIndex"))
if mibBuilder.loadTexts: cnt2SysFanEntry.setStatus('mandatory')
cnt2SysFanIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 10, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cnt2SysFanIndex.setStatus('mandatory')
cnt2SysFanPresent = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 10, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("yes", 1), ("no", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cnt2SysFanPresent.setStatus('mandatory')
cnt2SysAdapterTable = MibTable((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 11), )
if mibBuilder.loadTexts: cnt2SysAdapterTable.setStatus('mandatory')
cnt2SysAdapterEntry = MibTableRow((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 11, 1), ).setIndexNames((0, "CNT251-MIB", "cnt2SysAdapterIndex"))
if mibBuilder.loadTexts: cnt2SysAdapterEntry.setStatus('mandatory')
cnt2SysAdapterIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 11, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cnt2SysAdapterIndex.setStatus('mandatory')
cnt2SysAdapterType = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 11, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("unknown", 1), ("absent", 2), ("sparc", 3), ("escon", 4), ("ppc", 5)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cnt2SysAdapterType.setStatus('mandatory')
cnt2SysAdapterName = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 11, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15))).clone(namedValues=NamedValues(("absent", 1), ("unknown", 2), ("zsp1", 3), ("zen1", 4), ("zap1", 5), ("zsp2", 6), ("zen2", 7), ("zap2", 8), ("zen3", 9), ("usg1", 10), ("usg2", 11), ("zap3", 12), ("zap4", 13), ("zen4", 14), ("o1x1", 15)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cnt2SysAdapterName.setStatus('mandatory')
cnt2SysAdapterPartNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 11, 1, 4), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cnt2SysAdapterPartNumber.setStatus('mandatory')
cnt2SysAdapterSerialNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 11, 1, 5), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cnt2SysAdapterSerialNumber.setStatus('mandatory')
cnt2SysAdapterHostId = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 11, 1, 6), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cnt2SysAdapterHostId.setStatus('mandatory')
cnt2SysAdapterBoardRevision = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 11, 1, 7), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cnt2SysAdapterBoardRevision.setStatus('mandatory')
cnt2SysAdapterFirmwareMajorRevision = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 11, 1, 8), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cnt2SysAdapterFirmwareMajorRevision.setStatus('mandatory')
cnt2SysAdapterFirmwareMinorRevision = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 11, 1, 9), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cnt2SysAdapterFirmwareMinorRevision.setStatus('mandatory')
cnt2SysAdapterHostName = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 11, 1, 10), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cnt2SysAdapterHostName.setStatus('mandatory')
cnt2SysAdapterOsName = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 11, 1, 11), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cnt2SysAdapterOsName.setStatus('mandatory')
cnt2SysAdapterOsMajorVersion = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 11, 1, 12), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cnt2SysAdapterOsMajorVersion.setStatus('mandatory')
cnt2SysAdapterOsMinorVersion = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 11, 1, 13), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cnt2SysAdapterOsMinorVersion.setStatus('mandatory')
cnt2SysAdapterServiceMonitorStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 11, 1, 14), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("none", 1), ("primary", 2), ("secondary", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cnt2SysAdapterServiceMonitorStatus.setStatus('mandatory')
cnt2SysBusTable = MibTable((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 12), )
if mibBuilder.loadTexts: cnt2SysBusTable.setStatus('mandatory')
cnt2SysBusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 12, 1), ).setIndexNames((0, "CNT251-MIB", "cnt2SysBusAdapterIndex"), (0, "CNT251-MIB", "cnt2SysBusIndex"))
if mibBuilder.loadTexts: cnt2SysBusEntry.setStatus('mandatory')
cnt2SysBusAdapterIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 12, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cnt2SysBusAdapterIndex.setStatus('mandatory')
cnt2SysBusIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 12, 1, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cnt2SysBusIndex.setStatus('mandatory')
cnt2SysBusType = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 12, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("unknown", 1), ("sbus", 2), ("pci", 3), ("vme", 4)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cnt2SysBusType.setStatus('mandatory')
cnt2SysCardTable = MibTable((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 13), )
if mibBuilder.loadTexts: cnt2SysCardTable.setStatus('mandatory')
cnt2SysCardEntry = MibTableRow((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 13, 1), ).setIndexNames((0, "CNT251-MIB", "cnt2SysCardAdapterIndex"), (0, "CNT251-MIB", "cnt2SysCardBusIndex"), (0, "CNT251-MIB", "cnt2SysCardIndex"))
if mibBuilder.loadTexts: cnt2SysCardEntry.setStatus('mandatory')
cnt2SysCardAdapterIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 13, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cnt2SysCardAdapterIndex.setStatus('mandatory')
cnt2SysCardBusIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 13, 1, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cnt2SysCardBusIndex.setStatus('mandatory')
cnt2SysCardIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 13, 1, 3), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cnt2SysCardIndex.setStatus('mandatory')
cnt2SysCardFunction = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 13, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("unknown", 1), ("interface", 2), ("compression", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cnt2SysCardFunction.setStatus('mandatory')
cnt2SysCardFirmwareMajorRevision = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 13, 1, 5), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cnt2SysCardFirmwareMajorRevision.setStatus('mandatory')
cnt2SysCardFirmwareMinorRevision = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 13, 1, 6), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cnt2SysCardFirmwareMinorRevision.setStatus('mandatory')
cnt2SysCardVendorOctetString = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 13, 1, 7), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cnt2SysCardVendorOctetString.setStatus('mandatory')
cnt2SysCardVendorDisplayString = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 13, 1, 8), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cnt2SysCardVendorDisplayString.setStatus('mandatory')
cnt2SysIfTable = MibTable((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 14), )
if mibBuilder.loadTexts: cnt2SysIfTable.setStatus('mandatory')
cnt2SysIfEntry = MibTableRow((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 14, 1), ).setIndexNames((0, "CNT251-MIB", "cnt2SysIfAdapterIndex"), (0, "CNT251-MIB", "cnt2SysIfBusIndex"), (0, "CNT251-MIB", "cnt2SysIfIndex"))
if mibBuilder.loadTexts: cnt2SysIfEntry.setStatus('mandatory')
cnt2SysIfAdapterIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 14, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cnt2SysIfAdapterIndex.setStatus('mandatory')
cnt2SysIfBusIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 14, 1, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cnt2SysIfBusIndex.setStatus('mandatory')
cnt2SysIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 14, 1, 3), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cnt2SysIfIndex.setStatus('mandatory')
cnt2SysIfType = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 14, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13))).clone(namedValues=NamedValues(("unknown", 1), ("ethernetCsmacd", 2), ("async", 3), ("escon", 4), ("atm", 5), ("fibreChannel", 6), ("scsi-2", 7), ("scsi-3", 8), ("ds3", 9), ("fddi", 10), ("fastEther", 11), ("isdn", 12), ("gigabitEthernet", 13)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cnt2SysIfType.setStatus('mandatory')
cnt2SysIfCardIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 14, 1, 5), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cnt2SysIfCardIndex.setStatus('mandatory')
cnt2SysIfName = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 14, 1, 6), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cnt2SysIfName.setStatus('mandatory')
cnt2SysIfConnector = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 14, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10))).clone(namedValues=NamedValues(("absent", 1), ("unknown", 2), ("micro-d15", 3), ("scsi-2", 4), ("scsi-3", 5), ("sc-duplex", 6), ("rj45", 7), ("bnc", 8), ("hssdc", 9), ("rsd-duplex", 10)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cnt2SysIfConnector.setStatus('mandatory')
cnt2SysIfSnmpIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 14, 1, 8), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cnt2SysIfSnmpIndex.setStatus('mandatory')
cnt2SysSerialNumber = MibScalar((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 15), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cnt2SysSerialNumber.setStatus('mandatory')
cnt2SysOsVersion = MibScalar((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 16), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cnt2SysOsVersion.setStatus('mandatory')
mibBuilder.exportSymbols("CNT251-MIB", cnt2SysZachCardType=cnt2SysZachCardType, cnt2SysBusTable=cnt2SysBusTable, cnt2SysAdapterEntry=cnt2SysAdapterEntry, cnt2SysCardFirmwareMinorRevision=cnt2SysCardFirmwareMinorRevision, cnt2SysFanIndex=cnt2SysFanIndex, cnt2SysChassisType=cnt2SysChassisType, cnt2SysFanPresent=cnt2SysFanPresent, cnt2SysIfEntry=cnt2SysIfEntry, cnt2SysIfConnector=cnt2SysIfConnector, cnt2SysBusType=cnt2SysBusType, cnt2SysFanEntry=cnt2SysFanEntry, cnt2SysAdapterType=cnt2SysAdapterType, cnt2SysCardBusIndex=cnt2SysCardBusIndex, cnt2SysSlotCount=cnt2SysSlotCount, cnt2SysAdapterTable=cnt2SysAdapterTable, cnt2SysPowerSupplyIndex=cnt2SysPowerSupplyIndex, cnt2SysAdapterName=cnt2SysAdapterName, cnt2SysProbeDateTime=cnt2SysProbeDateTime, cnt2SysCardIndex=cnt2SysCardIndex, cnt2SysAdapterFirmwareMinorRevision=cnt2SysAdapterFirmwareMinorRevision, cnt2SysIfAdapterIndex=cnt2SysIfAdapterIndex, cnt2SysOsVersion=cnt2SysOsVersion, cnt2SysIfType=cnt2SysIfType, cnt2SysPowerSupplyEntry=cnt2SysPowerSupplyEntry, cnt2SysCardEntry=cnt2SysCardEntry, cnt2SysAdapterOsMajorVersion=cnt2SysAdapterOsMajorVersion, cnt2SysCardVendorDisplayString=cnt2SysCardVendorDisplayString, cnt2SysCardVendorOctetString=cnt2SysCardVendorOctetString, cnt2SysCardFunction=cnt2SysCardFunction, cnt2SysDatPresent=cnt2SysDatPresent, cnt2SysAdapterFirmwareMajorRevision=cnt2SysAdapterFirmwareMajorRevision, cnt2SysIfBusIndex=cnt2SysIfBusIndex, cnt2SysPowerSupplyPresent=cnt2SysPowerSupplyPresent, cnt2SysAdapterHostId=cnt2SysAdapterHostId, cnt2SysAdapterBoardRevision=cnt2SysAdapterBoardRevision, cnt2SysIfName=cnt2SysIfName, cnt2SysCardFirmwareMajorRevision=cnt2SysCardFirmwareMajorRevision, cnt2SysAdapterSerialNumber=cnt2SysAdapterSerialNumber, cnt2SysFanTable=cnt2SysFanTable, cnt2SysBusIndex=cnt2SysBusIndex, cnt2SysIfSnmpIndex=cnt2SysIfSnmpIndex, cnt2SysAdapterOsMinorVersion=cnt2SysAdapterOsMinorVersion, cnt2SysAdapterIndex=cnt2SysAdapterIndex, cnt2SysAdapterServiceMonitorStatus=cnt2SysAdapterServiceMonitorStatus, cnt2SysBusAdapterIndex=cnt2SysBusAdapterIndex, cnt2SysSerialNumber=cnt2SysSerialNumber, cnt2SysPowerSupplyTable=cnt2SysPowerSupplyTable, cnt2SysCardTable=cnt2SysCardTable, cnt2SysAdapterHostName=cnt2SysAdapterHostName, cnt2SysScnrcVersion=cnt2SysScnrcVersion, cnt2SysBusEntry=cnt2SysBusEntry, cnt2SysCardAdapterIndex=cnt2SysCardAdapterIndex, cnt2SysIfIndex=cnt2SysIfIndex, cnt2SysHmbFirmwareRevision=cnt2SysHmbFirmwareRevision, cnt2SysAdapterOsName=cnt2SysAdapterOsName, cnt2SysIfCardIndex=cnt2SysIfCardIndex, cnt2SysCdRomPresent=cnt2SysCdRomPresent, cnt2SysIfTable=cnt2SysIfTable, cnt2SysAdapterPartNumber=cnt2SysAdapterPartNumber)
|
(integer, octet_string, object_identifier) = mibBuilder.importSymbols('ASN1', 'Integer', 'OctetString', 'ObjectIdentifier')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(value_range_constraint, constraints_union, value_size_constraint, single_value_constraint, constraints_intersection) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueRangeConstraint', 'ConstraintsUnion', 'ValueSizeConstraint', 'SingleValueConstraint', 'ConstraintsIntersection')
(cnt2_cfg_system_probe,) = mibBuilder.importSymbols('CNT25-MIB', 'cnt2CfgSystemProbe')
(notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance')
(bits, mib_identifier, unsigned32, ip_address, module_identity, integer32, iso, counter64, notification_type, gauge32, counter32, time_ticks, mib_scalar, mib_table, mib_table_row, mib_table_column, object_identity) = mibBuilder.importSymbols('SNMPv2-SMI', 'Bits', 'MibIdentifier', 'Unsigned32', 'IpAddress', 'ModuleIdentity', 'Integer32', 'iso', 'Counter64', 'NotificationType', 'Gauge32', 'Counter32', 'TimeTicks', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'ObjectIdentity')
(textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString')
cnt2_sys_chassis_type = mib_scalar((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(2, 6, 12, 13, 14, 15, 16, 17))).clone(namedValues=named_values(('slot-2', 2), ('slot-6', 6), ('slot-12', 12), ('osg', 13), ('usg', 14), ('usd6', 15), ('usd12', 16), ('tm', 17)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cnt2SysChassisType.setStatus('mandatory')
cnt2_sys_zach_card_type = mib_scalar((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('not-present', 1), ('rs232', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cnt2SysZachCardType.setStatus('mandatory')
cnt2_sys_hmb_firmware_revision = mib_scalar((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 3), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cnt2SysHmbFirmwareRevision.setStatus('mandatory')
cnt2_sys_scnrc_version = mib_scalar((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 4), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cnt2SysScnrcVersion.setStatus('mandatory')
cnt2_sys_dat_present = mib_scalar((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('yes', 1), ('no', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cnt2SysDatPresent.setStatus('mandatory')
cnt2_sys_cd_rom_present = mib_scalar((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('yes', 1), ('no', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cnt2SysCdRomPresent.setStatus('mandatory')
cnt2_sys_probe_date_time = mib_scalar((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 7), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cnt2SysProbeDateTime.setStatus('mandatory')
cnt2_sys_slot_count = mib_scalar((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 8), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cnt2SysSlotCount.setStatus('mandatory')
cnt2_sys_power_supply_table = mib_table((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 9))
if mibBuilder.loadTexts:
cnt2SysPowerSupplyTable.setStatus('mandatory')
cnt2_sys_power_supply_entry = mib_table_row((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 9, 1)).setIndexNames((0, 'CNT251-MIB', 'cnt2SysPowerSupplyIndex'))
if mibBuilder.loadTexts:
cnt2SysPowerSupplyEntry.setStatus('mandatory')
cnt2_sys_power_supply_index = mib_table_column((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 9, 1, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cnt2SysPowerSupplyIndex.setStatus('mandatory')
cnt2_sys_power_supply_present = mib_table_column((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 9, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('yes', 1), ('no', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cnt2SysPowerSupplyPresent.setStatus('mandatory')
cnt2_sys_fan_table = mib_table((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 10))
if mibBuilder.loadTexts:
cnt2SysFanTable.setStatus('mandatory')
cnt2_sys_fan_entry = mib_table_row((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 10, 1)).setIndexNames((0, 'CNT251-MIB', 'cnt2SysFanIndex'))
if mibBuilder.loadTexts:
cnt2SysFanEntry.setStatus('mandatory')
cnt2_sys_fan_index = mib_table_column((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 10, 1, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cnt2SysFanIndex.setStatus('mandatory')
cnt2_sys_fan_present = mib_table_column((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 10, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('yes', 1), ('no', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cnt2SysFanPresent.setStatus('mandatory')
cnt2_sys_adapter_table = mib_table((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 11))
if mibBuilder.loadTexts:
cnt2SysAdapterTable.setStatus('mandatory')
cnt2_sys_adapter_entry = mib_table_row((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 11, 1)).setIndexNames((0, 'CNT251-MIB', 'cnt2SysAdapterIndex'))
if mibBuilder.loadTexts:
cnt2SysAdapterEntry.setStatus('mandatory')
cnt2_sys_adapter_index = mib_table_column((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 11, 1, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cnt2SysAdapterIndex.setStatus('mandatory')
cnt2_sys_adapter_type = mib_table_column((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 11, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('unknown', 1), ('absent', 2), ('sparc', 3), ('escon', 4), ('ppc', 5)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cnt2SysAdapterType.setStatus('mandatory')
cnt2_sys_adapter_name = mib_table_column((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 11, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15))).clone(namedValues=named_values(('absent', 1), ('unknown', 2), ('zsp1', 3), ('zen1', 4), ('zap1', 5), ('zsp2', 6), ('zen2', 7), ('zap2', 8), ('zen3', 9), ('usg1', 10), ('usg2', 11), ('zap3', 12), ('zap4', 13), ('zen4', 14), ('o1x1', 15)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cnt2SysAdapterName.setStatus('mandatory')
cnt2_sys_adapter_part_number = mib_table_column((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 11, 1, 4), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cnt2SysAdapterPartNumber.setStatus('mandatory')
cnt2_sys_adapter_serial_number = mib_table_column((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 11, 1, 5), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cnt2SysAdapterSerialNumber.setStatus('mandatory')
cnt2_sys_adapter_host_id = mib_table_column((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 11, 1, 6), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cnt2SysAdapterHostId.setStatus('mandatory')
cnt2_sys_adapter_board_revision = mib_table_column((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 11, 1, 7), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cnt2SysAdapterBoardRevision.setStatus('mandatory')
cnt2_sys_adapter_firmware_major_revision = mib_table_column((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 11, 1, 8), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cnt2SysAdapterFirmwareMajorRevision.setStatus('mandatory')
cnt2_sys_adapter_firmware_minor_revision = mib_table_column((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 11, 1, 9), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cnt2SysAdapterFirmwareMinorRevision.setStatus('mandatory')
cnt2_sys_adapter_host_name = mib_table_column((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 11, 1, 10), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cnt2SysAdapterHostName.setStatus('mandatory')
cnt2_sys_adapter_os_name = mib_table_column((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 11, 1, 11), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cnt2SysAdapterOsName.setStatus('mandatory')
cnt2_sys_adapter_os_major_version = mib_table_column((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 11, 1, 12), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cnt2SysAdapterOsMajorVersion.setStatus('mandatory')
cnt2_sys_adapter_os_minor_version = mib_table_column((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 11, 1, 13), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cnt2SysAdapterOsMinorVersion.setStatus('mandatory')
cnt2_sys_adapter_service_monitor_status = mib_table_column((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 11, 1, 14), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('none', 1), ('primary', 2), ('secondary', 3)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cnt2SysAdapterServiceMonitorStatus.setStatus('mandatory')
cnt2_sys_bus_table = mib_table((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 12))
if mibBuilder.loadTexts:
cnt2SysBusTable.setStatus('mandatory')
cnt2_sys_bus_entry = mib_table_row((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 12, 1)).setIndexNames((0, 'CNT251-MIB', 'cnt2SysBusAdapterIndex'), (0, 'CNT251-MIB', 'cnt2SysBusIndex'))
if mibBuilder.loadTexts:
cnt2SysBusEntry.setStatus('mandatory')
cnt2_sys_bus_adapter_index = mib_table_column((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 12, 1, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cnt2SysBusAdapterIndex.setStatus('mandatory')
cnt2_sys_bus_index = mib_table_column((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 12, 1, 2), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cnt2SysBusIndex.setStatus('mandatory')
cnt2_sys_bus_type = mib_table_column((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 12, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('unknown', 1), ('sbus', 2), ('pci', 3), ('vme', 4)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cnt2SysBusType.setStatus('mandatory')
cnt2_sys_card_table = mib_table((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 13))
if mibBuilder.loadTexts:
cnt2SysCardTable.setStatus('mandatory')
cnt2_sys_card_entry = mib_table_row((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 13, 1)).setIndexNames((0, 'CNT251-MIB', 'cnt2SysCardAdapterIndex'), (0, 'CNT251-MIB', 'cnt2SysCardBusIndex'), (0, 'CNT251-MIB', 'cnt2SysCardIndex'))
if mibBuilder.loadTexts:
cnt2SysCardEntry.setStatus('mandatory')
cnt2_sys_card_adapter_index = mib_table_column((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 13, 1, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cnt2SysCardAdapterIndex.setStatus('mandatory')
cnt2_sys_card_bus_index = mib_table_column((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 13, 1, 2), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cnt2SysCardBusIndex.setStatus('mandatory')
cnt2_sys_card_index = mib_table_column((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 13, 1, 3), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cnt2SysCardIndex.setStatus('mandatory')
cnt2_sys_card_function = mib_table_column((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 13, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('unknown', 1), ('interface', 2), ('compression', 3)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cnt2SysCardFunction.setStatus('mandatory')
cnt2_sys_card_firmware_major_revision = mib_table_column((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 13, 1, 5), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cnt2SysCardFirmwareMajorRevision.setStatus('mandatory')
cnt2_sys_card_firmware_minor_revision = mib_table_column((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 13, 1, 6), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cnt2SysCardFirmwareMinorRevision.setStatus('mandatory')
cnt2_sys_card_vendor_octet_string = mib_table_column((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 13, 1, 7), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cnt2SysCardVendorOctetString.setStatus('mandatory')
cnt2_sys_card_vendor_display_string = mib_table_column((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 13, 1, 8), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cnt2SysCardVendorDisplayString.setStatus('mandatory')
cnt2_sys_if_table = mib_table((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 14))
if mibBuilder.loadTexts:
cnt2SysIfTable.setStatus('mandatory')
cnt2_sys_if_entry = mib_table_row((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 14, 1)).setIndexNames((0, 'CNT251-MIB', 'cnt2SysIfAdapterIndex'), (0, 'CNT251-MIB', 'cnt2SysIfBusIndex'), (0, 'CNT251-MIB', 'cnt2SysIfIndex'))
if mibBuilder.loadTexts:
cnt2SysIfEntry.setStatus('mandatory')
cnt2_sys_if_adapter_index = mib_table_column((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 14, 1, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cnt2SysIfAdapterIndex.setStatus('mandatory')
cnt2_sys_if_bus_index = mib_table_column((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 14, 1, 2), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cnt2SysIfBusIndex.setStatus('mandatory')
cnt2_sys_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 14, 1, 3), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cnt2SysIfIndex.setStatus('mandatory')
cnt2_sys_if_type = mib_table_column((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 14, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13))).clone(namedValues=named_values(('unknown', 1), ('ethernetCsmacd', 2), ('async', 3), ('escon', 4), ('atm', 5), ('fibreChannel', 6), ('scsi-2', 7), ('scsi-3', 8), ('ds3', 9), ('fddi', 10), ('fastEther', 11), ('isdn', 12), ('gigabitEthernet', 13)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cnt2SysIfType.setStatus('mandatory')
cnt2_sys_if_card_index = mib_table_column((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 14, 1, 5), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cnt2SysIfCardIndex.setStatus('mandatory')
cnt2_sys_if_name = mib_table_column((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 14, 1, 6), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cnt2SysIfName.setStatus('mandatory')
cnt2_sys_if_connector = mib_table_column((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 14, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10))).clone(namedValues=named_values(('absent', 1), ('unknown', 2), ('micro-d15', 3), ('scsi-2', 4), ('scsi-3', 5), ('sc-duplex', 6), ('rj45', 7), ('bnc', 8), ('hssdc', 9), ('rsd-duplex', 10)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cnt2SysIfConnector.setStatus('mandatory')
cnt2_sys_if_snmp_index = mib_table_column((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 14, 1, 8), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cnt2SysIfSnmpIndex.setStatus('mandatory')
cnt2_sys_serial_number = mib_scalar((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 15), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cnt2SysSerialNumber.setStatus('mandatory')
cnt2_sys_os_version = mib_scalar((1, 3, 6, 1, 4, 1, 333, 2, 5, 1, 16), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cnt2SysOsVersion.setStatus('mandatory')
mibBuilder.exportSymbols('CNT251-MIB', cnt2SysZachCardType=cnt2SysZachCardType, cnt2SysBusTable=cnt2SysBusTable, cnt2SysAdapterEntry=cnt2SysAdapterEntry, cnt2SysCardFirmwareMinorRevision=cnt2SysCardFirmwareMinorRevision, cnt2SysFanIndex=cnt2SysFanIndex, cnt2SysChassisType=cnt2SysChassisType, cnt2SysFanPresent=cnt2SysFanPresent, cnt2SysIfEntry=cnt2SysIfEntry, cnt2SysIfConnector=cnt2SysIfConnector, cnt2SysBusType=cnt2SysBusType, cnt2SysFanEntry=cnt2SysFanEntry, cnt2SysAdapterType=cnt2SysAdapterType, cnt2SysCardBusIndex=cnt2SysCardBusIndex, cnt2SysSlotCount=cnt2SysSlotCount, cnt2SysAdapterTable=cnt2SysAdapterTable, cnt2SysPowerSupplyIndex=cnt2SysPowerSupplyIndex, cnt2SysAdapterName=cnt2SysAdapterName, cnt2SysProbeDateTime=cnt2SysProbeDateTime, cnt2SysCardIndex=cnt2SysCardIndex, cnt2SysAdapterFirmwareMinorRevision=cnt2SysAdapterFirmwareMinorRevision, cnt2SysIfAdapterIndex=cnt2SysIfAdapterIndex, cnt2SysOsVersion=cnt2SysOsVersion, cnt2SysIfType=cnt2SysIfType, cnt2SysPowerSupplyEntry=cnt2SysPowerSupplyEntry, cnt2SysCardEntry=cnt2SysCardEntry, cnt2SysAdapterOsMajorVersion=cnt2SysAdapterOsMajorVersion, cnt2SysCardVendorDisplayString=cnt2SysCardVendorDisplayString, cnt2SysCardVendorOctetString=cnt2SysCardVendorOctetString, cnt2SysCardFunction=cnt2SysCardFunction, cnt2SysDatPresent=cnt2SysDatPresent, cnt2SysAdapterFirmwareMajorRevision=cnt2SysAdapterFirmwareMajorRevision, cnt2SysIfBusIndex=cnt2SysIfBusIndex, cnt2SysPowerSupplyPresent=cnt2SysPowerSupplyPresent, cnt2SysAdapterHostId=cnt2SysAdapterHostId, cnt2SysAdapterBoardRevision=cnt2SysAdapterBoardRevision, cnt2SysIfName=cnt2SysIfName, cnt2SysCardFirmwareMajorRevision=cnt2SysCardFirmwareMajorRevision, cnt2SysAdapterSerialNumber=cnt2SysAdapterSerialNumber, cnt2SysFanTable=cnt2SysFanTable, cnt2SysBusIndex=cnt2SysBusIndex, cnt2SysIfSnmpIndex=cnt2SysIfSnmpIndex, cnt2SysAdapterOsMinorVersion=cnt2SysAdapterOsMinorVersion, cnt2SysAdapterIndex=cnt2SysAdapterIndex, cnt2SysAdapterServiceMonitorStatus=cnt2SysAdapterServiceMonitorStatus, cnt2SysBusAdapterIndex=cnt2SysBusAdapterIndex, cnt2SysSerialNumber=cnt2SysSerialNumber, cnt2SysPowerSupplyTable=cnt2SysPowerSupplyTable, cnt2SysCardTable=cnt2SysCardTable, cnt2SysAdapterHostName=cnt2SysAdapterHostName, cnt2SysScnrcVersion=cnt2SysScnrcVersion, cnt2SysBusEntry=cnt2SysBusEntry, cnt2SysCardAdapterIndex=cnt2SysCardAdapterIndex, cnt2SysIfIndex=cnt2SysIfIndex, cnt2SysHmbFirmwareRevision=cnt2SysHmbFirmwareRevision, cnt2SysAdapterOsName=cnt2SysAdapterOsName, cnt2SysIfCardIndex=cnt2SysIfCardIndex, cnt2SysCdRomPresent=cnt2SysCdRomPresent, cnt2SysIfTable=cnt2SysIfTable, cnt2SysAdapterPartNumber=cnt2SysAdapterPartNumber)
|
# Time: O(n)
# Space: O(h)
# Definition for a binary tree node.
class TreeNode(object):
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution(object):
def btreeGameWinningMove(self, root, n, x):
"""
:type root: TreeNode
:type n: int
:type x: int
:rtype: bool
"""
def count(node, x, left_right):
if not node:
return 0
left, right = count(node.left, x, left_right), count(node.right, x, left_right)
if node.val == x:
left_right[0], left_right[1] = left, right
return left + right + 1
left_right = [0, 0]
count(root, x, left_right)
blue = max(max(left_right), n-(sum(left_right)+1))
return blue > n-blue
|
class Treenode(object):
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution(object):
def btree_game_winning_move(self, root, n, x):
"""
:type root: TreeNode
:type n: int
:type x: int
:rtype: bool
"""
def count(node, x, left_right):
if not node:
return 0
(left, right) = (count(node.left, x, left_right), count(node.right, x, left_right))
if node.val == x:
(left_right[0], left_right[1]) = (left, right)
return left + right + 1
left_right = [0, 0]
count(root, x, left_right)
blue = max(max(left_right), n - (sum(left_right) + 1))
return blue > n - blue
|
# Definition for a binary tree node.
# class TreeNode(object):
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution(object):
def sumNumbers(self, root):
"""
:type root: TreeNode
:rtype: int
"""
return self.dfs(root, 0)
def dfs(self, root, sum):
if not root:
return 0
sum = sum * 10 + root.val
if not root.left and not root.right:
return sum
return self.dfs(root.left, sum) + self.dfs(root.right, sum)
|
class Solution(object):
def sum_numbers(self, root):
"""
:type root: TreeNode
:rtype: int
"""
return self.dfs(root, 0)
def dfs(self, root, sum):
if not root:
return 0
sum = sum * 10 + root.val
if not root.left and (not root.right):
return sum
return self.dfs(root.left, sum) + self.dfs(root.right, sum)
|
"""
Open511 Orlando
"""
# List of attribute keys which correspond to event descriptions
DESC = ('Closure', 'Location')
mapping = (
('event_type', 'type'),
('geometry', 'geometry')
)
class Event(object):
def __init__(self, data, source: str = 'cityoforlando.net'):
self.data = data
self.source = source
def dynamic(self) -> dict:
"""Returns dynamic data based on the given data"""
out = {}
for outkey, key in mapping:
if key in self.data:
out[outkey] = self.data[key]
# Parse attributes
if 'attributes' in self.data:
attrs = self.data['attributes']
for key in DESC:
if key in attrs:
out['description'] = attrs[key]
return out
def static(self) -> dict:
"""Returns static data based on the source"""
return {
'jurisdiction_url': f'/jurisdictions/{self.source}',
'status': 'ACTIVE'
}
def export(self) -> {str: object}:
"""Exports the Event in JSON compatible format"""
return {**self.static(), **self.dynamic()}
|
"""
Open511 Orlando
"""
desc = ('Closure', 'Location')
mapping = (('event_type', 'type'), ('geometry', 'geometry'))
class Event(object):
def __init__(self, data, source: str='cityoforlando.net'):
self.data = data
self.source = source
def dynamic(self) -> dict:
"""Returns dynamic data based on the given data"""
out = {}
for (outkey, key) in mapping:
if key in self.data:
out[outkey] = self.data[key]
if 'attributes' in self.data:
attrs = self.data['attributes']
for key in DESC:
if key in attrs:
out['description'] = attrs[key]
return out
def static(self) -> dict:
"""Returns static data based on the source"""
return {'jurisdiction_url': f'/jurisdictions/{self.source}', 'status': 'ACTIVE'}
def export(self) -> {str: object}:
"""Exports the Event in JSON compatible format"""
return {**self.static(), **self.dynamic()}
|
def sanitize(time_string):
if '-' in time_string:
splitter = '-'
elif ':' in time_string:
splitter = ':'
else:
return(time_string)
(mins, secs) = time_string.split(splitter)
return(mins + '.' + secs)
with open('james.txt') as jaf:
data = jaf.readline()
james = data.strip().split(',')
with open('julie.txt') as juf:
data = juf.readline()
julie = data.strip().split(',')
with open('mikey.txt') as mif:
data = mif.readline()
mikey = data.strip().split(',')
with open('sarah.txt') as saf:
data = saf.readline()
sarah = data.strip().split(',')
print(sorted(set([sanitize(t) for t in james]))[0:3])
print(sorted(set([sanitize(t) for t in julie]))[0:3])
print(sorted(set([sanitize(t) for t in mikey]))[0:3])
print(sorted(set([sanitize(t) for t in sarah]))[0:3])
|
def sanitize(time_string):
if '-' in time_string:
splitter = '-'
elif ':' in time_string:
splitter = ':'
else:
return time_string
(mins, secs) = time_string.split(splitter)
return mins + '.' + secs
with open('james.txt') as jaf:
data = jaf.readline()
james = data.strip().split(',')
with open('julie.txt') as juf:
data = juf.readline()
julie = data.strip().split(',')
with open('mikey.txt') as mif:
data = mif.readline()
mikey = data.strip().split(',')
with open('sarah.txt') as saf:
data = saf.readline()
sarah = data.strip().split(',')
print(sorted(set([sanitize(t) for t in james]))[0:3])
print(sorted(set([sanitize(t) for t in julie]))[0:3])
print(sorted(set([sanitize(t) for t in mikey]))[0:3])
print(sorted(set([sanitize(t) for t in sarah]))[0:3])
|
def top3(products, amounts, prices):
revenue_index_product = [ (amo*pri,-idx,pro) for (pro,amo,pri,idx) in zip(products,amounts,prices,range(len(prices))) ]
revenue_index_product = sorted(revenue_index_product, reverse=True )
return [ pro for (rev,idx,pro) in revenue_index_product[0:3] ]
|
def top3(products, amounts, prices):
revenue_index_product = [(amo * pri, -idx, pro) for (pro, amo, pri, idx) in zip(products, amounts, prices, range(len(prices)))]
revenue_index_product = sorted(revenue_index_product, reverse=True)
return [pro for (rev, idx, pro) in revenue_index_product[0:3]]
|
__all__ = [ 'XDict' ]
class XDict(dict):
__slots__ = ()
__setattr__ = dict.__setitem__
__delattr__ = dict.__delitem__
__getitem__ = dict.get
__getattr__ = dict.get
__getnewargs__ = lambda self: getattr(dict,self).__getnewargs__(self)
__repr__ = lambda self: '<XDict %s>' % dict.__repr__(self)
__getstate__ = lambda self: None
__copy__ = lambda self: Storage(self)
|
__all__ = ['XDict']
class Xdict(dict):
__slots__ = ()
__setattr__ = dict.__setitem__
__delattr__ = dict.__delitem__
__getitem__ = dict.get
__getattr__ = dict.get
__getnewargs__ = lambda self: getattr(dict, self).__getnewargs__(self)
__repr__ = lambda self: '<XDict %s>' % dict.__repr__(self)
__getstate__ = lambda self: None
__copy__ = lambda self: storage(self)
|
class Node:
def __init__(self, data = None, next = None):
self.data = data
self.next = next
def setNext(self,next):
self.next=next
def setData(self, data):
self.data=data
class LinkedList:
def __init__(self):
self.head = None
def add(self, data):
if self.head==None:
self.head=Node(data=data,next=None)
else:
temp=self.head
while temp.next!=None:
temp=temp.next
nuevo=Node(data=data,next=None)
temp.setNext(nuevo)
def delete(self, key):
temp = self.head
prev = None
while temp.next!= None and temp.data != key:
prev = temp
temp = temp.next
if prev is None:
self.head = temp.next
elif temp:
prev.next = temp.next
temp.next = None
def search(self,key):
temp=self.head
while temp.next!=None and temp.data!=key:
temp=temp.next
return temp
def print(self):
temp = self.head
while temp.next != None:
print(temp.data, end =" => ")
temp =temp.next
def replace(self,data,index):
temp=self.head
count=0
while temp.next!=None and count<index:
temp=temp.next
temp.setData(data)
|
class Node:
def __init__(self, data=None, next=None):
self.data = data
self.next = next
def set_next(self, next):
self.next = next
def set_data(self, data):
self.data = data
class Linkedlist:
def __init__(self):
self.head = None
def add(self, data):
if self.head == None:
self.head = node(data=data, next=None)
else:
temp = self.head
while temp.next != None:
temp = temp.next
nuevo = node(data=data, next=None)
temp.setNext(nuevo)
def delete(self, key):
temp = self.head
prev = None
while temp.next != None and temp.data != key:
prev = temp
temp = temp.next
if prev is None:
self.head = temp.next
elif temp:
prev.next = temp.next
temp.next = None
def search(self, key):
temp = self.head
while temp.next != None and temp.data != key:
temp = temp.next
return temp
def print(self):
temp = self.head
while temp.next != None:
print(temp.data, end=' => ')
temp = temp.next
def replace(self, data, index):
temp = self.head
count = 0
while temp.next != None and count < index:
temp = temp.next
temp.setData(data)
|
class cached_property(object):
"""
Decorator that creates converts a method with a single
self argument into a property cached on the instance.
"""
def __init__(self, func):
self.func = func
self.__doc__ = getattr(func, '__doc__')
def __get__(self, instance, type):
res = instance.__dict__[self.func.__name__] = self.func(instance)
return res
|
class Cached_Property(object):
"""
Decorator that creates converts a method with a single
self argument into a property cached on the instance.
"""
def __init__(self, func):
self.func = func
self.__doc__ = getattr(func, '__doc__')
def __get__(self, instance, type):
res = instance.__dict__[self.func.__name__] = self.func(instance)
return res
|
AddrSize = 8
Out = open("Template.txt", "w")
Out.write(">->+\n[>\n" + ">" * AddrSize + "+" + "<" * AddrSize + "\n\n")
def Mark(C, L):
if C == L:
Out.write("\t" * 0 + "[-\n")
Out.write("\t" * 0 + "#\n")
Out.write("\t" * 0 + "]\n")
return
Out.write("\t" * 0 + "[>\n")
Mark(C+1, L)
Out.write("\t" * 0 + "]>\n")
Mark(C+1, L)
Mark(0,AddrSize)
Out.write("+[-<+]-\n>]")
Out.close()
|
addr_size = 8
out = open('Template.txt', 'w')
Out.write('>->+\n[>\n' + '>' * AddrSize + '+' + '<' * AddrSize + '\n\n')
def mark(C, L):
if C == L:
Out.write('\t' * 0 + '[-\n')
Out.write('\t' * 0 + '#\n')
Out.write('\t' * 0 + ']\n')
return
Out.write('\t' * 0 + '[>\n')
mark(C + 1, L)
Out.write('\t' * 0 + ']>\n')
mark(C + 1, L)
mark(0, AddrSize)
Out.write('+[-<+]-\n>]')
Out.close()
|
length = int(input())
width = int(input())
height = int(input())
occupied = float(input())
occupied_percent = occupied / 100
full_capacity = length * width * height
occupied_total = occupied_percent * full_capacity
remaining = full_capacity - occupied_total
capacity_in_dm = remaining / 1000
water = capacity_in_dm
print(water)
|
length = int(input())
width = int(input())
height = int(input())
occupied = float(input())
occupied_percent = occupied / 100
full_capacity = length * width * height
occupied_total = occupied_percent * full_capacity
remaining = full_capacity - occupied_total
capacity_in_dm = remaining / 1000
water = capacity_in_dm
print(water)
|
module_id = 'gl'
report_name = 'tb_bf_maj'
table_name = 'gl_totals'
report_type = 'bf_cf'
groups = []
groups.append([
'code', # dim
['code_maj', []], # grp_name, filter
])
include_zeros = True
# allow_select_loc_fun = True
expand_subledg = True
columns = [
['op_date', 'op_date', 'Op date', 'DTE', 85, None, 'Total:'],
['cl_date', 'cl_date', 'Cl date', 'DTE', 85, None, False],
['code_maj', 'code_maj', 'Maj', 'TEXT', 80, None, False],
['op_bal', 'op_bal', 'Op bal', 'DEC', 100, None, True],
['mvmt', 'cl_bal - op_bal', 'Mvmt', 'DEC', 100, None, True],
['cl_bal', 'cl_bal', 'Cl bal', 'DEC', 100, None, True],
]
|
module_id = 'gl'
report_name = 'tb_bf_maj'
table_name = 'gl_totals'
report_type = 'bf_cf'
groups = []
groups.append(['code', ['code_maj', []]])
include_zeros = True
expand_subledg = True
columns = [['op_date', 'op_date', 'Op date', 'DTE', 85, None, 'Total:'], ['cl_date', 'cl_date', 'Cl date', 'DTE', 85, None, False], ['code_maj', 'code_maj', 'Maj', 'TEXT', 80, None, False], ['op_bal', 'op_bal', 'Op bal', 'DEC', 100, None, True], ['mvmt', 'cl_bal - op_bal', 'Mvmt', 'DEC', 100, None, True], ['cl_bal', 'cl_bal', 'Cl bal', 'DEC', 100, None, True]]
|
"""
class TestNewOffsets(unittest.TestCase):
def test_yearoffset(self):
off = lib.YearOffset(dayoffset=0, biz=0, anchor=datetime(2002,1,1))
for i in range(500):
t = lib.Timestamp(off.ts)
self.assert_(t.day == 1)
self.assert_(t.month == 1)
self.assert_(t.year == 2002 + i)
next(off)
for i in range(499, -1, -1):
off.prev()
t = lib.Timestamp(off.ts)
self.assert_(t.day == 1)
self.assert_(t.month == 1)
self.assert_(t.year == 2002 + i)
off = lib.YearOffset(dayoffset=-1, biz=0, anchor=datetime(2002,1,1))
for i in range(500):
t = lib.Timestamp(off.ts)
self.assert_(t.month == 12)
self.assert_(t.day == 31)
self.assert_(t.year == 2001 + i)
next(off)
for i in range(499, -1, -1):
off.prev()
t = lib.Timestamp(off.ts)
self.assert_(t.month == 12)
self.assert_(t.day == 31)
self.assert_(t.year == 2001 + i)
off = lib.YearOffset(dayoffset=-1, biz=-1, anchor=datetime(2002,1,1))
stack = []
for i in range(500):
t = lib.Timestamp(off.ts)
stack.append(t)
self.assert_(t.month == 12)
self.assert_(t.day == 31 or t.day == 30 or t.day == 29)
self.assert_(t.year == 2001 + i)
self.assert_(t.weekday() < 5)
next(off)
for i in range(499, -1, -1):
off.prev()
t = lib.Timestamp(off.ts)
self.assert_(t == stack.pop())
self.assert_(t.month == 12)
self.assert_(t.day == 31 or t.day == 30 or t.day == 29)
self.assert_(t.year == 2001 + i)
self.assert_(t.weekday() < 5)
def test_monthoffset(self):
off = lib.MonthOffset(dayoffset=0, biz=0, anchor=datetime(2002,1,1))
for i in range(12):
t = lib.Timestamp(off.ts)
self.assert_(t.day == 1)
self.assert_(t.month == 1 + i)
self.assert_(t.year == 2002)
next(off)
for i in range(11, -1, -1):
off.prev()
t = lib.Timestamp(off.ts)
self.assert_(t.day == 1)
self.assert_(t.month == 1 + i)
self.assert_(t.year == 2002)
off = lib.MonthOffset(dayoffset=-1, biz=0, anchor=datetime(2002,1,1))
for i in range(12):
t = lib.Timestamp(off.ts)
self.assert_(t.day >= 28)
self.assert_(t.month == (12 if i == 0 else i))
self.assert_(t.year == 2001 + (i != 0))
next(off)
for i in range(11, -1, -1):
off.prev()
t = lib.Timestamp(off.ts)
self.assert_(t.day >= 28)
self.assert_(t.month == (12 if i == 0 else i))
self.assert_(t.year == 2001 + (i != 0))
off = lib.MonthOffset(dayoffset=-1, biz=-1, anchor=datetime(2002,1,1))
stack = []
for i in range(500):
t = lib.Timestamp(off.ts)
stack.append(t)
if t.month != 2:
self.assert_(t.day >= 28)
else:
self.assert_(t.day >= 26)
self.assert_(t.weekday() < 5)
next(off)
for i in range(499, -1, -1):
off.prev()
t = lib.Timestamp(off.ts)
self.assert_(t == stack.pop())
if t.month != 2:
self.assert_(t.day >= 28)
else:
self.assert_(t.day >= 26)
self.assert_(t.weekday() < 5)
for i in (-2, -1, 1, 2):
for j in (-1, 0, 1):
off1 = lib.MonthOffset(dayoffset=i, biz=j, stride=12,
anchor=datetime(2002,1,1))
off2 = lib.YearOffset(dayoffset=i, biz=j,
anchor=datetime(2002,1,1))
for k in range(500):
self.assert_(off1.ts == off2.ts)
next(off1)
next(off2)
for k in range(500):
self.assert_(off1.ts == off2.ts)
off1.prev()
off2.prev()
def test_dayoffset(self):
off = lib.DayOffset(biz=0, anchor=datetime(2002,1,1))
us_in_day = 1e6 * 60 * 60 * 24
t0 = lib.Timestamp(off.ts)
for i in range(500):
next(off)
t1 = lib.Timestamp(off.ts)
self.assert_(t1.value - t0.value == us_in_day)
t0 = t1
t0 = lib.Timestamp(off.ts)
for i in range(499, -1, -1):
off.prev()
t1 = lib.Timestamp(off.ts)
self.assert_(t0.value - t1.value == us_in_day)
t0 = t1
off = lib.DayOffset(biz=1, anchor=datetime(2002,1,1))
t0 = lib.Timestamp(off.ts)
for i in range(500):
next(off)
t1 = lib.Timestamp(off.ts)
self.assert_(t1.weekday() < 5)
self.assert_(t1.value - t0.value == us_in_day or
t1.value - t0.value == 3 * us_in_day)
t0 = t1
t0 = lib.Timestamp(off.ts)
for i in range(499, -1, -1):
off.prev()
t1 = lib.Timestamp(off.ts)
self.assert_(t1.weekday() < 5)
self.assert_(t0.value - t1.value == us_in_day or
t0.value - t1.value == 3 * us_in_day)
t0 = t1
def test_dayofmonthoffset(self):
for week in (-1, 0, 1):
for day in (0, 2, 4):
off = lib.DayOfMonthOffset(week=-1, day=day,
anchor=datetime(2002,1,1))
stack = []
for i in range(500):
t = lib.Timestamp(off.ts)
stack.append(t)
self.assert_(t.weekday() == day)
next(off)
for i in range(499, -1, -1):
off.prev()
t = lib.Timestamp(off.ts)
self.assert_(t == stack.pop())
self.assert_(t.weekday() == day)
"""
|
"""
class TestNewOffsets(unittest.TestCase):
def test_yearoffset(self):
off = lib.YearOffset(dayoffset=0, biz=0, anchor=datetime(2002,1,1))
for i in range(500):
t = lib.Timestamp(off.ts)
self.assert_(t.day == 1)
self.assert_(t.month == 1)
self.assert_(t.year == 2002 + i)
next(off)
for i in range(499, -1, -1):
off.prev()
t = lib.Timestamp(off.ts)
self.assert_(t.day == 1)
self.assert_(t.month == 1)
self.assert_(t.year == 2002 + i)
off = lib.YearOffset(dayoffset=-1, biz=0, anchor=datetime(2002,1,1))
for i in range(500):
t = lib.Timestamp(off.ts)
self.assert_(t.month == 12)
self.assert_(t.day == 31)
self.assert_(t.year == 2001 + i)
next(off)
for i in range(499, -1, -1):
off.prev()
t = lib.Timestamp(off.ts)
self.assert_(t.month == 12)
self.assert_(t.day == 31)
self.assert_(t.year == 2001 + i)
off = lib.YearOffset(dayoffset=-1, biz=-1, anchor=datetime(2002,1,1))
stack = []
for i in range(500):
t = lib.Timestamp(off.ts)
stack.append(t)
self.assert_(t.month == 12)
self.assert_(t.day == 31 or t.day == 30 or t.day == 29)
self.assert_(t.year == 2001 + i)
self.assert_(t.weekday() < 5)
next(off)
for i in range(499, -1, -1):
off.prev()
t = lib.Timestamp(off.ts)
self.assert_(t == stack.pop())
self.assert_(t.month == 12)
self.assert_(t.day == 31 or t.day == 30 or t.day == 29)
self.assert_(t.year == 2001 + i)
self.assert_(t.weekday() < 5)
def test_monthoffset(self):
off = lib.MonthOffset(dayoffset=0, biz=0, anchor=datetime(2002,1,1))
for i in range(12):
t = lib.Timestamp(off.ts)
self.assert_(t.day == 1)
self.assert_(t.month == 1 + i)
self.assert_(t.year == 2002)
next(off)
for i in range(11, -1, -1):
off.prev()
t = lib.Timestamp(off.ts)
self.assert_(t.day == 1)
self.assert_(t.month == 1 + i)
self.assert_(t.year == 2002)
off = lib.MonthOffset(dayoffset=-1, biz=0, anchor=datetime(2002,1,1))
for i in range(12):
t = lib.Timestamp(off.ts)
self.assert_(t.day >= 28)
self.assert_(t.month == (12 if i == 0 else i))
self.assert_(t.year == 2001 + (i != 0))
next(off)
for i in range(11, -1, -1):
off.prev()
t = lib.Timestamp(off.ts)
self.assert_(t.day >= 28)
self.assert_(t.month == (12 if i == 0 else i))
self.assert_(t.year == 2001 + (i != 0))
off = lib.MonthOffset(dayoffset=-1, biz=-1, anchor=datetime(2002,1,1))
stack = []
for i in range(500):
t = lib.Timestamp(off.ts)
stack.append(t)
if t.month != 2:
self.assert_(t.day >= 28)
else:
self.assert_(t.day >= 26)
self.assert_(t.weekday() < 5)
next(off)
for i in range(499, -1, -1):
off.prev()
t = lib.Timestamp(off.ts)
self.assert_(t == stack.pop())
if t.month != 2:
self.assert_(t.day >= 28)
else:
self.assert_(t.day >= 26)
self.assert_(t.weekday() < 5)
for i in (-2, -1, 1, 2):
for j in (-1, 0, 1):
off1 = lib.MonthOffset(dayoffset=i, biz=j, stride=12,
anchor=datetime(2002,1,1))
off2 = lib.YearOffset(dayoffset=i, biz=j,
anchor=datetime(2002,1,1))
for k in range(500):
self.assert_(off1.ts == off2.ts)
next(off1)
next(off2)
for k in range(500):
self.assert_(off1.ts == off2.ts)
off1.prev()
off2.prev()
def test_dayoffset(self):
off = lib.DayOffset(biz=0, anchor=datetime(2002,1,1))
us_in_day = 1e6 * 60 * 60 * 24
t0 = lib.Timestamp(off.ts)
for i in range(500):
next(off)
t1 = lib.Timestamp(off.ts)
self.assert_(t1.value - t0.value == us_in_day)
t0 = t1
t0 = lib.Timestamp(off.ts)
for i in range(499, -1, -1):
off.prev()
t1 = lib.Timestamp(off.ts)
self.assert_(t0.value - t1.value == us_in_day)
t0 = t1
off = lib.DayOffset(biz=1, anchor=datetime(2002,1,1))
t0 = lib.Timestamp(off.ts)
for i in range(500):
next(off)
t1 = lib.Timestamp(off.ts)
self.assert_(t1.weekday() < 5)
self.assert_(t1.value - t0.value == us_in_day or
t1.value - t0.value == 3 * us_in_day)
t0 = t1
t0 = lib.Timestamp(off.ts)
for i in range(499, -1, -1):
off.prev()
t1 = lib.Timestamp(off.ts)
self.assert_(t1.weekday() < 5)
self.assert_(t0.value - t1.value == us_in_day or
t0.value - t1.value == 3 * us_in_day)
t0 = t1
def test_dayofmonthoffset(self):
for week in (-1, 0, 1):
for day in (0, 2, 4):
off = lib.DayOfMonthOffset(week=-1, day=day,
anchor=datetime(2002,1,1))
stack = []
for i in range(500):
t = lib.Timestamp(off.ts)
stack.append(t)
self.assert_(t.weekday() == day)
next(off)
for i in range(499, -1, -1):
off.prev()
t = lib.Timestamp(off.ts)
self.assert_(t == stack.pop())
self.assert_(t.weekday() == day)
"""
|
class Calculator:
def __init__(self):
self.result = 0
def adder(self, num):
self.result += num
return self.result
cal1 = Calculator()
cal2 = Calculator()
print(cal1.adder(3)) # 3
print(cal1.adder(5)) # 8
print(cal2.adder(3)) # 3
print(cal2.adder(7)) # 10
# Empty Class
class Simple:
pass
# Variable
class Service:
text = "Hello world"
service = Service()
print(service.text) # Hello world
class Service2:
def __init__(self, name):
self.name = name
service2=Service2("hi")
print(service2.name) # hi
############
# inherit
class Car:
def __init__(self, sun_roof):
self.sun_roof = sun_roof
def drive(self):
print("Drive")
class Sonata(Car):
name = "sonata"
sonata=Sonata("Sun roof")
sonata.drive()
print(sonata.name, sonata.sun_roof)
# Drive
# sonata Sun roof
############
#############
# Overriding
class Genesis(Car):
def drive(self):
print("Genesis Drive")
genesis=Genesis("SunRoof")
genesis.drive() # Genesis Drive
#############
#############
# Operator overloading
class Pride(Car):
def __add__(self, other):
self.drive()
other.drive()
def __sub__(self, other):
return
def __mul__(self, other):
return
def __truediv__(self, other):
return
pride = Pride("SunRoof")
pride + genesis
# Drive
# Genesis Drive
#############
|
class Calculator:
def __init__(self):
self.result = 0
def adder(self, num):
self.result += num
return self.result
cal1 = calculator()
cal2 = calculator()
print(cal1.adder(3))
print(cal1.adder(5))
print(cal2.adder(3))
print(cal2.adder(7))
class Simple:
pass
class Service:
text = 'Hello world'
service = service()
print(service.text)
class Service2:
def __init__(self, name):
self.name = name
service2 = service2('hi')
print(service2.name)
class Car:
def __init__(self, sun_roof):
self.sun_roof = sun_roof
def drive(self):
print('Drive')
class Sonata(Car):
name = 'sonata'
sonata = sonata('Sun roof')
sonata.drive()
print(sonata.name, sonata.sun_roof)
class Genesis(Car):
def drive(self):
print('Genesis Drive')
genesis = genesis('SunRoof')
genesis.drive()
class Pride(Car):
def __add__(self, other):
self.drive()
other.drive()
def __sub__(self, other):
return
def __mul__(self, other):
return
def __truediv__(self, other):
return
pride = pride('SunRoof')
pride + genesis
|
# !/usr/bin/env python3
# Author: C.K
# Email: theck17@163.com
# DateTime:2021-09-03 16:21:08
# Description:
class Solution:
def cloneGraph(self, node: 'Node') -> 'Node':
if not node:
return node
m = {node: Node(node.val)}
stack = [node]
while stack:
n = stack.pop()
for neigh in n.neighbors:
if neigh not in m:
stack.append(neigh)
m[neigh] = Node(neigh.val)
m[n].neighbors.append(m[neigh])
return m[node]
if __name__ == "__main__":
pass
|
class Solution:
def clone_graph(self, node: 'Node') -> 'Node':
if not node:
return node
m = {node: node(node.val)}
stack = [node]
while stack:
n = stack.pop()
for neigh in n.neighbors:
if neigh not in m:
stack.append(neigh)
m[neigh] = node(neigh.val)
m[n].neighbors.append(m[neigh])
return m[node]
if __name__ == '__main__':
pass
|
N=int(input())
A=[int(input()) for i in range(N)]
B={a:i for (i,a) in enumerate(sorted(set(A)))}
for a in A:
print(B[a])
|
n = int(input())
a = [int(input()) for i in range(N)]
b = {a: i for (i, a) in enumerate(sorted(set(A)))}
for a in A:
print(B[a])
|
# List of strings/words
words = input().split()
word_one = words[0]
word_two = words[1]
total_sum = 0
shorter_word_length = min(len(word_one), len(word_two))
# Process shorter string
for i in range(shorter_word_length):
word_one_current = word_one[i]
word_two_current = word_two[i]
ch_multiplication = ord(word_one_current) * ord(word_two_current)
total_sum += ch_multiplication
# If the string have different lengths, we have to process characters of the longer one
longer_word_length = max(len(word_one), len(word_two))
for i in range(shorter_word_length, longer_word_length):
if len(word_one) > len(word_two):
current_word_char = word_one[i]
else:
current_word_char = word_two[i]
total_sum += ord(current_word_char)
print(total_sum)
|
words = input().split()
word_one = words[0]
word_two = words[1]
total_sum = 0
shorter_word_length = min(len(word_one), len(word_two))
for i in range(shorter_word_length):
word_one_current = word_one[i]
word_two_current = word_two[i]
ch_multiplication = ord(word_one_current) * ord(word_two_current)
total_sum += ch_multiplication
longer_word_length = max(len(word_one), len(word_two))
for i in range(shorter_word_length, longer_word_length):
if len(word_one) > len(word_two):
current_word_char = word_one[i]
else:
current_word_char = word_two[i]
total_sum += ord(current_word_char)
print(total_sum)
|
def solution(n: int):
answer = 0
i = 1
while i * i < n + 1:
if n % i == 0:
if i == n // i:
answer += i
else:
answer += i + n // i
i += 1
return answer
if __name__ == "__main__":
i = 25
print(solution(i))
|
def solution(n: int):
answer = 0
i = 1
while i * i < n + 1:
if n % i == 0:
if i == n // i:
answer += i
else:
answer += i + n // i
i += 1
return answer
if __name__ == '__main__':
i = 25
print(solution(i))
|
"""
Entradas
Horas trabajadas-->float-->ht
Pago por hora-->float-->ph
Salidas
Pago junto con la horas-->float-->pa=ht*ph
Descuento por los impuestos-->float-->des1=pa*0.20 y des2=pa-des1
"""
ht=float(input("Digite las horas que ha trabajado: "))
ph=float(input("Digite el pago por hora: "))
pa=ht*ph
des1=pa*0.20
des2=pa-des1
print("El pago que le daran es de: ", des2)
|
"""
Entradas
Horas trabajadas-->float-->ht
Pago por hora-->float-->ph
Salidas
Pago junto con la horas-->float-->pa=ht*ph
Descuento por los impuestos-->float-->des1=pa*0.20 y des2=pa-des1
"""
ht = float(input('Digite las horas que ha trabajado: '))
ph = float(input('Digite el pago por hora: '))
pa = ht * ph
des1 = pa * 0.2
des2 = pa - des1
print('El pago que le daran es de: ', des2)
|
qst_deliver_message = 0
qst_deliver_message_to_enemy_lord = 1
qst_raise_troops = 2
qst_escort_lady = 3
qst_deal_with_bandits_at_lords_village = 4
qst_collect_taxes = 5
qst_hunt_down_fugitive = 6
qst_kill_local_merchant = 7
qst_bring_back_runaway_serfs = 8
qst_follow_spy = 9
qst_capture_enemy_hero = 10
qst_lend_companion = 11
qst_collect_debt = 12
qst_incriminate_loyal_commander = 13
qst_meet_spy_in_enemy_town = 14
qst_capture_prisoners = 15
qst_lend_surgeon = 16
qst_follow_army = 17
qst_report_to_army = 18
qst_deliver_cattle_to_army = 19
qst_join_siege_with_army = 20
qst_screen_army = 21
qst_scout_waypoints = 22
qst_rescue_lord_by_replace = 23
qst_deliver_message_to_prisoner_lord = 24
qst_duel_for_lady = 25
qst_duel_courtship_rival = 26
qst_duel_avenge_insult = 27
qst_move_cattle_herd = 28
qst_escort_merchant_caravan = 29
qst_deliver_wine = 30
qst_troublesome_bandits = 31
qst_kidnapped_girl = 32
qst_persuade_lords_to_make_peace = 33
qst_deal_with_looters = 34
qst_deal_with_night_bandits = 35
qst_deliver_grain = 36
qst_deliver_cattle = 37
qst_train_peasants_against_bandits = 38
qst_eliminate_bandits_infesting_village = 39
qst_visit_lady = 40
qst_formal_marriage_proposal = 41
qst_obtain_liege_blessing = 42
qst_wed_betrothed = 43
qst_wed_betrothed_female = 44
qst_join_faction = 45
qst_rebel_against_kingdom = 46
qst_consult_with_minister = 47
qst_organize_feast = 48
qst_resolve_dispute = 49
qst_offer_gift = 50
qst_denounce_lord = 51
qst_intrigue_against_lord = 52
qst_track_down_bandits = 53
qst_track_down_provocateurs = 54
qst_retaliate_for_border_incident = 55
qst_raid_caravan_to_start_war = 56
qst_cause_provocation = 57
qst_rescue_prisoner = 58
qst_destroy_bandit_lair = 59
qst_blank_quest_2 = 60
qst_blank_quest_3 = 61
qst_blank_quest_4 = 62
qst_blank_quest_5 = 63
qst_blank_quest_6 = 64
qst_blank_quest_7 = 65
qst_blank_quest_8 = 66
qst_blank_quest_9 = 67
qst_blank_quest_10 = 68
qst_blank_quest_11 = 69
qst_blank_quest_12 = 70
qst_blank_quest_13 = 71
qst_blank_quest_14 = 72
qst_blank_quest_15 = 73
qst_blank_quest_16 = 74
qst_blank_quest_17 = 75
qst_blank_quest_18 = 76
qst_blank_quest_19 = 77
qst_blank_quest_20 = 78
qst_blank_quest_21 = 79
qst_blank_quest_22 = 80
qst_blank_quest_23 = 81
qst_blank_quest_24 = 82
qst_blank_quest_25 = 83
qst_blank_quest_26 = 84
qst_blank_quest_27 = 85
qst_collect_men = 86
qst_learn_where_merchant_brother_is = 87
qst_save_relative_of_merchant = 88
qst_save_town_from_bandits = 89
qst_quests_end = 90
qsttag_deliver_message = 504403158265495552
qsttag_deliver_message_to_enemy_lord = 504403158265495553
qsttag_raise_troops = 504403158265495554
qsttag_escort_lady = 504403158265495555
qsttag_deal_with_bandits_at_lords_village = 504403158265495556
qsttag_collect_taxes = 504403158265495557
qsttag_hunt_down_fugitive = 504403158265495558
qsttag_kill_local_merchant = 504403158265495559
qsttag_bring_back_runaway_serfs = 504403158265495560
qsttag_follow_spy = 504403158265495561
qsttag_capture_enemy_hero = 504403158265495562
qsttag_lend_companion = 504403158265495563
qsttag_collect_debt = 504403158265495564
qsttag_incriminate_loyal_commander = 504403158265495565
qsttag_meet_spy_in_enemy_town = 504403158265495566
qsttag_capture_prisoners = 504403158265495567
qsttag_lend_surgeon = 504403158265495568
qsttag_follow_army = 504403158265495569
qsttag_report_to_army = 504403158265495570
qsttag_deliver_cattle_to_army = 504403158265495571
qsttag_join_siege_with_army = 504403158265495572
qsttag_screen_army = 504403158265495573
qsttag_scout_waypoints = 504403158265495574
qsttag_rescue_lord_by_replace = 504403158265495575
qsttag_deliver_message_to_prisoner_lord = 504403158265495576
qsttag_duel_for_lady = 504403158265495577
qsttag_duel_courtship_rival = 504403158265495578
qsttag_duel_avenge_insult = 504403158265495579
qsttag_move_cattle_herd = 504403158265495580
qsttag_escort_merchant_caravan = 504403158265495581
qsttag_deliver_wine = 504403158265495582
qsttag_troublesome_bandits = 504403158265495583
qsttag_kidnapped_girl = 504403158265495584
qsttag_persuade_lords_to_make_peace = 504403158265495585
qsttag_deal_with_looters = 504403158265495586
qsttag_deal_with_night_bandits = 504403158265495587
qsttag_deliver_grain = 504403158265495588
qsttag_deliver_cattle = 504403158265495589
qsttag_train_peasants_against_bandits = 504403158265495590
qsttag_eliminate_bandits_infesting_village = 504403158265495591
qsttag_visit_lady = 504403158265495592
qsttag_formal_marriage_proposal = 504403158265495593
qsttag_obtain_liege_blessing = 504403158265495594
qsttag_wed_betrothed = 504403158265495595
qsttag_wed_betrothed_female = 504403158265495596
qsttag_join_faction = 504403158265495597
qsttag_rebel_against_kingdom = 504403158265495598
qsttag_consult_with_minister = 504403158265495599
qsttag_organize_feast = 504403158265495600
qsttag_resolve_dispute = 504403158265495601
qsttag_offer_gift = 504403158265495602
qsttag_denounce_lord = 504403158265495603
qsttag_intrigue_against_lord = 504403158265495604
qsttag_track_down_bandits = 504403158265495605
qsttag_track_down_provocateurs = 504403158265495606
qsttag_retaliate_for_border_incident = 504403158265495607
qsttag_raid_caravan_to_start_war = 504403158265495608
qsttag_cause_provocation = 504403158265495609
qsttag_rescue_prisoner = 504403158265495610
qsttag_destroy_bandit_lair = 504403158265495611
qsttag_blank_quest_2 = 504403158265495612
qsttag_blank_quest_3 = 504403158265495613
qsttag_blank_quest_4 = 504403158265495614
qsttag_blank_quest_5 = 504403158265495615
qsttag_blank_quest_6 = 504403158265495616
qsttag_blank_quest_7 = 504403158265495617
qsttag_blank_quest_8 = 504403158265495618
qsttag_blank_quest_9 = 504403158265495619
qsttag_blank_quest_10 = 504403158265495620
qsttag_blank_quest_11 = 504403158265495621
qsttag_blank_quest_12 = 504403158265495622
qsttag_blank_quest_13 = 504403158265495623
qsttag_blank_quest_14 = 504403158265495624
qsttag_blank_quest_15 = 504403158265495625
qsttag_blank_quest_16 = 504403158265495626
qsttag_blank_quest_17 = 504403158265495627
qsttag_blank_quest_18 = 504403158265495628
qsttag_blank_quest_19 = 504403158265495629
qsttag_blank_quest_20 = 504403158265495630
qsttag_blank_quest_21 = 504403158265495631
qsttag_blank_quest_22 = 504403158265495632
qsttag_blank_quest_23 = 504403158265495633
qsttag_blank_quest_24 = 504403158265495634
qsttag_blank_quest_25 = 504403158265495635
qsttag_blank_quest_26 = 504403158265495636
qsttag_blank_quest_27 = 504403158265495637
qsttag_collect_men = 504403158265495638
qsttag_learn_where_merchant_brother_is = 504403158265495639
qsttag_save_relative_of_merchant = 504403158265495640
qsttag_save_town_from_bandits = 504403158265495641
qsttag_quests_end = 504403158265495642
|
qst_deliver_message = 0
qst_deliver_message_to_enemy_lord = 1
qst_raise_troops = 2
qst_escort_lady = 3
qst_deal_with_bandits_at_lords_village = 4
qst_collect_taxes = 5
qst_hunt_down_fugitive = 6
qst_kill_local_merchant = 7
qst_bring_back_runaway_serfs = 8
qst_follow_spy = 9
qst_capture_enemy_hero = 10
qst_lend_companion = 11
qst_collect_debt = 12
qst_incriminate_loyal_commander = 13
qst_meet_spy_in_enemy_town = 14
qst_capture_prisoners = 15
qst_lend_surgeon = 16
qst_follow_army = 17
qst_report_to_army = 18
qst_deliver_cattle_to_army = 19
qst_join_siege_with_army = 20
qst_screen_army = 21
qst_scout_waypoints = 22
qst_rescue_lord_by_replace = 23
qst_deliver_message_to_prisoner_lord = 24
qst_duel_for_lady = 25
qst_duel_courtship_rival = 26
qst_duel_avenge_insult = 27
qst_move_cattle_herd = 28
qst_escort_merchant_caravan = 29
qst_deliver_wine = 30
qst_troublesome_bandits = 31
qst_kidnapped_girl = 32
qst_persuade_lords_to_make_peace = 33
qst_deal_with_looters = 34
qst_deal_with_night_bandits = 35
qst_deliver_grain = 36
qst_deliver_cattle = 37
qst_train_peasants_against_bandits = 38
qst_eliminate_bandits_infesting_village = 39
qst_visit_lady = 40
qst_formal_marriage_proposal = 41
qst_obtain_liege_blessing = 42
qst_wed_betrothed = 43
qst_wed_betrothed_female = 44
qst_join_faction = 45
qst_rebel_against_kingdom = 46
qst_consult_with_minister = 47
qst_organize_feast = 48
qst_resolve_dispute = 49
qst_offer_gift = 50
qst_denounce_lord = 51
qst_intrigue_against_lord = 52
qst_track_down_bandits = 53
qst_track_down_provocateurs = 54
qst_retaliate_for_border_incident = 55
qst_raid_caravan_to_start_war = 56
qst_cause_provocation = 57
qst_rescue_prisoner = 58
qst_destroy_bandit_lair = 59
qst_blank_quest_2 = 60
qst_blank_quest_3 = 61
qst_blank_quest_4 = 62
qst_blank_quest_5 = 63
qst_blank_quest_6 = 64
qst_blank_quest_7 = 65
qst_blank_quest_8 = 66
qst_blank_quest_9 = 67
qst_blank_quest_10 = 68
qst_blank_quest_11 = 69
qst_blank_quest_12 = 70
qst_blank_quest_13 = 71
qst_blank_quest_14 = 72
qst_blank_quest_15 = 73
qst_blank_quest_16 = 74
qst_blank_quest_17 = 75
qst_blank_quest_18 = 76
qst_blank_quest_19 = 77
qst_blank_quest_20 = 78
qst_blank_quest_21 = 79
qst_blank_quest_22 = 80
qst_blank_quest_23 = 81
qst_blank_quest_24 = 82
qst_blank_quest_25 = 83
qst_blank_quest_26 = 84
qst_blank_quest_27 = 85
qst_collect_men = 86
qst_learn_where_merchant_brother_is = 87
qst_save_relative_of_merchant = 88
qst_save_town_from_bandits = 89
qst_quests_end = 90
qsttag_deliver_message = 504403158265495552
qsttag_deliver_message_to_enemy_lord = 504403158265495553
qsttag_raise_troops = 504403158265495554
qsttag_escort_lady = 504403158265495555
qsttag_deal_with_bandits_at_lords_village = 504403158265495556
qsttag_collect_taxes = 504403158265495557
qsttag_hunt_down_fugitive = 504403158265495558
qsttag_kill_local_merchant = 504403158265495559
qsttag_bring_back_runaway_serfs = 504403158265495560
qsttag_follow_spy = 504403158265495561
qsttag_capture_enemy_hero = 504403158265495562
qsttag_lend_companion = 504403158265495563
qsttag_collect_debt = 504403158265495564
qsttag_incriminate_loyal_commander = 504403158265495565
qsttag_meet_spy_in_enemy_town = 504403158265495566
qsttag_capture_prisoners = 504403158265495567
qsttag_lend_surgeon = 504403158265495568
qsttag_follow_army = 504403158265495569
qsttag_report_to_army = 504403158265495570
qsttag_deliver_cattle_to_army = 504403158265495571
qsttag_join_siege_with_army = 504403158265495572
qsttag_screen_army = 504403158265495573
qsttag_scout_waypoints = 504403158265495574
qsttag_rescue_lord_by_replace = 504403158265495575
qsttag_deliver_message_to_prisoner_lord = 504403158265495576
qsttag_duel_for_lady = 504403158265495577
qsttag_duel_courtship_rival = 504403158265495578
qsttag_duel_avenge_insult = 504403158265495579
qsttag_move_cattle_herd = 504403158265495580
qsttag_escort_merchant_caravan = 504403158265495581
qsttag_deliver_wine = 504403158265495582
qsttag_troublesome_bandits = 504403158265495583
qsttag_kidnapped_girl = 504403158265495584
qsttag_persuade_lords_to_make_peace = 504403158265495585
qsttag_deal_with_looters = 504403158265495586
qsttag_deal_with_night_bandits = 504403158265495587
qsttag_deliver_grain = 504403158265495588
qsttag_deliver_cattle = 504403158265495589
qsttag_train_peasants_against_bandits = 504403158265495590
qsttag_eliminate_bandits_infesting_village = 504403158265495591
qsttag_visit_lady = 504403158265495592
qsttag_formal_marriage_proposal = 504403158265495593
qsttag_obtain_liege_blessing = 504403158265495594
qsttag_wed_betrothed = 504403158265495595
qsttag_wed_betrothed_female = 504403158265495596
qsttag_join_faction = 504403158265495597
qsttag_rebel_against_kingdom = 504403158265495598
qsttag_consult_with_minister = 504403158265495599
qsttag_organize_feast = 504403158265495600
qsttag_resolve_dispute = 504403158265495601
qsttag_offer_gift = 504403158265495602
qsttag_denounce_lord = 504403158265495603
qsttag_intrigue_against_lord = 504403158265495604
qsttag_track_down_bandits = 504403158265495605
qsttag_track_down_provocateurs = 504403158265495606
qsttag_retaliate_for_border_incident = 504403158265495607
qsttag_raid_caravan_to_start_war = 504403158265495608
qsttag_cause_provocation = 504403158265495609
qsttag_rescue_prisoner = 504403158265495610
qsttag_destroy_bandit_lair = 504403158265495611
qsttag_blank_quest_2 = 504403158265495612
qsttag_blank_quest_3 = 504403158265495613
qsttag_blank_quest_4 = 504403158265495614
qsttag_blank_quest_5 = 504403158265495615
qsttag_blank_quest_6 = 504403158265495616
qsttag_blank_quest_7 = 504403158265495617
qsttag_blank_quest_8 = 504403158265495618
qsttag_blank_quest_9 = 504403158265495619
qsttag_blank_quest_10 = 504403158265495620
qsttag_blank_quest_11 = 504403158265495621
qsttag_blank_quest_12 = 504403158265495622
qsttag_blank_quest_13 = 504403158265495623
qsttag_blank_quest_14 = 504403158265495624
qsttag_blank_quest_15 = 504403158265495625
qsttag_blank_quest_16 = 504403158265495626
qsttag_blank_quest_17 = 504403158265495627
qsttag_blank_quest_18 = 504403158265495628
qsttag_blank_quest_19 = 504403158265495629
qsttag_blank_quest_20 = 504403158265495630
qsttag_blank_quest_21 = 504403158265495631
qsttag_blank_quest_22 = 504403158265495632
qsttag_blank_quest_23 = 504403158265495633
qsttag_blank_quest_24 = 504403158265495634
qsttag_blank_quest_25 = 504403158265495635
qsttag_blank_quest_26 = 504403158265495636
qsttag_blank_quest_27 = 504403158265495637
qsttag_collect_men = 504403158265495638
qsttag_learn_where_merchant_brother_is = 504403158265495639
qsttag_save_relative_of_merchant = 504403158265495640
qsttag_save_town_from_bandits = 504403158265495641
qsttag_quests_end = 504403158265495642
|
class Chair:
"""Create a chair
Parameters
----------
chair_name : str
The name of the chair
professor: str
The name of the professor
employees : {array-like of shape (n,), []}, default=[]
List of all employees of the chair
See Also
--------
Employee
Notes
-----
Here you can add some notes
References
----------
.. [1] Add references here
Examples
--------
>>> from MyPackage.base import Employee, Chair
>>> andreas = Employee("Andreas","100")
>>> bwl11 = Chair("BWL11", "Richard", [andreas])
>>> bwl11.displayEmployees()
>>> niko = Employee("Niko",300)
>>> bwl11.hire_employee(niko)
>>> bwl11.displayEmployees()
"""
def __init__(self,
chair_name,
professor,
employees=[]):
self.chair_name = chair_name
self.professor = professor
self.employees = employees
def fire_employee(self, employee):
"""Fire employee
Parameters:
-----------
employee: employee
The employee to fire
"""
if employee in self.employees:
self.employees.remove(employee)
else:
print("There is not such a employee ")
def hire_employee(self, employee):
"""Hire employee
Parameters:
-----------
employee: employee
The employee to hire
"""
self.employees.append(employee)
def displayEmployees(self):
"""Display all employees"""
for employee in self.employees:
employee.displayEmployee()
class Employee:
"""Create a chair
Parameters
----------
name : str
The name of the employee
salary: int
The salary of the employee
See Also
--------
Chair
Notes
-----
Here you can add some notes
References
----------
.. [1] Add references here
Examples
--------
>>> from MyPackage.base import Employee
>>> andreas = Employee("Andreas","100")
>>> andreas.displayEmployee()
"""
def __init__(self, name, salary):
self.name = name
self.salary = salary
def displayEmployee(self):
"""Display employee"""
print("Name : ", self.name, ", Salary: ", self.salary)
|
class Chair:
"""Create a chair
Parameters
----------
chair_name : str
The name of the chair
professor: str
The name of the professor
employees : {array-like of shape (n,), []}, default=[]
List of all employees of the chair
See Also
--------
Employee
Notes
-----
Here you can add some notes
References
----------
.. [1] Add references here
Examples
--------
>>> from MyPackage.base import Employee, Chair
>>> andreas = Employee("Andreas","100")
>>> bwl11 = Chair("BWL11", "Richard", [andreas])
>>> bwl11.displayEmployees()
>>> niko = Employee("Niko",300)
>>> bwl11.hire_employee(niko)
>>> bwl11.displayEmployees()
"""
def __init__(self, chair_name, professor, employees=[]):
self.chair_name = chair_name
self.professor = professor
self.employees = employees
def fire_employee(self, employee):
"""Fire employee
Parameters:
-----------
employee: employee
The employee to fire
"""
if employee in self.employees:
self.employees.remove(employee)
else:
print('There is not such a employee ')
def hire_employee(self, employee):
"""Hire employee
Parameters:
-----------
employee: employee
The employee to hire
"""
self.employees.append(employee)
def display_employees(self):
"""Display all employees"""
for employee in self.employees:
employee.displayEmployee()
class Employee:
"""Create a chair
Parameters
----------
name : str
The name of the employee
salary: int
The salary of the employee
See Also
--------
Chair
Notes
-----
Here you can add some notes
References
----------
.. [1] Add references here
Examples
--------
>>> from MyPackage.base import Employee
>>> andreas = Employee("Andreas","100")
>>> andreas.displayEmployee()
"""
def __init__(self, name, salary):
self.name = name
self.salary = salary
def display_employee(self):
"""Display employee"""
print('Name : ', self.name, ', Salary: ', self.salary)
|
# Aluguel de carros
k= (float(input('Total kilometragem percorrida: ')))
a= (int(input('Total de dias alugado: ')))
kr= (float(input('Valor por kilometro rodado: R$ ')))
ad = (float(input('Valor do dia de aluguel: R$ ')))
tk = k*kr # total de kilometros rodados
ta = a * ad # total dias de aluguel
total = tk + ta
print(f'Total a pagar por {k:.2f} kilometros rodados + {a} dias de aluguel: R$ {total:.2f}')
|
k = float(input('Total kilometragem percorrida: '))
a = int(input('Total de dias alugado: '))
kr = float(input('Valor por kilometro rodado: R$ '))
ad = float(input('Valor do dia de aluguel: R$ '))
tk = k * kr
ta = a * ad
total = tk + ta
print(f'Total a pagar por {k:.2f} kilometros rodados + {a} dias de aluguel: R$ {total:.2f}')
|
# AUTOGENERATED BY NBDEV! DO NOT EDIT!
__all__ = ["index", "modules", "custom_doc_links", "git_url"]
index = {"dimension": "00_core.ipynb",
"reshaped": "00_core.ipynb",
"show": "00_core.ipynb",
"makeThreatenedSquares": "00_core.ipynb",
"defence": "00_core.ipynb",
"attack": "00_core.ipynb",
"fetch": "01_data.ipynb",
"Game": "01_data.ipynb",
"fromGame": "01_data.ipynb",
"games": "01_data.ipynb",
"MoveSequencerResult": "01_data.ipynb",
"makeMoveSequencer": "01_data.ipynb",
"diffReduce": "01_data.ipynb",
"countZeros": "01_data.ipynb",
"makeDiffReduceAnalyzer": "01_data.ipynb",
"zerosDiffReduce": "01_data.ipynb",
"showGameUi": "02_ui.ipynb",
"download": "03_stockfish.ipynb",
"extract": "03_stockfish.ipynb",
"makeEngine": "03_stockfish.ipynb",
"playGame": "03_stockfish.ipynb",
"Processor": "04_processor.ipynb"}
modules = ["core.py",
"data.py",
"ui.py",
"stockfish.py",
"processor.py"]
doc_url = "https://mikhas.github.io/cheviz/"
git_url = "https://github.com/mikhas/cheviz/tree/master/"
def custom_doc_links(name): return None
|
__all__ = ['index', 'modules', 'custom_doc_links', 'git_url']
index = {'dimension': '00_core.ipynb', 'reshaped': '00_core.ipynb', 'show': '00_core.ipynb', 'makeThreatenedSquares': '00_core.ipynb', 'defence': '00_core.ipynb', 'attack': '00_core.ipynb', 'fetch': '01_data.ipynb', 'Game': '01_data.ipynb', 'fromGame': '01_data.ipynb', 'games': '01_data.ipynb', 'MoveSequencerResult': '01_data.ipynb', 'makeMoveSequencer': '01_data.ipynb', 'diffReduce': '01_data.ipynb', 'countZeros': '01_data.ipynb', 'makeDiffReduceAnalyzer': '01_data.ipynb', 'zerosDiffReduce': '01_data.ipynb', 'showGameUi': '02_ui.ipynb', 'download': '03_stockfish.ipynb', 'extract': '03_stockfish.ipynb', 'makeEngine': '03_stockfish.ipynb', 'playGame': '03_stockfish.ipynb', 'Processor': '04_processor.ipynb'}
modules = ['core.py', 'data.py', 'ui.py', 'stockfish.py', 'processor.py']
doc_url = 'https://mikhas.github.io/cheviz/'
git_url = 'https://github.com/mikhas/cheviz/tree/master/'
def custom_doc_links(name):
return None
|
# This file was generated by the "capture_real_responses.py" script.
# On Wed, 20 Nov 2019 19:34:18 +0000.
#
# To update it run:
# python -m tests.providers.capture_real_responses
captured_responses = [
{
"request": {
"full_url": "https://apps.correios.com.br/SigepMasterJPA/AtendeClienteService/AtendeCliente",
"method": "POST",
"headers": {},
"data": bytearray(
b'<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://cliente.bean.master.sigep.bsb.correios.com.br/">\n <soapenv:Header/>\n <soapenv:Body>\n <cli:consultaCEP>\n <cep>01001000</cep>\n </cli:consultaCEP>\n </soapenv:Body>\n </soapenv:Envelope>'
),
},
"response": {
"type": "success",
"data": b'<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:consultaCEPResponse xmlns:ns2="http://cliente.bean.master.sigep.bsb.correios.com.br/"><return><bairro>S\xe9</bairro><cep>01001000</cep><cidade>S\xe3o Paulo</cidade><complemento2>- lado \xedmpar</complemento2><end>Pra\xe7a da S\xe9</end><uf>SP</uf></return></ns2:consultaCEPResponse></soap:Body></soap:Envelope>',
},
},
{
"request": {
"full_url": "http://cep.republicavirtual.com.br/web_cep.php?cep=01001000&formato=json",
"method": "GET",
"headers": {"Accept": "application/json"},
"data": None,
},
"response": {
"type": "success",
"data": b'{"resultado":"1","resultado_txt":"sucesso - cep completo","uf":"SP","cidade":"S\\u00e3o Paulo","bairro":"S\\u00e9","tipo_logradouro":"Pra\\u00e7a","logradouro":"da S\\u00e9"}',
},
},
{
"request": {
"full_url": "https://viacep.com.br/ws/01001000/json/unicode/",
"method": "GET",
"headers": {},
"data": None,
},
"response": {
"type": "success",
"data": b'{\n "cep": "01001-000",\n "logradouro": "Pra\\u00e7a da S\\u00e9",\n "complemento": "lado \\u00edmpar",\n "bairro": "S\\u00e9",\n "localidade": "S\\u00e3o Paulo",\n "uf": "SP",\n "unidade": "",\n "ibge": "3550308",\n "gia": "1004"\n}',
},
},
{
"request": {
"full_url": "https://apps.correios.com.br/SigepMasterJPA/AtendeClienteService/AtendeCliente",
"method": "POST",
"headers": {},
"data": bytearray(
b'<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://cliente.bean.master.sigep.bsb.correios.com.br/">\n <soapenv:Header/>\n <soapenv:Body>\n <cli:consultaCEP>\n <cep>57010240</cep>\n </cli:consultaCEP>\n </soapenv:Body>\n </soapenv:Envelope>'
),
},
"response": {
"type": "success",
"data": b'<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:consultaCEPResponse xmlns:ns2="http://cliente.bean.master.sigep.bsb.correios.com.br/"><return><bairro>Prado</bairro><cep>57010240</cep><cidade>Macei\xf3</cidade><complemento2></complemento2><end>Rua Desembargador Inoc\xeancio Lins</end><uf>AL</uf></return></ns2:consultaCEPResponse></soap:Body></soap:Envelope>',
},
},
{
"request": {
"full_url": "http://cep.republicavirtual.com.br/web_cep.php?cep=57010240&formato=json",
"method": "GET",
"headers": {"Accept": "application/json"},
"data": None,
},
"response": {
"type": "success",
"data": b'{"resultado":"1","resultado_txt":"sucesso - cep completo","uf":"AL","cidade":"Macei\\u00f3","bairro":"Prado","tipo_logradouro":"Rua","logradouro":"Desembargador Inoc\\u00eancio Lins"}',
},
},
{
"request": {
"full_url": "https://viacep.com.br/ws/57010240/json/unicode/",
"method": "GET",
"headers": {},
"data": None,
},
"response": {
"type": "success",
"data": b'{\n "cep": "57010-240",\n "logradouro": "Rua Desembargador Inoc\\u00eancio Lins",\n "complemento": "",\n "bairro": "Prado",\n "localidade": "Macei\\u00f3",\n "uf": "AL",\n "unidade": "",\n "ibge": "2704302",\n "gia": ""\n}',
},
},
{
"request": {
"full_url": "https://apps.correios.com.br/SigepMasterJPA/AtendeClienteService/AtendeCliente",
"method": "POST",
"headers": {},
"data": bytearray(
b'<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://cliente.bean.master.sigep.bsb.correios.com.br/">\n <soapenv:Header/>\n <soapenv:Body>\n <cli:consultaCEP>\n <cep>18170000</cep>\n </cli:consultaCEP>\n </soapenv:Body>\n </soapenv:Envelope>'
),
},
"response": {
"type": "success",
"data": b'<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:consultaCEPResponse xmlns:ns2="http://cliente.bean.master.sigep.bsb.correios.com.br/"><return><bairro></bairro><cep>18170000</cep><cidade>Piedade</cidade><complemento2></complemento2><end></end><uf>SP</uf></return></ns2:consultaCEPResponse></soap:Body></soap:Envelope>',
},
},
{
"request": {
"full_url": "http://cep.republicavirtual.com.br/web_cep.php?cep=18170000&formato=json",
"method": "GET",
"headers": {"Accept": "application/json"},
"data": None,
},
"response": {
"type": "success",
"data": b'{"resultado":"2","resultado_txt":"sucesso - cep \\u00fanico","uf":"SP","cidade":"Piedade","bairro":"","tipo_logradouro":"","logradouro":"","debug":" - encontrado via search_db cep unico - "}',
},
},
{
"request": {
"full_url": "https://viacep.com.br/ws/18170000/json/unicode/",
"method": "GET",
"headers": {},
"data": None,
},
"response": {
"type": "success",
"data": b'{\n "cep": "18170-000",\n "logradouro": "",\n "complemento": "",\n "bairro": "",\n "localidade": "Piedade",\n "uf": "SP",\n "unidade": "",\n "ibge": "3537800",\n "gia": "5265"\n}',
},
},
{
"request": {
"full_url": "https://apps.correios.com.br/SigepMasterJPA/AtendeClienteService/AtendeCliente",
"method": "POST",
"headers": {},
"data": bytearray(
b'<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://cliente.bean.master.sigep.bsb.correios.com.br/">\n <soapenv:Header/>\n <soapenv:Body>\n <cli:consultaCEP>\n <cep>78175000</cep>\n </cli:consultaCEP>\n </soapenv:Body>\n </soapenv:Envelope>'
),
},
"response": {
"type": "success",
"data": b'<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:consultaCEPResponse xmlns:ns2="http://cliente.bean.master.sigep.bsb.correios.com.br/"><return><bairro></bairro><cep>78175000</cep><cidade>Pocon\xe9</cidade><complemento2></complemento2><end></end><uf>MT</uf></return></ns2:consultaCEPResponse></soap:Body></soap:Envelope>',
},
},
{
"request": {
"full_url": "http://cep.republicavirtual.com.br/web_cep.php?cep=78175000&formato=json",
"method": "GET",
"headers": {"Accept": "application/json"},
"data": None,
},
"response": {
"type": "success",
"data": b'{"resultado":"2","resultado_txt":"sucesso - cep \\u00fanico","uf":"MT","cidade":"Pocon\\u00e9","bairro":"","tipo_logradouro":"","logradouro":"","debug":" - encontrado via search_db cep unico - "}',
},
},
{
"request": {
"full_url": "https://viacep.com.br/ws/78175000/json/unicode/",
"method": "GET",
"headers": {},
"data": None,
},
"response": {
"type": "success",
"data": b'{\n "cep": "78175-000",\n "logradouro": "",\n "complemento": "",\n "bairro": "",\n "localidade": "Pocon\\u00e9",\n "uf": "MT",\n "unidade": "",\n "ibge": "5106505",\n "gia": ""\n}',
},
},
{
"request": {
"full_url": "https://apps.correios.com.br/SigepMasterJPA/AtendeClienteService/AtendeCliente",
"method": "POST",
"headers": {},
"data": bytearray(
b'<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://cliente.bean.master.sigep.bsb.correios.com.br/">\n <soapenv:Header/>\n <soapenv:Body>\n <cli:consultaCEP>\n <cep>63200970</cep>\n </cli:consultaCEP>\n </soapenv:Body>\n </soapenv:Envelope>'
),
},
"response": {
"type": "success",
"data": b'<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:consultaCEPResponse xmlns:ns2="http://cliente.bean.master.sigep.bsb.correios.com.br/"><return><bairro>Centro</bairro><cep>63200970</cep><cidade>Miss\xe3o Velha</cidade><complemento2></complemento2><end>Rua Jos\xe9 Sobreira da Cruz 271</end><uf>CE</uf></return></ns2:consultaCEPResponse></soap:Body></soap:Envelope>',
},
},
{
"request": {
"full_url": "http://cep.republicavirtual.com.br/web_cep.php?cep=63200970&formato=json",
"method": "GET",
"headers": {"Accept": "application/json"},
"data": None,
},
"response": {
"type": "success",
"data": b'{"debug":" - nao encontrado via search_db cep unico - ","resultado":"1","resultado_txt":"sucesso - cep completo","uf":"CE","cidade":"Miss\\u00e3o Velha","bairro":"Centro\\u00a0","tipo_logradouro":"Rua","logradouro":"Jos\\u00e9 Sobreira da Cruz, 271 "}',
},
},
{
"request": {
"full_url": "https://viacep.com.br/ws/63200970/json/unicode/",
"method": "GET",
"headers": {},
"data": None,
},
"response": {
"type": "success",
"data": b'{\n "cep": "63200-970",\n "logradouro": "Rua Jos\\u00e9 Sobreira da Cruz 271",\n "complemento": "",\n "bairro": "Centro",\n "localidade": "Miss\\u00e3o Velha",\n "uf": "CE",\n "unidade": "",\n "ibge": "2308401",\n "gia": ""\n}',
},
},
{
"request": {
"full_url": "https://apps.correios.com.br/SigepMasterJPA/AtendeClienteService/AtendeCliente",
"method": "POST",
"headers": {},
"data": bytearray(
b'<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://cliente.bean.master.sigep.bsb.correios.com.br/">\n <soapenv:Header/>\n <soapenv:Body>\n <cli:consultaCEP>\n <cep>69096970</cep>\n </cli:consultaCEP>\n </soapenv:Body>\n </soapenv:Envelope>'
),
},
"response": {
"type": "success",
"data": b'<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:consultaCEPResponse xmlns:ns2="http://cliente.bean.master.sigep.bsb.correios.com.br/"><return><bairro>Cidade Nova</bairro><cep>69096970</cep><cidade>Manaus</cidade><complemento2></complemento2><end>Avenida Noel Nutels 1350</end><uf>AM</uf></return></ns2:consultaCEPResponse></soap:Body></soap:Envelope>',
},
},
{
"request": {
"full_url": "http://cep.republicavirtual.com.br/web_cep.php?cep=69096970&formato=json",
"method": "GET",
"headers": {"Accept": "application/json"},
"data": None,
},
"response": {
"type": "success",
"data": b'{"debug":" - nao encontrado via search_db cep unico - ","resultado":"1","resultado_txt":"sucesso - cep completo","uf":"AM","cidade":"Manaus","bairro":"Cidade Nova\\u00a0","tipo_logradouro":"Avenida","logradouro":"Noel Nutels, 1350 "}',
},
},
{
"request": {
"full_url": "https://viacep.com.br/ws/69096970/json/unicode/",
"method": "GET",
"headers": {},
"data": None,
},
"response": {
"type": "success",
"data": b'{\n "cep": "69096-970",\n "logradouro": "Avenida Noel Nutels 1350",\n "complemento": "",\n "bairro": "Cidade Nova",\n "localidade": "Manaus",\n "uf": "AM",\n "unidade": "",\n "ibge": "1302603",\n "gia": ""\n}',
},
},
{
"request": {
"full_url": "https://apps.correios.com.br/SigepMasterJPA/AtendeClienteService/AtendeCliente",
"method": "POST",
"headers": {},
"data": bytearray(
b'<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://cliente.bean.master.sigep.bsb.correios.com.br/">\n <soapenv:Header/>\n <soapenv:Body>\n <cli:consultaCEP>\n <cep>20010974</cep>\n </cli:consultaCEP>\n </soapenv:Body>\n </soapenv:Envelope>'
),
},
"response": {
"type": "success",
"data": b'<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:consultaCEPResponse xmlns:ns2="http://cliente.bean.master.sigep.bsb.correios.com.br/"><return><bairro>Centro</bairro><cep>20010974</cep><cidade>Rio de Janeiro</cidade><complemento2></complemento2><end>Rua Primeiro de Mar\xe7o 64</end><uf>RJ</uf></return></ns2:consultaCEPResponse></soap:Body></soap:Envelope>',
},
},
{
"request": {
"full_url": "http://cep.republicavirtual.com.br/web_cep.php?cep=20010974&formato=json",
"method": "GET",
"headers": {"Accept": "application/json"},
"data": None,
},
"response": {
"type": "success",
"data": b'{"debug":" - nao encontrado via search_db cep unico - ","resultado":"1","resultado_txt":"sucesso - cep completo","uf":"RJ","cidade":"Rio de Janeiro","bairro":"Centro\\u00a0","tipo_logradouro":"Rua","logradouro":"Primeiro de Mar\\u00e7o, 64 "}',
},
},
{
"request": {
"full_url": "https://viacep.com.br/ws/20010974/json/unicode/",
"method": "GET",
"headers": {},
"data": None,
},
"response": {
"type": "success",
"data": b'{\n "cep": "20010-974",\n "logradouro": "Rua Primeiro de Mar\\u00e7o",\n "complemento": "64",\n "bairro": "Centro",\n "localidade": "Rio de Janeiro",\n "uf": "RJ",\n "unidade": "",\n "ibge": "3304557",\n "gia": ""\n}',
},
},
{
"request": {
"full_url": "https://apps.correios.com.br/SigepMasterJPA/AtendeClienteService/AtendeCliente",
"method": "POST",
"headers": {},
"data": bytearray(
b'<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://cliente.bean.master.sigep.bsb.correios.com.br/">\n <soapenv:Header/>\n <soapenv:Body>\n <cli:consultaCEP>\n <cep>96010900</cep>\n </cli:consultaCEP>\n </soapenv:Body>\n </soapenv:Envelope>'
),
},
"response": {
"type": "success",
"data": b'<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:consultaCEPResponse xmlns:ns2="http://cliente.bean.master.sigep.bsb.correios.com.br/"><return><bairro>Centro</bairro><cep>96010900</cep><cidade>Pelotas</cidade><complemento2></complemento2><end>Rua Tiradentes 2515</end><uf>RS</uf></return></ns2:consultaCEPResponse></soap:Body></soap:Envelope>',
},
},
{
"request": {
"full_url": "http://cep.republicavirtual.com.br/web_cep.php?cep=96010900&formato=json",
"method": "GET",
"headers": {"Accept": "application/json"},
"data": None,
},
"response": {
"type": "success",
"data": b'{"debug":" - nao encontrado via search_db cep unico - ","resultado":"1","resultado_txt":"sucesso - cep completo","uf":"RS","cidade":"Pelotas","bairro":"Centro\\u00a0","tipo_logradouro":"Rua","logradouro":"Tiradentes, 2515 "}',
},
},
{
"request": {
"full_url": "https://viacep.com.br/ws/96010900/json/unicode/",
"method": "GET",
"headers": {},
"data": None,
},
"response": {
"type": "success",
"data": b'{\n "cep": "96010-900",\n "logradouro": "Rua Tiradentes",\n "complemento": "2515",\n "bairro": "Centro",\n "localidade": "Pelotas",\n "uf": "RS",\n "unidade": "",\n "ibge": "4314407",\n "gia": ""\n}',
},
},
{
"request": {
"full_url": "https://apps.correios.com.br/SigepMasterJPA/AtendeClienteService/AtendeCliente",
"method": "POST",
"headers": {},
"data": bytearray(
b'<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://cliente.bean.master.sigep.bsb.correios.com.br/">\n <soapenv:Header/>\n <soapenv:Body>\n <cli:consultaCEP>\n <cep>38101990</cep>\n </cli:consultaCEP>\n </soapenv:Body>\n </soapenv:Envelope>'
),
},
"response": {
"type": "success",
"data": b'<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:consultaCEPResponse xmlns:ns2="http://cliente.bean.master.sigep.bsb.correios.com.br/"><return><bairro></bairro><cep>38101990</cep><cidade>Baixa (Uberaba)</cidade><complemento2></complemento2><end>Rua Bas\xedlio Eug\xeanio dos Santos</end><uf>MG</uf></return></ns2:consultaCEPResponse></soap:Body></soap:Envelope>',
},
},
{
"request": {
"full_url": "http://cep.republicavirtual.com.br/web_cep.php?cep=38101990&formato=json",
"method": "GET",
"headers": {"Accept": "application/json"},
"data": None,
},
"response": {
"type": "success",
"data": b'{"debug":" - nao encontrado via search_db cep unico - ","resultado":"1","resultado_txt":"sucesso - cep completo","uf":"MG - Distrito","cidade":"Baixa (Uberaba)","bairro":"\\u00a0","tipo_logradouro":"Rua","logradouro":"Bas\\u00edlio Eug\\u00eanio dos Santos "}',
},
},
{
"request": {
"full_url": "https://viacep.com.br/ws/38101990/json/unicode/",
"method": "GET",
"headers": {},
"data": None,
},
"response": {
"type": "success",
"data": b'{\n "cep": "38101-990",\n "logradouro": "Rua Bas\\u00edlio Eug\\u00eanio dos Santos",\n "complemento": "",\n "bairro": "Baixa",\n "localidade": "Uberaba",\n "uf": "MG",\n "unidade": "",\n "ibge": "3170107",\n "gia": ""\n}',
},
},
{
"request": {
"full_url": "https://apps.correios.com.br/SigepMasterJPA/AtendeClienteService/AtendeCliente",
"method": "POST",
"headers": {},
"data": bytearray(
b'<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://cliente.bean.master.sigep.bsb.correios.com.br/">\n <soapenv:Header/>\n <soapenv:Body>\n <cli:consultaCEP>\n <cep>76840000</cep>\n </cli:consultaCEP>\n </soapenv:Body>\n </soapenv:Envelope>'
),
},
"response": {
"type": "success",
"data": b'<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:consultaCEPResponse xmlns:ns2="http://cliente.bean.master.sigep.bsb.correios.com.br/"><return><bairro></bairro><cep>76840000</cep><cidade>Jaci Paran\xe1 (Porto Velho)</cidade><complemento2></complemento2><end></end><uf>RO</uf></return></ns2:consultaCEPResponse></soap:Body></soap:Envelope>',
},
},
{
"request": {
"full_url": "http://cep.republicavirtual.com.br/web_cep.php?cep=76840000&formato=json",
"method": "GET",
"headers": {"Accept": "application/json"},
"data": None,
},
"response": {
"type": "success",
"data": b'{"debug":" - nao encontrado via search_db cep unico - ","resultado":"2","resultado_txt":"sucesso - cep \\u00fanico","uf":"RO - Distrito","cidade":"Jaci Paran\\u00e1 (Porto Velho)","bairro":"\\u00a0","tipo_logradouro":"","logradouro":""}',
},
},
{
"request": {
"full_url": "https://viacep.com.br/ws/76840000/json/unicode/",
"method": "GET",
"headers": {},
"data": None,
},
"response": {
"type": "success",
"data": b'{\n "cep": "76840-000",\n "logradouro": "",\n "complemento": "",\n "bairro": "",\n "localidade": "Jaci Paran\\u00e1 (Porto Velho)",\n "uf": "RO",\n "unidade": "",\n "ibge": "1100205",\n "gia": ""\n}',
},
},
{
"request": {
"full_url": "https://apps.correios.com.br/SigepMasterJPA/AtendeClienteService/AtendeCliente",
"method": "POST",
"headers": {},
"data": bytearray(
b'<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://cliente.bean.master.sigep.bsb.correios.com.br/">\n <soapenv:Header/>\n <soapenv:Body>\n <cli:consultaCEP>\n <cep>86055991</cep>\n </cli:consultaCEP>\n </soapenv:Body>\n </soapenv:Envelope>'
),
},
"response": {
"type": "success",
"data": b'<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:consultaCEPResponse xmlns:ns2="http://cliente.bean.master.sigep.bsb.correios.com.br/"><return><bairro></bairro><cep>86055991</cep><cidade>Londrina</cidade><complemento2></complemento2><end>Rodovia M\xe1bio Gon\xe7alves Palhano, s/n</end><uf>PR</uf></return></ns2:consultaCEPResponse></soap:Body></soap:Envelope>',
},
},
{
"request": {
"full_url": "http://cep.republicavirtual.com.br/web_cep.php?cep=86055991&formato=json",
"method": "GET",
"headers": {"Accept": "application/json"},
"data": None,
},
"response": {
"type": "success",
"data": b'{"debug":" - nao encontrado via search_db cep unico - ","resultado":"1","resultado_txt":"sucesso - cep completo","uf":"PR","cidade":"Londrina","bairro":"\\u00a0","tipo_logradouro":"Rodovia","logradouro":"M\\u00e1bio Gon\\u00e7alves Palhano, s\\/n "}',
},
},
{
"request": {
"full_url": "https://viacep.com.br/ws/86055991/json/unicode/",
"method": "GET",
"headers": {},
"data": None,
},
"response": {
"type": "success",
"data": b'{\n "cep": "86055-991",\n "logradouro": "Rodovia M\\u00e1bio Gon\\u00e7alves Palhano",\n "complemento": "s/n",\n "bairro": "",\n "localidade": "Londrina",\n "uf": "PR",\n "unidade": "",\n "ibge": "4113700",\n "gia": ""\n}',
},
},
{
"request": {
"full_url": "https://apps.correios.com.br/SigepMasterJPA/AtendeClienteService/AtendeCliente",
"method": "POST",
"headers": {},
"data": bytearray(
b'<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://cliente.bean.master.sigep.bsb.correios.com.br/">\n <soapenv:Header/>\n <soapenv:Body>\n <cli:consultaCEP>\n <cep>00000000</cep>\n </cli:consultaCEP>\n </soapenv:Body>\n </soapenv:Envelope>'
),
},
"response": {
"type": "error",
"status": 500,
"data": b'<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>CEP INV\xc1LIDO</faultstring><detail><ns2:SigepClienteException xmlns:ns2="http://cliente.bean.master.sigep.bsb.correios.com.br/">CEP INV\xc1LIDO</ns2:SigepClienteException></detail></soap:Fault></soap:Body></soap:Envelope>',
},
},
{
"request": {
"full_url": "http://cep.republicavirtual.com.br/web_cep.php?cep=00000000&formato=json",
"method": "GET",
"headers": {"Accept": "application/json"},
"data": None,
},
"response": {
"type": "success",
"data": b'{"debug":" - nao encontrado via search_db cep unico - ","resultado":"0","resultado_txt":"sucesso - cep n\\u00e3o encontrado","uf":"","cidade":"","bairro":"","tipo_logradouro":"","logradouro":""}',
},
},
{
"request": {
"full_url": "https://viacep.com.br/ws/00000000/json/unicode/",
"method": "GET",
"headers": {},
"data": None,
},
"response": {"type": "success", "data": b'{\n "erro": true\n}'},
},
{
"request": {
"full_url": "https://apps.correios.com.br/SigepMasterJPA/AtendeClienteService/AtendeCliente",
"method": "POST",
"headers": {},
"data": bytearray(
b'<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://cliente.bean.master.sigep.bsb.correios.com.br/">\n <soapenv:Header/>\n <soapenv:Body>\n <cli:consultaCEP>\n <cep>11111111</cep>\n </cli:consultaCEP>\n </soapenv:Body>\n </soapenv:Envelope>'
),
},
"response": {
"type": "error",
"status": 500,
"data": b'<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>CEP INV\xc1LIDO</faultstring><detail><ns2:SigepClienteException xmlns:ns2="http://cliente.bean.master.sigep.bsb.correios.com.br/">CEP INV\xc1LIDO</ns2:SigepClienteException></detail></soap:Fault></soap:Body></soap:Envelope>',
},
},
{
"request": {
"full_url": "http://cep.republicavirtual.com.br/web_cep.php?cep=11111111&formato=json",
"method": "GET",
"headers": {"Accept": "application/json"},
"data": None,
},
"response": {
"type": "success",
"data": b'{"debug":" - nao encontrado via search_db cep unico - ","resultado":"0","resultado_txt":"sucesso - cep n\\u00e3o encontrado","uf":"","cidade":"","bairro":"","tipo_logradouro":"","logradouro":""}',
},
},
{
"request": {
"full_url": "https://viacep.com.br/ws/11111111/json/unicode/",
"method": "GET",
"headers": {},
"data": None,
},
"response": {"type": "success", "data": b'{\n "erro": true\n}'},
},
{
"request": {
"full_url": "https://apps.correios.com.br/SigepMasterJPA/AtendeClienteService/AtendeCliente",
"method": "POST",
"headers": {},
"data": bytearray(
b'<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://cliente.bean.master.sigep.bsb.correios.com.br/">\n <soapenv:Header/>\n <soapenv:Body>\n <cli:consultaCEP>\n <cep>99999999</cep>\n </cli:consultaCEP>\n </soapenv:Body>\n </soapenv:Envelope>'
),
},
"response": {
"type": "error",
"status": 500,
"data": b'<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>CEP INV\xc1LIDO</faultstring><detail><ns2:SigepClienteException xmlns:ns2="http://cliente.bean.master.sigep.bsb.correios.com.br/">CEP INV\xc1LIDO</ns2:SigepClienteException></detail></soap:Fault></soap:Body></soap:Envelope>',
},
},
{
"request": {
"full_url": "http://cep.republicavirtual.com.br/web_cep.php?cep=99999999&formato=json",
"method": "GET",
"headers": {"Accept": "application/json"},
"data": None,
},
"response": {
"type": "success",
"data": b'{"debug":" - nao encontrado via search_db cep unico - ","resultado":"0","resultado_txt":"sucesso - cep n\\u00e3o encontrado","uf":"","cidade":"","bairro":"","tipo_logradouro":"","logradouro":""}',
},
},
{
"request": {
"full_url": "https://viacep.com.br/ws/99999999/json/unicode/",
"method": "GET",
"headers": {},
"data": None,
},
"response": {"type": "success", "data": b'{\n "erro": true\n}'},
},
{
"request": {
"full_url": "https://apps.correios.com.br/SigepMasterJPA/AtendeClienteService/AtendeCliente",
"method": "POST",
"headers": {},
"data": bytearray(
b'<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://cliente.bean.master.sigep.bsb.correios.com.br/">\n <soapenv:Header/>\n <soapenv:Body>\n <cli:consultaCEP>\n <cep>01111110</cep>\n </cli:consultaCEP>\n </soapenv:Body>\n </soapenv:Envelope>'
),
},
"response": {
"type": "success",
"data": b'<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:consultaCEPResponse xmlns:ns2="http://cliente.bean.master.sigep.bsb.correios.com.br/"/></soap:Body></soap:Envelope>',
},
},
{
"request": {
"full_url": "http://cep.republicavirtual.com.br/web_cep.php?cep=01111110&formato=json",
"method": "GET",
"headers": {"Accept": "application/json"},
"data": None,
},
"response": {
"type": "success",
"data": b'{"debug":" - nao encontrado via search_db cep unico - ","resultado":"0","resultado_txt":"sucesso - cep n\\u00e3o encontrado","uf":"","cidade":"","bairro":"","tipo_logradouro":"","logradouro":""}',
},
},
{
"request": {
"full_url": "https://viacep.com.br/ws/01111110/json/unicode/",
"method": "GET",
"headers": {},
"data": None,
},
"response": {"type": "success", "data": b'{\n "erro": true\n}'},
},
]
|
captured_responses = [{'request': {'full_url': 'https://apps.correios.com.br/SigepMasterJPA/AtendeClienteService/AtendeCliente', 'method': 'POST', 'headers': {}, 'data': bytearray(b'<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://cliente.bean.master.sigep.bsb.correios.com.br/">\n <soapenv:Header/>\n <soapenv:Body>\n <cli:consultaCEP>\n <cep>01001000</cep>\n </cli:consultaCEP>\n </soapenv:Body>\n </soapenv:Envelope>')}, 'response': {'type': 'success', 'data': b'<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:consultaCEPResponse xmlns:ns2="http://cliente.bean.master.sigep.bsb.correios.com.br/"><return><bairro>S\xe9</bairro><cep>01001000</cep><cidade>S\xe3o Paulo</cidade><complemento2>- lado \xedmpar</complemento2><end>Pra\xe7a da S\xe9</end><uf>SP</uf></return></ns2:consultaCEPResponse></soap:Body></soap:Envelope>'}}, {'request': {'full_url': 'http://cep.republicavirtual.com.br/web_cep.php?cep=01001000&formato=json', 'method': 'GET', 'headers': {'Accept': 'application/json'}, 'data': None}, 'response': {'type': 'success', 'data': b'{"resultado":"1","resultado_txt":"sucesso - cep completo","uf":"SP","cidade":"S\\u00e3o Paulo","bairro":"S\\u00e9","tipo_logradouro":"Pra\\u00e7a","logradouro":"da S\\u00e9"}'}}, {'request': {'full_url': 'https://viacep.com.br/ws/01001000/json/unicode/', 'method': 'GET', 'headers': {}, 'data': None}, 'response': {'type': 'success', 'data': b'{\n "cep": "01001-000",\n "logradouro": "Pra\\u00e7a da S\\u00e9",\n "complemento": "lado \\u00edmpar",\n "bairro": "S\\u00e9",\n "localidade": "S\\u00e3o Paulo",\n "uf": "SP",\n "unidade": "",\n "ibge": "3550308",\n "gia": "1004"\n}'}}, {'request': {'full_url': 'https://apps.correios.com.br/SigepMasterJPA/AtendeClienteService/AtendeCliente', 'method': 'POST', 'headers': {}, 'data': bytearray(b'<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://cliente.bean.master.sigep.bsb.correios.com.br/">\n <soapenv:Header/>\n <soapenv:Body>\n <cli:consultaCEP>\n <cep>57010240</cep>\n </cli:consultaCEP>\n </soapenv:Body>\n </soapenv:Envelope>')}, 'response': {'type': 'success', 'data': b'<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:consultaCEPResponse xmlns:ns2="http://cliente.bean.master.sigep.bsb.correios.com.br/"><return><bairro>Prado</bairro><cep>57010240</cep><cidade>Macei\xf3</cidade><complemento2></complemento2><end>Rua Desembargador Inoc\xeancio Lins</end><uf>AL</uf></return></ns2:consultaCEPResponse></soap:Body></soap:Envelope>'}}, {'request': {'full_url': 'http://cep.republicavirtual.com.br/web_cep.php?cep=57010240&formato=json', 'method': 'GET', 'headers': {'Accept': 'application/json'}, 'data': None}, 'response': {'type': 'success', 'data': b'{"resultado":"1","resultado_txt":"sucesso - cep completo","uf":"AL","cidade":"Macei\\u00f3","bairro":"Prado","tipo_logradouro":"Rua","logradouro":"Desembargador Inoc\\u00eancio Lins"}'}}, {'request': {'full_url': 'https://viacep.com.br/ws/57010240/json/unicode/', 'method': 'GET', 'headers': {}, 'data': None}, 'response': {'type': 'success', 'data': b'{\n "cep": "57010-240",\n "logradouro": "Rua Desembargador Inoc\\u00eancio Lins",\n "complemento": "",\n "bairro": "Prado",\n "localidade": "Macei\\u00f3",\n "uf": "AL",\n "unidade": "",\n "ibge": "2704302",\n "gia": ""\n}'}}, {'request': {'full_url': 'https://apps.correios.com.br/SigepMasterJPA/AtendeClienteService/AtendeCliente', 'method': 'POST', 'headers': {}, 'data': bytearray(b'<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://cliente.bean.master.sigep.bsb.correios.com.br/">\n <soapenv:Header/>\n <soapenv:Body>\n <cli:consultaCEP>\n <cep>18170000</cep>\n </cli:consultaCEP>\n </soapenv:Body>\n </soapenv:Envelope>')}, 'response': {'type': 'success', 'data': b'<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:consultaCEPResponse xmlns:ns2="http://cliente.bean.master.sigep.bsb.correios.com.br/"><return><bairro></bairro><cep>18170000</cep><cidade>Piedade</cidade><complemento2></complemento2><end></end><uf>SP</uf></return></ns2:consultaCEPResponse></soap:Body></soap:Envelope>'}}, {'request': {'full_url': 'http://cep.republicavirtual.com.br/web_cep.php?cep=18170000&formato=json', 'method': 'GET', 'headers': {'Accept': 'application/json'}, 'data': None}, 'response': {'type': 'success', 'data': b'{"resultado":"2","resultado_txt":"sucesso - cep \\u00fanico","uf":"SP","cidade":"Piedade","bairro":"","tipo_logradouro":"","logradouro":"","debug":" - encontrado via search_db cep unico - "}'}}, {'request': {'full_url': 'https://viacep.com.br/ws/18170000/json/unicode/', 'method': 'GET', 'headers': {}, 'data': None}, 'response': {'type': 'success', 'data': b'{\n "cep": "18170-000",\n "logradouro": "",\n "complemento": "",\n "bairro": "",\n "localidade": "Piedade",\n "uf": "SP",\n "unidade": "",\n "ibge": "3537800",\n "gia": "5265"\n}'}}, {'request': {'full_url': 'https://apps.correios.com.br/SigepMasterJPA/AtendeClienteService/AtendeCliente', 'method': 'POST', 'headers': {}, 'data': bytearray(b'<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://cliente.bean.master.sigep.bsb.correios.com.br/">\n <soapenv:Header/>\n <soapenv:Body>\n <cli:consultaCEP>\n <cep>78175000</cep>\n </cli:consultaCEP>\n </soapenv:Body>\n </soapenv:Envelope>')}, 'response': {'type': 'success', 'data': b'<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:consultaCEPResponse xmlns:ns2="http://cliente.bean.master.sigep.bsb.correios.com.br/"><return><bairro></bairro><cep>78175000</cep><cidade>Pocon\xe9</cidade><complemento2></complemento2><end></end><uf>MT</uf></return></ns2:consultaCEPResponse></soap:Body></soap:Envelope>'}}, {'request': {'full_url': 'http://cep.republicavirtual.com.br/web_cep.php?cep=78175000&formato=json', 'method': 'GET', 'headers': {'Accept': 'application/json'}, 'data': None}, 'response': {'type': 'success', 'data': b'{"resultado":"2","resultado_txt":"sucesso - cep \\u00fanico","uf":"MT","cidade":"Pocon\\u00e9","bairro":"","tipo_logradouro":"","logradouro":"","debug":" - encontrado via search_db cep unico - "}'}}, {'request': {'full_url': 'https://viacep.com.br/ws/78175000/json/unicode/', 'method': 'GET', 'headers': {}, 'data': None}, 'response': {'type': 'success', 'data': b'{\n "cep": "78175-000",\n "logradouro": "",\n "complemento": "",\n "bairro": "",\n "localidade": "Pocon\\u00e9",\n "uf": "MT",\n "unidade": "",\n "ibge": "5106505",\n "gia": ""\n}'}}, {'request': {'full_url': 'https://apps.correios.com.br/SigepMasterJPA/AtendeClienteService/AtendeCliente', 'method': 'POST', 'headers': {}, 'data': bytearray(b'<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://cliente.bean.master.sigep.bsb.correios.com.br/">\n <soapenv:Header/>\n <soapenv:Body>\n <cli:consultaCEP>\n <cep>63200970</cep>\n </cli:consultaCEP>\n </soapenv:Body>\n </soapenv:Envelope>')}, 'response': {'type': 'success', 'data': b'<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:consultaCEPResponse xmlns:ns2="http://cliente.bean.master.sigep.bsb.correios.com.br/"><return><bairro>Centro</bairro><cep>63200970</cep><cidade>Miss\xe3o Velha</cidade><complemento2></complemento2><end>Rua Jos\xe9 Sobreira da Cruz 271</end><uf>CE</uf></return></ns2:consultaCEPResponse></soap:Body></soap:Envelope>'}}, {'request': {'full_url': 'http://cep.republicavirtual.com.br/web_cep.php?cep=63200970&formato=json', 'method': 'GET', 'headers': {'Accept': 'application/json'}, 'data': None}, 'response': {'type': 'success', 'data': b'{"debug":" - nao encontrado via search_db cep unico - ","resultado":"1","resultado_txt":"sucesso - cep completo","uf":"CE","cidade":"Miss\\u00e3o Velha","bairro":"Centro\\u00a0","tipo_logradouro":"Rua","logradouro":"Jos\\u00e9 Sobreira da Cruz, 271 "}'}}, {'request': {'full_url': 'https://viacep.com.br/ws/63200970/json/unicode/', 'method': 'GET', 'headers': {}, 'data': None}, 'response': {'type': 'success', 'data': b'{\n "cep": "63200-970",\n "logradouro": "Rua Jos\\u00e9 Sobreira da Cruz 271",\n "complemento": "",\n "bairro": "Centro",\n "localidade": "Miss\\u00e3o Velha",\n "uf": "CE",\n "unidade": "",\n "ibge": "2308401",\n "gia": ""\n}'}}, {'request': {'full_url': 'https://apps.correios.com.br/SigepMasterJPA/AtendeClienteService/AtendeCliente', 'method': 'POST', 'headers': {}, 'data': bytearray(b'<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://cliente.bean.master.sigep.bsb.correios.com.br/">\n <soapenv:Header/>\n <soapenv:Body>\n <cli:consultaCEP>\n <cep>69096970</cep>\n </cli:consultaCEP>\n </soapenv:Body>\n </soapenv:Envelope>')}, 'response': {'type': 'success', 'data': b'<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:consultaCEPResponse xmlns:ns2="http://cliente.bean.master.sigep.bsb.correios.com.br/"><return><bairro>Cidade Nova</bairro><cep>69096970</cep><cidade>Manaus</cidade><complemento2></complemento2><end>Avenida Noel Nutels 1350</end><uf>AM</uf></return></ns2:consultaCEPResponse></soap:Body></soap:Envelope>'}}, {'request': {'full_url': 'http://cep.republicavirtual.com.br/web_cep.php?cep=69096970&formato=json', 'method': 'GET', 'headers': {'Accept': 'application/json'}, 'data': None}, 'response': {'type': 'success', 'data': b'{"debug":" - nao encontrado via search_db cep unico - ","resultado":"1","resultado_txt":"sucesso - cep completo","uf":"AM","cidade":"Manaus","bairro":"Cidade Nova\\u00a0","tipo_logradouro":"Avenida","logradouro":"Noel Nutels, 1350 "}'}}, {'request': {'full_url': 'https://viacep.com.br/ws/69096970/json/unicode/', 'method': 'GET', 'headers': {}, 'data': None}, 'response': {'type': 'success', 'data': b'{\n "cep": "69096-970",\n "logradouro": "Avenida Noel Nutels 1350",\n "complemento": "",\n "bairro": "Cidade Nova",\n "localidade": "Manaus",\n "uf": "AM",\n "unidade": "",\n "ibge": "1302603",\n "gia": ""\n}'}}, {'request': {'full_url': 'https://apps.correios.com.br/SigepMasterJPA/AtendeClienteService/AtendeCliente', 'method': 'POST', 'headers': {}, 'data': bytearray(b'<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://cliente.bean.master.sigep.bsb.correios.com.br/">\n <soapenv:Header/>\n <soapenv:Body>\n <cli:consultaCEP>\n <cep>20010974</cep>\n </cli:consultaCEP>\n </soapenv:Body>\n </soapenv:Envelope>')}, 'response': {'type': 'success', 'data': b'<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:consultaCEPResponse xmlns:ns2="http://cliente.bean.master.sigep.bsb.correios.com.br/"><return><bairro>Centro</bairro><cep>20010974</cep><cidade>Rio de Janeiro</cidade><complemento2></complemento2><end>Rua Primeiro de Mar\xe7o 64</end><uf>RJ</uf></return></ns2:consultaCEPResponse></soap:Body></soap:Envelope>'}}, {'request': {'full_url': 'http://cep.republicavirtual.com.br/web_cep.php?cep=20010974&formato=json', 'method': 'GET', 'headers': {'Accept': 'application/json'}, 'data': None}, 'response': {'type': 'success', 'data': b'{"debug":" - nao encontrado via search_db cep unico - ","resultado":"1","resultado_txt":"sucesso - cep completo","uf":"RJ","cidade":"Rio de Janeiro","bairro":"Centro\\u00a0","tipo_logradouro":"Rua","logradouro":"Primeiro de Mar\\u00e7o, 64 "}'}}, {'request': {'full_url': 'https://viacep.com.br/ws/20010974/json/unicode/', 'method': 'GET', 'headers': {}, 'data': None}, 'response': {'type': 'success', 'data': b'{\n "cep": "20010-974",\n "logradouro": "Rua Primeiro de Mar\\u00e7o",\n "complemento": "64",\n "bairro": "Centro",\n "localidade": "Rio de Janeiro",\n "uf": "RJ",\n "unidade": "",\n "ibge": "3304557",\n "gia": ""\n}'}}, {'request': {'full_url': 'https://apps.correios.com.br/SigepMasterJPA/AtendeClienteService/AtendeCliente', 'method': 'POST', 'headers': {}, 'data': bytearray(b'<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://cliente.bean.master.sigep.bsb.correios.com.br/">\n <soapenv:Header/>\n <soapenv:Body>\n <cli:consultaCEP>\n <cep>96010900</cep>\n </cli:consultaCEP>\n </soapenv:Body>\n </soapenv:Envelope>')}, 'response': {'type': 'success', 'data': b'<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:consultaCEPResponse xmlns:ns2="http://cliente.bean.master.sigep.bsb.correios.com.br/"><return><bairro>Centro</bairro><cep>96010900</cep><cidade>Pelotas</cidade><complemento2></complemento2><end>Rua Tiradentes 2515</end><uf>RS</uf></return></ns2:consultaCEPResponse></soap:Body></soap:Envelope>'}}, {'request': {'full_url': 'http://cep.republicavirtual.com.br/web_cep.php?cep=96010900&formato=json', 'method': 'GET', 'headers': {'Accept': 'application/json'}, 'data': None}, 'response': {'type': 'success', 'data': b'{"debug":" - nao encontrado via search_db cep unico - ","resultado":"1","resultado_txt":"sucesso - cep completo","uf":"RS","cidade":"Pelotas","bairro":"Centro\\u00a0","tipo_logradouro":"Rua","logradouro":"Tiradentes, 2515 "}'}}, {'request': {'full_url': 'https://viacep.com.br/ws/96010900/json/unicode/', 'method': 'GET', 'headers': {}, 'data': None}, 'response': {'type': 'success', 'data': b'{\n "cep": "96010-900",\n "logradouro": "Rua Tiradentes",\n "complemento": "2515",\n "bairro": "Centro",\n "localidade": "Pelotas",\n "uf": "RS",\n "unidade": "",\n "ibge": "4314407",\n "gia": ""\n}'}}, {'request': {'full_url': 'https://apps.correios.com.br/SigepMasterJPA/AtendeClienteService/AtendeCliente', 'method': 'POST', 'headers': {}, 'data': bytearray(b'<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://cliente.bean.master.sigep.bsb.correios.com.br/">\n <soapenv:Header/>\n <soapenv:Body>\n <cli:consultaCEP>\n <cep>38101990</cep>\n </cli:consultaCEP>\n </soapenv:Body>\n </soapenv:Envelope>')}, 'response': {'type': 'success', 'data': b'<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:consultaCEPResponse xmlns:ns2="http://cliente.bean.master.sigep.bsb.correios.com.br/"><return><bairro></bairro><cep>38101990</cep><cidade>Baixa (Uberaba)</cidade><complemento2></complemento2><end>Rua Bas\xedlio Eug\xeanio dos Santos</end><uf>MG</uf></return></ns2:consultaCEPResponse></soap:Body></soap:Envelope>'}}, {'request': {'full_url': 'http://cep.republicavirtual.com.br/web_cep.php?cep=38101990&formato=json', 'method': 'GET', 'headers': {'Accept': 'application/json'}, 'data': None}, 'response': {'type': 'success', 'data': b'{"debug":" - nao encontrado via search_db cep unico - ","resultado":"1","resultado_txt":"sucesso - cep completo","uf":"MG - Distrito","cidade":"Baixa (Uberaba)","bairro":"\\u00a0","tipo_logradouro":"Rua","logradouro":"Bas\\u00edlio Eug\\u00eanio dos Santos "}'}}, {'request': {'full_url': 'https://viacep.com.br/ws/38101990/json/unicode/', 'method': 'GET', 'headers': {}, 'data': None}, 'response': {'type': 'success', 'data': b'{\n "cep": "38101-990",\n "logradouro": "Rua Bas\\u00edlio Eug\\u00eanio dos Santos",\n "complemento": "",\n "bairro": "Baixa",\n "localidade": "Uberaba",\n "uf": "MG",\n "unidade": "",\n "ibge": "3170107",\n "gia": ""\n}'}}, {'request': {'full_url': 'https://apps.correios.com.br/SigepMasterJPA/AtendeClienteService/AtendeCliente', 'method': 'POST', 'headers': {}, 'data': bytearray(b'<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://cliente.bean.master.sigep.bsb.correios.com.br/">\n <soapenv:Header/>\n <soapenv:Body>\n <cli:consultaCEP>\n <cep>76840000</cep>\n </cli:consultaCEP>\n </soapenv:Body>\n </soapenv:Envelope>')}, 'response': {'type': 'success', 'data': b'<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:consultaCEPResponse xmlns:ns2="http://cliente.bean.master.sigep.bsb.correios.com.br/"><return><bairro></bairro><cep>76840000</cep><cidade>Jaci Paran\xe1 (Porto Velho)</cidade><complemento2></complemento2><end></end><uf>RO</uf></return></ns2:consultaCEPResponse></soap:Body></soap:Envelope>'}}, {'request': {'full_url': 'http://cep.republicavirtual.com.br/web_cep.php?cep=76840000&formato=json', 'method': 'GET', 'headers': {'Accept': 'application/json'}, 'data': None}, 'response': {'type': 'success', 'data': b'{"debug":" - nao encontrado via search_db cep unico - ","resultado":"2","resultado_txt":"sucesso - cep \\u00fanico","uf":"RO - Distrito","cidade":"Jaci Paran\\u00e1 (Porto Velho)","bairro":"\\u00a0","tipo_logradouro":"","logradouro":""}'}}, {'request': {'full_url': 'https://viacep.com.br/ws/76840000/json/unicode/', 'method': 'GET', 'headers': {}, 'data': None}, 'response': {'type': 'success', 'data': b'{\n "cep": "76840-000",\n "logradouro": "",\n "complemento": "",\n "bairro": "",\n "localidade": "Jaci Paran\\u00e1 (Porto Velho)",\n "uf": "RO",\n "unidade": "",\n "ibge": "1100205",\n "gia": ""\n}'}}, {'request': {'full_url': 'https://apps.correios.com.br/SigepMasterJPA/AtendeClienteService/AtendeCliente', 'method': 'POST', 'headers': {}, 'data': bytearray(b'<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://cliente.bean.master.sigep.bsb.correios.com.br/">\n <soapenv:Header/>\n <soapenv:Body>\n <cli:consultaCEP>\n <cep>86055991</cep>\n </cli:consultaCEP>\n </soapenv:Body>\n </soapenv:Envelope>')}, 'response': {'type': 'success', 'data': b'<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:consultaCEPResponse xmlns:ns2="http://cliente.bean.master.sigep.bsb.correios.com.br/"><return><bairro></bairro><cep>86055991</cep><cidade>Londrina</cidade><complemento2></complemento2><end>Rodovia M\xe1bio Gon\xe7alves Palhano, s/n</end><uf>PR</uf></return></ns2:consultaCEPResponse></soap:Body></soap:Envelope>'}}, {'request': {'full_url': 'http://cep.republicavirtual.com.br/web_cep.php?cep=86055991&formato=json', 'method': 'GET', 'headers': {'Accept': 'application/json'}, 'data': None}, 'response': {'type': 'success', 'data': b'{"debug":" - nao encontrado via search_db cep unico - ","resultado":"1","resultado_txt":"sucesso - cep completo","uf":"PR","cidade":"Londrina","bairro":"\\u00a0","tipo_logradouro":"Rodovia","logradouro":"M\\u00e1bio Gon\\u00e7alves Palhano, s\\/n "}'}}, {'request': {'full_url': 'https://viacep.com.br/ws/86055991/json/unicode/', 'method': 'GET', 'headers': {}, 'data': None}, 'response': {'type': 'success', 'data': b'{\n "cep": "86055-991",\n "logradouro": "Rodovia M\\u00e1bio Gon\\u00e7alves Palhano",\n "complemento": "s/n",\n "bairro": "",\n "localidade": "Londrina",\n "uf": "PR",\n "unidade": "",\n "ibge": "4113700",\n "gia": ""\n}'}}, {'request': {'full_url': 'https://apps.correios.com.br/SigepMasterJPA/AtendeClienteService/AtendeCliente', 'method': 'POST', 'headers': {}, 'data': bytearray(b'<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://cliente.bean.master.sigep.bsb.correios.com.br/">\n <soapenv:Header/>\n <soapenv:Body>\n <cli:consultaCEP>\n <cep>00000000</cep>\n </cli:consultaCEP>\n </soapenv:Body>\n </soapenv:Envelope>')}, 'response': {'type': 'error', 'status': 500, 'data': b'<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>CEP INV\xc1LIDO</faultstring><detail><ns2:SigepClienteException xmlns:ns2="http://cliente.bean.master.sigep.bsb.correios.com.br/">CEP INV\xc1LIDO</ns2:SigepClienteException></detail></soap:Fault></soap:Body></soap:Envelope>'}}, {'request': {'full_url': 'http://cep.republicavirtual.com.br/web_cep.php?cep=00000000&formato=json', 'method': 'GET', 'headers': {'Accept': 'application/json'}, 'data': None}, 'response': {'type': 'success', 'data': b'{"debug":" - nao encontrado via search_db cep unico - ","resultado":"0","resultado_txt":"sucesso - cep n\\u00e3o encontrado","uf":"","cidade":"","bairro":"","tipo_logradouro":"","logradouro":""}'}}, {'request': {'full_url': 'https://viacep.com.br/ws/00000000/json/unicode/', 'method': 'GET', 'headers': {}, 'data': None}, 'response': {'type': 'success', 'data': b'{\n "erro": true\n}'}}, {'request': {'full_url': 'https://apps.correios.com.br/SigepMasterJPA/AtendeClienteService/AtendeCliente', 'method': 'POST', 'headers': {}, 'data': bytearray(b'<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://cliente.bean.master.sigep.bsb.correios.com.br/">\n <soapenv:Header/>\n <soapenv:Body>\n <cli:consultaCEP>\n <cep>11111111</cep>\n </cli:consultaCEP>\n </soapenv:Body>\n </soapenv:Envelope>')}, 'response': {'type': 'error', 'status': 500, 'data': b'<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>CEP INV\xc1LIDO</faultstring><detail><ns2:SigepClienteException xmlns:ns2="http://cliente.bean.master.sigep.bsb.correios.com.br/">CEP INV\xc1LIDO</ns2:SigepClienteException></detail></soap:Fault></soap:Body></soap:Envelope>'}}, {'request': {'full_url': 'http://cep.republicavirtual.com.br/web_cep.php?cep=11111111&formato=json', 'method': 'GET', 'headers': {'Accept': 'application/json'}, 'data': None}, 'response': {'type': 'success', 'data': b'{"debug":" - nao encontrado via search_db cep unico - ","resultado":"0","resultado_txt":"sucesso - cep n\\u00e3o encontrado","uf":"","cidade":"","bairro":"","tipo_logradouro":"","logradouro":""}'}}, {'request': {'full_url': 'https://viacep.com.br/ws/11111111/json/unicode/', 'method': 'GET', 'headers': {}, 'data': None}, 'response': {'type': 'success', 'data': b'{\n "erro": true\n}'}}, {'request': {'full_url': 'https://apps.correios.com.br/SigepMasterJPA/AtendeClienteService/AtendeCliente', 'method': 'POST', 'headers': {}, 'data': bytearray(b'<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://cliente.bean.master.sigep.bsb.correios.com.br/">\n <soapenv:Header/>\n <soapenv:Body>\n <cli:consultaCEP>\n <cep>99999999</cep>\n </cli:consultaCEP>\n </soapenv:Body>\n </soapenv:Envelope>')}, 'response': {'type': 'error', 'status': 500, 'data': b'<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>CEP INV\xc1LIDO</faultstring><detail><ns2:SigepClienteException xmlns:ns2="http://cliente.bean.master.sigep.bsb.correios.com.br/">CEP INV\xc1LIDO</ns2:SigepClienteException></detail></soap:Fault></soap:Body></soap:Envelope>'}}, {'request': {'full_url': 'http://cep.republicavirtual.com.br/web_cep.php?cep=99999999&formato=json', 'method': 'GET', 'headers': {'Accept': 'application/json'}, 'data': None}, 'response': {'type': 'success', 'data': b'{"debug":" - nao encontrado via search_db cep unico - ","resultado":"0","resultado_txt":"sucesso - cep n\\u00e3o encontrado","uf":"","cidade":"","bairro":"","tipo_logradouro":"","logradouro":""}'}}, {'request': {'full_url': 'https://viacep.com.br/ws/99999999/json/unicode/', 'method': 'GET', 'headers': {}, 'data': None}, 'response': {'type': 'success', 'data': b'{\n "erro": true\n}'}}, {'request': {'full_url': 'https://apps.correios.com.br/SigepMasterJPA/AtendeClienteService/AtendeCliente', 'method': 'POST', 'headers': {}, 'data': bytearray(b'<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cli="http://cliente.bean.master.sigep.bsb.correios.com.br/">\n <soapenv:Header/>\n <soapenv:Body>\n <cli:consultaCEP>\n <cep>01111110</cep>\n </cli:consultaCEP>\n </soapenv:Body>\n </soapenv:Envelope>')}, 'response': {'type': 'success', 'data': b'<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:consultaCEPResponse xmlns:ns2="http://cliente.bean.master.sigep.bsb.correios.com.br/"/></soap:Body></soap:Envelope>'}}, {'request': {'full_url': 'http://cep.republicavirtual.com.br/web_cep.php?cep=01111110&formato=json', 'method': 'GET', 'headers': {'Accept': 'application/json'}, 'data': None}, 'response': {'type': 'success', 'data': b'{"debug":" - nao encontrado via search_db cep unico - ","resultado":"0","resultado_txt":"sucesso - cep n\\u00e3o encontrado","uf":"","cidade":"","bairro":"","tipo_logradouro":"","logradouro":""}'}}, {'request': {'full_url': 'https://viacep.com.br/ws/01111110/json/unicode/', 'method': 'GET', 'headers': {}, 'data': None}, 'response': {'type': 'success', 'data': b'{\n "erro": true\n}'}}]
|
class Solution:
def reverseString(self, s: List[str]) -> None:
"""
Do not return anything, modify s in-place instead.
"""
l = 0
r = len(s)-1
while l<r:
s[l],s[r]=s[r],s[l]
l+=1
r-=1
|
class Solution:
def reverse_string(self, s: List[str]) -> None:
"""
Do not return anything, modify s in-place instead.
"""
l = 0
r = len(s) - 1
while l < r:
(s[l], s[r]) = (s[r], s[l])
l += 1
r -= 1
|
def check(params):
"Check input parameters"
attrs = []
for attr in attrs:
if attr not in params:
raise Exception('key {} not in {}'.format(attr, json.dumps(params)))
def execute(cur, stmt, bindings, verbose=None):
"Helper function to execute statement"
if verbose:
print(stmt)
print(bindings)
cur.execute(stmt, bindings)
rows = cur.fetchall()
for row in rows:
return row[0]
|
def check(params):
"""Check input parameters"""
attrs = []
for attr in attrs:
if attr not in params:
raise exception('key {} not in {}'.format(attr, json.dumps(params)))
def execute(cur, stmt, bindings, verbose=None):
"""Helper function to execute statement"""
if verbose:
print(stmt)
print(bindings)
cur.execute(stmt, bindings)
rows = cur.fetchall()
for row in rows:
return row[0]
|
class Solution:
def twoSum(self, numbers: List[int], target: int) -> List[int]:
left, right = 0, len(numbers) - 1
while left < right:
curSum = numbers[left] + numbers[right]
if curSum == target:
return[left + 1, right + 1]
if curSum > target:
right -= 1
else:
left += 1
return []
|
class Solution:
def two_sum(self, numbers: List[int], target: int) -> List[int]:
(left, right) = (0, len(numbers) - 1)
while left < right:
cur_sum = numbers[left] + numbers[right]
if curSum == target:
return [left + 1, right + 1]
if curSum > target:
right -= 1
else:
left += 1
return []
|
'''
A collection of optional backends. You must manually select and
install the backend you want. If the backend is not installed,
then trying to import the module for that backend will cause
an :class:`ImportError`.
See :ref:`Choose a hashing backend` for more.
'''
SUPPORTED_BACKENDS = [
'pycryptodomex', # prefer this over pysha3, for pypy3 support
'pysha3',
]
|
"""
A collection of optional backends. You must manually select and
install the backend you want. If the backend is not installed,
then trying to import the module for that backend will cause
an :class:`ImportError`.
See :ref:`Choose a hashing backend` for more.
"""
supported_backends = ['pycryptodomex', 'pysha3']
|
class linkedList(object):
"""
custom implementation of a linked list
We need a custom implementation because in the tableMethod class we need to refere
to individual items in the linked list to quickly remove and update them.
"""
first = None
last = None
lenght = 0
def __init__(self):
super(linkedList, self).__init__()
#define the __len__ function so we can call len() on the linked list
def __len__(self):
return self.lenght
def __repr__(self):
li = self.first
string = "linkedList["
while li != None:
string += str(li) + ", "
li = li.next
string +="]"
return string
#add data at the end of the linked list as last item
def append(self, data):
newItem = listItem(data, prev=self.last)
#if the list is empty, set the new listItem as first
if self.first is None:
self.first = newItem
#if this isnt the first item, set the next of the last item to the new list item
else:
self.last.next = newItem
#update the last item in the linked list to be the new listItem.
self.last = newItem
self.lenght += 1
def removeListItem(self, listItem):
"""
remove a given listItem from the linkedList
"""
#if its the first item update the first pointer
if(listItem.prev is None):
self.first = listItem.next
#if its the last item opdate the last pointer
if(listItem.next is None):
self.last = listItem.prev
#update the previous and next items of the listItem
listItem.remove()
self.lenght -= 1
class listItem(object):
"""Item in the linkedList"""
data = None
next = None
prev = None
def __init__(self, data, prev = None, next = None):
super(listItem, self).__init__()
self.data = data
self.prev = prev
self.next = next
#prints the listItem in a friendly format
def __repr__(self):
return "<listItem data: %s>" % (self.data)
def remove(self):
"""
update the previous and next list items so this one can be removed.
"""
if(not(self.prev is None)):
self.prev.next = self.next
if(not(self.next is None)):
self.next.prev = self.prev
|
class Linkedlist(object):
"""
custom implementation of a linked list
We need a custom implementation because in the tableMethod class we need to refere
to individual items in the linked list to quickly remove and update them.
"""
first = None
last = None
lenght = 0
def __init__(self):
super(linkedList, self).__init__()
def __len__(self):
return self.lenght
def __repr__(self):
li = self.first
string = 'linkedList['
while li != None:
string += str(li) + ', '
li = li.next
string += ']'
return string
def append(self, data):
new_item = list_item(data, prev=self.last)
if self.first is None:
self.first = newItem
else:
self.last.next = newItem
self.last = newItem
self.lenght += 1
def remove_list_item(self, listItem):
"""
remove a given listItem from the linkedList
"""
if listItem.prev is None:
self.first = listItem.next
if listItem.next is None:
self.last = listItem.prev
listItem.remove()
self.lenght -= 1
class Listitem(object):
"""Item in the linkedList"""
data = None
next = None
prev = None
def __init__(self, data, prev=None, next=None):
super(listItem, self).__init__()
self.data = data
self.prev = prev
self.next = next
def __repr__(self):
return '<listItem data: %s>' % self.data
def remove(self):
"""
update the previous and next list items so this one can be removed.
"""
if not self.prev is None:
self.prev.next = self.next
if not self.next is None:
self.next.prev = self.prev
|
"""
from sys import argv
script, input_file = argv
def print_all(f):
print f.read()
def rewind(f):
f.seek(0)
def print_a_line(line_count, f):
print line_count, f.readline()
print "line = %d " % line_count
current_file = open(input_file)
print "First let's print the whole file: "
print_all(current_file)
#print "line = %d " % line_count
print "Now let's rewind, kind of like a tape."
rewind(current_file)
#print "line = %d " % line_count
print "Now let's print three lines: "
current_line = 1
print_a_line(current_line, current_file)
#print "line = %d " % line_count
current_line = current_line + 1
print_a_line(current_line, current_file)
#print "line = %d " % line_count
current_line = current_line + 1
print_a_line(current_line, current_file)
#print "line = %d " % line_count
current_line = current_line + 1
print_a_line(current_line, current_file)
#print "line = %d " % line_count
"""
|
"""
from sys import argv
script, input_file = argv
def print_all(f):
print f.read()
def rewind(f):
f.seek(0)
def print_a_line(line_count, f):
print line_count, f.readline()
print "line = %d " % line_count
current_file = open(input_file)
print "First let's print the whole file: "
print_all(current_file)
#print "line = %d " % line_count
print "Now let's rewind, kind of like a tape."
rewind(current_file)
#print "line = %d " % line_count
print "Now let's print three lines: "
current_line = 1
print_a_line(current_line, current_file)
#print "line = %d " % line_count
current_line = current_line + 1
print_a_line(current_line, current_file)
#print "line = %d " % line_count
current_line = current_line + 1
print_a_line(current_line, current_file)
#print "line = %d " % line_count
current_line = current_line + 1
print_a_line(current_line, current_file)
#print "line = %d " % line_count
"""
|
class BSTIterator:
def __init__(self, root: Optional[TreeNode]):
self.stack = []
self.pushLeftsUntilNull_(root)
def next(self) -> int:
root = self.stack.pop()
self.pushLeftsUntilNull_(root.right)
return root.val
def hasNext(self) -> bool:
return self.stack
def pushLeftsUntilNull_(self, root: Optional[TreeNode]) -> None:
while root:
self.stack.append(root)
root = root.left
|
class Bstiterator:
def __init__(self, root: Optional[TreeNode]):
self.stack = []
self.pushLeftsUntilNull_(root)
def next(self) -> int:
root = self.stack.pop()
self.pushLeftsUntilNull_(root.right)
return root.val
def has_next(self) -> bool:
return self.stack
def push_lefts_until_null_(self, root: Optional[TreeNode]) -> None:
while root:
self.stack.append(root)
root = root.left
|
class Cache:
def __init__(self, function, limit=1000):
self.function = function
self.limit = limit
self.purge()
def get(self, key):
value = self.store.get(key)
if value is None:
value = self.function(key)
self.set(key, value)
return value
def set(self, key, value):
if self.size < self.limit:
self.size += 1
self.store[key] = value
return value
def purge(self):
self.size = 0
self.store = dict()
def __call__(self, key):
return self.get(key)
|
class Cache:
def __init__(self, function, limit=1000):
self.function = function
self.limit = limit
self.purge()
def get(self, key):
value = self.store.get(key)
if value is None:
value = self.function(key)
self.set(key, value)
return value
def set(self, key, value):
if self.size < self.limit:
self.size += 1
self.store[key] = value
return value
def purge(self):
self.size = 0
self.store = dict()
def __call__(self, key):
return self.get(key)
|
'''10. Write a Python program to use double quotes to display strings.'''
def double_quote_string(string):
ans = f"\"{string}\""
return ans
print(double_quote_string('This is working already'))
|
"""10. Write a Python program to use double quotes to display strings."""
def double_quote_string(string):
ans = f'"{string}"'
return ans
print(double_quote_string('This is working already'))
|
# noqa
class CustomSerializer:
"""Custom serializer implementation to test the injection of different serialization strategies to an input."""
@property
def extension(self) -> str: # noqa
return "ext"
def serialize(self, value: str) -> bytes: # noqa
return b"serialized"
def deserialize(self, serialized_value: bytes) -> str: # noqa
return "deserialized"
def __repr__(self) -> str: # noqa
return "CustomSerializerInstance"
|
class Customserializer:
"""Custom serializer implementation to test the injection of different serialization strategies to an input."""
@property
def extension(self) -> str:
return 'ext'
def serialize(self, value: str) -> bytes:
return b'serialized'
def deserialize(self, serialized_value: bytes) -> str:
return 'deserialized'
def __repr__(self) -> str:
return 'CustomSerializerInstance'
|
"""
.. module:: __init__
:synopsis: finvizfinance package general information
.. moduleauthor:: Tianning Li <ltianningli@gmail.com>
"""
__version__ = "0.10"
__author__ = "Tianning Li"
|
"""
.. module:: __init__
:synopsis: finvizfinance package general information
.. moduleauthor:: Tianning Li <ltianningli@gmail.com>
"""
__version__ = '0.10'
__author__ = 'Tianning Li'
|
# URI Online Judge 1176
N = 62
n1 = 0
n2 = 1
string = '0 1'
for i in range(N-2):
new = n1 + n2
string += (' ') + str(new)
n1 = n2
n2 = new
fib = [int(item) for item in string.split()]
T = -1
while (T<0) or (T>60):
T = int(input())
for t in range(T):
entrada = int(input())
print('Fib({}) = {}'.format(entrada, fib[entrada]))
|
n = 62
n1 = 0
n2 = 1
string = '0 1'
for i in range(N - 2):
new = n1 + n2
string += ' ' + str(new)
n1 = n2
n2 = new
fib = [int(item) for item in string.split()]
t = -1
while T < 0 or T > 60:
t = int(input())
for t in range(T):
entrada = int(input())
print('Fib({}) = {}'.format(entrada, fib[entrada]))
|
class Solution:
def mergeTwoLists(self, list1: Optional[ListNode], list2: Optional[ListNode]) -> Optional[ListNode]:
res = ListNode(None)
output = res
while list1 and list2:
if list1.val <= list2.val:
output.next = list1
list1 = list1.next
else:
output.next = list2
list2 = list2.next
output = output.next
if list1 == None:
output.next = list2
elif list2 == None:
output.next = list1
return res.next
|
class Solution:
def merge_two_lists(self, list1: Optional[ListNode], list2: Optional[ListNode]) -> Optional[ListNode]:
res = list_node(None)
output = res
while list1 and list2:
if list1.val <= list2.val:
output.next = list1
list1 = list1.next
else:
output.next = list2
list2 = list2.next
output = output.next
if list1 == None:
output.next = list2
elif list2 == None:
output.next = list1
return res.next
|
line = input().split('\\')
line_length = len(line) -1
splitted = line[line_length].split('.')
file_name = splitted[0]
ext = splitted[1]
print(f'File name: {file_name}')
print(f'File extension: {ext}')
|
line = input().split('\\')
line_length = len(line) - 1
splitted = line[line_length].split('.')
file_name = splitted[0]
ext = splitted[1]
print(f'File name: {file_name}')
print(f'File extension: {ext}')
|
#
# PySNMP MIB module Wellfleet-CCT-NAME-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/Wellfleet-CCT-NAME-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 21:32:56 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)
#
OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueSizeConstraint, ConstraintsUnion, ValueRangeConstraint, SingleValueConstraint, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "ConstraintsUnion", "ValueRangeConstraint", "SingleValueConstraint", "ConstraintsIntersection")
NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance")
Unsigned32, Counter32, ObjectIdentity, NotificationType, MibIdentifier, Integer32, Gauge32, IpAddress, ModuleIdentity, iso, MibScalar, MibTable, MibTableRow, MibTableColumn, Counter64, TimeTicks, Bits = mibBuilder.importSymbols("SNMPv2-SMI", "Unsigned32", "Counter32", "ObjectIdentity", "NotificationType", "MibIdentifier", "Integer32", "Gauge32", "IpAddress", "ModuleIdentity", "iso", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Counter64", "TimeTicks", "Bits")
DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention")
wfServices, wfCircuitNameExtension = mibBuilder.importSymbols("Wellfleet-COMMON-MIB", "wfServices", "wfCircuitNameExtension")
wfCircuitNameTable = MibTable((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 3), )
if mibBuilder.loadTexts: wfCircuitNameTable.setStatus('mandatory')
wfCircuitNameEntry = MibTableRow((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 3, 1), ).setIndexNames((0, "Wellfleet-CCT-NAME-MIB", "wfCircuitNumber"))
if mibBuilder.loadTexts: wfCircuitNameEntry.setStatus('mandatory')
wfCircuitNameDelete = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 3, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("create", 1), ("delete", 2))).clone('create')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfCircuitNameDelete.setStatus('mandatory')
wfCircuitNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 3, 1, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfCircuitNumber.setStatus('mandatory')
wfCircuitName = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 3, 1, 3), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfCircuitName.setStatus('mandatory')
wfCircuitIfType = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 3, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170))).clone(namedValues=NamedValues(("csmacd", 10), ("sync", 20), ("t1", 30), ("e1", 40), ("token", 50), ("fddi", 60), ("hssi", 70), ("mct1", 80), ("ds1e1", 90), ("none", 100), ("atm", 110), ("async", 120), ("isdn", 130), ("atmz", 140), ("bisync", 150), ("gre", 160), ("ds3e3", 170)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfCircuitIfType.setStatus('mandatory')
wfCircuitProtoMap = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 3, 1, 5), OctetString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfCircuitProtoMap.setStatus('mandatory')
wfCircuitType = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 3, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("normal", 1), ("virtual", 2), ("master", 3), ("clip", 4), ("internal", 5), ("gre", 6), ("notrouted", 7))).clone('normal')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfCircuitType.setStatus('mandatory')
wfCircuitRelCctList = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 3, 1, 7), OctetString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfCircuitRelCctList.setStatus('mandatory')
wfCircuitLineList = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 3, 1, 8), OctetString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfCircuitLineList.setStatus('mandatory')
wfCircuitMultilineName = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 3, 1, 9), DisplayString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfCircuitMultilineName.setStatus('mandatory')
wfCircuitTdmRes = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 3, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("notdmresources", 1), ("switchedh110", 2), ("routedh110", 3), ("cesh110", 4))).clone('notdmresources')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfCircuitTdmRes.setStatus('mandatory')
wfCircuitTdmCctInUse = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 3, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("notinuse", 1), ("inuse", 2))).clone('notinuse')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfCircuitTdmCctInUse.setStatus('mandatory')
wfLineMappingTable = MibTable((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 9, 1), )
if mibBuilder.loadTexts: wfLineMappingTable.setStatus('mandatory')
wfLineMappingEntry = MibTableRow((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 9, 1, 1), ).setIndexNames((0, "Wellfleet-CCT-NAME-MIB", "wfLineMappingNumber"))
if mibBuilder.loadTexts: wfLineMappingEntry.setStatus('mandatory')
wfLineMappingDelete = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 9, 1, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("created", 1), ("deleted", 2))).clone('created')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfLineMappingDelete.setStatus('mandatory')
wfLineMappingNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 9, 1, 1, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: wfLineMappingNumber.setStatus('mandatory')
wfLineMappingCct = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 9, 1, 1, 3), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfLineMappingCct.setStatus('mandatory')
wfLineMappingDef = MibTableColumn((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 9, 1, 1, 4), OctetString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfLineMappingDef.setStatus('mandatory')
wfNode = MibIdentifier((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 9, 2))
wfNodeDelete = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 9, 2, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("created", 1), ("deleted", 2))).clone('created')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfNodeDelete.setStatus('mandatory')
wfNodeProtoMap = MibScalar((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 9, 2, 2), OctetString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wfNodeProtoMap.setStatus('mandatory')
mibBuilder.exportSymbols("Wellfleet-CCT-NAME-MIB", wfLineMappingDef=wfLineMappingDef, wfCircuitProtoMap=wfCircuitProtoMap, wfCircuitTdmCctInUse=wfCircuitTdmCctInUse, wfLineMappingDelete=wfLineMappingDelete, wfCircuitLineList=wfCircuitLineList, wfCircuitNumber=wfCircuitNumber, wfCircuitType=wfCircuitType, wfNodeProtoMap=wfNodeProtoMap, wfLineMappingCct=wfLineMappingCct, wfNode=wfNode, wfCircuitNameEntry=wfCircuitNameEntry, wfCircuitName=wfCircuitName, wfCircuitNameTable=wfCircuitNameTable, wfCircuitIfType=wfCircuitIfType, wfLineMappingEntry=wfLineMappingEntry, wfCircuitRelCctList=wfCircuitRelCctList, wfLineMappingNumber=wfLineMappingNumber, wfCircuitMultilineName=wfCircuitMultilineName, wfCircuitNameDelete=wfCircuitNameDelete, wfNodeDelete=wfNodeDelete, wfCircuitTdmRes=wfCircuitTdmRes, wfLineMappingTable=wfLineMappingTable)
|
(octet_string, object_identifier, integer) = mibBuilder.importSymbols('ASN1', 'OctetString', 'ObjectIdentifier', 'Integer')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(value_size_constraint, constraints_union, value_range_constraint, single_value_constraint, constraints_intersection) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueSizeConstraint', 'ConstraintsUnion', 'ValueRangeConstraint', 'SingleValueConstraint', 'ConstraintsIntersection')
(notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance')
(unsigned32, counter32, object_identity, notification_type, mib_identifier, integer32, gauge32, ip_address, module_identity, iso, mib_scalar, mib_table, mib_table_row, mib_table_column, counter64, time_ticks, bits) = mibBuilder.importSymbols('SNMPv2-SMI', 'Unsigned32', 'Counter32', 'ObjectIdentity', 'NotificationType', 'MibIdentifier', 'Integer32', 'Gauge32', 'IpAddress', 'ModuleIdentity', 'iso', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Counter64', 'TimeTicks', 'Bits')
(display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention')
(wf_services, wf_circuit_name_extension) = mibBuilder.importSymbols('Wellfleet-COMMON-MIB', 'wfServices', 'wfCircuitNameExtension')
wf_circuit_name_table = mib_table((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 3))
if mibBuilder.loadTexts:
wfCircuitNameTable.setStatus('mandatory')
wf_circuit_name_entry = mib_table_row((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 3, 1)).setIndexNames((0, 'Wellfleet-CCT-NAME-MIB', 'wfCircuitNumber'))
if mibBuilder.loadTexts:
wfCircuitNameEntry.setStatus('mandatory')
wf_circuit_name_delete = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 3, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('create', 1), ('delete', 2))).clone('create')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wfCircuitNameDelete.setStatus('mandatory')
wf_circuit_number = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 3, 1, 2), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wfCircuitNumber.setStatus('mandatory')
wf_circuit_name = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 3, 1, 3), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wfCircuitName.setStatus('mandatory')
wf_circuit_if_type = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 3, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170))).clone(namedValues=named_values(('csmacd', 10), ('sync', 20), ('t1', 30), ('e1', 40), ('token', 50), ('fddi', 60), ('hssi', 70), ('mct1', 80), ('ds1e1', 90), ('none', 100), ('atm', 110), ('async', 120), ('isdn', 130), ('atmz', 140), ('bisync', 150), ('gre', 160), ('ds3e3', 170)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wfCircuitIfType.setStatus('mandatory')
wf_circuit_proto_map = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 3, 1, 5), octet_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wfCircuitProtoMap.setStatus('mandatory')
wf_circuit_type = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 3, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=named_values(('normal', 1), ('virtual', 2), ('master', 3), ('clip', 4), ('internal', 5), ('gre', 6), ('notrouted', 7))).clone('normal')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wfCircuitType.setStatus('mandatory')
wf_circuit_rel_cct_list = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 3, 1, 7), octet_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wfCircuitRelCctList.setStatus('mandatory')
wf_circuit_line_list = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 3, 1, 8), octet_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wfCircuitLineList.setStatus('mandatory')
wf_circuit_multiline_name = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 3, 1, 9), display_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wfCircuitMultilineName.setStatus('mandatory')
wf_circuit_tdm_res = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 3, 1, 10), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('notdmresources', 1), ('switchedh110', 2), ('routedh110', 3), ('cesh110', 4))).clone('notdmresources')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wfCircuitTdmRes.setStatus('mandatory')
wf_circuit_tdm_cct_in_use = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 3, 1, 11), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('notinuse', 1), ('inuse', 2))).clone('notinuse')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wfCircuitTdmCctInUse.setStatus('mandatory')
wf_line_mapping_table = mib_table((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 9, 1))
if mibBuilder.loadTexts:
wfLineMappingTable.setStatus('mandatory')
wf_line_mapping_entry = mib_table_row((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 9, 1, 1)).setIndexNames((0, 'Wellfleet-CCT-NAME-MIB', 'wfLineMappingNumber'))
if mibBuilder.loadTexts:
wfLineMappingEntry.setStatus('mandatory')
wf_line_mapping_delete = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 9, 1, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('created', 1), ('deleted', 2))).clone('created')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wfLineMappingDelete.setStatus('mandatory')
wf_line_mapping_number = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 9, 1, 1, 2), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wfLineMappingNumber.setStatus('mandatory')
wf_line_mapping_cct = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 9, 1, 1, 3), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wfLineMappingCct.setStatus('mandatory')
wf_line_mapping_def = mib_table_column((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 9, 1, 1, 4), octet_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wfLineMappingDef.setStatus('mandatory')
wf_node = mib_identifier((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 9, 2))
wf_node_delete = mib_scalar((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 9, 2, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('created', 1), ('deleted', 2))).clone('created')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wfNodeDelete.setStatus('mandatory')
wf_node_proto_map = mib_scalar((1, 3, 6, 1, 4, 1, 18, 3, 3, 2, 9, 2, 2), octet_string()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wfNodeProtoMap.setStatus('mandatory')
mibBuilder.exportSymbols('Wellfleet-CCT-NAME-MIB', wfLineMappingDef=wfLineMappingDef, wfCircuitProtoMap=wfCircuitProtoMap, wfCircuitTdmCctInUse=wfCircuitTdmCctInUse, wfLineMappingDelete=wfLineMappingDelete, wfCircuitLineList=wfCircuitLineList, wfCircuitNumber=wfCircuitNumber, wfCircuitType=wfCircuitType, wfNodeProtoMap=wfNodeProtoMap, wfLineMappingCct=wfLineMappingCct, wfNode=wfNode, wfCircuitNameEntry=wfCircuitNameEntry, wfCircuitName=wfCircuitName, wfCircuitNameTable=wfCircuitNameTable, wfCircuitIfType=wfCircuitIfType, wfLineMappingEntry=wfLineMappingEntry, wfCircuitRelCctList=wfCircuitRelCctList, wfLineMappingNumber=wfLineMappingNumber, wfCircuitMultilineName=wfCircuitMultilineName, wfCircuitNameDelete=wfCircuitNameDelete, wfNodeDelete=wfNodeDelete, wfCircuitTdmRes=wfCircuitTdmRes, wfLineMappingTable=wfLineMappingTable)
|
word_size = 9
num_words = 256
words_per_row = 4
local_array_size = 15
output_extended_config = True
output_datasheet_info = True
netlist_only = True
nominal_corner_only = True
|
word_size = 9
num_words = 256
words_per_row = 4
local_array_size = 15
output_extended_config = True
output_datasheet_info = True
netlist_only = True
nominal_corner_only = True
|
class Solution:
def twoSum(self, numbers: List[int], target: int) -> List[int]:
if len(numbers) <= 1:
return [None, None]
idx2 = len(numbers)-1
idx1 = 0
while idx1 < idx2:
if numbers[idx1] + numbers[idx2] == target:
return [idx1+1, idx2+1]
elif numbers[idx1] + numbers[idx2] <= target:
idx1 += 1
else:
idx2 -= 1
|
class Solution:
def two_sum(self, numbers: List[int], target: int) -> List[int]:
if len(numbers) <= 1:
return [None, None]
idx2 = len(numbers) - 1
idx1 = 0
while idx1 < idx2:
if numbers[idx1] + numbers[idx2] == target:
return [idx1 + 1, idx2 + 1]
elif numbers[idx1] + numbers[idx2] <= target:
idx1 += 1
else:
idx2 -= 1
|
class SumUpException(Exception):
pass
class SumUpNoAccessCode(SumUpException):
pass
class SumUpAccessCodeExpired(SumUpException):
pass
|
class Sumupexception(Exception):
pass
class Sumupnoaccesscode(SumUpException):
pass
class Sumupaccesscodeexpired(SumUpException):
pass
|
# flake8: noqa
test_train_config = {"training_parameters": {"EPOCHS": 50}}
test_model_config = {"model_parameters": {"model_save_path": "modeloutput1"}}
test_test_data = {
"text": "what Homeowners Warranty Program means,what it applies to, what is its purpose?"
}
test_entities = [
{"text": "homeowners warranty program", "entity": "Fin_Corp", "start": 5, "end": 32}
]
test_training_data = [
{
"context": "what does Settlement means?",
"entities": [
{
"entity_value": "Settlement",
"entity_type": "Fin_Corp",
"start_index": 10,
"end_index": 20,
}
],
},
{
"context": "what does Home-Equity Loan means?",
"entities": [
{
"entity_value": "Home-Equity Loan",
"entity_type": "Fin_Corp",
"start_index": 10,
"end_index": 26,
}
],
},
{
"context": "what does Closed-Ended Credit stands for?",
"entities": [
{
"entity_value": "Closed-Ended Credit",
"entity_type": "Fin_Corp",
"start_index": 10,
"end_index": 29,
}
],
},
{
"context": "what does Adjustable-Rate Mortgage stands for?",
"entities": [
{
"entity_value": "Adjustable-Rate Mortgage",
"entity_type": "Fin_Corp",
"start_index": 10,
"end_index": 34,
}
],
},
{
"context": "what is the full form of Interest Cap ?",
"entities": [
{
"entity_value": "Interest Cap",
"entity_type": "Fin_Corp",
"start_index": 25,
"end_index": 37,
}
],
},
{
"context": "what is the full form of Title Insurance Policy ?",
"entities": [
{
"entity_value": "Title Insurance Policy",
"entity_type": "Fin_Corp",
"start_index": 25,
"end_index": 47,
}
],
},
{
"context": "what actually Mortgage Banker is ?",
"entities": [
{
"entity_value": "Mortgage Banker",
"entity_type": "Fin_Corp",
"start_index": 14,
"end_index": 29,
}
],
},
{
"context": "what actually Appraisal is ?",
"entities": [
{
"entity_value": "Appraisal",
"entity_type": "Fin_Corp",
"start_index": 14,
"end_index": 23,
}
],
},
{
"context": "what do Prepaid Items mean, explain the details",
"entities": [
{
"entity_value": "Prepaid Items",
"entity_type": "Fin_Corp",
"start_index": 8,
"end_index": 21,
}
],
},
{
"context": "what do Principal mean, explain the details",
"entities": [
{
"entity_value": "Principal",
"entity_type": "Fin_Corp",
"start_index": 8,
"end_index": 17,
}
],
},
{
"context": "I'm sorry, I'm not familiar with the meaning of Buyers Agent . What does that mean?",
"entities": [
{
"entity_value": "Buyers Agent",
"entity_type": "Fin_Corp",
"start_index": 48,
"end_index": 60,
}
],
},
{
"context": "I'm sorry, I'm not familiar with the meaning of Payment Cap . What does that mean?",
"entities": [
{
"entity_value": "Payment Cap",
"entity_type": "Fin_Corp",
"start_index": 48,
"end_index": 59,
}
],
},
{
"context": "Hello, Can you expand Sellers Agent ?",
"entities": [
{
"entity_value": "Sellers Agent",
"entity_type": "Fin_Corp",
"start_index": 22,
"end_index": 35,
}
],
},
{
"context": "Hello, Can you expand Floor ?",
"entities": [
{
"entity_value": "Floor",
"entity_type": "Fin_Corp",
"start_index": 22,
"end_index": 27,
}
],
},
{
"context": "What is Default ?",
"entities": [
{
"entity_value": "Default",
"entity_type": "Fin_Corp",
"start_index": 8,
"end_index": 15,
}
],
},
{
"context": "What is Amortization ?",
"entities": [
{
"entity_value": "Amortization",
"entity_type": "Fin_Corp",
"start_index": 8,
"end_index": 20,
}
],
},
{
"context": "What does Annual Percentage Rate mean?",
"entities": [
{
"entity_value": "Annual Percentage Rate",
"entity_type": "Fin_Corp",
"start_index": 10,
"end_index": 32,
}
],
},
{
"context": "What does Site-Built Housing mean?",
"entities": [
{
"entity_value": "Site-Built Housing",
"entity_type": "Fin_Corp",
"start_index": 10,
"end_index": 28,
}
],
},
{
"context": "Can you define what Amortization stands for and what it means?",
"entities": [
{
"entity_value": "Amortization",
"entity_type": "Fin_Corp",
"start_index": 20,
"end_index": 32,
}
],
},
{
"context": "Can you define what Fixed Interest Rate stands for and what it means?",
"entities": [
{
"entity_value": "Fixed Interest Rate",
"entity_type": "Fin_Corp",
"start_index": 20,
"end_index": 39,
}
],
},
{
"context": "I was looking over loan application could you explain what is meant by Point ?",
"entities": [
{
"entity_value": "Point",
"entity_type": "Fin_Corp",
"start_index": 71,
"end_index": 76,
}
],
},
{
"context": "I was looking over loan application could you explain what is meant by Net Income ?",
"entities": [
{
"entity_value": "Net Income",
"entity_type": "Fin_Corp",
"start_index": 71,
"end_index": 81,
}
],
},
{
"context": "I dont know what Interest stands for could you explain it clearly to me please?",
"entities": [
{
"entity_value": "Interest",
"entity_type": "Fin_Corp",
"start_index": 17,
"end_index": 25,
}
],
},
{
"context": "I dont know what Multiple Listing Service stands for could you explain it clearly to me please?",
"entities": [
{
"entity_value": "Multiple Listing Service",
"entity_type": "Fin_Corp",
"start_index": 17,
"end_index": 41,
}
],
},
{
"context": "what Homeowners Warranty Program means",
"entities": [
{
"entity_value": "Homeowners Warranty Program",
"entity_type": "Fin_Corp",
"start_index": 5,
"end_index": 32,
}
],
},
{
"context": "what Condominium means",
"entities": [
{
"entity_value": "Condominium",
"entity_type": "Fin_Corp",
"start_index": 5,
"end_index": 16,
}
],
},
{
"context": "Why is knowing your Interest Cap important?",
"entities": [
{
"entity_value": "Interest Cap",
"entity_type": "Fin_Corp",
"start_index": 20,
"end_index": 32,
}
],
},
{
"context": "Why is knowing your Credit Bureau important?",
"entities": [
{
"entity_value": "Credit Bureau",
"entity_type": "Fin_Corp",
"start_index": 20,
"end_index": 33,
}
],
},
{
"context": "Please explain what you mean by Qualifying Ratios .",
"entities": [
{
"entity_value": "Qualifying Ratios",
"entity_type": "Fin_Corp",
"start_index": 32,
"end_index": 49,
}
],
},
{
"context": "Please explain what you mean by Closed-Ended Credit .",
"entities": [
{
"entity_value": "Closed-Ended Credit",
"entity_type": "Fin_Corp",
"start_index": 32,
"end_index": 51,
}
],
},
{
"context": "please explain what is VA Loan in detail.",
"entities": [
{
"entity_value": "VA Loan",
"entity_type": "Fin_Corp",
"start_index": 23,
"end_index": 30,
}
],
},
{
"context": "please explain what is Agent in detail.",
"entities": [
{
"entity_value": "Agent",
"entity_type": "Fin_Corp",
"start_index": 23,
"end_index": 28,
}
],
},
{
"context": "Could you please elaborate Lease-Purchase ?",
"entities": [
{
"entity_value": "Lease-Purchase",
"entity_type": "Fin_Corp",
"start_index": 27,
"end_index": 41,
}
],
},
{
"context": "Could you please elaborate Interest Rate ?",
"entities": [
{
"entity_value": "Interest Rate",
"entity_type": "Fin_Corp",
"start_index": 27,
"end_index": 40,
}
],
},
{
"context": "Can you explain Delinquency to me?",
"entities": [
{
"entity_value": "Delinquency",
"entity_type": "Fin_Corp",
"start_index": 16,
"end_index": 27,
}
],
},
{
"context": "Can you explain Balloon Mortgage to me?",
"entities": [
{
"entity_value": "Balloon Mortgage",
"entity_type": "Fin_Corp",
"start_index": 16,
"end_index": 32,
}
],
},
{
"context": "what does Prepaid Items really mean",
"entities": [
{
"entity_value": "Prepaid Items",
"entity_type": "Fin_Corp",
"start_index": 10,
"end_index": 23,
}
],
},
{
"context": "what does Loan-to-Value Ratio really mean",
"entities": [
{
"entity_value": "Loan-to-Value Ratio",
"entity_type": "Fin_Corp",
"start_index": 10,
"end_index": 29,
}
],
},
{
"context": "Can you explain to me,please,what Homeowners Warranty Program means,what it applies to,what is its purpose? Thank you",
"entities": [
{
"entity_value": "Homeowners Warranty Program",
"entity_type": "Fin_Corp",
"start_index": 34,
"end_index": 61,
}
],
},
{
"context": "Can you explain to me,please,what Balloon Mortgage means,what it applies to,what is its purpose? Thank you",
"entities": [
{
"entity_value": "Balloon Mortgage",
"entity_type": "Fin_Corp",
"start_index": 34,
"end_index": 50,
}
],
},
{
"context": "what's the meaning of Mortgagee and how can i use it?",
"entities": [
{
"entity_value": "Mortgagee",
"entity_type": "Fin_Corp",
"start_index": 22,
"end_index": 31,
}
],
},
{
"context": "what's the meaning of Prepayment Penalty and how can i use it?",
"entities": [
{
"entity_value": "Prepayment Penalty",
"entity_type": "Fin_Corp",
"start_index": 22,
"end_index": 40,
}
],
},
{
"context": "Ive not heard that before. What does Interest Cap mean?",
"entities": [
{
"entity_value": "Interest Cap",
"entity_type": "Fin_Corp",
"start_index": 37,
"end_index": 49,
}
],
},
{
"context": "Ive not heard that before. What does Lender mean?",
"entities": [
{
"entity_value": "Lender",
"entity_type": "Fin_Corp",
"start_index": 37,
"end_index": 43,
}
],
},
{
"context": "Can you elaborate on what Mortgage Banker is about?",
"entities": [
{
"entity_value": "Mortgage Banker",
"entity_type": "Fin_Corp",
"start_index": 26,
"end_index": 41,
}
],
},
{
"context": "Can you elaborate on what Assessment is about?",
"entities": [
{
"entity_value": "Assessment",
"entity_type": "Fin_Corp",
"start_index": 26,
"end_index": 36,
}
],
},
{
"context": "I've never heard of Due-on-Sale , can you explain it to me in an easy way for me to understand?",
"entities": [
{
"entity_value": "Due-on-Sale",
"entity_type": "Fin_Corp",
"start_index": 20,
"end_index": 31,
}
],
},
{
"context": "I've never heard of Trust , can you explain it to me in an easy way for me to understand?",
"entities": [
{
"entity_value": "Trust",
"entity_type": "Fin_Corp",
"start_index": 20,
"end_index": 25,
}
],
},
{
"context": "How does my Market Value effect me?",
"entities": [
{
"entity_value": "Market Value",
"entity_type": "Fin_Corp",
"start_index": 12,
"end_index": 24,
}
],
},
{
"context": "How does my Balloon Mortgage effect me?",
"entities": [
{
"entity_value": "Balloon Mortgage",
"entity_type": "Fin_Corp",
"start_index": 12,
"end_index": 28,
}
],
},
]
|
test_train_config = {'training_parameters': {'EPOCHS': 50}}
test_model_config = {'model_parameters': {'model_save_path': 'modeloutput1'}}
test_test_data = {'text': 'what Homeowners Warranty Program means,what it applies to, what is its purpose?'}
test_entities = [{'text': 'homeowners warranty program', 'entity': 'Fin_Corp', 'start': 5, 'end': 32}]
test_training_data = [{'context': 'what does Settlement means?', 'entities': [{'entity_value': 'Settlement', 'entity_type': 'Fin_Corp', 'start_index': 10, 'end_index': 20}]}, {'context': 'what does Home-Equity Loan means?', 'entities': [{'entity_value': 'Home-Equity Loan', 'entity_type': 'Fin_Corp', 'start_index': 10, 'end_index': 26}]}, {'context': 'what does Closed-Ended Credit stands for?', 'entities': [{'entity_value': 'Closed-Ended Credit', 'entity_type': 'Fin_Corp', 'start_index': 10, 'end_index': 29}]}, {'context': 'what does Adjustable-Rate Mortgage stands for?', 'entities': [{'entity_value': 'Adjustable-Rate Mortgage', 'entity_type': 'Fin_Corp', 'start_index': 10, 'end_index': 34}]}, {'context': 'what is the full form of Interest Cap ?', 'entities': [{'entity_value': 'Interest Cap', 'entity_type': 'Fin_Corp', 'start_index': 25, 'end_index': 37}]}, {'context': 'what is the full form of Title Insurance Policy ?', 'entities': [{'entity_value': 'Title Insurance Policy', 'entity_type': 'Fin_Corp', 'start_index': 25, 'end_index': 47}]}, {'context': 'what actually Mortgage Banker is ?', 'entities': [{'entity_value': 'Mortgage Banker', 'entity_type': 'Fin_Corp', 'start_index': 14, 'end_index': 29}]}, {'context': 'what actually Appraisal is ?', 'entities': [{'entity_value': 'Appraisal', 'entity_type': 'Fin_Corp', 'start_index': 14, 'end_index': 23}]}, {'context': 'what do Prepaid Items mean, explain the details', 'entities': [{'entity_value': 'Prepaid Items', 'entity_type': 'Fin_Corp', 'start_index': 8, 'end_index': 21}]}, {'context': 'what do Principal mean, explain the details', 'entities': [{'entity_value': 'Principal', 'entity_type': 'Fin_Corp', 'start_index': 8, 'end_index': 17}]}, {'context': "I'm sorry, I'm not familiar with the meaning of Buyers Agent . What does that mean?", 'entities': [{'entity_value': 'Buyers Agent', 'entity_type': 'Fin_Corp', 'start_index': 48, 'end_index': 60}]}, {'context': "I'm sorry, I'm not familiar with the meaning of Payment Cap . What does that mean?", 'entities': [{'entity_value': 'Payment Cap', 'entity_type': 'Fin_Corp', 'start_index': 48, 'end_index': 59}]}, {'context': 'Hello, Can you expand Sellers Agent ?', 'entities': [{'entity_value': 'Sellers Agent', 'entity_type': 'Fin_Corp', 'start_index': 22, 'end_index': 35}]}, {'context': 'Hello, Can you expand Floor ?', 'entities': [{'entity_value': 'Floor', 'entity_type': 'Fin_Corp', 'start_index': 22, 'end_index': 27}]}, {'context': 'What is Default ?', 'entities': [{'entity_value': 'Default', 'entity_type': 'Fin_Corp', 'start_index': 8, 'end_index': 15}]}, {'context': 'What is Amortization ?', 'entities': [{'entity_value': 'Amortization', 'entity_type': 'Fin_Corp', 'start_index': 8, 'end_index': 20}]}, {'context': 'What does Annual Percentage Rate mean?', 'entities': [{'entity_value': 'Annual Percentage Rate', 'entity_type': 'Fin_Corp', 'start_index': 10, 'end_index': 32}]}, {'context': 'What does Site-Built Housing mean?', 'entities': [{'entity_value': 'Site-Built Housing', 'entity_type': 'Fin_Corp', 'start_index': 10, 'end_index': 28}]}, {'context': 'Can you define what Amortization stands for and what it means?', 'entities': [{'entity_value': 'Amortization', 'entity_type': 'Fin_Corp', 'start_index': 20, 'end_index': 32}]}, {'context': 'Can you define what Fixed Interest Rate stands for and what it means?', 'entities': [{'entity_value': 'Fixed Interest Rate', 'entity_type': 'Fin_Corp', 'start_index': 20, 'end_index': 39}]}, {'context': 'I was looking over loan application could you explain what is meant by Point ?', 'entities': [{'entity_value': 'Point', 'entity_type': 'Fin_Corp', 'start_index': 71, 'end_index': 76}]}, {'context': 'I was looking over loan application could you explain what is meant by Net Income ?', 'entities': [{'entity_value': 'Net Income', 'entity_type': 'Fin_Corp', 'start_index': 71, 'end_index': 81}]}, {'context': 'I dont know what Interest stands for could you explain it clearly to me please?', 'entities': [{'entity_value': 'Interest', 'entity_type': 'Fin_Corp', 'start_index': 17, 'end_index': 25}]}, {'context': 'I dont know what Multiple Listing Service stands for could you explain it clearly to me please?', 'entities': [{'entity_value': 'Multiple Listing Service', 'entity_type': 'Fin_Corp', 'start_index': 17, 'end_index': 41}]}, {'context': 'what Homeowners Warranty Program means', 'entities': [{'entity_value': 'Homeowners Warranty Program', 'entity_type': 'Fin_Corp', 'start_index': 5, 'end_index': 32}]}, {'context': 'what Condominium means', 'entities': [{'entity_value': 'Condominium', 'entity_type': 'Fin_Corp', 'start_index': 5, 'end_index': 16}]}, {'context': 'Why is knowing your Interest Cap important?', 'entities': [{'entity_value': 'Interest Cap', 'entity_type': 'Fin_Corp', 'start_index': 20, 'end_index': 32}]}, {'context': 'Why is knowing your Credit Bureau important?', 'entities': [{'entity_value': 'Credit Bureau', 'entity_type': 'Fin_Corp', 'start_index': 20, 'end_index': 33}]}, {'context': 'Please explain what you mean by Qualifying Ratios .', 'entities': [{'entity_value': 'Qualifying Ratios', 'entity_type': 'Fin_Corp', 'start_index': 32, 'end_index': 49}]}, {'context': 'Please explain what you mean by Closed-Ended Credit .', 'entities': [{'entity_value': 'Closed-Ended Credit', 'entity_type': 'Fin_Corp', 'start_index': 32, 'end_index': 51}]}, {'context': 'please explain what is VA Loan in detail.', 'entities': [{'entity_value': 'VA Loan', 'entity_type': 'Fin_Corp', 'start_index': 23, 'end_index': 30}]}, {'context': 'please explain what is Agent in detail.', 'entities': [{'entity_value': 'Agent', 'entity_type': 'Fin_Corp', 'start_index': 23, 'end_index': 28}]}, {'context': 'Could you please elaborate Lease-Purchase ?', 'entities': [{'entity_value': 'Lease-Purchase', 'entity_type': 'Fin_Corp', 'start_index': 27, 'end_index': 41}]}, {'context': 'Could you please elaborate Interest Rate ?', 'entities': [{'entity_value': 'Interest Rate', 'entity_type': 'Fin_Corp', 'start_index': 27, 'end_index': 40}]}, {'context': 'Can you explain Delinquency to me?', 'entities': [{'entity_value': 'Delinquency', 'entity_type': 'Fin_Corp', 'start_index': 16, 'end_index': 27}]}, {'context': 'Can you explain Balloon Mortgage to me?', 'entities': [{'entity_value': 'Balloon Mortgage', 'entity_type': 'Fin_Corp', 'start_index': 16, 'end_index': 32}]}, {'context': 'what does Prepaid Items really mean', 'entities': [{'entity_value': 'Prepaid Items', 'entity_type': 'Fin_Corp', 'start_index': 10, 'end_index': 23}]}, {'context': 'what does Loan-to-Value Ratio really mean', 'entities': [{'entity_value': 'Loan-to-Value Ratio', 'entity_type': 'Fin_Corp', 'start_index': 10, 'end_index': 29}]}, {'context': 'Can you explain to me,please,what Homeowners Warranty Program means,what it applies to,what is its purpose? Thank you', 'entities': [{'entity_value': 'Homeowners Warranty Program', 'entity_type': 'Fin_Corp', 'start_index': 34, 'end_index': 61}]}, {'context': 'Can you explain to me,please,what Balloon Mortgage means,what it applies to,what is its purpose? Thank you', 'entities': [{'entity_value': 'Balloon Mortgage', 'entity_type': 'Fin_Corp', 'start_index': 34, 'end_index': 50}]}, {'context': "what's the meaning of Mortgagee and how can i use it?", 'entities': [{'entity_value': 'Mortgagee', 'entity_type': 'Fin_Corp', 'start_index': 22, 'end_index': 31}]}, {'context': "what's the meaning of Prepayment Penalty and how can i use it?", 'entities': [{'entity_value': 'Prepayment Penalty', 'entity_type': 'Fin_Corp', 'start_index': 22, 'end_index': 40}]}, {'context': 'Ive not heard that before. What does Interest Cap mean?', 'entities': [{'entity_value': 'Interest Cap', 'entity_type': 'Fin_Corp', 'start_index': 37, 'end_index': 49}]}, {'context': 'Ive not heard that before. What does Lender mean?', 'entities': [{'entity_value': 'Lender', 'entity_type': 'Fin_Corp', 'start_index': 37, 'end_index': 43}]}, {'context': 'Can you elaborate on what Mortgage Banker is about?', 'entities': [{'entity_value': 'Mortgage Banker', 'entity_type': 'Fin_Corp', 'start_index': 26, 'end_index': 41}]}, {'context': 'Can you elaborate on what Assessment is about?', 'entities': [{'entity_value': 'Assessment', 'entity_type': 'Fin_Corp', 'start_index': 26, 'end_index': 36}]}, {'context': "I've never heard of Due-on-Sale , can you explain it to me in an easy way for me to understand?", 'entities': [{'entity_value': 'Due-on-Sale', 'entity_type': 'Fin_Corp', 'start_index': 20, 'end_index': 31}]}, {'context': "I've never heard of Trust , can you explain it to me in an easy way for me to understand?", 'entities': [{'entity_value': 'Trust', 'entity_type': 'Fin_Corp', 'start_index': 20, 'end_index': 25}]}, {'context': 'How does my Market Value effect me?', 'entities': [{'entity_value': 'Market Value', 'entity_type': 'Fin_Corp', 'start_index': 12, 'end_index': 24}]}, {'context': 'How does my Balloon Mortgage effect me?', 'entities': [{'entity_value': 'Balloon Mortgage', 'entity_type': 'Fin_Corp', 'start_index': 12, 'end_index': 28}]}]
|
# -*- coding: utf-8 -*-
"""Modulo helpers.url"""
def split_query_string(items):
"""dividir un query string"""
params = {'filter': {}, 'fields': [], 'pagination': {}, 'sort': {}, 'filter_in': {}}
for key, value in items:
sub_keys = key.split('.')
if 'fields' in sub_keys:
params['fields'] = [value] if isinstance(value, str) else value
elif sub_keys[0] in params:
params[sub_keys[0]].update({sub_keys[1]: value})
params['filter_in'] = get_filter_in(params['filter'])
params['sort'] = \
', '.join("{0} {1}".format(key, val.upper()) for (key, val) in params['sort'].items())
if params['pagination']:
params['pagination']['page'] = \
int(params['pagination']['page']) if 'page' in params['pagination'] else 1
params['pagination']['limit'] = \
int(params['pagination']['limit']) if 'limit' in params['pagination'] else 100
params['pagination'].update({
'offset':
(params['pagination']['page'] * \
params['pagination']['limit']) - \
params['pagination']['limit']
})
return params
def join_query_string():
"""Unir parametros en query string"""
pass
def get_filter_in(filters):
"""Recuperar filtros de una lista"""
filter_in = {}
for filter_index, value in list(filters.items()):
if isinstance(value, list):
filter_in.update({filter_index: value})
del filters[filter_index]
return filter_in
|
"""Modulo helpers.url"""
def split_query_string(items):
"""dividir un query string"""
params = {'filter': {}, 'fields': [], 'pagination': {}, 'sort': {}, 'filter_in': {}}
for (key, value) in items:
sub_keys = key.split('.')
if 'fields' in sub_keys:
params['fields'] = [value] if isinstance(value, str) else value
elif sub_keys[0] in params:
params[sub_keys[0]].update({sub_keys[1]: value})
params['filter_in'] = get_filter_in(params['filter'])
params['sort'] = ', '.join(('{0} {1}'.format(key, val.upper()) for (key, val) in params['sort'].items()))
if params['pagination']:
params['pagination']['page'] = int(params['pagination']['page']) if 'page' in params['pagination'] else 1
params['pagination']['limit'] = int(params['pagination']['limit']) if 'limit' in params['pagination'] else 100
params['pagination'].update({'offset': params['pagination']['page'] * params['pagination']['limit'] - params['pagination']['limit']})
return params
def join_query_string():
"""Unir parametros en query string"""
pass
def get_filter_in(filters):
"""Recuperar filtros de una lista"""
filter_in = {}
for (filter_index, value) in list(filters.items()):
if isinstance(value, list):
filter_in.update({filter_index: value})
del filters[filter_index]
return filter_in
|
def entrance():
'''This is the initial room the player will begin their adventure.'''
pass
def orange_rm_1():
'''Todo:
red key(hidden in desk drawer)
health(desk top)
desk
rat (24% damage)
red door
'''
pass
def red_rm_2():
'''locked entrance- requires red key
to do:
skull of meatboy (20 questions)
bamboo (blowgun)
desk
dr. fetus (1% dmg atk, runs away after attack. mentions hidden passage)
'''
pass
def blue_rm_1():
'''to do list:
book case (hidden passage)
health (25%)
shield (50% damage decrease)
'''
pass
def blue_rm_2():
'''to do list:
axe for boss fight
red key (bowl)
locked orange door (to main boss)
'''
pass
def red_rm_1():
'''to do list:
door into room is locked (orange key hidden in red_rm_1)
note from file
dart
bread (inv - must use)
'''
pass
def red_rm_3():
'''to do list:
stick (weapon)
health (25%)
'''
pass
def red_rm_4():
'''banquet hall
table
food (invokes rat to attack if eaten/taken)
rat (24% dmg atk)
chair
'''
pass
def giant_toddler():
'''nursery atmosphere
to do:
giant toddler
rattle
boss room key
'''
pass
def watermelon_rex():
'''den of whoever runs this mad house
pink key
health
animal heads on walls (interactive - one head breaks upon engaging boss)
watermelon_rex
fire place
giant mahogany desk
'''
pass
|
def entrance():
"""This is the initial room the player will begin their adventure."""
pass
def orange_rm_1():
"""Todo:
red key(hidden in desk drawer)
health(desk top)
desk
rat (24% damage)
red door
"""
pass
def red_rm_2():
"""locked entrance- requires red key
to do:
skull of meatboy (20 questions)
bamboo (blowgun)
desk
dr. fetus (1% dmg atk, runs away after attack. mentions hidden passage)
"""
pass
def blue_rm_1():
"""to do list:
book case (hidden passage)
health (25%)
shield (50% damage decrease)
"""
pass
def blue_rm_2():
"""to do list:
axe for boss fight
red key (bowl)
locked orange door (to main boss)
"""
pass
def red_rm_1():
"""to do list:
door into room is locked (orange key hidden in red_rm_1)
note from file
dart
bread (inv - must use)
"""
pass
def red_rm_3():
"""to do list:
stick (weapon)
health (25%)
"""
pass
def red_rm_4():
"""banquet hall
table
food (invokes rat to attack if eaten/taken)
rat (24% dmg atk)
chair
"""
pass
def giant_toddler():
"""nursery atmosphere
to do:
giant toddler
rattle
boss room key
"""
pass
def watermelon_rex():
"""den of whoever runs this mad house
pink key
health
animal heads on walls (interactive - one head breaks upon engaging boss)
watermelon_rex
fire place
giant mahogany desk
"""
pass
|
def main(request, response):
headers = [("Content-Type", "text/javascript")]
milk = request.cookies.first("milk", None)
if milk is None:
return headers, "var included = false;"
elif milk.value == "yes":
return headers, "var included = true;"
return headers, "var included = false;"
|
def main(request, response):
headers = [('Content-Type', 'text/javascript')]
milk = request.cookies.first('milk', None)
if milk is None:
return (headers, 'var included = false;')
elif milk.value == 'yes':
return (headers, 'var included = true;')
return (headers, 'var included = false;')
|
"""
Tema: Algoritmo de aproximacion.
Curso: Pensamiento computacional.
Plataforma: Platzi.
Profesor: David Aroesti.
Alumno: @edinsonrequena.
"""
objetivo = int(input('Escoge un numero: '))
epsilon = 0.0001
paso = epsilon**2
respuesta = 0.0
while abs(respuesta**2 - objetivo) >= epsilon and respuesta <= objetivo:
print(abs(respuesta**2 - objetivo), respuesta)
respuesta += paso
if abs(respuesta**2 - objetivo) >= epsilon:
print(f'No se encontro la raiz cuadrada {objetivo}')
else:
print(f'La raiz cudrada de {objetivo} es {respuesta}')
|
"""
Tema: Algoritmo de aproximacion.
Curso: Pensamiento computacional.
Plataforma: Platzi.
Profesor: David Aroesti.
Alumno: @edinsonrequena.
"""
objetivo = int(input('Escoge un numero: '))
epsilon = 0.0001
paso = epsilon ** 2
respuesta = 0.0
while abs(respuesta ** 2 - objetivo) >= epsilon and respuesta <= objetivo:
print(abs(respuesta ** 2 - objetivo), respuesta)
respuesta += paso
if abs(respuesta ** 2 - objetivo) >= epsilon:
print(f'No se encontro la raiz cuadrada {objetivo}')
else:
print(f'La raiz cudrada de {objetivo} es {respuesta}')
|
#!/usr/bin/python3.8
def nics_menu():
FILENAME = "nics.yaml"
SWITCHES = "-n/--nics"
DESCRIPTION = "YAML file that contains the configuration for the interfaces to use"
REQUIRED = "always"
TEMPLATE = """nics: # number of nics needs to equal to 2
"""
NIC_TEMPLATE = """ - name: "{}" # name of the interface
subnet: "{}" # IPv4 subnet in CIDR notation
subnet_v6: "{}" # IPv6 subnet in CIDR notation
gateway: "{}" # default IPv4 gateway
gateway_v6: "{}" # default IPv6 gateway
last_bytes_v6: 0x{} # last bytes of the random ip addresses used ; Needs to match at least the last 3 bytes of an IPv6 address assigned to this interface (only if promiscuous mode is not enabled, otherwise this can be whatever)
"""
print("Switches: " + SWITCHES)
print("Description: " + DESCRIPTION)
print("Required when: " + REQUIRED)
filename = input("filename? (default='{}'): ".format(FILENAME))
if not filename:
filename = FILENAME
config_content = TEMPLATE
for i in range(2):
name = input("nic #{} interface name?: ".format(i+1))
subnetv4 = input("nic #{} ipv4 subnet? (10.2.3.4/16): ".format(i+1))
subnetv6 = input("nic #{} ipv6 subnet? (fe80::aaaa:bbbb/64): ".format(i+1))
gatewayv4 = input("nic #{} ipv4 gateway? (10.2.3.4): ".format(i+1))
gatewayv6 = input("nic #{} ipv6 gateway? (fe80::aaaa:bbbb): ".format(i+1))
prom_mode = input("does the network for nic #{} support promiscuous mode? (Y/N): ".format(i+1))
last6 = ""
if prom_mode == "N":
last6 = input("last 3 bytes of an IPv6 address assigned to nic #{}? (dead12): ".format(i + 1))
else:
last6 = "000000"
nici = NIC_TEMPLATE.format(name, subnetv4, subnetv6, gatewayv4, gatewayv6, last6)
config_content += nici
with open(filename, "w") as f:
f.write(config_content)
print("[+] saved {}".format(filename))
def blacklist_menu():
FILENAME = "blacklist.yaml"
SWITCHES = "-b/--blacklist"
DESCRIPTION = "YAML file that contains other hosts on the network to blacklist (excludes gateways)"
REQUIRED = "--ccm FiveTuple is not specified. Note that if there is UDP/TCP proxy inline --ccm FiveTuple MUST NOT be specified when a connection's 5-tuples differ on either side of the proxy"
print("Switches: " + SWITCHES)
print("Description: " + DESCRIPTION)
print("Required when: " + REQUIRED)
filename = input("filename? (default='{}'): ".format(FILENAME))
if not filename:
filename = FILENAME
config_content = "--\n"
print("Enter mac addresses to blacklist. Don't enter the address of the gateway(s)")
print("Enter '0' to stop")
config_content += "mac:\n"
while True:
addr = input("mac address? (00:50:56:aa:bb:cc): ")
if addr == '0':
break
if addr == '':
continue
config_content += ' - "{}"\n'.format(addr)
print("Enter IPv4 addresses to blacklist. Don't enter the address(es) of the gateway(s)")
print("Enter '0' to stop")
config_content += "ipv4:\n"
while True:
addr = input("ipv4 address? (10.2.3.4): ")
if addr == '0':
break
if addr == '':
continue
config_content += ' - "{}"\n'.format(addr)
print("Enter IPv6 addresses to blacklist. Don't enter the address(es) of the gateway(s)")
print("Enter '0' to stop")
config_content += "ipv6:\n"
while True:
addr = input("ipv6 address? (fe80::aaaa:bbbb): ")
if addr == '0':
break
if addr == '':
continue
config_content += ' - "{}"\n'.format(addr)
with open(filename, "w") as f:
f.write(config_content)
print("[+] saved {}".format(filename))
def modes_menu():
FILENAME = "modes.csv"
SWITCHES = "-m/--modes"
DESCRIPTION = "CSV file that contains mode exceptions (min & max) on a per pcap basis"
REQUIRED = "a pcap should be replayed in a mode that differs from the mode specified with -dm/--dmode"
print("Switches: " + SWITCHES)
print("Description: " + DESCRIPTION)
print("Required when: " + REQUIRED)
filename = input("filename? (default='{}'): ".format(FILENAME))
if not filename:
filename = FILENAME
config_content = ""
while True:
pcap_name = input("pcap_name? (example.pcap): ")
min_mode = input("min mode? (L3/L4/L5): ")
max_mode = input("max mode? (L3/L4/L5): ")
entry = ",".join([pcap_name, min_mode, max_mode])
config_content += entry + "\n"
more_exceptions = input("Any more exceptions? (Y/N): ")
if more_exceptions == "N":
break
with open(filename, "w") as f:
f.write(config_content)
print("[+] saved {}".format(filename))
def main_menu():
print("Main Menu:")
print("1. nics file (-n/--nics)")
print("2. blacklist file (-b/--blacklist)")
print("3. modes file (-m/--modes)")
choice = input("Please make a choice: ")
if choice == "1":
nics_menu()
elif choice == "2":
blacklist_menu()
elif choice == "3":
modes_menu()
main_menu()
if __name__ == '__main__':
main_menu()
|
def nics_menu():
filename = 'nics.yaml'
switches = '-n/--nics'
description = 'YAML file that contains the configuration for the interfaces to use'
required = 'always'
template = 'nics: # number of nics needs to equal to 2\n'
nic_template = ' - name: "{}" # name of the interface\n subnet: "{}" # IPv4 subnet in CIDR notation\n subnet_v6: "{}" # IPv6 subnet in CIDR notation\n gateway: "{}" # default IPv4 gateway\n gateway_v6: "{}" # default IPv6 gateway\n last_bytes_v6: 0x{} # last bytes of the random ip addresses used ; Needs to match at least the last 3 bytes of an IPv6 address assigned to this interface (only if promiscuous mode is not enabled, otherwise this can be whatever) \n'
print('Switches: ' + SWITCHES)
print('Description: ' + DESCRIPTION)
print('Required when: ' + REQUIRED)
filename = input("filename? (default='{}'): ".format(FILENAME))
if not filename:
filename = FILENAME
config_content = TEMPLATE
for i in range(2):
name = input('nic #{} interface name?: '.format(i + 1))
subnetv4 = input('nic #{} ipv4 subnet? (10.2.3.4/16): '.format(i + 1))
subnetv6 = input('nic #{} ipv6 subnet? (fe80::aaaa:bbbb/64): '.format(i + 1))
gatewayv4 = input('nic #{} ipv4 gateway? (10.2.3.4): '.format(i + 1))
gatewayv6 = input('nic #{} ipv6 gateway? (fe80::aaaa:bbbb): '.format(i + 1))
prom_mode = input('does the network for nic #{} support promiscuous mode? (Y/N): '.format(i + 1))
last6 = ''
if prom_mode == 'N':
last6 = input('last 3 bytes of an IPv6 address assigned to nic #{}? (dead12): '.format(i + 1))
else:
last6 = '000000'
nici = NIC_TEMPLATE.format(name, subnetv4, subnetv6, gatewayv4, gatewayv6, last6)
config_content += nici
with open(filename, 'w') as f:
f.write(config_content)
print('[+] saved {}'.format(filename))
def blacklist_menu():
filename = 'blacklist.yaml'
switches = '-b/--blacklist'
description = 'YAML file that contains other hosts on the network to blacklist (excludes gateways)'
required = "--ccm FiveTuple is not specified. Note that if there is UDP/TCP proxy inline --ccm FiveTuple MUST NOT be specified when a connection's 5-tuples differ on either side of the proxy"
print('Switches: ' + SWITCHES)
print('Description: ' + DESCRIPTION)
print('Required when: ' + REQUIRED)
filename = input("filename? (default='{}'): ".format(FILENAME))
if not filename:
filename = FILENAME
config_content = '--\n'
print("Enter mac addresses to blacklist. Don't enter the address of the gateway(s)")
print("Enter '0' to stop")
config_content += 'mac:\n'
while True:
addr = input('mac address? (00:50:56:aa:bb:cc): ')
if addr == '0':
break
if addr == '':
continue
config_content += ' - "{}"\n'.format(addr)
print("Enter IPv4 addresses to blacklist. Don't enter the address(es) of the gateway(s)")
print("Enter '0' to stop")
config_content += 'ipv4:\n'
while True:
addr = input('ipv4 address? (10.2.3.4): ')
if addr == '0':
break
if addr == '':
continue
config_content += ' - "{}"\n'.format(addr)
print("Enter IPv6 addresses to blacklist. Don't enter the address(es) of the gateway(s)")
print("Enter '0' to stop")
config_content += 'ipv6:\n'
while True:
addr = input('ipv6 address? (fe80::aaaa:bbbb): ')
if addr == '0':
break
if addr == '':
continue
config_content += ' - "{}"\n'.format(addr)
with open(filename, 'w') as f:
f.write(config_content)
print('[+] saved {}'.format(filename))
def modes_menu():
filename = 'modes.csv'
switches = '-m/--modes'
description = 'CSV file that contains mode exceptions (min & max) on a per pcap basis'
required = 'a pcap should be replayed in a mode that differs from the mode specified with -dm/--dmode'
print('Switches: ' + SWITCHES)
print('Description: ' + DESCRIPTION)
print('Required when: ' + REQUIRED)
filename = input("filename? (default='{}'): ".format(FILENAME))
if not filename:
filename = FILENAME
config_content = ''
while True:
pcap_name = input('pcap_name? (example.pcap): ')
min_mode = input('min mode? (L3/L4/L5): ')
max_mode = input('max mode? (L3/L4/L5): ')
entry = ','.join([pcap_name, min_mode, max_mode])
config_content += entry + '\n'
more_exceptions = input('Any more exceptions? (Y/N): ')
if more_exceptions == 'N':
break
with open(filename, 'w') as f:
f.write(config_content)
print('[+] saved {}'.format(filename))
def main_menu():
print('Main Menu:')
print('1. nics file (-n/--nics)')
print('2. blacklist file (-b/--blacklist)')
print('3. modes file (-m/--modes)')
choice = input('Please make a choice: ')
if choice == '1':
nics_menu()
elif choice == '2':
blacklist_menu()
elif choice == '3':
modes_menu()
main_menu()
if __name__ == '__main__':
main_menu()
|
"""Amazon Product Advertising API wrapper for Python"""
__version__ = '3.2.0'
__author__ = 'Sergio Abad'
|
"""Amazon Product Advertising API wrapper for Python"""
__version__ = '3.2.0'
__author__ = 'Sergio Abad'
|
"""
My first Python script
- this is a multiline comment
"""
# My second comment
'''
This is also a multiline comment
'''
statement = 0
if statement !=False:
print(4)
counter = 1000
count = 0
sum = 0
while count < counter:
if count%3 ==0:
sum = sum+count
elif count%5 ==0:
sum = sum+count
count = count +1
print(sum)
|
"""
My first Python script
- this is a multiline comment
"""
'\nThis is also a multiline comment\n'
statement = 0
if statement != False:
print(4)
counter = 1000
count = 0
sum = 0
while count < counter:
if count % 3 == 0:
sum = sum + count
elif count % 5 == 0:
sum = sum + count
count = count + 1
print(sum)
|
CORRECT_PIN = "1234"
MAX_TRIES = 3
tries_left = MAX_TRIES
pin = input(f"Insert your pni ({tries_left} tries left): ")
while tries_left > 1 and pin != CORRECT_PIN:
tries_left -= 1
print("Your PIN is incorrect.")
pin = input(f"Insert your pni ({tries_left} tries left): ")
if pin == CORRECT_PIN:
print("Your PIN is correct")
else:
print("Your bank card is blocked")
|
correct_pin = '1234'
max_tries = 3
tries_left = MAX_TRIES
pin = input(f'Insert your pni ({tries_left} tries left): ')
while tries_left > 1 and pin != CORRECT_PIN:
tries_left -= 1
print('Your PIN is incorrect.')
pin = input(f'Insert your pni ({tries_left} tries left): ')
if pin == CORRECT_PIN:
print('Your PIN is correct')
else:
print('Your bank card is blocked')
|
#
# Solution to Project Euler problem 73
# Copyright (c) Project Nayuki. All rights reserved.
#
# https://www.nayuki.io/page/project-euler-solutions
# https://github.com/nayuki/Project-Euler-solutions
#
# The Stern-Brocot tree is an infinite binary search tree of all positive rational numbers,
# where each number appears only once and is in lowest terms.
# It is formed by starting with the two sentinels 0/1 and 1/1. Iterating infinitely in any order,
# between any two currently adjacent fractions Ln/Ld and Rn/Rd, insert a new fraction (Ln+Rn)/(Ld+Rd).
# See MathWorld for a visualization: http://mathworld.wolfram.com/Stern-BrocotTree.html
#
# The natural algorithm is as follows:
# # Counts the number of reduced fractions n/d such that leftN/leftD < n/d < rightN/rightD and d <= 12000.
# # leftN/leftD and rightN/rightD must be adjacent in the Stern-Brocot tree at some point in the generation process.
# def stern_brocot_count(leftn, leftd, rightn, rightd):
# d = leftd + rightd
# if d > 12000:
# return 0
# else:
# n = leftn + rightn
# return 1 + stern_brocot_count(leftn, leftd, n, d) + stern_brocot_count(n, d, rightn, rightd)
# But instead we use depth-first search on an explicit stack, because having
# a large number of stack frames seems to be supported on Linux but not on Windows.
def compute():
ans = 0
stack = [(1, 3, 1, 2)]
while len(stack) > 0:
leftn, leftd, rightn, rightd = stack.pop()
d = leftd + rightd
if d <= 12000:
n = leftn + rightn
ans += 1
stack.append((n, d, rightn, rightd))
stack.append((leftn, leftd, n, d))
return str(ans)
if __name__ == "__main__":
print(compute())
|
def compute():
ans = 0
stack = [(1, 3, 1, 2)]
while len(stack) > 0:
(leftn, leftd, rightn, rightd) = stack.pop()
d = leftd + rightd
if d <= 12000:
n = leftn + rightn
ans += 1
stack.append((n, d, rightn, rightd))
stack.append((leftn, leftd, n, d))
return str(ans)
if __name__ == '__main__':
print(compute())
|
"""
Contains the Artist class
"""
__all__ = [
'Artist',
]
class Artist(object):
"""
Represents an artist
"""
def __init__(self):
"""
Initiate properties
"""
self.identifier = 0
self.name = ''
self.other_names = ''
self.group_name = ''
self.urls = ''
self.is_active = False
self.version = 0
self.updater_id = 0
def __str__(self):
"""
String representation of the object
"""
return 'Artist<{}>'.format(self.identifier)
|
"""
Contains the Artist class
"""
__all__ = ['Artist']
class Artist(object):
"""
Represents an artist
"""
def __init__(self):
"""
Initiate properties
"""
self.identifier = 0
self.name = ''
self.other_names = ''
self.group_name = ''
self.urls = ''
self.is_active = False
self.version = 0
self.updater_id = 0
def __str__(self):
"""
String representation of the object
"""
return 'Artist<{}>'.format(self.identifier)
|
class BaseSiteCheckerException(Exception):
pass
class ErrorStopMsgLimit(BaseSiteCheckerException):
pass
|
class Basesitecheckerexception(Exception):
pass
class Errorstopmsglimit(BaseSiteCheckerException):
pass
|
def get_safe_balanced_split(target, train_ratio=0.8, get_test_indices=True, shuffle=False, seed=None):
classes, counts = np.unique(target, return_counts=True)
num_per_class = float(len(target))*float(train_ratio)/float(len(classes))
if num_per_class > np.min(counts):
print("Insufficient data to produce a balanced training data split.")
print("Classes found {}".format(classes))
print("Classes count {}".format(counts))
ts = float(train_ratio*np.min(counts)*len(classes)) / float(len(target))
print("train_ratio is reset from {} to {}".format(train_ratio, ts))
train_ratio = ts
num_per_class = float(len(target))*float(train_ratio)/float(len(classes))
num_per_class = int(num_per_class)
print("Data splitting on {} classes and returning {} per class".format(len(classes), num_per_class ))
# get indices
train_indices = []
for c in classes:
if seed is not None:
np.random.seed(seed)
c_idxs = np.where(target==c)[0]
c_idxs = np.random.choice(c_idxs, num_per_class, replace=False)
train_indices.extend(c_idxs)
# get test indices
test_indices = None
if get_test_indices:
test_indices = list(set(range(len(target))) - set(train_indices))
# shuffle
if shuffle:
train_indices = random.shuffle(train_indices)
if test_indices is not None:
test_indices = random.shuffle(test_indices)
return train_indices, test_indices
|
def get_safe_balanced_split(target, train_ratio=0.8, get_test_indices=True, shuffle=False, seed=None):
(classes, counts) = np.unique(target, return_counts=True)
num_per_class = float(len(target)) * float(train_ratio) / float(len(classes))
if num_per_class > np.min(counts):
print('Insufficient data to produce a balanced training data split.')
print('Classes found {}'.format(classes))
print('Classes count {}'.format(counts))
ts = float(train_ratio * np.min(counts) * len(classes)) / float(len(target))
print('train_ratio is reset from {} to {}'.format(train_ratio, ts))
train_ratio = ts
num_per_class = float(len(target)) * float(train_ratio) / float(len(classes))
num_per_class = int(num_per_class)
print('Data splitting on {} classes and returning {} per class'.format(len(classes), num_per_class))
train_indices = []
for c in classes:
if seed is not None:
np.random.seed(seed)
c_idxs = np.where(target == c)[0]
c_idxs = np.random.choice(c_idxs, num_per_class, replace=False)
train_indices.extend(c_idxs)
test_indices = None
if get_test_indices:
test_indices = list(set(range(len(target))) - set(train_indices))
if shuffle:
train_indices = random.shuffle(train_indices)
if test_indices is not None:
test_indices = random.shuffle(test_indices)
return (train_indices, test_indices)
|
print("Welcome to the Multiplication/Exponent Table App")
print()
name = input("Hello, What is your name: ")
number = float(input("What number would you like to work with: "))
name = name.strip()
print("Multiplication Table For {}".format(number))
print()
print("\t\t1.0 * {} = {:.2f}".format(number, number*1.0))
print("\t\t2.0 * {} = {:.2f}".format(number, number*2.0))
print("\t\t3.0 * {} = {:.2f}".format(number, number*3.0))
print("\t\t4.0 * {} = {:.2f}".format(number, number*4.0))
print("\t\t5.0 * {} = {:.2f}".format(number, number*5.0))
print("\t\t6.0 * {} = {:.2f}".format(number, number*6.0))
print("\t\t7.0 * {} = {:.2f}".format(number, number*7.0))
print("\t\t8.0 * {} = {:.2f}".format(number, number*8.0))
print("\t\t9.0 * {} = {:.2f}".format(number, number*9.0))
print()
print("Exponent Table For {}".format(number))
print()
print("\t\t{} ** 1 = {:.2f}".format(number, number**1))
print("\t\t{} ** 2 = {:.2f}".format(number, number**2))
print("\t\t{} ** 3 = {:.2f}".format(number, number**3))
print("\t\t{} ** 4 = {:.2f}".format(number, number**4))
print("\t\t{} ** 5 = {:.2f}".format(number, number**5))
print("\t\t{} ** 6 = {:.2f}".format(number, number**6))
print("\t\t{} ** 7 = {:.2f}".format(number, number**7))
print("\t\t{} ** 8 = {:.2f}".format(number, number**8))
print("\t\t{} ** 9 = {:.2f}".format(number, number**9))
print()
message = "{} Math is cool!".format(name)
print(message)
print("\t{}".format(message.lower()))
print("\t\t{}".format(message.title()))
print("\t\t\t{}".format(message.lower()))
|
print('Welcome to the Multiplication/Exponent Table App')
print()
name = input('Hello, What is your name: ')
number = float(input('What number would you like to work with: '))
name = name.strip()
print('Multiplication Table For {}'.format(number))
print()
print('\t\t1.0 * {} = {:.2f}'.format(number, number * 1.0))
print('\t\t2.0 * {} = {:.2f}'.format(number, number * 2.0))
print('\t\t3.0 * {} = {:.2f}'.format(number, number * 3.0))
print('\t\t4.0 * {} = {:.2f}'.format(number, number * 4.0))
print('\t\t5.0 * {} = {:.2f}'.format(number, number * 5.0))
print('\t\t6.0 * {} = {:.2f}'.format(number, number * 6.0))
print('\t\t7.0 * {} = {:.2f}'.format(number, number * 7.0))
print('\t\t8.0 * {} = {:.2f}'.format(number, number * 8.0))
print('\t\t9.0 * {} = {:.2f}'.format(number, number * 9.0))
print()
print('Exponent Table For {}'.format(number))
print()
print('\t\t{} ** 1 = {:.2f}'.format(number, number ** 1))
print('\t\t{} ** 2 = {:.2f}'.format(number, number ** 2))
print('\t\t{} ** 3 = {:.2f}'.format(number, number ** 3))
print('\t\t{} ** 4 = {:.2f}'.format(number, number ** 4))
print('\t\t{} ** 5 = {:.2f}'.format(number, number ** 5))
print('\t\t{} ** 6 = {:.2f}'.format(number, number ** 6))
print('\t\t{} ** 7 = {:.2f}'.format(number, number ** 7))
print('\t\t{} ** 8 = {:.2f}'.format(number, number ** 8))
print('\t\t{} ** 9 = {:.2f}'.format(number, number ** 9))
print()
message = '{} Math is cool!'.format(name)
print(message)
print('\t{}'.format(message.lower()))
print('\t\t{}'.format(message.title()))
print('\t\t\t{}'.format(message.lower()))
|
# Live preview Markdown and reStructuredText files as HTML in a web browser.
#
# Author: Peter Odding <peter@peterodding.com>
# Last Change: April 12, 2018
# URL: https://github.com/xolox/python-preview-markup
__version__ = '0.3.3'
|
__version__ = '0.3.3'
|
class DockablePaneState(object,IDisposable):
"""
Describes where a dockable pane window should appear in the Revit user interface.
DockablePaneState(other: DockablePaneState)
DockablePaneState()
"""
def Dispose(self):
""" Dispose(self: DockablePaneState) """
pass
def ReleaseUnmanagedResources(self,*args):
""" ReleaseUnmanagedResources(self: DockablePaneState,disposing: bool) """
pass
def SetFloatingRectangle(self,rect):
"""
SetFloatingRectangle(self: DockablePaneState,rect: Rectangle)
When %dockPosition% is Floating,sets the rectangle used to determine the size
and position of the pane when %dockPosition% is Floating. Coordinates are
relative to the upper-left-hand corner of the main Revit window.
"""
pass
def __enter__(self,*args):
""" __enter__(self: IDisposable) -> object """
pass
def __exit__(self,*args):
""" __exit__(self: IDisposable,exc_type: object,exc_value: object,exc_back: object) """
pass
def __init__(self,*args):
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod
def __new__(self,other=None):
"""
__new__(cls: type,other: DockablePaneState)
__new__(cls: type)
"""
pass
def __repr__(self,*args):
""" __repr__(self: object) -> str """
pass
DockPosition=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Which part of the Revit application frame the pane should dock to.
Get: DockPosition(self: DockablePaneState) -> DockPosition
Set: DockPosition(self: DockablePaneState)=value
"""
FloatingRectangle=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""When %dockPosition% is Floating,this rectangle determines the size and position of the pane. Coordinates are relative to the upper-left-hand corner of the main Revit window.
Note: the returned Rectangle is a copy. In order to change the pane state,you must call SetFloatingRectangle with a modified rectangle.
Get: FloatingRectangle(self: DockablePaneState) -> Rectangle
"""
IsValidObject=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Specifies whether the .NET object represents a valid Revit entity.
Get: IsValidObject(self: DockablePaneState) -> bool
"""
TabBehind=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Ignored unless %dockPosition% is Tabbed. The new pane will appear in a tab behind the specified existing pane ID.
Get: TabBehind(self: DockablePaneState) -> DockablePaneId
Set: TabBehind(self: DockablePaneState)=value
"""
|
class Dockablepanestate(object, IDisposable):
"""
Describes where a dockable pane window should appear in the Revit user interface.
DockablePaneState(other: DockablePaneState)
DockablePaneState()
"""
def dispose(self):
""" Dispose(self: DockablePaneState) """
pass
def release_unmanaged_resources(self, *args):
""" ReleaseUnmanagedResources(self: DockablePaneState,disposing: bool) """
pass
def set_floating_rectangle(self, rect):
"""
SetFloatingRectangle(self: DockablePaneState,rect: Rectangle)
When %dockPosition% is Floating,sets the rectangle used to determine the size
and position of the pane when %dockPosition% is Floating. Coordinates are
relative to the upper-left-hand corner of the main Revit window.
"""
pass
def __enter__(self, *args):
""" __enter__(self: IDisposable) -> object """
pass
def __exit__(self, *args):
""" __exit__(self: IDisposable,exc_type: object,exc_value: object,exc_back: object) """
pass
def __init__(self, *args):
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod
def __new__(self, other=None):
"""
__new__(cls: type,other: DockablePaneState)
__new__(cls: type)
"""
pass
def __repr__(self, *args):
""" __repr__(self: object) -> str """
pass
dock_position = property(lambda self: object(), lambda self, v: None, lambda self: None)
'Which part of the Revit application frame the pane should dock to.\n\n\n\nGet: DockPosition(self: DockablePaneState) -> DockPosition\n\n\n\nSet: DockPosition(self: DockablePaneState)=value\n\n'
floating_rectangle = property(lambda self: object(), lambda self, v: None, lambda self: None)
'When %dockPosition% is Floating,this rectangle determines the size and position of the pane. Coordinates are relative to the upper-left-hand corner of the main Revit window.\n\n Note: the returned Rectangle is a copy. In order to change the pane state,you must call SetFloatingRectangle with a modified rectangle.\n\n\n\nGet: FloatingRectangle(self: DockablePaneState) -> Rectangle\n\n\n\n'
is_valid_object = property(lambda self: object(), lambda self, v: None, lambda self: None)
'Specifies whether the .NET object represents a valid Revit entity.\n\n\n\nGet: IsValidObject(self: DockablePaneState) -> bool\n\n\n\n'
tab_behind = property(lambda self: object(), lambda self, v: None, lambda self: None)
'Ignored unless %dockPosition% is Tabbed. The new pane will appear in a tab behind the specified existing pane ID.\n\n\n\nGet: TabBehind(self: DockablePaneState) -> DockablePaneId\n\n\n\nSet: TabBehind(self: DockablePaneState)=value\n\n'
|
class Solution:
"""
@param n: an integer
@return: if n is a power of two
"""
def isPowerOfTwo(self, n):
# Write your code here
while n>1:
n=n/2
if n ==1:
return True
else:
return False
|
class Solution:
"""
@param n: an integer
@return: if n is a power of two
"""
def is_power_of_two(self, n):
while n > 1:
n = n / 2
if n == 1:
return True
else:
return False
|
#
# These methods are working on multiple processors
# that can be located remotely
#
class Bridges:
@staticmethod
def create(master=None, workers=None, name=None):
raise NotImplementedError
@staticmethod
def set(master=None, workers=None, name=None):
raise NotImplementedError
@staticmethod
def list(hosts=None):
raise NotImplementedError
@staticmethod
def check(hosts=None):
raise NotImplementedError
@staticmethod
def restart(host=None):
raise NotImplementedError
|
class Bridges:
@staticmethod
def create(master=None, workers=None, name=None):
raise NotImplementedError
@staticmethod
def set(master=None, workers=None, name=None):
raise NotImplementedError
@staticmethod
def list(hosts=None):
raise NotImplementedError
@staticmethod
def check(hosts=None):
raise NotImplementedError
@staticmethod
def restart(host=None):
raise NotImplementedError
|
"""Simple touch utility."""
def touch(filename: str) -> None:
"""Mimics the "touch filename" utility.
:param filename: filename to touch
"""
with open(filename, "a"):
pass
|
"""Simple touch utility."""
def touch(filename: str) -> None:
"""Mimics the "touch filename" utility.
:param filename: filename to touch
"""
with open(filename, 'a'):
pass
|
for index in range(1,101):
# if index % 15 == 0:
# print("fifteen")
if index % 3 == 0 and index % 5 == 0 :
print("fifteen")
elif index % 3 == 0:
print("three")
elif index % 5 == 0:
print("five")
else:
print(index)
|
for index in range(1, 101):
if index % 3 == 0 and index % 5 == 0:
print('fifteen')
elif index % 3 == 0:
print('three')
elif index % 5 == 0:
print('five')
else:
print(index)
|
class Solution:
def rob(self, nums):
if not nums:
return 0
values = [0] * len(nums)
for i in range(len(nums)):
if i == 0:
values[i] = max(values[i], nums[i])
elif i == 1:
values[i] = max(values[i-1], nums[i])
else:
values[i] = max(values[i-2] + nums[i], values[i-1])
return values[-1]
s = Solution()
print(s.rob([2,7,9,3,1]))
|
class Solution:
def rob(self, nums):
if not nums:
return 0
values = [0] * len(nums)
for i in range(len(nums)):
if i == 0:
values[i] = max(values[i], nums[i])
elif i == 1:
values[i] = max(values[i - 1], nums[i])
else:
values[i] = max(values[i - 2] + nums[i], values[i - 1])
return values[-1]
s = solution()
print(s.rob([2, 7, 9, 3, 1]))
|
# Copyright 2018 The TensorFlow Authors.
#
# 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.
"""Postprocessing utility function for CLIF."""
# CLIF postprocessor for a C++ function with signature:
# bool MyFunc(input_arg1, ..., *output_arg1, *output_arg2, ..., *error)
#
# If MyFunc returns True, returns (output_arg1, output_arg2, ...)
# If MyFunc returns False, raises ValueError(error).
def ValueErrorOnFalse(ok, *output_args):
"""Raises ValueError if not ok, otherwise returns the output arguments."""
n_outputs = len(output_args)
if n_outputs < 2:
raise ValueError("Expected 2 or more output_args. Got: %d" % n_outputs)
if not ok:
error = output_args[-1]
raise ValueError(error)
if n_outputs == 2:
output = output_args[0]
else:
output = output_args[0:-1]
return output
# CLIF postprocessor for a C++ function with signature:
# *result MyFactory(input_arg1, ..., *error)
#
# If result is not null, returns result.
# If result is null, raises ValueError(error).
def ValueErrorOnNull(result, error):
"""Raises ValueError(error) if result is None, otherwise returns result."""
if result is None:
raise ValueError(error)
return result
|
"""Postprocessing utility function for CLIF."""
def value_error_on_false(ok, *output_args):
"""Raises ValueError if not ok, otherwise returns the output arguments."""
n_outputs = len(output_args)
if n_outputs < 2:
raise value_error('Expected 2 or more output_args. Got: %d' % n_outputs)
if not ok:
error = output_args[-1]
raise value_error(error)
if n_outputs == 2:
output = output_args[0]
else:
output = output_args[0:-1]
return output
def value_error_on_null(result, error):
"""Raises ValueError(error) if result is None, otherwise returns result."""
if result is None:
raise value_error(error)
return result
|
MASTER_PROCESS_RANK = 0 # Only meaningful if webscraper is run with multiple processes. Here we use rank = 0 for master process; however we can set it to any value in [0, nprocs-1].
READING_RATIO_FOR_INPUT_CSVs = 1 # It represents how much of the input files (in csv format for now) we should process. MUST BE BETWEEN [0, 1]. For example 0.1 means; process 1/10th of each of the input files (in terms of rows) and 1 means read them all.
NUMBER_OF_REPEATS_TIMEIT = 1
CREATE_WORD_CLOUD = True
CREATE_BAG_OF_WORDS = True
CREATE_SENTIMENT_ANALYSIS_RESULTS = True
|
master_process_rank = 0
reading_ratio_for_input_cs_vs = 1
number_of_repeats_timeit = 1
create_word_cloud = True
create_bag_of_words = True
create_sentiment_analysis_results = True
|
#
# @lc app=leetcode.cn id=1689 lang=python3
#
# [1689] detect-pattern-of-length-m-repeated-k-or-more-times
#
None
# @lc code=end
|
None
|
print("Raadsel 1:",
"\n Wanneer leefde de oudste persoon ter wereld?")
guess = input() #"TUSSEN GEBOORTE en dood" # input ()
guess_words = []
for g in guess.split():
guess_words.append(g.lower())
answer_words = ["tussen", "geboorte", "dood"]
incorrect = False
for word in answer_words:
if word not in guess_words:
incorrect = True
if incorrect == True:
print ("Jammer, je hebt het fout geraden,",
"het antwoord was \n tussen zijn geboorte en zijn dood")
else:
print ("Goed gedaan, je hebt het geraden.")
|
print('Raadsel 1:', '\n Wanneer leefde de oudste persoon ter wereld?')
guess = input()
guess_words = []
for g in guess.split():
guess_words.append(g.lower())
answer_words = ['tussen', 'geboorte', 'dood']
incorrect = False
for word in answer_words:
if word not in guess_words:
incorrect = True
if incorrect == True:
print('Jammer, je hebt het fout geraden,', 'het antwoord was \n tussen zijn geboorte en zijn dood')
else:
print('Goed gedaan, je hebt het geraden.')
|
# Problem code
def countAndSay(n):
if n == 1:
return "1"
current = "1"
for i in range(2, n + 1):
current = helper(current)
return current
def helper(current):
group_count = 1
group_member = current[0]
result = ""
for i in range(1, len(current)):
if current[i] == group_member:
group_count += 1
continue
else:
result += str(group_count)
result += str(group_member)
group_count = 1
group_member = current[i]
result += str(group_count)
result += str(group_member)
return result
# Setup
print(countAndSay(4))
|
def count_and_say(n):
if n == 1:
return '1'
current = '1'
for i in range(2, n + 1):
current = helper(current)
return current
def helper(current):
group_count = 1
group_member = current[0]
result = ''
for i in range(1, len(current)):
if current[i] == group_member:
group_count += 1
continue
else:
result += str(group_count)
result += str(group_member)
group_count = 1
group_member = current[i]
result += str(group_count)
result += str(group_member)
return result
print(count_and_say(4))
|
"""
This package contains serializers. Purpose of serializer class
is to convert hwt representations of designed architecture
to target language or form (VHDL/Verilog/SystemC...).
"""
|
"""
This package contains serializers. Purpose of serializer class
is to convert hwt representations of designed architecture
to target language or form (VHDL/Verilog/SystemC...).
"""
|
# A classroom consists of N students, whose friendships can be represented in
# an adjacency list. For example, the following descibes a situation where 0
# is friends with 1 and 2, 3 is friends with 6, and so on.
# {0: [1, 2],
# 1: [0, 5],
# 2: [0],
# 3: [6],
# 4: [],
# 5: [1],
# 6: [3]}
# Each student can be placed in a friend group, which can be defined as the
# transitive closure of that student's friendship relations. In other words,
# this is the smallest set such that no student in the group has any friends
# outside this group. For the example above, the friend groups would be
# {0, 1, 2, 5}, {3, 6}, {4}.
# Given a friendship list such as the one above, determine the number of
# friend groups in the class.
def friend_group(adjacency):
groups = []
mapping = {}
for i in adjacency:
if i in mapping:
continue
for adj in adjacency[i]:
if adj in mapping:
groups[mapping[adj]].add(i)
mapping[i] = mapping[adj]
if i not in mapping:
mapping[i] = len(groups)
groups.append({i})
return groups
if __name__ == '__main__':
print(friend_group({
0: [1, 2],
1: [0, 5],
2: [0],
3: [6],
4: [],
5: [1],
6: [3]
}))
|
def friend_group(adjacency):
groups = []
mapping = {}
for i in adjacency:
if i in mapping:
continue
for adj in adjacency[i]:
if adj in mapping:
groups[mapping[adj]].add(i)
mapping[i] = mapping[adj]
if i not in mapping:
mapping[i] = len(groups)
groups.append({i})
return groups
if __name__ == '__main__':
print(friend_group({0: [1, 2], 1: [0, 5], 2: [0], 3: [6], 4: [], 5: [1], 6: [3]}))
|
class Solution(object):
def longestCommonSubsequence(self, text1, text2):
if not text1 or not text2:
return 0
m = len(text1)
n = len(text2)
dp = [[0]*(n+1) for _ in range(m+1)]
for i in range(1,m+1):
for j in range(1,n+1):
if text1[i-1] == text2[j-1]:
dp[i][j] = 1 + dp[i-1][j-1]
else:
dp[i][j] = max(dp[i-1][j],dp[i][j-1])
return dp[m][n]
|
class Solution(object):
def longest_common_subsequence(self, text1, text2):
if not text1 or not text2:
return 0
m = len(text1)
n = len(text2)
dp = [[0] * (n + 1) for _ in range(m + 1)]
for i in range(1, m + 1):
for j in range(1, n + 1):
if text1[i - 1] == text2[j - 1]:
dp[i][j] = 1 + dp[i - 1][j - 1]
else:
dp[i][j] = max(dp[i - 1][j], dp[i][j - 1])
return dp[m][n]
|
class Printer(object):
def __init__(self, sort_keys=None, order=None, header=None):
self.sort_keys = sort_keys
self.order = order
self.header = header
def print(self, d, format='table'):
print(self.value(d,format=format))
def value(self, d, format='table'):
return Printer.flatwrite(
d,
sort_keys=self.keys,
order=self.order,
header=self.header
)
|
class Printer(object):
def __init__(self, sort_keys=None, order=None, header=None):
self.sort_keys = sort_keys
self.order = order
self.header = header
def print(self, d, format='table'):
print(self.value(d, format=format))
def value(self, d, format='table'):
return Printer.flatwrite(d, sort_keys=self.keys, order=self.order, header=self.header)
|
# Copyright 2020 BlueCat Networks. All rights reserved.
# -*- coding: utf-8 -*-
type = 'api'
sub_pages = [
{
'name' : 'user_inventory_page',
'title' : u'user_inventory',
'endpoint' : 'user_inventory/user_inventory_endpoint',
'description' : u'user_inventory'
},
]
|
type = 'api'
sub_pages = [{'name': 'user_inventory_page', 'title': u'user_inventory', 'endpoint': 'user_inventory/user_inventory_endpoint', 'description': u'user_inventory'}]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.