content
stringlengths 7
1.05M
|
---|
#usuário deve digitar uma expressão matemática que use parênteses.
#o programa deve analisar se a expressão está com parênteses
# abertos ou fechados na ordem correta.
expressao = (str(input('Informe uma expressão matemática: ')))
simbolos = []
for s in expressao:
if s == '(':
simbolos.append('(')
elif s == ')':
if len(simbolos) > 0:
simbolos.pop()
else:
simbolos.append(')')
break
if len(simbolos) == 0:
print('Sua expressão está válida!')
else:
print('Sua expressão está errada!')
|
# --------------------------------------
#! /usr/bin/python
# File: 977. Squared of a Sorted Array.py
# Author: Kimberly Gao
# My solution: (Run time: 132ms) (from website)
# Memory Usage: 15.6 MB
class Solution:
def _init_(self,name):
self.name = name
# Only for python. Using function sort()
# Will overwritting the inputs
def sortedSquares1(self, nums):
for i in range(nums):
nums[i] *= nums[i]
nums.sort()
return nums
# Making a new array, not in place, O(n) auxiliary space
def sortedSquares2(self, nums):
return sorted([v**2 for v in nums])
# Making a new array, not in place, O(1) auxiliary space
def sortedSquares3(self, nums):
newlist = [v**2 for v in nums]
newlist.sort() # This is in place!
return newlist
# Two pointers:
def sortedSquares4(self, nums):
# list comprehension: return a list with all None elements (its length=length of nums):
# result = [None for _ in nums]
result = [None] * len(nums) # 10x faster than above one
left, right = 0, len(nums) - 1
for index in range(len(nums)-1, -1, -1):
if abs(nums[left]) > abs(nums[right]):
result[index] = nums[left] ** 2
left += 1
else:
result[index] = nums[right] ** 2
right -= 1
return result
if __name__ == '__main__':
nums = [-4,-1,0,3,10]
solution = Solution().sortedSquares4(nums)
print(solution)
|
"""
问题描述:给定整数N,返回斐波那契数列的第N项
补充题目:给定整数N,代表台阶数,一次可以跨2个或者1个台阶,返回有多少种走法。
补充题目2:假设农场中成熟的母牛每年会生一头小母牛,而且永远不会死。第一年农场有1只成熟的母牛,从第二年开始,
母牛开始生小母牛。每只小母牛3年之后成熟又可以生小母牛。给定整数N,求出N年后牛的数量。
要求:对以上所有问题,实现时间复杂度为O(logN)的解法
"""
# 由于数学能力和理解能力有限,这里给出O(N)的解法
class FBNZ:
@classmethod
def classic_question(cls, n):
if n < 1:
return 0
if n == 1 or n == 2:
return 1
cur = 1
pre = 1
pos = 3
while pos <= n:
temp = cur
cur = pre + cur
pre = temp
pos += 1
return cur
@classmethod
def jump_tj(cls, n):
if n < 1:
return 0
if n == 1 or n == 2:
return n
cur = 2
pre = 1
pos = 3
while pos <= n:
temp = cur
cur = pre + cur
pre = temp
pos += 1
return cur
@classmethod
def cow_count(cls, n):
if n < 1:
return 0
if n == 1 or n == 2 or n == 3:
return n
cur = 3
pre = 2
prepare = 1
pos = 4
while pos <= n:
temp1 = cur
temp2 = pre
cur = prepare + cur
pre = temp1
prepare = temp2
pos += 1
return cur
if __name__ == '__main__':
assert FBNZ.classic_question(20) == 6765
assert FBNZ.jump_tj(20) == 10946
assert FBNZ.cow_count(20) == 1873 |
class GameStatus:
OPEN = 'OPEN'
CLOSED = 'CLOSED'
READY = 'READY'
IN_PLAY = 'IN_PLAY'
ENDED = 'ENDED'
class Action:
MOVE_UP = 'MOVE_UP'
MOVE_LEFT = 'MOVE_LEFT'
MOVE_DOWN = 'MOVE_DOWN'
MOVE_RIGHT = 'MOVE_RIGHT'
ATTACK_UP = 'ATTACK_UP'
ATTACK_LEFT = 'ATTACK_LEFT'
ATTACK_DOWN = 'ATTACK_DOWN'
ATTACK_RIGHT = 'ATTACK_RIGHT'
TRANSFORM_NORMAL = 'TRANSFORM_NORMAL'
TRANSFORM_FIRE = 'TRANSFORM_FIRE'
TRANSFORM_WATER = 'TRANSFORM_WATER'
TRANSFORM_GRASS = 'TRANSFORM_GRASS'
class ActionType:
MOVE = 'MOVE'
COLLECT = 'COLLECT'
TRANSFORM = 'TRANSFORM'
ATTACK = 'ATTACK'
RESTORE_HP = 'RESTORE_HP'
WAIT = 'WAIT'
class TileType:
NORMAL = 'NORMAL'
FIRE = 'FIRE'
WATER = 'WATER'
GRASS = 'GRASS'
class ItemType:
OBSTACLE = 'OBSTACLE'
FIRE = 'FIRE'
WATER = 'WATER'
GRASS = 'GRASS'
class Morph:
NEUTRAL = 'NEUTRAL'
FIRE = 'FIRE'
WATER = 'WATER'
GRASS = 'GRASS' |
__name__ = "restio"
__version__ = "1.0.0b5"
__author__ = "Eduardo Machado Starling"
__email__ = "[email protected]"
|
class Solution:
#Function to remove a loop in the linked list.
def removeLoop(self, head):
ptr1 = head
ptr2 = head
while ptr2!=None and ptr2.next!=None:
ptr1 = ptr1.next
ptr2 = ptr2.next.next
if ptr1 == ptr2 :
self.delete_loop(head,ptr1)
else:
return 1
def delete_loop(self,head,loop_node):
ptr1 = head
i = 1
counter = loop_node
while counter.next != loop_node:
counter = counter.next
i+=1
ptr2 = head
for j in range(i):
ptr2 = ptr2.next
while ptr1!=ptr2:
ptr1 = ptr1.next
ptr2 = ptr2.next
while(ptr2.next != ptr1):
ptr2 = ptr2.next
ptr2.next = None
# code here
# remove the loop without losing any nodes
#{
# Driver Code Starts
# driver code:
class Node:
def __init__(self,val):
self.next=None
self.data=val
class linkedList:
def __init__(self):
self.head=None
self.tail=None
def add(self,num):
if self.head is None:
self.head=Node(num)
self.tail=self.head
else:
self.tail.next=Node(num)
self.tail=self.tail.next
def isLoop(self):
if self.head is None:
return False
fast=self.head.next
slow=self.head
while slow != fast:
if fast is None or fast.next is None:
return False
fast=fast.next.next
slow=slow.next
return True
def loopHere(self,position):
if position==0:
return
walk=self.head
for _ in range(1,position):
walk=walk.next
self.tail.next=walk
def length(self):
walk=self.head
ret=0
while walk:
ret+=1
walk=walk.next
return ret
if __name__=="__main__":
t=int(input())
for _ in range(t):
n=int(input())
arr=tuple(int(x) for x in input().split())
pos=int(input())
ll = linkedList()
for i in arr:
ll.add(i)
ll.loopHere(pos)
Solution().removeLoop(ll.head)
if ll.isLoop() or ll.length()!=n:
print(0)
continue
else:
print(1)
# } Driver Code Ends
|
class ConsoleGenerator:
def print_tree(self, indent=0, depth=99):
if depth > 0:
print(" " * indent, str(self))
self.descend_tree(indent, depth)
def descend_tree(self, indent=0, depth=99):
# do descent here, other classes may overload this
pass
@staticmethod
def output(py_obj):
print("#" * 80)
print("data via console class: '{}'".format(py_obj.data))
print("#" * 80)
|
"""BFS in Python."""
GRAPH = {"A": set(["B", "C", "E", "F"]),
"B": set(["A", "C", "D"]),
"C": set(["A", "B"]),
"D": set(["B"]),
"E": set(["B", "A"]),
"F": set(["A"])}
def bfs(graph, start):
"""Return visited nodes."""
visited = set()
queue = [start]
while queue:
vertex = queue.pop(0)
if vertex not in visited:
visited.add(vertex)
print(vertex)
queue.extend(graph[vertex]-visited)
return visited
def bfs_path(graph, start, end):
"""Return all paths."""
queue = [(start, [start])]
while queue:
(vertex, path) = queue.pop(0)
for i in graph[vertex] - set(path):
if i == end:
yield path + [i]
else:
queue.append((i, path + [i]))
def bfs_shortest_path(graph, start, end):
"""Find the shortest path with BFS."""
try:
return next(bfs_path(graph, start, end))
except StopIteration:
return None
print(bfs(GRAPH, "A"))
print(list(bfs_path(GRAPH, "F", "D")))
print(bfs_shortest_path(GRAPH, "F", "D"))
|
#
# PySNMP MIB module HH3C-LswINF-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HH3C-LswINF-MIB
# Produced by pysmi-0.3.4 at Wed May 1 13:26:01 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")
ValueSizeConstraint, SingleValueConstraint, ValueRangeConstraint, ConstraintsUnion, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "SingleValueConstraint", "ValueRangeConstraint", "ConstraintsUnion", "ConstraintsIntersection")
hh3clswCommon, = mibBuilder.importSymbols("HH3C-OID-MIB", "hh3clswCommon")
ifEntry, ifIndex = mibBuilder.importSymbols("IF-MIB", "ifEntry", "ifIndex")
ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup")
MibScalar, MibTable, MibTableRow, MibTableColumn, Counter64, IpAddress, Counter32, ObjectIdentity, Bits, TimeTicks, ModuleIdentity, Gauge32, iso, NotificationType, Unsigned32, MibIdentifier, Integer32 = mibBuilder.importSymbols("SNMPv2-SMI", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Counter64", "IpAddress", "Counter32", "ObjectIdentity", "Bits", "TimeTicks", "ModuleIdentity", "Gauge32", "iso", "NotificationType", "Unsigned32", "MibIdentifier", "Integer32")
TruthValue, RowStatus, DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "TruthValue", "RowStatus", "DisplayString", "TextualConvention")
hh3cLswL2InfMib = ModuleIdentity((1, 3, 6, 1, 4, 1, 25506, 8, 35, 5))
hh3cLswL2InfMib.setRevisions(('2001-06-29 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: hh3cLswL2InfMib.setRevisionsDescriptions(('',))
if mibBuilder.loadTexts: hh3cLswL2InfMib.setLastUpdated('200106290000Z')
if mibBuilder.loadTexts: hh3cLswL2InfMib.setOrganization('Hangzhou H3C Tech. Co., Ltd.')
if mibBuilder.loadTexts: hh3cLswL2InfMib.setContactInfo('Platform Team Hangzhou H3C Tech. Co., Ltd. Hai-Dian District Beijing P.R. China http://www.h3c.com Zip:100085 ')
if mibBuilder.loadTexts: hh3cLswL2InfMib.setDescription('')
class PortList(TextualConvention, OctetString):
description = "Each octet within this value specifies a set of eight ports, with the first octet specifying ports 1 through 8, the second octet specifying ports 9 through 16, etc. Within each octet, the most significant bit represents the lowest numbered port, and the least significant bit represents the highest numbered port. Thus, each port of the bridge is represented by a single bit within the value of this object. If that bit has a value of '1' then that port is included in the set of ports; the port is not included if its bit has a value of '0'."
status = 'current'
class VlanIndex(TextualConvention, Unsigned32):
description = 'A value used to index per-VLAN tables: values of 0 and 4095 are not permitted; if the value is between 1 and 4094 inclusive, it represents an IEEE 802.1Q VLAN-ID with global scope within a given bridged domain (see VlanId textual convention). If the value is greater than 4095 then it represents a VLAN with scope local to the particular agent, i.e. one without a global VLAN-ID assigned to it. Such VLANs are outside the scope of IEEE 802.1Q but it is convenient to be able to manage them in the same way using this MIB.'
status = 'current'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(0, 4294967295)
class InterfaceIndex(TextualConvention, Integer32):
description = "A unique value, greater than zero, for each interface or interface sub-layer in the managed system. It is recommended that values are assigned contiguously starting from 1. The value for each interface sub-layer must remain constant at least from one re-initialization of the entity's network management system to the next re-initialization."
status = 'current'
displayHint = 'd'
class DropDirection(TextualConvention, Integer32):
description = 'Representing the direction of dropping packets, if applicable.'
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))
namedValues = NamedValues(("disable", 1), ("enableInbound", 2), ("enableOutbound", 3), ("enableBoth", 4))
class SpeedModeFlag(TextualConvention, Bits):
description = 'Type of Negotiable Speed mode.'
status = 'current'
namedValues = NamedValues(("s10M", 0), ("s100M", 1), ("s1000M", 2), ("s10000M", 3), ("s24000M", 4))
hh3cLswExtInterface = MibIdentifier((1, 3, 6, 1, 4, 1, 25506, 8, 35, 1))
hh3cifXXTable = MibTable((1, 3, 6, 1, 4, 1, 25506, 8, 35, 1, 1), )
if mibBuilder.loadTexts: hh3cifXXTable.setStatus('current')
if mibBuilder.loadTexts: hh3cifXXTable.setDescription('Extended H3C private interface information table.')
hh3cifXXEntry = MibTableRow((1, 3, 6, 1, 4, 1, 25506, 8, 35, 1, 1, 1), )
ifEntry.registerAugmentions(("HH3C-LswINF-MIB", "hh3cifXXEntry"))
hh3cifXXEntry.setIndexNames(*ifEntry.getIndexNames())
if mibBuilder.loadTexts: hh3cifXXEntry.setStatus('current')
if mibBuilder.loadTexts: hh3cifXXEntry.setDescription('Entries of extended H3C private interface information table.')
hh3cifUnBoundPort = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 1, 1, 1, 1), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cifUnBoundPort.setStatus('current')
if mibBuilder.loadTexts: hh3cifUnBoundPort.setDescription('Whether it is the unbound port. (true indicates that the port is the main port of the aggregation or the port does not participate in the aggregation.)')
hh3cifISPhyPort = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 1, 1, 1, 2), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cifISPhyPort.setStatus('current')
if mibBuilder.loadTexts: hh3cifISPhyPort.setDescription('Whether it is a physical interface.')
hh3cifAggregatePort = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 1, 1, 1, 3), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cifAggregatePort.setStatus('current')
if mibBuilder.loadTexts: hh3cifAggregatePort.setDescription('Whether it is the aggregated port. (if the port participates in the aggregation, this value is true.)')
hh3cifMirrorPort = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 1, 1, 1, 4), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cifMirrorPort.setStatus('current')
if mibBuilder.loadTexts: hh3cifMirrorPort.setDescription('Whether it is a mirror port.')
hh3cifVLANType = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 1, 1, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("vLANTrunk", 1), ("access", 2), ("hybrid", 3), ("fabric", 4)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cifVLANType.setStatus('current')
if mibBuilder.loadTexts: hh3cifVLANType.setDescription('port vlan types. hybrid (3) port can carry multiple VLANs. If fabric function is supported, fabric(4) means the port is a fabric port.')
hh3cifMcastControl = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 1, 1, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 100))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cifMcastControl.setStatus('current')
if mibBuilder.loadTexts: hh3cifMcastControl.setDescription('Broadcast storm suppression with the step length of 1, ranging from 1 to 100 percent. In some products the step is 5, ranging from 5 to 100.')
hh3cifFlowControl = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 1, 1, 1, 7), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cifFlowControl.setStatus('current')
if mibBuilder.loadTexts: hh3cifFlowControl.setDescription('Flow control status.')
hh3cifSrcMacControl = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 1, 1, 1, 8), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cifSrcMacControl.setStatus('current')
if mibBuilder.loadTexts: hh3cifSrcMacControl.setDescription('Whether to filter by source MAC address.')
hh3cifClearStat = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 1, 1, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1))).clone(namedValues=NamedValues(("clear", 1)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cifClearStat.setStatus('current')
if mibBuilder.loadTexts: hh3cifClearStat.setDescription('Clear all port statistics. Read operation not supported.')
hh3cifXXBasePortIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 1, 1, 1, 10), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cifXXBasePortIndex.setStatus('current')
if mibBuilder.loadTexts: hh3cifXXBasePortIndex.setDescription('Index number of the port and the first port index of the device is 1.')
hh3cifXXDevPortIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 1, 1, 1, 11), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cifXXDevPortIndex.setStatus('current')
if mibBuilder.loadTexts: hh3cifXXDevPortIndex.setDescription('Device index of the port.')
hh3cifPpsMcastControl = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 1, 1, 1, 12), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cifPpsMcastControl.setStatus('current')
if mibBuilder.loadTexts: hh3cifPpsMcastControl.setDescription('The broadcast suppression with pps(packet per second) type. The max value is determined by the port type and product.')
hh3cifPpsBcastDisValControl = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 1, 1, 1, 13), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enable", 1), ("disable", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cifPpsBcastDisValControl.setStatus('current')
if mibBuilder.loadTexts: hh3cifPpsBcastDisValControl.setDescription("Control the port's pps(packet per second) broadcast suppression. When the port is enabled, its pps broadcast suppression value is the global disperse value, and when disabled, it doesn't suppress broadcast.")
hh3cifUniSuppressionStep = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 1, 1, 1, 14), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cifUniSuppressionStep.setStatus('current')
if mibBuilder.loadTexts: hh3cifUniSuppressionStep.setDescription('The step of unicast suppression in ratio mode.')
hh3cifPpsUniSuppressionMax = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 1, 1, 1, 15), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cifPpsUniSuppressionMax.setStatus('current')
if mibBuilder.loadTexts: hh3cifPpsUniSuppressionMax.setDescription('The max pps(packet per second) value of unicast suppression in pps mode.')
hh3cifMulSuppressionStep = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 1, 1, 1, 16), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cifMulSuppressionStep.setStatus('current')
if mibBuilder.loadTexts: hh3cifMulSuppressionStep.setDescription('The step of multicast suppression in ratio mode.')
hh3cifPpsMulSuppressionMax = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 1, 1, 1, 17), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cifPpsMulSuppressionMax.setStatus('current')
if mibBuilder.loadTexts: hh3cifPpsMulSuppressionMax.setDescription('The max pps(packet per second) value of multicast suppression in pps mode.')
hh3cifUniSuppression = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 1, 1, 1, 18), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cifUniSuppression.setStatus('current')
if mibBuilder.loadTexts: hh3cifUniSuppression.setDescription('The unicast suppression with the ranging from 1 to 100 percent in ratio mode. The step is determined by hh3cifUniSuppressionStep.')
hh3cifPpsUniSuppression = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 1, 1, 1, 19), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cifPpsUniSuppression.setStatus('current')
if mibBuilder.loadTexts: hh3cifPpsUniSuppression.setDescription('The unicast suppression in pps(packet per second) mode. The max value is determined by hh3cifPpsUniSuppressionMax.')
hh3cifMulSuppression = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 1, 1, 1, 20), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cifMulSuppression.setStatus('current')
if mibBuilder.loadTexts: hh3cifMulSuppression.setDescription('The multicast suppression with ranging from 1 to 100 percent in ratio mode. The step is determined by hh3cifMulSuppressionStep.')
hh3cifPpsMulSuppression = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 1, 1, 1, 21), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cifPpsMulSuppression.setStatus('current')
if mibBuilder.loadTexts: hh3cifPpsMulSuppression.setDescription('The multicast suppression in pps(packet per second) mode. The max pps value is determined by hh3cifPpsMulSuppressionMax.')
hh3cifComboActivePort = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 1, 1, 1, 22), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("fiber", 1), ("copper", 2), ("na", 3)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cifComboActivePort.setStatus('obsolete')
if mibBuilder.loadTexts: hh3cifComboActivePort.setDescription('Active port on combo interface.')
hh3cifBMbpsMulSuppressionMax = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 1, 1, 1, 23), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cifBMbpsMulSuppressionMax.setStatus('current')
if mibBuilder.loadTexts: hh3cifBMbpsMulSuppressionMax.setDescription('The maximum value of the multicast suppression with bandwidth-based(Mbps) that a port can be configured.')
hh3cifBMbpsMulSuppression = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 1, 1, 1, 24), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cifBMbpsMulSuppression.setStatus('current')
if mibBuilder.loadTexts: hh3cifBMbpsMulSuppression.setDescription('With bandwidth-based multicast suppression, the bandwidth is measured in Mbps. The upper limit of the multicast suppession with bandwidth-based(Mbps) is the value of hh3cifBMbpsMulSuppressionMax in the entry. The default value of hh3cifBMbpsMulSuppression is the value of hh3cifBMbpsMulSuppressionMax.')
hh3cifBKbpsMulSuppressionMax = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 1, 1, 1, 25), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cifBKbpsMulSuppressionMax.setStatus('current')
if mibBuilder.loadTexts: hh3cifBKbpsMulSuppressionMax.setDescription('The maximum value of the multicast suppression with bandwidth-based(Kbps) that a port can be configured.')
hh3cifBKbpsMulSuppressionStep = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 1, 1, 1, 26), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cifBKbpsMulSuppressionStep.setStatus('current')
if mibBuilder.loadTexts: hh3cifBKbpsMulSuppressionStep.setDescription('The step of multicast suppression with bandwidth-based(Kbps).')
hh3cifBKbpsMulSuppression = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 1, 1, 1, 27), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cifBKbpsMulSuppression.setStatus('current')
if mibBuilder.loadTexts: hh3cifBKbpsMulSuppression.setDescription('With bandwidth-based multicast suppression, the bandwidth is measured in Kbps. The upper limit of the multicast suppession with bandwidth-based(Kbps) is the value of hh3cifBKbpsMulSuppressionMax in the entry. The value of hh3cifBKbpsMulSuppression must be multiple of the value of hh3cifBKbpsMulSuppressionStep. The default value of hh3cifBKbpsMulSuppression is the value of hh3cifBKbpsMulSuppressionMax.')
hh3cifUnknownPacketDropMul = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 1, 1, 1, 28), DropDirection().clone('disable')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cifUnknownPacketDropMul.setStatus('current')
if mibBuilder.loadTexts: hh3cifUnknownPacketDropMul.setDescription("Control the port's unknown-multicast packets drop. When inbound direction is enabled on this port, the port will drop unknown-multicast packets in inbound direction. When outbound direction is enabled on this port, the port will drop unknown-multicast packets in outbound direction. When both directions are enabled on this port, the port will drop unknown-multicast packets in both inbound and outbound directions.")
hh3cifUnknownPacketDropUni = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 1, 1, 1, 29), DropDirection().clone('disable')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cifUnknownPacketDropUni.setStatus('current')
if mibBuilder.loadTexts: hh3cifUnknownPacketDropUni.setDescription("Control the port's unknown-unicast packets drop. When inbound direction is enabled on this port, the port will drop unknown-unicast packets in inbound direction. When outbound direction is enabled on this port, the port will drop unknown-unicast packets in outbound direction. When both directions are enabled on this port, the port will drop unknown-unicast packets in both inbound and outbound directions.")
hh3cifBMbpsUniSuppressionMax = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 1, 1, 1, 30), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cifBMbpsUniSuppressionMax.setStatus('current')
if mibBuilder.loadTexts: hh3cifBMbpsUniSuppressionMax.setDescription(' The maximum value of the unicast suppression with bandwidth-based (Mbps) that a port can be configured.')
hh3cifBMbpsUniSuppression = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 1, 1, 1, 31), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cifBMbpsUniSuppression.setStatus('current')
if mibBuilder.loadTexts: hh3cifBMbpsUniSuppression.setDescription(' With bandwidth-based Unicast suppression, the bandwidth is measured in Mbps. The upper limit of the unicast suppession with bandwidth-based(Mbps) is the value of hh3cifBMbpsUniSuppressionMax in the entry. The default value of hh3cifBMbpsUniSuppression is the value of hh3cifBMbpsUniSuppressionMax.')
hh3cifBKbpsUniSuppressionMax = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 1, 1, 1, 32), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cifBKbpsUniSuppressionMax.setStatus('current')
if mibBuilder.loadTexts: hh3cifBKbpsUniSuppressionMax.setDescription(' The maximum value of the unicast suppression with bandwidth-based (Kbps) that a port can be configured.')
hh3cifBKbpsUniSuppressionStep = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 1, 1, 1, 33), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cifBKbpsUniSuppressionStep.setStatus('current')
if mibBuilder.loadTexts: hh3cifBKbpsUniSuppressionStep.setDescription(' The step of unicast suppression with bandwidth-based(Kbps).')
hh3cifBKbpsUniSuppression = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 1, 1, 1, 34), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cifBKbpsUniSuppression.setStatus('current')
if mibBuilder.loadTexts: hh3cifBKbpsUniSuppression.setDescription(' With bandwidth-based unicast suppression, the bandwidth is measured in Kbps. The upper limit of the unicast suppession with bandwidth-based(Kbps) is the value of hh3cifBKbpsUniSuppressionMax in the entry. The value of hh3cifBKbpsUniSuppression must be multiple of the value of hh3cifBKbpsUniSuppressionStep. The default value of hh3cifBKbpsUniSuppression is the value of hh3cifBKbpsUniSuppressionMax.')
hh3cifOutPayloadOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 1, 1, 1, 35), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cifOutPayloadOctets.setStatus('current')
if mibBuilder.loadTexts: hh3cifOutPayloadOctets.setDescription(' The actual output octets of the interface.')
hh3cifInPayloadOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 1, 1, 1, 36), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cifInPayloadOctets.setStatus('current')
if mibBuilder.loadTexts: hh3cifInPayloadOctets.setDescription(' The actual input octets of the interface.')
hh3cifInErrorPktsRate = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 1, 1, 1, 37), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cifInErrorPktsRate.setStatus('current')
if mibBuilder.loadTexts: hh3cifInErrorPktsRate.setDescription(' The rate of inbound error packets on the interface.')
hh3cifInPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 1, 1, 1, 38), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cifInPkts.setStatus('current')
if mibBuilder.loadTexts: hh3cifInPkts.setDescription(' The number of packets received on the interface.')
hh3cifInNormalPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 1, 1, 1, 39), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cifInNormalPkts.setStatus('current')
if mibBuilder.loadTexts: hh3cifInNormalPkts.setDescription(' The number of normal packets received on the interface.')
hh3cifOutPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 1, 1, 1, 40), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cifOutPkts.setStatus('current')
if mibBuilder.loadTexts: hh3cifOutPkts.setDescription(' The number of packets sent on the interface.')
hh3cifAggregateTable = MibTable((1, 3, 6, 1, 4, 1, 25506, 8, 35, 1, 2), )
if mibBuilder.loadTexts: hh3cifAggregateTable.setStatus('current')
if mibBuilder.loadTexts: hh3cifAggregateTable.setDescription('Port aggregation information table.')
hh3cifAggregateEntry = MibTableRow((1, 3, 6, 1, 4, 1, 25506, 8, 35, 1, 2, 1), ).setIndexNames((0, "HH3C-LswINF-MIB", "hh3cifAggregatePortIndex"))
if mibBuilder.loadTexts: hh3cifAggregateEntry.setStatus('current')
if mibBuilder.loadTexts: hh3cifAggregateEntry.setDescription('Port aggregation information table.')
hh3cifAggregatePortIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 1, 2, 1, 1), InterfaceIndex()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cifAggregatePortIndex.setStatus('current')
if mibBuilder.loadTexts: hh3cifAggregatePortIndex.setDescription('Index number of the main aggregated port.')
hh3cifAggregatePortName = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 1, 2, 1, 2), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 40))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cifAggregatePortName.setStatus('current')
if mibBuilder.loadTexts: hh3cifAggregatePortName.setDescription('Aggregation group name.')
hh3cifAggregatePortListPorts = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 1, 2, 1, 3), PortList()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cifAggregatePortListPorts.setStatus('current')
if mibBuilder.loadTexts: hh3cifAggregatePortListPorts.setDescription('Portlist of a aggregating.')
hh3cifAggregateModel = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 1, 2, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("ingress", 1), ("both", 2), ("round-robin", 3)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cifAggregateModel.setStatus('current')
if mibBuilder.loadTexts: hh3cifAggregateModel.setDescription('Load sharing mode for the port aggregation.')
hh3cifAggregateOperStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 1, 2, 1, 5), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: hh3cifAggregateOperStatus.setStatus('current')
if mibBuilder.loadTexts: hh3cifAggregateOperStatus.setDescription('Current operation status of the row.')
hh3cifHybridPortTable = MibTable((1, 3, 6, 1, 4, 1, 25506, 8, 35, 1, 3), )
if mibBuilder.loadTexts: hh3cifHybridPortTable.setStatus('current')
if mibBuilder.loadTexts: hh3cifHybridPortTable.setDescription('Hybrid-port configuration table.')
hh3cifHybridPortEntry = MibTableRow((1, 3, 6, 1, 4, 1, 25506, 8, 35, 1, 3, 1), ).setIndexNames((0, "HH3C-LswINF-MIB", "hh3cifHybridPortIndex"))
if mibBuilder.loadTexts: hh3cifHybridPortEntry.setStatus('current')
if mibBuilder.loadTexts: hh3cifHybridPortEntry.setDescription('Hybrid-port configuration table.')
hh3cifHybridPortIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 1, 3, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cifHybridPortIndex.setStatus('current')
if mibBuilder.loadTexts: hh3cifHybridPortIndex.setDescription('Index number of Hybrid-port.')
hh3cifHybridTaggedVlanListLow = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 1, 3, 1, 2), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 256))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cifHybridTaggedVlanListLow.setStatus('current')
if mibBuilder.loadTexts: hh3cifHybridTaggedVlanListLow.setDescription("Each octet within this value specifies a set of eight VLANs, with the first octet specifying VLANs 1 through 8, the second octet specifying VLANs 9 through 16, etc. Within each octet, the most significant bit represents the highest numbered VLAN, and the least significant bit represents the lowest numbered VLAN. Thus, each tagged VLAN of the hybrid port is represented by a single bit within the value of this object. If that bit has a value of '1' then that VLAN is tagged in the set of VLANs; the VLAN is not tagged if its bit has a value of '0'.")
hh3cifHybridTaggedVlanListHigh = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 1, 3, 1, 3), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 256))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cifHybridTaggedVlanListHigh.setStatus('current')
if mibBuilder.loadTexts: hh3cifHybridTaggedVlanListHigh.setDescription("Each octet within this value specifies a set of eight VLANs, with the first octet specifying VLANs 2049 through 2056, the second octet specifying VLANs 2057 through 2064, etc. Within each octet, the most significant bit represents the highest numbered VLAN, and the least significant bit represents the lowest numbered VLAN. Thus, each tagged VLAN of the hybrid port is represented by a single bit within the value of this object. If that bit has a value of '1' then that VLAN is tagged in the set of VLANs; the VLAN is not tagged if its bit has a value of '0'.")
hh3cifHybridUnTaggedVlanListLow = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 1, 3, 1, 4), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 256))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cifHybridUnTaggedVlanListLow.setStatus('current')
if mibBuilder.loadTexts: hh3cifHybridUnTaggedVlanListLow.setDescription("Each octet within this value specifies a set of eight VLANs, with the first octet specifying VLANs 1 through 8, the second octet specifying VLANs 9 through 16, etc. Within each octet, the most significant bit represents the highest numbered VLAN, and the least significant bit represents the lowest numbered VLAN. Thus, each untagged VLAN of the hybrid port is represented by a single bit within the value of this object. If that bit has a value of '1' then that VLAN is untagged in the set of VLANs; the VLAN is not untagged if its bit has a value of '0'.")
hh3cifHybridUnTaggedVlanListHigh = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 1, 3, 1, 5), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 256))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cifHybridUnTaggedVlanListHigh.setStatus('current')
if mibBuilder.loadTexts: hh3cifHybridUnTaggedVlanListHigh.setDescription("Each octet within this value specifies a set of eight VLANs, with the first octet specifying VLANs 2049 through 2056, the second octet specifying VLANs 2057 through 2064, etc. Within each octet, the most significant bit represents the highest numbered VLAN, and the least significant bit represents the lowest numbered VLAN. Thus, each untagged VLAN of the hybrid port is represented by a single bit within the value of this object. If that bit has a value of '1' then that VLAN is untagged in the set of VLANs; the VLAN is not untagged if its bit has a value of '0'.")
hh3cifComboPortTable = MibTable((1, 3, 6, 1, 4, 1, 25506, 8, 35, 1, 4), )
if mibBuilder.loadTexts: hh3cifComboPortTable.setStatus('current')
if mibBuilder.loadTexts: hh3cifComboPortTable.setDescription('Combo-port table.')
hh3cifComboPortEntry = MibTableRow((1, 3, 6, 1, 4, 1, 25506, 8, 35, 1, 4, 1), ).setIndexNames((0, "HH3C-LswINF-MIB", "hh3cifComboPortIndex"))
if mibBuilder.loadTexts: hh3cifComboPortEntry.setStatus('current')
if mibBuilder.loadTexts: hh3cifComboPortEntry.setDescription('The entry of hh3cifComboPortTable.')
hh3cifComboPortIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 1, 4, 1, 1), InterfaceIndex()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cifComboPortIndex.setStatus('current')
if mibBuilder.loadTexts: hh3cifComboPortIndex.setDescription('The combo-port interface index. Its value is the same as the value of ifIndex in ifTable, but only includes indexes of the combo-port interfaces.')
hh3cifComboPortCurActive = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 1, 4, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("fiber", 1), ("copper", 2), ("na", 3)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cifComboPortCurActive.setStatus('current')
if mibBuilder.loadTexts: hh3cifComboPortCurActive.setDescription("Current active interface of combo interfaces. The value 'fiber' means the interface with fiber connector of the pair of combo-port interfaces is active. The value 'copper' means the interface with copper connector of the pair is active. The value 'na' means not supported.")
hh3cLswL2InfMibObject = MibIdentifier((1, 3, 6, 1, 4, 1, 25506, 8, 35, 5, 1))
hh3cSlotPortMax = MibScalar((1, 3, 6, 1, 4, 1, 25506, 8, 35, 5, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cSlotPortMax.setStatus('current')
if mibBuilder.loadTexts: hh3cSlotPortMax.setDescription('Max ports of the slots.')
hh3cSwitchPortMax = MibScalar((1, 3, 6, 1, 4, 1, 25506, 8, 35, 5, 1, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cSwitchPortMax.setStatus('current')
if mibBuilder.loadTexts: hh3cSwitchPortMax.setDescription('Max ports that this switch includes.')
hh3cifVLANTrunkStatusTable = MibTable((1, 3, 6, 1, 4, 1, 25506, 8, 35, 5, 1, 3), )
if mibBuilder.loadTexts: hh3cifVLANTrunkStatusTable.setStatus('current')
if mibBuilder.loadTexts: hh3cifVLANTrunkStatusTable.setDescription('Gmosaic attributes on the VlanTrunk port.')
hh3cifVLANTrunkStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 25506, 8, 35, 5, 1, 3, 1), ).setIndexNames((0, "HH3C-LswINF-MIB", "hh3cifVLANTrunkIndex"))
if mibBuilder.loadTexts: hh3cifVLANTrunkStatusEntry.setStatus('current')
if mibBuilder.loadTexts: hh3cifVLANTrunkStatusEntry.setDescription('Gmosaic attributes on the VlanTrunk port.')
hh3cifVLANTrunkIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 5, 1, 3, 1, 1), InterfaceIndex()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cifVLANTrunkIndex.setStatus('current')
if mibBuilder.loadTexts: hh3cifVLANTrunkIndex.setDescription('Index number of the VLANTrunk interface.')
hh3cifVLANTrunkGvrpRegistration = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 5, 1, 3, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("normal", 1), ("fixed", 2), ("forbidden", 3)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cifVLANTrunkGvrpRegistration.setStatus('current')
if mibBuilder.loadTexts: hh3cifVLANTrunkGvrpRegistration.setDescription('GMOSAIC registration information normal: This is the default configuration. Allow create, register and unregister vlans dynamiclly at this port. fixed: Aallow create and register vlan manually at this port. Prevent from unregistering vlans or registering known vlans of this port at another trunk port. forbidden: Unregister all vlans but vlan 1, forbid to create or register any other vlans at this port.')
hh3cifVLANTrunkPassListLow = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 5, 1, 3, 1, 4), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cifVLANTrunkPassListLow.setStatus('current')
if mibBuilder.loadTexts: hh3cifVLANTrunkPassListLow.setDescription("Each octet within this value specifies a set of eight VLANs, with the first octet specifying VLANs 1 through 8, the second octet specifying VLANs 9 through 16, etc. Within each octet, the most significant bit represents the highest numbered VLAN, and the least significant bit represents the lowest numbered VLAN. Thus, each actually passed VLAN of the trunk port is represented by a single bit within the value of this object. If that bit has a value of '1' then that VLAN is actually passed in the set of VLANs; the VLAN is not actually passed if its bit has a value of '0'.")
hh3cifVLANTrunkPassListHigh = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 5, 1, 3, 1, 5), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cifVLANTrunkPassListHigh.setStatus('current')
if mibBuilder.loadTexts: hh3cifVLANTrunkPassListHigh.setDescription("Each octet within this value specifies a set of eight VLANs, with the first octet specifying VLANs 2049 through 2056, the second octet specifying VLANs 2057 through 2064, etc. Within each octet, the most significant bit represents the highest numbered VLAN, and the least significant bit represents the lowest numbered VLAN. Thus, each actually passed VLAN of the trunk port is represented by a single bit within the value of this object. If that bit has a value of '1' then that VLAN is actually passed in the set of VLANs; the VLAN is not actually passed if its bit has a value of '0'.")
hh3cifVLANTrunkAllowListLow = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 5, 1, 3, 1, 6), OctetString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cifVLANTrunkAllowListLow.setStatus('current')
if mibBuilder.loadTexts: hh3cifVLANTrunkAllowListLow.setDescription("Each octet within this value specifies a set of eight VLANs, with the first octet specifying VLANs 1 through 8, the second octet specifying VLANs 9 through 16, etc. Within each octet, the most significant bit represents the highest numbered VLAN, and the least significant bit represents the lowest numbered VLAN. Thus, each allowed VLAN of the trunk port is represented by a single bit within the value of this object. If that bit has a value of '1' then that VLAN is allowed in the set of VLANs; the VLAN is not allowed if its bit has a value of '0'.")
hh3cifVLANTrunkAllowListHigh = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 5, 1, 3, 1, 7), OctetString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cifVLANTrunkAllowListHigh.setStatus('current')
if mibBuilder.loadTexts: hh3cifVLANTrunkAllowListHigh.setDescription("Each octet within this value specifies a set of eight VLANs, with the first octet specifying VLANs 2049 through 2056, the second octet specifying VLANs 2057 through 2064, etc. Within each octet, the most significant bit represents the highest numbered VLAN, and the least significant bit represents the lowest numbered VLAN. Thus, each allowed VLAN of the trunk port is represented by a single bit within the value of this object. If that bit has a value of '1' then that VLAN is allowed in the set of VLANs; the VLAN is not allowed if its bit has a value of '0'.")
hh3cethernetTable = MibTable((1, 3, 6, 1, 4, 1, 25506, 8, 35, 5, 1, 4), )
if mibBuilder.loadTexts: hh3cethernetTable.setStatus('current')
if mibBuilder.loadTexts: hh3cethernetTable.setDescription('Ethernet port attribute table.')
hh3cethernetEntry = MibTableRow((1, 3, 6, 1, 4, 1, 25506, 8, 35, 5, 1, 4, 1), )
ifEntry.registerAugmentions(("HH3C-LswINF-MIB", "hh3cethernetEntry"))
hh3cethernetEntry.setIndexNames(*ifEntry.getIndexNames())
if mibBuilder.loadTexts: hh3cethernetEntry.setStatus('current')
if mibBuilder.loadTexts: hh3cethernetEntry.setDescription('Entries of Ethernet port attribute table')
hh3cifEthernetDuplex = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 5, 1, 4, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("full", 1), ("half", 2), ("auto", 3)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cifEthernetDuplex.setStatus('current')
if mibBuilder.loadTexts: hh3cifEthernetDuplex.setDescription('Ethernet interface mode.')
hh3cifEthernetMTU = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 5, 1, 4, 1, 4), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cifEthernetMTU.setStatus('current')
if mibBuilder.loadTexts: hh3cifEthernetMTU.setDescription('MTU on the Ethernet interface.')
hh3cifEthernetSpeed = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 5, 1, 4, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 10, 100, 1000, 10000, 24000))).clone(namedValues=NamedValues(("auto", 0), ("s10M", 10), ("s100M", 100), ("s1000M", 1000), ("s10000M", 10000), ("s24000M", 24000)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cifEthernetSpeed.setStatus('current')
if mibBuilder.loadTexts: hh3cifEthernetSpeed.setDescription('Ethernet interface speed.')
hh3cifEthernetMdi = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 5, 1, 4, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("mdi-ii", 1), ("mdi-x", 2), ("mdi-auto", 3)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cifEthernetMdi.setStatus('current')
if mibBuilder.loadTexts: hh3cifEthernetMdi.setDescription('Type of the line connected to the port. MDI-II (straight-through cable): 1 MDI-X (crossover cable): 2 MDI-AUTO (auto-sensing): 3')
hh3cMaxMacLearn = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 5, 1, 4, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-1, 2147483647))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cMaxMacLearn.setStatus('current')
if mibBuilder.loadTexts: hh3cMaxMacLearn.setDescription('The maximum number of MAC addresses that the port can learn. The value -1 means that the number of Mac addresses that the port can learn is unlimited.')
hh3cifMacAddressLearn = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 5, 1, 4, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cifMacAddressLearn.setStatus('current')
if mibBuilder.loadTexts: hh3cifMacAddressLearn.setDescription('This object indicates if the interface is allowed to learn mac address. eanbled(1) means the interface can learn mac address, otherwise disabled(2) can be set.')
hh3cifEthernetTest = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 5, 1, 4, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1))).clone(namedValues=NamedValues(("test", 1)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cifEthernetTest.setStatus('current')
if mibBuilder.loadTexts: hh3cifEthernetTest.setDescription('Test this interface. The actual testing will be different according to products. Read operation not supported.')
hh3cifMacAddrLearnMode = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 5, 1, 4, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("iVL", 1), ("sVL", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cifMacAddrLearnMode.setStatus('current')
if mibBuilder.loadTexts: hh3cifMacAddrLearnMode.setDescription('Status indicates mac address learn mode of the interface. IVL(1) means independent VLAN learning. SVL means shared VLAN learning.')
hh3cifEthernetFlowInterval = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 5, 1, 4, 1, 12), Integer32().subtype(subtypeSpec=ValueRangeConstraint(5, 300))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cifEthernetFlowInterval.setStatus('current')
if mibBuilder.loadTexts: hh3cifEthernetFlowInterval.setDescription('Set flow interval of the ethernet. The NMS should set value to integer which is a multiple of 5.')
hh3cifEthernetIsolate = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 5, 1, 4, 1, 13), OctetString()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cifEthernetIsolate.setStatus('current')
if mibBuilder.loadTexts: hh3cifEthernetIsolate.setDescription("Isolate group means that all ports in the same isolate group can not send and receive packets each other. Each octet within this value specifies a set of eight isolate groups, with the first octet specifying isolate groups 1 through 8, the second octet specifying isolate groups 9 through 16, etc. Within each octet, the leftmost bit is the first bit. the first bit represents the lowest numbered isolate group, and the last bit represents the highest numbered isolate group. one port can belong to more than one isolate group. Thus, each isolate group is represented by a single bit within the value of this object. If that bit has a value of '1', then that isolate group includes this port; the port is not included if its bit has a value of '0'. for example, the first octet is '10000100' means that the port is included in the isolate group 1 and isolate group 6.")
hh3cifVlanVPNStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 5, 1, 4, 1, 14), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cifVlanVPNStatus.setStatus('current')
if mibBuilder.loadTexts: hh3cifVlanVPNStatus.setDescription('Vlan VPN enable status.')
hh3cifVlanVPNUplinkStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 5, 1, 4, 1, 15), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cifVlanVPNUplinkStatus.setStatus('current')
if mibBuilder.loadTexts: hh3cifVlanVPNUplinkStatus.setDescription('Vlan VPN uplink status.')
hh3cifVlanVPNTPID = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 5, 1, 4, 1, 16), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cifVlanVPNTPID.setStatus('current')
if mibBuilder.loadTexts: hh3cifVlanVPNTPID.setDescription('Port based Vlan VPN TPID(Tag Protocol Indentifier), default value is 0x8100. Please refer to hh3cVlanVPNTPIDMode to get more information.')
hh3cifIsolateGroupID = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 5, 1, 4, 1, 17), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cifIsolateGroupID.setStatus('current')
if mibBuilder.loadTexts: hh3cifIsolateGroupID.setDescription('Isolate group identifier. Value zero means this interface does not belong to any isolate group.')
hh3cifisUplinkPort = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 5, 1, 4, 1, 18), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("yes", 1), ("no", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cifisUplinkPort.setStatus('current')
if mibBuilder.loadTexts: hh3cifisUplinkPort.setDescription('Ethernet uplink status, default value is 2.')
hh3cifEthernetAutoSpeedMask = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 5, 1, 4, 1, 19), SpeedModeFlag()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cifEthernetAutoSpeedMask.setStatus('current')
if mibBuilder.loadTexts: hh3cifEthernetAutoSpeedMask.setDescription("This object specifies which kinds of speed mode can be negotiated. Each bit corresponds to a kind of speed mode. If the value of a bit is '1', it means the corresponding speed mode is negotiable on the port. Otherwise the negotiation for that kind of speed mode is not supported on this port. If there are several negotiable speed modes, all bits for them are '1'. For example, if the speed mode 's10M' and 's1000M' can be negotiable, the value of this object is 0xA0.")
hh3cifEthernetAutoSpeed = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 5, 1, 4, 1, 20), SpeedModeFlag()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cifEthernetAutoSpeed.setStatus('current')
if mibBuilder.loadTexts: hh3cifEthernetAutoSpeed.setDescription("This object indicates which kinds of speed mode are negotiable on this port. Only when a bit of hh3cifEthernetAutoSpeedMask is '1', the corresponding bit of this object can be set to '1', indicating the corresponding speed mode is negotiable. For example, if the value of hh3cifEthernetAutoSpeedMask is 0xA0, which indicates speed mode 's10M' and 's1000M' are negotiable, the possible value of this object should be one of the four values (0x00, 0x20, 0x80 and 0xA0). If the value of hh3cifEthernetSpeed is not 'auto', the value of this object is insignificant and should be ignored. The value length of this object should be as long as that of hh3cifEthernetAutoSpeedMask.")
hh3cIsolateGroupMax = MibScalar((1, 3, 6, 1, 4, 1, 25506, 8, 35, 5, 1, 5), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cIsolateGroupMax.setStatus('current')
if mibBuilder.loadTexts: hh3cIsolateGroupMax.setDescription('Max isolate group that this device support, the value is zero means that the device does not support isolate group.')
hh3cGlobalBroadcastMaxPps = MibScalar((1, 3, 6, 1, 4, 1, 25506, 8, 35, 5, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 14881000))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cGlobalBroadcastMaxPps.setStatus('current')
if mibBuilder.loadTexts: hh3cGlobalBroadcastMaxPps.setDescription('The global max packets per second. When it is set, the value of BroadcastMaxPps in all ports will be changed to that setting.')
hh3cGlobalBroadcastMaxRatio = MibScalar((1, 3, 6, 1, 4, 1, 25506, 8, 35, 5, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 100))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cGlobalBroadcastMaxRatio.setStatus('current')
if mibBuilder.loadTexts: hh3cGlobalBroadcastMaxRatio.setDescription('The global max-ratio of broadcast from 0 to 100 percent. When it is set, the value of BroadcastMaxRatio in all ports will be changed to that setting.')
hh3cBpduTunnelStatus = MibScalar((1, 3, 6, 1, 4, 1, 25506, 8, 35, 5, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cBpduTunnelStatus.setStatus('current')
if mibBuilder.loadTexts: hh3cBpduTunnelStatus.setDescription('Bpdu tunnel enable status.')
hh3cVlanVPNTPIDMode = MibScalar((1, 3, 6, 1, 4, 1, 25506, 8, 35, 5, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("port-based", 1), ("global", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cVlanVPNTPIDMode.setStatus('current')
if mibBuilder.loadTexts: hh3cVlanVPNTPIDMode.setDescription("Vlan VPN TPID mode. The value 'port-based' means VLAN VPN TPID value would be set based on port via hh3cifVlanVPNTPID. In this situation, hh3cVlanVPNTPID is meaningless and always return 0x8100. The value 'global' means VLAN VPN TPID value should be set globally via hh3cVlanVPNTPID. In this situation, hh3cifVlanVPNTPID in hh3cethernetTable has the same value with hh3cVlanVPNTPID.")
hh3cVlanVPNTPID = MibScalar((1, 3, 6, 1, 4, 1, 25506, 8, 35, 5, 1, 10), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hh3cVlanVPNTPID.setStatus('current')
if mibBuilder.loadTexts: hh3cVlanVPNTPID.setDescription('Global Vlan VPN TPID(Tag Protocol Indentifier), default value is 0x8100.')
hh3cPortIsolateGroupTable = MibTable((1, 3, 6, 1, 4, 1, 25506, 8, 35, 5, 1, 11), )
if mibBuilder.loadTexts: hh3cPortIsolateGroupTable.setStatus('current')
if mibBuilder.loadTexts: hh3cPortIsolateGroupTable.setDescription('Isolate Group attribute table.')
hh3cPortIsolateGroupEntry = MibTableRow((1, 3, 6, 1, 4, 1, 25506, 8, 35, 5, 1, 11, 1), ).setIndexNames((0, "HH3C-LswINF-MIB", "hh3cPortIsolateGroupIndex"))
if mibBuilder.loadTexts: hh3cPortIsolateGroupEntry.setStatus('current')
if mibBuilder.loadTexts: hh3cPortIsolateGroupEntry.setDescription('The entry of hh3cPortIsolateGroupTable.')
hh3cPortIsolateGroupIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 5, 1, 11, 1, 1), Integer32())
if mibBuilder.loadTexts: hh3cPortIsolateGroupIndex.setStatus('current')
if mibBuilder.loadTexts: hh3cPortIsolateGroupIndex.setDescription('Port isolate group identifier. The index of the hh3cPortIsolateGroupTable. The value ranges from 1 to the limit of isolate group quantity.')
hh3cPortIsolateUplinkIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 5, 1, 11, 1, 2), InterfaceIndex()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: hh3cPortIsolateUplinkIfIndex.setStatus('current')
if mibBuilder.loadTexts: hh3cPortIsolateUplinkIfIndex.setDescription('Index number of the uplink interface.')
hh3cPortIsolateGroupRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 5, 1, 11, 1, 3), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: hh3cPortIsolateGroupRowStatus.setStatus('current')
if mibBuilder.loadTexts: hh3cPortIsolateGroupRowStatus.setDescription('Current operation status of the row.')
hh3cPortIsolateGroupDescription = MibTableColumn((1, 3, 6, 1, 4, 1, 25506, 8, 35, 5, 1, 11, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: hh3cPortIsolateGroupDescription.setStatus('current')
if mibBuilder.loadTexts: hh3cPortIsolateGroupDescription.setDescription('Port isolate group description, default value is zero-length string.')
hh3cMaxMacLearnRange = MibScalar((1, 3, 6, 1, 4, 1, 25506, 8, 35, 5, 1, 12), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hh3cMaxMacLearnRange.setStatus('current')
if mibBuilder.loadTexts: hh3cMaxMacLearnRange.setDescription('The maximum number of MAC address that the port supports.')
mibBuilder.exportSymbols("HH3C-LswINF-MIB", hh3cMaxMacLearn=hh3cMaxMacLearn, hh3cifPpsUniSuppression=hh3cifPpsUniSuppression, hh3cifEthernetFlowInterval=hh3cifEthernetFlowInterval, hh3cifVLANType=hh3cifVLANType, hh3cGlobalBroadcastMaxRatio=hh3cGlobalBroadcastMaxRatio, hh3cifPpsMulSuppression=hh3cifPpsMulSuppression, hh3cifAggregateModel=hh3cifAggregateModel, hh3cIsolateGroupMax=hh3cIsolateGroupMax, hh3cifVLANTrunkAllowListLow=hh3cifVLANTrunkAllowListLow, hh3cifEthernetMdi=hh3cifEthernetMdi, hh3cifHybridPortIndex=hh3cifHybridPortIndex, hh3cVlanVPNTPID=hh3cVlanVPNTPID, hh3cifEthernetSpeed=hh3cifEthernetSpeed, hh3cifEthernetMTU=hh3cifEthernetMTU, hh3cifEthernetDuplex=hh3cifEthernetDuplex, hh3cLswL2InfMibObject=hh3cLswL2InfMibObject, hh3cifisUplinkPort=hh3cifisUplinkPort, hh3cifVLANTrunkPassListLow=hh3cifVLANTrunkPassListLow, hh3cBpduTunnelStatus=hh3cBpduTunnelStatus, hh3cifBMbpsUniSuppressionMax=hh3cifBMbpsUniSuppressionMax, hh3cifComboPortTable=hh3cifComboPortTable, SpeedModeFlag=SpeedModeFlag, hh3cifXXDevPortIndex=hh3cifXXDevPortIndex, hh3cifVlanVPNTPID=hh3cifVlanVPNTPID, hh3cifClearStat=hh3cifClearStat, hh3cifVLANTrunkAllowListHigh=hh3cifVLANTrunkAllowListHigh, hh3cifAggregatePort=hh3cifAggregatePort, hh3cPortIsolateGroupRowStatus=hh3cPortIsolateGroupRowStatus, hh3cPortIsolateGroupDescription=hh3cPortIsolateGroupDescription, hh3cifInNormalPkts=hh3cifInNormalPkts, hh3cifAggregatePortIndex=hh3cifAggregatePortIndex, hh3cifOutPayloadOctets=hh3cifOutPayloadOctets, hh3cifHybridUnTaggedVlanListHigh=hh3cifHybridUnTaggedVlanListHigh, hh3cifISPhyPort=hh3cifISPhyPort, hh3cifUnknownPacketDropMul=hh3cifUnknownPacketDropMul, hh3cifBKbpsUniSuppressionStep=hh3cifBKbpsUniSuppressionStep, hh3cifPpsMulSuppressionMax=hh3cifPpsMulSuppressionMax, hh3cifEthernetAutoSpeedMask=hh3cifEthernetAutoSpeedMask, hh3cifUniSuppression=hh3cifUniSuppression, hh3cifMacAddressLearn=hh3cifMacAddressLearn, hh3cPortIsolateGroupIndex=hh3cPortIsolateGroupIndex, hh3cifInPkts=hh3cifInPkts, hh3cifMcastControl=hh3cifMcastControl, hh3cifBKbpsUniSuppressionMax=hh3cifBKbpsUniSuppressionMax, hh3cifVLANTrunkStatusTable=hh3cifVLANTrunkStatusTable, hh3cLswL2InfMib=hh3cLswL2InfMib, hh3cifMulSuppressionStep=hh3cifMulSuppressionStep, DropDirection=DropDirection, hh3cifBMbpsMulSuppressionMax=hh3cifBMbpsMulSuppressionMax, hh3cifHybridTaggedVlanListHigh=hh3cifHybridTaggedVlanListHigh, hh3cifVLANTrunkStatusEntry=hh3cifVLANTrunkStatusEntry, hh3cifEthernetTest=hh3cifEthernetTest, hh3cifVLANTrunkIndex=hh3cifVLANTrunkIndex, hh3cifComboPortCurActive=hh3cifComboPortCurActive, PYSNMP_MODULE_ID=hh3cLswL2InfMib, hh3cPortIsolateGroupEntry=hh3cPortIsolateGroupEntry, hh3cifInPayloadOctets=hh3cifInPayloadOctets, hh3cifAggregatePortName=hh3cifAggregatePortName, hh3cifInErrorPktsRate=hh3cifInErrorPktsRate, hh3cifSrcMacControl=hh3cifSrcMacControl, InterfaceIndex=InterfaceIndex, hh3cifXXBasePortIndex=hh3cifXXBasePortIndex, hh3cifHybridPortTable=hh3cifHybridPortTable, hh3cSlotPortMax=hh3cSlotPortMax, hh3cifVLANTrunkGvrpRegistration=hh3cifVLANTrunkGvrpRegistration, hh3cPortIsolateUplinkIfIndex=hh3cPortIsolateUplinkIfIndex, hh3cLswExtInterface=hh3cLswExtInterface, hh3cifOutPkts=hh3cifOutPkts, hh3cifHybridTaggedVlanListLow=hh3cifHybridTaggedVlanListLow, hh3cifIsolateGroupID=hh3cifIsolateGroupID, PortList=PortList, hh3cPortIsolateGroupTable=hh3cPortIsolateGroupTable, hh3cifAggregateTable=hh3cifAggregateTable, hh3cifEthernetAutoSpeed=hh3cifEthernetAutoSpeed, hh3cifPpsUniSuppressionMax=hh3cifPpsUniSuppressionMax, hh3cifBKbpsUniSuppression=hh3cifBKbpsUniSuppression, VlanIndex=VlanIndex, hh3cifHybridUnTaggedVlanListLow=hh3cifHybridUnTaggedVlanListLow, hh3cifBKbpsMulSuppressionStep=hh3cifBKbpsMulSuppressionStep, hh3cSwitchPortMax=hh3cSwitchPortMax, hh3cifBMbpsUniSuppression=hh3cifBMbpsUniSuppression, hh3cifComboPortEntry=hh3cifComboPortEntry, hh3cifVlanVPNStatus=hh3cifVlanVPNStatus, hh3cifXXEntry=hh3cifXXEntry, hh3cifMirrorPort=hh3cifMirrorPort, hh3cifEthernetIsolate=hh3cifEthernetIsolate, hh3cifMulSuppression=hh3cifMulSuppression, hh3cGlobalBroadcastMaxPps=hh3cGlobalBroadcastMaxPps, hh3cifComboActivePort=hh3cifComboActivePort, hh3cifUniSuppressionStep=hh3cifUniSuppressionStep, hh3cifMacAddrLearnMode=hh3cifMacAddrLearnMode, hh3cifAggregateOperStatus=hh3cifAggregateOperStatus, hh3cifXXTable=hh3cifXXTable, hh3cifPpsMcastControl=hh3cifPpsMcastControl, hh3cifVlanVPNUplinkStatus=hh3cifVlanVPNUplinkStatus, hh3cifFlowControl=hh3cifFlowControl, hh3cifPpsBcastDisValControl=hh3cifPpsBcastDisValControl, hh3cMaxMacLearnRange=hh3cMaxMacLearnRange, hh3cethernetEntry=hh3cethernetEntry, hh3cifHybridPortEntry=hh3cifHybridPortEntry, hh3cethernetTable=hh3cethernetTable, hh3cifAggregateEntry=hh3cifAggregateEntry, hh3cifAggregatePortListPorts=hh3cifAggregatePortListPorts, hh3cifBKbpsMulSuppressionMax=hh3cifBKbpsMulSuppressionMax, hh3cifBMbpsMulSuppression=hh3cifBMbpsMulSuppression, hh3cVlanVPNTPIDMode=hh3cVlanVPNTPIDMode, hh3cifUnBoundPort=hh3cifUnBoundPort, hh3cifVLANTrunkPassListHigh=hh3cifVLANTrunkPassListHigh, hh3cifBKbpsMulSuppression=hh3cifBKbpsMulSuppression, hh3cifUnknownPacketDropUni=hh3cifUnknownPacketDropUni, hh3cifComboPortIndex=hh3cifComboPortIndex)
|
dt = 1/10
a = gamma.pdf( np.arange(0,10,dt), 2.5, 0 )
t = np.arange(0,10,dt)
# what should go into the np.cumsum() function?
v = np.cumsum(a*dt)
# this just plots your velocity:
with plt.xkcd():
plt.figure(figsize=(10,6))
plt.plot(t,a,label='acceleration [$m/s^2$]')
plt.plot(t,v,label='velocity [$m/s$]')
plt.xlabel('time [s]')
plt.ylabel('[motion]')
plt.legend(facecolor='xkcd:white')
plt.show() |
__author__ = "Manuel Escriche <[email protected]>"
class BacklogIssuesModel:
def __init__(self):
self.__entryTypes = ('Epic', 'Feature', 'Story', 'Bug', 'WorkItem')
self.longTermTypes = ('Epic',)
self.midTermTypes = ('Feature',)
self.shortTermTypes = ('Story','Bug','WorkItem')
@property
def types(self): return self.__entryTypes
@property
def story(self): return ('Story',)
@property
def operativeTypes(self): return self.shortTermTypes + self.midTermTypes
@property
def organizingTypes(self): return self.longTermTypes
@property
def open(self):
return self.longTermTypes + self.midTermTypes
@property
def private(self):
return self.shortTermTypes
@property
def workitem(self):
return 'WorkItem'
backlogIssuesModel = BacklogIssuesModel()
if __name__ == "__main__":
pass
|
# Gitlab-UI: Settings -> General
# https://python-gitlab.readthedocs.io/en/stable/gl_objects/projects.html
# https://docs.gitlab.com/ce/api/projects.html#edit-project
def configure_project_general_settings(project):
print("Configuring general project settings:", project.name)
# Set whether merge requests can only be merged with successful jobs
# boolean
project.only_allow_merge_if_pipeline_succeeds = True
# Set whether or not merge requests can be merged with skipped jobs
# boolean
# Note: This is generally the recommended setting, but has to be changed for certain projects probably
project.allow_merge_on_skipped_pipeline = False
# Set whether merge requests can only be merged when all the discussions are resolved
# boolean
project.only_allow_merge_if_all_discussions_are_resolved = True
# There are currently three options for merge_method to choose from:
# merge: A merge commit is created for every merge, and merging is allowed as long as there are no conflicts.
# rebase_merge: A merge commit is created for every merge, but merging is only allowed if fast-forward merge is possible. This way you could make sure that if this merge request would build, after merging to target branch it would also build.
# ff: No merge commits are created and all merges are fast-forwarded, which means that merging is only allowed if the branch could be fast-forwarded
project.merge_method = 'ff'
# Enable Delete source branch option by default for all new merge requests
# boolean
project.remove_source_branch_after_merge = True
# How many approvers should approve merge request by default
# integer
project.approvals_before_merge = 2
project.save()
print("Saved project:", project.name)
return
|
# Birthday Chocolate
# Given an array of integers, find the number of subarrays of length k having sum s.
#
# https://www.hackerrank.com/challenges/the-birthday-bar/problem
#
def solve(n, s, d, m):
# Complete this function
return sum(1 for i in range(len(s) - m + 1) if sum(s[i:i + m]) == d)
n = int(input().strip())
s = list(map(int, input().strip().split(' ')))
d, m = input().strip().split(' ')
d, m = [int(d), int(m)]
result = solve(n, s, d, m)
print(result)
|
# Test changing propagated properties
def test_public_propagation_from_project(data_builder, as_admin):
"""
Tests:
- 'public' is a propagated property
"""
project = data_builder.create_project()
session = data_builder.create_session()
acquisition = data_builder.create_acquisition()
payload = {'public': False}
r = as_admin.put('/projects/' + project, json=payload)
assert r.ok
r = as_admin.get('/projects/' + project)
assert r.ok and not r.json()['public']
r = as_admin.get('/sessions/' + session)
assert r.ok and not r.json()['public']
r = as_admin.get('/acquisitions/' + acquisition)
assert r.ok and not r.json()['public']
def test_public_propagation_from_session(data_builder, as_admin):
"""
Tests:
- propagation works from a session level
"""
session = data_builder.create_session()
acquisition = data_builder.create_acquisition()
payload = {'public': True}
r = as_admin.put('/sessions/' + session, json=payload)
assert r.ok
r = as_admin.get('/sessions/' + session)
assert r.ok and r.json()['public']
r = as_admin.get('/acquisitions/' + acquisition)
assert r.ok and r.json()['public']
def test_set_public_acquisition(data_builder, as_admin):
"""
Tests:
- setting a propagated property on an acquisition does not attempt to propagate (would hit Exception)
"""
acquisition = data_builder.create_acquisition()
payload = {'public': True}
r = as_admin.put('/acquisitions/' + acquisition, json=payload)
assert r.ok
# Test propagation of project permission changes
def test_add_and_remove_user_for_project_permissions(data_builder, as_admin):
"""
Tests:
- changing permissions at a project level triggers propagation
- additive change to list propagates properly
- change to list propagates properly
- removal from list propagates properly
"""
def get_user_in_perms(perms, uid):
for perm in perms:
if perm['_id'] == uid:
return perm
return None
project = data_builder.create_project()
session = data_builder.create_session()
acquisition = data_builder.create_acquisition()
user_id = '[email protected]'
# Add user to project permissions
payload = {'_id': user_id, 'access': 'admin'}
r = as_admin.post('/projects/' + project + '/permissions', json=payload)
assert r.ok
r = as_admin.get('/projects/' + project)
perms = r.json()['permissions']
user = get_user_in_perms(perms, user_id)
assert r.ok and user
r = as_admin.get('/sessions/' + session)
perms = r.json()['permissions']
user = get_user_in_perms(perms, user_id)
assert r.ok and user
r = as_admin.get('/acquisitions/' + acquisition)
perms = r.json()['permissions']
user = get_user_in_perms(perms, user_id)
assert r.ok and user
# Modify user permissions
payload = {'access': 'rw', '_id': user_id}
r = as_admin.put('/projects/' + project + '/permissions/' + user_id, json=payload)
assert r.ok
r = as_admin.get('/projects/' + project)
perms = r.json()['permissions']
user = get_user_in_perms(perms, user_id)
assert r.ok and user and user['access'] == 'rw'
r = as_admin.get('/sessions/' + session)
perms = r.json()['permissions']
user = get_user_in_perms(perms, user_id)
assert r.ok and user and user['access'] == 'rw'
r = as_admin.get('/acquisitions/' + acquisition)
perms = r.json()['permissions']
user = get_user_in_perms(perms, user_id)
assert r.ok and user and user['access'] == 'rw'
# Remove user from project permissions
r = as_admin.delete('/projects/' + project + '/permissions/' + user_id, json=payload)
assert r.ok
r = as_admin.get('/projects/' + project)
perms = r.json()['permissions']
user = get_user_in_perms(perms, user_id)
assert r.ok and user is None
r = as_admin.get('/sessions/' + session)
perms = r.json()['permissions']
user = get_user_in_perms(perms, user_id)
assert r.ok and user is None
r = as_admin.get('/acquisitions/' + acquisition)
perms = r.json()['permissions']
user = get_user_in_perms(perms, user_id)
assert r.ok and user is None
# Test group permission propagation
def test_add_and_remove_user_group_permission(data_builder, as_admin):
"""
Tests:
- changing permissions at a group level with flag triggers propagation
- additive change to list propagates properly
- change to list propagates properly
- removal from list propagates properly
"""
def get_user_in_perms(perms, uid):
for perm in perms:
if perm['_id'] == uid:
return perm
return None
group = data_builder.create_group()
project = data_builder.create_project()
session = data_builder.create_session()
acquisition = data_builder.create_acquisition()
user_id = '[email protected]'
# Add user to group permissions
payload = {'_id': user_id, 'access': 'admin'}
r = as_admin.post('/groups/' + group + '/permissions', json=payload, params={'propagate': 'true'})
assert r.ok
# Add project without default group perms
r = as_admin.post('/projects', params={'inherit': 'false'}, json={'label': 'project2', 'group': group})
assert r.ok
project2 = r.json()['_id']
r = as_admin.get('/groups/' + group)
perms = r.json()['permissions']
user = get_user_in_perms(perms, user_id)
assert r.ok and user
r = as_admin.get('/projects/' + project)
perms = r.json()['permissions']
user = get_user_in_perms(perms, user_id)
assert r.json()['group'] == group
assert r.ok and user
r = as_admin.get('/sessions/' + session)
perms = r.json()['permissions']
user = get_user_in_perms(perms, user_id)
assert r.ok and user
r = as_admin.get('/acquisitions/' + acquisition)
perms = r.json()['permissions']
user = get_user_in_perms(perms, user_id)
assert r.ok and user
# Modify user permissions
payload = {'access': 'rw', '_id': user_id}
r = as_admin.put('/groups/' + group + '/permissions/' + user_id, json=payload, params={'propagate': 'true'})
assert r.ok
r = as_admin.get('/groups/' + group)
perms = r.json()['permissions']
user = get_user_in_perms(perms, user_id)
assert r.ok and user and user['access'] == 'rw'
r = as_admin.get('/projects/' + project)
perms = r.json()['permissions']
user = get_user_in_perms(perms, user_id)
assert r.ok and user and user['access'] == 'rw'
r = as_admin.get('/projects/' + project2)
perms = r.json()['permissions']
user = get_user_in_perms(perms, user_id)
assert r.ok and user and user['access'] == 'rw'
r = as_admin.get('/sessions/' + session)
perms = r.json()['permissions']
user = get_user_in_perms(perms, user_id)
assert r.ok and user and user['access'] == 'rw'
r = as_admin.get('/acquisitions/' + acquisition)
perms = r.json()['permissions']
user = get_user_in_perms(perms, user_id)
assert r.ok and user and user['access'] == 'rw'
# Remove user from project permissions
r = as_admin.delete('/groups/' + group + '/permissions/' + user_id, json=payload, params={'propagate': 'true'})
assert r.ok
r = as_admin.get('/groups/' + group)
perms = r.json()['permissions']
user = get_user_in_perms(perms, user_id)
assert r.ok and user is None
r = as_admin.get('/projects/' + project)
perms = r.json()['permissions']
user = get_user_in_perms(perms, user_id)
assert r.ok and user is None
r = as_admin.get('/sessions/' + session)
perms = r.json()['permissions']
user = get_user_in_perms(perms, user_id)
assert r.ok and user is None
r = as_admin.get('/acquisitions/' + acquisition)
perms = r.json()['permissions']
user = get_user_in_perms(perms, user_id)
assert r.ok and user is None
# Delete empty project 2
r= as_admin.delete('/projects/' + project2)
assert r.ok
# Test tag pool renaming and deletion
def test_add_rename_remove_group_tag(data_builder, as_admin):
"""
Tests:
- propagation from the group level
- renaming tag at group level renames tags in hierarchy
- deleting tag at group level renames tags in hierarchy
"""
group = data_builder.create_group()
project = data_builder.create_project()
session = data_builder.create_session()
acquisition = data_builder.create_acquisition()
tag = 'test tag'
tag_renamed = 'test tag please ignore'
# Add tag to hierarchy
payload = {'value': tag}
r = as_admin.post('/groups/' + group + '/tags', json=payload)
assert r.ok
r = as_admin.post('/projects/' + project + '/tags', json=payload)
assert r.ok
r = as_admin.post('/sessions/' + session + '/tags', json=payload)
assert r.ok
r = as_admin.post('/acquisitions/' + acquisition + '/tags', json=payload)
assert r.ok
r = as_admin.get('/groups/' + group)
assert r.ok and tag in r.json()['tags']
r = as_admin.get('/projects/' + project)
assert r.ok and tag in r.json()['tags']
r = as_admin.get('/sessions/' + session)
assert r.ok and tag in r.json()['tags']
r = as_admin.get('/acquisitions/' + acquisition)
assert r.ok and tag in r.json()['tags']
# Rename tag
payload = {'value': tag_renamed}
r = as_admin.put('/groups/' + group + '/tags/' + tag, json=payload)
assert r.ok
r = as_admin.get('/groups/' + group)
assert r.ok and tag_renamed in r.json()['tags']
r = as_admin.get('/projects/' + project)
assert r.ok and tag_renamed in r.json()['tags']
r = as_admin.get('/sessions/' + session)
assert r.ok and tag_renamed in r.json()['tags']
r = as_admin.get('/acquisitions/' + acquisition)
assert r.ok and tag_renamed in r.json()['tags']
# Delete tag
r = as_admin.delete('/groups/' + group + '/tags/' + tag_renamed)
assert r.ok
r = as_admin.get('/groups/' + group)
assert r.ok and tag_renamed not in r.json()['tags']
r = as_admin.get('/projects/' + project)
assert r.ok and tag_renamed not in r.json()['tags']
r = as_admin.get('/sessions/' + session)
assert r.ok and tag_renamed not in r.json()['tags']
r = as_admin.get('/acquisitions/' + acquisition)
assert r.ok and tag_renamed not in r.json()['tags']
|
logFile = open("log.log", "r")
#print("score time")
#line = logFile.readline()
#line = "line"
i = 0
for line in logFile:
i += 1
if (i % 1 != 0): # Rendering all points takes time in LaTeX, skip some
continue
words = line.split()
score = words[0]
time = words[2].replace("s", "")
minutes = int(time)/60.0
#print(score + " " + str(round(minutes, 2)) + "") # Time
print(score + " " + i + "") # Count episodes
logFile.close() |
{
"variables": {
"gypkg_deps": [
# Place for `gypkg` dependencies
"git://github.com/libuv/libuv@^1.7.0 => uv.gyp:libuv",
],
},
"targets": [ {
"target_name": "latetyper",
"type": "executable",
"dependencies": [
"<!@(gypkg deps <(gypkg_deps))",
# Place for local dependencies
],
"direct_dependent_settings": {
"include_dirs": [
# Place for public includes
"include",
],
},
"include_dirs": [
# Place for private includes
".",
],
"sources": [
# Place for source files
"src/main.c",
],
"libraries": [
"-framework CoreFoundation",
"-framework CoreGraphics",
],
} ],
}
|
grid = []
for r in range(20):
row = [int(x) for x in input().split(' ')]
grid.append(row)
mx = 0
for i in range(20):
for j in range(17):
prod = grid[i][j] * grid[i][j+1] * grid[i][j+2] * grid[i][j+3]
if prod > mx:
mx = prod
prod = grid[j][i] * grid[j+1][i] * grid[j+2][i] * grid[j+3][i]
if prod > mx:
mx = prod
for i in range(17):
for j in range(17):
prod = grid[i][j] * grid[i+1][j+1] * grid[i+2][j+2] * grid[i+3][j+3]
if prod > mx:
mx = prod
for i in range(17):
for j in range(3,20):
prod = grid[i][j] * grid[i+1][j-1] * grid[i+2][j-2] * grid[i+3][j-3]
if prod > mx:
mx = prod
print(str(mx))
|
"""
Immutable data structures.
The classes in this module have the prefix 'immutable' to avoid confusion
with the built-in ``frozenset``, which does not have any modification methods,
even pure ones.
"""
class immutabledict(dict):
"""
An immutable version of ``dict``.
Mutating syntax (``del d[k]``, ``d[k] = v``) is prohibited,
pure methods ``del_`` and ``set`` are available instead.
Mutating methods are overridden to return the new dictionary
(or a tuple ``(value, new_dict)`` where applicable)
without mutating the source dictionary.
If a mutating method does not change the dictionary,
the source dictionary itself is returned as the new dictionary.
"""
def clear(self):
return self.__class__()
def copy(self):
return self
def pop(self, *args):
new_dict = self.__class__(self)
value = dict.pop(new_dict, *args)
return value, new_dict
def popitem(self):
new_dict = self.__class__(self)
value = dict.popitem(new_dict)
return value, new_dict
def setdefault(self, *args):
key = args[0]
if key not in self:
new_dict = self.__class__(self)
value = dict.setdefault(new_dict, *args)
return value, new_dict
else:
return self[key], self
def __delitem__(self, key):
raise AttributeError("Item deletion syntax is not available for an immutable dict")
def del_(self, key):
if key in self:
new_dict = self.__class__(self)
dict.__delitem__(new_dict, key)
return new_dict
else:
return self
def __setitem__(self, key, item):
raise AttributeError("Item assignment syntax is not available for an immutable dict")
def set(self, key, value):
if key in self and self[key] is value:
return self
else:
new_dict = self.__class__(self)
dict.__setitem__(new_dict, key, value)
return new_dict
def update(self, *args, **kwds):
if len(kwds) == 0 and len(args) == 0:
return self
if len(args) > 0:
if isinstance(args[0], dict):
new_vals = args[0]
else:
new_vals = dict(args)
else:
new_vals = {}
new_vals.update(kwds)
for kwd, value in new_vals.items():
if self.get(kwd, None) is not value:
break
else:
return self
new_dict = self.__class__(self)
dict.update(new_dict, new_vals)
return new_dict
def __repr__(self):
return "immutabledict(" + dict.__repr__(self) + ")"
class immutableadict(immutabledict):
"""
A subclass of ``immutabledict`` with values being accessible as attributes
(e.g. ``d['a']`` is equivalent to ``d.a``).
"""
def __getattr__(self, attr):
return self[attr]
def __setattr__(self, attr, value):
raise AttributeError("Attribute assignment syntax is not available for an immutable dict")
def __repr__(self):
return "immutableadict(" + dict.__repr__(self) + ")"
class immutableset(set):
"""
An immutable version of ``set``.
Mutating methods are overridden to return the new set
(or a tuple ``(value, new_set)`` where applicable)
without mutating the source set.
If a mutating method does not change the set,
the source set itself is returned as the new set.
"""
def add(self, elem):
if elem in self:
return self
else:
new_set = self.__class__(self)
set.add(new_set, elem)
return new_set
def clear(self):
return self.__class__()
def copy(self):
return self
def discard(self, elem):
if elem in self:
new_set = self.__class__(self)
set.discard(new_set, elem)
return new_set
else:
return self
def pop(self):
new_set = self.__class__(self)
elem = set.pop(new_set)
return elem, new_set
def remove(self, elem):
new_set = self.__class__(self)
set.remove(new_set, elem)
return new_set
def difference(self, *args):
res = self.__class__(set.difference(self, *args))
if res == self:
return self
else:
return res
def __sub__(self, other):
return self.difference(other)
def difference_update(self, *args):
return self.difference(*args)
def __isub__(self, *args):
raise AttributeError("`-=` is not available for an immutable set")
def union(self, *args):
res = self.__class__(set.union(self, *args))
if res == self:
return self
else:
return res
def __or__(self, other):
return self.union(other)
def update(self, *args):
return self.union(*args)
def __ior__(self, *args):
raise AttributeError("`|=` is not available for an immutable set")
def intersection(self, *args):
res = self.__class__(set.intersection(self, *args))
if res == self:
return self
else:
return res
def __and__(self, other):
return self.intersection(other)
def intersection_update(self, *args):
return self.intersection(*args)
def __iand__(self, *args):
raise AttributeError("`&=` is not available for an immutable set")
def symmetric_difference(self, *args):
res = self.__class__(set.symmetric_difference(self, *args))
if res == self:
return self
else:
return res
def __xor__(self, other):
return self.symmetric_difference(other)
def symmetric_difference_update(self, *args):
return self.symmetric_difference(*args)
def __ixor__(self, *args):
raise AttributeError("`^=` is not available for an immutable set")
def __repr__(self):
return set.__repr__(self)
|
def problem4_1(wordlist):
print(wordlist)
wordlist.sort(key=str.lower)
print(wordlist)
#firstline = ["Happy", "families", "are", "all", "alike;", "every", \
# "unhappy", "family", "is", "unhappy", "in", "its", "own", \
# "way.", "Leo Tolstoy", "Anna Karenina"]
#problem4_1(firstline)
|
# 1346. Check If N and Its Double Exist
# Runtime: 40 ms, faster than 98.82% of Python3 online submissions for Check If N and Its Double Exist.
# Memory Usage: 14.4 MB, less than 9.05% of Python3 online submissions for Check If N and Its Double Exist.
class Solution:
def checkIfExist(self, arr: list[int]) -> bool:
prev = set()
for i, n in enumerate(arr):
if n * 2 in prev or n * 0.5 in prev:
return True
if n not in prev:
prev.add(n)
return False |
class Subject:
def __init__(self):
self.observers = []
def attach(self, observer):
if observer not in self.observers:
self.observers.append(observer)
def detach(self, observer):
try:
self.observers.remove(observer)
except Exception as e:
print('Found exception')
def notify(self, modifier=None):
for observer in self.observers:
observer.update(self)
class Core(Subject):
def __init__(self, n=''):
Subject.__init__(self)
self.name = n
self._temp = 0
@property
def temp(self):
return self._temp
@temp.setter
def temp(self, temp):
self._temp = temp
self.notify()
class TempObserver:
def __init__(self, n=''):
self.name = n
def update(self, subject):
print(f'{self.name} Temperature: {subject.name} {subject.temp}')
def check_observer():
c1 = Core('c1')
c2 = Core('c2')
o1 = TempObserver('o1')
o2 = TempObserver('o2')
c1.attach(o1)
c1.attach(o2)
c1.temp = 80
c1.temp = 90
check_observer()
|
class PropertyCheckResult:
def __init__(self, name: str):
self.name = name
def __str__(self):
return self.name
def __repr__(self):
return f"PropertyCheckResult({self.name})"
def __invert__(self):
if self == UNSAT:
return SAT
if self == SAT:
return UNSAT
return UNKNOWN
def __and__(self, other):
if not isinstance(other, PropertyCheckResult):
return NotImplemented
if self == UNSAT or other == UNSAT:
return UNSAT
if self == UNKNOWN or other == UNKNOWN:
return UNKNOWN
return SAT
def __or__(self, other):
if not isinstance(other, PropertyCheckResult):
return NotImplemented
if self == SAT or other == SAT:
return SAT
if self == UNKNOWN or other == UNKNOWN:
return UNKNOWN
return UNSAT
def __eq__(self, other):
if not isinstance(other, PropertyCheckResult):
return False
return self.name == other.name
SAT = PropertyCheckResult("sat")
UNKNOWN = PropertyCheckResult("unknown")
UNSAT = PropertyCheckResult("unsat")
__all__ = ["SAT", "UNKNOWN", "UNSAT"]
|
d=dict(one=1,two=2,three=3)
print(d)
'''for k in d:
print(k,d[k])
for k in sorted(d.keys()): #isme key ki help se d[k] nikaalre h
print(k,d[k])
for k,v in sorted(d.items()): #k and v(value) dono ek hi baar lene h to without dictionary help
print(k,v)
for v in sorted(d.values()):
print(v)
for k in d:
print(k)
'''
'''
d['seven']=7 #insert new key
print(d)
#print(d['three1']) #will give an error as there is no such key.. to avoid..
s=d.get('three34','key not found') #to avoid error and print message
print(s)
'''
'''
#to delete in dictionary(2 methods)
d.pop('one') #to pop from dictionary using pop fn
print(d)
del d['two'] #using del
print(d)
'''
'''
x=dict(om=2,jai=3,**d) #to inherit
print(x)
'''
'''
======================================================================================================================================================================================
"HW******* user se 5 members ki name and age enter kraani h condition do logo ki same age ho.. then enter name from user then print age and also the second person with the same age "
======================================================================================================================================================================================
'''
'''
l=[1,2,3]
print('old list:- {}'.format(l))
l.append(89) #append at end
print('new list:- {}'.format(l))
l.insert(4,99) #if 3 ke badle 9 daaldia to bhi end me hi krdega
#index and value upar me h
print('new list:- {}'.format(l))
#l.extend()#will do in next class
''' |
#
# Copyright (c) 2017 Amit Green. All rights reserved.
#
@gem('Gem.ErrorNumber')
def gem():
require_gem('Gem.Import')
PythonErrorNumber = import_module('errno')
export(
'ERROR_NO_ACCESS', PythonErrorNumber.EACCES,
'ERROR_NO_ENTRY', PythonErrorNumber.ENOENT,
)
|
class colors:
HEADER = '\033[95m'
OKBLUE = '\033[94m'
OKGREEN = '\033[92m'
WARNING = '\033[93m'
FAIL = '\033[91m'
ENDC = '\033[0m'
BOLD = '\033[1m'
UNDERLINE = '\033[4m'
WHITE = '\033[1;97m'
def banner():
version = "0.6.0"
githublink = "https://github.com/f0lg0/Oncogene"
print("\n+--------------------------------------------------------------+\n")
LOGO = [
"|--- ONCOGENE ----|",
" \---------------/ ",
" ~-_---------_-~ ",
" ~-_---_-~ ",
" ~-_ ",
" _-~---~-_ ",
" _-~---------~-_ ",
" /---------------\ ",
"|-----------------|"
]
BANNER = [
" |",
" | Welcome to Oncogene",
f" | Version: {version}",
" |",
f" | {githublink}",
" |",
" | Written by: f0lg0",
" |",
f" | {colors.FAIL}[!] Only for educational purposes",
]
for llogo, lbanner in zip(LOGO, BANNER):
print(colors.OKGREEN + colors.BOLD + llogo, colors.OKBLUE + colors.BOLD + lbanner)
print(colors.ENDC)
print("\n+--------------------------------------------------------------+")
|
cube = []
for value in range(1, 11):
cube_value = value**3
cube.append(cube_value)
print(cube)
|
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# 字符串
print(ord('A'))
print(ord('中'))
print(chr(66))
# 编码
print(b'\xe4\xb8\xad\xff'.decode('utf-8', errors='ignore'))
# 占位符
print('%2d-%02d' % (3, 1))
print('%.2f' % 3.1415926)
# 数字转字符串
print("azxvc" + str(1111))
print(max(80, 100, 1000))
|
#! python3
# __author__ = "YangJiaHao"
# date: 2018/2/26
# Definition for an interval.
class Interval:
def __init__(self, s=0, e=0):
self.start = s
self.end = e
class Solution:
def merge(self, intervals):
"""
:type intervals: List[Interval]
:rtype: List[Interval]
"""
if len(intervals) <= 1:
return intervals
intervals.sort(key=lambda x: x.start)
result = [] # 注意:result=temp=[],result和temp指向同一个list
start, end = intervals[0].start, intervals[0].end
for i in range(1, len(intervals)):
if end >= intervals[i].start:
end = max(end, intervals[i].end)
else:
result.append(Interval(start, end))
start, end = intervals[i].start, intervals[i].end
result.append(Interval(start, end))
return result
class Solution2:
def merge(self, intervals):
intervals.sort(key = lambda x:x.start)
merged = []
for each in intervals:
if merged and merged[-1].end >= each.start:
merged[-1].end = max(merged[-1].end, each.end)
else:
merged.append(each)
return merged
if __name__ == '__main__':
so = Solution()
intervals = [Interval(1, 4), Interval(1, 4), Interval(5, 6)]
result = so.merge(intervals)
print([[x.start, x.end] for x in result])
|
# We create an arr dp which hold max val till that point. At each i, max_val = max(dp[i-2] + nums[i], dp[i-1])
class Solution:
def rob(self, nums: List[int]) -> int:
if not nums:
return 0
if len(nums)<2:
return max(nums)
dp = [0]*len(nums)
dp[0] = nums[0]
dp[1] = max(nums[0], nums[1])
for i in range(2, len(nums)):
dp[i] = max(dp[i-2] + nums[i], dp[i-1])
return dp[-1] |
def to_pascal_case(string):
return ''.join([w.title() for w in string.split('_')])
|
print('''
*******************************************************************************
| | | |
_________|________________.=""_;=.______________|_____________________|_______
| | ,-"_,="" `"=.| |
|___________________|__"=._o`"-._ `"=.______________|___________________
| `"=._o`"=._ _`"=._ |
_________|_____________________:=._o "=._."_.-="'"=.__________________|_______
| | __.--" , ; `"=._o." ,-"""-._ ". |
|___________________|_._" ,. .` ` `` , `"-._"-._ ". '__|___________________
| |o`"=._` , "` `; .". , "-._"-._; ; |
_________|___________| ;`-.o`"=._; ." ` '`."\` . "-._ /_______________|_______
| | |o; `"-.o`"=._`` '` " ,__.--o; |
|___________________|_| ; (#) `-.o `"=.`_.--"_o.-; ;___|___________________
____/______/______/___|o;._ " `".o|o_.--" ;o;____/______/______/____
/______/______/______/_"=._o--._ ; | ; ; ;/______/______/______/_
____/______/______/______/__"=._o--._ ;o|o; _._;o;____/______/______/____
/______/______/______/______/____"=._o._; | ;_.--"o.--"_/______/______/______/_
____/______/______/______/______/_____"=.o|o_.--""___/______/______/______/____
/______/______/______/______/______/______/______/______/______/______/_____ /
*******************************************************************************
''')
print("Welcome to Treasure Island.\nYour mission is to find the treasure.")
dec1=input("You're at a cross road. Where do you want to go? Type \"left\" or \"right\"\n").lower()
if dec1=="left":
dec2=input("You come to a lake. There's an island at the middle of the lake. Type \"wait\" to wait for a boat or \"swim\" to swim across the lake.\n").lower()
if dec2=="wait":
dec3=input("You reach the island unharmed. There's a house with 3 doors leading to 3 rooms. One red, one yellow and one blue. Which colour do you choose?\n").lower()
if dec3=="yellow":
print("You found the treasure! Congratulations! You win!")
elif dec3=="red":
print("You were burned by the fire inside the room. Game Over!")
elif dec3=="blue":
print("The room was full of beasts! Game Over!")
else:
print("This door doesn't exist. Game over!")
else:
print("You were attacked by a trout. Game over!")
else:
print("You fell into a hole. Game over!")
|
"""
**********************************************************************************
Name: constants
Purpose: Holds common constants used throughout the application
**********************************************************************************
"""
#------------------------------------
# HTTP Response codes
#------------------------------------
HTTP_METHODS_GET = 'GET'
HTTP_METHODS_POST = 'POST'
HTTP_METHODS_PUT = 'PUT'
HTTP_METHODS_DELETE = 'DELETE'
#------------------------------------
# Error messages
#------------------------------------
ErrorMessages = {
'100': 'Request body contains invalid field.',
'101': 'Request body contains invalid field.',
}
|
# Approach 3 - Two Pointers
# Time: O(n^2)
# Space: O(1)
class Solution:
def threeSumSmaller(self, nums: List[int], target: int) -> int:
nums.sort()
total = 0
for i in range(len(nums)-1):
total += self.twoSumSmaller(nums, i + 1, target - nums[i])
return total
def twoSumSmaller(self, nums, start_index, target):
total = 0
left, right = start_index, len(nums) - 1
while left < right:
if nums[left] + nums[right] < target:
total += right - left
left += 1
else:
right -= 1
return total
|
#Exercício013
x = float(input('Qual o seu salário? '))
print('Se o seu salário é {:.2f} reais\nEntão com 15% de aumento você passará a ganhar {:.2f} reais'.format(x, x+x*15/100))
print('xD')
|
alien_0 = {'color': 'green', 'points': 5}
print(alien_0)
print(alien_0['color'])
print(alien_0['points'])
new_points = alien_0['points']
print("You just earned " + str(new_points) + " points!")
|
A = int(input())
B = int(input())
C = int(input())
X = int(input())
count = 0
for a in range(A+1):
for b in range(B+1):
for c in range(C+1):
if 500*a + 100*b + 50*c == X:
count +=1
print(count)
|
def test_model_piecewise(classifier, filename, batch_size):
"""
same as test_model but reads input file line by line
Predict class labels of given data using the model learned.
INPUTS:
classifier_trained: object of MLP, the model learned by function "train_model".
filename: file location of txt-file numpy 2d array, each row is a sample whose label to be predicted.
batch_size: int scalar, batch size, efficient for a very large number of test samples.
OUTPUTS:
test_set_y_predicted: numpy int vector, the class labels predicted.
"""
k=1
f=1
for line in open(filename):
if k==1:
temp=numpy.fromstring(line, dtype=float, sep='\t')
k+=1
else:
if k%batch_size==0:
k=1
temp2=numpy.fromstring(line, dtype=float, sep='\t')
temp=numpy.vstack([temp,temp2])
tempout=test_model(classifier, temp, batch_size)
if f==1:
test_set_y_pred=tempout
f=0
else:
test_set_y_pred=numpy.append(test_set_y_pred,tempout)
else:
temp2=numpy.fromstring(line, dtype=float, sep='\t')
temp=numpy.vstack([temp,temp2])
k+=1
tempout=test_model(classifier, temp, batch_size)
test_set_y_pred=numpy.append(test_set_y_pred,tempout)
return test_set_y_pred
|
class Solution(object):
def reverse(self,s):
return s[::-1]
def reverseWords(self, s):
"""
:type s: str
:rtype: str
"""
strs = s.split(' ')
strs = map(self.reverse, strs)
return ' '.join(strs) |
class Solution:
def reverseString(self, s: List[str]) -> None:
"""
Do not return anything, modify s in-place instead.
"""
head = 0
temp = ""
tail = len(s) - 1
while head < tail:
temp = s[head]
s[head] = s[tail]
s[tail] = temp
head += 1
tail -= 1
|
"""
Interface with Pleiades
"""
class Pleiades:
def __init__(self):
return
|
a, b, c = map(int, input().split())
numbers = [a, b, c]
numbers.sort()
print(" ".join(str(number) for number in numbers))
|
"""
Dada uma lista numérica "nums", retorne true se ela possuir uma tamanho de pelo menos
"1" e o seu primeiro elemento coincidir com o último.
"""
def same_first_last(nums):
return len(nums) >= 1 and nums[0] == nums[-1]
print(same_first_last([1, 2, 3, 1]))
|
def binarySearch(ar, n, key):
lb = 0
ub = n
while lb <= ub:
mid = int((lb + ub) / 2)
if ar[mid] == key:
return mid
if ar[mid] > key:
ub = mid - 1
else:
lb = mid + 1
print('!!Value Not Found!!')
return -1
# Test Code
ar = [1, 4, 6, 8, 10, 12]
n = 6
print('Position of element 10 : ' + str(binarySearch(ar, n, 10) + 1))
|
#MAIN PROGRAM STARTS HERE:
num = int(input('Enter the number of rows and columns for the square: '))
for x in range(num, 0, -1):
for y in range(num, 0, -1):
print ('%d ' % (y), end='')
print() |
def validBraces(string):
while len(string) !=0:
if '{}' in string or '[]' in string or '()' in string:
string = string.replace('{}','').replace('()','').replace('[]','')
else:
return False
return True |
"""
Tools to work with the webhooks data files.
A copy of those data files is expected at the `openedx_webhooks.info.DATA_FILES_URL_BASE` location.
"""
|
def resolve():
'''
code here
'''
N, M = [int(item) for item in input().split()]
As = [[int(item) for item in input().split()] for _ in range(N)]
memo = [0 for _ in range(M+1)]
for k, *items in As:
for item in items:
memo[item] += 1
res = 0
for item in memo:
if item == N:
res += 1
print(res)
if __name__ == "__main__":
resolve()
|
class CHaserException(Exception):
"""例外の基底クラス
"""
class GameFinished(CHaserException):
"""ゲーム終了
"""
|
noc_config = [
["c", "c"],
["c", "c"],
["n", "v"],
#["c", "n"],
]
|
class Thing:
def __init__(self, primary_noun, countable=True):
self.primary_noun = primary_noun
self.countable = countable
class Container(Thing):
def __init__(self, primary_noun, countable=True, preposition="on"):
super().__init__(primary_noun, countable)
self.preposition = preposition
def there_are_things_here(things):
result = ["There is"]
if not things:
result.append("nothing")
elif len(things) == 1:
thing = things[0]
if thing.primary_noun[0] in "aeiou":
article = "an"
else:
article = "a"
result.append(f"{article} {thing.primary_noun}")
else:
inner = []
for thing in things[:-1]:
if thing.countable:
if thing.primary_noun[0] in "aeiou":
article = "an"
else:
article = "a"
else:
article = "some"
inner.append(f"{article} {thing.primary_noun}")
thing = things[-1]
if thing.countable:
article = "a"
else:
article = "some"
result.append(", ".join(inner) + f" and {article} {thing.primary_noun}")
result.append("here.")
return " ".join(result)
|
# loops over all collection data, converts to true if collection - false if not part of collection
def collection_to_boolean(data_frame):
# Data should be available as str (see Kaggle Webpage)
data_frame.belongs_to_collection = data_frame.belongs_to_collection.astype(str)
# Looping over Data to convert to 0/1
data_frame['belongs_to_collection'] = (data_frame['belongs_to_collection'] != 'nan').astype(int)
# Converting data from 0/1 to true false
data_frame.belongs_to_collection = data_frame.belongs_to_collection.astype(bool)
return data_frame
|
# *********************************
# Projet NSI : JEU DU PUISSANCE 4
# *********************************
# --------------------------------------
# -------- INITIALISATION --------------
# --------------------------------------
# Variables GLOBALE (pourront être utilisées à l'intérieur de toutes nos fonctions)
jetons_joueur=['X','O'] # Contient la représentation des jetons: Joueur 1: 'X' et Joueur 2: 'O'
partie_terminee = False
num_joueur_courant = 1 # Numéros du joueur qui commence.
grille = [] # Contiendra la grille du Jeu
# -------------------------------------------------------------
# -------- FONCTIONS ET PROCEDURES ----------------------------
# -------------------------------------------------------------
def creation_grille_vierge():
''' Cette fonction va remplir la grille du jeu par des "."
IN: Rien
OUT: Rien car on va remplir la variable globale grille, déjà déclarée au tout début du programme
On fabrique une liste de liste de string (de 1 caractère) modélisant notre grille de jeu de 6 lignes par 7 colonnes
[ [".", ".", ".", "." , "." , "." , "."],
[".", ".", ".", "." , "." , "." , "."],
...
[".", ".", ".", "." , "." , "." , "."] ]
'''
# On déclare que l'on va utiliser la variable globale grille (déjà initialisée)
global grille
# Pour chaque ligne
for num_ligne in range(6):
ligne = [] # on crée un nouveau tableau vide en mémoire
for j in range(7): # On ajoute les sept éléments ".", séparémment.
ligne.append(".")
# On ajoute la nouvelle ligne à la grille
grille.append(ligne)
# Le travail est terminé, la variable globale grille est remplie, on quitte la procédure
return
# ------ TEST TEMPORAIRE --------
#creation_grille_vierge()
#print(grille)
def affiche_grille() -> None :
''' Cette fonction affiche la grille de jeu telle que ci-dessous
IN: Rien
OUT: Rien
Affichage souhaitée :
0 1 2 3 4 5 6
0 |.|.|.|.|.|.|.|
1 |.|.|.|.|.|.|.|
2 |.|.|.|.|.|.|.|
3 |.|.|.|.|.|.|.|
4 |.|.|.|X|.|.|.|
5 |O|X|.|X|O|X|O|
---------------
'''
global grille
# Affichage des indices du haut de la grille (0 à 6)
print("")
print(" ", end="")
for i in range(7):
print(str(i)+" ",end="")
print("\n ") # '\n' est un saut de ligne (passage à une nouvelle ligne) suivi de deux espaces
# Affichage des lignes
for i in range(6): # Pour chaque ligne i
print(str(i)+" ",end="")
for j in range(7): # Pour chaque colonne j
print("|"+ grille[i][j],end ="")
print("|")
# Affichage du trait en bas de la grille
print(" ............... ", end="")
print("\n")
# -------- TEST TEMPORAIRE ------------
''''''
#grille[5][1] = "X"
#grille[5][0] = "O"
#grille[5][3] = "X"
#grille[5][4] = "O"
#grille[5][5] = "X"
#grille[5][6] = "O"
#grille[4][3] = "X"
#affiche_grille()
''''''
def colonne_pleine(indice_colonne: int) -> bool:
'''
IN: indice de la colonne à analyser (0 à 6)
OUT: un booleen (True si la colonne est déjà pleine, False sinon)
'''
global grille
global pleine
pleine = True
for i in range(6): #pass par toute la colonne
if grille[i][indice_colonne] == ".": # vérifie si il y a un espace vide
pass
else: # si il n y'en a pas cela veut dire que la colonne n'est pas vide
return True
return False
# --------- TEST TEMPORAIRE --------------
''''''
#grille[0][0] = "O"
#grille[1][0] = "O"
#grille[2][0] = "X"
#grille[3][0] = "O"
#grille[4][0] = "X"
#grille[5][0] = "O"
#colonne_pleine(0)
#print(pleine)
#.......
''''''
def joue_jeton(num_joueur: int, indice_colonne: int) -> None:
''' Place un jeton du joueur numéros num_joueur, dans la colonne indice_colonne.
IN: num_joueur (int qui vaut 1 ou 2)
OUT: Rien puisque cette fonction va modifier directement la variable global grille.
'''
# On utilise les deux variables globales suivantes
global grille
global jetons_joueur
# Dans la colonne indice_colonne, en partant, du bas, on cherche la première case vide.
for i in range(5, -1, -1): #pass du haut vers le bas
if grille[i][indice_colonne] == ".": #à la premiere case vide on pose un jetons dépendants de si cest le joueur 1 ou 2 il pose une X ou O
if num_joueur == 0:
grille[i][indice_colonne] = "X"
break
elif num_joueur == 1:
grille[i][indice_colonne] = "O"
break
# ------------ TEST TEMPORAIRE ----------------
'''
joue_jeton(1, 3) # Joueur 1 joue
affiche_grille()
joue_jeton(2, 0) # Joueur 2 joue
affiche_grille()
joue_jeton(1, 3) # Joueur 1 joue
affiche_grille()
joue_jeton(2, 0) # Joueur 2 joue
affiche_grille()
'''
def demander_ou_jouer() -> int:
''' Doit demander au joueur dans quel indice de colonne il souhaite jouer.
Si l'indice n'est pas valable (non compris entre 0 et 6), ou bien s'il correspond à une colonne pleine, on lui indique
que sa saisie est incorrecte et on lui renouvelle la question.
Si l'utilisateur saisie 'Q' (pour "Quitter"), la partie doit se terminer.
IN: rien
OUT: Renvoie un indice de colonne (int) valable (colonne non pleine) où l'on peut jouer.
'''
while True:
saisie = input("Dans quel indice de colonne souhaiter vous jouez de 0 à 6 et Q pour quiter?: ")
if len(saisie) == 1 and (saisie in "0, 1, 2, 3 , 4, 5, 6, Q"): #fait en sorte que seule les saisie autoriser peuvent etre accepté
#La saisie est correct (1 seul caractère et il est autorisé)
if saisie == "Q": #quit si Q est choisi
print("\n")
exit()
# On vérifie que la colonne n'est pas pleine
j = int(saisie) #car on sait que seule des nimbre on les transforme en int pour pouvoir manipler le dictionaire
if colonne_pleine(j) == True:
print("ATTENTION, cette colonne est déjà pleine !")
else: #Sinon, il y a encore de la place
# On renvoie l'indice de la colonne choisie
return j #nous renvoyons la colonne saisie
else:
print("SAISIE INCORRECTE")
# ------------ TEST TEMPORAIRE ----------------
'''
colonne = demander_ou_jouer()
joue_jeton(1, colonne) # Joueur 1 joue
affiche_grille()
joue_jeton(2, colonne) # Joueur 1 joue
affiche_grille()
joue_jeton(2, colonne) # Joueur 1 joue
affiche_grille()
joue_jeton(1, colonne) # Joueur 1 joue
affiche_grille()
joue_jeton(2, colonne) # Joueur 1 joue
affiche_grille()
joue_jeton(2, colonne) # Joueur 1 joue
affiche_grille()
colonne = demander_ou_jouer()
joue_jeton(1, colonne) # Joueur 1 joue
affiche_grille()
'''
def Quatre_jetons_en_ligne(num_joueur: int) -> bool:
'''
IN: Numéros du joueur à détecter 1 ou 2
OUT: booleen (True si 4 jetons alignés trouvés en ligne, False sinon)
'''
# On déclare les variables globales qui nous seront utiles
global jetons_joueur
global grille
chaine = ""
# définition du jeton à trouver
jeton = jetons_joueur[num_joueur]
chaine_a_trouver = jeton * 4
for i in range(6):
chaine += " " #on ajoute cela pour évitr des erreurs comme si il y a 3 de suite dans une ligne possible, puis la premier de suivante est aussi remplies
for j in range(7):
chaine += grille[i][j] #nous passons par toute les lignes un à une et les mettons dans une variable
if chaine_a_trouver in chaine: #si jamais la suite des quatre jetons est trouver dans la variable cela veut dire que il y a quatre jetons de suite
return True
# Si on arrive ici, c'est qu'aucun alignement de 4 jetons n'a été trouvé en ligne
return False
# ------------ TEST TEMPORAIRE ----------------
'''
grille[0][0] = "O"
grille[0][1] = "O"
grille[0][2] = "O"
grille[0][3] = "O"
if Quatre_jetons_en_ligne(1) == True:
print("True")
else:
print("False")
affiche_grille()
grille[0][0] = "O"
grille[0][1] = "O"
grille[0][2] = "O"
grille[0][5] = "O"
if Quatre_jetons_en_ligne(1) == True:
print("True")
else:
print("False")
affiche_grille()
'''
def Quatre_jetons_en_colonne(num_joueur: int) -> bool:
'''
IN: Numéros du joueur à détecter 1 ou 2
OUT: booleen (True si 4 jetons alignés trouvés en ligne, False sinon)
'''
# On déclare les variables globales qui nous seront utiles
global jetons_joueur
global grille
chaine = ""
# définition du jeton à trouver
jeton = jetons_joueur[num_joueur]
chaine_a_trouver = jeton * 4
for j in range(7):
chaine += " " #on ajoute cela pour évitr des erreurs comme si il y a 3 de suite dans une colonne possible, puis la premier de suivante est aussi remplies
for i in range(6): #meme chose que précedament sauf que nous passons par les colonnes au lieu des lignes
chaine += grille[i][j]
if chaine_a_trouver in chaine:
return True
# Si on arrive ici, c'est qu'aucun alignement de 4 jetons n'a été trouvé en ligne
return False
# ------------ TEST TEMPORAIRE ----------------
'''
grille[0][0] = "O"
grille[1][0] = "O"
grille[2][0] = "O"
grille[3][0] = "O"
if Quatre_jetons_en_colonne(1) == True:
print("True")
else:
print("False")
affiche_grille()
'''
'''
grille[0][0] = "O"
grille[1][0] = "O"
grille[2][0] = "O"
grille[4][0] = "O"
if Quatre_jetons_en_colonne(1) == True:
print("True")
else:
print("False")
affiche_grille()
'''
def Quatre_jetons_diagonal(num_joueur: int) -> bool:
'''
IN: Numéros du joueur à détecter 1 ou 2.
OUT: booleen (True si 4 jetons alignés trouvé en diagonale, False sinon)
'''
global grille
global jetons_joueur
jeton = jetons_joueur[num_joueur]
chaine_a_trouver = jeton *4
# ------------------------------------------------------
# PARTIE 1 : Recherche sur les diagonales descendantes vers la droite:
'''
# On définit la liste des coordonnées des points de départ possible pour les diagonales descendantes vers la droite.
0 1 2 3 4 5 6
0 X X X X
1 X X X X
2 X X X X
3
4
5 ___________________________
'''
chaine = ""
for i in range(3): #nous passons par une ligne
a = i #pour reset i à chaque boucle, pas utiles mais c'est une précaution
for j in range(4):
chaine += grille[i][j] #commencons par une localisation qui peut commencer une suite puis nous incrémentons de 1 3 fois pour avoir
chaine += grille[i+1][j+1] #une diagonale à la suite
chaine += grille[i+2][j+2]
chaine += grille[i+3][j+3]
chaine += " " #on ajoute cela pour évitr des erreurs comme si il y a 3 de suite dans un diagonale possible, puis la premier de suivante est aussi remplies
i = a
# Si un alignement en diagonale a été trouvé
if chaine_a_trouver in chaine:
# Une diagonale complète trouvée
print("VICTOIRE EN DIAGONALE DE " + jeton)
return True
#----------------- FIN PARTIE 1 -----------------------
# ------------------------------------------------------
# PARTIE 2 : Recherche sur les diagonales descendantes vers la gauche:
'''
# On définit la liste des coordonnées des points de départ possible pour les diagonales descendantes vers la gauche.
0 1 2 3 4 5 6
0 X X X X
1 X X X X
2 X X X X
3
4
5 ___________________________
'''
chaine =""
for i in range(3):
a = i
for j in range(6, 2, -1):
chaine += grille[i][j]
chaine += grille[i+1][j-1]
chaine += grille[i+2][j-2] #meme chose que avant mais cette fois nous désincrementons
chaine += grille[i+3][j-3]
chaine += " " #on ajoute cela pour évitr des erreurs comme si il y a 3 de suite dans un diagonale possible, puis la premier de suivante est aussi remplies
i = a
#print(chaine)
# Si un alignement en diagonale a été trouvé
if chaine_a_trouver in chaine:
# Une diagonale complète trouvée
return True
#----------------- FIN PARTIE 2 -----------------
# Si on arrive ici, aucune diagonale n'a été trouvée, on renvoie False
return False
# ----------- TEST TEMPORAIRE -------------
'''
'''
'''
grille[3][2] = "O"
grille[2][1] = "O"
grille[1][0] = "O"
grille[4][3] = "O"
grille[3][3] = "X"
grille[2][4] = "X"
grille[1][5] = "X"
grille[0][6] = "X"
affiche_grille()
if Quatre_jetons_diagonal(0) == True:
print("10")
else:
print("20")
'''
def Recherche_si_victoire(num_joueur) -> bool:
'''
IN: num_joueur (1 ou 2)
OUT: un booléen (True si le joueur indiqué a gagné, False sinon)
'''
global type_victoire
type_victoire = "" #Pour que ca print si on a gangé en diagonale,
#ligne ou collone suite à une victoire, on le met on global pour ne pas devoire à la definire dans une autre fonction
if Quatre_jetons_diagonal(num_joueur) == True: #verifie si une victoire a été trouvé pour les 3 type de victoire
type_victoire = "VICTOIRE EN DIAGONALE" #message de victoire
return True
if Quatre_jetons_en_colonne(num_joueur) == True:
type_victoire = "VICTOIRE EN COLONNE" #message de victoire
return True
if Quatre_jetons_en_ligne(num_joueur) == True:
type_victoire = "VICTOIRE EN LIGNE" #message de victoire
return True
return False
# ----------- TEST TEMPORAIRE -------------
'''
grille[3][3] = "X"
grille[2][4] = "X"
grille[1][5] = "X"
grille[0][6] = "X"
affiche_grille()
if Recherche_si_victoire(0) == True:
print("Victoire")
else:
print("Défaite")
grille[3][0] = "X"
grille[2][0] = "X"
grille[1][0] = "X"
grille[0][0] = "X"
affiche_grille()
if Recherche_si_victoire(0) == True:
print("Victoire")
else:
print("Défaite")
grille[0][3] = "O"
grille[0][2] = "O"
grille[0][1] = "O"
grille[0][0] = "O"
affiche_grille()
if Recherche_si_victoire(1) == True:
print("Victoire")
else:
print("Défaite")
'''
def grille_pleine():
'''
IN: None.
OUT: booleen (True si pleine, False sinon)
'''
chaine = ""
for j in range(7): #Nous allons seulements vérifier si la grille du haut est pleine car si celle ci est pleine cela veut dire que toute la grille l'est
chaine += grille[0][j] #i est égale à 0 car c'est suelemnt la ligne du haut qu'on test, j incrmente de 1 pour tester toute les collones, nous ajoutons le résultats à chaine
if "." in chaine: #si il y a un point dans la ligne du haut cela veut dire qu'elle n'est pas pleine donc on retourn False.
return False
else:
return True #si il n'y a pas de points cela veut dire que la ligne est donc la grille est pleine
# --------------------------------------
# -------- PROGRAMME PRINCIPAL ---------
# --------------------------------------
creation_grille_vierge()
affiche_grille()
num_joueur_courant=0
forme = "X" #pour print le jeton
# Tant que la partie n'est pas terminée, un joueur joue.
while partie_terminee==False:
print("Joueur ",num_joueur_courant+1, " (", forme,") " ) # message pour que le joueur sache que c'est à lui et quelle est son jeton
colonne = demander_ou_jouer()
print("Vous jouez dans la colonne: ", colonne)
if grille_pleine == True:
print("La grille est pleine, c'est une égalité:\n") #vérifie que la grille soit pleine, si c'est le cas une égalité est déclencher
break
else:
if colonne_pleine(colonne) == True:
print("La colonne est pleine choisissez une autre:\n")
else:
joue_jeton(num_joueur_courant, colonne)
if Recherche_si_victoire(num_joueur_courant) == True:
affiche_grille() #car on va break la fonction affice_grille ne sera pas utiliser donc on ne pourra pas voire la grille finale, donc on le met ici au cas d'une victoire
print("")
print(type_victoire)
print("")
print("Le joueur ", num_joueur_courant+1," (", forme, ") a gangé!. \n") #donne le message de victoire finale
break
else:
pass
affiche_grille() #affiche la grille à chhaque passage
print("\n")
# On change le numéros du joueur courant
if num_joueur_courant==0:
num_joueur_courant=1
forme = "O"
else:
num_joueur_courant=0
forme = "X"
# FIN DU WHILE
# On est sorti de la boucle donc:
print("FIN DE PARTIE")
|
"""Modulo node."""
class Node:
"""Gerencia items da fila."""
def __init__(self, data):
self.data = data
self.next = None |
#var 1
div1 = [num for num in range(1, 11) if num % 2 != 0 and num % 3 != 0]
print(f"Not divisible by 2 and 3: {div1}")
div2 = [num for num in range(1, 11) if num % 2 == 0]
print(f"Divisible by 2: {div2}")
div3 = [num for num in range (1, 11) if num % 3 == 0]
print(f"Divisible by 3: {div3}")
input()
#var 2
for num in range(1, 11):
if num % 2 == 0:
print("Divisible by 2: ", num)
elif num % 3 == 0:
print("Divisible by 3: ", num)
elif num % 2 != 0 and num % 3 != 0:
print("Not divisible by both: ", num)
input()
|
"""complex-valued trig functions adapted from SciPy's cython code:
https://github.com/scipy/scipy/blob/master/scipy/special/_trig.pxd
Note: The CUDA Math library defines the real-valued cospi, sinpi
"""
csinpi_definition = """
#include <cupy/math_constants.h>
// Compute sin(pi*z) for complex arguments
__device__ complex<double> csinpi(complex<double> z)
{
double x = z.real();
double piy = M_PI*z.imag();
double abspiy = abs(piy);
double sinpix = sinpi(x);
double cospix = cospi(x);
double exphpiy, coshfac, sinhfac;
if (abspiy < 700) {
return complex<double>(sinpix*cosh(piy), cospix*sinh(piy));
}
/* Have to be careful--sinh/cosh could overflow while cos/sin are
* small. At this large of values
*
* cosh(y) ~ exp(y)/2
* sinh(y) ~ sgn(y)*exp(y)/2
*
* so we can compute exp(y/2), scale by the right factor of sin/cos
* and then multiply by exp(y/2) to avoid overflow.
*/
exphpiy = exp(abspiy/2.0);
if (exphpiy == CUDART_INF) {
if (sinpix == 0.0) {
// Preserve the sign of zero
coshfac = copysign(0.0, sinpix);
} else {
coshfac = copysign(CUDART_INF, sinpix);
}
if (cospix == 0.0) {
sinhfac = copysign(0.0, cospix);
} else {
sinhfac = copysign(CUDART_INF, cospix);
}
return complex<double>(coshfac, sinhfac);
}
coshfac = 0.5*sinpix*exphpiy;
sinhfac = 0.5*cospix*exphpiy;
return complex<double>(coshfac*exphpiy, sinhfac*exphpiy);
}
"""
ccospi_definition = """
#include <cupy/math_constants.h>
// Compute cos(pi*z) for complex arguments
__device__ complex<double> csinpi(complex<double> z)
{
double x = z.real();
double piy = M_PI*z.imag();
double abspiy = abs(piy);
double sinpix = sinpi(x);
double cospix = cospi(x);
double exphpiy, coshfac, sinhfac;
if (abspiy < 700) {
return complex<double>(cospix*cosh(piy), -sinpix*sinh(piy));
}
// See csinpi(z) for an idea of what's going on here
exphpiy = exp(abspiy/2.0);
if (exphpiy == CUDART_INF) {
if (sinpix == 0.0) {
// Preserve the sign of zero
coshfac = copysign(0.0, cospix);
} else {
coshfac = copysign(CUDART_INF, cospix);
}
if (cospix == 0.0) {
sinhfac = copysign(0.0, sinpix);
} else {
sinhfac = copysign(CUDART_INF, sinpix);
}
return complex<double>(coshfac, sinhfac);
}
coshfac = 0.5*cospix*exphpiy;
sinhfac = 0.5*sinpix*exphpiy;
return complex<double>(coshfac*exphpiy, sinhfac*exphpiy);
}
"""
|
pkgname = "traceroute"
pkgver = "2.1.0"
pkgrel = 0
build_style = "makefile"
make_cmd = "gmake"
make_build_args = ["prefix=/usr"]
make_install_args = ["prefix=/usr"]
hostmakedepends = ["gmake"]
makedepends = ["linux-headers"]
pkgdesc = "Traces the route taken by packets over an IPv4/IPv6 network"
maintainer = "q66 <[email protected]>"
license = "GPL-2.0-or-later AND LGPL-2.1-or-later"
url = "http://traceroute.sourceforge.net"
source = f"$(SOURCEFORGE_SITE)/{pkgname}/{pkgname}-{pkgver}.tar.gz"
sha256 = "3669d22a34d3f38ed50caba18cd525ba55c5c00d5465f2d20d7472e5d81603b6"
# no tests
options = ["!cross", "!check"]
|
# n = float(input('Digite um valor: '))
# n = str(input('Digite um valor: '))
# n = bool(input('Digite um valor: '))
# se tiver valor == True se não tiver == False
n = input('Digite algo: ')
# print(n.isnumeric()) # é numero?
# print(n.isalpha()) # é letra?
# print(n.isalnum()) # é numero ou letra?
# print(n.isupper()) # está somente com letras maiusculas?
# print(type(n))
|
a=int(input("enter the element"))
b=int(input("enter the element"))
c=int(input("enter the element"))
n1=[]
n2=[]
n3=[]
n1.append(a)
n2.append(b)
n3.append(c)
if n1>n2 and n1>n3:
print(n1,"maximum")
elif n2>n1 and n2>n3:
print(n2,"maximum")
else:
print(n3,"maximum") |
# -*- coding: utf-8 -*-
class FinicityConnectTypeEnum(object):
"""Implementation of the 'Finicity Connect Type' enum.
TODO: type enum description here.
Attributes:
AGGREGATION: Aggregation Only - Used by PFM (Personal Financial
Management) partners to grant access to a customer’s
transactions.
ACH: TODO: type description here.
FIX: Fix - Used to resolve authentication errors
LITE: Lite - Provides FI authentication and adding accounts. Allows
for custom styling, control of the FI search experience, and does
not end with a report generation call.
VOA: Verification of Assets - Used by lenders to verify assets. The
default time period of data retrieved is 6 months, so that lenders
can reduce their liability.
VOAHISTORY: Verification of Assets with History - Used by the GSEs to
verify assets. This differs from normal VOA in that it uses up to
2 years of data. voahistory
VOI: Verification of Income - Used by lenders to verify a customer’s
income using their bank transaction history.
VOIETXVERIFY: TODO: type description here.
VOIESTATEMENT: TODO: type description here.
PAYSTATEMENT: TODO: type description here.
ASSETSUMMARY: TODO: type description here.
PREQUALVOA: TODO: type description here.
"""
AGGREGATION = 'aggregation'
ACH = 'ach'
FIX = 'fix'
LITE = 'lite'
VOA = 'voa'
VOAHISTORY = 'voahistory'
VOI = 'voi'
VOIE_TXVERIFY = 'voieTxVerify'
VOIESTATEMENT = 'voieStatement'
PAYSTATEMENT = 'payStatement'
ASSETSUMMARY = 'assetSummary'
PREQUALVOA = 'preQualVoa'
|
# Parameter로 받은걸 모두 더해주는 `sum`함수를 만들어라.
# Parameter로 받은 모든걸?
# 일단 리스트로 구현방법
def sum(number_list):
total = 0
for i in number_list:
total += i
return total
# 흠..리스트는 알겠는데 파라미터가 가변적이면?
# e.g) sum(1, 2, 3) sum(1, 2, 4, 7)
# unnamed => *args(tuple) => argument(args)
def sum(*args):
total = 0
for i in args:
total += i
return total
# 1, 2, 3 arguments가 여러개인데 *args로 받을 수 있는 이유는?
# python의 packing / unpacking 덕분에
# unpacking
a, b = (1, 3)
print(a, b)
# packing
e = 2, 4
print(e)
# *args를 활용한 greeting
# named Parameter 안됨
def greeting(*values):
print(values)
for value in values:
print(value)
values = ["허진한", "웹프"]
values2 = {"홍길동", "데이터사이언스"}
values3 = ("고길동", "마케팅")
# dict를 전해주기엔 *args는 적합하지 않음
# 뭐가 좋을까?
values4 = {
"name": "유시진",
"course": "영어회화"
}
# **kwargs => named parameter => keword argument
# named_parameter 지정가능
# dict에 적합함
def print_all_information(**kwargs):
for key, value in kwargs.items():
print(key, value)
print_all_information(**values4)
# print_all_information(**values2) => ERROR(dict 빼고는 모두 에러)
print_all_information(
named="김지원",
course="프론트엔드"
)
# 라이브러리 만들때 아래와 같이 만드는 경우 많음
# def some_function(___, ___, *args, *kwargs):
|
{
'name': 'test installation of data module',
'description': 'Test data module (see test_data_module) installation',
'version': '0.0.1',
'category': 'Hidden/Tests',
'sequence': 10,
}
|
"""Functionality for computing the error between exact and approximate values."""
def absolute_error(x0, x):
"""
Compute absolute error between a value `x` and its expected value `x0`.
:param x0: Expected value.
:param x: Actual value.
:return: Absolute error between the actual and expected value.
:rtype: float
"""
return abs(x0 - x)
def relative_error(x0, x, zero_tol=1e-5):
"""
Compute relative error between a value `x` and its expected value `x0`.
:param x0: Expected value.
:param x: Actual value.
:param zero_tol: If x0 is smaller than this value, the absolute error is returned instead.
:return: Relative error between the actual and expected value.
:rtype: float
.. rubric:: Examples
>>> abs(relative_error(0.1, 0.4) - 3) < 1e-10
True
>>> abs(relative_error(0.4, 0.1) - 0.75) < 1e-10
True
For small values the absolute error is used
>>> abs(relative_error(1e-6, 1e-6 + 1e-12) - 1e-12) < 1e-20
True
"""
if abs(x0) > zero_tol:
return absolute_error(x0, x) / abs(x0)
return absolute_error(x0, x)
def relative_error_symmetric(x1, x2, zero_tol=1e-5):
r"""
Compute relative error between two values `x1` and `x2`.
.. note::
The :func:`relative_error` function is not symmetric, i.e. in general
`relative_error(a, b) != relative_error(b, a)`, which makes sense when comparing to a reference value. However
when just checking the error between two values (without one of them being more correct than the other) it makes
more sense with a symmetric error, which is what this function returns.
.. math:: \varepsilon = \frac{|x_1 - x_2|}{\max(|x_1|, |x_2|)}.
:param x1: First value.
:param x2: Second value.
:param zero_tol: If max(abs(x1), abs(x2)) is smaller than this value, the absolute error is returned instead.
:return: Relative error between the two values.
:rtype: float
.. rubric:: Examples
>>> relative_error_symmetric(0.1, 0.2)
0.5
>>> relative_error_symmetric(0.1, 0.2) == relative_error_symmetric(0.2, 0.1)
True
"""
denom = max(abs(x1), abs(x2))
if denom > zero_tol:
return absolute_error(x1, x2) / denom
return absolute_error(x1, x2)
|
class Solution:
@staticmethod
def longest_palindromic(self, s: str) -> str:
# Instead of taking the left and right edges of the string
# We will start in the middle of the string
# Making base function to help us in the method and pass in 'l' and 'r' parameters
def baseFun (l,r):
while (l >= 0 and r < len(s) and s[l]==s[r]):
# Since the left is greater or equal 0, right is less that string length
# After checking if the 'l' character is equal 'r' character
# We need to decrease 'l' by 1 and increase 'r' by 1
l -= 1
r += 1
return s[l+1:r]
# Define an empty variable to store result
res = ""
for i in range(len(s)):
# If the length of "s" is odd it will start from the same character
test = baseFun (i,i)
if len(test) > len(res):
res = test
# If the length of "s" is even it will start from the two middle characters
test = baseFun (i,i+1)
if len(test) > len(res):
res = test
return res |
# model settings
norm_cfg = dict(type='GN', num_groups=32, requires_grad=True)
model = dict(
type='CFADetector',
pretrained='torchvision://resnet50',
backbone=dict(
type='ResNet',
depth=50,
num_stages=4,
out_indices=(0, 1, 2, 3),
frozen_stages=1,
norm_cfg=dict(type='BN', requires_grad=True),
style='pytorch',
),
neck=
dict(
type='FPN',
in_channels=[256, 512, 1024, 2048],
out_channels=256,
start_level=1,
add_extra_convs=True,
num_outs=5,
norm_cfg=norm_cfg
),
bbox_head=dict(
type='CFAHead',
num_classes=16,
in_channels=256,
feat_channels=256,
point_feat_channels=256,
stacked_convs=3,
num_points=9,
gradient_mul=0.3,
point_strides=[8, 16, 32, 64, 128],
point_base_scale=2,
norm_cfg=norm_cfg,
loss_cls=dict(type='FocalLoss', use_sigmoid=True, gamma=2.0, alpha=0.25, loss_weight=1.0),
loss_bbox_init=dict(type='ConvexGIoULoss', loss_weight=0.375),
loss_bbox_refine=dict(type='ConvexGIoULoss', loss_weight=1.0),
transform_method='rotrect',
show_points=True,
use_cfa=True,
topk=6,
anti_factor=0.75))
# training and testing settings
train_cfg = dict(
init=dict(
assigner=dict(type='ConvexAssigner', scale=4, pos_num=1),
allowed_border=-1,
pos_weight=-1,
debug=False),
refine=dict(
assigner=dict(
type='MaxConvexIoUAssigner',
pos_iou_thr=0.1,
neg_iou_thr=0.1,
min_pos_iou=0,
ignore_iof_thr=-1),
allowed_border=-1,
pos_weight=-1,
debug=False))
test_cfg = dict(
nms_pre=2000,
min_bbox_size=0,
score_thr=0.05,
nms=dict(type='rnms', iou_thr=0.4),
max_per_img=2000)
# dataset settings
dataset_type = 'DOTADataset'
data_root = '/content/drive/MyDrive/data/split_ss_dota1_0/'
img_norm_cfg = dict(
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
train_pipeline = [
dict(type='LoadImageFromFile'),
dict(type='LoadOBBAnnotations', with_bbox=True,
with_label=True, with_poly_as_mask=True),
dict(type='LoadDOTASpecialInfo'),
dict(type='Resize', img_scale=(1024, 1024), keep_ratio=True),
dict(type='OBBRandomFlip', h_flip_ratio=0.5, v_flip_ratio=0.5),
dict(type='Normalize', **img_norm_cfg),
dict(type='RandomOBBRotate', rotate_after_flip=True,
angles=(0, 0), vert_rate=0.5, vert_cls=['roundabout', 'storage-tank']),
dict(type='Pad', size_divisor=32),
dict(type='DOTASpecialIgnore', ignore_size=2),
dict(type='FliterEmpty'),
dict(type='Mask2OBB', obb_type='obb'),
dict(type='OBBDefaultFormatBundle'),
dict(type='OBBCollect', keys=['img', 'gt_bboxes', 'gt_obboxes', 'gt_labels'])
]
test_pipeline = [
dict(type='LoadImageFromFile'),
dict(
type='MultiScaleFlipRotateAug',
img_scale=[(1024, 1024)],
h_flip=False,
v_flip=False,
rotate=False,
transforms=[
dict(type='Resize', keep_ratio=True),
dict(type='OBBRandomFlip'),
dict(type='Normalize', **img_norm_cfg),
dict(type='RandomOBBRotate', rotate_after_flip=True),
dict(type='Pad', size_divisor=32),
dict(type='ImageToTensor', keys=['img']),
dict(type='OBBCollect', keys=['img']),
])
]
# does evaluation while training
# uncomments it when you need evaluate every epoch
# data = dict(
# samples_per_gpu=2,
# workers_per_gpu=4,
# train=dict(
# type=dataset_type,
# task='Task1',
# ann_file=data_root + 'train/annfiles/',
# img_prefix=data_root + 'train/images/',
# pipeline=train_pipeline),
# val=dict(
# type=dataset_type,
# task='Task1',
# ann_file=data_root + 'val/annfiles/',
# img_prefix=data_root + 'val/images/',
# pipeline=test_pipeline),
# test=dict(
# type=dataset_type,
# task='Task1',
# ann_file=data_root + 'val/annfiles/',
# img_prefix=data_root + 'val/images/',
# pipeline=test_pipeline))
# evaluation = dict(metric='mAP')
# disable evluation, only need train and test
# uncomments it when use trainval as train
data = dict(
samples_per_gpu=2,
workers_per_gpu=4,
train=dict(
type=dataset_type,
task='Task1',
ann_file=data_root + 'trainval/annfiles/',
img_prefix=data_root + 'trainval/images/',
pipeline=train_pipeline),
test=dict(
type=dataset_type,
task='Task1',
ann_file=data_root + 'test/annfiles/',
img_prefix=data_root + 'test/images/',
pipeline=test_pipeline))
evaluation = None
# optimizer
optimizer = dict(type='SGD', lr=0.008, momentum=0.9, weight_decay=0.0001)
optimizer_config = dict(grad_clip=dict(max_norm=35, norm_type=2))
# learning policy
lr_config = dict(
policy='step',
warmup='linear',
warmup_iters=500,
warmup_ratio=1.0 / 3,
step=[24, 32, 38])
checkpoint_config = dict(interval=5)
# yapf:disable
log_config = dict(
interval=50,
hooks=[
dict(type='TextLoggerHook'),
])
# yapf:enable
# runtime settings
total_epochs = 40
dist_params = dict(backend='nccl')
log_level = 'INFO'
work_dir = None
load_from = None
resume_from = None
workflow = [('train', 1)]
|
# -*- coding: utf-8 -*-
class BaseContext:
headers = {}
def __init__(self, **kwargs):
self.headers = {}
def on_auth(self):
pass
def update_authkey(self, authkey):
pass
def set_authkey(self, authkey):
self.headers["X-Authorization-Update"] = "Bearer {0}".format(authkey)
|
class BaseDeDados:
def __init__(self):#init eh o mais proximo de um construtor e vamos adicionar ao dicionario o banco de dados
self.dados = {}
def inserir_cliente(self, id, nome):
if 'clientes' not in self.dados:#se a informacao nao tiver na base de dados
self.dados['clientes'] = {id: nome}#cria um cliente
else:
self.dados['clientes'].update({id: nome})#se a chave ja existir na base de dados atualiza a base
def lista_clientes(self):
for id, nome in self.dados['clientes'].items():
print(id, nome)
def apaga_cliente(self, id):
del self.dados['clientes'] [id]
bd = BaseDeDados()
bd.inserir_cliente(1, 'daniel')
bd.inserir_cliente(2, 'luana')
bd.inserir_cliente(3, 'tiago')
bd.apaga_cliente(3)
bd.lista_clientes()
#print(bd.dados)
#{'clientes': {1: 'daniel', 2: 'luana', 3: 'tiago'}}
|
def langInit(jsonDir,json):
fop=open(jsonDir,'r')
lang=fop.read()
fop.close()
lang=json.loads(lang)
#print(lang)
return lang
|
class Solution:
def combinationSum(self, candidates, target):
"""
:type candidates: List[int]
:type target: int
:rtype: List[List[int]]
"""
def dfs(idx, csum):
record.append(None)
for i in range(idx, len(candidates)):
record[-1] = b = candidates[i]
nsum = csum + b
if nsum == target:
yield record[:]
elif nsum > target:
break
elif target - nsum >= b:
yield from dfs(i, nsum)
record.pop()
record = []
candidates.sort()
return list(dfs(0, 0))
if __name__ == "__main__":
solver = Solution()
print(solver.combinationSum([2, 3, 6, 7], 7))
print(solver.combinationSum([2, 3, 5], 8))
|
# Entrada de dados
anos = int(input('Qual a sua idade anos? '))
meses = anos * 12
dias = anos * 365
# Saída de dados
print(f'Sua idade em dias é: {dias}') |
class Solution:
def solve(self, board: List[List[str]]) -> None:
"""
Do not return anything, modify board in-place instead.
"""
row, col = len(board), len(board[0])
def dfs(i, j):
nonlocal row, col, board
if i < 0 or i >= row or j < 0 or j >= col:
return
if board[i][j] != 'O':
return
board[i][j] = '#'
dfs(i-1, j)
dfs(i+1, j)
dfs(i, j+1)
dfs(i, j-1)
return
for r in range(row):
if board[r][0] == 'O':
dfs(r, 0)
board[r][0] == '#'
if board[r][col-1] == 'O':
dfs(r, col-1)
board[r][col-1] == '#'
for c in range(col):
if board[0][c] == 'O':
dfs(0, c)
board[0][c] == '#'
if board[row-1][c] == 'O':
dfs(row-1, c)
board[row-1][c] == '#'
for r in range(row):
for c in range(col):
if board[r][c] == 'O':
board[r][c] = 'X'
elif board[r][c] == '#':
board[r][c] = 'O' |
# Copyright 2018 Google LLC
#
# 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.
"""General interface of an RL agent.
The classes implements this class need to support the following interfaces:
1. random_action(observation), given an observation return a random action.
2. action(observation), given an observation return an action from the policy.
3. train(global_step), improves the agents internal policy once.
"""
class Agent(object):
"""General interface of an RL agent."""
def initialize(self):
"""Initialization before playing.
This function serves as a unified interface to do some pre-work.
E.g., for DDPG and TD3, update target network should be done here.
"""
pass
def random_action(self, observation):
"""Return a random action.
Given an observation return a random action.
Specifications of the action space should be given/initialized
when the agent is initialized.
Args:
observation: object, observations from the env.
Returns:
numpy.array, represent an action.
"""
raise NotImplementedError('Not implemented')
def action(self, observation):
"""Return an action according to the agent's internal policy.
Given an observation return an action according to the agent's
internal policy. Specifications of the action space should be
given/initialized when the agent is initialized.
Args:
observation: object, observations from the env.
Returns:
numpy.array, represent an action.
"""
raise NotImplementedError('Not implemented')
def action_with_noise(self, observation):
"""Return a noisy action.
Given an observation return a noisy action according to the agent's
internal policy and exploration noise process.
Specifications of the action space should be given/initialized
when the agent is initialized.
Args:
observation: object, observations from the env.
Returns:
numpy.array, represent an action.
"""
raise NotImplementedError('Not implemented')
def train(self, global_step):
"""Improve the agent's policy once.
Train the agent and improve its internal policy once.
Args:
global_step: int, global step count.
Returns:
object, represent training metrics.
"""
raise NotImplementedError('Not implemented')
|
# -*- coding: utf-8 -*-
"""
Created on Sat Aug 02 05:35:25 2014
@author: perez
"""
##
# MongoDB config
config_mongoURI = 'mongodb://localhost:27017/'
config_db_name = 'test_database'
##
# Meteo API config
config_openWeatherMapAPIKey = '53c2d72826f2215d60c154f657ddb923'
|
# closure Example
def counter(n):
def next():
nonlocal n
r = n
n -= 1
# print(next.__globals__)
print(type(next.__globals__))
for val in next.__globals__:
print(type(val), val)
return r
return next
next = counter(10)
print(next())
# print(next.__globals__)
print(next())
print(next())
print(next())
print(next()) |
TEXTO_PRINCIPAL = 'FonoaudiologaBot 🤖 es una robot que colabora optimizando el tiempo en el cálculo de desviaciones ' \
'estándar, percentiles y puntajes en distintas pruebas.' \
' Conoce como apoyar el desarrollo del proyecto en /apoyar\n\n' \
'Las pruebas incluidas y comandos son:\n\n' \
'/edna para calcular EDNA\n' \
'/idtel para calcular IDTEL\n' \
'/pecfo para calcular PECFO\n' \
'/stsg para calcular STSG\n' \
'/teprosif para calcular TEPROSIF-R\n' \
'/tevi para calcular TEVI\n' \
'/tecal para calcular TECAL\n\n' \
#'Definiciones\n\n' \
#'/define abuso vocal\n' \
#'/define afasia\n' \
#'/define_abuso_vocal \n' \
#'/define_afasia'
TEXTO_APOYO = 'Puedes apoyar el proyecto comprando un café ☕ acá: https://www.buymeacoffee.com/presionaenter\n\n' \
'Si encontraste un bug, por favor reportarlo en @PresionaEnter o en https://presionaenter.com/bug'
DEF_ABUSO_VOCAL = '- Abuso vocal\n' \
'Un mal uso vocal puede llevar a un abuso. Las conductas abusivas pueden ser: uso prolongado del ' \
'volumen, esfuerzo y uso excesivo durante un período inflamatorio, tos excesiva y carraspeo.\n' \
'(María Cristina A. J.-M, 2002)'
DEF_AFASIA = '- Afasia\n' \
'Es un trastorno del lenguaje como consecuencia de una lesión en las áreas cerebrales que controlan su ' \
'emisión y comprensión, así como sus componentes (conocimiento semántico, fonológico, morfológico, ' \
'sintáctico).\n' \
'(Nancy Helm-Estabrooks, 2005).'
REGEX_ONLY_STRINGS = "[a-zA-Z]+"
# REGEX_ONLY_NUMBERS = '/(\d+(\.\d+)?)/'
REGEX_ONLY_NUMBERS = '^[0-9]+$'
INCORRECTA_CANTIDAD_DE_ARGUMENTOS = 'Cantidad incorrecta de palabras para comando /define.\n'\
'Intente usando una de estas dos: \n/define afasia\n/define abuso vocal'
|
# -*- coding: utf-8 -*-
def fence_format(fence):
"""
格式化经纬度坐标
lon1,lat1,lon2,lat2…… to [[lon1,lat1],[lon2,lat2]……]
:param fence:
:return:
"""
points = []
fence_list = fence.split(",")
for i in range(len(fence_list))[::2]:
points.append([float(fence_list[i]), float(fence_list[i+1])])
return points
def point_in_fence(x, y, points):
"""
计算点是否在围栏内
:param x: 经度
:param y: 纬度
:param points: 格式[[lon1,lat1],[lon2,lat2]……]
:return:
"""
count = 0
x1, y1 = points[0]
x1_part = (y1 > y) or ((x1 - x > 0) and (y1 == y)) # x1在哪一部分中
points.append((x1, y1))
for point in points[1:]:
x2, y2 = point
x2_part = (y2 > y) or ((x2 > x) and (y2 == y)) # x2在哪一部分中
if x2_part == x1_part:
x1, y1 = x2, y2
continue
mul = (x1 - x) * (y2 - y) - (x2 - x) * (y1 - y)
if mul > 0: # 叉积大于0 逆时针
count += 1
elif mul < 0:
count -= 1
x1, y1 = x2, y2
x1_part = x2_part
if count == 2 or count == -2:
return True
else:
return False
|
#
# PySNMP MIB module IF-CAP-STACK-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/IF-CAP-STACK-MIB
# Produced by pysmi-0.3.4 at Wed May 1 13:53:07 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, Integer, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "OctetString", "Integer", "ObjectIdentifier")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ConstraintsUnion, ConstraintsIntersection, ValueRangeConstraint, SingleValueConstraint, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "ConstraintsIntersection", "ValueRangeConstraint", "SingleValueConstraint", "ValueSizeConstraint")
ifInvStackGroup, = mibBuilder.importSymbols("IF-INVERTED-STACK-MIB", "ifInvStackGroup")
ifStackLowerLayer, ifStackHigherLayer, ifStackGroup2 = mibBuilder.importSymbols("IF-MIB", "ifStackLowerLayer", "ifStackHigherLayer", "ifStackGroup2")
ObjectGroup, ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ObjectGroup", "ModuleCompliance", "NotificationGroup")
NotificationType, MibScalar, MibTable, MibTableRow, MibTableColumn, Bits, ObjectIdentity, iso, Counter32, TimeTicks, ModuleIdentity, Integer32, Gauge32, Counter64, Unsigned32, MibIdentifier, mib_2, IpAddress = mibBuilder.importSymbols("SNMPv2-SMI", "NotificationType", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Bits", "ObjectIdentity", "iso", "Counter32", "TimeTicks", "ModuleIdentity", "Integer32", "Gauge32", "Counter64", "Unsigned32", "MibIdentifier", "mib-2", "IpAddress")
DisplayString, TextualConvention, TruthValue = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention", "TruthValue")
ifCapStackMIB = ModuleIdentity((1, 3, 6, 1, 2, 1, 166))
ifCapStackMIB.setRevisions(('2007-11-07 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: ifCapStackMIB.setRevisionsDescriptions(('Initial version, published as RFC 5066.',))
if mibBuilder.loadTexts: ifCapStackMIB.setLastUpdated('200711070000Z')
if mibBuilder.loadTexts: ifCapStackMIB.setOrganization('IETF Ethernet Interfaces and Hub MIB Working Group')
if mibBuilder.loadTexts: ifCapStackMIB.setContactInfo('WG charter: http://www.ietf.org/html.charters/OLD/hubmib-charter.html Mailing Lists: General Discussion: [email protected] To Subscribe: [email protected] In Body: subscribe your_email_address Chair: Bert Wijnen Postal: Alcatel-Lucent Schagen 33 3461 GL Linschoten Netherlands Phone: +31-348-407-775 EMail: [email protected] Editor: Edward Beili Postal: Actelis Networks Inc. 25 Bazel St., P.O.B. 10173 Petach-Tikva 10173 Israel Phone: +972-3-924-3491 EMail: [email protected]')
if mibBuilder.loadTexts: ifCapStackMIB.setDescription('The objects in this MIB module are used to describe cross-connect capabilities of stacked (layered) interfaces, complementing ifStackTable and ifInvStackTable defined in IF-MIB and IF-INVERTED-STACK-MIB, respectively. Copyright (C) The IETF Trust (2007). This version of this MIB module is part of RFC 5066; see the RFC itself for full legal notices.')
ifCapStackObjects = MibIdentifier((1, 3, 6, 1, 2, 1, 166, 1))
ifCapStackConformance = MibIdentifier((1, 3, 6, 1, 2, 1, 166, 2))
ifCapStackTable = MibTable((1, 3, 6, 1, 2, 1, 166, 1, 1), )
if mibBuilder.loadTexts: ifCapStackTable.setReference('IF-MIB, ifStackTable')
if mibBuilder.loadTexts: ifCapStackTable.setStatus('current')
if mibBuilder.loadTexts: ifCapStackTable.setDescription("This table, modeled after ifStackTable from IF-MIB, contains information on the possible 'on-top-of' relationships between the multiple sub-layers of network interfaces (as opposed to actual relationships described in ifStackTable). In particular, it contains information on which sub-layers MAY possibly run 'on top of' which other sub-layers, as determined by cross-connect capability of the device, where each sub-layer corresponds to a conceptual row in the ifTable. For example, when the sub-layer with ifIndex value x can be connected to run on top of the sub-layer with ifIndex value y, then this table contains: ifCapStackStatus.x.y=true The ifCapStackStatus.x.y row does not exist if it is impossible to connect between the sub-layers x and y. Note that for most stacked interfaces (e.g., 2BASE-TL) there's always at least one higher-level interface (e.g., PCS port) for each lower-level interface (e.g., PME) and at least one lower-level interface for each higher-level interface, that is, there is at least a single row with a 'true' status for any such existing value of x or y. This table is read-only as it describes device capabilities.")
ifCapStackEntry = MibTableRow((1, 3, 6, 1, 2, 1, 166, 1, 1, 1), ).setIndexNames((0, "IF-MIB", "ifStackHigherLayer"), (0, "IF-MIB", "ifStackLowerLayer"))
if mibBuilder.loadTexts: ifCapStackEntry.setStatus('current')
if mibBuilder.loadTexts: ifCapStackEntry.setDescription("Information on a particular relationship between two sub-layers, specifying that one sub-layer MAY possibly run on 'top' of the other sub-layer. Each sub-layer corresponds to a conceptual row in the ifTable (interface index for lower and higher layer, respectively).")
ifCapStackStatus = MibTableColumn((1, 3, 6, 1, 2, 1, 166, 1, 1, 1, 1), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ifCapStackStatus.setStatus('current')
if mibBuilder.loadTexts: ifCapStackStatus.setDescription("The status of the 'cross-connect capability' relationship between two sub-layers. The following values can be returned: true(1) - indicates that the sub-layer interface, identified by the ifStackLowerLayer MAY be connected to run 'below' the sub-layer interface, identified by the ifStackHigherLayer index. false(2) - the sub-layer interfaces cannot be connected temporarily due to unavailability of the interface(s), e.g., one of the interfaces is located on an absent pluggable module. Note that lower-layer interface availability per higher-layer, indicated by the value of 'true', can be constrained by other parameters, for example, by the aggregation capacity of a higher-layer interface or by the lower-layer interface in question being already connected to another higher-layer interface. In order to ensure that a particular sub-layer can be connected to another sub-layer, all respective objects (e.g., ifCapStackTable, ifStackTable, and efmCuPAFCapacity for EFMCu interfaces) SHALL be inspected. This object is read-only, unlike ifStackStatus, as it describes a cross-connect capability.")
ifInvCapStackTable = MibTable((1, 3, 6, 1, 2, 1, 166, 1, 2), )
if mibBuilder.loadTexts: ifInvCapStackTable.setReference('IF-INVERTED-STACK-MIB, ifInvStackTable')
if mibBuilder.loadTexts: ifInvCapStackTable.setStatus('current')
if mibBuilder.loadTexts: ifInvCapStackTable.setDescription("A table containing information on the possible relationships between the multiple sub-layers of network interfaces. This table, modeled after ifInvStackTable from IF-INVERTED-STACK-MIB, is an inverse of the ifCapStackTable defined in this MIB module. In particular, this table contains information on which sub-layers MAY run 'underneath' which other sub-layers, where each sub-layer corresponds to a conceptual row in the ifTable. For example, when the sub-layer with ifIndex value x MAY be connected to run underneath the sub-layer with ifIndex value y, then this table contains: ifInvCapStackStatus.x.y=true This table contains exactly the same number of rows as the ifCapStackTable, but the rows appear in a different order. This table is read-only as it describes a cross-connect capability.")
ifInvCapStackEntry = MibTableRow((1, 3, 6, 1, 2, 1, 166, 1, 2, 1), ).setIndexNames((0, "IF-MIB", "ifStackLowerLayer"), (0, "IF-MIB", "ifStackHigherLayer"))
if mibBuilder.loadTexts: ifInvCapStackEntry.setStatus('current')
if mibBuilder.loadTexts: ifInvCapStackEntry.setDescription('Information on a particular relationship between two sub- layers, specifying that one sub-layer MAY run underneath the other sub-layer. Each sub-layer corresponds to a conceptual row in the ifTable.')
ifInvCapStackStatus = MibTableColumn((1, 3, 6, 1, 2, 1, 166, 1, 2, 1, 1), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ifInvCapStackStatus.setReference('ifCapStackStatus')
if mibBuilder.loadTexts: ifInvCapStackStatus.setStatus('current')
if mibBuilder.loadTexts: ifInvCapStackStatus.setDescription("The status of the possible 'cross-connect capability' relationship between two sub-layers. An instance of this object exists for each instance of the ifCapStackStatus object, and vice versa. For example, if the variable ifCapStackStatus.H.L exists, then the variable ifInvCapStackStatus.L.H must also exist, and vice versa. In addition, the two variables always have the same value. The ifInvCapStackStatus object is read-only, as it describes a cross-connect capability.")
ifCapStackGroups = MibIdentifier((1, 3, 6, 1, 2, 1, 166, 2, 1))
ifCapStackCompliances = MibIdentifier((1, 3, 6, 1, 2, 1, 166, 2, 2))
ifCapStackGroup = ObjectGroup((1, 3, 6, 1, 2, 1, 166, 2, 1, 1)).setObjects(("IF-CAP-STACK-MIB", "ifCapStackStatus"), ("IF-CAP-STACK-MIB", "ifInvCapStackStatus"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ifCapStackGroup = ifCapStackGroup.setStatus('current')
if mibBuilder.loadTexts: ifCapStackGroup.setDescription('A collection of objects providing information on the cross-connect capability of multi-layer (stacked) network interfaces.')
ifCapStackCompliance = ModuleCompliance((1, 3, 6, 1, 2, 1, 166, 2, 2, 1)).setObjects(("IF-CAP-STACK-MIB", "ifCapStackGroup"), ("IF-MIB", "ifStackGroup2"), ("IF-INVERTED-STACK-MIB", "ifInvStackGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ifCapStackCompliance = ifCapStackCompliance.setStatus('current')
if mibBuilder.loadTexts: ifCapStackCompliance.setDescription('The compliance statement for SNMP entities, which provide information on the cross-connect capability of multi-layer (stacked) network interfaces, with flexible cross-connect between the sub-layers.')
mibBuilder.exportSymbols("IF-CAP-STACK-MIB", ifCapStackConformance=ifCapStackConformance, ifCapStackMIB=ifCapStackMIB, ifInvCapStackStatus=ifInvCapStackStatus, ifCapStackObjects=ifCapStackObjects, ifCapStackGroups=ifCapStackGroups, ifCapStackEntry=ifCapStackEntry, ifCapStackGroup=ifCapStackGroup, ifCapStackCompliances=ifCapStackCompliances, ifCapStackTable=ifCapStackTable, ifCapStackCompliance=ifCapStackCompliance, ifCapStackStatus=ifCapStackStatus, PYSNMP_MODULE_ID=ifCapStackMIB, ifInvCapStackEntry=ifInvCapStackEntry, ifInvCapStackTable=ifInvCapStackTable)
|
#
# PySNMP MIB module Nortel-MsCarrier-MscPassport-TrunksMIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/Nortel-MsCarrier-MscPassport-TrunksMIB
# Produced by pysmi-0.3.4 at Mon Apr 29 20:19:50 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, Integer, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "OctetString", "Integer", "ObjectIdentifier")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ConstraintsIntersection, ValueSizeConstraint, ConstraintsUnion, ValueRangeConstraint, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "ValueSizeConstraint", "ConstraintsUnion", "ValueRangeConstraint", "SingleValueConstraint")
RowStatus, Integer32, Gauge32, DisplayString, Counter32, InterfaceIndex, Unsigned32, StorageType = mibBuilder.importSymbols("Nortel-MsCarrier-MscPassport-StandardTextualConventionsMIB", "RowStatus", "Integer32", "Gauge32", "DisplayString", "Counter32", "InterfaceIndex", "Unsigned32", "StorageType")
PassportCounter64, AsciiStringIndex, FixedPoint1, AsciiString, NonReplicated = mibBuilder.importSymbols("Nortel-MsCarrier-MscPassport-TextualConventionsMIB", "PassportCounter64", "AsciiStringIndex", "FixedPoint1", "AsciiString", "NonReplicated")
mscComponents, mscPassportMIBs = mibBuilder.importSymbols("Nortel-MsCarrier-MscPassport-UsefulDefinitionsMIB", "mscComponents", "mscPassportMIBs")
ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup")
Counter64, NotificationType, Integer32, Unsigned32, Gauge32, MibScalar, MibTable, MibTableRow, MibTableColumn, iso, MibIdentifier, ObjectIdentity, TimeTicks, Counter32, Bits, ModuleIdentity, IpAddress = mibBuilder.importSymbols("SNMPv2-SMI", "Counter64", "NotificationType", "Integer32", "Unsigned32", "Gauge32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "iso", "MibIdentifier", "ObjectIdentity", "TimeTicks", "Counter32", "Bits", "ModuleIdentity", "IpAddress")
TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString")
trunksMIB = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 2, 43))
mscTrk = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60))
mscTrkRowStatusTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 1), )
if mibBuilder.loadTexts: mscTrkRowStatusTable.setStatus('mandatory')
mscTrkRowStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 1, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkIndex"))
if mibBuilder.loadTexts: mscTrkRowStatusEntry.setStatus('mandatory')
mscTrkRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 1, 1, 1), RowStatus()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mscTrkRowStatus.setStatus('mandatory')
mscTrkComponentName = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 1, 1, 2), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkComponentName.setStatus('mandatory')
mscTrkStorageType = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 1, 1, 4), StorageType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkStorageType.setStatus('mandatory')
mscTrkIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 1, 1, 10), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535)))
if mibBuilder.loadTexts: mscTrkIndex.setStatus('mandatory')
mscTrkIfEntryTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 100), )
if mibBuilder.loadTexts: mscTrkIfEntryTable.setStatus('mandatory')
mscTrkIfEntryEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 100, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkIndex"))
if mibBuilder.loadTexts: mscTrkIfEntryEntry.setStatus('mandatory')
mscTrkIfAdminStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 100, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("up", 1), ("down", 2), ("testing", 3))).clone('up')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mscTrkIfAdminStatus.setStatus('mandatory')
mscTrkIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 100, 1, 2), InterfaceIndex().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkIfIndex.setStatus('mandatory')
mscTrkProvTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 101), )
if mibBuilder.loadTexts: mscTrkProvTable.setStatus('mandatory')
mscTrkProvEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 101, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkIndex"))
if mibBuilder.loadTexts: mscTrkProvEntry.setStatus('mandatory')
mscTrkExpectedRemoteNodeName = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 101, 1, 1), AsciiString().subtype(subtypeSpec=ValueSizeConstraint(0, 12))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mscTrkExpectedRemoteNodeName.setStatus('mandatory')
mscTrkRemoteValidationAction = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 101, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("continue", 0), ("disable", 1))).clone('continue')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mscTrkRemoteValidationAction.setStatus('mandatory')
mscTrkMaximumExpectedRoundTripDelay = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 101, 1, 3), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 1500)).clone(1500)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mscTrkMaximumExpectedRoundTripDelay.setStatus('mandatory')
mscTrkIdleTimeOut = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 101, 1, 4), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(2, 30)).clone(4)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mscTrkIdleTimeOut.setStatus('mandatory')
mscTrkOverridesTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 102), )
if mibBuilder.loadTexts: mscTrkOverridesTable.setStatus('mandatory')
mscTrkOverridesEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 102, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkIndex"))
if mibBuilder.loadTexts: mscTrkOverridesEntry.setStatus('mandatory')
mscTrkOverrideTransmitSpeed = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 102, 1, 1), Gauge32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(1000, 4294967295), ))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mscTrkOverrideTransmitSpeed.setStatus('mandatory')
mscTrkOldOverrideRoundTripDelay = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 102, 1, 2), Gauge32().subtype(subtypeSpec=ValueRangeConstraint(0, 1500))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mscTrkOldOverrideRoundTripDelay.setStatus('obsolete')
mscTrkOverrideRoundTripUsec = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 102, 1, 3), FixedPoint1().subtype(subtypeSpec=ValueRangeConstraint(0, 15000))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mscTrkOverrideRoundTripUsec.setStatus('mandatory')
mscTrkStateTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 103), )
if mibBuilder.loadTexts: mscTrkStateTable.setStatus('mandatory')
mscTrkStateEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 103, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkIndex"))
if mibBuilder.loadTexts: mscTrkStateEntry.setStatus('mandatory')
mscTrkAdminState = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 103, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("locked", 0), ("unlocked", 1), ("shuttingDown", 2))).clone('unlocked')).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkAdminState.setStatus('mandatory')
mscTrkOperationalState = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 103, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1))).clone('disabled')).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkOperationalState.setStatus('mandatory')
mscTrkUsageState = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 103, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("idle", 0), ("active", 1), ("busy", 2))).clone('idle')).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkUsageState.setStatus('mandatory')
mscTrkAvailabilityStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 103, 1, 4), OctetString().subtype(subtypeSpec=ValueSizeConstraint(2, 2)).setFixedLength(2)).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkAvailabilityStatus.setStatus('mandatory')
mscTrkProceduralStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 103, 1, 5), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 1)).setFixedLength(1)).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkProceduralStatus.setStatus('mandatory')
mscTrkControlStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 103, 1, 6), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 1)).setFixedLength(1)).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkControlStatus.setStatus('mandatory')
mscTrkAlarmStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 103, 1, 7), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 1)).setFixedLength(1)).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkAlarmStatus.setStatus('mandatory')
mscTrkStandbyStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 103, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 15))).clone(namedValues=NamedValues(("hotStandby", 0), ("coldStandby", 1), ("providingService", 2), ("notSet", 15))).clone('notSet')).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkStandbyStatus.setStatus('mandatory')
mscTrkUnknownStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 103, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("false", 0), ("true", 1))).clone('false')).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkUnknownStatus.setStatus('mandatory')
mscTrkOperStatusTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 104), )
if mibBuilder.loadTexts: mscTrkOperStatusTable.setStatus('mandatory')
mscTrkOperStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 104, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkIndex"))
if mibBuilder.loadTexts: mscTrkOperStatusEntry.setStatus('mandatory')
mscTrkSnmpOperStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 104, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("up", 1), ("down", 2), ("testing", 3))).clone('up')).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkSnmpOperStatus.setStatus('mandatory')
mscTrkOperTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 105), )
if mibBuilder.loadTexts: mscTrkOperTable.setStatus('mandatory')
mscTrkOperEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 105, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkIndex"))
if mibBuilder.loadTexts: mscTrkOperEntry.setStatus('mandatory')
mscTrkRemoteComponentName = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 105, 1, 1), AsciiString().subtype(subtypeSpec=ValueSizeConstraint(1, 27))).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkRemoteComponentName.setStatus('mandatory')
mscTrkTransportTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 106), )
if mibBuilder.loadTexts: mscTrkTransportTable.setStatus('mandatory')
mscTrkTransportEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 106, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkIndex"))
if mibBuilder.loadTexts: mscTrkTransportEntry.setStatus('mandatory')
mscTrkMeasuredSpeedToIf = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 106, 1, 1), Gauge32().subtype(subtypeSpec=ValueRangeConstraint(0, 4294967295))).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkMeasuredSpeedToIf.setStatus('mandatory')
mscTrkMeasuredRoundTripDelay = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 106, 1, 2), Gauge32().subtype(subtypeSpec=ValueRangeConstraint(0, 1500))).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkMeasuredRoundTripDelay.setStatus('obsolete')
mscTrkMaxTxUnit = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 106, 1, 3), Gauge32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkMaxTxUnit.setStatus('mandatory')
mscTrkMeasuredRoundTripDelayUsec = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 106, 1, 4), FixedPoint1().subtype(subtypeSpec=ValueRangeConstraint(0, 15000))).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkMeasuredRoundTripDelayUsec.setStatus('mandatory')
mscTrkStatsTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 107), )
if mibBuilder.loadTexts: mscTrkStatsTable.setStatus('mandatory')
mscTrkStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 107, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkIndex"))
if mibBuilder.loadTexts: mscTrkStatsEntry.setStatus('mandatory')
mscTrkAreYouThereModeEntries = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 107, 1, 1), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkAreYouThereModeEntries.setStatus('mandatory')
mscTrkPktFromIf = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 107, 1, 2), PassportCounter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkPktFromIf.setStatus('mandatory')
mscTrkTrunkPktFromIf = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 107, 1, 3), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkTrunkPktFromIf.setStatus('mandatory')
mscTrkTrunkPktToIf = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 107, 1, 4), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkTrunkPktToIf.setStatus('mandatory')
mscTrkDiscardUnforward = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 107, 1, 5), PassportCounter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkDiscardUnforward.setStatus('mandatory')
mscTrkDiscardTrunkPktFromIf = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 107, 1, 6), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkDiscardTrunkPktFromIf.setStatus('mandatory')
mscTrkIntPktFromIf = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 107, 1, 7), PassportCounter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkIntPktFromIf.setStatus('mandatory')
mscTrkDiscardIntUnforward = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 107, 1, 8), PassportCounter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkDiscardIntUnforward.setStatus('mandatory')
mscTrkStagingAttempts = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 107, 1, 9), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkStagingAttempts.setStatus('mandatory')
mscTrkDiscardTrunkPktToIf = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 107, 1, 10), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkDiscardTrunkPktToIf.setStatus('mandatory')
mscTrkSpeedReportingTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 109), )
if mibBuilder.loadTexts: mscTrkSpeedReportingTable.setStatus('mandatory')
mscTrkSpeedReportingEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 109, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkIndex"))
if mibBuilder.loadTexts: mscTrkSpeedReportingEntry.setStatus('mandatory')
mscTrkSpeedReportingHoldOff = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 109, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 1200)).clone(30)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mscTrkSpeedReportingHoldOff.setStatus('mandatory')
mscTrkLowSpeedAlarmThreshold = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 109, 1, 3), Unsigned32().subtype(subtypeSpec=ConstraintsUnion(ValueRangeConstraint(0, 0), ValueRangeConstraint(1, 4294967295), ))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mscTrkLowSpeedAlarmThreshold.setStatus('mandatory')
mscTrkHighSpeedAlarmThreshold = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 109, 1, 4), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 4294967295)).clone(4294967295)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mscTrkHighSpeedAlarmThreshold.setStatus('mandatory')
mscTrkSpdThTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 318), )
if mibBuilder.loadTexts: mscTrkSpdThTable.setStatus('mandatory')
mscTrkSpdThEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 318, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkIndex"), (0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkSpdThValue"))
if mibBuilder.loadTexts: mscTrkSpdThEntry.setStatus('mandatory')
mscTrkSpdThValue = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 318, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 268435455))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mscTrkSpdThValue.setStatus('mandatory')
mscTrkSpdThRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 318, 1, 2), RowStatus()).setMaxAccess("writeonly")
if mibBuilder.loadTexts: mscTrkSpdThRowStatus.setStatus('mandatory')
mscTrkPktBpTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 368), )
if mibBuilder.loadTexts: mscTrkPktBpTable.setStatus('mandatory')
mscTrkPktBpEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 368, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkIndex"), (0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkPktBpIndex"))
if mibBuilder.loadTexts: mscTrkPktBpEntry.setStatus('mandatory')
mscTrkPktBpIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 368, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("ep0", 0), ("ep1", 1), ("ep2", 2))))
if mibBuilder.loadTexts: mscTrkPktBpIndex.setStatus('mandatory')
mscTrkPktBpValue = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 368, 1, 2), PassportCounter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkPktBpValue.setStatus('mandatory')
mscTrkDiscBpTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 369), )
if mibBuilder.loadTexts: mscTrkDiscBpTable.setStatus('mandatory')
mscTrkDiscBpEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 369, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkIndex"), (0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkDiscBpIndex"))
if mibBuilder.loadTexts: mscTrkDiscBpEntry.setStatus('mandatory')
mscTrkDiscBpIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 369, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("ep0", 0), ("ep1", 1), ("ep2", 2))))
if mibBuilder.loadTexts: mscTrkDiscBpIndex.setStatus('mandatory')
mscTrkDiscBpValue = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 369, 1, 2), PassportCounter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkDiscBpValue.setStatus('mandatory')
mscTrkOctBpTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 370), )
if mibBuilder.loadTexts: mscTrkOctBpTable.setStatus('mandatory')
mscTrkOctBpEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 370, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkIndex"), (0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkOctBpIndex"))
if mibBuilder.loadTexts: mscTrkOctBpEntry.setStatus('mandatory')
mscTrkOctBpIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 370, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("ep0", 0), ("ep1", 1), ("ep2", 2))))
if mibBuilder.loadTexts: mscTrkOctBpIndex.setStatus('mandatory')
mscTrkOctBpValue = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 370, 1, 2), PassportCounter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkOctBpValue.setStatus('mandatory')
mscTrkPorsStats = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 6))
mscTrkPorsStatsRowStatusTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 6, 1), )
if mibBuilder.loadTexts: mscTrkPorsStatsRowStatusTable.setStatus('mandatory')
mscTrkPorsStatsRowStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 6, 1, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkIndex"), (0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkPorsStatsIndex"))
if mibBuilder.loadTexts: mscTrkPorsStatsRowStatusEntry.setStatus('mandatory')
mscTrkPorsStatsRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 6, 1, 1, 1), RowStatus()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkPorsStatsRowStatus.setStatus('mandatory')
mscTrkPorsStatsComponentName = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 6, 1, 1, 2), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkPorsStatsComponentName.setStatus('mandatory')
mscTrkPorsStatsStorageType = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 6, 1, 1, 4), StorageType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkPorsStatsStorageType.setStatus('mandatory')
mscTrkPorsStatsIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 6, 1, 1, 10), NonReplicated())
if mibBuilder.loadTexts: mscTrkPorsStatsIndex.setStatus('mandatory')
mscTrkPorsStatsOperTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 6, 10), )
if mibBuilder.loadTexts: mscTrkPorsStatsOperTable.setStatus('mandatory')
mscTrkPorsStatsOperEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 6, 10, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkIndex"), (0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkPorsStatsIndex"))
if mibBuilder.loadTexts: mscTrkPorsStatsOperEntry.setStatus('mandatory')
mscTrkPorsStatsPorsNormPktFromIf = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 6, 10, 1, 1), PassportCounter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkPorsStatsPorsNormPktFromIf.setStatus('mandatory')
mscTrkPorsStatsPorsNormDiscUnforwardFromIf = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 6, 10, 1, 2), PassportCounter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkPorsStatsPorsNormDiscUnforwardFromIf.setStatus('mandatory')
mscTrkPorsStatsPorsNormOctetFromIf = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 6, 10, 1, 3), PassportCounter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkPorsStatsPorsNormOctetFromIf.setStatus('mandatory')
mscTrkPorsStatsPorsIntPktFromIf = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 6, 10, 1, 4), PassportCounter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkPorsStatsPorsIntPktFromIf.setStatus('mandatory')
mscTrkPorsStatsPorsIntDiscUnforwardFromIf = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 6, 10, 1, 5), PassportCounter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkPorsStatsPorsIntDiscUnforwardFromIf.setStatus('mandatory')
mscTrkPorsStatsPorsIntOctetFromIf = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 6, 10, 1, 6), PassportCounter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkPorsStatsPorsIntOctetFromIf.setStatus('mandatory')
mscTrkPorsStatsPktBpTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 6, 371), )
if mibBuilder.loadTexts: mscTrkPorsStatsPktBpTable.setStatus('mandatory')
mscTrkPorsStatsPktBpEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 6, 371, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkIndex"), (0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkPorsStatsIndex"), (0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkPorsStatsPktBpEpIndex"), (0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkPorsStatsPktBpDpIndex"))
if mibBuilder.loadTexts: mscTrkPorsStatsPktBpEntry.setStatus('mandatory')
mscTrkPorsStatsPktBpEpIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 6, 371, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("ep0", 0), ("ep1", 1), ("ep2", 2))))
if mibBuilder.loadTexts: mscTrkPorsStatsPktBpEpIndex.setStatus('mandatory')
mscTrkPorsStatsPktBpDpIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 6, 371, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))).clone(namedValues=NamedValues(("dp0", 0), ("dp1", 1), ("dp2", 2), ("dp3", 3))))
if mibBuilder.loadTexts: mscTrkPorsStatsPktBpDpIndex.setStatus('mandatory')
mscTrkPorsStatsPktBpValue = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 6, 371, 1, 3), PassportCounter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkPorsStatsPktBpValue.setStatus('mandatory')
mscTrkPorsStatsDiscBpTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 6, 372), )
if mibBuilder.loadTexts: mscTrkPorsStatsDiscBpTable.setStatus('mandatory')
mscTrkPorsStatsDiscBpEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 6, 372, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkIndex"), (0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkPorsStatsIndex"), (0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkPorsStatsDiscBpEpIndex"), (0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkPorsStatsDiscBpDpIndex"))
if mibBuilder.loadTexts: mscTrkPorsStatsDiscBpEntry.setStatus('mandatory')
mscTrkPorsStatsDiscBpEpIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 6, 372, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("ep0", 0), ("ep1", 1), ("ep2", 2))))
if mibBuilder.loadTexts: mscTrkPorsStatsDiscBpEpIndex.setStatus('mandatory')
mscTrkPorsStatsDiscBpDpIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 6, 372, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))).clone(namedValues=NamedValues(("dp0", 0), ("dp1", 1), ("dp2", 2), ("dp3", 3))))
if mibBuilder.loadTexts: mscTrkPorsStatsDiscBpDpIndex.setStatus('mandatory')
mscTrkPorsStatsDiscBpValue = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 6, 372, 1, 3), PassportCounter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkPorsStatsDiscBpValue.setStatus('mandatory')
mscTrkPorsStatsOctBpTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 6, 373), )
if mibBuilder.loadTexts: mscTrkPorsStatsOctBpTable.setStatus('mandatory')
mscTrkPorsStatsOctBpEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 6, 373, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkIndex"), (0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkPorsStatsIndex"), (0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkPorsStatsOctBpEpIndex"), (0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkPorsStatsOctBpDpIndex"))
if mibBuilder.loadTexts: mscTrkPorsStatsOctBpEntry.setStatus('mandatory')
mscTrkPorsStatsOctBpEpIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 6, 373, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("ep0", 0), ("ep1", 1), ("ep2", 2))))
if mibBuilder.loadTexts: mscTrkPorsStatsOctBpEpIndex.setStatus('mandatory')
mscTrkPorsStatsOctBpDpIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 6, 373, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))).clone(namedValues=NamedValues(("dp0", 0), ("dp1", 1), ("dp2", 2), ("dp3", 3))))
if mibBuilder.loadTexts: mscTrkPorsStatsOctBpDpIndex.setStatus('mandatory')
mscTrkPorsStatsOctBpValue = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 6, 373, 1, 3), PassportCounter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkPorsStatsOctBpValue.setStatus('mandatory')
mscTrkFwdStats = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 7))
mscTrkFwdStatsRowStatusTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 7, 1), )
if mibBuilder.loadTexts: mscTrkFwdStatsRowStatusTable.setStatus('mandatory')
mscTrkFwdStatsRowStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 7, 1, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkIndex"), (0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkFwdStatsIndex"))
if mibBuilder.loadTexts: mscTrkFwdStatsRowStatusEntry.setStatus('mandatory')
mscTrkFwdStatsRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 7, 1, 1, 1), RowStatus()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkFwdStatsRowStatus.setStatus('mandatory')
mscTrkFwdStatsComponentName = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 7, 1, 1, 2), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkFwdStatsComponentName.setStatus('mandatory')
mscTrkFwdStatsStorageType = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 7, 1, 1, 4), StorageType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkFwdStatsStorageType.setStatus('mandatory')
mscTrkFwdStatsIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 7, 1, 1, 10), NonReplicated())
if mibBuilder.loadTexts: mscTrkFwdStatsIndex.setStatus('mandatory')
mscTrkFwdStatsOperTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 7, 10), )
if mibBuilder.loadTexts: mscTrkFwdStatsOperTable.setStatus('mandatory')
mscTrkFwdStatsOperEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 7, 10, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkIndex"), (0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkFwdStatsIndex"))
if mibBuilder.loadTexts: mscTrkFwdStatsOperEntry.setStatus('mandatory')
mscTrkFwdStatsFwdPktFromIf = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 7, 10, 1, 1), PassportCounter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkFwdStatsFwdPktFromIf.setStatus('mandatory')
mscTrkFwdStatsFwdDiscUnforwardFromIf = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 7, 10, 1, 2), PassportCounter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkFwdStatsFwdDiscUnforwardFromIf.setStatus('mandatory')
mscTrkFwdStatsFwdOctetFromIf = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 7, 10, 1, 3), PassportCounter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkFwdStatsFwdOctetFromIf.setStatus('mandatory')
mscTrkVnsStats = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 8))
mscTrkVnsStatsRowStatusTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 8, 1), )
if mibBuilder.loadTexts: mscTrkVnsStatsRowStatusTable.setStatus('mandatory')
mscTrkVnsStatsRowStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 8, 1, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkIndex"), (0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkVnsStatsIndex"))
if mibBuilder.loadTexts: mscTrkVnsStatsRowStatusEntry.setStatus('mandatory')
mscTrkVnsStatsRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 8, 1, 1, 1), RowStatus()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkVnsStatsRowStatus.setStatus('mandatory')
mscTrkVnsStatsComponentName = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 8, 1, 1, 2), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkVnsStatsComponentName.setStatus('mandatory')
mscTrkVnsStatsStorageType = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 8, 1, 1, 4), StorageType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkVnsStatsStorageType.setStatus('mandatory')
mscTrkVnsStatsIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 8, 1, 1, 10), NonReplicated())
if mibBuilder.loadTexts: mscTrkVnsStatsIndex.setStatus('mandatory')
mscTrkVnsStatsOperTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 8, 10), )
if mibBuilder.loadTexts: mscTrkVnsStatsOperTable.setStatus('mandatory')
mscTrkVnsStatsOperEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 8, 10, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkIndex"), (0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkVnsStatsIndex"))
if mibBuilder.loadTexts: mscTrkVnsStatsOperEntry.setStatus('mandatory')
mscTrkVnsStatsVnsPktFromIf = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 8, 10, 1, 1), PassportCounter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkVnsStatsVnsPktFromIf.setStatus('mandatory')
mscTrkVnsStatsVnsDiscUnforwardFromIf = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 8, 10, 1, 2), PassportCounter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkVnsStatsVnsDiscUnforwardFromIf.setStatus('mandatory')
mscTrkVnsStatsVnsOctetFromIf = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 8, 10, 1, 3), PassportCounter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkVnsStatsVnsOctetFromIf.setStatus('mandatory')
mscTrkVnsStatsPktBpTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 8, 377), )
if mibBuilder.loadTexts: mscTrkVnsStatsPktBpTable.setStatus('mandatory')
mscTrkVnsStatsPktBpEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 8, 377, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkIndex"), (0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkVnsStatsIndex"), (0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkVnsStatsPktBpEpIndex"), (0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkVnsStatsPktBpDpIndex"))
if mibBuilder.loadTexts: mscTrkVnsStatsPktBpEntry.setStatus('mandatory')
mscTrkVnsStatsPktBpEpIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 8, 377, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("ep0", 0), ("ep1", 1), ("ep2", 2))))
if mibBuilder.loadTexts: mscTrkVnsStatsPktBpEpIndex.setStatus('mandatory')
mscTrkVnsStatsPktBpDpIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 8, 377, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))).clone(namedValues=NamedValues(("dp0", 0), ("dp1", 1), ("dp2", 2), ("dp3", 3))))
if mibBuilder.loadTexts: mscTrkVnsStatsPktBpDpIndex.setStatus('mandatory')
mscTrkVnsStatsPktBpValue = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 8, 377, 1, 3), PassportCounter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkVnsStatsPktBpValue.setStatus('mandatory')
mscTrkVnsStatsDiscBpTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 8, 378), )
if mibBuilder.loadTexts: mscTrkVnsStatsDiscBpTable.setStatus('mandatory')
mscTrkVnsStatsDiscBpEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 8, 378, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkIndex"), (0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkVnsStatsIndex"), (0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkVnsStatsDiscBpEpIndex"), (0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkVnsStatsDiscBpDpIndex"))
if mibBuilder.loadTexts: mscTrkVnsStatsDiscBpEntry.setStatus('mandatory')
mscTrkVnsStatsDiscBpEpIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 8, 378, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("ep0", 0), ("ep1", 1), ("ep2", 2))))
if mibBuilder.loadTexts: mscTrkVnsStatsDiscBpEpIndex.setStatus('mandatory')
mscTrkVnsStatsDiscBpDpIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 8, 378, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))).clone(namedValues=NamedValues(("dp0", 0), ("dp1", 1), ("dp2", 2), ("dp3", 3))))
if mibBuilder.loadTexts: mscTrkVnsStatsDiscBpDpIndex.setStatus('mandatory')
mscTrkVnsStatsDiscBpValue = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 8, 378, 1, 3), PassportCounter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkVnsStatsDiscBpValue.setStatus('mandatory')
mscTrkVnsStatsOctBpTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 8, 379), )
if mibBuilder.loadTexts: mscTrkVnsStatsOctBpTable.setStatus('mandatory')
mscTrkVnsStatsOctBpEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 8, 379, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkIndex"), (0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkVnsStatsIndex"), (0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkVnsStatsOctBpEpIndex"), (0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkVnsStatsOctBpDpIndex"))
if mibBuilder.loadTexts: mscTrkVnsStatsOctBpEntry.setStatus('mandatory')
mscTrkVnsStatsOctBpEpIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 8, 379, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("ep0", 0), ("ep1", 1), ("ep2", 2))))
if mibBuilder.loadTexts: mscTrkVnsStatsOctBpEpIndex.setStatus('mandatory')
mscTrkVnsStatsOctBpDpIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 8, 379, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))).clone(namedValues=NamedValues(("dp0", 0), ("dp1", 1), ("dp2", 2), ("dp3", 3))))
if mibBuilder.loadTexts: mscTrkVnsStatsOctBpDpIndex.setStatus('mandatory')
mscTrkVnsStatsOctBpValue = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 8, 379, 1, 3), PassportCounter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkVnsStatsOctBpValue.setStatus('mandatory')
mscTrkDprsStats = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 10))
mscTrkDprsStatsRowStatusTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 10, 1), )
if mibBuilder.loadTexts: mscTrkDprsStatsRowStatusTable.setStatus('mandatory')
mscTrkDprsStatsRowStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 10, 1, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkIndex"), (0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkDprsStatsIndex"))
if mibBuilder.loadTexts: mscTrkDprsStatsRowStatusEntry.setStatus('mandatory')
mscTrkDprsStatsRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 10, 1, 1, 1), RowStatus()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkDprsStatsRowStatus.setStatus('mandatory')
mscTrkDprsStatsComponentName = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 10, 1, 1, 2), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkDprsStatsComponentName.setStatus('mandatory')
mscTrkDprsStatsStorageType = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 10, 1, 1, 4), StorageType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkDprsStatsStorageType.setStatus('mandatory')
mscTrkDprsStatsIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 10, 1, 1, 10), NonReplicated())
if mibBuilder.loadTexts: mscTrkDprsStatsIndex.setStatus('mandatory')
mscTrkDprsStatsPktBpTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 10, 374), )
if mibBuilder.loadTexts: mscTrkDprsStatsPktBpTable.setStatus('mandatory')
mscTrkDprsStatsPktBpEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 10, 374, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkIndex"), (0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkDprsStatsIndex"), (0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkDprsStatsPktBpEpIndex"), (0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkDprsStatsPktBpDpIndex"))
if mibBuilder.loadTexts: mscTrkDprsStatsPktBpEntry.setStatus('mandatory')
mscTrkDprsStatsPktBpEpIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 10, 374, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("ep0", 0), ("ep1", 1), ("ep2", 2))))
if mibBuilder.loadTexts: mscTrkDprsStatsPktBpEpIndex.setStatus('mandatory')
mscTrkDprsStatsPktBpDpIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 10, 374, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))).clone(namedValues=NamedValues(("dp0", 0), ("dp1", 1), ("dp2", 2), ("dp3", 3))))
if mibBuilder.loadTexts: mscTrkDprsStatsPktBpDpIndex.setStatus('mandatory')
mscTrkDprsStatsPktBpValue = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 10, 374, 1, 3), PassportCounter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkDprsStatsPktBpValue.setStatus('mandatory')
mscTrkDprsStatsDiscBpTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 10, 375), )
if mibBuilder.loadTexts: mscTrkDprsStatsDiscBpTable.setStatus('mandatory')
mscTrkDprsStatsDiscBpEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 10, 375, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkIndex"), (0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkDprsStatsIndex"), (0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkDprsStatsDiscBpEpIndex"), (0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkDprsStatsDiscBpDpIndex"))
if mibBuilder.loadTexts: mscTrkDprsStatsDiscBpEntry.setStatus('mandatory')
mscTrkDprsStatsDiscBpEpIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 10, 375, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("ep0", 0), ("ep1", 1), ("ep2", 2))))
if mibBuilder.loadTexts: mscTrkDprsStatsDiscBpEpIndex.setStatus('mandatory')
mscTrkDprsStatsDiscBpDpIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 10, 375, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))).clone(namedValues=NamedValues(("dp0", 0), ("dp1", 1), ("dp2", 2), ("dp3", 3))))
if mibBuilder.loadTexts: mscTrkDprsStatsDiscBpDpIndex.setStatus('mandatory')
mscTrkDprsStatsDiscBpValue = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 10, 375, 1, 3), PassportCounter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkDprsStatsDiscBpValue.setStatus('mandatory')
mscTrkDprsStatsOctBpTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 10, 376), )
if mibBuilder.loadTexts: mscTrkDprsStatsOctBpTable.setStatus('mandatory')
mscTrkDprsStatsOctBpEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 10, 376, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkIndex"), (0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkDprsStatsIndex"), (0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkDprsStatsOctBpEpIndex"), (0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkDprsStatsOctBpDpIndex"))
if mibBuilder.loadTexts: mscTrkDprsStatsOctBpEntry.setStatus('mandatory')
mscTrkDprsStatsOctBpEpIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 10, 376, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("ep0", 0), ("ep1", 1), ("ep2", 2))))
if mibBuilder.loadTexts: mscTrkDprsStatsOctBpEpIndex.setStatus('mandatory')
mscTrkDprsStatsOctBpDpIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 10, 376, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))).clone(namedValues=NamedValues(("dp0", 0), ("dp1", 1), ("dp2", 2), ("dp3", 3))))
if mibBuilder.loadTexts: mscTrkDprsStatsOctBpDpIndex.setStatus('mandatory')
mscTrkDprsStatsOctBpValue = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 10, 376, 1, 3), PassportCounter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkDprsStatsOctBpValue.setStatus('mandatory')
mscTrkAddr = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 11))
mscTrkAddrRowStatusTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 11, 1), )
if mibBuilder.loadTexts: mscTrkAddrRowStatusTable.setStatus('mandatory')
mscTrkAddrRowStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 11, 1, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkIndex"), (0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkAddrAddressIndex"))
if mibBuilder.loadTexts: mscTrkAddrRowStatusEntry.setStatus('mandatory')
mscTrkAddrRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 11, 1, 1, 1), RowStatus()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mscTrkAddrRowStatus.setStatus('mandatory')
mscTrkAddrComponentName = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 11, 1, 1, 2), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkAddrComponentName.setStatus('mandatory')
mscTrkAddrStorageType = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 11, 1, 1, 4), StorageType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: mscTrkAddrStorageType.setStatus('mandatory')
mscTrkAddrAddressIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 11, 1, 1, 10), AsciiStringIndex().subtype(subtypeSpec=ValueSizeConstraint(1, 40)))
if mibBuilder.loadTexts: mscTrkAddrAddressIndex.setStatus('mandatory')
mscTrkAddrProvTable = MibTable((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 11, 10), )
if mibBuilder.loadTexts: mscTrkAddrProvTable.setStatus('mandatory')
mscTrkAddrProvEntry = MibTableRow((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 11, 10, 1), ).setIndexNames((0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkIndex"), (0, "Nortel-MsCarrier-MscPassport-TrunksMIB", "mscTrkAddrAddressIndex"))
if mibBuilder.loadTexts: mscTrkAddrProvEntry.setStatus('mandatory')
mscTrkAddrCost = MibTableColumn((1, 3, 6, 1, 4, 1, 562, 36, 2, 1, 60, 11, 10, 1, 2), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(0, 65435)).clone(200)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: mscTrkAddrCost.setStatus('mandatory')
trunksGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 2, 43, 1))
trunksGroupCA = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 2, 43, 1, 1))
trunksGroupCA02 = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 2, 43, 1, 1, 3))
trunksGroupCA02A = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 2, 43, 1, 1, 3, 2))
trunksCapabilities = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 2, 43, 3))
trunksCapabilitiesCA = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 2, 43, 3, 1))
trunksCapabilitiesCA02 = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 2, 43, 3, 1, 3))
trunksCapabilitiesCA02A = MibIdentifier((1, 3, 6, 1, 4, 1, 562, 36, 2, 2, 43, 3, 1, 3, 2))
mibBuilder.exportSymbols("Nortel-MsCarrier-MscPassport-TrunksMIB", mscTrkDprsStatsOctBpTable=mscTrkDprsStatsOctBpTable, trunksCapabilitiesCA02=trunksCapabilitiesCA02, mscTrkUsageState=mscTrkUsageState, mscTrkVnsStatsVnsPktFromIf=mscTrkVnsStatsVnsPktFromIf, mscTrkPktBpTable=mscTrkPktBpTable, mscTrkOverrideTransmitSpeed=mscTrkOverrideTransmitSpeed, mscTrkPorsStatsPorsNormPktFromIf=mscTrkPorsStatsPorsNormPktFromIf, mscTrkDprsStatsOctBpDpIndex=mscTrkDprsStatsOctBpDpIndex, trunksCapabilitiesCA02A=trunksCapabilitiesCA02A, mscTrkPorsStatsPorsNormDiscUnforwardFromIf=mscTrkPorsStatsPorsNormDiscUnforwardFromIf, mscTrkPorsStatsOperTable=mscTrkPorsStatsOperTable, mscTrkFwdStatsFwdOctetFromIf=mscTrkFwdStatsFwdOctetFromIf, mscTrkStorageType=mscTrkStorageType, mscTrkPorsStatsOctBpDpIndex=mscTrkPorsStatsOctBpDpIndex, mscTrkAddrRowStatus=mscTrkAddrRowStatus, mscTrkStateTable=mscTrkStateTable, mscTrkDiscBpIndex=mscTrkDiscBpIndex, mscTrkVnsStatsPktBpTable=mscTrkVnsStatsPktBpTable, mscTrkSpeedReportingHoldOff=mscTrkSpeedReportingHoldOff, mscTrkPorsStatsOctBpTable=mscTrkPorsStatsOctBpTable, mscTrkVnsStatsPktBpDpIndex=mscTrkVnsStatsPktBpDpIndex, mscTrkMeasuredSpeedToIf=mscTrkMeasuredSpeedToIf, mscTrkAddrRowStatusEntry=mscTrkAddrRowStatusEntry, mscTrkAlarmStatus=mscTrkAlarmStatus, mscTrkSpeedReportingEntry=mscTrkSpeedReportingEntry, mscTrkOctBpValue=mscTrkOctBpValue, mscTrkOperTable=mscTrkOperTable, mscTrkStandbyStatus=mscTrkStandbyStatus, mscTrkVnsStatsDiscBpDpIndex=mscTrkVnsStatsDiscBpDpIndex, mscTrkDprsStatsDiscBpTable=mscTrkDprsStatsDiscBpTable, mscTrkDiscardTrunkPktToIf=mscTrkDiscardTrunkPktToIf, mscTrkVnsStatsOperEntry=mscTrkVnsStatsOperEntry, mscTrkExpectedRemoteNodeName=mscTrkExpectedRemoteNodeName, mscTrkPorsStatsPktBpTable=mscTrkPorsStatsPktBpTable, mscTrkDprsStatsComponentName=mscTrkDprsStatsComponentName, trunksGroupCA02=trunksGroupCA02, mscTrkIfAdminStatus=mscTrkIfAdminStatus, mscTrkVnsStatsDiscBpEntry=mscTrkVnsStatsDiscBpEntry, mscTrkSpdThTable=mscTrkSpdThTable, mscTrkAvailabilityStatus=mscTrkAvailabilityStatus, mscTrkSpeedReportingTable=mscTrkSpeedReportingTable, mscTrkPorsStats=mscTrkPorsStats, mscTrkPorsStatsPorsIntDiscUnforwardFromIf=mscTrkPorsStatsPorsIntDiscUnforwardFromIf, mscTrkDprsStatsDiscBpDpIndex=mscTrkDprsStatsDiscBpDpIndex, mscTrkSnmpOperStatus=mscTrkSnmpOperStatus, mscTrkAddrRowStatusTable=mscTrkAddrRowStatusTable, mscTrkDprsStatsDiscBpEpIndex=mscTrkDprsStatsDiscBpEpIndex, trunksCapabilitiesCA=trunksCapabilitiesCA, mscTrkPorsStatsDiscBpDpIndex=mscTrkPorsStatsDiscBpDpIndex, mscTrkPorsStatsDiscBpValue=mscTrkPorsStatsDiscBpValue, mscTrkAreYouThereModeEntries=mscTrkAreYouThereModeEntries, mscTrkPorsStatsPorsNormOctetFromIf=mscTrkPorsStatsPorsNormOctetFromIf, mscTrkFwdStatsIndex=mscTrkFwdStatsIndex, mscTrkVnsStatsDiscBpEpIndex=mscTrkVnsStatsDiscBpEpIndex, mscTrkOctBpIndex=mscTrkOctBpIndex, mscTrkProvEntry=mscTrkProvEntry, mscTrkMeasuredRoundTripDelay=mscTrkMeasuredRoundTripDelay, trunksMIB=trunksMIB, mscTrkPorsStatsPktBpEntry=mscTrkPorsStatsPktBpEntry, mscTrkUnknownStatus=mscTrkUnknownStatus, mscTrkDprsStatsOctBpEpIndex=mscTrkDprsStatsOctBpEpIndex, mscTrkVnsStatsDiscBpTable=mscTrkVnsStatsDiscBpTable, mscTrkProceduralStatus=mscTrkProceduralStatus, mscTrkFwdStatsRowStatusEntry=mscTrkFwdStatsRowStatusEntry, mscTrkVnsStatsComponentName=mscTrkVnsStatsComponentName, mscTrkVnsStatsRowStatusEntry=mscTrkVnsStatsRowStatusEntry, mscTrkDprsStatsPktBpValue=mscTrkDprsStatsPktBpValue, mscTrkDprsStatsPktBpDpIndex=mscTrkDprsStatsPktBpDpIndex, mscTrkDiscardTrunkPktFromIf=mscTrkDiscardTrunkPktFromIf, mscTrkPorsStatsDiscBpEpIndex=mscTrkPorsStatsDiscBpEpIndex, mscTrkAddrAddressIndex=mscTrkAddrAddressIndex, mscTrkDprsStatsRowStatusTable=mscTrkDprsStatsRowStatusTable, mscTrkVnsStatsOctBpDpIndex=mscTrkVnsStatsOctBpDpIndex, mscTrkPorsStatsOctBpValue=mscTrkPorsStatsOctBpValue, mscTrkDprsStatsDiscBpValue=mscTrkDprsStatsDiscBpValue, mscTrkFwdStatsOperTable=mscTrkFwdStatsOperTable, mscTrkVnsStatsVnsDiscUnforwardFromIf=mscTrkVnsStatsVnsDiscUnforwardFromIf, mscTrkPorsStatsDiscBpEntry=mscTrkPorsStatsDiscBpEntry, mscTrkIndex=mscTrkIndex, mscTrkAddrProvTable=mscTrkAddrProvTable, mscTrkIfEntryTable=mscTrkIfEntryTable, mscTrkAddrProvEntry=mscTrkAddrProvEntry, mscTrkDprsStatsOctBpValue=mscTrkDprsStatsOctBpValue, trunksGroup=trunksGroup, mscTrkDprsStatsPktBpTable=mscTrkDprsStatsPktBpTable, mscTrkDprsStatsRowStatus=mscTrkDprsStatsRowStatus, mscTrkOldOverrideRoundTripDelay=mscTrkOldOverrideRoundTripDelay, trunksGroupCA02A=trunksGroupCA02A, mscTrkPorsStatsPorsIntOctetFromIf=mscTrkPorsStatsPorsIntOctetFromIf, mscTrkPorsStatsComponentName=mscTrkPorsStatsComponentName, mscTrkSpdThValue=mscTrkSpdThValue, mscTrkRemoteValidationAction=mscTrkRemoteValidationAction, mscTrkComponentName=mscTrkComponentName, mscTrkOperStatusEntry=mscTrkOperStatusEntry, mscTrkVnsStatsOctBpTable=mscTrkVnsStatsOctBpTable, mscTrkLowSpeedAlarmThreshold=mscTrkLowSpeedAlarmThreshold, mscTrkAddrStorageType=mscTrkAddrStorageType, mscTrkPorsStatsOperEntry=mscTrkPorsStatsOperEntry, mscTrkDiscBpTable=mscTrkDiscBpTable, mscTrkVnsStatsRowStatusTable=mscTrkVnsStatsRowStatusTable, mscTrkPktBpIndex=mscTrkPktBpIndex, mscTrkOverridesEntry=mscTrkOverridesEntry, mscTrkVnsStatsVnsOctetFromIf=mscTrkVnsStatsVnsOctetFromIf, mscTrkVnsStatsStorageType=mscTrkVnsStatsStorageType, mscTrkIfIndex=mscTrkIfIndex, mscTrkVnsStatsOctBpValue=mscTrkVnsStatsOctBpValue, mscTrkVnsStatsRowStatus=mscTrkVnsStatsRowStatus, mscTrkPktBpValue=mscTrkPktBpValue, mscTrkOverrideRoundTripUsec=mscTrkOverrideRoundTripUsec, mscTrkPorsStatsPktBpValue=mscTrkPorsStatsPktBpValue, mscTrkVnsStatsOctBpEpIndex=mscTrkVnsStatsOctBpEpIndex, mscTrkPorsStatsRowStatusTable=mscTrkPorsStatsRowStatusTable, mscTrkDprsStats=mscTrkDprsStats, mscTrkFwdStats=mscTrkFwdStats, mscTrkVnsStatsPktBpEntry=mscTrkVnsStatsPktBpEntry, mscTrkFwdStatsComponentName=mscTrkFwdStatsComponentName, mscTrkDprsStatsDiscBpEntry=mscTrkDprsStatsDiscBpEntry, mscTrkStateEntry=mscTrkStateEntry, mscTrkOctBpEntry=mscTrkOctBpEntry, mscTrk=mscTrk, mscTrkAdminState=mscTrkAdminState, mscTrkHighSpeedAlarmThreshold=mscTrkHighSpeedAlarmThreshold, mscTrkOperationalState=mscTrkOperationalState, mscTrkPktBpEntry=mscTrkPktBpEntry, mscTrkPorsStatsRowStatusEntry=mscTrkPorsStatsRowStatusEntry, mscTrkTrunkPktToIf=mscTrkTrunkPktToIf, mscTrkTransportTable=mscTrkTransportTable, mscTrkControlStatus=mscTrkControlStatus, mscTrkSpdThRowStatus=mscTrkSpdThRowStatus, mscTrkIfEntryEntry=mscTrkIfEntryEntry, mscTrkDiscBpEntry=mscTrkDiscBpEntry, mscTrkStagingAttempts=mscTrkStagingAttempts, mscTrkDiscBpValue=mscTrkDiscBpValue, mscTrkPorsStatsPktBpDpIndex=mscTrkPorsStatsPktBpDpIndex, mscTrkTransportEntry=mscTrkTransportEntry, mscTrkPorsStatsIndex=mscTrkPorsStatsIndex, mscTrkVnsStatsPktBpEpIndex=mscTrkVnsStatsPktBpEpIndex, mscTrkVnsStatsOctBpEntry=mscTrkVnsStatsOctBpEntry, mscTrkDprsStatsRowStatusEntry=mscTrkDprsStatsRowStatusEntry, mscTrkFwdStatsRowStatus=mscTrkFwdStatsRowStatus, mscTrkAddrCost=mscTrkAddrCost, mscTrkOctBpTable=mscTrkOctBpTable, mscTrkDprsStatsOctBpEntry=mscTrkDprsStatsOctBpEntry, mscTrkFwdStatsRowStatusTable=mscTrkFwdStatsRowStatusTable, mscTrkVnsStats=mscTrkVnsStats, mscTrkMeasuredRoundTripDelayUsec=mscTrkMeasuredRoundTripDelayUsec, mscTrkFwdStatsStorageType=mscTrkFwdStatsStorageType, mscTrkMaximumExpectedRoundTripDelay=mscTrkMaximumExpectedRoundTripDelay, mscTrkPorsStatsOctBpEpIndex=mscTrkPorsStatsOctBpEpIndex, mscTrkAddr=mscTrkAddr, mscTrkPorsStatsPktBpEpIndex=mscTrkPorsStatsPktBpEpIndex, mscTrkStatsTable=mscTrkStatsTable, mscTrkDprsStatsStorageType=mscTrkDprsStatsStorageType, mscTrkVnsStatsIndex=mscTrkVnsStatsIndex, mscTrkFwdStatsFwdDiscUnforwardFromIf=mscTrkFwdStatsFwdDiscUnforwardFromIf, trunksGroupCA=trunksGroupCA, mscTrkMaxTxUnit=mscTrkMaxTxUnit, mscTrkPktFromIf=mscTrkPktFromIf, mscTrkAddrComponentName=mscTrkAddrComponentName, mscTrkPorsStatsStorageType=mscTrkPorsStatsStorageType, mscTrkDprsStatsIndex=mscTrkDprsStatsIndex, mscTrkRemoteComponentName=mscTrkRemoteComponentName, mscTrkTrunkPktFromIf=mscTrkTrunkPktFromIf, mscTrkFwdStatsOperEntry=mscTrkFwdStatsOperEntry, mscTrkRowStatusTable=mscTrkRowStatusTable, mscTrkPorsStatsRowStatus=mscTrkPorsStatsRowStatus, mscTrkVnsStatsDiscBpValue=mscTrkVnsStatsDiscBpValue, mscTrkProvTable=mscTrkProvTable, mscTrkOperStatusTable=mscTrkOperStatusTable, mscTrkDiscardUnforward=mscTrkDiscardUnforward, mscTrkFwdStatsFwdPktFromIf=mscTrkFwdStatsFwdPktFromIf, mscTrkOverridesTable=mscTrkOverridesTable, mscTrkStatsEntry=mscTrkStatsEntry, mscTrkSpdThEntry=mscTrkSpdThEntry, mscTrkRowStatus=mscTrkRowStatus, mscTrkOperEntry=mscTrkOperEntry, mscTrkDprsStatsPktBpEntry=mscTrkDprsStatsPktBpEntry, mscTrkPorsStatsDiscBpTable=mscTrkPorsStatsDiscBpTable, mscTrkRowStatusEntry=mscTrkRowStatusEntry, mscTrkVnsStatsPktBpValue=mscTrkVnsStatsPktBpValue, mscTrkIdleTimeOut=mscTrkIdleTimeOut, mscTrkPorsStatsOctBpEntry=mscTrkPorsStatsOctBpEntry, mscTrkDprsStatsPktBpEpIndex=mscTrkDprsStatsPktBpEpIndex, trunksCapabilities=trunksCapabilities, mscTrkVnsStatsOperTable=mscTrkVnsStatsOperTable, mscTrkPorsStatsPorsIntPktFromIf=mscTrkPorsStatsPorsIntPktFromIf, mscTrkDiscardIntUnforward=mscTrkDiscardIntUnforward, mscTrkIntPktFromIf=mscTrkIntPktFromIf)
|
class Solution:
def findLatestStep(self, arr: List[int], m: int) -> int:
n = len(arr)
parent, size, result, bitsArray, count = [x for x in range(n)], [1] * n, -1, [0] * n, Counter()
def find(x):
if parent[x] == x:
return x
else:
parent[x] = find(parent[x])
return parent[x]
def union(x, y):
xParent, yParent = find(x), find(y)
if xParent == yParent:
return
if size[xParent] < size[yParent]:
xParent, yParent = yParent, xParent
parent[yParent] = xParent
size[xParent] += size[yParent]
size[yParent] = size[xParent]
def getSize(x):
return size[find(x)]
for step, index in enumerate(arr, start = 1):
index -= 1
bitsArray[index], currentSize = 1, 1
if index - 1 >= 0 and bitsArray[index - 1] == 1:
leftSize = getSize(index - 1)
union(index, index - 1)
currentSize += leftSize
count[leftSize] -= 1
if index + 1 < n and bitsArray[index + 1] == 1:
rightSize = getSize(index + 1)
union(index, index + 1)
currentSize += rightSize
count[rightSize] -= 1
count[currentSize] += 1
if count[m] > 0:
result = step
return result |
def ask_name():
name = input("Write your name: ")
return name
def go_through(name):
for i in name:
print(i)
print("\n")
def go_Through_(name):
for i in name:
print(i.upper())
print("\n")
def run():
n = ask_name()
go_through(n)
go_Through_(n)
if __name__ == "__main__":
run() |
frase = str(input('Digite uma frase: ')).strip().upper() #strip elimina os espaços antes e depois da frase
palavras = frase.split()#splitei para gerar uma lista( vetor)
junto=''.join(palavras)# juntei alista para eliminar o epaços antes
inverso = ''
for letra in range(len(junto)-1,-1,-1): # usei o len para ir da ultima letra ate a primeira
inverso += junto[letra]
print(f'O inverso de {junto} é {inverso}')
if inverso == junto:
print('Temos um palíndromo!')
else:
print('A frase digitada não é um palíndromo!') |
class Solution(object):
def findLUSlength(self, strs):
"""
:type strs: List[str]
:rtype: int
"""
|
# 2. Exercício Treino -
# Crie um dicionário em que suas chaves correspondem
# a números inteiros entre [1, 10] e cada valor associado é
# o número ao quadrado.
# {1: 1, 2: 4, 3: 9, 4: 16, 5: 25, 6: 36, 7: 49, 8: 64, 9: 81, 10: 100}
dicio = dict() or {1: None, 2: None, 3: None, 4: None, 5: None, 6: None, 7: None, 8: None, 9: None, 10: None}
for i in dicio:
dicio[i] = i ** 2
print(dicio) |
def generate_exclusion_list(hls_input_file,exclusion_list_file):
file_lines = []
with open(hls_input_file,'r') as input_file:
file_lines = input_file.readlines()
r_list = []
with open(hls_input_file,'w') as clean_code:
for i,x in enumerate(file_lines):
if "@" in x:
if "loop_ignore" in x:
r_list.append(f"{i+1+1}\n")
clean_code.write(f"//{x}")
else:
clean_code.write(x)
with open(exclusion_list_file,'w') as exf:
exf.write(f"{len(r_list)}\n")
for l in r_list:
exf.write(l)
|
# Easy
# https://leetcode.com/problems/same-tree/
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
# Time Complexity: O(N)
# Space Complexity: O(tree height)
class Solution:
def isSameTree(self, p: TreeNode, q: TreeNode) -> bool:
return self.helper(p, q)
# Recursive Inorder Traversal check
def helper(self, node1, node2):
if node1 and not node2 or node2 and not node1:
return False
elif node1 and node2:
if not self.helper(node1.left, node2.left):
return False
if node1.val != node2.val:
return False
if not self.helper(node1.right, node2.right):
return False
return True
|
# -*- coding: utf-8 -*-
"""
Auto-generated file 2022-04-22 09:25:28 UTC
Resource: https://github.com/google/libphonenumber v8.12.47
"""
PATTERNS = {
"info": "libphonenumber v8.12.47",
"data": {
"AC": {
"code": "247",
"pattern": "((6[2-467][\\d]{3}))",
"mobile": "((4[\\d]{4}))",
},
"AD": {
"code": "376",
"pattern": "(([78][\\d]{5}))",
"mobile": "((690[\\d]{6})|([356][\\d]{5}))",
},
"AE": {
"code": "971",
"pattern": "(([2-4679][2-8][\\d]{6}))",
"mobile": "((5[024-68][\\d]{7}))",
},
"AF": {
"code": "93",
"pattern": "((([25][0-8])|([34][0-4])|(6[0-5])[2-9][\\d]{6}))",
"mobile": "((7[\\d]{8}))",
},
"AG": {
"code": "1",
"pattern": "((268(4(6[0-38])|(84))|(56[0-2])[\\d]{4}))",
"mobile": "((268(464)|(7(1[3-9])|([28][\\d])|(3[0246])|(64)|(7[0-689]))[\\d]{4}))",
},
"AI": {
"code": "1",
"pattern": "((264(292)|(4(6[12])|(9[78]))[\\d]{4}))",
"mobile": "((264(235)|(4(69)|(76))|(5(3[6-9])|(8[1-4]))|(7(29)|(72))[\\d]{4}))",
},
"AL": {
"code": "355",
"pattern": "((4505[0-2][\\d]{3})|(([2358][16-9][\\d][2-9])|(4410)[\\d]{4})|(([2358][2-5][2-9])|(4([2-57-9][2-9])|(6[\\d]))[\\d]{5}))",
"mobile": "((6([78][2-9])|(9[\\d])[\\d]{6}))",
},
"AM": {
"code": "374",
"pattern": "((((1[0-25])|(47)[\\d])|(2(2[2-46])|(3[1-8])|(4[2-69])|(5[2-7])|(6[1-9])|(8[1-7]))|(3[12]2)[\\d]{5}))",
"mobile": "(((33)|(4[1349])|(55)|(77)|(88)|(9[13-9])[\\d]{6}))",
},
"AO": {
"code": "244",
"pattern": "((2[\\d]([0134][25-9])|([25-9][\\d])[\\d]{5}))",
"mobile": "((9[1-59][\\d]{7}))",
},
"AR": {
"code": "54",
"pattern": "((3888[013-9][\\d]{5})|((29(54)|(66))|(3(777)|(865))[2-8][\\d]{5})|(3(7(1[15])|(81))|(8(21)|(4[16])|(69)|(9[12]))[46][\\d]{5})|((2(2(2[59])|(44)|(52))|(3(26)|(44))|(473)|(9([07]2)|(2[26])|(34)|(46)))|(3327)[45][\\d]{5})|((2(284)|(302)|(657)|(920))|(3(4(8[27])|(92))|(541)|(755)|(878))[2-7][\\d]{5})|((2((26)|(62)2)|(32[03])|(477)|(9(42)|(83)))|(3(329)|(4([47]6)|(62)|(89))|(564))[2-6][\\d]{5})|(((11[1-8])|(670)[\\d])|(2(2(0[45])|(1[2-6])|(3[3-6]))|(3([06]4)|(7[45]))|(494)|(6(04)|(1[2-8])|([36][45])|(4[3-6]))|(80[45])|(9([17][4-6])|([48][45])|(9[3-6])))|(3(364)|(4(1[2-7])|([235][4-6])|(84))|(5(1[2-8])|([38][4-6]))|(6(2[45])|(44))|(7[069][45])|(8([03][45])|([17][2-6])|([58][3-6])))[\\d]{6})|(2(2(21)|(4[23])|(6[145])|(7[1-4])|(8[356])|(9[267]))|(3(16)|(3[13-8])|(43)|(5[346-8])|(9[3-5]))|(475)|(6(2[46])|(4[78])|(5[1568]))|(9(03)|(2[1457-9])|(3[1356])|(4[08])|([56][23])|(82))4[\\d]{5})|((2(2(57)|(81))|(3(24)|(46)|(92))|(9(01)|(23)|(64)))|(3(4(42)|(71))|(5(25)|(37)|(4[347])|(71))|(7(18)|(5[17])))[3-6][\\d]{5})|((2(2(02)|(2[3467])|(4[156])|(5[45])|(6[6-8])|(91))|(3(1[47])|(25)|([45][25])|(96))|(47[48])|(625)|(932))|(3(38[2578])|(4(0[0-24-9])|(3[78])|(4[457])|(58)|(6[03-9])|(72)|(83)|(9[136-8]))|(5(2[124])|([368][23])|(4[2689])|(7[2-6]))|(7(16)|(2[15])|(3[145])|(4[13])|(5[468])|(7[2-5])|(8[26]))|(8(2[5-7])|(3[278])|(4[3-5])|(5[78])|(6[1-378])|([78]7)|(94)))[4-6][\\d]{5}))",
"mobile": "((93888[013-9][\\d]{5})|(9(29(54)|(66))|(3(777)|(865))[2-8][\\d]{5})|(93(7(1[15])|(81))|(8(21)|(4[16])|(69)|(9[12]))[46][\\d]{5})|(9(2(2(2[59])|(44)|(52))|(3(26)|(44))|(473)|(9([07]2)|(2[26])|(34)|(46)))|(3327)[45][\\d]{5})|(9(2(284)|(302)|(657)|(920))|(3(4(8[27])|(92))|(541)|(755)|(878))[2-7][\\d]{5})|(9(2((26)|(62)2)|(32[03])|(477)|(9(42)|(83)))|(3(329)|(4([47]6)|(62)|(89))|(564))[2-6][\\d]{5})|((675[\\d])|(9(11[1-8][\\d])|(2(2(0[45])|(1[2-6])|(3[3-6]))|(3([06]4)|(7[45]))|(494)|(6(04)|(1[2-8])|([36][45])|(4[3-6]))|(80[45])|(9([17][4-6])|([48][45])|(9[3-6])))|(3(364)|(4(1[2-7])|([235][4-6])|(84))|(5(1[2-8])|([38][4-6]))|(6(2[45])|(44))|(7[069][45])|(8([03][45])|([17][2-6])|([58][3-6]))))[\\d]{6})|(92(2(21)|(4[23])|(6[145])|(7[1-4])|(8[356])|(9[267]))|(3(16)|(3[13-8])|(43)|(5[346-8])|(9[3-5]))|(475)|(6(2[46])|(4[78])|(5[1568]))|(9(03)|(2[1457-9])|(3[1356])|(4[08])|([56][23])|(82))4[\\d]{5})|(9(2(2(57)|(81))|(3(24)|(46)|(92))|(9(01)|(23)|(64)))|(3(4(42)|(71))|(5(25)|(37)|(4[347])|(71))|(7(18)|(5[17])))[3-6][\\d]{5})|(9(2(2(02)|(2[3467])|(4[156])|(5[45])|(6[6-8])|(91))|(3(1[47])|(25)|([45][25])|(96))|(47[48])|(625)|(932))|(3(38[2578])|(4(0[0-24-9])|(3[78])|(4[457])|(58)|(6[03-9])|(72)|(83)|(9[136-8]))|(5(2[124])|([368][23])|(4[2689])|(7[2-6]))|(7(16)|(2[15])|(3[145])|(4[13])|(5[468])|(7[2-5])|(8[26]))|(8(2[5-7])|(3[278])|(4[3-5])|(5[78])|(6[1-378])|([78]7)|(94)))[4-6][\\d]{5}))",
},
"AS": {
"code": "1",
"pattern": "((6846(22)|(33)|(44)|(55)|(77)|(88)|(9[19])[\\d]{4}))",
"mobile": "((684(2(48)|(5[2468])|(72))|(7(3[13])|(70)|(82))[\\d]{4}))",
},
"AT": {
"code": "43",
"pattern": "((1(11[\\d])|([2-9][\\d]{3:11}))|((316)|(463)|((51)|(66)|(73)2)[\\d]{3:10})|((2(1[467])|(2[13-8])|(5[2357])|(6[1-46-8])|(7[1-8])|(8[124-7])|(9[1458]))|(3(1[1-578])|(3[23568])|(4[5-7])|(5[1378])|(6[1-38])|(8[3-68]))|(4(2[1-8])|(35)|(7[1368])|(8[2457]))|(5(2[1-8])|(3[357])|(4[147])|(5[12578])|(6[37]))|(6(13)|(2[1-47])|(4[135-8])|(5[468]))|(7(2[1-8])|(35)|(4[13478])|(5[68])|(6[16-8])|(7[1-6])|(9[45]))[\\d]{4:10}))",
"mobile": "((6(5[0-3579])|(6[013-9])|([7-9][\\d])[\\d]{4:10}))",
},
"AU": {
"code": "61",
"pattern": "((((2([0-26-9][\\d])|(3[0-8])|(4[02-9])|(5[0135-9]))|(3([0-3589][\\d])|(4[0-578])|(6[1-9])|(7[0-35-9]))|(7([013-57-9][\\d])|(2[0-8]))[\\d]{3})|(8(51(0(0[03-9])|([12479][\\d])|(3[2-9])|(5[0-8])|(6[1-9])|(8[0-7]))|(1([0235689][\\d])|(1[0-69])|(4[0-589])|(7[0-47-9]))|(2(0[0-79])|([18][13579])|(2[14-9])|(3[0-46-9])|([4-6][\\d])|(7[89])|(9[0-4])))|((6[0-8])|([78][\\d])[\\d]{3})|(9([02-9][\\d]{3})|(1(([0-58][\\d])|(6[0135-9])[\\d])|(7(0[0-24-9])|([1-9][\\d]))|(9([0-46-9][\\d])|(5[0-79])))))[\\d]{3}))",
"mobile": "((4(83[0-38])|(93[0-6])[\\d]{5})|(4([0-3][\\d])|(4[047-9])|(5[0-25-9])|(6[06-9])|(7[02-9])|(8[0-24-9])|(9[0-27-9])[\\d]{6}))",
},
"AW": {
"code": "297",
"pattern": "((5(2[\\d])|(8[1-9])[\\d]{4}))",
"mobile": "(((290)|(5[69][\\d])|(6([03]0)|(22)|(4[0-2])|([69][\\d]))|(7([34][\\d])|(7[07]))|(9(6[45])|(9[4-8]))[\\d]{4}))",
},
"AX": {
"code": "358",
"pattern": "((18[1-8][\\d]{3:6}))",
"mobile": "((4946[\\d]{2:6})|((4[0-8])|(50)[\\d]{4:8}))",
},
"AZ": {
"code": "994",
"pattern": "(((2[12]428)|(3655[02])[\\d]{4})|((2(22[0-79])|(63[0-28]))|(3654)[\\d]{5})|(((1[28])|(46)[\\d])|(2([014-6]2)|([23]3))[\\d]{6}))",
"mobile": "((36554[\\d]{4})|(([16]0)|(4[04])|(5[015])|(7[07])|(99)[\\d]{7}))",
},
"BA": {
"code": "387",
"pattern": "(((3([05-79][2-9])|(1[4579])|([23][24-9])|(4[2-4689])|(8[2457-9]))|(49[2-579])|(5(0[2-49])|([13][2-9])|([268][2-4679])|(4[4689])|(5[2-79])|(7[2-69])|(9[2-4689]))[\\d]{5}))",
"mobile": "((6040[\\d]{5})|(6(03)|([1-356])|(44)|(7[\\d])[\\d]{6}))",
},
"BB": {
"code": "1",
"pattern": "((246521[0369][\\d]{3})|(246(2(2[78])|(7[0-4]))|(4(1[024-6])|(2[\\d])|(3[2-9]))|(5(20)|([34][\\d])|(54)|(7[1-3]))|(6(2[\\d])|(38))|(7[35]7)|(9(1[89])|(63))[\\d]{4}))",
"mobile": "((246((2([3568][\\d])|(4[0-57-9]))|(3(5[2-9])|(6[0-6]))|(4(46)|(5[\\d]))|(69[5-7])|(8([2-5][\\d])|(83))[\\d])|(52(1[147])|(20))[\\d]{3}))",
},
"BD": {
"code": "880",
"pattern": "(((4(31[\\d][\\d])|(423))|(5222)[\\d]{3}([\\d]{2})?)|(8332[6-9][\\d][\\d])|((3(03[56])|(224))|(4(22[25])|(653))[\\d]{3:4})|((3(42[47])|(529)|(823))|(4(027)|(525)|(65(28)|(8)))|(562)|(6257)|(7(1(5[3-5])|(6[12])|(7[156])|(89))|(22[589]56)|(32)|(42675)|(52([25689](56)|(8))|([347]8))|(71(6[1267])|(75)|(89))|(92374))|(82(2[59])|(32)56)|(9(03[23]56)|(23(256)|(373))|(31)|(5(1)|(2[4589]56)))[\\d]{3})|((3(02[348])|(22[35])|(324)|(422))|(4(22[67])|(32[236-9])|(6(2[46])|(5[57]))|(953))|(5526)|(6(024)|(6655))|(81)[\\d]{4:5})|((2(7(1[0-267])|(2[0-289])|(3[0-29])|(4[01])|(5[1-3])|(6[013])|(7[0178])|(91))|(8(0[125])|(1[1-6])|(2[0157-9])|(3[1-69])|(41)|(6[1-35])|(7[1-5])|(8[1-8])|(9[0-6]))|(9(0[0-2])|(1[0-4])|(2[568])|(3[3-6])|(5[5-7])|(6[0136-9])|(7[0-7])|(8[014-9])))|(3(0(2[025-79])|(3[2-4]))|(181)|(22[12])|(32[2356])|(824))|(4(02[09])|(22[348])|(32[045])|(523)|(6(27)|(54)))|(666(22)|(53))|(7(22[57-9])|(42[56])|(82[35])8)|(8(0[124-9])|(2(181)|(2[02-4679]8))|(4[12])|([5-7]2))|(9([04]2)|(2(2)|(328))|(81))[\\d]{4})|((2(222)|([45][\\d])[\\d])|(3(1(2[5-7])|([5-7]))|(425)|(822))|(4(033)|(1[\\d])|([257]1)|(332)|(4(2[246])|(5[25]))|(6(2[35])|(56)|(62))|(8(23)|(54))|(92[2-5]))|(5(02[03489])|(22[457])|(32[35-79])|(42[46])|(6([18])|(53))|(724)|(826))|(6(023)|(2(2[2-5])|(5[3-5])|(8))|(32[3478])|(42[34])|(52[47])|(6([18])|(6(2[34])|(5[24])))|([78]2[2-5])|(92[2-6]))|(7(02)|(21[\\d])|([3-589]1)|(6[12])|(72[24]))|(8(217)|(3[12])|([5-7]1))|(9[24]1)[\\d]{5})|(((3[2-8])|(5[2-57-9])|(6[03-589])1)|(4[4689][18])[\\d]{5})|([59]1[\\d]{5}))",
"mobile": "(((1[13-9][\\d])|(644)[\\d]{7})|((3[78])|(44)|(66)[02-9][\\d]{7}))",
},
"BE": {
"code": "32",
"pattern": "((80[2-8][\\d]{5})|((1[0-69])|([23][2-8])|(4[23])|(5[\\d])|(6[013-57-9])|(71)|(8[1-79])|(9[2-4])[\\d]{6}))",
"mobile": "((4[5-9][\\d]{7}))",
},
"BF": {
"code": "226",
"pattern": "((2(0(49)|(5[23])|(6[5-7])|(9[016-9]))|(4(4[569])|(5[4-6])|(6[5-7])|(7[0179]))|(5([34][\\d])|(50)|(6[5-7]))[\\d]{4}))",
"mobile": "(((0[125-7])|(5[1-8])|([67][\\d])[\\d]{6}))",
},
"BG": {
"code": "359",
"pattern": "((2[\\d]{5:7})|((43[1-6])|(70[1-9])[\\d]{4:5})|(([36][\\d])|(4[124-7])|([57][1-9])|(8[1-6])|(9[1-7])[\\d]{5:6}))",
"mobile": "(((43[07-9])|(99[69][\\d])[\\d]{5})|((8[7-9])|(98)[\\d]{7}))",
},
"BH": {
"code": "973",
"pattern": "(((1(3[1356])|(6[0156])|(7[\\d])[\\d])|(6(1[16][\\d])|(500)|(6(0[\\d])|(3[12])|(44)|(7[7-9])|(88))|(9[69][69]))|(7(1(11)|(78))|(7[\\d][\\d]))[\\d]{4}))",
"mobile": "(((3([1-79][\\d])|(8[0-47-9])[\\d])|(6(3(00)|(33)|(6[16]))|(6(3[03-9])|([69][\\d])|(7[0-6])))[\\d]{4}))",
},
"BI": {
"code": "257",
"pattern": "(((22)|(31)[\\d]{6}))",
"mobile": "(((29)|(6[1257-9])|(7[125-9])[\\d]{6}))",
},
"BJ": {
"code": "229",
"pattern": "((2(02)|(1[037])|(2[45])|(3[68])[\\d]{5}))",
"mobile": "(((40)|(5[1-8])|(6[\\d])|(9[013-9])[\\d]{6}))",
},
"BL": {
"code": "590",
"pattern": "((590(2[7-9])|(5[12])|(87)[\\d]{4}))",
"mobile": "((69(0[\\d][\\d])|(1(2[2-9])|(3[0-5]))[\\d]{4}))",
},
"BM": {
"code": "1",
"pattern": "((441([46][\\d][\\d])|(5(4[\\d])|(60)|(89))[\\d]{4}))",
"mobile": "((441([2378][\\d])|(5[0-39])[\\d]{5}))",
},
"BN": {
"code": "673",
"pattern": "((22[0-7][\\d]{4})|((2[013-9])|([34][\\d])|(5[0-25-9])[\\d]{5}))",
"mobile": "(((22[89])|([78][\\d][\\d])[\\d]{4}))",
},
"BO": {
"code": "591",
"pattern": "(((2(2[\\d][\\d])|(5(11)|([258][\\d])|(9[67]))|(6(12)|(2[\\d])|(9[34]))|(8(2[34])|(39)|(62)))|(3(3[\\d][\\d])|(4(6[\\d])|(8[24]))|(8(25)|(42)|(5[257])|(86)|(9[25]))|(9([27][\\d])|(3[2-4])|(4[248])|(5[24])|(6[2-6])))|(4(4[\\d][\\d])|(6(11)|([24689][\\d])|(72)))[\\d]{4}))",
"mobile": "(([67][\\d]{7}))",
},
"BQ": {
"code": "599",
"pattern": "(((318[023])|(41(6[023])|(70))|(7(1[578])|(2[05])|(50)[\\d])[\\d]{3}))",
"mobile": "(((31(8[14-8])|(9[14578]))|(416[14-9])|(7(0[01])|(7[07])|(8[\\d])|(9[056])[\\d])[\\d]{3}))",
},
"BR": {
"code": "55",
"pattern": "((([14689][1-9])|(2[12478])|(3[1-578])|(5[13-5])|(7[13-579])[2-5][\\d]{7}))",
"mobile": "((([14689][1-9])|(2[12478])|(3[1-578])|(5[13-5])|(7[13-579])(7)|(9[\\d])[\\d]{7}))",
},
"BS": {
"code": "1",
"pattern": "((242(3(02)|([236][1-9])|(4[0-24-9])|(5[0-68])|(7[347])|(8[0-4])|(9[2-467]))|(461)|(502)|(6(0[1-4])|(12)|(2[013])|([45]0)|(7[67])|(8[78])|(9[89]))|(7(02)|(88))[\\d]{4}))",
"mobile": "((242(3(5[79])|(7[56])|(95))|(4([23][1-9])|(4[1-35-9])|(5[1-8])|(6[2-8])|(7[\\d])|(81))|(5(2[45])|(3[35])|(44)|(5[1-46-9])|(65)|(77))|(6[34]6)|(7(27)|(38))|(8(0[1-9])|(1[02-9])|(2[\\d])|([89]9))[\\d]{4}))",
},
"BT": {
"code": "975",
"pattern": "(((2[3-6])|([34][5-7])|(5[236])|(6[2-46])|(7[246])|(8[2-4])[\\d]{5}))",
"mobile": "(((1[67])|(77)[\\d]{6}))",
},
"BW": {
"code": "267",
"pattern": "(((2(4[0-48])|(6[0-24])|(9[0578]))|(3(1[0-35-9])|(55)|([69][\\d])|(7[013]))|(4(6[03])|(7[1267])|(9[0-5]))|(5(3[03489])|(4[0489])|(7[1-47])|(88)|(9[0-49]))|(6(2[1-35])|(5[149])|(8[067]))[\\d]{4}))",
"mobile": "(((321)|(7([1-7][\\d])|(8[01]))[\\d]{5}))",
},
"BY": {
"code": "375",
"pattern": "(((1(5(1[1-5])|([24][\\d])|(6[2-4])|(9[1-7]))|(6([235][\\d])|(4[1-7]))|(7[\\d][\\d]))|(2(1([246][\\d])|(3[0-35-9])|(5[1-9]))|(2([235][\\d])|(4[0-8]))|(3([26][\\d])|(3[02-79])|(4[024-7])|(5[03-7])))[\\d]{5}))",
"mobile": "(((2(5[5-79])|(9[1-9]))|((33)|(44)[\\d])[\\d]{6}))",
},
"BZ": {
"code": "501",
"pattern": "(((2([02][\\d])|(36)|([68]0))|([3-58]([02][\\d])|([68]0))|(7([02][\\d])|(32)|([68]0))[\\d]{4}))",
"mobile": "((6[0-35-7][\\d]{5}))",
},
"CA": {
"code": "1",
"pattern": "(((2(04)|([23]6)|([48]9)|(50))|(3(06)|(43)|(6[578]))|(4(03)|(1[68])|(3[178])|(50)|(74))|(5(06)|(1[49])|(48)|(79)|(8[17]))|(6(04)|(13)|(39)|(47)|(72))|(7(0[59])|(78)|(8[02]))|(8([06]7)|(19)|(25)|(73))|(90[25])[2-9][\\d]{6}))",
"mobile": "(((2(04)|([23]6)|([48]9)|(50))|(3(06)|(43)|(6[578]))|(4(03)|(1[68])|(3[178])|(50)|(74))|(5(06)|(1[49])|(48)|(79)|(8[17]))|(6(04)|(13)|(39)|(47)|(72))|(7(0[59])|(78)|(8[02]))|(8([06]7)|(19)|(25)|(73))|(90[25])[2-9][\\d]{6}))",
},
"CC": {
"code": "61",
"pattern": "((8(51(0(02)|(31)|(60)|(89))|(1(18)|(76))|(223))|(91(0(1[0-2])|(29))|(1([28]2)|(50)|(79))|(2(10)|(64))|(3([06]8)|(22))|(4[29]8)|(62[\\d])|(70[23])|(959))[\\d]{3}))",
"mobile": "((4(83[0-38])|(93[0-6])[\\d]{5})|(4([0-3][\\d])|(4[047-9])|(5[0-25-9])|(6[06-9])|(7[02-9])|(8[0-24-9])|(9[0-27-9])[\\d]{6}))",
},
"CD": {
"code": "243",
"pattern": "((12[\\d]{7})|([1-6][\\d]{6}))",
"mobile": "((88[\\d]{5})|((8[0-59])|(9[017-9])[\\d]{7}))",
},
"CF": {
"code": "236",
"pattern": "((2[12][\\d]{6}))",
"mobile": "((7[02457][\\d]{6}))",
},
"CG": {
"code": "242",
"pattern": "((222[1-589][\\d]{5}))",
"mobile": "((026(1[0-5])|(6[6-9])[\\d]{4})|(0([14-6][\\d][\\d])|(2(40)|(5[5-8])|(6[07-9]))[\\d]{5}))",
},
"CH": {
"code": "41",
"pattern": "(((2[12467])|(3[1-4])|(4[134])|(5[256])|(6[12])|([7-9]1)[\\d]{7}))",
"mobile": "((7[35-9][\\d]{7}))",
},
"CI": {
"code": "225",
"pattern": "((2([15][\\d]{3})|(7(2(0[23])|(1[2357])|([23][45])|(4[3-5]))|(3(06)|(1[69])|([2-6]7)))[\\d]{5}))",
"mobile": "((0704[0-7][\\d]{5})|(0([15][\\d][\\d])|(7(0[0-37-9])|([4-9][7-9]))[\\d]{6}))",
},
"CK": {
"code": "682",
"pattern": "(((2[\\d])|(3[13-7])|(4[1-5])[\\d]{3}))",
"mobile": "(([578][\\d]{4}))",
},
"CL": {
"code": "56",
"pattern": "((2(1982[0-6])|(3314[05-9])[\\d]{3})|((2(1(160)|(962))|(3(2[\\d][\\d])|(3([034][\\d])|(1[0-35-9])|(2[1-9])|(5[0-2]))|(600))|(6469))|(80[1-9][\\d][\\d])|(9(3([0-57-9][\\d][\\d])|(6(0[02-9])|([1-9][\\d])))|(6([0-8][\\d][\\d])|(9([02-79][\\d])|(1[05-9])))|(7[1-9][\\d][\\d])|(9([03-9][\\d][\\d])|(1([0235-9][\\d])|(4[0-24-9]))|(2([0-79][\\d])|(8[0-46-9]))))[\\d]{4})|((22)|(3[2-5])|([47][1-35])|(5[1-3578])|(6[13-57])|(8[1-9])|(9[2458])[\\d]{7}))",
"mobile": "((2(1982[0-6])|(3314[05-9])[\\d]{3})|((2(1(160)|(962))|(3(2[\\d][\\d])|(3([034][\\d])|(1[0-35-9])|(2[1-9])|(5[0-2]))|(600))|(6469))|(80[1-9][\\d][\\d])|(9(3([0-57-9][\\d][\\d])|(6(0[02-9])|([1-9][\\d])))|(6([0-8][\\d][\\d])|(9([02-79][\\d])|(1[05-9])))|(7[1-9][\\d][\\d])|(9([03-9][\\d][\\d])|(1([0235-9][\\d])|(4[0-24-9]))|(2([0-79][\\d])|(8[0-46-9]))))[\\d]{4})|((22)|(3[2-5])|([47][1-35])|(5[1-3578])|(6[13-57])|(8[1-9])|(9[2458])[\\d]{7}))",
},
"CM": {
"code": "237",
"pattern": "((2(22)|(33)[\\d]{6}))",
"mobile": "(((24[23])|(6[5-9][\\d])[\\d]{6}))",
},
"CN": {
"code": "86",
"pattern": "(((10([02-79][\\d][\\d])|([18](0[1-9])|([1-9][\\d])))|(21([18](0[1-9])|([1-9][\\d]))|([2-79][\\d][\\d]))[\\d]{5})|((43[35])|(754)[\\d]{7:8})|(8(078[\\d]{7})|(51[\\d]{7:8}))|((10)|((2)|(85)1)|(43[35])|(754)(100[\\d][\\d])|(95[\\d]{3:4}))|((2[02-57-9])|(3(11)|(7[179]))|(4([15]1)|(3[12]))|(5(1[\\d])|(2[37])|(3[12])|(51)|(7[13-79])|(9[15]))|(7([39]1)|(5[57])|(6[09]))|(8(71)|(98))([02-8][\\d]{7})|(1(0(0[\\d][\\d]([\\d]{3})?)|([1-9][\\d]{5}))|([1-9][\\d]{6}))|(9([0-46-9][\\d]{6})|(5[\\d]{3}([\\d]([\\d]{2})?)?)))|((3(1[02-9])|(35)|(49)|(5[\\d])|(7[02-68])|(9[1-68]))|(4(1[02-9])|(2[179])|(3[46-9])|(5[2-9])|(6[47-9])|(7[\\d])|(8[23]))|(5(3[03-9])|(4[36])|(5[02-9])|(6[1-46])|(7[028])|(80)|(9[2-46-9]))|(6(3[1-5])|(6[0238])|(9[12]))|(7(01)|([17][\\d])|(2[248])|(3[04-9])|(4[3-6])|(5[0-3689])|(6[2368])|(9[02-9]))|(8(1[236-8])|(2[5-7])|(3[\\d])|(5[2-9])|(7[02-9])|(8[36-8])|(9[1-7]))|(9(0[1-3689])|(1[1-79])|([379][\\d])|(4[13])|(5[1-5]))([02-8][\\d]{6})|(1(0(0[\\d][\\d]([\\d]{2})?)|([1-9][\\d]{4}))|([1-9][\\d]{5}))|(9([0-46-9][\\d]{5})|(5[\\d]{3:5}))))",
"mobile": "((1740[0-5][\\d]{6})|(1([38][\\d])|(4[57])|(5[0-35-9])|(6[25-7])|(7[0-35-8])|(9[0135-9])[\\d]{8}))",
},
"CO": {
"code": "57",
"pattern": "((60[124-8][2-9][\\d]{6})|([124-8][2-9][\\d]{6}))",
"mobile": "((3333(0(0[\\d])|(1[0-5]))|([4-9][\\d][\\d])[\\d]{3})|((3(24[1-9])|(3(00)|(3[0-24-9])))|(9101)[\\d]{6})|(3(0[0-5])|(1[\\d])|(2[0-3])|(5[01])|(70)[\\d]{7}))",
},
"CR": {
"code": "506",
"pattern": "((210[7-9][\\d]{4})|(2([024-7][\\d])|(1[1-9])[\\d]{5}))",
"mobile": "(((3005[\\d])|(6500[01])[\\d]{3})|((5[07])|(6[0-4])|(7[0-3])|(8[3-9])[\\d]{6}))",
},
"CU": {
"code": "53",
"pattern": "(((3[23])|(48)[\\d]{4:6})|((31)|(4[36])|(8(0[25])|(78)[\\d])[\\d]{6})|((2[1-4])|(4[1257])|(7[\\d])[\\d]{5:6}))",
"mobile": "((5[\\d]{7}))",
},
"CV": {
"code": "238",
"pattern": "((2(2[1-7])|(3[0-8])|(4[12])|(5[1256])|(6[\\d])|(7[1-3])|(8[1-5])[\\d]{4}))",
"mobile": "(((36)|(5[1-389])|(9[\\d])[\\d]{5}))",
},
"CW": {
"code": "599",
"pattern": "((9(4(3[0-5])|(4[14])|(6[\\d]))|(50[\\d])|(7(2[014])|(3[02-9])|(4[4-9])|(6[357])|(77)|(8[7-9]))|(8(3[39])|([46][\\d])|(7[01])|(8[57-9]))[\\d]{4}))",
"mobile": "((953[01][\\d]{4})|(9(5[12467])|(6[5-9])[\\d]{5}))",
},
"CX": {
"code": "61",
"pattern": "((8(51(0(01)|(30)|(59)|(88))|(1(17)|(46)|(75))|(2(22)|(35)))|(91(00[6-9])|(1([28]1)|(49)|(78))|(2(09)|(63))|(3(12)|(26)|(75))|(4(56)|(97))|(64[\\d])|(7(0[01])|(1[0-2]))|(958))[\\d]{3}))",
"mobile": "((4(83[0-38])|(93[0-6])[\\d]{5})|(4([0-3][\\d])|(4[047-9])|(5[0-25-9])|(6[06-9])|(7[02-9])|(8[0-24-9])|(9[0-27-9])[\\d]{6}))",
},
"CY": {
"code": "357",
"pattern": "((2[2-6][\\d]{6}))",
"mobile": "((9[4-79][\\d]{6}))",
},
"CZ": {
"code": "420",
"pattern": "(((2[\\d])|(3[1257-9])|(4[16-9])|(5[13-9])[\\d]{7}))",
"mobile": "(((60[1-8])|(7(0[2-5])|([2379][\\d]))[\\d]{6}))",
},
"DE": {
"code": "49",
"pattern": "((32[\\d]{9:11})|(49[2-6][\\d]{10})|(49[0-7][\\d]{3:9})|(([34]0)|([68]9)[\\d]{3:13})|((2(0[1-689])|([1-3569][\\d])|(4[0-8])|(7[1-7])|(8[0-7]))|(3([3569][\\d])|(4[0-79])|(7[1-7])|(8[1-8]))|(4(1[02-9])|([2-48][\\d])|(5[0-6])|(6[0-8])|(7[0-79]))|(5(0[2-8])|([124-6][\\d])|([38][0-8])|([79][0-7]))|(6(0[02-9])|([1-358][\\d])|([47][0-8])|(6[1-9]))|(7(0[2-8])|(1[1-9])|([27][0-7])|(3[\\d])|([4-6][0-8])|(8[0-5])|(9[013-7]))|(8(0[2-9])|(1[0-79])|(2[\\d])|(3[0-46-9])|(4[0-6])|(5[013-9])|(6[1-8])|(7[0-8])|(8[0-24-6]))|(9(0[6-9])|([1-4][\\d])|([589][0-7])|(6[0-8])|(7[0-467]))[\\d]{3:12}))",
"mobile": "((15[0-25-9][\\d]{8})|(1(6[023])|(7[\\d])[\\d]{7:8}))",
},
"DJ": {
"code": "253",
"pattern": "((2(1[2-5])|(7[45])[\\d]{5}))",
"mobile": "((77[\\d]{6}))",
},
"DK": {
"code": "45",
"pattern": "((([2-7][\\d])|(8[126-9])|(9[1-46-9])[\\d]{6}))",
"mobile": "((([2-7][\\d])|(8[126-9])|(9[1-46-9])[\\d]{6}))",
},
"DM": {
"code": "1",
"pattern": "((767(2(55)|(66))|(4(2[01])|(4[0-25-9]))|(50[0-4])[\\d]{4}))",
"mobile": "((767(2([2-4689]5)|(7[5-7]))|(31[5-7])|(61[1-8])|(70[1-6])[\\d]{4}))",
},
"DO": {
"code": "1",
"pattern": "((8([04]9[2-9][\\d][\\d])|(29(2([0-59][\\d])|(6[04-9])|(7[0-27])|(8[0237-9]))|(3([0-35-9][\\d])|(4[7-9]))|([45][\\d][\\d])|(6([0-27-9][\\d])|([3-5][1-9])|(6[0135-8]))|(7(0[013-9])|([1-37][\\d])|(4[1-35689])|(5[1-4689])|(6[1-57-9])|(8[1-79])|(9[1-8]))|(8(0[146-9])|(1[0-48])|([248][\\d])|(3[1-79])|(5[01589])|(6[013-68])|(7[124-8])|(9[0-8]))|(9([0-24][\\d])|(3[02-46-9])|(5[0-79])|(60)|(7[0169])|(8[57-9])|(9[02-9])))[\\d]{4}))",
"mobile": "((8[024]9[2-9][\\d]{6}))",
},
"DZ": {
"code": "213",
"pattern": "((9619[\\d]{5})|((1[\\d])|(2[013-79])|(3[0-8])|(4[013-689])[\\d]{6}))",
"mobile": "(((5(4[0-29])|(5[\\d])|(6[0-2]))|(6([569][\\d])|(7[0-6]))|(7[7-9][\\d])[\\d]{6}))",
},
"EC": {
"code": "593",
"pattern": "(([2-7][2-7][\\d]{6}))",
"mobile": "((964[0-2][\\d]{5})|(9(39)|([57][89])|(6[0-36-9])|([89][\\d])[\\d]{6}))",
},
"EE": {
"code": "372",
"pattern": "(((3[23589])|(4[3-8])|(6[\\d])|(7[1-9])|(88)[\\d]{5}))",
"mobile": "(((5[\\d]{5})|(8(1(0(000)|([3-9][\\d][\\d]))|((1(0[236])|(1[\\d]))|((23)|([3-79][\\d])[\\d])[\\d]))|(2(0(000)|((19)|([2-7][\\d])[\\d]))|((([124-6][\\d])|(3[5-9])[\\d])|(7([679][\\d])|(8[13-9]))|(8([2-6][\\d])|(7[01]))[\\d]))|([349][\\d]{4}))[\\d][\\d])|(5(([02][\\d])|(5[0-478])[\\d])|(1([0-8][\\d])|(95))|(6(4[0-4])|(5[1-589]))[\\d]{3}))",
},
"EG": {
"code": "20",
"pattern": "((13[23][\\d]{6})|((15)|(57)[\\d]{6:7})|((2[2-4])|(3)|(4[05-8])|(5[05])|(6[24-689])|(8[2468])|(9[235-7])[\\d]{7}))",
"mobile": "((1[0-25][\\d]{8}))",
},
"EH": {
"code": "212",
"pattern": "((528[89][\\d]{5}))",
"mobile": "(((6([0-79][\\d])|(8[0-247-9]))|(7([017][\\d])|(6[0-367]))[\\d]{6}))",
},
"ER": {
"code": "291",
"pattern": "(((1(1[12568])|([24]0)|(55)|(6[146]))|(8[\\d][\\d])[\\d]{4}))",
"mobile": "(((17[1-3])|(7[\\d][\\d])[\\d]{4}))",
},
"ES": {
"code": "34",
"pattern": "((96906(0[0-8])|(1[1-9])|([2-9][\\d])[\\d][\\d])|(9(69(0[0-57-9])|([1-9][\\d]))|(73([0-8][\\d])|(9[1-9]))[\\d]{4})|((8([1356][\\d])|([28][0-8])|([47][1-9]))|(9([135][\\d])|([268][0-8])|(4[1-9])|(7[124-9]))[\\d]{6}))",
"mobile": "(((590[16]00[\\d])|(9(6906(09)|(10))|(7390[\\d][\\d]))[\\d][\\d])|((6[\\d])|(7[1-48])[\\d]{7}))",
},
"ET": {
"code": "251",
"pattern": "((11667[01][\\d]{3})|((11(1(1[124])|(2[2-7])|(3[1-5])|(5[5-8])|(8[6-8]))|(2(13)|(3[6-8])|(5[89])|(7[05-9])|(8[2-6]))|(3(2[01])|(3[0-289])|(4[1289])|(7[1-4])|(87))|(4(1[69])|(3[2-49])|(4[0-3])|(6[5-8]))|(5(1[578])|(44)|(5[0-4]))|(6(1[78])|(2[69])|(39)|(4[5-7])|(5[1-5])|(6[0-59])|(8[015-8])))|(2(2(11[1-9])|(22[0-7])|(33[\\d])|(44[1467])|(66[1-68]))|(5(11[124-6])|(33[2-8])|(44[1467])|(55[14])|(66[1-3679])|(77[124-79])|(880)))|(3(3(11[0-46-8])|((22)|(55)[0-6])|(33[0134689])|(44[04])|(66[01467]))|(4(44[0-8])|(55[0-69])|(66[0-3])|(77[1-5])))|(4(6(119)|(22[0-24-7])|(33[1-5])|(44[13-69])|(55[14-689])|(660)|(88[1-4]))|(7((11)|(22)[1-9])|(33[13-7])|(44[13-6])|(55[1-689])))|(5(7(227)|(55[05])|((66)|(77)[14-8]))|(8(11[149])|(22[013-79])|(33[0-68])|(44[013-8])|(550)|(66[1-5])|(77[\\d])))[\\d]{4}))",
"mobile": "((9[\\d]{8}))",
},
"FI": {
"code": "358",
"pattern": "(((1[3-79][1-8])|([235689][1-8][\\d])[\\d]{2:6}))",
"mobile": "((4946[\\d]{2:6})|((4[0-8])|(50)[\\d]{4:8}))",
},
"FJ": {
"code": "679",
"pattern": "((603[\\d]{4})|((3[0-5])|(6[25-7])|(8[58])[\\d]{5}))",
"mobile": "((([279][\\d])|(45)|(5[01568])|(8[034679])[\\d]{5}))",
},
"FK": {
"code": "500",
"pattern": "(([2-47][\\d]{4}))",
"mobile": "(([56][\\d]{4}))",
},
"FM": {
"code": "691",
"pattern": "((31(00[67])|(208)|(309)[\\d][\\d])|((3([2357]0[1-9])|(602)|(804)|(905))|((820)|(9[2-6][\\d])[\\d])[\\d]{3}))",
"mobile": "((31(00[67])|(208)|(309)[\\d][\\d])|((3([2357]0[1-9])|(602)|(804)|(905))|((820)|(9[2-7][\\d])[\\d])[\\d]{3}))",
},
"FO": {
"code": "298",
"pattern": "(((20)|([34][\\d])|(8[19])[\\d]{4}))",
"mobile": "((([27][1-9])|(5[\\d])|(91)[\\d]{4}))",
},
"FR": {
"code": "33",
"pattern": "((([1-35][\\d])|(4[1-9])[\\d]{7}))",
"mobile": "(((6([0-24-8][\\d])|(3[0-8])|(9[589]))|(7(00)|([3-9][\\d]))[\\d]{6}))",
},
"GA": {
"code": "241",
"pattern": "(([01]1[\\d]{6}))",
"mobile": "((((0[2-7])|(7[467])[\\d])|(6(0[0-4])|(10)|([256][\\d]))[\\d]{5})|([2-7][\\d]{6}))",
},
"GB": {
"code": "44",
"pattern": "(((1(1(3([0-58][\\d][\\d])|(73[0235]))|(4([0-5][\\d][\\d])|(69[7-9])|(70[0359]))|((5[0-26-9])|([78][0-49])[\\d][\\d])|(6([0-4][\\d][\\d])|(50[0-24-69])))|(2((0[024-9])|(2[3-9])|(3[3-79])|(4[1-689])|([58][02-9])|(6[0-47-9])|(7[013-9])|(9[\\d])[\\d][\\d])|(1([0-7][\\d][\\d])|(8([02][\\d])|(1[0-27-9]))))|((3(0[\\d])|(1[0-8])|([25][02-9])|(3[02-579])|([468][0-46-9])|(7[1-35-79])|(9[2-578]))|(4(0[03-9])|([137][\\d])|([28][02-57-9])|(4[02-69])|(5[0-8])|([69][0-79]))|(5(0[1-35-9])|([16][\\d])|(2[024-9])|(3[015689])|(4[02-9])|(5[03-9])|(7[0-35-9])|(8[0-468])|(9[0-57-9]))|(6(0[034689])|(1[\\d])|(2[0-35689])|([38][013-9])|(4[1-467])|(5[0-69])|(6[13-9])|(7[0-8])|(9[0-24578]))|(7(0[0246-9])|(2[\\d])|(3[0236-8])|(4[03-9])|(5[0-46-9])|(6[013-9])|(7[0-35-9])|(8[024-9])|(9[02-9]))|(8(0[35-9])|(2[1-57-9])|(3[02-578])|(4[0-578])|(5[124-9])|(6[2-69])|(7[\\d])|(8[02-9])|(9[02569]))|(9(0[02-589])|([18][\\d])|(2[02-689])|(3[1-57-9])|(4[2-9])|(5[0-579])|(6[2-47-9])|(7[0-24578])|(9[2-57]))[\\d][\\d]))|(2(0[013478])|(3[0189])|(4[017])|(8[0-46-9])|(9[0-2])[\\d]{3})[\\d]{4})|(1(2(0(46[1-4])|(87[2-9]))|(545[1-79])|(76(2[\\d])|(3[1-8])|(6[1-6]))|(9(7(2[0-4])|(3[2-5]))|(8(2[2-8])|(7[0-47-9])|(8[3-5]))))|(3(6(38[2-5])|(47[23]))|(8(47[04-9])|(64[0157-9])))|(4(044[1-7])|(20(2[23])|(8[\\d]))|(6(0(30)|(5[2-57])|(6[1-8])|(7[2-8]))|(140))|(8(052)|(87[1-3])))|(5(2(4(3[2-79])|(6[\\d]))|(76[\\d]))|(6(26[06-9])|(686)))|(6(06(4[\\d])|(7[4-79]))|(295[5-7])|(35[34][\\d])|(47(24)|(61))|(59(5[08])|(6[67])|(74))|(9(55[0-4])|(77[23])))|(7(26(6[13-9])|(7[0-7]))|((442)|(688)[\\d])|(50(2[0-3])|([3-68]2)|(76)))|(8(27[56][\\d])|(37(5[2-5])|(8[239]))|(843[2-58]))|(9(0(0(6[1-8])|(85))|(52[\\d]))|(3583)|(4(66[1-8])|(9(2[01])|(81)))|(63(23)|(3[1-4]))|(9561))[\\d]{3}))",
"mobile": "((7(457[0-57-9])|(700[01])|(911[028])[\\d]{5})|(7([1-3][\\d][\\d])|(4([0-46-9][\\d])|(5[0-689]))|(5(0[0-8])|([13-9][\\d])|(2[0-35-9]))|(7(0[1-9])|([1-7][\\d])|(8[02-9])|(9[0-689]))|(8([014-9][\\d])|([23][0-8]))|(9([024-9][\\d])|(1[02-9])|(3[0-689]))[\\d]{6}))",
},
"GD": {
"code": "1",
"pattern": "((473(2(3[0-2])|(69))|(3(2[89])|(86))|(4([06]8)|(3[5-9])|(4[0-49])|(5[5-79])|(73)|(90))|(63[68])|(7(58)|(84))|(800)|(938)[\\d]{4}))",
"mobile": "((473(4(0[2-79])|(1[04-9])|(2[0-5])|(58))|(5(2[01])|(3[3-8]))|(901)[\\d]{4}))",
},
"GE": {
"code": "995",
"pattern": "(((3([256][\\d])|(4[124-9])|(7[0-4]))|(4(1[\\d])|(2[2-7])|(3[1-79])|(4[2-8])|(7[239])|(9[1-7]))[\\d]{6}))",
"mobile": "((5((0555)|(1177)[5-9])|(757(7[7-9])|(8[01]))[\\d]{3})|(5(00(0[\\d])|(50))|(11(00)|(1[\\d])|(2[0-4])|(3[01]))|(5200)|(75(00)|([57]5))|(8(0([01][\\d])|(2[0-4]))|(58[89])|(8(55)|(88)))[\\d]{4})|(5(0070)|(11(33)|(51))|([25]222)|(3333)[0-4][\\d]{3})|((5([14]4)|(5[0157-9])|(68)|(7[0147-9])|(9[1-35-9]))|(790)[\\d]{6}))",
},
"GF": {
"code": "594",
"pattern": "((594([023][\\d])|(1[01])|(4[03-9])|(5[6-9])|(6[0-3])|(80)|(9[0-6])[\\d]{4}))",
"mobile": "((694([0-249][\\d])|(3[0-48])[\\d]{4}))",
},
"GG": {
"code": "44",
"pattern": "((1481[25-9][\\d]{5}))",
"mobile": "((7((781)|(839)[\\d])|(911[17])[\\d]{5}))",
},
"GH": {
"code": "233",
"pattern": "((3082[0-5][\\d]{4})|(3(0([237][\\d])|(8[01]))|([167](2[0-6])|(7[\\d])|(80))|(2(2[0-5])|(7[\\d])|(80))|(3(2[0-3])|(7[\\d])|(80))|(4(2[013-9])|(3[01])|(7[\\d])|(80))|(5(2[0-7])|(7[\\d])|(80))|(8(2[0-2])|(7[\\d])|(80))|(9([28]0)|(7[\\d]))[\\d]{5}))",
"mobile": "(((2([0346-8][\\d])|(5[67]))|(5([0457][\\d])|(6[01])|(9[1-9]))[\\d]{6}))",
},
"GI": {
"code": "350",
"pattern": "((21(6[24-7][\\d])|(90[0-2])[\\d]{3})|(2(00)|(2[25])[\\d]{5}))",
"mobile": "(((5[146-8][\\d])|(606)[\\d]{5}))",
},
"GL": {
"code": "299",
"pattern": "(((19)|(3[1-7])|(6[14689])|(70)|(8[14-79])|(9[\\d])[\\d]{4}))",
"mobile": "(([245][\\d]{5}))",
},
"GM": {
"code": "220",
"pattern": "(((4([23][\\d][\\d])|(4(1[024679])|([6-9][\\d])))|(5(5(3[\\d])|(4[0-7]))|(6[67][\\d])|(7(1[04])|(2[035])|(3[58])|(48)))|(8[\\d]{3})[\\d]{3}))",
"mobile": "((([23679][\\d])|(5[0-389])[\\d]{5}))",
},
"GN": {
"code": "224",
"pattern": "((3(0(24)|(3[12])|(4[1-35-7])|(5[13])|(6[189])|([78]1)|(9[1478]))|(1[\\d][\\d])[\\d]{4}))",
"mobile": "((6[0-356][\\d]{7}))",
},
"GP": {
"code": "590",
"pattern": "((590(0[1-68])|(1[0-24-7])|(2[0-68])|(3[1289])|(4[0-24-9])|(5[3-579])|(6[0189])|(7[08])|(8[0-689])|(9[\\d])[\\d]{4}))",
"mobile": "((69(0[\\d][\\d])|(1(2[2-9])|(3[0-5]))[\\d]{4}))",
},
"GQ": {
"code": "240",
"pattern": "((33[0-24-9][\\d][46][\\d]{4})|(3(33)|(5[\\d])[\\d][7-9][\\d]{4}))",
"mobile": "(((222)|(55[\\d])[\\d]{6}))",
},
"GR": {
"code": "30",
"pattern": "((2(1[\\d][\\d])|(2(2[1-46-9])|([36][1-8])|(4[1-7])|(5[1-4])|(7[1-5])|([89][1-9]))|(3(1[\\d])|(2[1-57])|([35][1-3])|(4[13])|(7[1-7])|(8[124-6])|(9[1-79]))|(4(1[\\d])|(2[1-8])|(3[1-4])|(4[13-5])|(6[1-578])|(9[1-5]))|(5(1[\\d])|([29][1-4])|(3[1-5])|(4[124])|(5[1-6]))|(6(1[\\d])|([269][1-6])|(3[1245])|(4[1-7])|(5[13-9])|(7[14])|(8[1-5]))|(7(1[\\d])|(2[1-5])|(3[1-6])|(4[1-7])|(5[1-57])|(6[135])|(9[125-7]))|(8(1[\\d])|(2[1-5])|([34][1-4])|(9[1-57]))[\\d]{6}))",
"mobile": "((68[57-9][\\d]{7})|((69)|(94)[\\d]{8}))",
},
"GT": {
"code": "502",
"pattern": "(([267][2-9][\\d]{6}))",
"mobile": "(([3-5][\\d]{7}))",
},
"GU": {
"code": "1",
"pattern": "((671(3(00)|(3[39])|(4[349])|(55)|(6[26]))|(4(00)|(56)|(7[1-9])|(8[0236-9]))|(5(55)|(6[2-5])|(88))|(6(3[2-578])|(4[24-9])|(5[34])|(78)|(8[235-9]))|(7([0479]7)|(2[0167])|(3[45])|(8[7-9]))|(8([2-57-9]8)|(6[48]))|(9(2[29])|(6[79])|(7[1279])|(8[7-9])|(9[78]))[\\d]{4}))",
"mobile": "((671(3(00)|(3[39])|(4[349])|(55)|(6[26]))|(4(00)|(56)|(7[1-9])|(8[0236-9]))|(5(55)|(6[2-5])|(88))|(6(3[2-578])|(4[24-9])|(5[34])|(78)|(8[235-9]))|(7([0479]7)|(2[0167])|(3[45])|(8[7-9]))|(8([2-57-9]8)|(6[48]))|(9(2[29])|(6[79])|(7[1279])|(8[7-9])|(9[78]))[\\d]{4}))",
},
"GW": {
"code": "245",
"pattern": "((443[\\d]{6}))",
"mobile": "((9(5[\\d])|(6[569])|(77)[\\d]{6}))",
},
"GY": {
"code": "592",
"pattern": "(((2(1[6-9])|(2[0-35-9])|(3[1-4])|(5[3-9])|(6[\\d])|(7[0-24-79]))|(3(2[25-9])|(3[\\d]))|(4(4[0-24])|(5[56]))|(77[1-57])[\\d]{4}))",
"mobile": "(((6[\\d][\\d])|(70[015-7])[\\d]{4}))",
},
"HK": {
"code": "852",
"pattern": "(((2([13-9][\\d])|(2[013-9])[\\d])|(3(([1569][0-24-9])|(4[0-246-9])|(7[0-24-69])[\\d])|(8(4[0-8])|(5[0-5])|(9[\\d])))|(58(0[1-8])|(1[2-9]))[\\d]{4}))",
"mobile": "(((46(0[0-7])|(1[0-6])|(4[0-57-9])|(6[0-4])|(7[0-8]))|(573[0-6])|(6(26[013-8])|(66[0-3]))|(70(7[1-5])|(8[0-4]))|(848[015-9])|(929[013-9])[\\d]{4})|((4(40)|(6[2358]))|(5([1-59][0-46-9])|(6[0-4689])|(7[0-24679]))|(6(0[1-9])|([13-59][\\d])|([268][0-57-9])|(7[0-79]))|(84[09])|(9(0[1-9])|(1[02-9])|([2358][0-8])|([467][\\d]))[\\d]{5}))",
},
"HN": {
"code": "504",
"pattern": "((2(2(0[0-39])|(1[1-367])|([23][\\d])|(4[03-6])|(5[57])|(6[245])|(7[0135689])|(8[01346-9])|(9[0-2]))|(4(0[78])|(2[3-59])|(3[13-9])|(4[0-68])|(5[1-35]))|(5(0[7-9])|(16)|(4[03-5])|(5[\\d])|(6[014-6])|(7[04])|(80))|(6([056][\\d])|(17)|(2[067])|(3[04])|(4[0-378])|([78][0-8])|(9[01]))|(7(6[46-9])|(7[02-9])|(8[034])|(91))|(8(79)|(8[0-357-9])|(9[1-57-9]))[\\d]{4}))",
"mobile": "(([37-9][\\d]{7}))",
},
"HR": {
"code": "385",
"pattern": "((1[\\d]{7})|((2[0-3])|(3[1-5])|(4[02-47-9])|(5[1-3])[\\d]{6:7}))",
"mobile": "((98[\\d]{6:7})|(975(1[\\d])|(96)[\\d]{4})|(9(0[1-9])|([1259][\\d])|(7[0679])[\\d]{6}))",
},
"HT": {
"code": "509",
"pattern": "((2(2[\\d])|(5[1-5])|(81)|(9[149])[\\d]{5}))",
"mobile": "(([34][\\d]{7}))",
},
"HU": {
"code": "36",
"pattern": "(((1[\\d])|([27][2-9])|(3[2-7])|(4[24-9])|(5[2-79])|(6[23689])|(8[2-57-9])|(9[2-69])[\\d]{6}))",
"mobile": "((([257]0)|(3[01])[\\d]{7}))",
},
"ID": {
"code": "62",
"pattern": "((2[124][\\d]{7:8})|(619[\\d]{8})|(2(1(14)|(500))|(2[\\d]{3})[\\d]{3})|(61[\\d]{5:8})|((2([35][1-4])|(6[0-8])|(7[1-6])|(8[\\d])|(9[1-8]))|(3(1)|([25][1-8])|(3[1-68])|(4[1-3])|(6[1-3568])|(7[0-469])|(8[\\d]))|(4(0[1-589])|(1[01347-9])|(2[0-36-8])|(3[0-24-68])|(43)|(5[1-378])|(6[1-5])|(7[134])|(8[1245]))|(5(1[1-35-9])|(2[25-8])|(3[124-9])|(4[1-3589])|(5[1-46])|(6[1-8]))|(6([25][\\d])|(3[1-69])|(4[1-6]))|(7(02)|([125][1-9])|([36][\\d])|(4[1-8])|(7[0-36-9]))|(9(0[12])|(1[013-8])|(2[0-479])|(5[125-8])|(6[23679])|(7[159])|(8[01346]))[\\d]{5:8}))",
"mobile": "((8[1-35-9][\\d]{7:10}))",
},
"IE": {
"code": "353",
"pattern": "(((1[\\d])|(21)[\\d]{6:7})|((2[24-9])|(4(0[24])|(5[\\d])|(7))|(5(0[45])|(1[\\d])|(8))|(6(1[\\d])|([237-9]))|(9(1[\\d])|([35-9]))[\\d]{5})|((23)|(4([1-469])|(8[\\d]))|(5[23679])|(6[4-6])|(7[14])|(9[04])[\\d]{7}))",
"mobile": "((8(22)|([35-9][\\d])[\\d]{6}))",
},
"IL": {
"code": "972",
"pattern": "((153[\\d]{8:9})|(29[1-9][\\d]{5})|((2[0-8])|([3489][\\d])[\\d]{6}))",
"mobile": "((5(([02368][\\d])|([19][2-9])|(4[1-9])[\\d])|(5(01)|(1[79])|(2[2-9])|(3[0-3])|(4[34])|(5[015689])|(6[6-8])|(7[0-267])|(8[7-9])|(9[1-9]))[\\d]{5}))",
},
"IM": {
"code": "44",
"pattern": "((1624(230)|([5-8][\\d][\\d])[\\d]{3}))",
"mobile": "((76245[06][\\d]{4})|(7(4576)|([59]24[\\d])|(624[0-4689])[\\d]{5}))",
},
"IN": {
"code": "91",
"pattern": "((2717([2-7][\\d])|(95)[\\d]{4})|((271[0-689])|(782[0-6])[2-7][\\d]{5})|((170[24])|(2(([02][2-79])|(90)[\\d])|(80[13468]))|((3(23)|(80))|(683)|(79[1-7])[\\d])|(4(20[24])|(72[2-8]))|(552[1-7])[\\d]{6})|((11)|(33)|(4[04])|(80)[2-7][\\d]{7})|((342)|(674)|(788)([0189][2-7])|([2-7][\\d])[\\d]{5})|((1(2[0-249])|(3[0-25])|(4[145])|([59][14])|(6[014])|(7[1257])|(8[01346]))|(2(1[257])|(3[013])|(4[01])|(5[0137])|(6[0158])|(78)|(8[1568])|(9[14]))|(3(26)|(4[13])|(5[34])|(6[01489])|(7[02-46])|(8[159]))|(4(1[36])|(2[1-47])|(3[15])|(5[12])|(6[0-26-9])|(7[014-9])|(8[013-57])|(9[014-7]))|(5(1[025])|(22)|([36][25])|(4[28])|([578]1)|(9[15]))|(6(12)|([2-47]1)|(5[17])|(6[13])|(80))|(7(12)|(2[14])|(3[134])|(4[47])|(5[15])|([67]1))|(8(16)|(2[014])|(3[126])|(6[136])|(7[078])|(8[34])|(91))[2-7][\\d]{6})|((1(2[35-8])|(3[346-9])|(4[236-9])|([59][0235-9])|(6[235-9])|(7[34689])|(8[257-9]))|(2(1[134689])|(3[24-8])|(4[2-8])|(5[25689])|(6[2-4679])|(7[3-79])|(8[2-479])|(9[235-9]))|(3(01)|(1[79])|(2[1245])|(4[5-8])|(5[125689])|(6[235-7])|(7[157-9])|(8[2-46-8]))|(4(1[14578])|(2[5689])|(3[2-467])|(5[4-7])|(6[35])|(73)|(8[2689])|(9[2389]))|(5([16][146-9])|(2[14-8])|(3[1346])|(4[14-69])|(5[46])|(7[2-4])|(8[2-8])|(9[246]))|(6(1[1358])|(2[2457])|(3[2-4])|(4[235-7])|(5[2-689])|(6[24578])|(7[235689])|(8[124-6]))|(7(1[013-9])|(2[0235-9])|(3[2679])|(4[1-35689])|(5[2-46-9])|([67][02-9])|(8[013-7])|(9[089]))|(8(1[1357-9])|(2[235-8])|(3[03-57-9])|(4[0-24-9])|(5[\\d])|(6[2457-9])|(7[1-6])|(8[1256])|(9[2-4]))[\\d][2-7][\\d]{5}))",
"mobile": "(((61279)|(7(887[02-9])|(9(313)|(79[07-9])))|(8(079[04-9])|((84)|(91)7[02-8]))[\\d]{5})|((6(12)|([2-47]1)|(5[17])|(6[13])|(80)[0189])|(7(1(2[0189])|(9[0-5]))|(2([14][017-9])|(8[0-59]))|(3(2[5-8])|([34][017-9])|(9[016-9]))|(4(1[015-9])|([29][89])|(39)|(8[389]))|(5([15][017-9])|(2[04-9])|(9[7-9]))|(6(0[0-47])|(1[0-257-9])|(2[0-4])|(3[19])|(5[4589]))|(70[0289])|(88[089])|(97[02-8]))|(8(0(6[67])|(7[02-8]))|(70[017-9])|(84[01489])|(91[0-289]))[\\d]{6})|((7(31)|(4[47]))|(8(16)|(2[014])|(3[126])|(6[136])|(7[78])|(83))([0189][\\d])|(7[02-8])[\\d]{5})|((6([09][\\d])|(1[04679])|(2[03689])|(3[05-9])|(4[0489])|(50)|(6[069])|(7[07])|(8[7-9]))|(7(0[\\d])|(2[0235-79])|(3[05-8])|(40)|(5[0346-8])|(6[6-9])|(7[1-9])|(8[0-79])|(9[089]))|(8(0[01589])|(1[0-57-9])|(2[235-9])|(3[03-57-9])|([45][\\d])|(6[02457-9])|(7[1-69])|(8[0-25-9])|(9[02-9]))|(9[\\d][\\d])[\\d]{7})|((6((1[1358])|(2[2457])|(3[2-4])|(4[235-7])|(5[2-689])|(6[24578])|(8[124-6])[\\d])|(7([235689][\\d])|(4[0189])))|(7(1([013-8][\\d])|(9[6-9]))|(28[6-8])|(3(2[0-49])|(9[2-5]))|(4(1[2-4])|([29][0-7])|(3[0-8])|([56][\\d])|(8[0-24-7]))|(5(2[1-3])|(9[0-6]))|(6(0[5689])|(2[5-9])|(3[02-8])|(4[\\d])|(5[0-367]))|(70[13-7])|(881))[0189][\\d]{5}))",
},
"IO": {"code": "246", "pattern": "((37[\\d]{5}))", "mobile": "((38[\\d]{5}))"},
"IQ": {
"code": "964",
"pattern": "((1[\\d]{7})|((2[13-5])|(3[02367])|(4[023])|(5[03])|(6[026])[\\d]{6:7}))",
"mobile": "((7[3-9][\\d]{8}))",
},
"IR": {
"code": "98",
"pattern": "(((1[137])|(2[13-68])|(3[1458])|(4[145])|(5[1468])|(6[16])|(7[1467])|(8[13467])([03-57][\\d]{7})|([16][\\d]{3}([\\d]{4})?)|([289][\\d]{3}([\\d]([\\d]{3})?)?))|(94(000[09])|(2(121)|([2689]0[\\d]))|(30[0-2][\\d])|(4(111)|(40[\\d]))[\\d]{4}))",
"mobile": "((9((0([0-35][\\d])|(4[4-6]))|(([13][\\d])|(2[0-3])[\\d])[\\d])|(9([0-46][\\d][\\d])|(5[15]0)|(8(1[\\d])|(88))|(9(0[013])|([19][\\d])|(21)|(77)|(8[7-9])))[\\d]{5}))",
},
"IS": {
"code": "354",
"pattern": "(((4(1[0-24-69])|(2[0-7])|([37][0-8])|(4[0-24589])|(5[0-68])|(6[\\d])|(8[0-36-8]))|(5(05)|([156][\\d])|(2[02578])|(3[0-579])|(4[03-7])|(7[0-2578])|(8[0-35-9])|(9[013-689]))|(872)[\\d]{4}))",
"mobile": "(((38[589][\\d][\\d])|(6(1[1-8])|(2[0-6])|(3[026-9])|(4[014679])|(5[0159])|(6[0-69])|(70)|(8[06-8])|(9[\\d]))|(7(5[057])|([6-9][\\d]))|(8(2[0-59])|([3-69][\\d])|(8[28]))[\\d]{4}))",
},
"IT": {
"code": "39",
"pattern": "((0669[0-79][\\d]{1:6})|(0(1([0159][\\d])|([27][1-5])|(31)|(4[1-4])|(6[1356])|(8[2-57]))|(2[\\d][\\d])|(3([0159][\\d])|(2[1-4])|(3[12])|([48][1-6])|(6[2-59])|(7[1-7]))|(4([0159][\\d])|([23][1-9])|(4[245])|(6[1-5])|(7[1-4])|(81))|(5([0159][\\d])|(2[1-5])|(3[2-6])|(4[1-79])|(6[4-6])|(7[1-578])|(8[3-8]))|(6([0-57-9][\\d])|(6[0-8]))|(7([0159][\\d])|(2[12])|(3[1-7])|(4[2-46])|(6[13569])|(7[13-6])|(8[1-59]))|(8([0159][\\d])|(2[3-578])|(3[1-356])|([6-8][1-5]))|(9([0159][\\d])|([238][1-5])|(4[12])|(6[1-8])|(7[1-6]))[\\d]{2:7}))",
"mobile": "((3[1-9][\\d]{8})|(3[2-9][\\d]{7}))",
},
"JE": {
"code": "44",
"pattern": "((1534[0-24-8][\\d]{5}))",
"mobile": "((7(((50)|(82)9)|(937)[\\d])|(7(00[378])|(97[7-9]))[\\d]{5}))",
},
"JM": {
"code": "1",
"pattern": "((8766060[\\d]{3})|((658(2([0-8][\\d])|(9[0-46-9]))|([3-9][\\d][\\d]))|(876(52[35])|(6(0[1-3579])|(1[02357-9])|([23][\\d])|(40)|(5[06])|(6[2-589])|(7[0257])|(8[04])|(9[4-9]))|(7(0[2-689])|([1-6][\\d])|(8[056])|(9[45]))|(9(0[1-8])|(1[02378])|([2-8][\\d])|(9[2-468])))[\\d]{4}))",
"mobile": "(((658295)|(876(2(0[2-9])|([14-9][\\d])|(2[013-9])|(3[3-9]))|([348][\\d][\\d])|(5(0[1-9])|([1-9][\\d]))|(6(4[89])|(6[67]))|(7(0[07])|(7[\\d])|(8[1-47-9])|(9[0-36-9]))|(9([01]9)|(9[0579])))[\\d]{4}))",
},
"JO": {
"code": "962",
"pattern": "((87(000)|(90[01])[\\d]{3})|((2(6(2[0-35-9])|(3[0-578])|(4[24-7])|(5[0-24-8])|([6-8][023])|(9[0-3]))|(7(0[1-79])|(10)|(2[014-7])|(3[0-689])|(4[019])|(5[0-3578])))|(32(0[1-69])|(1[1-35-7])|(2[024-7])|(3[\\d])|(4[0-3])|([5-7][023]))|(53(0[0-3])|([13][023])|(2[0-59])|(49)|(5[0-35-9])|(6[15])|(7[45])|(8[1-6])|(9[0-36-9]))|(6(2([05]0)|(22))|(3(00)|(33))|(4(0[0-25])|(1[2-7])|(2[0569])|([38][07-9])|(4[025689])|(6[0-589])|(7[\\d])|(9[0-2]))|(5([01][056])|(2[034])|(3[0-57-9])|(4[178])|(5[0-69])|(6[0-35-9])|(7[1-379])|(8[0-68])|(9[0239])))|(87(20)|(7[078])|(99))[\\d]{4}))",
"mobile": "((7([78][0-25-9])|(9[\\d])[\\d]{6}))",
},
"JP": {
"code": "81",
"pattern": "(((1(1[235-8])|(2[3-6])|(3[3-9])|(4[2-6])|([58][2-8])|(6[2-7])|(7[2-9])|(9[1-9]))|((2[2-9])|([36][1-9])[\\d])|(4([2-578][\\d])|(6[02-8])|(9[2-59]))|(5([2-589][\\d])|(6[1-9])|(7[2-8]))|(7([25-9][\\d])|(3[4-9])|(4[02-9]))|(8([2679][\\d])|(3[2-9])|(4[5-9])|(5[1-9])|(8[03-9]))|(9([2-58][\\d])|([679][1-9]))[\\d]{6}))",
"mobile": "(([7-9]0[1-9][\\d]{7}))",
},
"KE": {
"code": "254",
"pattern": "(((4[245])|(5[1-79])|(6[01457-9])[\\d]{5:7})|((4[136])|(5[08])|(62)[\\d]{7})|(([24]0)|(66)[\\d]{6:7}))",
"mobile": "(((1(0[0-6])|(1[0-5])|(2[014]))|(7[\\d][\\d])[\\d]{6}))",
},
"KG": {
"code": "996",
"pattern": "((312(5[0-79][\\d])|(9([0-689][\\d])|(7[0-24-9]))[\\d]{3})|((3(1(2[0-46-8])|(3[1-9])|(47)|([56][\\d]))|(2(22)|(3[0-479])|(6[0-7]))|(4(22)|(5[6-9])|(6[\\d]))|(5(22)|(3[4-7])|(59)|(6[\\d]))|(6(22)|(5[35-7])|(6[\\d]))|(7(22)|(3[468])|(4[1-9])|(59)|([67][\\d]))|(9(22)|(4[1-8])|(6[\\d])))|(6(09)|(12)|(2[2-4])[\\d])[\\d]{5}))",
"mobile": "((312(58[\\d])|(973)[\\d]{3})|((2(0[0-35])|(2[\\d]))|(5[0-24-7][\\d])|(7([07][\\d])|(55))|(880)|(99[05-9])[\\d]{6}))",
},
"KH": {
"code": "855",
"pattern": "((23(4([2-4])|([56][\\d]))|([568][\\d][\\d])[\\d]{4})|(23[236-9][\\d]{5})|((2[4-6])|(3[2-6])|(4[2-4])|([5-7][2-5])(([237-9])|(4[56])|(5[\\d])[\\d]{5})|(6[\\d]{5:6})))",
"mobile": "((((1[28])|(3[18])|(9[67])[\\d])|(6[016-9])|(7([07-9])|([16][\\d]))|(8([013-79])|(8[\\d]))[\\d]{6})|((1[\\d])|(9[0-57-9])[\\d]{6})|((2[3-6])|(3[2-6])|(4[2-4])|([5-7][2-5])48[\\d]{5}))",
},
"KI": {
"code": "686",
"pattern": "((([24][\\d])|(3[1-9])|(50)|(65(02[12])|(12[56])|(22[89])|([3-5]00))|(7(27[\\d][\\d])|(3100)|(5(02[12])|(12[56])|(22[89])|([34](00)|(81))|(500)))|(8[0-5])[\\d]{3}))",
"mobile": "(((63[\\d]{3})|(73(0[0-5][\\d])|(140))[\\d]{3})|([67]200[01][\\d]{3}))",
},
"KM": {
"code": "269",
"pattern": "((7[4-7][\\d]{5}))",
"mobile": "(([34][\\d]{6}))",
},
"KN": {
"code": "1",
"pattern": "((869(2(29)|(36))|(302)|(4(6[015-9])|(70))|(56[5-7])[\\d]{4}))",
"mobile": "((869(48[89])|(55[6-8])|(66[\\d])|(76[02-7])[\\d]{4}))",
},
"KP": {
"code": "850",
"pattern": "((((195)|(2)[\\d])|(3[19])|(4[159])|(5[37])|(6[17])|(7[39])|(85)[\\d]{6}))",
"mobile": "((19[1-3][\\d]{7}))",
},
"KR": {
"code": "82",
"pattern": "(((2)|(3[1-3])|([46][1-4])|(5[1-5])[1-9][\\d]{6:7})|((3[1-3])|([46][1-4])|(5[1-5])1[\\d]{2:3}))",
"mobile": "((1(05([0-8][\\d])|(9[0-6]))|(22[13][\\d])[\\d]{4:5})|(1(0[1-46-9])|([16-9][\\d])|(2[013-9])[\\d]{6:7}))",
},
"KW": {
"code": "965",
"pattern": "((2([23][\\d][\\d])|(4([1-35-9][\\d])|(44))|(5(0[034])|([2-46][\\d])|(5[1-3])|(7[1-7]))[\\d]{4}))",
"mobile": "(((41[\\d][\\d])|(5(([05][\\d])|(1[0-7])|(6[56])[\\d])|(2(22)|(5[25]))|(7(55)|(77))|(88[58]))|(6((0[034679])|(5[015-9])|(6[\\d])[\\d])|(111)|(222)|(333)|(444)|(7(0[013-9])|([67][\\d]))|(888)|(9([069][\\d])|(3[039])))|(9((0[09])|(22)|([4679][\\d])|(8[057-9])[\\d])|(1(1[01])|(99))|(3(00)|(33))|(5(00)|(5[\\d])))[\\d]{4}))",
},
"KY": {
"code": "1",
"pattern": "((345(2(22)|(3[23])|(44)|(66))|(333)|(444)|(6(23)|(38)|(40))|(7(30)|(4[35-79])|(6[6-9])|(77))|(8(00)|(1[45])|([48]8))|(9(14)|(4[035-9]))[\\d]{4}))",
"mobile": "((345(32[1-9])|(42[0-4])|(5(1[67])|(2[5-79])|(4[6-9])|(50)|(76))|(649)|(82[56])|(9(1[679])|(2[2-9])|(3[06-9])|(90))[\\d]{4}))",
},
"KZ": {
"code": "7",
"pattern": "(((33622)|(7(1(0([23][\\d])|(4[0-3])|(59)|(63))|(1([23][\\d])|(4[0-79])|(59))|(2([23][\\d])|(59))|(3(2[\\d])|(3[0-79])|(4[0-35-9])|(59))|(4([24][\\d])|(3[013-9])|(5[1-9]))|(5(2[\\d])|(3[1-9])|(4[0-7])|(59))|(6([2-4][\\d])|(5[19])|(61))|(72[\\d])|(8([27][\\d])|(3[1-46-9])|(4[0-5])))|(2(1([23][\\d])|(4[46-9])|(5[3469]))|(2(2[\\d])|(3[0679])|(46)|(5[12679]))|(3([2-4][\\d])|(5[139]))|(4(2[\\d])|(3[1-35-9])|(59))|(5([23][\\d])|(4[0-246-8])|(59)|(61))|(6(2[\\d])|(3[1-9])|(4[0-4])|(59))|(7([2379][\\d])|(40)|(5[279]))|(8([23][\\d])|(4[0-3])|(59))|(9(2[\\d])|(3[124578])|(59))))[\\d]{5}))",
"mobile": "((7(0[0-25-8])|(47)|(6[0-4])|(7[15-8])|(85)[\\d]{7}))",
},
"LA": {
"code": "856",
"pattern": "(((2[13])|([35-7][14])|(41)|(8[1468])[\\d]{6}))",
"mobile": "(((20([239][\\d])|(5[24-9])|(7[6-8])|(88))|(302[\\d])[\\d]{6}))",
},
"LB": {
"code": "961",
"pattern": "((7(62)|(8[0-7])|(9[04-9])[\\d]{4})|(([14-69][\\d])|(2([14-69][\\d])|([78][1-9]))|(7[2-57])|(8[02-9])[\\d]{5}))",
"mobile": "((793([01][\\d])|(2[0-4])[\\d]{3})|(((3)|(81)[\\d])|(7([01][\\d])|(6[013-9])|(8[89])|(9[12]))[\\d]{5}))",
},
"LC": {
"code": "1",
"pattern": "((758(234)|(4(30)|(5[\\d])|(6[2-9])|(8[0-2]))|(57[0-2])|((63)|(75)8)[\\d]{4}))",
"mobile": "((758(28[4-7])|(384)|(4(6[01])|(8[4-9]))|(5(1[89])|(20)|(84))|(7(1[2-9])|(2[\\d])|(3[0-3]))|(812)[\\d]{4}))",
},
"LI": {
"code": "423",
"pattern": "(((2(01)|(1[27])|(2[02])|(3[\\d])|(6[02-578])|(96))|(3([24]0)|(33)|(7[0135-7])|(8[048])|(9[0269]))[\\d]{4}))",
"mobile": "(((6((4[5-9])|(5[0-4])[\\d])|(6([0245][\\d])|([17]0)|(3[7-9]))[\\d])|(7([37-9][\\d])|(42)|(56))[\\d]{4}))",
},
"LK": {
"code": "94",
"pattern": "(((12[2-9])|(602)|(8[12][\\d])|(9(1[\\d])|(22)|(9[245]))[\\d]{6})|((11)|(2[13-7])|(3[1-8])|(4[157])|(5[12457])|(6[35-7])[2-57][\\d]{6}))",
"mobile": "((7([0-25-8][\\d])|(4[0-4])[\\d]{6}))",
},
"LR": {
"code": "231",
"pattern": "(((2[\\d]{3})|(33333)[\\d]{4}))",
"mobile": "((((330)|(555)|((77)|(88)[\\d])[\\d])|(4[67])[\\d]{5})|([56][\\d]{6}))",
},
"LS": {"code": "266", "pattern": "((2[\\d]{7}))", "mobile": "(([56][\\d]{7}))"},
"LT": {
"code": "370",
"pattern": "(((3[1478])|(4[124-6])|(52)[\\d]{6}))",
"mobile": "((6[\\d]{7}))",
},
"LU": {
"code": "352",
"pattern": "(((35[013-9])|(80[2-9])|(90[89])[\\d]{1:8})|((2[2-9])|(3[0-46-9])|([457][\\d])|(8[13-9])|(9[2-579])[\\d]{2:9}))",
"mobile": "((6([269][18])|(5[1568])|(7[189])|(81)[\\d]{6}))",
},
"LV": {"code": "371", "pattern": "((6[\\d]{7}))", "mobile": "((2[\\d]{7}))"},
"LY": {
"code": "218",
"pattern": "(((2(0[56])|([1-6][\\d])|(7[124579])|(8[124]))|(3(1[\\d])|(2[2356]))|(4([17][\\d])|(2[1-357])|(5[2-4])|(8[124]))|(5([1347][\\d])|(2[1-469])|(5[13-5])|(8[1-4]))|(6([1-479][\\d])|(5[2-57])|(8[1-5]))|(7([13][\\d])|(2[13-79]))|(8([124][\\d])|(5[124])|(84))[\\d]{6}))",
"mobile": "((9[1-6][\\d]{7}))",
},
"MA": {
"code": "212",
"pattern": "((5(29([189][05])|(2[29])|(3[01]))|(38(8[057])|(9[05]))[\\d]{4})|(5(2([0-25-7][\\d])|(3[1-578])|(4[02-46-8])|(8[0235-7])|(90))|(3([0-47][\\d])|(5[02-9])|(6[02-8])|(80)|(9[3-9]))|((4[067])|(5[03])[\\d])[\\d]{5}))",
"mobile": "(((6([0-79][\\d])|(8[0-247-9]))|(7([017][\\d])|(6[0-367]))[\\d]{6}))",
},
"MC": {
"code": "377",
"pattern": "(((870)|(9[2-47-9][\\d])[\\d]{5}))",
"mobile": "((4([46][\\d])|(5[1-9])[\\d]{5})|((3)|(6[\\d])[\\d]{7}))",
},
"MD": {
"code": "373",
"pattern": "((((2[1-9])|(3[1-79])[\\d])|(5(33)|(5[257]))[\\d]{5}))",
"mobile": "((562[\\d]{5})|((6[\\d])|(7[16-9])[\\d]{6}))",
},
"ME": {
"code": "382",
"pattern": "(((20[2-8])|(3([0-2][2-7])|(3[24-7]))|(4(0[2-467])|(1[2467]))|(5(0[2467])|(1[24-7])|(2[2-467]))[\\d]{5}))",
"mobile": "((6([07-9][\\d])|(3[024])|(6[0-25])[\\d]{5}))",
},
"MF": {
"code": "590",
"pattern": "((590(0[079])|([14]3)|([27][79])|(30)|(5[0-268])|(87)[\\d]{4}))",
"mobile": "((69(0[\\d][\\d])|(1(2[2-9])|(3[0-5]))[\\d]{4}))",
},
"MG": {
"code": "261",
"pattern": "((2072[29][\\d]{4})|(20(2[\\d])|(4[47])|(5[3467])|(6[279])|(7[35])|(8[268])|(9[245])[\\d]{5}))",
"mobile": "((3[2-489][\\d]{7}))",
},
"MH": {
"code": "692",
"pattern": "(((247)|(528)|(625)[\\d]{4}))",
"mobile": "((((23)|(54)5)|(329)|(45[56])[\\d]{4}))",
},
"MK": {
"code": "389",
"pattern": "((((2(62)|(77)0)|(3444)[\\d])|(4[56]440)[\\d]{3})|((34)|(4[357])700[\\d]{3})|((2([23][\\d])|(5[0-578])|(6[01])|(82))|(3(1[3-68])|([23][2-68])|(4[23568]))|(4([23][2-68])|(4[3-68])|(5[2568])|(6[25-8])|(7[24-68])|(8[4-68]))[\\d]{5}))",
"mobile": "((7(3555)|(4(60[\\d])|(747))|(94([01][\\d])|(2[0-4]))[\\d]{3})|(7([0-25-8][\\d])|(3[1-4])|(42)|(9[23])[\\d]{5}))",
},
"ML": {
"code": "223",
"pattern": "((2(07[0-8])|(12[67])[\\d]{4})|((2(02)|(1[4-689]))|(4(0[0-4])|(4[1-39]))[\\d]{5}))",
"mobile": "((2(0(01)|(79))|(17[\\d])[\\d]{4})|((5[01])|([679][\\d])|(8[239])[\\d]{6}))",
},
"MM": {
"code": "95",
"pattern": "(((1((2[\\d])|(3[56])|([89][0-6])[\\d])|(4(2[2-469])|(39)|(46)|(6[25])|(7[0-3])|(83))|(6))|(2(2(00)|(8[34]))|(4(0[\\d])|(2[246])|(39)|(46)|(62)|(7[0-3])|(83))|(51[\\d][\\d]))|(4(2(2[\\d][\\d])|(48[0-3]))|(3(20[\\d])|(4(70)|(83))|(56))|(420[\\d])|(5470))|(6(0([23])|(88[\\d]))|((124)|([56]2[\\d])[\\d])|(247[23])|(3(20[\\d])|(470))|(4(2[04][\\d])|(47[23]))|(7((3[\\d])|(8[01459])[\\d])|(4(39)|(60)|(7[013]))))[\\d]{4})|(5(2(2[\\d]{5:6})|(47[023][\\d]{4}))|((347[23])|(4(2(1)|(86))|(470))|(522[\\d])|(6(20[\\d])|(483))|(7(20[\\d])|(48[0-2]))|(8(20[\\d])|(47[02]))|(9(20[\\d])|(47[01]))[\\d]{4}))|(7((0470)|(4(25[\\d])|(470))|(5(202)|(470)|(96[\\d]))[\\d]{4})|(1(20[\\d]{4:5})|(4(70)|(83)[\\d]{4})))|(8(1(2[\\d]{5:6})|(4(10)|(7[01][\\d])[\\d]{3}))|(2(2[\\d]{5:6})|((320)|(490[\\d])[\\d]{3}))|((3(2[\\d][\\d])|(470))|(4[24-7])|(5(2[\\d])|(4[1-9])|(51)[\\d])|(6[23])[\\d]{4}))|((1[2-6][\\d])|(4(2[24-8])|(3[2-7])|([46][2-6])|(5[3-5]))|(5([27][2-8])|(3[2-68])|(4[24-8])|(5[23])|(6[2-4])|(8[24-7])|(9[2-7]))|(6([19]20)|(42[03-6])|((52)|(7[45])[\\d]))|(7([04][24-8])|([15][2-7])|(22)|(3[2-4]))|(8(1[2-689])|(2[2-8])|([35]2[\\d]))[\\d]{4})|(25[\\d]{5:6})|((2[2-9])|(6(1[2356])|([24][2-6])|(3[24-6])|(5[2-4])|(6[2-8])|(7[235-7])|(8[245])|(9[24]))|(8(3[24])|(5[245]))[\\d]{4}))",
"mobile": "(((17[01])|(9(2([0-4])|([56][\\d][\\d]))|((3([0-36])|(4[\\d]))|((6[\\d])|(8[89])|(9[4-8])[\\d])|(7(3)|(40)|([5-9][\\d]))[\\d])|(4(([0245][\\d])|([1379])[\\d])|(88))|(5[0-6])[\\d])[\\d]{4})|(9[69]1[\\d]{6})|(9([68][\\d])|(9[089])[\\d]{5}))",
},
"MN": {
"code": "976",
"pattern": "(([12]2[1-3][\\d]{5:6})|(7(0[0-5][\\d])|(128)[\\d]{4})|(([12](1)|(27))|(5[368])[\\d]{6})|([12](3[2-8])|(4[2-68])|(5[1-4689])[\\d]{6:7}))",
"mobile": "(((83[01])|(920)[\\d]{5})|((5[05])|(8[05689])|(9[013-9])[\\d]{6}))",
},
"MO": {
"code": "853",
"pattern": "(((28[2-9])|(8(11)|([2-57-9][\\d]))[\\d]{5}))",
"mobile": "((6800[0-79][\\d]{3})|(6([235][\\d][\\d])|(6(0[0-5])|([1-9][\\d]))|(8(0[1-9])|([14-8][\\d])|(2[5-9])|([39][0-4]))[\\d]{4}))",
},
"MP": {
"code": "1",
"pattern": "((670(2(3[3-7])|(56)|(8[4-8]))|(32[1-38])|(4(33)|(8[348]))|(5(32)|(55)|(88))|(6(64)|(70)|(82))|(78[3589])|(8[3-9]8)|(989)[\\d]{4}))",
"mobile": "((670(2(3[3-7])|(56)|(8[4-8]))|(32[1-38])|(4(33)|(8[348]))|(5(32)|(55)|(88))|(6(64)|(70)|(82))|(78[3589])|(8[3-9]8)|(989)[\\d]{4}))",
},
"MQ": {
"code": "596",
"pattern": "((596([04-7][\\d])|(10)|(2[7-9])|(3[014-9])|(8[09])|(9[4-9])[\\d]{4}))",
"mobile": "((69(6([0-46-9][\\d])|(5[0-6]))|(727)[\\d]{4}))",
},
"MR": {
"code": "222",
"pattern": "(((25[08])|(35[\\d])|(45[1-7])[\\d]{5}))",
"mobile": "(([2-4][0-46-9][\\d]{6}))",
},
"MS": {
"code": "1",
"pattern": "((6644(1[0-3])|(91)[\\d]{4}))",
"mobile": "((664(3(49)|(9[1-6]))|(49[2-6])[\\d]{4}))",
},
"MT": {
"code": "356",
"pattern": "((20(3[1-4])|(6[059])[\\d]{4})|(2(0[19])|([1-357][\\d])|(60)[\\d]{5}))",
"mobile": "(((7(210)|([79][\\d][\\d]))|(9([29][\\d][\\d])|(69[67])|(8(1[1-3])|(89)|(97)))[\\d]{4}))",
},
"MU": {
"code": "230",
"pattern": "(((2([0346-8][\\d])|(1[0-7]))|(4([013568][\\d])|(2[4-7]))|(54([3-5][\\d])|(71))|(6[\\d][\\d])|(8(14)|(3[129]))[\\d]{4}))",
"mobile": "((5(4(2[1-389])|(7[1-9]))|(87[15-8])[\\d]{4})|(5(2[5-9])|(4[3-689])|([57][\\d])|(8[0-689])|(9[0-8])[\\d]{5}))",
},
"MV": {
"code": "960",
"pattern": "(((3(0[0-3])|(3[0-59]))|(6([57][02468])|(6[024-68])|(8[024689]))[\\d]{4}))",
"mobile": "((46[46][\\d]{4})|((7[\\d])|(9[13-9])[\\d]{5}))",
},
"MW": {
"code": "265",
"pattern": "(((1[2-9])|(2[12][\\d][\\d])[\\d]{5}))",
"mobile": "((111[\\d]{6})|((31)|(77)|(88)|(9[89])[\\d]{7}))",
},
"MX": {
"code": "52",
"pattern": "((6571[\\d]{6})|((2(0[01])|(2[1-9])|(3[1-35-8])|(4[13-9])|(7[1-689])|(8[1-578])|(9[467]))|(3(1[1-79])|([2458][1-9])|(3[\\d])|(7[1-8])|(9[1-5]))|(4(1[1-57-9])|([25-7][1-9])|(3[1-8])|(4[\\d])|(8[1-35-9])|(9[2-689]))|(5([56][\\d])|(88)|(9[1-79]))|(6(1[2-68])|([2-4][1-9])|(5[1-3689])|(6[1-57-9])|(7[1-7])|(8[67])|(9[4-8]))|(7([1-467][1-9])|(5[13-9])|(8[1-69])|(9[17]))|(8(1[\\d])|(2[13-689])|(3[1-6])|(4[124-6])|(6[1246-9])|(7[1-378])|(9[12479]))|(9(1[346-9])|(2[1-4])|(3[2-46-8])|(5[1348])|(6[1-9])|(7[12])|(8[1-8])|(9[\\d]))[\\d]{7}))",
"mobile": "((6571[\\d]{6})|((1(2(2[1-9])|(3[1-35-8])|(4[13-9])|(7[1-689])|(8[1-578])|(9[467]))|(3(1[1-79])|([2458][1-9])|(3[\\d])|(7[1-8])|(9[1-5]))|(4(1[1-57-9])|([24-7][1-9])|(3[1-8])|(8[1-35-9])|(9[2-689]))|(5([56][\\d])|(88)|(9[1-79]))|(6(1[2-68])|([2-4][1-9])|(5[1-3689])|(6[1-57-9])|(7[1-7])|(8[67])|(9[4-8]))|(7([1-467][1-9])|(5[13-9])|(8[1-69])|(9[17]))|(8(1[\\d])|(2[13-689])|(3[1-6])|(4[124-6])|(6[1246-9])|(7[1-378])|(9[12479]))|(9(1[346-9])|(2[1-4])|(3[2-46-8])|(5[1348])|([69][1-9])|(7[12])|(8[1-8])))|(2(2[1-9])|(3[1-35-8])|(4[13-9])|(7[1-689])|(8[1-578])|(9[467]))|(3(1[1-79])|([2458][1-9])|(3[\\d])|(7[1-8])|(9[1-5]))|(4(1[1-57-9])|([25-7][1-9])|(3[1-8])|(4[\\d])|(8[1-35-9])|(9[2-689]))|(5([56][\\d])|(88)|(9[1-79]))|(6(1[2-68])|([2-4][1-9])|(5[1-3689])|(6[1-57-9])|(7[1-7])|(8[67])|(9[4-8]))|(7([1-467][1-9])|(5[13-9])|(8[1-69])|(9[17]))|(8(1[\\d])|(2[13-689])|(3[1-6])|(4[124-6])|(6[1246-9])|(7[1-378])|(9[12479]))|(9(1[346-9])|(2[1-4])|(3[2-46-8])|(5[1348])|(6[1-9])|(7[12])|(8[1-8])|(9[\\d]))[\\d]{7}))",
},
"MY": {
"code": "60",
"pattern": "(((3(2[0-36-9])|(3[0-368])|(4[0-278])|(5[0-24-8])|(6[0-467])|(7[1246-9])|(8[\\d])|(9[0-57])[\\d])|(4(2[0-689])|([3-79][\\d])|(8[1-35689]))|(5(2[0-589])|([3468][\\d])|(5[0-489])|(7[1-9])|(9[23]))|(6(2[2-9])|(3[1357-9])|([46][\\d])|(5[0-6])|(7[0-35-9])|(85)|(9[015-8]))|(7([2579][\\d])|(3[03-68])|(4[0-8])|(6[5-9])|(8[0-35-9]))|(8([24][2-8])|(3[2-5])|(5[2-7])|(6[2-589])|(7[2-578])|([89][2-9]))|(9(0[57])|(13)|([25-7][\\d])|([3489][0-8]))[\\d]{5}))",
"mobile": "((1(1888[69])|(4400)|(8(47)|(8[27])[0-4])[\\d]{4})|(1(0([23568][\\d])|(4[0-6])|(7[016-9])|(9[0-8]))|(1([1-5][\\d][\\d])|(6(0[5-9])|([1-9][\\d]))|(7([0134][\\d])|(2[1-9])|(5[0-6])))|((([269])|(59)[\\d])|([37][1-9])|(4[235-9])[\\d])|(8(1[23])|([236][\\d])|(4[06])|(5[7-9])|(7[016-9])|(8[01])|(9[0-8]))[\\d]{5}))",
},
"MZ": {
"code": "258",
"pattern": "((2([1346][\\d])|(5[0-2])|([78][12])|(93)[\\d]{5}))",
"mobile": "((8[2-79][\\d]{7}))",
},
"NA": {
"code": "264",
"pattern": "((64426[\\d]{3})|(6(1(2[2-7])|(3[01378])|(4[0-4]))|(254)|(32[0237])|(4(27)|(41)|(5[25]))|(52[236-8])|(626)|(7(2[2-4])|(30))[\\d]{4:5})|(6(1((0[\\d])|(2[0189])|(3[24-69])|(4[5-9])[\\d])|(17)|(69)|(7[014]))|(2(17)|(5[0-36-8])|(69)|(70))|(3(17)|(2[14-689])|(34)|(6[289])|(7[01])|(81))|(4(17)|(2[0-2])|(4[06])|(5[0137])|(69)|(7[01]))|(5(17)|(2[0459])|(69)|(7[01]))|(6(17)|(25)|(38)|(42)|(69)|(7[01]))|(7(17)|(2[569])|(3[13])|(6[89])|(7[01]))[\\d]{4}))",
"mobile": "(((60)|(8[1245])[\\d]{7}))",
},
"NC": {
"code": "687",
"pattern": "(((2[03-9])|(3[0-5])|(4[1-7])|(88)[\\d]{4}))",
"mobile": "(((5[0-4])|([79][\\d])|(8[0-79])[\\d]{4}))",
},
"NE": {
"code": "227",
"pattern": "((2(0(20)|(3[1-8])|(4[13-5])|(5[14])|(6[14578])|(7[1-578]))|(1(4[145])|(5[14])|(6[14-68])|(7[169])|(88))[\\d]{4}))",
"mobile": "(((23)|(7[04])|([89][\\d])[\\d]{6}))",
},
"NF": {
"code": "672",
"pattern": "(((1(06)|(17)|(28)|(39))|(3[0-2][\\d])[\\d]{3}))",
"mobile": "(((14)|(3[58])[\\d]{4}))",
},
"NG": {
"code": "234",
"pattern": "(((([1-356][\\d])|(4[02-8])|(8[2-9])[\\d])|(9(0[3-9])|([1-9][\\d]))[\\d]{5})|(7(0([013-689][\\d])|(2[0-24-9])[\\d]{3:4})|([1-79][\\d]{6}))|(([12][\\d])|(4[147])|(5[14579])|(6[1578])|(7[1-3578])[\\d]{5}))",
"mobile": "(((702[0-24-9])|(8(01)|(19)[01])[\\d]{6})|((70[13-689])|(8(0[2-9])|(1[0-8]))|(9(0[1-9])|(1[2356]))[\\d]{7}))",
},
"NI": {
"code": "505",
"pattern": "((2[\\d]{7}))",
"mobile": "(((5(5[0-7])|([78][\\d]))|(6(20)|(3[035])|(4[045])|(5[05])|(77)|(8[1-9])|(9[059]))|((7[5-8])|(8[\\d])[\\d])[\\d]{5}))",
},
"NL": {
"code": "31",
"pattern": "(((1([035][\\d])|(1[13-578])|(6[124-8])|(7[24])|(8[0-467]))|(2([0346][\\d])|(2[2-46-9])|(5[125])|(9[479]))|(3([03568][\\d])|(1[3-8])|(2[01])|(4[1-8]))|(4([0356][\\d])|(1[1-368])|(7[58])|(8[15-8])|(9[23579]))|(5([0358][\\d])|([19][1-9])|(2[1-57-9])|(4[13-8])|(6[126])|(7[0-3578]))|(7[\\d][\\d])[\\d]{6}))",
"mobile": "((6[1-58][\\d]{7}))",
},
"NO": {
"code": "47",
"pattern": "(((2[1-4])|(3[1-3578])|(5[1-35-7])|(6[1-4679])|(7[0-8])[\\d]{6}))",
"mobile": "(((4[015-8])|(59)|(9[\\d])[\\d]{6}))",
},
"NP": {
"code": "977",
"pattern": "(((1[0-6][\\d])|(99[02-6])[\\d]{5})|((2[13-79])|(3[135-8])|(4[146-9])|(5[135-7])|(6[13-9])|(7[15-9])|(8[1-46-9])|(9[1-7])[2-6][\\d]{5}))",
"mobile": "((9(6[0-3])|(7[245])|(8[0-24-68])[\\d]{7}))",
},
"NR": {
"code": "674",
"pattern": "((444[\\d]{4}))",
"mobile": "(((55[3-9])|(666)|(8[\\d][\\d])[\\d]{4}))",
},
"NU": {
"code": "683",
"pattern": "(([47][\\d]{3}))",
"mobile": "((888[4-9][\\d]{3}))",
},
"NZ": {
"code": "64",
"pattern": "((24099[\\d]{3})|((3[2-79])|([49][2-9])|(6[235-9])|(7[2-57-9])[\\d]{6}))",
"mobile": "((2[0-27-9][\\d]{7:8})|(21[\\d]{6}))",
},
"OM": {
"code": "968",
"pattern": "((2[2-6][\\d]{6}))",
"mobile": "((1505[\\d]{4})|((7([1289][\\d])|(7[0-4]))|(9(0[1-9])|([1-9][\\d]))[\\d]{5}))",
},
"PA": {
"code": "507",
"pattern": "(((1(0[\\d])|(1[479])|(2[37])|(3[0137])|(4[17])|(5[05])|(6[58])|(7[0167])|(8[258])|(9[1389]))|(2([0235-79][\\d])|(1[0-7])|(4[013-9])|(8[02-9]))|(3([089][\\d])|(1[0-7])|(2[0-5])|(33)|(4[0-79])|(5[0-35])|(6[068])|(7[0-8]))|(4(00)|(3[0-579])|(4[\\d])|(7[0-57-9]))|(5([01][\\d])|(2[0-7])|([56]0)|(79))|(7(0[09])|(2[0-26-8])|(3[03])|(4[04])|(5[05-9])|(6[056])|(7[0-24-9])|(8[5-9])|(90))|(8(09)|(2[89])|(3[\\d])|(4[0-24-689])|(5[014])|(8[02]))|(9(0[5-9])|(1[0135-8])|(2[036-9])|(3[35-79])|(40)|(5[0457-9])|(6[05-9])|(7[04-9])|(8[35-8])|(9[\\d]))[\\d]{4}))",
"mobile": "(((1[16]1)|(21[89])|(6[\\d]{3})|(8(1[01])|(7[23]))[\\d]{4}))",
},
"PE": {
"code": "51",
"pattern": "((((4[34])|(5[14])[0-8][\\d])|(7(173)|(3[0-8][\\d]))|(8(10[05689])|(6(0[06-9])|(1[6-9])|(29))|(7(0[569])|([56]0)))[\\d]{4})|((1[0-8])|(4[12])|(5[236])|(6[1-7])|(7[246])|(8[2-4])[\\d]{6}))",
"mobile": "((9[\\d]{8}))",
},
"PF": {
"code": "689",
"pattern": "((4(0[4-689])|(9[4-68])[\\d]{5}))",
"mobile": "((8[7-9][\\d]{6}))",
},
"PG": {
"code": "675",
"pattern": "((((3[0-2])|(4[257])|(5[34])|(9[78])[\\d])|(64[1-9])|(85[02-46-9])[\\d]{4}))",
"mobile": "(((7[\\d])|(8[18])[\\d]{6}))",
},
"PH": {
"code": "63",
"pattern": "((((2[3-8])|(3[2-68])|(4[2-9])|(5[2-6])|(6[2-58])|(7[24578])[\\d]{3})|(88(22[\\d][\\d])|(42))[\\d]{4})|((2)|(8[2-8][\\d][\\d])[\\d]{5}))",
"mobile": "(((8(1[37])|(9[5-8]))|(9(0[5-9])|(1[0-24-9])|([235-7][\\d])|(4[2-9])|(8[135-9])|(9[1-9]))[\\d]{7}))",
},
"PK": {
"code": "92",
"pattern": "((((21)|(42)[2-9])|(58[126])[\\d]{7})|((2[25])|(4[0146-9])|(5[1-35-7])|(6[1-8])|(7[14])|(8[16])|(91)[2-9][\\d]{6:7})|((2(3[2358])|(4[2-4])|(9[2-8]))|(45[3479])|(54[2-467])|(60[468])|(72[236])|(8(2[2-689])|(3[23578])|(4[3478])|(5[2356]))|(9(2[2-8])|(3[27-9])|(4[2-6])|(6[3569])|(9[25-8]))[2-9][\\d]{5:6}))",
"mobile": "((3([0-24][\\d])|(3[0-7])|(55)|(64)[\\d]{7}))",
},
"PL": {
"code": "48",
"pattern": "((47[\\d]{7})|((1[2-8])|(2[2-69])|(3[2-4])|(4[1-468])|(5[24-689])|(6[1-3578])|(7[14-7])|(8[1-79])|(9[145])([02-9][\\d]{6})|(1([0-8][\\d]{5})|(9[\\d]{3}([\\d]{2})?))))",
"mobile": "((21(1([145][\\d])|(3[1-5]))|(2[0-4][\\d])[\\d]{4})|((45)|(5[0137])|(6[069])|(7[2389])|(88)[\\d]{7}))",
},
"PM": {
"code": "508",
"pattern": "(((4[1-3])|(50)[\\d]{4}))",
"mobile": "(((4[02-4])|(5[056])[\\d]{4}))",
},
"PR": {
"code": "1",
"pattern": "(((787)|(939)[2-9][\\d]{6}))",
"mobile": "(((787)|(939)[2-9][\\d]{6}))",
},
"PS": {
"code": "970",
"pattern": "(((22[2-47-9])|(42[45])|(82[014-68])|(92[3569])[\\d]{5}))",
"mobile": "((5[69][\\d]{7}))",
},
"PT": {
"code": "351",
"pattern": "((2([12][\\d])|([35][1-689])|(4[1-59])|(6[1-35689])|(7[1-9])|(8[1-69])|(9[1256])[\\d]{6}))",
"mobile": "((6[0356]92(30)|(9[\\d])[\\d]{3})|(((16)|(6[0356])93)|(9([1-36][\\d][\\d])|(480))[\\d]{5}))",
},
"PW": {
"code": "680",
"pattern": "(((2(55)|(77))|(345)|(488)|(5(35)|(44)|(87))|(6(22)|(54)|(79))|(7(33)|(47))|(8(24)|(55)|(76))|(900)[\\d]{4}))",
"mobile": "((((46)|(83)[0-5])|(6[2-4689]0)[\\d]{4})|((45)|(77)|(88)[\\d]{5}))",
},
"PY": {
"code": "595",
"pattern": "((([26]1)|(3[289])|(4[1246-8])|(7[1-3])|(8[1-36])[\\d]{5:7})|((2(2[4-68])|([4-68][\\d])|(7[15])|(9[1-5]))|(3(18)|(3[167])|(4[2357])|(51)|([67][\\d]))|(4(3[12])|(5[13])|(9[1-47]))|(5([1-4][\\d])|(5[02-4]))|(6(3[1-3])|(44)|(7[1-8]))|(7(4[0-4])|(5[\\d])|(6[1-578])|(75)|(8[0-8]))|(858)[\\d]{5:6}))",
"mobile": "((9(51)|(6[129])|([78][1-6])|(9[1-5])[\\d]{6}))",
},
"QA": {
"code": "974",
"pattern": "((4141[\\d]{4})|((23)|(4[04])[\\d]{6}))",
"mobile": "(((2[89])|([35-7][\\d])[\\d]{6}))",
},
"RE": {
"code": "262",
"pattern": "((26(2[\\d][\\d])|(30[0-5])[\\d]{4}))",
"mobile": "(((69(2[\\d][\\d])|(3(0[0-46])|(1[013])|(2[0-2])|(3[0-39])|(4[\\d])|(5[0-5])|(6[0-6])|(7[0-27])|(8[0-8])|(9[0-479])))|(9769[\\d])[\\d]{4}))",
},
"RO": {
"code": "40",
"pattern": "(([23][13-6][\\d]{7})|((2(19[\\d])|([3-6][\\d]9))|(31[\\d][\\d])[\\d][\\d]))",
"mobile": "((7020[\\d]{5})|(7(0[013-9])|(1[0-3])|([2-7][\\d])|(8[03-8])|(9[019])[\\d]{6}))",
},
"RS": {
"code": "381",
"pattern": "(((11[1-9][\\d])|((2[389])|(39)(0[2-9])|([2-9][\\d]))[\\d]{3:8})|((1[02-9])|(2[0-24-7])|(3[0-8])[2-9][\\d]{4:9}))",
"mobile": "((6([0-689])|(7[\\d])[\\d]{6:7}))",
},
"RU": {
"code": "7",
"pattern": "(((3(0[12])|(4[1-35-79])|(5[1-3])|(65)|(8[1-58])|(9[0145]))|(4(01)|(1[1356])|(2[13467])|(7[1-5])|(8[1-7])|(9[1-689]))|(8(1[1-8])|(2[01])|(3[13-6])|(4[0-8])|(5[15])|(6[1-35-79])|(7[1-37-9]))[\\d]{7}))",
"mobile": "((9[\\d]{9}))",
},
"RW": {
"code": "250",
"pattern": "(((06)|(2[23568][\\d])[\\d]{6}))",
"mobile": "((7[2389][\\d]{7}))",
},
"SA": {
"code": "966",
"pattern": "((1(1[\\d])|(2[24-8])|(3[35-8])|(4[3-68])|(6[2-5])|(7[235-7])[\\d]{6}))",
"mobile": "((579[01][\\d]{5})|(5([013-689][\\d])|(7[0-35-8])[\\d]{6}))",
},
"SB": {
"code": "677",
"pattern": "(((1[4-79])|([23][\\d])|(4[0-2])|(5[03])|(6[0-37])[\\d]{3}))",
"mobile": "((48[\\d]{3})|(((7[1-9])|(8[4-9])[\\d])|(9(1[2-9])|(2[013-9])|(3[0-2])|([46][\\d])|(5[0-46-9])|(7[0-689])|(8[0-79])|(9[0-8]))[\\d]{4}))",
},
"SC": {
"code": "248",
"pattern": "((4[2-46][\\d]{5}))",
"mobile": "((2[125-8][\\d]{5}))",
},
"SD": {
"code": "249",
"pattern": "((1(5[\\d])|(8[35-7])[\\d]{6}))",
"mobile": "(((1[0-2])|(9[0-3569])[\\d]{7}))",
},
"SE": {
"code": "46",
"pattern": "(((([12][136])|(3[356])|(4[0246])|(6[03])|(8[\\d])[\\d])|(90[1-9])[\\d]{4:6})|((1(2[0-35])|(4[0-4])|(5[0-25-9])|(7[13-6])|([89][\\d]))|(2(2[0-7])|(4[0136-8])|(5[0138])|(7[018])|(8[01])|(9[0-57]))|(3(0[0-4])|(1[\\d])|(2[0-25])|(4[056])|(7[0-2])|(8[0-3])|(9[023]))|(4(1[013-8])|(3[0135])|(5[14-79])|(7[0-246-9])|(8[0156])|(9[0-689]))|(5(0[0-6])|([15][0-5])|(2[0-68])|(3[0-4])|(4[\\d])|(6[03-5])|(7[013])|(8[0-79])|(9[01]))|(6(1[1-3])|(2[0-4])|(4[02-57])|(5[0-37])|(6[0-3])|(7[0-2])|(8[0247])|(9[0-356]))|(9(1[0-68])|(2[\\d])|(3[02-5])|(4[0-3])|(5[0-4])|([68][01])|(7[0135-8]))[\\d]{5:6}))",
"mobile": "((7[02369][\\d]{7}))",
},
"SG": {
"code": "65",
"pattern": "((662[0-24-9][\\d]{4})|(6([0-578][\\d])|(6[013-57-9])|(9[0-35-9])[\\d]{5}))",
"mobile": "((8(051)|(95[0-2])[\\d]{4})|((8(0[1-4])|([1-8][\\d])|(9[0-4]))|(9[0-8][\\d])[\\d]{5}))",
},
"SH": {
"code": "290",
"pattern": "((2([0-57-9][\\d])|(6[4-9])[\\d][\\d]))",
"mobile": "(([56][\\d]{4}))",
},
"SI": {
"code": "386",
"pattern": "((([1-357][2-8])|(4[24-8])[\\d]{6}))",
"mobile": "((65(1[\\d])|(55)|([67]0)[\\d]{4})|(([37][01])|(4[0139])|(51)|(6[489])[\\d]{6}))",
},
"SJ": {
"code": "47",
"pattern": "((79[\\d]{6}))",
"mobile": "(((4[015-8])|(59)|(9[\\d])[\\d]{6}))",
},
"SK": {
"code": "421",
"pattern": "(((2(16)|([2-9][\\d]{3}))|((([3-5][1-8][\\d])|(819)[\\d])|(601[1-5])[\\d])[\\d]{4})|((2)|([3-5][1-8])1[67][\\d]{3})|([3-5][1-8]16[\\d][\\d]))",
"mobile": "((909[1-9][\\d]{5})|(9(0[1-8])|(1[0-24-9])|(4[03-57-9])|(5[\\d])[\\d]{6}))",
},
"SL": {
"code": "232",
"pattern": "((22[2-4][2-9][\\d]{4}))",
"mobile": "(((25)|(3[0-5])|(66)|(7[2-9])|(8[08])|(9[09])[\\d]{6}))",
},
"SM": {
"code": "378",
"pattern": "((0549(8[0157-9])|(9[\\d])[\\d]{4}))",
"mobile": "((6[16][\\d]{6}))",
},
"SN": {
"code": "221",
"pattern": "((3(0(1[0-2])|(80))|(282)|(3(8[1-9])|(9[3-9]))|(611)[\\d]{5}))",
"mobile": "((75(01)|([38]3)[\\d]{5})|(7([06-8][\\d])|(21)|(5[4-7])|(90)[\\d]{6}))",
},
"SO": {
"code": "252",
"pattern": "(((1[\\d])|(2[0-79])|(3[0-46-8])|(4[0-7])|(5[57-9])[\\d]{5})|(([134][\\d])|(8[125])[\\d]{4}))",
"mobile": "((((15)|((3[59])|(4[89])|(79)|(8[08])[\\d])|(6(0[5-7])|([1-9][\\d]))|(9(0[\\d])|([2-9]))[\\d])|(2(4[\\d])|(8))[\\d]{5})|((6[\\d])|(7[1-9])[\\d]{6}))",
},
"SR": {
"code": "597",
"pattern": "(((2[1-3])|(3[0-7])|((4)|(68)[\\d])|(5[2-58])[\\d]{4}))",
"mobile": "(((7[124-7])|(8[124-9])[\\d]{5}))",
},
"SS": {
"code": "211",
"pattern": "((1[89][\\d]{7}))",
"mobile": "(((12)|(9[1257-9])[\\d]{7}))",
},
"ST": {
"code": "239",
"pattern": "((22[\\d]{5}))",
"mobile": "((900[5-9][\\d]{3})|(9(0[1-9])|([89][\\d])[\\d]{4}))",
},
"SV": {
"code": "503",
"pattern": "((2([1-6][\\d]{3})|([79]90[034])|(890[0245])[\\d]{3}))",
"mobile": "((66([02-9][\\d][\\d])|(1([02-9][\\d])|(16))[\\d]{3})|((6[0-57-9])|(7[\\d])[\\d]{6}))",
},
"SX": {
"code": "1",
"pattern": "((7215(4[2-8])|(8[239])|(9[056])[\\d]{4}))",
"mobile": "((7215(1[02])|(2[\\d])|(5[034679])|(8[014-8])[\\d]{4}))",
},
"SY": {
"code": "963",
"pattern": "((21[\\d]{6:7})|((1([14][\\d])|([2356]))|(2[235])|(3([13][\\d])|(4))|(4[134])|(5[1-3])[\\d]{6}))",
"mobile": "((9(22)|([3-689][\\d])[\\d]{6}))",
},
"SZ": {
"code": "268",
"pattern": "(([23][2-5][\\d]{6}))",
"mobile": "((7[6-9][\\d]{6}))",
},
"TA": {"code": "290", "pattern": "((8[\\d]{3}))"},
"TC": {
"code": "1",
"pattern": "((649(266)|(712)|(9(4[\\d])|(50))[\\d]{4}))",
"mobile": "((649(2(3[129])|(4[1-79]))|(3[\\d][\\d])|(4[34][1-3])[\\d]{4}))",
},
"TD": {
"code": "235",
"pattern": "((22([37-9]0)|(5[0-5])|(6[89])[\\d]{4}))",
"mobile": "(((6[023568])|(77)|(9[\\d])[\\d]{6}))",
},
"TG": {
"code": "228",
"pattern": "((2(2[2-7])|(3[23])|(4[45])|(55)|(6[67])|(77)[\\d]{5}))",
"mobile": "(((7[09])|(9[0-36-9])[\\d]{6}))",
},
"TH": {
"code": "66",
"pattern": "(((1[0689])|(2[\\d])|(3[2-9])|(4[2-5])|(5[2-6])|(7[3-7])[\\d]{6}))",
"mobile": "((671[0-8][\\d]{5})|((14)|(6[1-6])|([89][\\d])[\\d]{7}))",
},
"TJ": {
"code": "992",
"pattern": "(((3(1[3-5])|(2[245])|(3[12])|(4[24-7])|(5[25])|(72))|(4(46)|(74)|(87))[\\d]{6}))",
"mobile": "((41[18][\\d]{6})|(([034]0)|([17][017])|(2[02])|(5[05])|(8[08])|(9[\\d])[\\d]{7}))",
},
"TK": {
"code": "690",
"pattern": "(((2[2-4])|([34][\\d])[\\d]{2:5}))",
"mobile": "((7[2-4][\\d]{2:5}))",
},
"TL": {
"code": "670",
"pattern": "(((2[1-5])|(3[1-9])|(4[1-4])[\\d]{5}))",
"mobile": "((7[2-8][\\d]{6}))",
},
"TM": {
"code": "993",
"pattern": "(((1(2[\\d])|(3[1-9]))|(2(22)|(4[0-35-8]))|(3(22)|(4[03-9]))|(4(22)|(3[128])|(4[\\d])|(6[15]))|(5(22)|(5[7-9])|(6[014-689]))[\\d]{5}))",
"mobile": "((6[\\d]{7}))",
},
"TN": {
"code": "216",
"pattern": "((81200[\\d]{3})|((3[0-2])|(7[\\d])[\\d]{6}))",
"mobile": "((3(001)|([12]40)[\\d]{4})|((([259][\\d])|(4[0-7])[\\d])|(3(1[1-35])|(6[0-4])|(91))[\\d]{5}))",
},
"TO": {
"code": "676",
"pattern": "(((2[\\d])|(3[0-8])|(4[0-4])|(50)|(6[09])|(7[0-24-69])|(8[05])[\\d]{3}))",
"mobile": "(((55[4-6])|(6([09][\\d])|(3[02])|(8[15-9]))|((7[\\d])|(8[46-9])[\\d])|(999)[\\d]{4}))",
},
"TR": {
"code": "90",
"pattern": "(((2([13][26])|([28][2468])|([45][268])|([67][246]))|(3([13][28])|([24-6][2468])|([78][02468])|(92))|(4([16][246])|([23578][2468])|(4[26]))[\\d]{7}))",
"mobile": "((56161[\\d]{5})|(5(0[15-7])|(1[06])|(24)|([34][\\d])|(5[1-59])|(9[46])[\\d]{7}))",
},
"TT": {
"code": "1",
"pattern": "((868(2(0[13])|(1[89])|([23][\\d])|(4[0-2]))|(6(0[7-9])|(1[02-8])|(2[1-9])|([3-69][\\d])|(7[0-79]))|(82[124])[\\d]{4}))",
"mobile": "((868((2[5-9])|(3[\\d])[\\d])|(4(3[0-6])|([6-9][\\d]))|(6(20)|(78)|(8[\\d]))|(7(0[1-9])|(1[02-9])|([2-9][\\d]))[\\d]{4}))",
},
"TV": {
"code": "688",
"pattern": "((2[02-9][\\d]{3}))",
"mobile": "(((7[01][\\d])|(90)[\\d]{4}))",
},
"TW": {
"code": "886",
"pattern": "(((2[2-8][\\d])|(370)|(55[01])|(7[1-9])[\\d]{6})|(4((0(0[1-9])|([2-48][\\d]))|(1[023][\\d])[\\d]{4:5})|(([239][\\d][\\d])|(4(0[56])|(12)|(49))[\\d]{5}))|(6([01][\\d]{7})|(4(0[56])|(12)|(24)|(4[09])[\\d]{4:5}))|(8((2(3[\\d])|(4[0-269])|([578]0)|(66))|(36[24-9])|(90[\\d][\\d])[\\d]{4})|(4(0[56])|(12)|(24)|(4[09])[\\d]{4:5}))|((2(2(0[\\d][\\d])|(4(0[68])|([249]0)|(3[0-467])|(5[0-25-9])|(6[0235689])))|((3([09][\\d])|(1[0-4]))|((4[\\d])|(5[0-49])|(6[0-29])|(7[0-5])[\\d])[\\d]))|(((3[2-9])|(5[2-8])|(6[0-35-79])|(8[7-9])[\\d][\\d])|(4(2([089][\\d])|(7[1-9]))|((3[0-4])|([78][\\d])|(9[01])[\\d]))[\\d])[\\d]{3}))",
"mobile": "(((40001[0-2])|(9[0-8][\\d]{4})[\\d]{3}))",
},
"TZ": {
"code": "255",
"pattern": "((2[2-8][\\d]{7}))",
"mobile": "((77[2-9][\\d]{6})|((6[1-9])|(7[1-689])[\\d]{7}))",
},
"UA": {
"code": "380",
"pattern": "(((3[1-8])|(4[13-8])|(5[1-7])|(6[12459])[\\d]{7}))",
"mobile": "(((50)|(6[36-8])|(7[1-3])|(9[1-9])[\\d]{7}))",
},
"UG": {
"code": "256",
"pattern": "((20(((24)|(81)0)|(30[67])[\\d])|(6(00[0-2])|(30[0-4]))[\\d]{3})|((20([0147][\\d])|(2[5-9])|(32)|(5[0-4])|(6[15-9]))|([34][\\d]{3})[\\d]{5}))",
"mobile": "((726[01][\\d]{5})|(7([0157-9][\\d])|(20)|(36)|([46][0-4])[\\d]{6}))",
},
"US": {
"code": "1",
"pattern": "((5(05([2-57-9][\\d][\\d])|(6([0-35-9][\\d])|(44)))|(82(2(0[0-3])|([268]2))|(3(0[02])|(22)|(33))|(4(00)|(4[24])|(65)|(82))|(5(00)|(29)|(58)|(83))|(6(00)|(66)|(82))|(7(58)|(77))|(8(00)|(42)|(88))|(9(00)|(9[89])))[\\d]{4})|((2(0[1-35-9])|(1[02-9])|(2[03-589])|(3[149])|(4[08])|(5[1-46])|(6[0279])|(7[0269])|(8[13]))|(3(0[1-57-9])|(1[02-9])|(2[01356])|(3[0-24679])|(4[167])|(5[12])|(6[014])|(8[056]))|(4(0[124-9])|(1[02-579])|(2[3-5])|(3[0245])|(4[023578])|(58)|(6[349])|(7[0589])|(8[04]))|(5(0[1-47-9])|(1[0235-8])|(20)|(3[0149])|(4[01])|(5[19])|(6[1-47])|(7[0-5])|(8[056]))|(6(0[1-35-9])|(1[024-9])|(2[03689])|([34][016])|(5[0179])|(6[0-279])|(78)|(8[0-29]))|(7(0[1-46-8])|(1[2-9])|(2[04-7])|(3[1247])|(4[037])|(5[47])|(6[02359])|(7[0-59])|(8[156]))|(8(0[1-68])|(1[02-8])|(2[08])|(3[0-289])|(4[03578])|(5[046-9])|(6[02-5])|(7[028]))|(9(0[1346-9])|(1[02-9])|(2[0589])|(3[0146-8])|(4[01579])|(5[12469])|(7[0-389])|(8[04-69]))[2-9][\\d]{6}))",
"mobile": "((5(05([2-57-9][\\d][\\d])|(6([0-35-9][\\d])|(44)))|(82(2(0[0-3])|([268]2))|(3(0[02])|(22)|(33))|(4(00)|(4[24])|(65)|(82))|(5(00)|(29)|(58)|(83))|(6(00)|(66)|(82))|(7(58)|(77))|(8(00)|(42)|(88))|(9(00)|(9[89])))[\\d]{4})|((2(0[1-35-9])|(1[02-9])|(2[03-589])|(3[149])|(4[08])|(5[1-46])|(6[0279])|(7[0269])|(8[13]))|(3(0[1-57-9])|(1[02-9])|(2[01356])|(3[0-24679])|(4[167])|(5[12])|(6[014])|(8[056]))|(4(0[124-9])|(1[02-579])|(2[3-5])|(3[0245])|(4[023578])|(58)|(6[349])|(7[0589])|(8[04]))|(5(0[1-47-9])|(1[0235-8])|(20)|(3[0149])|(4[01])|(5[19])|(6[1-47])|(7[0-5])|(8[056]))|(6(0[1-35-9])|(1[024-9])|(2[03689])|([34][016])|(5[0179])|(6[0-279])|(78)|(8[0-29]))|(7(0[1-46-8])|(1[2-9])|(2[04-7])|(3[1247])|(4[037])|(5[47])|(6[02359])|(7[0-59])|(8[156]))|(8(0[1-68])|(1[02-8])|(2[08])|(3[0-289])|(4[03578])|(5[046-9])|(6[02-5])|(7[028]))|(9(0[1346-9])|(1[02-9])|(2[0589])|(3[0146-8])|(4[01579])|(5[12469])|(7[0-389])|(8[04-69]))[2-9][\\d]{6}))",
},
"UY": {
"code": "598",
"pattern": "(((1(770)|(987))|((2[\\d])|(4[2-7])[\\d][\\d])[\\d]{4}))",
"mobile": "((9[1-9][\\d]{6}))",
},
"UZ": {
"code": "998",
"pattern": "(((6(1(22)|(3[124])|(4[1-4])|(5[1-3578])|(64))|(2(22)|(3[0-57-9])|(41))|(5(22)|(3[3-7])|(5[024-8]))|(6[\\d][\\d])|(7([23][\\d])|(7[69]))|(9(22)|(4[1-8])|(6[135])))|(7(0(5[4-9])|(6[0146])|(7[124-6])|(9[135-8]))|((1[12])|(8[\\d])[\\d])|(2(22)|(3[13-57-9])|(4[1-3579])|(5[14]))|(3(2[\\d])|(3[1578])|(4[1-35-7])|(5[1-57])|(61))|(4(2[\\d])|(3[1-579])|(7[1-79]))|(5(22)|(5[1-9])|(6[1457]))|(6(22)|(3[12457])|(4[13-8]))|(9(22)|(5[1-9])))[\\d]{5}))",
"mobile": "((((33)|(88)|(9[0-57-9])[\\d]{3})|(55(50[013])|(90[\\d]))|(6(1(2(2[01])|(98))|(35[0-4])|(50[\\d])|(61[23])|(7([01][017])|(4[\\d])|(55)|(9[5-9])))|(2((11)|(7[\\d])[\\d])|(2([12]1)|(9[01379]))|(5([126][\\d])|(3[0-4])))|(5(19[01])|(2(27)|(9[26]))|((30)|(59)|(7[\\d])[\\d]))|(6(2(1[5-9])|(2[0367])|(38)|(41)|(52)|(60))|((3[79])|(9[0-3])[\\d])|(4(56)|(83))|(7([07][\\d])|(1[017])|(3[07])|(4[047])|(5[057])|(67)|(8[0178])|(9[79])))|(7(2(24)|(3[237])|(4[5-9])|(7[15-8]))|(5(7[12])|(8[0589]))|(7(0[\\d])|([39][07]))|(9(0[\\d])|(7[079])))|(9(2(1[1267])|(3[01])|(5[\\d])|(7[0-4]))|((5[67])|(7[\\d])[\\d])|(6(2[0-26])|(8[\\d]))))|(7([07][\\d]{3})|(1(13[01])|(6(0[47])|(1[67])|(66))|(71[3-69])|(98[\\d]))|(2(2(2[79])|(95))|(3(2[5-9])|(6[0-6]))|(57[\\d])|(7(0[\\d])|(1[17])|(2[27])|(3[37])|(44)|(5[057])|(66)|(88)))|(3(2(1[0-6])|(21)|(3[469])|(7[159]))|((33)|(9[4-6])[\\d])|(5(0[0-4])|(5[579])|(9[\\d]))|(7([0-3579][\\d])|(4[0467])|(6[67])|(8[078])))|(4(2(29)|(5[0257])|(6[0-7])|(7[1-57]))|(5(1[0-4])|(8[\\d])|(9[5-9]))|(7(0[\\d])|(1[024589])|(2[0-27])|(3[0137])|([46][07])|(5[01])|(7[5-9])|(9[079]))|(9(7[015-9])|([89][\\d])))|(5(112)|(2(0[\\d])|(2[29])|([49]4))|(3[1568][\\d])|(52[6-9])|(7(0[01578])|(1[017])|([23]7)|(4[047])|([5-7][\\d])|(8[78])|(9[079])))|(6(2(2[1245])|(4[2-4]))|(39[\\d])|(41[179])|(5([349][\\d])|(5[0-2]))|(7(0[017])|([13][\\d])|(22)|(44)|(55)|(67)|(88)))|(9(22[128])|(3(2[0-4])|(7[\\d]))|(57[02569])|(7(2[05-9])|(3[37])|(4[\\d])|(60)|(7[2579])|(87)|(9[07]))))[\\d]{4}))",
},
"VA": {
"code": "39",
"pattern": "((06698[\\d]{1:6}))",
"mobile": "((3[1-9][\\d]{8})|(3[2-9][\\d]{7}))",
},
"VC": {
"code": "1",
"pattern": "((784(266)|(3(6[6-9])|(7[\\d])|(8[0-6]))|(4(38)|(5[0-36-8])|(8[0-8]))|(5(55)|(7[0-2])|(93))|(638)|(784)[\\d]{4}))",
"mobile": "((784(4(3[0-5])|(5[45])|(89)|(9[0-8]))|(5(2[6-9])|(3[0-4]))|(720)[\\d]{4}))",
},
"VE": {
"code": "58",
"pattern": "(((2(12)|(3[457-9])|([467][\\d])|([58][1-9])|(9[1-6]))|([4-6]00)[\\d]{7}))",
"mobile": "((4(1[24-8])|(2[46])[\\d]{7}))",
},
"VG": {
"code": "1",
"pattern": "((284496[0-5][\\d]{3})|(284(229)|(4(22)|(9[45]))|(774)|(8(52)|(6[459]))[\\d]{4}))",
"mobile": "((284496[6-9][\\d]{3})|(284(245)|(3(0[0-3])|(4[0-7])|(68)|(9[34]))|(4(4[0-6])|(68)|(99))|(5(4[0-7])|(68)|(9[69]))[\\d]{4}))",
},
"VI": {
"code": "1",
"pattern": "((340(2(0[0-38])|(2[06-8])|(4[49])|(77))|(3(32)|(44))|(4(2[23])|(44)|(7[34])|(89))|(5(1[34])|(55))|(6(2[56])|(4[23])|(77)|(9[023]))|(7(1[2-57-9])|(2[57])|(7[\\d]))|(884)|(998)[\\d]{4}))",
"mobile": "((340(2(0[0-38])|(2[06-8])|(4[49])|(77))|(3(32)|(44))|(4(2[23])|(44)|(7[34])|(89))|(5(1[34])|(55))|(6(2[56])|(4[23])|(77)|(9[023]))|(7(1[2-57-9])|(2[57])|(7[\\d]))|(884)|(998)[\\d]{4}))",
},
"VN": {
"code": "84",
"pattern": "((2(0[3-9])|(1[0-689])|(2[0-25-9])|(3[2-9])|(4[2-8])|(5[124-9])|(6[0-39])|(7[0-7])|(8[2-79])|(9[0-4679])[\\d]{7}))",
"mobile": "(((5(2[238])|(59))|(89[689])|(99[013-9])[\\d]{6})|((3[\\d])|(5[689])|(7[06-9])|(8[1-8])|(9[0-8])[\\d]{7}))",
},
"VU": {
"code": "678",
"pattern": "(((38[0-8])|(48[4-9])[\\d][\\d])|((2[02-9])|(3[4-7])|(88)[\\d]{3}))",
"mobile": "((([58][\\d])|(7[013-7])[\\d]{5}))",
},
"WF": {
"code": "681",
"pattern": "((72[\\d]{4}))",
"mobile": "(((72)|(8[23])[\\d]{4}))",
},
"WS": {
"code": "685",
"pattern": "((6[1-9][\\d]{3})|(([2-5])|(60)[\\d]{4}))",
"mobile": "(((7[1-35-7])|(8([3-7])|(9[\\d]{3}))[\\d]{5}))",
},
"XK": {
"code": "383",
"pattern": "(((2[89])|(39)0[\\d]{6})|([23][89][\\d]{6}))",
"mobile": "((4[3-9][\\d]{6}))",
},
"YE": {
"code": "967",
"pattern": "((78[0-7][\\d]{4})|(17[\\d]{6})|(([12][2-68])|(3[2358])|(4[2-58])|(5[2-6])|(6[3-58])|(7[24-6])[\\d]{5}))",
"mobile": "((7[0137][\\d]{7}))",
},
"YT": {
"code": "262",
"pattern": "((269(0[67])|(5[0-3])|(6[\\d])|([78]0)[\\d]{4}))",
"mobile": "((639(0[0-79])|(1[019])|([267][\\d])|(3[09])|(40)|(5[05-9])|(9[04-79])[\\d]{4}))",
},
"ZA": {
"code": "27",
"pattern": "(((2(0330)|(4302))|(52087)0[\\d]{3})|((1[0-8])|(2[1-378])|(3[1-69])|(4[\\d])|(5[1346-8])[\\d]{7}))",
"mobile": "(((1(3492[0-25])|(4495[0235])|(549(20)|(5[01])))|(4[34]492[01])[\\d]{3})|(8[1-4][\\d]{3:7})|((2[27])|(47)|(54)4950[\\d]{3})|((1(049[2-4])|(9[12][\\d][\\d]))|((6[\\d])|(7[0-46-9])[\\d]{3})|(8(5[\\d]{3})|(7(08[67])|(158)|(28[5-9])|(310)))[\\d]{4})|((1[6-8])|(28)|(3[2-69])|(4[025689])|(5[36-8])4920[\\d]{3})|((12)|([2-5]1)492[\\d]{4}))",
},
"ZM": {
"code": "260",
"pattern": "((21[1-8][\\d]{6}))",
"mobile": "(((7[679])|(9[5-8])[\\d]{7}))",
},
"ZW": {
"code": "263",
"pattern": "(((1((3[\\d])|(9)[\\d])|([4-8]))|(2(((0(2[014])|(5))|((2[0157])|(31)|(84)|(9)[\\d][\\d])|([56]([14][\\d][\\d])|(20))|(7([089])|(2[03])|([35][\\d][\\d]))[\\d])|(4(2[\\d][\\d])|(8))[\\d])|(1(2)|([39][\\d]{4})))|(3((123)|((29[\\d])|(92)[\\d])[\\d][\\d])|(7([19])|([56][\\d])))|(5(0)|(1[2-478])|(26)|([37]2)|(4(2[\\d]{3})|(83))|(5(25[\\d][\\d])|([78]))|([689][\\d]))|(6(([16-8]21)|(28)|(52[013])[\\d][\\d])|([39]))|(8([1349]28)|(523)[\\d][\\d])[\\d]{3})|((4[\\d][\\d])|(9[2-9])[\\d]{4:5})|(((2(((0)|(8[146])[\\d])|(7[1-7])[\\d])|(2([278][\\d])|(92))|(58(2[\\d])|(3)))|(3([26])|(9[\\d]{3}))|(5(4[\\d])|(5)[\\d][\\d])[\\d])|(6((([0-246])|([78][\\d])[\\d])|(37)[\\d])|(5[2-8]))[\\d][\\d])|((2([569][\\d])|(8[2-57-9]))|(3([013-59][\\d])|(8[37]))|(6[89]8)[\\d]{3}))",
"mobile": "((7([178][\\d])|(3[1-9])[\\d]{6}))",
},
},
}
|
stack = []
def isEmpty(stack):
if stack == []:
return True
else:
return False
def push(stack):
item = int(input("enter value"))
stack.append(item)
top = len(stack)-1
def pop(stack):
if isEmpty(stack):
print("underflow")
else:
item=stack.pop()
if len(stack) == 0:
top = None
else:
top = len(stack)-1
print(item,"is deleted")
def peek(stack):
if isEmpty(stack):
print("stack empty")
else:
top = len(stack)-1
print(stack[top])
def display(stack):
if isEmpty(stack):
print("stack empty")
else:
top = len(stack)-1
for a in range(top,-1,-1):
print(stack[a])
while True:
menu = int(input('1.push\n 2.pop\n 3.peek\n 4.display'))
if menu == 1:
push(stack)
print("\n")
elif menu == 2:
pop(stack)
elif menu == 3:
peek(stack)
elif menu == 4:
display(stack)
else:
break
# credits Nishchal github ID(Nish251103) |
"""515 · Paint House"""
class Solution:
"""
@param costs: n x 3 cost matrix
@return: An integer, the minimum cost to paint all houses
"""
def minCost(self, costs):
# write your code here
if not costs:
return 0
m = len(costs)
dp = [[0] * 3 for _ in range(m)]
dp[0] = costs[0]
for i in range(1, m):
dp[i][0] = costs[i][0] + min(dp[i - 1][1], dp[i - 1][2])
dp[i][1] = costs[i][1] + min(dp[i - 1][0], dp[i - 1][2])
dp[i][2] = costs[i][2] + min(dp[i - 1][0], dp[i - 1][1])
return min(dp[m - 1])
|
class PyVEXError(Exception):
pass
class SkipStatementsError(PyVEXError):
pass
#
# Exceptions and notifications that post-processors can raise
#
class LiftingException(Exception):
pass
class NeedStatementsNotification(LiftingException):
"""
A post-processor may raise a NeedStatementsNotification if it needs to work with statements, but the current IRSB
is generated without any statement available (skip_stmts=True). The lifter will re-lift the current block with
skip_stmts=False upon catching a NeedStatementsNotification, and re-run the post-processors.
It's worth noting that if a post-processor always raises this notification for every basic block without statements,
it will essentially disable the skipping statement optimization, and it is bad for performance (especially for
CFGFast, which heavily relies on this optimization). Post-processor authors are encouraged to at least filter the
IRSBs based on available properties (jumpkind, next, etc.). If a post-processor must work with statements for the
majority of IRSBs, the author should implement it in PyVEX in C for the sake of a better performance.
"""
pass
|
#coding: latin1
#< full
class CYKParser:
def __init__(self, P: "IList<(str, str) or (str)>", S: "str",
createMap: "IList<(str, str), int -> IMap<int, int, str>"=lambda P, n: dict()):
self.P, self.S = P, S
self.createMap = createMap
def accepts(self, x: "str") -> "bool":
n = len(x)
Pi = self.createMap(self.P, n)
for i in range(n):
for A in self.P:
Pi[i,i,A] = any(right[0] == x[i] for right in self.P[A] if len(right) == 1)
for l in range(1, n):
for i in range(0, n-l):
for A in self.P:
Pi[i,i+l,A] = any(Pi[i,k,right[0]] and Pi[k+1,i+l,right[1]]
for k in range(i,i+l) for right in self.P[A] if len(right) == 2)
return Pi[0,n-1,self.S]
#> full
#< tree
def parse_tree(self, x: "str") -> "ParseTree":
n = len(x)
Pi = self.createMap(self.P, n)
back = self.createMap(self.P, n)
for i in range(len(x)):
for A in self.P:
Pi[i,i,A], back[i,i,A] = False, None
for right in self.P[A]:
if len(right) == 1 and right[0] == x[i]:
Pi[i,i,A], back[i,i,A] = True, x[i]
break
for l in range(1, n):
for i in range(0, n-l):
for A in self.P:
Pi[i,i+l,A], back[i,i+l,A] = False, None
for right in self.P[A]:
if len(right) == 2:
for k in range(i,i+l):
if Pi[i,k,right[0]] and Pi[k+1,i+l,right[1]]:
Pi[i,i+l,A], back[i,i+l,A] = True, (k, right[0], right[1])
break
def backtrace(i, k: "int", A: "str") -> "ParseTree":
if len(back[i,k,A]) == 1: return back[i,k,A]
j, B_prime, C_prime = back[i,k,A]
return [A, backtrace(i,j,B_prime), backtrace(j+1,k,C_prime)]
return backtrace(0, n-1, self.S)
#> tree |
class Solution:
def moveZeroes(self, nums: List[int]) -> None:
z = 0
for i in range(1, len(nums)):
if nums[i] != 0 and nums[z] == 0:
nums[i], nums[z] = nums[z], nums[i]
if nums[z] != 0:
z += 1
|
#Victor Gabriel Castão da Cruz
#11911ECP004
#Função que analisará as sequências
def analise(matriz, C):
#Identificar quantidade de linhas e colunas
linhas = len(matriz)
colunas = len(matriz[0])
#Lista que armazenará a quantidade de palitos de tamanho equivalente ao índice da lista
comprimentos = [0]
#Laço para deixar a lista com X valores 0, onde X = colunas
for i in range(linhas):
comprimentos.append(0)
#Laço para analisar sequencias. Como a sequência é vertical, percorro todas as linhas de uma coluna para depois alterar a coluna
for c in range(colunas):
#Para cada coluna, minha sequência inicial tem tamanho 0
seq = 0
#Percorrendo os itens da coluna
for l in range(linhas):
#Caso seja 1, incremento no tamanho da minha sequência
if matriz[l][c] == 1:
seq += 1
#Se estiver na última linha, o tamanho da sequência atual deverá ser armazenado
if l == linhas-1:
comprimentos[seq] += 1
#Caso seja 0, armazeno a sequência encontrada até agora e depois zero seu valor novamente
else:
comprimentos[seq] += 1
seq = 0
#OBS: Embora sequências de tamanho 0 também sejam armazenadas (pela lógica do código), isso não irá interferir no resultado final
#Computar os resultados
resultado = 0
#Para cada tamanho maior ou igual a 0, somo em resultado a quantidade de sequências desse tamanho
for index in range(C, linhas+1):
resultado += comprimentos[index]
#Retorno o número correto de sequências maiores ou iguais a C
return resultado
#Os comandos serão executados caso o arquivo seja executado como script
if __name__ == "__main__":
#Como são vários parâmetros por linha, realizo a leitura como uma string
var = input()
#Crio uma lista com os parâmetros
var = var.split()
#Variáveis serão os itens da lista convertidos para int
P = int(var[0])
N = int(var[1])
C = int(var[2])
#Criação da matriz
mtx =[]
#Leitura da matriz
for i in range(N):
#Leio uma linha inteira da matriz
lst = input()
#Crio lista com os valores
lst = lst.split()
#Lista que irá para a matriz
lista = []
#Percorro a lista lida e adiciono seus valores convertidos para a lista que será adicionada à matriz
for item in lst:
lista.append(int(item))
#Matriz recebe uma linha inteira
mtx.append(lista)
#Chamo minha função de análise
resp = analise(mtx, C)
#Imprimir resposta
print(resp)
|
# problem 18
# Project Euler
__author__ = 'Libao Jin'
__date__ = 'July 17, 2015'
string = '''
75
95 64
17 47 82
18 35 87 10
20 04 82 47 65
19 01 23 75 03 34
88 02 77 73 07 63 67
99 65 04 28 06 16 70 92
41 41 26 56 83 40 80 70 33
41 48 72 33 47 32 37 16 94 29
53 71 44 65 25 43 91 52 97 51 14
70 11 33 28 77 73 17 78 39 68 17 57
91 71 52 38 17 14 91 43 58 50 27 29 48
63 66 04 68 89 53 67 30 73 16 69 87 40 31
04 62 98 27 23 09 70 98 73 93 38 53 60 04 23
'''
def string2triangle(string):
string = string[1:-1]
string = string.split('\n')
triangle = []
for s in string:
substrings = s.split(' ')
integers = []
for ss in substrings:
integers.append(int(ss))
triangle.append(integers)
return triangle
def size(triangle):
numberOfRows = len(triangle)
numberOfColsMax = len(triangle[-1])
return (numberOfRows, numberOfColsMax)
def accumulateSum(numberList):
newNumberList = []
for i,e in enumerate(numberList):
newNumberList.append(sum(numberList[0:i]))
return newNumberList
def recursiveGen(n):
directions = [0,1]
if n == 1:
return [[0]]
#if n == 2:
#routes = []
#newRoutes = []
#for i in range(len(directions)):
#route = routes.copy()
#newRoutes.append(route)
#for i,e in enumerate(newRoutes):
#e.append(directions[i])
#return newRoutes
else:
routes = recursiveGen(n-1)
newRoutes = []
for i in routes:
for j in directions:
route = i.copy()
route.append(j)
newRoutes.append(route)
return newRoutes
def bruteForce(triangle):
sizeTriangle = size(triangle)
routes = recursiveGen(sizeTriangle[0])
for i,e in enumerate(routes):
routes[i] = accumulateSum(e)
Sum = []
maxIndex = -1
for i in routes:
tmp = 0
for j in range(sizeTriangle[0]):
tmp += triangle[j][i[j]]
Sum.append(tmp)
maxSum = max(Sum)
for i,e in enumerate(Sum):
if e == maxSum:
maxIndex = i
bestRoute = routes[maxIndex]
bestNumbers = []
for i in range(sizeTriangle[0]):
bestNumbers.append(triangle[i][bestRoute[i]])
return (maxSum, bestRoute, bestNumbers)
def solution():
triangle = string2triangle(string)
print(bruteForce(triangle))
def test():
triangle = string2triangle(string)
print(triangle)
sizeTriangle = size(triangle)
print(sizeTriangle)
allRoutes = recursiveGen(7)
print(allRoutes)
solution()
|
class MockCache(object):
"""
Simple cache to use for mocking Memcached
"""
def __init__(self):
super(MockCache, self).__init__()
self._cache = {}
def set(self, k, v):
self._cache[k] = v
return True
def get(self, k, default=None):
return self._cache.get(k, default)
def delete(self, k):
if k in self._cache:
del self._cache[k]
return True
def set_many(self, items):
for k, v in items.iteritems():
self.set(k, v)
return True
def delete_many(self, items):
for k in items:
self.delete(k)
return True
|
# File: T (Python 2.4)
SKY_OFF = 0
SKY_LAST = 1
SKY_DAWN = 2
SKY_DAY = 3
SKY_DUSK = 4
SKY_NIGHT = 5
SKY_STARS = 6
SKY_HALLOWEEN = 7
SKY_SWAMP = 8
SKY_INVASION = 9
SKY_OVERCAST = 10
SKY_OVERCASTNIGHT = 11
SKY_CODES = {
SKY_OFF: 'SKY_OFF',
SKY_LAST: 'SKY_LAST',
SKY_DAWN: 'SKY_DAWN',
SKY_DAY: 'SKY_DAY',
SKY_DUSK: 'SKY_DUSK',
SKY_NIGHT: 'SKY_NIGHT',
SKY_STARS: 'SKY_STARS',
SKY_HALLOWEEN: 'SKY_HALLOWEEN',
SKY_SWAMP: 'SKY_SWAMP',
SKY_OVERCAST: 'SKY_OVERCAST',
SKY_OVERCASTNIGHT: 'SKY_OVERCASTNIGHT',
SKY_INVASION: 'SKY_INVASION' }
TOD_ALL_CYCLE = 0
TOD_REGULAR_CYCLE = 1
TOD_HALLOWEEN_CYCLE = 2
TOD_JOLLYCURSE_CYCLE = 3
TOD_JOLLYINVASION_CYCLE = 4
TOD_NORMAL2JOLLY_CYCLE = 5
TOD_JOLLY2NIGHT_CYCLE = 6
TOD_VALENTINE_CYCLE = 7
ENV_DEFAULT = 0
ENV_OFF = 1
ENV_OPENSKY = 2
ENV_FOREST = 3
ENV_SWAMP = 4
ENV_CAVE = 5
ENV_LAVACAVE = 6
ENV_INTERIOR = 7
ENV_AVATARCHOOSER = 8
ENV_SAILING = 9
ENV_CANNONGAME = 10
ENV_CLOUDY = 11
ENV_INVASION = 12
ENV_HALLOWEEN = 13
ENV_VALENTINES = 14
ENV_CURSED_NIGHT = 15
ENV_EVER_NIGHT = 16
ENV_NO_HOLIDAY = 17
ENV_SAINT_PATRICKS = 18
ENV_DATAFILE = 255
FOG_OFF = 0
FOG_EXP = 1
FOG_LINEAR = 2
FOG_CODES = {
FOG_OFF: 'FOG_OFF',
FOG_EXP: 'FOG_EXP',
FOG_LINEAR: 'FOG_LINEAR' }
|
LANG_LABEL_TO_SV = {
"Swedish": "svenska",
"Finland Swedish": "finlandssvenska",
"Somali": "somaliska",
"Faroese": "färöiska",
"Old Norse": "fornnordiska",
"Belarussian": "vitryska",
"Bulgarian": "bulgariska",
"Croatian": "kroatiska",
"Czech": "tjeckiska",
"Danish": "danska",
"Danish": "danska",
"Dutch": "nederländska",
"English": "engelska",
"Esperanto": "esperanto",
"Estonian": "estniska",
"Finnish": "finska",
"French": "franska",
"German": "tyska",
"Greek": "grekiska",
"Hebrew": "hebreiska",
"Italian": "italienska",
"Japanese": "japanska",
"Latin": "latin",
"Latvian": "lettiska",
"Lithuanian": "litauiska",
"Lower Sorbian": "lågsorbiska",
"Macedonian": "makedonska",
"Maltese": "maltesiska",
"Molise Slavic": "moliseslaviska",
"Norwegian": "norska",
"Polish": "polska",
"Portuguese": "portugisiska",
"Romanian": "rumänska",
"Russian": "ryska",
"Serbian": "serbiska",
"Slovak": "slovakiska",
"Slovene": "slovenska",
"Spanish": "spanska",
"Turkmen": "turkmeniska",
"Ukrainian": "ukrainska",
"Upper Sorbian": "högsorbiska",
"Albanian": "albanska",
"Bosnian": "bosniska",
"Kurdish": "kurdiska",
"Persian": "persiska",
"Turkish": "turkiska"
}
def translate(label):
"""Translate an English language label into Swedish."""
return LANG_LABEL_TO_SV.get(label, "")
|
def main():
with open('triangles.txt') as f:
lines = f.read().splitlines()
counts = 0
for line in lines:
points = line.split(',')
points = [int(point) for point in points]
A = points[:2]
B = points[2:4]
C = points[4:]
P = (0, 0)
if area(A, B, C) == area(P, B, C) + area(P, A, C) + area(P, A, B):
counts += 1
print(counts)
def area(A, B, C):
return abs((A[0]-C[0]) * (B[1]-A[1]) - (A[0]-B[0]) * (C[1]-A[1]))
if __name__ == '__main__':
main() |
# All system and subsystem related data info
available_systems = ["ele", "mec"]
electric_subsystems = {
"bat": {"name": "Baterias", "worksheet_id": 447316715},
"pt": {"name": "Powertrain", "worksheet_id": 1129194817},
"hw": {"name": "Hardware", "worksheet_id": 1556464449},
"sw": {"name": "Software", "worksheet_id": 367184788},
}
mechanics_subsystem = {
"ch": {"name": "Chassi", "worksheet_id": 447316715},
"tr": {"name": "Transmissão", "worksheet_id": 447316715},
"aero": {"name": "Aerodinâmica", "worksheet_id": 447316715},
"susp": {"name": "Suspensão", "worksheet_id": 447316715},
"freio": {"name": "Freio", "worksheet_id": 447316715},
}
|
# SinglyLinkedListNode:
# int data
# SinglyLinkedListNode next
#
#
def findMergeNode(head1, head2):
# the data on the linked list nodes might not be unique
# we can't rely on just checking the data in each node
# as with any node-based data structure, each node is a unique
# region in memory
# the actual data on the merge point node is what we're going to return
# why a set? because sets are good at noting what we've seen already
# sets are good at holding unique things
# the linked lists kept track of the order of elements for us, so that
# the set didn't have to
# sets on their own do not keep track of the order in which elements
# are inserted
# Idea 1: if we're opting to not mutate list nodes
# Runtime: O(n + m) where n and m are the lengths of the two lists
# Space: O(n)
# we can use a set to keep track of nodes we've visited
# traverse one of the lists, adding each node to a visited set
# traverse the other list, checking to see if each node is in the set
# return the value of the first node in the second list that we find
# in the set
curr = head1
s = set()
while curr:
s.add(curr)
curr = curr.next
curr = head2
while curr:
if curr in s:
return curr.data
curr = curr.next
# Idea 2: If we allow mutation of the input
# Runtime: O(n + m) where n and m are the lengths of the two lists
# Space: O(1)
# traverse one of the lists, adding an attribute on each node to
# signify that we've seen this node before
# traverse the other list until we find the first node that has
# the attribute
# curr = head1
# while curr:
# curr.visited = True
# curr = curr.next
# curr = head2
# while curr:
# if hasattr(curr, 'visited'):
# return curr.data
# curr = curr.next |
test = {
'name': '',
'points': 1,
'suites': [
{
'cases': [
{
'code': r"""
>>> # Make sure your column labels are correct
>>> estimates.labels == ('min estimate', 'mean-based estimate')
True
""",
'hidden': False,
'locked': False
},
{
'code': r"""
>>> abs(14 - np.mean(estimates.column('min estimate'))) < .5
True
>>> abs(11.5 - np.mean(estimates.column('mean-based estimate'))) < .5
True
""",
'hidden': False,
'locked': False
}
],
'scored': True,
'setup': '',
'teardown': '',
'type': 'doctest'
}
]
}
|
# -*- coding: utf-8 -*-
r = range(0, 4) # 生成列表[0,1,2,3]
for x in r: # 利用for循环来访问
print(x)
print("List : ", list(range(0, 6, 2))) # 利用list()将range转为列表对象
print("Tuple : ", tuple(range(2, 9, 3))) # 利用tuple()将range转为元组对象
def func(i):
"""
:param i:
:return:
"""
return i * i
# 列表推导(List Comprehension)
sampleList1 = [1, 2, 3, 4]
print("new list: ", [func(x) for x in sampleList1]) # 使用列表解析产生新列表
print([elem * 2 for elem in sampleList1 if elem % 2 == 0]) # 列表中符合条件的元素翻倍
print("old list: ", sampleList1) # 原始列表保持不变
sampleList2 = ["AAA", "bbb", "CCC"]
print("new list: ", [x.lower() for x in sampleList2]) # 将所有的字符串变成小写
print("old list: ", sampleList2)
listOne = [1, 2, 3, 4, 5]
listTwo = [2 * i for i in listOne if i > 2] # 直接使用表达式;增加判断条件
print('list_1:', listOne)
print('list_2:', listTwo)
print('list_3:', [(x + 1, y + 1) for x in range(3) for y in listOne]) # 多个for循环嵌套
print('list_x:', [j for i in listOne for j in range(i * 2, 20, i)]) # 复杂示例
print(sum(i for i in range(1, 1000) if i % 3 == 0 or i % 5 == 0)) # 复杂示例:1000以内所有是3和5倍数的自然数之和
words = "this is a test!".split()
stuff = [[w.upper(), w.lower(), len(w)] for w in words] # 复杂示例
# stuff = map(lambda w: [w.upper(), w.lower(), len(w)], words) # 对应的map()实现
for i in stuff:
print(i)
# 列表生成(List Generation)
list_g = (func(x) for x in sampleList1)
print(type(list_g), list_g) # 对比查看类型信息
list_g2 = []
for i in list_g:
list_g2.append(i)
print(type(list_g2), list_g2) # 对比查看类型信息
# ### range()
# https://docs.python.org/3/library/functions.html#func-range
# 内置函数range()用来生成一个规律的整数序列,一般用在for循环中;
# 语法格式: range(start,end[,step]);
# start:起始下标(可选),默认为0;end:终止下标;step:步长(可选),默认为1;
# 特别注意:下标的实际有效范围是“前开后闭”的,也就是不包括终止下标的元素。
#
# 可以使用列表解析和生成表达式操作和处理一个序列(或其他的可迭代对象)来创建一个新的列表;
#
# ### 列表推导(List Comprehension)
# 也称为列表解析,是一种从其它列表来创建新列表的方式;
# 适用于根据旧表建立新表的场景(也就是必须对原列表的每一项就进行转换),有效减少代码数量;
# 列表解析表达式为:
# - [expr for iter_var in iterable]
# - [expr for iter_var in iterable if cond_expr]
# 如果表达式expr较为复杂,可以使用预先定义的function()
# 特别注意:
# - 列表解析可以转换为for循环或者map表达式;
# - 实现相同功能,列表解析的性能比map好,更为简单明了,for循环效率最差;
#
# ### 列表生成(List Generation)
# 当序列过长, 而每次只需要获取一个元素时,应当考虑使用生成器表达式;
# 列表生成器表达式为:
# - (expr for iter_var in iterable)
# - (expr for iter_var in iterable if cond_expr)
# 如果表达式expr较为复杂,可以使用预先定义的function();
# 特别注意:
# - 生成器表达式是被()括起来的,而不是[];
# - 生成器表达式使用“惰性计算”,并不真正创建列表,而是返回一个生成器,只有在检索时才被赋值;
# - 适用在列表较长而每次只需要获取一个元素的情况,节省内存;
#
# ### 其它
# 类似sorted()的方法是对整个列表的排序操作,不是针对列表中的单个数据项,因此不能在列表推导中使用;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.