content stringlengths 7 1.05M | fixed_cases stringlengths 1 1.28M |
|---|---|
def setData(field, value, path):
f = open(path, "r")
lines = f.readlines()
f.close()
f = open(path, "w+")
for line in lines:
if (line.find(field) != -1):
f.write(field + "=" + str(value) + "\n")
else:
f.write(line)
f.close()
return True
def getData(path):
f = open(path, "r")
lines = f.readlines()
f.close()
data = {}
for line in lines:
parts = line.split("=")
data[parts[0]] = parts[1].strip()
return data
def addData(field, value, path):
f = open(path, "a")
f.write(field + "=" + str(value) + "\n")
f.close()
return
def deleteData(field, value, path):
f = open(path, "r")
lines = f.readlines()
f.close()
f = open(path, "w+")
for line in lines:
if (line.find(field) == -1):
f.write(line)
f.close()
return True | def set_data(field, value, path):
f = open(path, 'r')
lines = f.readlines()
f.close()
f = open(path, 'w+')
for line in lines:
if line.find(field) != -1:
f.write(field + '=' + str(value) + '\n')
else:
f.write(line)
f.close()
return True
def get_data(path):
f = open(path, 'r')
lines = f.readlines()
f.close()
data = {}
for line in lines:
parts = line.split('=')
data[parts[0]] = parts[1].strip()
return data
def add_data(field, value, path):
f = open(path, 'a')
f.write(field + '=' + str(value) + '\n')
f.close()
return
def delete_data(field, value, path):
f = open(path, 'r')
lines = f.readlines()
f.close()
f = open(path, 'w+')
for line in lines:
if line.find(field) == -1:
f.write(line)
f.close()
return True |
class Event:
def __init__(self):
self.handlers = []
def call(self, *args, **kwargs):
for h in self.handlers:
h(*args, **kwargs)
def __call__(self, *args, **kwargs):
self.call(*args, **kwargs)
| class Event:
def __init__(self):
self.handlers = []
def call(self, *args, **kwargs):
for h in self.handlers:
h(*args, **kwargs)
def __call__(self, *args, **kwargs):
self.call(*args, **kwargs) |
class ExampleJob:
def __init__(self, id):
self.id = id
self.retry_count = 10
self.retry_pause_sec = 10
def run(self, runtime):
pass | class Examplejob:
def __init__(self, id):
self.id = id
self.retry_count = 10
self.retry_pause_sec = 10
def run(self, runtime):
pass |
#! /usr/bin/env python
__author__ = 'Tser'
__email__ = '807447312@qq.com'
__project__ = 'jicaiauto'
__script__ = '__version__.py'
__create_time__ = '2020/7/15 23:21'
VERSION = (0, 0, 2, 0)
__version__ = '.'.join(map(str, VERSION)) | __author__ = 'Tser'
__email__ = '807447312@qq.com'
__project__ = 'jicaiauto'
__script__ = '__version__.py'
__create_time__ = '2020/7/15 23:21'
version = (0, 0, 2, 0)
__version__ = '.'.join(map(str, VERSION)) |
_base_ = './pascal_voc12.py'
# dataset settings
data = dict(
samples_per_gpu=2,
train=dict(
ann_dir=['SegmentationClass', 'SegmentationClassAug'],
split=[
'ImageSets/Segmentation/train.txt',
'ImageSets/Segmentation/aug.txt'
]))
| _base_ = './pascal_voc12.py'
data = dict(samples_per_gpu=2, train=dict(ann_dir=['SegmentationClass', 'SegmentationClassAug'], split=['ImageSets/Segmentation/train.txt', 'ImageSets/Segmentation/aug.txt'])) |
# Copyright 2018 Contributors to Hyperledger Sawtooth
#
# 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.
# -----------------------------------------------------------------------------
USER_SEARCH_ALL = "(objectClass=person)"
USER_SEARCH_BY_DN = "(&(objectClass=person)(distinguishedName={}))"
USER_SEARCH_AFTER_DATE = "(&(objectClass=person)(whenChanged>=%s))"
GROUP_SEARCH_ALL = "(objectClass=group)"
GROUP_SEARCH_BY_DN = "(&(objectClass=group)(distinguishedName={}))"
GROUP_SEARCH_AFTER_DATE = "(&(objectClass=group)(whenChanged>=%s))"
| user_search_all = '(objectClass=person)'
user_search_by_dn = '(&(objectClass=person)(distinguishedName={}))'
user_search_after_date = '(&(objectClass=person)(whenChanged>=%s))'
group_search_all = '(objectClass=group)'
group_search_by_dn = '(&(objectClass=group)(distinguishedName={}))'
group_search_after_date = '(&(objectClass=group)(whenChanged>=%s))' |
class StatusWirelessStaRemoteUnms:
status: int
timestamp: str
def __init__(self, data):
self.status = data.get("status")
self.timestamp = data.get("timestamp")
| class Statuswirelessstaremoteunms:
status: int
timestamp: str
def __init__(self, data):
self.status = data.get('status')
self.timestamp = data.get('timestamp') |
class Zone:
def __init__(self) -> None:
self._display_name = ""
self._offset = 0
def get_display_name(self) -> str:
return self._display_name
def get_offset(self) -> int:
return self._offset
| class Zone:
def __init__(self) -> None:
self._display_name = ''
self._offset = 0
def get_display_name(self) -> str:
return self._display_name
def get_offset(self) -> int:
return self._offset |
def is_prime(n):
for x in range(2, n):
if n % x == 0:
return False
return True
def get_prime_numbers(n):
for x in range(n, 1, -1):
if is_prime(x):
yield x
def get_two_sum(primes, number):
for i, q in enumerate(primes):
next_values = primes[i + 1:]
for p in next_values:
if p <= q and p + q == number:
return p, q
n = int(input("> "))
numbers = []
for _ in range(n):
num = int(input("> "))
primes = list(get_prime_numbers(num))
nums = get_two_sum(primes, num)
numbers.append(nums)
for (p, q) in numbers:
print(p, q) | def is_prime(n):
for x in range(2, n):
if n % x == 0:
return False
return True
def get_prime_numbers(n):
for x in range(n, 1, -1):
if is_prime(x):
yield x
def get_two_sum(primes, number):
for (i, q) in enumerate(primes):
next_values = primes[i + 1:]
for p in next_values:
if p <= q and p + q == number:
return (p, q)
n = int(input('> '))
numbers = []
for _ in range(n):
num = int(input('> '))
primes = list(get_prime_numbers(num))
nums = get_two_sum(primes, num)
numbers.append(nums)
for (p, q) in numbers:
print(p, q) |
opcodes = {
'STOP': [0x00, 0, 0, 0],
'ADD': [0x01, 2, 1, 3],
'MUL': [0x02, 2, 1, 5],
'SUB': [0x03, 2, 1, 3],
'DIV': [0x04, 2, 1, 5],
'SDIV': [0x05, 2, 1, 5],
'MOD': [0x06, 2, 1, 5],
'SMOD': [0x07, 2, 1, 5],
'ADDMOD': [0x08, 3, 1, 8],
'MULMOD': [0x09, 3, 1, 8],
'EXP': [0x0a, 2, 1, 10],
'SIGNEXTEND': [0x0b, 2, 1, 5],
'LT': [0x10, 2, 1, 3],
'GT': [0x11, 2, 1, 3],
'SLT': [0x12, 2, 1, 3],
'SGT': [0x13, 2, 1, 3],
'EQ': [0x14, 2, 1, 3],
'ISZERO': [0x15, 1, 1, 3],
'AND': [0x16, 2, 1, 3],
'OR': [0x17, 2, 1, 3],
'XOR': [0x18, 2, 1, 3],
'NOT': [0x19, 1, 1, 3],
'BYTE': [0x1a, 2, 1, 3],
'SHA3': [0x20, 2, 1, 30],
'ADDRESS': [0x30, 0, 1, 2],
'BALANCE': [0x31, 1, 1, 400],
'ORIGIN': [0x32, 0, 1, 2],
'CALLER': [0x33, 0, 1, 2],
'CALLVALUE': [0x34, 0, 1, 2],
'CALLDATALOAD': [0x35, 1, 1, 3],
'CALLDATASIZE': [0x36, 0, 1, 2],
'CALLDATACOPY': [0x37, 3, 0, 3],
'CODESIZE': [0x38, 0, 1, 2],
'CODECOPY': [0x39, 3, 0, 3],
'GASPRICE': [0x3a, 0, 1, 2],
'EXTCODESIZE': [0x3b, 1, 1, 700],
'EXTCODECOPY': [0x3c, 4, 0, 700],
'BLOCKHASH': [0x40, 1, 1, 20],
'COINBASE': [0x41, 0, 1, 2],
'TIMESTAMP': [0x42, 0, 1, 2],
'NUMBER': [0x43, 0, 1, 2],
'DIFFICULTY': [0x44, 0, 1, 2],
'GASLIMIT': [0x45, 0, 1, 2],
'POP': [0x50, 1, 0, 2],
'MLOAD': [0x51, 1, 1, 3],
'MSTORE': [0x52, 2, 0, 3],
'MSTORE8': [0x53, 2, 0, 3],
'SLOAD': [0x54, 1, 1, 200],
'SSTORE': [0x55, 2, 0, 5000],
'JUMP': [0x56, 1, 0, 8],
'JUMPI': [0x57, 2, 0, 10],
'PC': [0x58, 0, 1, 2],
'MSIZE': [0x59, 0, 1, 2],
'GAS': [0x5a, 0, 1, 2],
'JUMPDEST': [0x5b, 0, 0, 1],
'LOG0': [0xa0, 2, 0, 375],
'LOG1': [0xa1, 3, 0, 750],
'LOG2': [0xa2, 4, 0, 1125],
'LOG3': [0xa3, 5, 0, 1500],
'LOG4': [0xa4, 6, 0, 1875],
'CREATE': [0xf0, 3, 1, 32000],
'CALL': [0xf1, 7, 1, 700],
'CALLCODE': [0xf2, 7, 1, 700],
'RETURN': [0xf3, 2, 0, 0],
'DELEGATECALL': [0xf4, 6, 1, 700],
'CALLBLACKBOX': [0xf5, 7, 1, 700],
'SELFDESTRUCT': [0xff, 1, 0, 25000],
'STATICCALL': [0xfa, 6, 1, 40],
'REVERT': [0xfd, 2, 0, 0],
'SUICIDE': [0xff, 1, 0, 5000],
'INVALID': [0xfe, 0, 0, 0],
}
pseudo_opcodes = {
'CLAMP': [None, 3, 1, 70],
'UCLAMPLT': [None, 2, 1, 25],
'UCLAMPLE': [None, 2, 1, 30],
'CLAMP_NONZERO': [None, 1, 1, 19],
'ASSERT': [None, 1, 0, 85],
'PASS': [None, 0, 0, 0],
'BREAK': [None, 0, 0, 20],
'SHA3_32': [None, 1, 1, 72],
'SLE': [None, 2, 1, 10],
'SGE': [None, 2, 1, 10],
'LE': [None, 2, 1, 10],
'GE': [None, 2, 1, 10],
'CEIL32': [None, 1, 1, 20],
'SET': [None, 2, 0, 20],
'NE': [None, 2, 1, 6],
}
comb_opcodes = {}
for k in opcodes:
comb_opcodes[k] = opcodes[k]
for k in pseudo_opcodes:
comb_opcodes[k] = pseudo_opcodes[k]
| opcodes = {'STOP': [0, 0, 0, 0], 'ADD': [1, 2, 1, 3], 'MUL': [2, 2, 1, 5], 'SUB': [3, 2, 1, 3], 'DIV': [4, 2, 1, 5], 'SDIV': [5, 2, 1, 5], 'MOD': [6, 2, 1, 5], 'SMOD': [7, 2, 1, 5], 'ADDMOD': [8, 3, 1, 8], 'MULMOD': [9, 3, 1, 8], 'EXP': [10, 2, 1, 10], 'SIGNEXTEND': [11, 2, 1, 5], 'LT': [16, 2, 1, 3], 'GT': [17, 2, 1, 3], 'SLT': [18, 2, 1, 3], 'SGT': [19, 2, 1, 3], 'EQ': [20, 2, 1, 3], 'ISZERO': [21, 1, 1, 3], 'AND': [22, 2, 1, 3], 'OR': [23, 2, 1, 3], 'XOR': [24, 2, 1, 3], 'NOT': [25, 1, 1, 3], 'BYTE': [26, 2, 1, 3], 'SHA3': [32, 2, 1, 30], 'ADDRESS': [48, 0, 1, 2], 'BALANCE': [49, 1, 1, 400], 'ORIGIN': [50, 0, 1, 2], 'CALLER': [51, 0, 1, 2], 'CALLVALUE': [52, 0, 1, 2], 'CALLDATALOAD': [53, 1, 1, 3], 'CALLDATASIZE': [54, 0, 1, 2], 'CALLDATACOPY': [55, 3, 0, 3], 'CODESIZE': [56, 0, 1, 2], 'CODECOPY': [57, 3, 0, 3], 'GASPRICE': [58, 0, 1, 2], 'EXTCODESIZE': [59, 1, 1, 700], 'EXTCODECOPY': [60, 4, 0, 700], 'BLOCKHASH': [64, 1, 1, 20], 'COINBASE': [65, 0, 1, 2], 'TIMESTAMP': [66, 0, 1, 2], 'NUMBER': [67, 0, 1, 2], 'DIFFICULTY': [68, 0, 1, 2], 'GASLIMIT': [69, 0, 1, 2], 'POP': [80, 1, 0, 2], 'MLOAD': [81, 1, 1, 3], 'MSTORE': [82, 2, 0, 3], 'MSTORE8': [83, 2, 0, 3], 'SLOAD': [84, 1, 1, 200], 'SSTORE': [85, 2, 0, 5000], 'JUMP': [86, 1, 0, 8], 'JUMPI': [87, 2, 0, 10], 'PC': [88, 0, 1, 2], 'MSIZE': [89, 0, 1, 2], 'GAS': [90, 0, 1, 2], 'JUMPDEST': [91, 0, 0, 1], 'LOG0': [160, 2, 0, 375], 'LOG1': [161, 3, 0, 750], 'LOG2': [162, 4, 0, 1125], 'LOG3': [163, 5, 0, 1500], 'LOG4': [164, 6, 0, 1875], 'CREATE': [240, 3, 1, 32000], 'CALL': [241, 7, 1, 700], 'CALLCODE': [242, 7, 1, 700], 'RETURN': [243, 2, 0, 0], 'DELEGATECALL': [244, 6, 1, 700], 'CALLBLACKBOX': [245, 7, 1, 700], 'SELFDESTRUCT': [255, 1, 0, 25000], 'STATICCALL': [250, 6, 1, 40], 'REVERT': [253, 2, 0, 0], 'SUICIDE': [255, 1, 0, 5000], 'INVALID': [254, 0, 0, 0]}
pseudo_opcodes = {'CLAMP': [None, 3, 1, 70], 'UCLAMPLT': [None, 2, 1, 25], 'UCLAMPLE': [None, 2, 1, 30], 'CLAMP_NONZERO': [None, 1, 1, 19], 'ASSERT': [None, 1, 0, 85], 'PASS': [None, 0, 0, 0], 'BREAK': [None, 0, 0, 20], 'SHA3_32': [None, 1, 1, 72], 'SLE': [None, 2, 1, 10], 'SGE': [None, 2, 1, 10], 'LE': [None, 2, 1, 10], 'GE': [None, 2, 1, 10], 'CEIL32': [None, 1, 1, 20], 'SET': [None, 2, 0, 20], 'NE': [None, 2, 1, 6]}
comb_opcodes = {}
for k in opcodes:
comb_opcodes[k] = opcodes[k]
for k in pseudo_opcodes:
comb_opcodes[k] = pseudo_opcodes[k] |
singular_to_plural_dictionary = {
"1": {
"access-role": "access-roles",
"threat-profile": "threat-profiles",
"host": "hosts",
"network": "networks",
"address-range": "address_ranges",
"security-zone": "security-zones",
"time": "times",
"simple-gateway": "simple-gateways",
"dynamic-object": "dynamic-objects",
"trusted-client": "trusted-clients",
"tags": "tags",
"dns-domain": "dns-domains",
"service-tcp": "services-tcp",
"service-udp": "services-udp",
"service-sctp": "services-sctp",
"service-rpc": "services-rpc",
"service-dce-rpc": "services-dce-rpc",
"application-site": "applications-sites",
"application-site-category": "application-site-categories",
"application-site-group": "application-site-groups",
"vpn-community-meshed": "vpn-communities-meshed",
"vpn-community-star": "vpn-communities-star",
"placeholder": "placeholders",
"administrator": "administrators",
"group": "groups",
"group-with-exclusion": "groups-with-exclusion",
"service-group": "service-groups",
"time-group": "time-groups",
"application-group": "application-groups",
"exception-group": "exception-groups",
"generic-object": "",
"access-layer": "access-layers",
"access-section": "access-sections",
"access-rule": "access-rules",
"nat-layer": "nat-layers",
"nat-section": "nat-sections",
"nat-rule": "nat-rules",
"threat-layer": "threat-layers",
"threat-rule": "threat-rules",
"threat-exception-section": "threat-exception-sections",
"threat-exception": "threat-exceptions"
},
"1.1": {
"access-role": "access-roles",
"threat-profile": "threat-profiles",
"host": "hosts",
"network": "networks",
"address-range": "address_ranges",
"multicast-address-range": "multicast-address-ranges",
"security-zone": "security-zones",
"time": "times",
"simple-gateway": "simple-gateways",
"dynamic-object": "dynamic-objects",
"trusted-client": "trusted-clients",
"tags": "tags",
"dns-domain": "dns-domains",
"opsec-application": "opsec-applications",
"data-center": "data-centers",
"data-center-object": "data-center-objects",
"service-tcp": "services-tcp",
"service-udp": "services-udp",
"service-icmp": "services-icmp",
"service-icmp6": "services-icmp6",
"service-sctp": "services-sctp",
"service-rpc": "services-rpc",
"service-other": "services-other",
"service-dce-rpc": "services-dce-rpc",
"application-site": "applications-sites",
"application-site-category": "application-site-categories",
"application-site-group": "application-site-groups",
"vpn-community-meshed": "vpn-communities-meshed",
"vpn-community-star": "vpn-communities-star",
"placeholder": "placeholders",
"administrator": "administrators",
"group": "groups",
"group-with-exclusion": "groups-with-exclusion",
"service-group": "service-groups",
"time-group": "time-groups",
"application-group": "application-groups",
"threat-protection": "threat-protections",
"exception-group": "exception-groups",
"generic-object": "",
"access-layer": "access-layers",
"access-section": "access-sections",
"access-rule": "access-rules",
"nat-layer": "nat-layers",
"nat-section": "nat-sections",
"nat-rule": "nat-rules",
"threat-layer": "threat-layers",
"threat-rule": "threat-rules",
"threat-exception-section": "threat-exception-sections",
"threat-exception": "threat-exceptions"
},
"1.2": {
"access-role": "access-roles",
"threat-profile": "threat-profiles",
"host": "hosts",
"network": "networks",
"address-range": "address_ranges",
"multicast-address-range": "multicast-address-ranges",
"security-zone": "security-zones",
"time": "times",
"simple-gateway": "simple-gateways",
"dynamic-object": "dynamic-objects",
"trusted-client": "trusted-clients",
"tags": "tags",
"dns-domain": "dns-domains",
"opsec-application": "opsec-applications",
"data-center": "data-centers",
"data-center-object": "data-center-objects",
"service-tcp": "services-tcp",
"service-udp": "services-udp",
"service-icmp": "services-icmp",
"service-icmp6": "services-icmp6",
"service-sctp": "services-sctp",
"service-rpc": "services-rpc",
"service-other": "services-other",
"service-dce-rpc": "services-dce-rpc",
"application-site": "applications-sites",
"application-site-category": "application-site-categories",
"application-site-group": "application-site-groups",
"vpn-community-meshed": "vpn-communities-meshed",
"vpn-community-star": "vpn-communities-star",
"placeholder": "placeholders",
"administrator": "administrators",
"group": "groups",
"group-with-exclusion": "groups-with-exclusion",
"service-group": "service-groups",
"time-group": "time-groups",
"application-group": "application-groups",
"threat-protection": "threat-protections",
"exception-group": "exception-groups",
"generic-object": "",
"access-layer": "access-layers",
"access-section": "access-sections",
"access-rule": "access-rules",
"nat-layer": "nat-layers",
"nat-section": "nat-sections",
"nat-rule": "nat-rules",
"threat-layer": "threat-layers",
"threat-rule": "threat-rules",
"threat-exception-section": "threat-exception-sections",
"threat-exception": "threat-exceptions",
"wildcard": "wildcards"
},
"1.3": {
"access-role": "access-roles",
"threat-profile": "threat-profiles",
"host": "hosts",
"network": "networks",
"address-range": "address_ranges",
"multicast-address-range": "multicast-address-ranges",
"security-zone": "security-zones",
"time": "times",
"simple-gateway": "simple-gateways",
"dynamic-object": "dynamic-objects",
"trusted-client": "trusted-clients",
"tags": "tags",
"dns-domain": "dns-domains",
"opsec-application": "opsec-applications",
"data-center": "data-centers",
"data-center-object": "data-center-objects",
"service-tcp": "services-tcp",
"service-udp": "services-udp",
"service-icmp": "services-icmp",
"service-icmp6": "services-icmp6",
"service-sctp": "services-sctp",
"service-rpc": "services-rpc",
"service-other": "services-other",
"service-dce-rpc": "services-dce-rpc",
"application-site": "applications-sites",
"application-site-category": "application-site-categories",
"application-site-group": "application-site-groups",
"vpn-community-meshed": "vpn-communities-meshed",
"vpn-community-star": "vpn-communities-star",
"placeholder": "placeholders",
"administrator": "administrators",
"group": "groups",
"group-with-exclusion": "groups-with-exclusion",
"service-group": "service-groups",
"time-group": "time-groups",
"application-group": "application-groups",
"threat-protection": "threat-protections",
"exception-group": "exception-groups",
"generic-object": "",
"access-layer": "access-layers",
"access-section": "access-sections",
"access-rule": "access-rules",
"nat-layer": "nat-layers",
"nat-section": "nat-sections",
"nat-rule": "nat-rules",
"threat-layer": "threat-layers",
"threat-rule": "threat-rules",
"threat-exception-section": "threat-exception-sections",
"threat-exception": "threat-exceptions",
"wildcard": "wildcards",
"updatable-object": "updatable-objects"
},
"1.4": {
"access-role": "access-roles",
"threat-profile": "threat-profiles",
"host": "hosts",
"network": "networks",
"address-range": "address_ranges",
"multicast-address-range": "multicast-address-ranges",
"security-zone": "security-zones",
"time": "times",
"simple-gateway": "simple-gateways",
"dynamic-object": "dynamic-objects",
"trusted-client": "trusted-clients",
"tags": "tags",
"dns-domain": "dns-domains",
"opsec-application": "opsec-applications",
"data-center": "data-centers",
"data-center-object": "data-center-objects",
"service-tcp": "services-tcp",
"service-udp": "services-udp",
"service-icmp": "services-icmp",
"service-icmp6": "services-icmp6",
"service-sctp": "services-sctp",
"service-rpc": "services-rpc",
"service-other": "services-other",
"service-dce-rpc": "services-dce-rpc",
"application-site": "applications-sites",
"application-site-category": "application-site-categories",
"application-site-group": "application-site-groups",
"vpn-community-meshed": "vpn-communities-meshed",
"vpn-community-star": "vpn-communities-star",
"placeholder": "placeholders",
"administrator": "administrators",
"group": "groups",
"group-with-exclusion": "groups-with-exclusion",
"service-group": "service-groups",
"time-group": "time-groups",
"application-group": "application-groups",
"threat-protection": "threat-protections",
"exception-group": "exception-groups",
"generic-object": "",
"access-layer": "access-layers",
"access-section": "access-sections",
"access-rule": "access-rules",
"nat-layer": "nat-layers",
"nat-section": "nat-sections",
"nat-rule": "nat-rules",
"threat-layer": "threat-layers",
"threat-rule": "threat-rules",
"threat-exception-section": "threat-exception-sections",
"threat-exception": "threat-exceptions",
"wildcard": "wildcards",
"updatable-object": "updatable-objects"
},
"1.5": {
"access-role": "access-roles",
"threat-profile": "threat-profiles",
"host": "hosts",
"network": "networks",
"address-range": "address_ranges",
"multicast-address-range": "multicast-address-ranges",
"security-zone": "security-zones",
"time": "times",
"simple-gateway": "simple-gateways",
"dynamic-object": "dynamic-objects",
"trusted-client": "trusted-clients",
"tags": "tags",
"dns-domain": "dns-domains",
"opsec-application": "opsec-applications",
"data-center": "data-centers",
"data-center-object": "data-center-objects",
"service-tcp": "services-tcp",
"service-udp": "services-udp",
"service-icmp": "services-icmp",
"service-icmp6": "services-icmp6",
"service-sctp": "services-sctp",
"service-rpc": "services-rpc",
"service-other": "services-other",
"service-dce-rpc": "services-dce-rpc",
"application-site": "applications-sites",
"application-site-category": "application-site-categories",
"application-site-group": "application-site-groups",
"vpn-community-meshed": "vpn-communities-meshed",
"vpn-community-star": "vpn-communities-star",
"placeholder": "placeholders",
"administrator": "administrators",
"group": "groups",
"group-with-exclusion": "groups-with-exclusion",
"service-group": "service-groups",
"time-group": "time-groups",
"application-group": "application-groups",
"threat-protection": "threat-protections",
"exception-group": "exception-groups",
"generic-object": "",
"access-layer": "access-layers",
"access-section": "access-sections",
"access-rule": "access-rules",
"nat-layer": "nat-layers",
"nat-section": "nat-sections",
"nat-rule": "nat-rules",
"threat-layer": "threat-layers",
"threat-rule": "threat-rules",
"threat-exception-section": "threat-exception-sections",
"threat-exception": "threat-exceptions",
"wildcard": "wildcards",
"updatable-object": "updatable-objects"
},
"1.6": {
"access-role": "access-roles",
"threat-profile": "threat-profiles",
"host": "hosts",
"network": "networks",
"address-range": "address_ranges",
"multicast-address-range": "multicast-address-ranges",
"security-zone": "security-zones",
"time": "times",
"simple-gateway": "simple-gateways",
"dynamic-object": "dynamic-objects",
"trusted-client": "trusted-clients",
"tags": "tags",
"dns-domain": "dns-domains",
"opsec-application": "opsec-applications",
"data-center": "data-centers",
"data-center-object": "data-center-objects",
"service-tcp": "services-tcp",
"service-udp": "services-udp",
"service-icmp": "services-icmp",
"service-icmp6": "services-icmp6",
"service-sctp": "services-sctp",
"service-rpc": "services-rpc",
"service-other": "services-other",
"service-dce-rpc": "services-dce-rpc",
"application-site": "applications-sites",
"application-site-category": "application-site-categories",
"application-site-group": "application-site-groups",
"vpn-community-meshed": "vpn-communities-meshed",
"vpn-community-star": "vpn-communities-star",
"placeholder": "placeholders",
"administrator": "administrators",
"group": "groups",
"group-with-exclusion": "groups-with-exclusion",
"service-group": "service-groups",
"time-group": "time-groups",
"application-group": "application-groups",
"threat-protection": "threat-protections",
"exception-group": "exception-groups",
"generic-object": "",
"access-layer": "access-layers",
"access-section": "access-sections",
"access-rule": "access-rules",
"nat-layer": "nat-layers",
"nat-section": "nat-sections",
"nat-rule": "nat-rules",
"threat-layer": "threat-layers",
"threat-rule": "threat-rules",
"threat-exception-section": "threat-exception-sections",
"threat-exception": "threat-exceptions",
"wildcard": "wildcards",
"updatable-object": "updatable-objects",
"https-layer": "https-layers",
"https-section": "https-sections",
"https-rule": "https-rules"
},
"1.6.1": {
"access-role": "access-roles",
"threat-profile": "threat-profiles",
"host": "hosts",
"network": "networks",
"address-range": "address_ranges",
"multicast-address-range": "multicast-address-ranges",
"security-zone": "security-zones",
"time": "times",
"simple-gateway": "simple-gateways",
"dynamic-object": "dynamic-objects",
"trusted-client": "trusted-clients",
"tags": "tags",
"dns-domain": "dns-domains",
"opsec-application": "opsec-applications",
"data-center": "data-centers",
"data-center-object": "data-center-objects",
"service-tcp": "services-tcp",
"service-udp": "services-udp",
"service-icmp": "services-icmp",
"service-icmp6": "services-icmp6",
"service-sctp": "services-sctp",
"service-rpc": "services-rpc",
"service-other": "services-other",
"service-dce-rpc": "services-dce-rpc",
"application-site": "applications-sites",
"application-site-category": "application-site-categories",
"application-site-group": "application-site-groups",
"vpn-community-meshed": "vpn-communities-meshed",
"vpn-community-star": "vpn-communities-star",
"placeholder": "placeholders",
"administrator": "administrators",
"group": "groups",
"group-with-exclusion": "groups-with-exclusion",
"service-group": "service-groups",
"time-group": "time-groups",
"application-group": "application-groups",
"threat-protection": "threat-protections",
"exception-group": "exception-groups",
"generic-object": "",
"access-layer": "access-layers",
"access-section": "access-sections",
"access-rule": "access-rules",
"nat-layer": "nat-layers",
"nat-section": "nat-sections",
"nat-rule": "nat-rules",
"threat-layer": "threat-layers",
"threat-rule": "threat-rules",
"threat-exception-section": "threat-exception-sections",
"threat-exception": "threat-exceptions",
"wildcard": "wildcards",
"updatable-object": "updatable-objects",
"https-layer": "https-layers",
"https-section": "https-sections",
"https-rule": "https-rules"
},
"1.7": {
"access-role": "access-roles",
"threat-profile": "threat-profiles",
"host": "hosts",
"network": "networks",
"address-range": "address_ranges",
"multicast-address-range": "multicast-address-ranges",
"security-zone": "security-zones",
"time": "times",
"simple-gateway": "simple-gateways",
"dynamic-object": "dynamic-objects",
"trusted-client": "trusted-clients",
"tags": "tags",
"dns-domain": "dns-domains",
"opsec-application": "opsec-applications",
"data-center": "data-centers",
"data-center-object": "data-center-objects",
"service-tcp": "services-tcp",
"service-udp": "services-udp",
"service-icmp": "services-icmp",
"service-icmp6": "services-icmp6",
"service-sctp": "services-sctp",
"service-rpc": "services-rpc",
"service-other": "services-other",
"service-dce-rpc": "services-dce-rpc",
"application-site": "applications-sites",
"application-site-category": "application-site-categories",
"application-site-group": "application-site-groups",
"vpn-community-meshed": "vpn-communities-meshed",
"vpn-community-star": "vpn-communities-star",
"placeholder": "placeholders",
"administrator": "administrators",
"group": "groups",
"group-with-exclusion": "groups-with-exclusion",
"service-group": "service-groups",
"time-group": "time-groups",
"application-group": "application-groups",
"threat-protection": "threat-protections",
"exception-group": "exception-groups",
"generic-object": "",
"access-layer": "access-layers",
"access-section": "access-sections",
"access-rule": "access-rules",
"nat-layer": "nat-layers",
"nat-section": "nat-sections",
"nat-rule": "nat-rules",
"threat-layer": "threat-layers",
"threat-rule": "threat-rules",
"threat-exception-section": "threat-exception-sections",
"threat-exception": "threat-exceptions",
"wildcard": "wildcards",
"updatable-object": "updatable-objects",
"https-layer": "https-layers",
"https-section": "https-sections",
"https-rule": "https-rules"
},
"1.7.1": {
"access-role": "access-roles",
"threat-profile": "threat-profiles",
"host": "hosts",
"network": "networks",
"address-range": "address_ranges",
"multicast-address-range": "multicast-address-ranges",
"security-zone": "security-zones",
"time": "times",
"simple-gateway": "simple-gateways",
"dynamic-object": "dynamic-objects",
"trusted-client": "trusted-clients",
"tags": "tags",
"dns-domain": "dns-domains",
"opsec-application": "opsec-applications",
"data-center": "data-centers",
"data-center-object": "data-center-objects",
"service-tcp": "services-tcp",
"service-udp": "services-udp",
"service-icmp": "services-icmp",
"service-icmp6": "services-icmp6",
"service-sctp": "services-sctp",
"service-rpc": "services-rpc",
"service-other": "services-other",
"service-dce-rpc": "services-dce-rpc",
"application-site": "applications-sites",
"application-site-category": "application-site-categories",
"application-site-group": "application-site-groups",
"vpn-community-meshed": "vpn-communities-meshed",
"vpn-community-star": "vpn-communities-star",
"placeholder": "placeholders",
"administrator": "administrators",
"group": "groups",
"group-with-exclusion": "groups-with-exclusion",
"service-group": "service-groups",
"time-group": "time-groups",
"application-group": "application-groups",
"threat-protection": "threat-protections",
"exception-group": "exception-groups",
"generic-object": "",
"access-layer": "access-layers",
"access-section": "access-sections",
"access-rule": "access-rules",
"nat-layer": "nat-layers",
"nat-section": "nat-sections",
"nat-rule": "nat-rules",
"threat-layer": "threat-layers",
"threat-rule": "threat-rules",
"threat-exception-section": "threat-exception-sections",
"threat-exception": "threat-exceptions",
"wildcard": "wildcards",
"updatable-object": "updatable-objects",
"https-layer": "https-layers",
"https-section": "https-sections",
"https-rule": "https-rules"
},
"1.8": {
"access-role": "access-roles",
"threat-profile": "threat-profiles",
"host": "hosts",
"network": "networks",
"address-range": "address_ranges",
"multicast-address-range": "multicast-address-ranges",
"security-zone": "security-zones",
"time": "times",
"simple-gateway": "simple-gateways",
"dynamic-object": "dynamic-objects",
"trusted-client": "trusted-clients",
"tags": "tags",
"dns-domain": "dns-domains",
"opsec-application": "opsec-applications",
"data-center": "data-centers",
"data-center-object": "data-center-objects",
"service-tcp": "services-tcp",
"service-udp": "services-udp",
"service-icmp": "services-icmp",
"service-icmp6": "services-icmp6",
"service-sctp": "services-sctp",
"service-rpc": "services-rpc",
"service-other": "services-other",
"service-dce-rpc": "services-dce-rpc",
"application-site": "applications-sites",
"application-site-category": "application-site-categories",
"application-site-group": "application-site-groups",
"vpn-community-meshed": "vpn-communities-meshed",
"vpn-community-star": "vpn-communities-star",
"placeholder": "placeholders",
"administrator": "administrators",
"group": "groups",
"group-with-exclusion": "groups-with-exclusion",
"service-group": "service-groups",
"time-group": "time-groups",
"application-group": "application-groups",
"threat-protection": "threat-protections",
"exception-group": "exception-groups",
"generic-object": "",
"access-layer": "access-layers",
"access-section": "access-sections",
"access-rule": "access-rules",
"nat-layer": "nat-layers",
"nat-section": "nat-sections",
"nat-rule": "nat-rules",
"threat-layer": "threat-layers",
"threat-rule": "threat-rules",
"threat-exception-section": "threat-exception-sections",
"threat-exception": "threat-exceptions",
"wildcard": "wildcards",
"updatable-object": "updatable-objects",
"https-layer": "https-layers",
"https-section": "https-sections",
"https-rule": "https-rules"
},
}
unexportable_objects_map = {}
import_priority = {
"vpn-community-meshed": 1,
"vpn-community-star": 1,
"group": 2,
"group-with-exclusion": 3,
"service-group": 2,
"time-group": 2,
"application-group": 2,
}
generic_objects_for_rule_fields = {
"source": ["host", "ip-address"],
"destination": ["host", "ip-address"],
"vpn": ["vpn-community-star"],
"service": ["service-tcp", "port"],
"protected-scope": ["multicast-address-range", "ip-address"],
}
generic_objects_for_duplicates_in_group_members = {
"group": ["host", "ip-address"],
"service-group": ["service-tcp", "port"],
"time-group": ["time"]
}
placeholder_type_by_obj_type = {
"DataType": {
"type": "com.checkpoint.management.data_awareness.objects.DataAwarenessCompound"
},
"DropUserCheckInteractionScheme": {
"bladeName": "APPC",
"type": "com.checkpoint.objects.user_check.DropUserCheckInteractionScheme"
},
"AskUserCheckInteractionScheme": {
"bladeName": "APPC",
"type": "com.checkpoint.objects.user_check.AskUserCheckInteractionScheme"
},
"InformUserCheckInteractionScheme": {
"bladeName": "APPC",
"type": "com.checkpoint.objects.user_check.InformUserCheckInteractionScheme"
},
"CpmiGatewayCluster": {
"ipsBlade": "INSTALLED",
"type": "com.checkpoint.objects.classes.dummy.CpmiGatewayCluster"
},
"CpmiVsClusterNetobj": {
"ipsBlade": "INSTALLED",
"type": "com.checkpoint.objects.classes.dummy.CpmiGatewayCluster"
},
"CpmiGatewayPlain": {
"type": "com.checkpoint.objects.classes.dummy.CpmiGatewayCkp",
"ipaddr": None,
"vpn1": "true"
},
"CpmiIcmpService": {
"type": "com.checkpoint.objects.classes.dummy.CpmiIcmpService"
},
"CpmiIcmp6Service": {
"type": "com.checkpoint.objects.classes.dummy.CpmiIcmp6Service"
},
"CpmiAppfwLimit": {
"type": "com.checkpoint.objects.appfw.dummy.CpmiAppfwLimit",
},
"service-other": {
"type": "com.checkpoint.objects.classes.dummy.CpmiOtherService",
"matchExp": "Dummy Match Expression"
}
}
group_objects_field = {
"group": ["members"],
"vpn-community-star": ["center-gateways", "satellite-gateways"],
"vpn-community-meshed": ["gateways"],
"service-group": ["members"],
"time-group": ["members"],
"application-site-group": ["members"],
"group-with-exclusion": []
}
no_export_fields = {"type"}
no_export_fields_and_subfields = ["read-only", "layer", "package", "owner", "icon",
"domain", "from", "to", "rulebase", "uid", "meta-info", "parent", "groups", "type", "override-default-settings"]
no_export_fields_by_api_type = {
"host": ["standard-port-number", "subnet-mask", "type"],
"network": ["subnet-mask"],
"threat-rule": ["exceptions", "exceptions-layer"],
"simple-gateway": ["forward-logs-to-log-server-schedule-name", "hardware", "dynamic-ip", "sic-name", "sic-state",
"send-alerts-to-server",
"send-logs-to-backup-server", "send-logs-to-server", "interfaces"],
"application-site": ["application-id", "risk", "user-defined"],
"application-site-category": ["user-defined"],
"data-center-object": ["name-in-data-center", "data-center", "data-center-object-meta-info", "deleted",
"type-in-data-center", "additional-properties"]
}
fields_to_change = {
"alert-when-free-disk-space-below-metrics": "free-disk-space-metrics",
"delete-index-files-when-index-size-above-metrics": "free-disk-space-metrics",
"delete-when-free-disk-space-below-metrics": "free-disk-space-metrics",
"stop-logging-when-free-disk-space-below-metrics": "free-disk-space-metrics"
}
fields_to_exclude_in_the_presence_of_other_fields = {
"maximum-limit-for-concurrent-connections": "auto-maximum-limit-for-concurrent-connections",
"maximum-memory-pool-size": "auto-calculate-connections-hash-table-size-and-memory-pool",
"memory-pool-size": "auto-calculate-connections-hash-table-size-and-memory-pool"
}
fields_to_exclude_from_import_by_api_type_and_versions = {
"network": {
"broadcast": ["1"]
}
}
partially_exportable_types = ["simple-gateway"]
special_treatment_types = [
"threat-profile"
]
https_blades_names_map = {
"Anti-Virus": "Anti Virus",
"Anti-Bot": "Anti Bot",
"URL Filtering": "Url Filtering",
"Data Loss Prevention": "DLP",
"Content Awareness": "Data Awareness"
}
commands_support_batch = ['access-role', 'address-range', 'application-site-category',
'application-site-group', 'dns-domain', 'dynamic-object',
'group-with-exclusion', 'host', 'lsv-profile', 'multicast-address-range',
'network', 'package', 'security-zone', 'service-dce-rpc', 'service-group',
'service-icmp', 'service-other', 'service-sctp', 'service-tcp', 'service-udp',
'tacacs-server', 'tacacs-group', 'tag', 'time', 'time-group',
'vpn-community-meshed', 'vpn-community-star', 'wildcard']
rule_support_batch = ['access-rule', 'https-rule', 'nat-rule', 'threat-exception']
not_unique_name_with_dedicated_api = {
"Unknown Traffic": "show-application-site-category"
}
types_not_support_tagging = ["rule", "section", "threat-exception"]
| singular_to_plural_dictionary = {'1': {'access-role': 'access-roles', 'threat-profile': 'threat-profiles', 'host': 'hosts', 'network': 'networks', 'address-range': 'address_ranges', 'security-zone': 'security-zones', 'time': 'times', 'simple-gateway': 'simple-gateways', 'dynamic-object': 'dynamic-objects', 'trusted-client': 'trusted-clients', 'tags': 'tags', 'dns-domain': 'dns-domains', 'service-tcp': 'services-tcp', 'service-udp': 'services-udp', 'service-sctp': 'services-sctp', 'service-rpc': 'services-rpc', 'service-dce-rpc': 'services-dce-rpc', 'application-site': 'applications-sites', 'application-site-category': 'application-site-categories', 'application-site-group': 'application-site-groups', 'vpn-community-meshed': 'vpn-communities-meshed', 'vpn-community-star': 'vpn-communities-star', 'placeholder': 'placeholders', 'administrator': 'administrators', 'group': 'groups', 'group-with-exclusion': 'groups-with-exclusion', 'service-group': 'service-groups', 'time-group': 'time-groups', 'application-group': 'application-groups', 'exception-group': 'exception-groups', 'generic-object': '', 'access-layer': 'access-layers', 'access-section': 'access-sections', 'access-rule': 'access-rules', 'nat-layer': 'nat-layers', 'nat-section': 'nat-sections', 'nat-rule': 'nat-rules', 'threat-layer': 'threat-layers', 'threat-rule': 'threat-rules', 'threat-exception-section': 'threat-exception-sections', 'threat-exception': 'threat-exceptions'}, '1.1': {'access-role': 'access-roles', 'threat-profile': 'threat-profiles', 'host': 'hosts', 'network': 'networks', 'address-range': 'address_ranges', 'multicast-address-range': 'multicast-address-ranges', 'security-zone': 'security-zones', 'time': 'times', 'simple-gateway': 'simple-gateways', 'dynamic-object': 'dynamic-objects', 'trusted-client': 'trusted-clients', 'tags': 'tags', 'dns-domain': 'dns-domains', 'opsec-application': 'opsec-applications', 'data-center': 'data-centers', 'data-center-object': 'data-center-objects', 'service-tcp': 'services-tcp', 'service-udp': 'services-udp', 'service-icmp': 'services-icmp', 'service-icmp6': 'services-icmp6', 'service-sctp': 'services-sctp', 'service-rpc': 'services-rpc', 'service-other': 'services-other', 'service-dce-rpc': 'services-dce-rpc', 'application-site': 'applications-sites', 'application-site-category': 'application-site-categories', 'application-site-group': 'application-site-groups', 'vpn-community-meshed': 'vpn-communities-meshed', 'vpn-community-star': 'vpn-communities-star', 'placeholder': 'placeholders', 'administrator': 'administrators', 'group': 'groups', 'group-with-exclusion': 'groups-with-exclusion', 'service-group': 'service-groups', 'time-group': 'time-groups', 'application-group': 'application-groups', 'threat-protection': 'threat-protections', 'exception-group': 'exception-groups', 'generic-object': '', 'access-layer': 'access-layers', 'access-section': 'access-sections', 'access-rule': 'access-rules', 'nat-layer': 'nat-layers', 'nat-section': 'nat-sections', 'nat-rule': 'nat-rules', 'threat-layer': 'threat-layers', 'threat-rule': 'threat-rules', 'threat-exception-section': 'threat-exception-sections', 'threat-exception': 'threat-exceptions'}, '1.2': {'access-role': 'access-roles', 'threat-profile': 'threat-profiles', 'host': 'hosts', 'network': 'networks', 'address-range': 'address_ranges', 'multicast-address-range': 'multicast-address-ranges', 'security-zone': 'security-zones', 'time': 'times', 'simple-gateway': 'simple-gateways', 'dynamic-object': 'dynamic-objects', 'trusted-client': 'trusted-clients', 'tags': 'tags', 'dns-domain': 'dns-domains', 'opsec-application': 'opsec-applications', 'data-center': 'data-centers', 'data-center-object': 'data-center-objects', 'service-tcp': 'services-tcp', 'service-udp': 'services-udp', 'service-icmp': 'services-icmp', 'service-icmp6': 'services-icmp6', 'service-sctp': 'services-sctp', 'service-rpc': 'services-rpc', 'service-other': 'services-other', 'service-dce-rpc': 'services-dce-rpc', 'application-site': 'applications-sites', 'application-site-category': 'application-site-categories', 'application-site-group': 'application-site-groups', 'vpn-community-meshed': 'vpn-communities-meshed', 'vpn-community-star': 'vpn-communities-star', 'placeholder': 'placeholders', 'administrator': 'administrators', 'group': 'groups', 'group-with-exclusion': 'groups-with-exclusion', 'service-group': 'service-groups', 'time-group': 'time-groups', 'application-group': 'application-groups', 'threat-protection': 'threat-protections', 'exception-group': 'exception-groups', 'generic-object': '', 'access-layer': 'access-layers', 'access-section': 'access-sections', 'access-rule': 'access-rules', 'nat-layer': 'nat-layers', 'nat-section': 'nat-sections', 'nat-rule': 'nat-rules', 'threat-layer': 'threat-layers', 'threat-rule': 'threat-rules', 'threat-exception-section': 'threat-exception-sections', 'threat-exception': 'threat-exceptions', 'wildcard': 'wildcards'}, '1.3': {'access-role': 'access-roles', 'threat-profile': 'threat-profiles', 'host': 'hosts', 'network': 'networks', 'address-range': 'address_ranges', 'multicast-address-range': 'multicast-address-ranges', 'security-zone': 'security-zones', 'time': 'times', 'simple-gateway': 'simple-gateways', 'dynamic-object': 'dynamic-objects', 'trusted-client': 'trusted-clients', 'tags': 'tags', 'dns-domain': 'dns-domains', 'opsec-application': 'opsec-applications', 'data-center': 'data-centers', 'data-center-object': 'data-center-objects', 'service-tcp': 'services-tcp', 'service-udp': 'services-udp', 'service-icmp': 'services-icmp', 'service-icmp6': 'services-icmp6', 'service-sctp': 'services-sctp', 'service-rpc': 'services-rpc', 'service-other': 'services-other', 'service-dce-rpc': 'services-dce-rpc', 'application-site': 'applications-sites', 'application-site-category': 'application-site-categories', 'application-site-group': 'application-site-groups', 'vpn-community-meshed': 'vpn-communities-meshed', 'vpn-community-star': 'vpn-communities-star', 'placeholder': 'placeholders', 'administrator': 'administrators', 'group': 'groups', 'group-with-exclusion': 'groups-with-exclusion', 'service-group': 'service-groups', 'time-group': 'time-groups', 'application-group': 'application-groups', 'threat-protection': 'threat-protections', 'exception-group': 'exception-groups', 'generic-object': '', 'access-layer': 'access-layers', 'access-section': 'access-sections', 'access-rule': 'access-rules', 'nat-layer': 'nat-layers', 'nat-section': 'nat-sections', 'nat-rule': 'nat-rules', 'threat-layer': 'threat-layers', 'threat-rule': 'threat-rules', 'threat-exception-section': 'threat-exception-sections', 'threat-exception': 'threat-exceptions', 'wildcard': 'wildcards', 'updatable-object': 'updatable-objects'}, '1.4': {'access-role': 'access-roles', 'threat-profile': 'threat-profiles', 'host': 'hosts', 'network': 'networks', 'address-range': 'address_ranges', 'multicast-address-range': 'multicast-address-ranges', 'security-zone': 'security-zones', 'time': 'times', 'simple-gateway': 'simple-gateways', 'dynamic-object': 'dynamic-objects', 'trusted-client': 'trusted-clients', 'tags': 'tags', 'dns-domain': 'dns-domains', 'opsec-application': 'opsec-applications', 'data-center': 'data-centers', 'data-center-object': 'data-center-objects', 'service-tcp': 'services-tcp', 'service-udp': 'services-udp', 'service-icmp': 'services-icmp', 'service-icmp6': 'services-icmp6', 'service-sctp': 'services-sctp', 'service-rpc': 'services-rpc', 'service-other': 'services-other', 'service-dce-rpc': 'services-dce-rpc', 'application-site': 'applications-sites', 'application-site-category': 'application-site-categories', 'application-site-group': 'application-site-groups', 'vpn-community-meshed': 'vpn-communities-meshed', 'vpn-community-star': 'vpn-communities-star', 'placeholder': 'placeholders', 'administrator': 'administrators', 'group': 'groups', 'group-with-exclusion': 'groups-with-exclusion', 'service-group': 'service-groups', 'time-group': 'time-groups', 'application-group': 'application-groups', 'threat-protection': 'threat-protections', 'exception-group': 'exception-groups', 'generic-object': '', 'access-layer': 'access-layers', 'access-section': 'access-sections', 'access-rule': 'access-rules', 'nat-layer': 'nat-layers', 'nat-section': 'nat-sections', 'nat-rule': 'nat-rules', 'threat-layer': 'threat-layers', 'threat-rule': 'threat-rules', 'threat-exception-section': 'threat-exception-sections', 'threat-exception': 'threat-exceptions', 'wildcard': 'wildcards', 'updatable-object': 'updatable-objects'}, '1.5': {'access-role': 'access-roles', 'threat-profile': 'threat-profiles', 'host': 'hosts', 'network': 'networks', 'address-range': 'address_ranges', 'multicast-address-range': 'multicast-address-ranges', 'security-zone': 'security-zones', 'time': 'times', 'simple-gateway': 'simple-gateways', 'dynamic-object': 'dynamic-objects', 'trusted-client': 'trusted-clients', 'tags': 'tags', 'dns-domain': 'dns-domains', 'opsec-application': 'opsec-applications', 'data-center': 'data-centers', 'data-center-object': 'data-center-objects', 'service-tcp': 'services-tcp', 'service-udp': 'services-udp', 'service-icmp': 'services-icmp', 'service-icmp6': 'services-icmp6', 'service-sctp': 'services-sctp', 'service-rpc': 'services-rpc', 'service-other': 'services-other', 'service-dce-rpc': 'services-dce-rpc', 'application-site': 'applications-sites', 'application-site-category': 'application-site-categories', 'application-site-group': 'application-site-groups', 'vpn-community-meshed': 'vpn-communities-meshed', 'vpn-community-star': 'vpn-communities-star', 'placeholder': 'placeholders', 'administrator': 'administrators', 'group': 'groups', 'group-with-exclusion': 'groups-with-exclusion', 'service-group': 'service-groups', 'time-group': 'time-groups', 'application-group': 'application-groups', 'threat-protection': 'threat-protections', 'exception-group': 'exception-groups', 'generic-object': '', 'access-layer': 'access-layers', 'access-section': 'access-sections', 'access-rule': 'access-rules', 'nat-layer': 'nat-layers', 'nat-section': 'nat-sections', 'nat-rule': 'nat-rules', 'threat-layer': 'threat-layers', 'threat-rule': 'threat-rules', 'threat-exception-section': 'threat-exception-sections', 'threat-exception': 'threat-exceptions', 'wildcard': 'wildcards', 'updatable-object': 'updatable-objects'}, '1.6': {'access-role': 'access-roles', 'threat-profile': 'threat-profiles', 'host': 'hosts', 'network': 'networks', 'address-range': 'address_ranges', 'multicast-address-range': 'multicast-address-ranges', 'security-zone': 'security-zones', 'time': 'times', 'simple-gateway': 'simple-gateways', 'dynamic-object': 'dynamic-objects', 'trusted-client': 'trusted-clients', 'tags': 'tags', 'dns-domain': 'dns-domains', 'opsec-application': 'opsec-applications', 'data-center': 'data-centers', 'data-center-object': 'data-center-objects', 'service-tcp': 'services-tcp', 'service-udp': 'services-udp', 'service-icmp': 'services-icmp', 'service-icmp6': 'services-icmp6', 'service-sctp': 'services-sctp', 'service-rpc': 'services-rpc', 'service-other': 'services-other', 'service-dce-rpc': 'services-dce-rpc', 'application-site': 'applications-sites', 'application-site-category': 'application-site-categories', 'application-site-group': 'application-site-groups', 'vpn-community-meshed': 'vpn-communities-meshed', 'vpn-community-star': 'vpn-communities-star', 'placeholder': 'placeholders', 'administrator': 'administrators', 'group': 'groups', 'group-with-exclusion': 'groups-with-exclusion', 'service-group': 'service-groups', 'time-group': 'time-groups', 'application-group': 'application-groups', 'threat-protection': 'threat-protections', 'exception-group': 'exception-groups', 'generic-object': '', 'access-layer': 'access-layers', 'access-section': 'access-sections', 'access-rule': 'access-rules', 'nat-layer': 'nat-layers', 'nat-section': 'nat-sections', 'nat-rule': 'nat-rules', 'threat-layer': 'threat-layers', 'threat-rule': 'threat-rules', 'threat-exception-section': 'threat-exception-sections', 'threat-exception': 'threat-exceptions', 'wildcard': 'wildcards', 'updatable-object': 'updatable-objects', 'https-layer': 'https-layers', 'https-section': 'https-sections', 'https-rule': 'https-rules'}, '1.6.1': {'access-role': 'access-roles', 'threat-profile': 'threat-profiles', 'host': 'hosts', 'network': 'networks', 'address-range': 'address_ranges', 'multicast-address-range': 'multicast-address-ranges', 'security-zone': 'security-zones', 'time': 'times', 'simple-gateway': 'simple-gateways', 'dynamic-object': 'dynamic-objects', 'trusted-client': 'trusted-clients', 'tags': 'tags', 'dns-domain': 'dns-domains', 'opsec-application': 'opsec-applications', 'data-center': 'data-centers', 'data-center-object': 'data-center-objects', 'service-tcp': 'services-tcp', 'service-udp': 'services-udp', 'service-icmp': 'services-icmp', 'service-icmp6': 'services-icmp6', 'service-sctp': 'services-sctp', 'service-rpc': 'services-rpc', 'service-other': 'services-other', 'service-dce-rpc': 'services-dce-rpc', 'application-site': 'applications-sites', 'application-site-category': 'application-site-categories', 'application-site-group': 'application-site-groups', 'vpn-community-meshed': 'vpn-communities-meshed', 'vpn-community-star': 'vpn-communities-star', 'placeholder': 'placeholders', 'administrator': 'administrators', 'group': 'groups', 'group-with-exclusion': 'groups-with-exclusion', 'service-group': 'service-groups', 'time-group': 'time-groups', 'application-group': 'application-groups', 'threat-protection': 'threat-protections', 'exception-group': 'exception-groups', 'generic-object': '', 'access-layer': 'access-layers', 'access-section': 'access-sections', 'access-rule': 'access-rules', 'nat-layer': 'nat-layers', 'nat-section': 'nat-sections', 'nat-rule': 'nat-rules', 'threat-layer': 'threat-layers', 'threat-rule': 'threat-rules', 'threat-exception-section': 'threat-exception-sections', 'threat-exception': 'threat-exceptions', 'wildcard': 'wildcards', 'updatable-object': 'updatable-objects', 'https-layer': 'https-layers', 'https-section': 'https-sections', 'https-rule': 'https-rules'}, '1.7': {'access-role': 'access-roles', 'threat-profile': 'threat-profiles', 'host': 'hosts', 'network': 'networks', 'address-range': 'address_ranges', 'multicast-address-range': 'multicast-address-ranges', 'security-zone': 'security-zones', 'time': 'times', 'simple-gateway': 'simple-gateways', 'dynamic-object': 'dynamic-objects', 'trusted-client': 'trusted-clients', 'tags': 'tags', 'dns-domain': 'dns-domains', 'opsec-application': 'opsec-applications', 'data-center': 'data-centers', 'data-center-object': 'data-center-objects', 'service-tcp': 'services-tcp', 'service-udp': 'services-udp', 'service-icmp': 'services-icmp', 'service-icmp6': 'services-icmp6', 'service-sctp': 'services-sctp', 'service-rpc': 'services-rpc', 'service-other': 'services-other', 'service-dce-rpc': 'services-dce-rpc', 'application-site': 'applications-sites', 'application-site-category': 'application-site-categories', 'application-site-group': 'application-site-groups', 'vpn-community-meshed': 'vpn-communities-meshed', 'vpn-community-star': 'vpn-communities-star', 'placeholder': 'placeholders', 'administrator': 'administrators', 'group': 'groups', 'group-with-exclusion': 'groups-with-exclusion', 'service-group': 'service-groups', 'time-group': 'time-groups', 'application-group': 'application-groups', 'threat-protection': 'threat-protections', 'exception-group': 'exception-groups', 'generic-object': '', 'access-layer': 'access-layers', 'access-section': 'access-sections', 'access-rule': 'access-rules', 'nat-layer': 'nat-layers', 'nat-section': 'nat-sections', 'nat-rule': 'nat-rules', 'threat-layer': 'threat-layers', 'threat-rule': 'threat-rules', 'threat-exception-section': 'threat-exception-sections', 'threat-exception': 'threat-exceptions', 'wildcard': 'wildcards', 'updatable-object': 'updatable-objects', 'https-layer': 'https-layers', 'https-section': 'https-sections', 'https-rule': 'https-rules'}, '1.7.1': {'access-role': 'access-roles', 'threat-profile': 'threat-profiles', 'host': 'hosts', 'network': 'networks', 'address-range': 'address_ranges', 'multicast-address-range': 'multicast-address-ranges', 'security-zone': 'security-zones', 'time': 'times', 'simple-gateway': 'simple-gateways', 'dynamic-object': 'dynamic-objects', 'trusted-client': 'trusted-clients', 'tags': 'tags', 'dns-domain': 'dns-domains', 'opsec-application': 'opsec-applications', 'data-center': 'data-centers', 'data-center-object': 'data-center-objects', 'service-tcp': 'services-tcp', 'service-udp': 'services-udp', 'service-icmp': 'services-icmp', 'service-icmp6': 'services-icmp6', 'service-sctp': 'services-sctp', 'service-rpc': 'services-rpc', 'service-other': 'services-other', 'service-dce-rpc': 'services-dce-rpc', 'application-site': 'applications-sites', 'application-site-category': 'application-site-categories', 'application-site-group': 'application-site-groups', 'vpn-community-meshed': 'vpn-communities-meshed', 'vpn-community-star': 'vpn-communities-star', 'placeholder': 'placeholders', 'administrator': 'administrators', 'group': 'groups', 'group-with-exclusion': 'groups-with-exclusion', 'service-group': 'service-groups', 'time-group': 'time-groups', 'application-group': 'application-groups', 'threat-protection': 'threat-protections', 'exception-group': 'exception-groups', 'generic-object': '', 'access-layer': 'access-layers', 'access-section': 'access-sections', 'access-rule': 'access-rules', 'nat-layer': 'nat-layers', 'nat-section': 'nat-sections', 'nat-rule': 'nat-rules', 'threat-layer': 'threat-layers', 'threat-rule': 'threat-rules', 'threat-exception-section': 'threat-exception-sections', 'threat-exception': 'threat-exceptions', 'wildcard': 'wildcards', 'updatable-object': 'updatable-objects', 'https-layer': 'https-layers', 'https-section': 'https-sections', 'https-rule': 'https-rules'}, '1.8': {'access-role': 'access-roles', 'threat-profile': 'threat-profiles', 'host': 'hosts', 'network': 'networks', 'address-range': 'address_ranges', 'multicast-address-range': 'multicast-address-ranges', 'security-zone': 'security-zones', 'time': 'times', 'simple-gateway': 'simple-gateways', 'dynamic-object': 'dynamic-objects', 'trusted-client': 'trusted-clients', 'tags': 'tags', 'dns-domain': 'dns-domains', 'opsec-application': 'opsec-applications', 'data-center': 'data-centers', 'data-center-object': 'data-center-objects', 'service-tcp': 'services-tcp', 'service-udp': 'services-udp', 'service-icmp': 'services-icmp', 'service-icmp6': 'services-icmp6', 'service-sctp': 'services-sctp', 'service-rpc': 'services-rpc', 'service-other': 'services-other', 'service-dce-rpc': 'services-dce-rpc', 'application-site': 'applications-sites', 'application-site-category': 'application-site-categories', 'application-site-group': 'application-site-groups', 'vpn-community-meshed': 'vpn-communities-meshed', 'vpn-community-star': 'vpn-communities-star', 'placeholder': 'placeholders', 'administrator': 'administrators', 'group': 'groups', 'group-with-exclusion': 'groups-with-exclusion', 'service-group': 'service-groups', 'time-group': 'time-groups', 'application-group': 'application-groups', 'threat-protection': 'threat-protections', 'exception-group': 'exception-groups', 'generic-object': '', 'access-layer': 'access-layers', 'access-section': 'access-sections', 'access-rule': 'access-rules', 'nat-layer': 'nat-layers', 'nat-section': 'nat-sections', 'nat-rule': 'nat-rules', 'threat-layer': 'threat-layers', 'threat-rule': 'threat-rules', 'threat-exception-section': 'threat-exception-sections', 'threat-exception': 'threat-exceptions', 'wildcard': 'wildcards', 'updatable-object': 'updatable-objects', 'https-layer': 'https-layers', 'https-section': 'https-sections', 'https-rule': 'https-rules'}}
unexportable_objects_map = {}
import_priority = {'vpn-community-meshed': 1, 'vpn-community-star': 1, 'group': 2, 'group-with-exclusion': 3, 'service-group': 2, 'time-group': 2, 'application-group': 2}
generic_objects_for_rule_fields = {'source': ['host', 'ip-address'], 'destination': ['host', 'ip-address'], 'vpn': ['vpn-community-star'], 'service': ['service-tcp', 'port'], 'protected-scope': ['multicast-address-range', 'ip-address']}
generic_objects_for_duplicates_in_group_members = {'group': ['host', 'ip-address'], 'service-group': ['service-tcp', 'port'], 'time-group': ['time']}
placeholder_type_by_obj_type = {'DataType': {'type': 'com.checkpoint.management.data_awareness.objects.DataAwarenessCompound'}, 'DropUserCheckInteractionScheme': {'bladeName': 'APPC', 'type': 'com.checkpoint.objects.user_check.DropUserCheckInteractionScheme'}, 'AskUserCheckInteractionScheme': {'bladeName': 'APPC', 'type': 'com.checkpoint.objects.user_check.AskUserCheckInteractionScheme'}, 'InformUserCheckInteractionScheme': {'bladeName': 'APPC', 'type': 'com.checkpoint.objects.user_check.InformUserCheckInteractionScheme'}, 'CpmiGatewayCluster': {'ipsBlade': 'INSTALLED', 'type': 'com.checkpoint.objects.classes.dummy.CpmiGatewayCluster'}, 'CpmiVsClusterNetobj': {'ipsBlade': 'INSTALLED', 'type': 'com.checkpoint.objects.classes.dummy.CpmiGatewayCluster'}, 'CpmiGatewayPlain': {'type': 'com.checkpoint.objects.classes.dummy.CpmiGatewayCkp', 'ipaddr': None, 'vpn1': 'true'}, 'CpmiIcmpService': {'type': 'com.checkpoint.objects.classes.dummy.CpmiIcmpService'}, 'CpmiIcmp6Service': {'type': 'com.checkpoint.objects.classes.dummy.CpmiIcmp6Service'}, 'CpmiAppfwLimit': {'type': 'com.checkpoint.objects.appfw.dummy.CpmiAppfwLimit'}, 'service-other': {'type': 'com.checkpoint.objects.classes.dummy.CpmiOtherService', 'matchExp': 'Dummy Match Expression'}}
group_objects_field = {'group': ['members'], 'vpn-community-star': ['center-gateways', 'satellite-gateways'], 'vpn-community-meshed': ['gateways'], 'service-group': ['members'], 'time-group': ['members'], 'application-site-group': ['members'], 'group-with-exclusion': []}
no_export_fields = {'type'}
no_export_fields_and_subfields = ['read-only', 'layer', 'package', 'owner', 'icon', 'domain', 'from', 'to', 'rulebase', 'uid', 'meta-info', 'parent', 'groups', 'type', 'override-default-settings']
no_export_fields_by_api_type = {'host': ['standard-port-number', 'subnet-mask', 'type'], 'network': ['subnet-mask'], 'threat-rule': ['exceptions', 'exceptions-layer'], 'simple-gateway': ['forward-logs-to-log-server-schedule-name', 'hardware', 'dynamic-ip', 'sic-name', 'sic-state', 'send-alerts-to-server', 'send-logs-to-backup-server', 'send-logs-to-server', 'interfaces'], 'application-site': ['application-id', 'risk', 'user-defined'], 'application-site-category': ['user-defined'], 'data-center-object': ['name-in-data-center', 'data-center', 'data-center-object-meta-info', 'deleted', 'type-in-data-center', 'additional-properties']}
fields_to_change = {'alert-when-free-disk-space-below-metrics': 'free-disk-space-metrics', 'delete-index-files-when-index-size-above-metrics': 'free-disk-space-metrics', 'delete-when-free-disk-space-below-metrics': 'free-disk-space-metrics', 'stop-logging-when-free-disk-space-below-metrics': 'free-disk-space-metrics'}
fields_to_exclude_in_the_presence_of_other_fields = {'maximum-limit-for-concurrent-connections': 'auto-maximum-limit-for-concurrent-connections', 'maximum-memory-pool-size': 'auto-calculate-connections-hash-table-size-and-memory-pool', 'memory-pool-size': 'auto-calculate-connections-hash-table-size-and-memory-pool'}
fields_to_exclude_from_import_by_api_type_and_versions = {'network': {'broadcast': ['1']}}
partially_exportable_types = ['simple-gateway']
special_treatment_types = ['threat-profile']
https_blades_names_map = {'Anti-Virus': 'Anti Virus', 'Anti-Bot': 'Anti Bot', 'URL Filtering': 'Url Filtering', 'Data Loss Prevention': 'DLP', 'Content Awareness': 'Data Awareness'}
commands_support_batch = ['access-role', 'address-range', 'application-site-category', 'application-site-group', 'dns-domain', 'dynamic-object', 'group-with-exclusion', 'host', 'lsv-profile', 'multicast-address-range', 'network', 'package', 'security-zone', 'service-dce-rpc', 'service-group', 'service-icmp', 'service-other', 'service-sctp', 'service-tcp', 'service-udp', 'tacacs-server', 'tacacs-group', 'tag', 'time', 'time-group', 'vpn-community-meshed', 'vpn-community-star', 'wildcard']
rule_support_batch = ['access-rule', 'https-rule', 'nat-rule', 'threat-exception']
not_unique_name_with_dedicated_api = {'Unknown Traffic': 'show-application-site-category'}
types_not_support_tagging = ['rule', 'section', 'threat-exception'] |
class Node:
def __init__(self, node_id, lon, lat, cluster_id_belongto: int):
self.node_id = int(node_id)
self.lon = lon
self.lat = lat
self.cluster_id_belongto = cluster_id_belongto | class Node:
def __init__(self, node_id, lon, lat, cluster_id_belongto: int):
self.node_id = int(node_id)
self.lon = lon
self.lat = lat
self.cluster_id_belongto = cluster_id_belongto |
# cook your dish here
t = int(input()) # Taking the Number of Test Cases
for i in range(t): # Looping over test cases
n = int(input()) # Taking the length of songs input
p = [int(i) for i in input().split()] # Taking the list of song length as input
k = int(input()) # Taking the position of the uncle jhony song(taking indexing from 1)
ele = p[k-1] # Storing that element in a variable (position was taken -1 as indexing of our list is from 0 and user entered according to indexing starting from 1)
for i in range(n): # Here for sorting the list we use bubble sort algorithm
j = 0 # bubble sorting program - line 10 to 14
for j in range(0, n-i-1):
if p[j] > p[j+1]:
p[j], p[j+1] = p[j+1], p[j]
ls = (p.index(ele)) # Now geeting the position of uncle jhony song in sorted list.
print(ls+1) # Printing the position + 1 as the indexing started from 0.
| t = int(input())
for i in range(t):
n = int(input())
p = [int(i) for i in input().split()]
k = int(input())
ele = p[k - 1]
for i in range(n):
j = 0
for j in range(0, n - i - 1):
if p[j] > p[j + 1]:
(p[j], p[j + 1]) = (p[j + 1], p[j])
ls = p.index(ele)
print(ls + 1) |
print("Insert a string")
s = input()
print("Insert the number of times it will be repeated")
n = int(input())
res = ""
for i in range(n):
res = res + s
print(res)
| print('Insert a string')
s = input()
print('Insert the number of times it will be repeated')
n = int(input())
res = ''
for i in range(n):
res = res + s
print(res) |
#Twitter API Credentials
consumer_key = 'consumerkey'
consumer_secret = 'consumersecret'
access_token = 'accesstoken'
access_secret = 'accesssecret'
| consumer_key = 'consumerkey'
consumer_secret = 'consumersecret'
access_token = 'accesstoken'
access_secret = 'accesssecret' |
def findXorSum(arr, n):
Sum = 0
mul = 1
for i in range(30):
c_odd = 0
odd = 0
for j in range(n):
if ((arr[j] & (1 << i)) > 0):
odd = (~odd)
if (odd):
c_odd += 1
for j in range(n):
Sum += (mul * c_odd)%(10**9+7)
if ((arr[j] & (1 << i)) > 0):
c_odd = (n - j - c_odd)
mul *= 2
return Sum%(10**9+7) | def find_xor_sum(arr, n):
sum = 0
mul = 1
for i in range(30):
c_odd = 0
odd = 0
for j in range(n):
if arr[j] & 1 << i > 0:
odd = ~odd
if odd:
c_odd += 1
for j in range(n):
sum += mul * c_odd % (10 ** 9 + 7)
if arr[j] & 1 << i > 0:
c_odd = n - j - c_odd
mul *= 2
return Sum % (10 ** 9 + 7) |
#
# PySNMP MIB module CISCOSB-TBI-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCOSB-TBI-MIB
# Produced by pysmi-0.3.4 at Wed May 1 12:23:42 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, ObjectIdentifier, OctetString = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ConstraintsIntersection, SingleValueConstraint, ValueSizeConstraint, ConstraintsUnion, ValueRangeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "SingleValueConstraint", "ValueSizeConstraint", "ConstraintsUnion", "ValueRangeConstraint")
switch001, = mibBuilder.importSymbols("CISCOSB-MIB", "switch001")
ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup")
NotificationType, TimeTicks, MibIdentifier, Integer32, MibScalar, MibTable, MibTableRow, MibTableColumn, ObjectIdentity, IpAddress, ModuleIdentity, Gauge32, Bits, iso, Counter32, Unsigned32, Counter64 = mibBuilder.importSymbols("SNMPv2-SMI", "NotificationType", "TimeTicks", "MibIdentifier", "Integer32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "ObjectIdentity", "IpAddress", "ModuleIdentity", "Gauge32", "Bits", "iso", "Counter32", "Unsigned32", "Counter64")
RowStatus, DisplayString, TextualConvention, TruthValue = mibBuilder.importSymbols("SNMPv2-TC", "RowStatus", "DisplayString", "TextualConvention", "TruthValue")
rlTBIMib = ModuleIdentity((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 145))
rlTBIMib.setRevisions(('2006-02-12 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: rlTBIMib.setRevisionsDescriptions(('Time Range Infrastructure MIBs initial version. ',))
if mibBuilder.loadTexts: rlTBIMib.setLastUpdated('200604040000Z')
if mibBuilder.loadTexts: rlTBIMib.setOrganization('Cisco Small Business')
if mibBuilder.loadTexts: rlTBIMib.setContactInfo('Postal: 170 West Tasman Drive San Jose , CA 95134-1706 USA Website: Cisco Small Business Home http://www.cisco.com/smb>;, Cisco Small Business Support Community <http://www.cisco.com/go/smallbizsupport>')
if mibBuilder.loadTexts: rlTBIMib.setDescription('Time Range Infrastructure MIBs initial version. ')
rlTBITimeRangeTable = MibTable((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 145, 1), )
if mibBuilder.loadTexts: rlTBITimeRangeTable.setStatus('current')
if mibBuilder.loadTexts: rlTBITimeRangeTable.setDescription('This table specifies Time Based Infra table')
rlTBITimeRangeEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 145, 1, 1), ).setIndexNames((1, "CISCOSB-TBI-MIB", "rlTBITimeRangeName"))
if mibBuilder.loadTexts: rlTBITimeRangeEntry.setStatus('current')
if mibBuilder.loadTexts: rlTBITimeRangeEntry.setDescription('Each entry in this table describes the new time range for ACE. The index is time range name')
rlTBITimeRangeName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 145, 1, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 32)))
if mibBuilder.loadTexts: rlTBITimeRangeName.setStatus('current')
if mibBuilder.loadTexts: rlTBITimeRangeName.setDescription('Name of time range.')
rlTBITimeRangeAbsoluteStart = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 145, 1, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 14))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rlTBITimeRangeAbsoluteStart.setStatus('current')
if mibBuilder.loadTexts: rlTBITimeRangeAbsoluteStart.setDescription('Time of start of absolute time range in following format: month day year hh:mm month: 01-12 (January-December) day: 01-31 year: 0-99 (2000-2099) hh: 0-23 (hours) mm: 0-59 (minutes)')
rlTBITimeRangeAbsoluteEnd = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 145, 1, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 14))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rlTBITimeRangeAbsoluteEnd.setStatus('current')
if mibBuilder.loadTexts: rlTBITimeRangeAbsoluteEnd.setDescription('Time of end of absolute time range in following format: month day year hh:mm month: 01-12 (January-December) day: 01-31 year: 0-99 (2000-2099) hh: 0-23 (hours) mm: 0-59 (minutes)')
rlTBITimeRangeActiveStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 145, 1, 1, 4), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rlTBITimeRangeActiveStatus.setStatus('current')
if mibBuilder.loadTexts: rlTBITimeRangeActiveStatus.setDescription('Shows whether the current time range is active according to the current clock.')
rlTBITimeRangeRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 145, 1, 1, 5), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: rlTBITimeRangeRowStatus.setStatus('current')
if mibBuilder.loadTexts: rlTBITimeRangeRowStatus.setDescription('Row Status. It is used for adding/deleting entries of this table.')
class RlTBIWeekDayList(TextualConvention, Bits):
description = 'Bitmap that includes days of week. Each bit in the bitmap associated with corresponding day of the week.'
status = 'current'
namedValues = NamedValues(("monday", 0), ("tuesday", 1), ("wednesday", 2), ("thursday", 3), ("friday", 4), ("saturday", 5), ("sunday", 6))
rlTBIPeriodicTable = MibTable((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 145, 2), )
if mibBuilder.loadTexts: rlTBIPeriodicTable.setStatus('current')
if mibBuilder.loadTexts: rlTBIPeriodicTable.setDescription('This table specifies Time Based Infra Periodic table')
rlTBIPeriodicEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 145, 2, 1), ).setIndexNames((0, "CISCOSB-TBI-MIB", "rlTBIPeriodicTimeRangeName"), (0, "CISCOSB-TBI-MIB", "rlTBIPeriodicWeekDayList"), (0, "CISCOSB-TBI-MIB", "rlTBIPeriodicStart"), (0, "CISCOSB-TBI-MIB", "rlTBIPeriodicEnd"))
if mibBuilder.loadTexts: rlTBIPeriodicEntry.setStatus('current')
if mibBuilder.loadTexts: rlTBIPeriodicEntry.setDescription('Each entry in this table describes periodic time range.')
rlTBIPeriodicTimeRangeName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 145, 2, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 32)))
if mibBuilder.loadTexts: rlTBIPeriodicTimeRangeName.setStatus('current')
if mibBuilder.loadTexts: rlTBIPeriodicTimeRangeName.setDescription('Time Range Name the periodic is defined on. ')
rlTBIPeriodicWeekDayList = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 145, 2, 1, 2), RlTBIWeekDayList()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rlTBIPeriodicWeekDayList.setStatus('current')
if mibBuilder.loadTexts: rlTBIPeriodicWeekDayList.setDescription('The bitmap allows to user to select periodic time range for several days at once. The periodic range will be associated with specific days when corresponding bits will be set. If at least one bit has been set in the rlTBIPeriodicWeekDayList, the weekday in rlTBIPeriodicStart and rlTBIPeriodicEnd is not relevant and should be set to zero.')
rlTBIPeriodicStart = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 145, 2, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 7))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rlTBIPeriodicStart.setStatus('current')
if mibBuilder.loadTexts: rlTBIPeriodicStart.setDescription('Time of start of periodic time range in following format: weekday hh:mm weekday: 0-7 (0 means the weekday is not specified, 1-7 are weekdays from Monday to Sunday) hh: 0-23 (hours) mm: 0-59 (minutes) Weekday may be 0 only if periodic time range weekdays were specified in rlTBIPeriodicWeekDayList.')
rlTBIPeriodicEnd = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 145, 2, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 7))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: rlTBIPeriodicEnd.setStatus('current')
if mibBuilder.loadTexts: rlTBIPeriodicEnd.setDescription('Time of end of periodic time range in following format: weekday hh:mm weekday: 0-7 (0 means the weekday is not specified, 1-7 are weekdays from Monday to Sunday) hh: 0-23 (hours) mm: 0-59 (minutes) Weekday may be 0 only if periodic time range weekdays were specified in rlTBIPeriodicWeekDayList.')
rlTBIPeriodicRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 145, 2, 1, 5), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: rlTBIPeriodicRowStatus.setStatus('current')
if mibBuilder.loadTexts: rlTBIPeriodicRowStatus.setDescription('Row Status. It is used for adding/deleting entries of this table.')
mibBuilder.exportSymbols("CISCOSB-TBI-MIB", rlTBIPeriodicEnd=rlTBIPeriodicEnd, PYSNMP_MODULE_ID=rlTBIMib, rlTBIPeriodicRowStatus=rlTBIPeriodicRowStatus, rlTBIPeriodicEntry=rlTBIPeriodicEntry, rlTBITimeRangeName=rlTBITimeRangeName, rlTBIPeriodicTimeRangeName=rlTBIPeriodicTimeRangeName, rlTBITimeRangeAbsoluteStart=rlTBITimeRangeAbsoluteStart, rlTBITimeRangeActiveStatus=rlTBITimeRangeActiveStatus, RlTBIWeekDayList=RlTBIWeekDayList, rlTBIPeriodicWeekDayList=rlTBIPeriodicWeekDayList, rlTBIMib=rlTBIMib, rlTBIPeriodicStart=rlTBIPeriodicStart, rlTBITimeRangeAbsoluteEnd=rlTBITimeRangeAbsoluteEnd, rlTBITimeRangeEntry=rlTBITimeRangeEntry, rlTBITimeRangeTable=rlTBITimeRangeTable, rlTBIPeriodicTable=rlTBIPeriodicTable, rlTBITimeRangeRowStatus=rlTBITimeRangeRowStatus)
| (integer, object_identifier, octet_string) = mibBuilder.importSymbols('ASN1', 'Integer', 'ObjectIdentifier', 'OctetString')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(constraints_intersection, single_value_constraint, value_size_constraint, constraints_union, value_range_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsIntersection', 'SingleValueConstraint', 'ValueSizeConstraint', 'ConstraintsUnion', 'ValueRangeConstraint')
(switch001,) = mibBuilder.importSymbols('CISCOSB-MIB', 'switch001')
(module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup')
(notification_type, time_ticks, mib_identifier, integer32, mib_scalar, mib_table, mib_table_row, mib_table_column, object_identity, ip_address, module_identity, gauge32, bits, iso, counter32, unsigned32, counter64) = mibBuilder.importSymbols('SNMPv2-SMI', 'NotificationType', 'TimeTicks', 'MibIdentifier', 'Integer32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'ObjectIdentity', 'IpAddress', 'ModuleIdentity', 'Gauge32', 'Bits', 'iso', 'Counter32', 'Unsigned32', 'Counter64')
(row_status, display_string, textual_convention, truth_value) = mibBuilder.importSymbols('SNMPv2-TC', 'RowStatus', 'DisplayString', 'TextualConvention', 'TruthValue')
rl_tbi_mib = module_identity((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 145))
rlTBIMib.setRevisions(('2006-02-12 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts:
rlTBIMib.setRevisionsDescriptions(('Time Range Infrastructure MIBs initial version. ',))
if mibBuilder.loadTexts:
rlTBIMib.setLastUpdated('200604040000Z')
if mibBuilder.loadTexts:
rlTBIMib.setOrganization('Cisco Small Business')
if mibBuilder.loadTexts:
rlTBIMib.setContactInfo('Postal: 170 West Tasman Drive San Jose , CA 95134-1706 USA Website: Cisco Small Business Home http://www.cisco.com/smb>;, Cisco Small Business Support Community <http://www.cisco.com/go/smallbizsupport>')
if mibBuilder.loadTexts:
rlTBIMib.setDescription('Time Range Infrastructure MIBs initial version. ')
rl_tbi_time_range_table = mib_table((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 145, 1))
if mibBuilder.loadTexts:
rlTBITimeRangeTable.setStatus('current')
if mibBuilder.loadTexts:
rlTBITimeRangeTable.setDescription('This table specifies Time Based Infra table')
rl_tbi_time_range_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 145, 1, 1)).setIndexNames((1, 'CISCOSB-TBI-MIB', 'rlTBITimeRangeName'))
if mibBuilder.loadTexts:
rlTBITimeRangeEntry.setStatus('current')
if mibBuilder.loadTexts:
rlTBITimeRangeEntry.setDescription('Each entry in this table describes the new time range for ACE. The index is time range name')
rl_tbi_time_range_name = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 145, 1, 1, 1), display_string().subtype(subtypeSpec=value_size_constraint(1, 32)))
if mibBuilder.loadTexts:
rlTBITimeRangeName.setStatus('current')
if mibBuilder.loadTexts:
rlTBITimeRangeName.setDescription('Name of time range.')
rl_tbi_time_range_absolute_start = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 145, 1, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(0, 14))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
rlTBITimeRangeAbsoluteStart.setStatus('current')
if mibBuilder.loadTexts:
rlTBITimeRangeAbsoluteStart.setDescription('Time of start of absolute time range in following format: month day year hh:mm month: 01-12 (January-December) day: 01-31 year: 0-99 (2000-2099) hh: 0-23 (hours) mm: 0-59 (minutes)')
rl_tbi_time_range_absolute_end = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 145, 1, 1, 3), display_string().subtype(subtypeSpec=value_size_constraint(0, 14))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
rlTBITimeRangeAbsoluteEnd.setStatus('current')
if mibBuilder.loadTexts:
rlTBITimeRangeAbsoluteEnd.setDescription('Time of end of absolute time range in following format: month day year hh:mm month: 01-12 (January-December) day: 01-31 year: 0-99 (2000-2099) hh: 0-23 (hours) mm: 0-59 (minutes)')
rl_tbi_time_range_active_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 145, 1, 1, 4), truth_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rlTBITimeRangeActiveStatus.setStatus('current')
if mibBuilder.loadTexts:
rlTBITimeRangeActiveStatus.setDescription('Shows whether the current time range is active according to the current clock.')
rl_tbi_time_range_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 145, 1, 1, 5), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
rlTBITimeRangeRowStatus.setStatus('current')
if mibBuilder.loadTexts:
rlTBITimeRangeRowStatus.setDescription('Row Status. It is used for adding/deleting entries of this table.')
class Rltbiweekdaylist(TextualConvention, Bits):
description = 'Bitmap that includes days of week. Each bit in the bitmap associated with corresponding day of the week.'
status = 'current'
named_values = named_values(('monday', 0), ('tuesday', 1), ('wednesday', 2), ('thursday', 3), ('friday', 4), ('saturday', 5), ('sunday', 6))
rl_tbi_periodic_table = mib_table((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 145, 2))
if mibBuilder.loadTexts:
rlTBIPeriodicTable.setStatus('current')
if mibBuilder.loadTexts:
rlTBIPeriodicTable.setDescription('This table specifies Time Based Infra Periodic table')
rl_tbi_periodic_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 145, 2, 1)).setIndexNames((0, 'CISCOSB-TBI-MIB', 'rlTBIPeriodicTimeRangeName'), (0, 'CISCOSB-TBI-MIB', 'rlTBIPeriodicWeekDayList'), (0, 'CISCOSB-TBI-MIB', 'rlTBIPeriodicStart'), (0, 'CISCOSB-TBI-MIB', 'rlTBIPeriodicEnd'))
if mibBuilder.loadTexts:
rlTBIPeriodicEntry.setStatus('current')
if mibBuilder.loadTexts:
rlTBIPeriodicEntry.setDescription('Each entry in this table describes periodic time range.')
rl_tbi_periodic_time_range_name = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 145, 2, 1, 1), display_string().subtype(subtypeSpec=value_size_constraint(1, 32)))
if mibBuilder.loadTexts:
rlTBIPeriodicTimeRangeName.setStatus('current')
if mibBuilder.loadTexts:
rlTBIPeriodicTimeRangeName.setDescription('Time Range Name the periodic is defined on. ')
rl_tbi_periodic_week_day_list = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 145, 2, 1, 2), rl_tbi_week_day_list()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
rlTBIPeriodicWeekDayList.setStatus('current')
if mibBuilder.loadTexts:
rlTBIPeriodicWeekDayList.setDescription('The bitmap allows to user to select periodic time range for several days at once. The periodic range will be associated with specific days when corresponding bits will be set. If at least one bit has been set in the rlTBIPeriodicWeekDayList, the weekday in rlTBIPeriodicStart and rlTBIPeriodicEnd is not relevant and should be set to zero.')
rl_tbi_periodic_start = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 145, 2, 1, 3), display_string().subtype(subtypeSpec=value_size_constraint(0, 7))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
rlTBIPeriodicStart.setStatus('current')
if mibBuilder.loadTexts:
rlTBIPeriodicStart.setDescription('Time of start of periodic time range in following format: weekday hh:mm weekday: 0-7 (0 means the weekday is not specified, 1-7 are weekdays from Monday to Sunday) hh: 0-23 (hours) mm: 0-59 (minutes) Weekday may be 0 only if periodic time range weekdays were specified in rlTBIPeriodicWeekDayList.')
rl_tbi_periodic_end = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 145, 2, 1, 4), display_string().subtype(subtypeSpec=value_size_constraint(0, 7))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
rlTBIPeriodicEnd.setStatus('current')
if mibBuilder.loadTexts:
rlTBIPeriodicEnd.setDescription('Time of end of periodic time range in following format: weekday hh:mm weekday: 0-7 (0 means the weekday is not specified, 1-7 are weekdays from Monday to Sunday) hh: 0-23 (hours) mm: 0-59 (minutes) Weekday may be 0 only if periodic time range weekdays were specified in rlTBIPeriodicWeekDayList.')
rl_tbi_periodic_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 6, 1, 101, 145, 2, 1, 5), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
rlTBIPeriodicRowStatus.setStatus('current')
if mibBuilder.loadTexts:
rlTBIPeriodicRowStatus.setDescription('Row Status. It is used for adding/deleting entries of this table.')
mibBuilder.exportSymbols('CISCOSB-TBI-MIB', rlTBIPeriodicEnd=rlTBIPeriodicEnd, PYSNMP_MODULE_ID=rlTBIMib, rlTBIPeriodicRowStatus=rlTBIPeriodicRowStatus, rlTBIPeriodicEntry=rlTBIPeriodicEntry, rlTBITimeRangeName=rlTBITimeRangeName, rlTBIPeriodicTimeRangeName=rlTBIPeriodicTimeRangeName, rlTBITimeRangeAbsoluteStart=rlTBITimeRangeAbsoluteStart, rlTBITimeRangeActiveStatus=rlTBITimeRangeActiveStatus, RlTBIWeekDayList=RlTBIWeekDayList, rlTBIPeriodicWeekDayList=rlTBIPeriodicWeekDayList, rlTBIMib=rlTBIMib, rlTBIPeriodicStart=rlTBIPeriodicStart, rlTBITimeRangeAbsoluteEnd=rlTBITimeRangeAbsoluteEnd, rlTBITimeRangeEntry=rlTBITimeRangeEntry, rlTBITimeRangeTable=rlTBITimeRangeTable, rlTBIPeriodicTable=rlTBIPeriodicTable, rlTBITimeRangeRowStatus=rlTBITimeRangeRowStatus) |
def pation(nums):
tmp = nums[0]
nums[0] = nums[1]
nums[1] = tmp
return 1
def main():
nums = [3,2,1]
p = pation(nums)
for n in nums:
print(n)
if __name__ == "__main__":
main()
| def pation(nums):
tmp = nums[0]
nums[0] = nums[1]
nums[1] = tmp
return 1
def main():
nums = [3, 2, 1]
p = pation(nums)
for n in nums:
print(n)
if __name__ == '__main__':
main() |
def create_grades_dict(file_name):
file_pointer = open(file_name, 'r')
data = file_pointer.readlines()
no_return_list = []
for item in data:
no_return_list.append(item.strip('\n'))
no_spaces_list =[]
for item in no_return_list:
no_spaces_list.append(item.replace(' ',''))
list_of_lists = []
for x in no_spaces_list:
list_of_lists.append(x.split(','))
tests_list=['Test_1', 'Test_2', 'Test_3', 'Test_4']
dictionary = {}
#making the structure of the dictionary
for student_id in list_of_lists:
dictionary[student_id[0]] = [student_id[1], 0, 0, 0, 0, 0]
#average calculated and saved to dictionary position
for lists in list_of_lists:
average = 0
for x in range(2, len(lists)):
if lists[x] in tests_list:
position_number = tests_list.index(lists[x])+1
dictionary[lists[0]][position_number] = int(lists[x+1])
average += int(lists[lists.index(lists[x])+1])
dictionary[lists[0]][5] = average/4
return dictionary
# Your main program starts below this line
def print_grades(file_name):
# Call your create_grades_dict() function to create the dictionary
grades_dict=create_grades_dict(file_name)
#formatting and printing header
header_list = ["ID", "Name", "Test_1", "Test_2", "Test_3", "Test_4", "Avg."]
print("{0: ^10} | {1: ^16} | {2: ^6} | {3: ^6} | {4: ^6} | {5: ^6} | {6: ^6} |".format(header_list[0], header_list[1], header_list[2],
header_list[3], header_list[4], header_list[5], header_list[6]))
#converting tuple in list
keys_order_list = list(grades_dict.keys())
keys_order_list.sort()
ordered_list = []
for key in keys_order_list:
aux_list = [key]
for item in grades_dict[key]:
aux_list.append(item)
ordered_list.append(aux_list)
#formatting and printing body
for listed in ordered_list:
print("{0:10s} | {1:16s} | {2:6d} | {3:6d} | {4:6d} | {5:6d} | {6:6.2f} |".format(listed[0], listed[1], listed[2],
listed[3], listed[4], listed[5], listed[6]))
print(print_grades('archivo.txt')) | def create_grades_dict(file_name):
file_pointer = open(file_name, 'r')
data = file_pointer.readlines()
no_return_list = []
for item in data:
no_return_list.append(item.strip('\n'))
no_spaces_list = []
for item in no_return_list:
no_spaces_list.append(item.replace(' ', ''))
list_of_lists = []
for x in no_spaces_list:
list_of_lists.append(x.split(','))
tests_list = ['Test_1', 'Test_2', 'Test_3', 'Test_4']
dictionary = {}
for student_id in list_of_lists:
dictionary[student_id[0]] = [student_id[1], 0, 0, 0, 0, 0]
for lists in list_of_lists:
average = 0
for x in range(2, len(lists)):
if lists[x] in tests_list:
position_number = tests_list.index(lists[x]) + 1
dictionary[lists[0]][position_number] = int(lists[x + 1])
average += int(lists[lists.index(lists[x]) + 1])
dictionary[lists[0]][5] = average / 4
return dictionary
def print_grades(file_name):
grades_dict = create_grades_dict(file_name)
header_list = ['ID', 'Name', 'Test_1', 'Test_2', 'Test_3', 'Test_4', 'Avg.']
print('{0: ^10} | {1: ^16} | {2: ^6} | {3: ^6} | {4: ^6} | {5: ^6} | {6: ^6} |'.format(header_list[0], header_list[1], header_list[2], header_list[3], header_list[4], header_list[5], header_list[6]))
keys_order_list = list(grades_dict.keys())
keys_order_list.sort()
ordered_list = []
for key in keys_order_list:
aux_list = [key]
for item in grades_dict[key]:
aux_list.append(item)
ordered_list.append(aux_list)
for listed in ordered_list:
print('{0:10s} | {1:16s} | {2:6d} | {3:6d} | {4:6d} | {5:6d} | {6:6.2f} |'.format(listed[0], listed[1], listed[2], listed[3], listed[4], listed[5], listed[6]))
print(print_grades('archivo.txt')) |
#: docstring for CONSTANT1
CONSTANT1 = ""
CONSTANT2 = ""
| constant1 = ''
constant2 = '' |
l, r = map(int, input().split(" "))
if l == r:
print(l)
else:
print(2)
| (l, r) = map(int, input().split(' '))
if l == r:
print(l)
else:
print(2) |
class Session:
pass
class DB:
@staticmethod
def get_rds_host():
return '127.0.0.1'
def __init__(self, user, password, host, database) -> None:
pass
def getSession(self):
return Session
| class Session:
pass
class Db:
@staticmethod
def get_rds_host():
return '127.0.0.1'
def __init__(self, user, password, host, database) -> None:
pass
def get_session(self):
return Session |
CHAR_PLUS = ord(b'+')
CHAR_NEWLINE = ord(b'\n')
def buffered_blob(handle, bufsize):
backlog = b''
blob = b''
while True:
blob = handle.read(bufsize)
if blob == b'':
# Could be end of files
yield backlog
break
if backlog != b'':
blob = backlog + blob
i = blob.rfind(b'\n@', 0)
# Make sure no quality line was found
if (blob[i-1] == CHAR_PLUS) and (blob[i-2] == CHAR_NEWLINE):
i = blob.rfind(b'\n@', 0, i-2)
backlog = blob[i+1:len(blob)]
yield blob[0:i]
| char_plus = ord(b'+')
char_newline = ord(b'\n')
def buffered_blob(handle, bufsize):
backlog = b''
blob = b''
while True:
blob = handle.read(bufsize)
if blob == b'':
yield backlog
break
if backlog != b'':
blob = backlog + blob
i = blob.rfind(b'\n@', 0)
if blob[i - 1] == CHAR_PLUS and blob[i - 2] == CHAR_NEWLINE:
i = blob.rfind(b'\n@', 0, i - 2)
backlog = blob[i + 1:len(blob)]
yield blob[0:i] |
# general I/O parameters
OUTPUT_TYPE = "images"
LABEL_MAPPING = "pascal"
VIDEO_FILE = "data/videos/Ylojarvi-gridiajo-two-guys-moving.mov"
OUT_RESOLUTION = None # (3840, 2024)
OUTPUT_PATH = "data/predictions/Ylojarvi-gridiajo-two-guys-moving-air-output"
FRAME_OFFSET = 600 # 1560
PROCESS_NUM_FRAMES = 300
COMPRESS_VIDEO = True
# detection algorithm parameters
MODEL = "dauntless-sweep-2_resnet152_pascal-mob-inference.h5"
BACKBONE = "resnet152"
DETECT_EVERY_NTH_FRAME = 60
USE_TRACKING = True
PLOT_OBJECT_SPEED = False
SHOW_DETECTION_N_FRAMES = 30
USE_GPU = False
PROFILE = False
IMAGE_TILING_DIM = 2
IMAGE_MIN_SIDE = 1525
IMAGE_MAX_SIDE = 2025
# Results filtering settings
CONFIDENCE_THRES = 0.1
MAX_DETECTIONS_PER_FRAME = 10000
# Bounding box aggregation settings
MERGE_MODE = "enclose"
MOB_ITERS = 3
BBA_IOU_THRES = 0.001
TOP_K=25
| output_type = 'images'
label_mapping = 'pascal'
video_file = 'data/videos/Ylojarvi-gridiajo-two-guys-moving.mov'
out_resolution = None
output_path = 'data/predictions/Ylojarvi-gridiajo-two-guys-moving-air-output'
frame_offset = 600
process_num_frames = 300
compress_video = True
model = 'dauntless-sweep-2_resnet152_pascal-mob-inference.h5'
backbone = 'resnet152'
detect_every_nth_frame = 60
use_tracking = True
plot_object_speed = False
show_detection_n_frames = 30
use_gpu = False
profile = False
image_tiling_dim = 2
image_min_side = 1525
image_max_side = 2025
confidence_thres = 0.1
max_detections_per_frame = 10000
merge_mode = 'enclose'
mob_iters = 3
bba_iou_thres = 0.001
top_k = 25 |
#!/usr/bin/env python
globaldecls = []
globalvars = {}
def add_new(decl):
if decl:
globaldecls.append(decl)
globalvars[decl.name] = decl
| globaldecls = []
globalvars = {}
def add_new(decl):
if decl:
globaldecls.append(decl)
globalvars[decl.name] = decl |
class BaseClass:
def __str__(self):
return self.__class__.__name__
def get_params(self, deep=True):
pass
def set_params(self, **params):
pass
class BaseTFWrapperSklearn(BaseClass):
def compile_graph(self, input_shapes):
pass
def get_tf_values(self, fetches, feed_dict):
pass
def save(self):
pass
def load(self):
pass
class tf_GAN(BaseTFWrapperSklearn):
def fit(self, Xs):
pass
def generate(self, zs):
pass
class tf_C_GAN(BaseTFWrapperSklearn):
def fit(self, Xs, Ys):
pass
def generate(self, zs, Ys):
pass
class tf_info_GAN(BaseTFWrapperSklearn):
def fit(self, Xs, Ys):
pass
def generate(self, zs, Ys):
pass
class tf_AE(BaseTFWrapperSklearn):
def fit(self, Xs):
pass
def code(self, Xs):
pass
def recon(self, zs):
pass
class tf_VAE(BaseTFWrapperSklearn):
def fit(self, Xs):
pass
def encode(self, Xs):
pass
def decode(self, zs):
pass
class tf_AAE(BaseTFWrapperSklearn):
def fit(self, Xs):
pass
def code(self, Xs):
pass
def recon(self, Xs, zs):
pass
class tf_AAEClassifier(BaseTFWrapperSklearn):
def fit(self, Xs):
pass
def code(self, Xs):
pass
def recon(self, Xs):
pass
def predict(self, Xs):
pass
def score(self, Xs, Ys):
pass
def proba(self, Xs):
pass
class tf_MLPClassifier(BaseTFWrapperSklearn):
def fit(self, Xs, Ys):
pass
def predict(self, Xs):
pass
def score(self, Xs, Ys):
pass
def proba(self, Xs):
pass
| class Baseclass:
def __str__(self):
return self.__class__.__name__
def get_params(self, deep=True):
pass
def set_params(self, **params):
pass
class Basetfwrappersklearn(BaseClass):
def compile_graph(self, input_shapes):
pass
def get_tf_values(self, fetches, feed_dict):
pass
def save(self):
pass
def load(self):
pass
class Tf_Gan(BaseTFWrapperSklearn):
def fit(self, Xs):
pass
def generate(self, zs):
pass
class Tf_C_Gan(BaseTFWrapperSklearn):
def fit(self, Xs, Ys):
pass
def generate(self, zs, Ys):
pass
class Tf_Info_Gan(BaseTFWrapperSklearn):
def fit(self, Xs, Ys):
pass
def generate(self, zs, Ys):
pass
class Tf_Ae(BaseTFWrapperSklearn):
def fit(self, Xs):
pass
def code(self, Xs):
pass
def recon(self, zs):
pass
class Tf_Vae(BaseTFWrapperSklearn):
def fit(self, Xs):
pass
def encode(self, Xs):
pass
def decode(self, zs):
pass
class Tf_Aae(BaseTFWrapperSklearn):
def fit(self, Xs):
pass
def code(self, Xs):
pass
def recon(self, Xs, zs):
pass
class Tf_Aaeclassifier(BaseTFWrapperSklearn):
def fit(self, Xs):
pass
def code(self, Xs):
pass
def recon(self, Xs):
pass
def predict(self, Xs):
pass
def score(self, Xs, Ys):
pass
def proba(self, Xs):
pass
class Tf_Mlpclassifier(BaseTFWrapperSklearn):
def fit(self, Xs, Ys):
pass
def predict(self, Xs):
pass
def score(self, Xs, Ys):
pass
def proba(self, Xs):
pass |
# 289. Game of Life
class Solution:
def gameOfLife2(self, board) -> None:
rows, cols = len(board), len(board[0])
nextState = [row[:] for row in board]
dirs = ((0,1), (1,0), (-1,0), (0,-1), (-1,-1), (-1,1), (1,-1), (1,1))
for i in range(rows):
for j in range(cols):
nbrs = 0
for di, dj in dirs:
if 0 <= i+di < rows and 0 <= j+dj < cols:
nbrs += nextState[i+di][j+dj]
if nextState[i][j] == 1 and (nbrs < 2 or nbrs > 3):
board[i][j] = 0
elif nextState[i][j] == 0 and nbrs == 3:
board[i][j] = 1
return board
def gameOfLife(self, board) -> None:
rows, cols = len(board), len(board[0])
dirs = ((0,1), (1,0), (-1,0), (0,-1), (-1,-1), (-1,1), (1,-1), (1,1))
for i in range(rows):
for j in range(cols):
nbrs = 0
for di, dj in dirs:
if 0 <= i+di < rows and 0 <= j+dj < cols and board[i+di][j+dj] > 0:
nbrs += 1
board[i][j] = nbrs+10 if board[i][j] == 1 else -nbrs
for i in range(rows):
for j in range(cols):
if board[i][j] > 0:
if 12 <= board[i][j] <= 13:
board[i][j] = 1
else:
board[i][j] = 0
elif board[i][j] <= 0:
if board[i][j] == -3:
board[i][j] = 1
else:
board[i][j] = 0
return board
print(Solution().gameOfLife([[1,0,0,0,0,1],[0,0,0,1,1,0],[1,0,1,0,1,0],[1,0,0,0,1,0],[1,1,1,1,0,1],[0,1,1,0,1,0],[1,0,1,0,1,1],[1,0,0,1,1,1],[1,1,0,0,0,0]])) | class Solution:
def game_of_life2(self, board) -> None:
(rows, cols) = (len(board), len(board[0]))
next_state = [row[:] for row in board]
dirs = ((0, 1), (1, 0), (-1, 0), (0, -1), (-1, -1), (-1, 1), (1, -1), (1, 1))
for i in range(rows):
for j in range(cols):
nbrs = 0
for (di, dj) in dirs:
if 0 <= i + di < rows and 0 <= j + dj < cols:
nbrs += nextState[i + di][j + dj]
if nextState[i][j] == 1 and (nbrs < 2 or nbrs > 3):
board[i][j] = 0
elif nextState[i][j] == 0 and nbrs == 3:
board[i][j] = 1
return board
def game_of_life(self, board) -> None:
(rows, cols) = (len(board), len(board[0]))
dirs = ((0, 1), (1, 0), (-1, 0), (0, -1), (-1, -1), (-1, 1), (1, -1), (1, 1))
for i in range(rows):
for j in range(cols):
nbrs = 0
for (di, dj) in dirs:
if 0 <= i + di < rows and 0 <= j + dj < cols and (board[i + di][j + dj] > 0):
nbrs += 1
board[i][j] = nbrs + 10 if board[i][j] == 1 else -nbrs
for i in range(rows):
for j in range(cols):
if board[i][j] > 0:
if 12 <= board[i][j] <= 13:
board[i][j] = 1
else:
board[i][j] = 0
elif board[i][j] <= 0:
if board[i][j] == -3:
board[i][j] = 1
else:
board[i][j] = 0
return board
print(solution().gameOfLife([[1, 0, 0, 0, 0, 1], [0, 0, 0, 1, 1, 0], [1, 0, 1, 0, 1, 0], [1, 0, 0, 0, 1, 0], [1, 1, 1, 1, 0, 1], [0, 1, 1, 0, 1, 0], [1, 0, 1, 0, 1, 1], [1, 0, 0, 1, 1, 1], [1, 1, 0, 0, 0, 0]])) |
'''https://leetcode.com/problems/merge-two-sorted-lists/'''
# Definition for singly-linked list.
class ListNode:
def __init__(self, x):
self.val = x
self.next = None
# Iterative Solution
class Solution:
def mergeTwoLists(self, l1: ListNode, l2: ListNode) -> ListNode:
head = l3 = ListNode(0)
while(l1 is not None and l2 is not None):
if l1.val <=l2.val:
l3.next = ListNode(l1.val)
l3 = l3.next
l1 = l1.next
else:
l3.next = ListNode(l2.val)
l3 = l3.next
l2 = l2.next
while l1:
l3.next = ListNode(l1.val)
l3 = l3.next
l1 = l1.next
while l2:
l3.next = ListNode(l2.val)
l3 = l3.next
l2 = l2.next
return head.next
# Recursive Solution
class Solution:
def mergeTwoLists(self, l1: ListNode, l2: ListNode) -> ListNode:
if not l1 or not l2:
return l1 or l2
if l1.val<l2.val:
l1.next = self.mergeTwoLists(l1.next, l2)
return l1
else:
l2.next = self.mergeTwoLists(l1, l2.next)
return l2 | """https://leetcode.com/problems/merge-two-sorted-lists/"""
class Listnode:
def __init__(self, x):
self.val = x
self.next = None
class Solution:
def merge_two_lists(self, l1: ListNode, l2: ListNode) -> ListNode:
head = l3 = list_node(0)
while l1 is not None and l2 is not None:
if l1.val <= l2.val:
l3.next = list_node(l1.val)
l3 = l3.next
l1 = l1.next
else:
l3.next = list_node(l2.val)
l3 = l3.next
l2 = l2.next
while l1:
l3.next = list_node(l1.val)
l3 = l3.next
l1 = l1.next
while l2:
l3.next = list_node(l2.val)
l3 = l3.next
l2 = l2.next
return head.next
class Solution:
def merge_two_lists(self, l1: ListNode, l2: ListNode) -> ListNode:
if not l1 or not l2:
return l1 or l2
if l1.val < l2.val:
l1.next = self.mergeTwoLists(l1.next, l2)
return l1
else:
l2.next = self.mergeTwoLists(l1, l2.next)
return l2 |
q = {
'get_page_id_from_frontier': "UPDATE crawldb.frontier \
SET occupied=True \
WHERE page_id=( \
SELECT page_id \
FROM crawldb.frontier as f \
LEFT JOIN crawldb.page as p \
ON f.page_id=p.id \
WHERE f.occupied=False AND p.site_id IN (\
SELECT id FROM crawldb.site WHERE next_acces<=NOW() OR next_acces IS NULL) \
ORDER BY time_added \
LIMIT 1) \
RETURNING page_id",
'get_link': "SELECT * FROM crawldb.link WHERE from_page=%s AND to_page=%s",
'get_page_by_id': "SELECT * FROM crawldb.page WHERE id=%s",
'get_site_by_domain': "SELECT * FROM crawldb.site WHERE domain=%s",
'add_to_frontier': "INSERT INTO crawldb.frontier (page_id) VALUES(%s)",
'add_new_page': "INSERT INTO crawldb.page (site_id, page_type_code, url) VALUES (%s, %s, %s) RETURNING id",
'add_pages_to_link': "INSERT INTO crawldb.link (from_page, to_page) VALUES (%s, %s)",
'remove_from_frontier': "DELETE FROM crawldb.frontier WHERE page_id=%s",
'update_page_codes': "UPDATE crawldb.page \
SET page_type_code=%s, http_status_code=%s, accessed_time=NOW() \
WHERE id=%s",
'update_frontier_page_occ&time': "UPDATE crawldb.frontier SET occupied=%s WHERE page_id=%s"
}
| q = {'get_page_id_from_frontier': 'UPDATE crawldb.frontier SET occupied=True WHERE page_id=( SELECT page_id FROM crawldb.frontier as f LEFT JOIN crawldb.page as p ON f.page_id=p.id WHERE f.occupied=False AND p.site_id IN ( SELECT id FROM crawldb.site WHERE next_acces<=NOW() OR next_acces IS NULL) ORDER BY time_added LIMIT 1) RETURNING page_id', 'get_link': 'SELECT * FROM crawldb.link WHERE from_page=%s AND to_page=%s', 'get_page_by_id': 'SELECT * FROM crawldb.page WHERE id=%s', 'get_site_by_domain': 'SELECT * FROM crawldb.site WHERE domain=%s', 'add_to_frontier': 'INSERT INTO crawldb.frontier (page_id) VALUES(%s)', 'add_new_page': 'INSERT INTO crawldb.page (site_id, page_type_code, url) VALUES (%s, %s, %s) RETURNING id', 'add_pages_to_link': 'INSERT INTO crawldb.link (from_page, to_page) VALUES (%s, %s)', 'remove_from_frontier': 'DELETE FROM crawldb.frontier WHERE page_id=%s', 'update_page_codes': 'UPDATE crawldb.page SET page_type_code=%s, http_status_code=%s, accessed_time=NOW() WHERE id=%s', 'update_frontier_page_occ&time': 'UPDATE crawldb.frontier SET occupied=%s WHERE page_id=%s'} |
class NotarizerException(Exception):
def __init__(self, error_code, error_message):
super().__init__(error_message)
self.error_code = error_code
class NoSignatureFound(NotarizerException):
def __init__(self, error_message):
super().__init__(10, error_message)
class InvalidLabelSignature(NotarizerException):
def __init__(self, error_message):
super().__init__(11, error_message)
class VerificationFailure(NotarizerException):
def __init__(self, error_message):
super().__init__(12, error_message)
class ImageNotFound(NotarizerException):
def __init__(self, error_message):
super().__init__(14, error_message)
class SigningError(NotarizerException):
def __init__(self, reason):
super().__init__(16, "Error Creating Signed Docker Image")
self.reason = reason
class PublicKeyNotFound(NotarizerException):
def __init__(self):
super().__init__(13, "No Public Key Provided")
class PrivateKeyNotFound(NotarizerException):
def __init__(self):
super().__init__(15, "No Private Key Provided")
| class Notarizerexception(Exception):
def __init__(self, error_code, error_message):
super().__init__(error_message)
self.error_code = error_code
class Nosignaturefound(NotarizerException):
def __init__(self, error_message):
super().__init__(10, error_message)
class Invalidlabelsignature(NotarizerException):
def __init__(self, error_message):
super().__init__(11, error_message)
class Verificationfailure(NotarizerException):
def __init__(self, error_message):
super().__init__(12, error_message)
class Imagenotfound(NotarizerException):
def __init__(self, error_message):
super().__init__(14, error_message)
class Signingerror(NotarizerException):
def __init__(self, reason):
super().__init__(16, 'Error Creating Signed Docker Image')
self.reason = reason
class Publickeynotfound(NotarizerException):
def __init__(self):
super().__init__(13, 'No Public Key Provided')
class Privatekeynotfound(NotarizerException):
def __init__(self):
super().__init__(15, 'No Private Key Provided') |
with open("input.txt", "r") as file:
numbers = list(map(int, file.readline().split(",")))
boards = []
line = file.readline() # throw away
while line:
board = []
for i in range(5):
line = file.readline()
board.append(list(map(int, filter(lambda x: len(x) > 0, line.strip().split(" ")))))
boards.append(board)
line = file.readline()
board_masks = [([([False for j in range(5)]) for i in range(5)]) for b in range(len(boards))]
bingo_board = 0
numbers_until_bingo = len(numbers)
for k in range(len(boards)):
board = boards[k]
matches = 0
for l in range(numbers_until_bingo):
number = numbers[l]
for i in range(5):
row = board[i]
for j in range(5):
if row[j] == number:
matches += 1
board_masks[k][i][j] = True
if matches >= 5: # can't get a bingo with 4 numbers or less.
current_board_bingo = False
# check rows
for i in range(5):
row = board_masks[k][i]
if sum(row) == 5:
current_board_bingo = True
# check columns
if not current_board_bingo:
for i in range(5):
mask = board_masks[k]
if sum([mask[0][i], mask[1][i], mask[2][i], mask[3][i], mask[4][i]]) == 5:
current_board_bingo = True
if current_board_bingo:
if l < numbers_until_bingo:
numbers_until_bingo = l
bingo_board = k
break
last_number_called = numbers[numbers_until_bingo]
sum_of_umasked_numbers = 0
for i in range(5):
for j in range(5):
if not board_masks[bingo_board][i][j]:
sum_of_umasked_numbers += boards[bingo_board][i][j]
print(sum_of_umasked_numbers * last_number_called) | with open('input.txt', 'r') as file:
numbers = list(map(int, file.readline().split(',')))
boards = []
line = file.readline()
while line:
board = []
for i in range(5):
line = file.readline()
board.append(list(map(int, filter(lambda x: len(x) > 0, line.strip().split(' ')))))
boards.append(board)
line = file.readline()
board_masks = [[[False for j in range(5)] for i in range(5)] for b in range(len(boards))]
bingo_board = 0
numbers_until_bingo = len(numbers)
for k in range(len(boards)):
board = boards[k]
matches = 0
for l in range(numbers_until_bingo):
number = numbers[l]
for i in range(5):
row = board[i]
for j in range(5):
if row[j] == number:
matches += 1
board_masks[k][i][j] = True
if matches >= 5:
current_board_bingo = False
for i in range(5):
row = board_masks[k][i]
if sum(row) == 5:
current_board_bingo = True
if not current_board_bingo:
for i in range(5):
mask = board_masks[k]
if sum([mask[0][i], mask[1][i], mask[2][i], mask[3][i], mask[4][i]]) == 5:
current_board_bingo = True
if current_board_bingo:
if l < numbers_until_bingo:
numbers_until_bingo = l
bingo_board = k
break
last_number_called = numbers[numbers_until_bingo]
sum_of_umasked_numbers = 0
for i in range(5):
for j in range(5):
if not board_masks[bingo_board][i][j]:
sum_of_umasked_numbers += boards[bingo_board][i][j]
print(sum_of_umasked_numbers * last_number_called) |
#
# PySNMP MIB module ELTEX-DOT3-OAM-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ELTEX-DOT3-OAM-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 18:45:44 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, ValueRangeConstraint, ConstraintsIntersection, SingleValueConstraint, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "ValueRangeConstraint", "ConstraintsIntersection", "SingleValueConstraint", "ValueSizeConstraint")
eltexLtd, = mibBuilder.importSymbols("ELTEX-SMI-ACTUAL", "eltexLtd")
ifIndex, = mibBuilder.importSymbols("IF-MIB", "ifIndex")
PortList, = mibBuilder.importSymbols("Q-BRIDGE-MIB", "PortList")
NotificationGroup, ObjectGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ObjectGroup", "ModuleCompliance")
Gauge32, Unsigned32, Integer32, Counter32, Bits, ModuleIdentity, MibIdentifier, IpAddress, TimeTicks, Counter64, iso, ObjectIdentity, MibScalar, MibTable, MibTableRow, MibTableColumn, NotificationType = mibBuilder.importSymbols("SNMPv2-SMI", "Gauge32", "Unsigned32", "Integer32", "Counter32", "Bits", "ModuleIdentity", "MibIdentifier", "IpAddress", "TimeTicks", "Counter64", "iso", "ObjectIdentity", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "NotificationType")
DisplayString, MacAddress, TruthValue, TextualConvention, TimeStamp = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "MacAddress", "TruthValue", "TextualConvention", "TimeStamp")
eltexDot3OamMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 35265, 30))
eltexDot3OamMIB.setRevisions(('2013-02-22 00:00',))
if mibBuilder.loadTexts: eltexDot3OamMIB.setLastUpdated('201302220000Z')
if mibBuilder.loadTexts: eltexDot3OamMIB.setOrganization('Eltex Ent')
eltexDot3OamObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 35265, 30, 1))
eltexDot3OamClearStatistic = MibScalar((1, 3, 6, 1, 4, 1, 35265, 30, 1, 7), PortList()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: eltexDot3OamClearStatistic.setStatus('current')
mibBuilder.exportSymbols("ELTEX-DOT3-OAM-MIB", eltexDot3OamMIB=eltexDot3OamMIB, eltexDot3OamClearStatistic=eltexDot3OamClearStatistic, eltexDot3OamObjects=eltexDot3OamObjects, PYSNMP_MODULE_ID=eltexDot3OamMIB)
| (octet_string, integer, object_identifier) = mibBuilder.importSymbols('ASN1', 'OctetString', 'Integer', 'ObjectIdentifier')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(constraints_union, value_range_constraint, constraints_intersection, single_value_constraint, value_size_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsUnion', 'ValueRangeConstraint', 'ConstraintsIntersection', 'SingleValueConstraint', 'ValueSizeConstraint')
(eltex_ltd,) = mibBuilder.importSymbols('ELTEX-SMI-ACTUAL', 'eltexLtd')
(if_index,) = mibBuilder.importSymbols('IF-MIB', 'ifIndex')
(port_list,) = mibBuilder.importSymbols('Q-BRIDGE-MIB', 'PortList')
(notification_group, object_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ObjectGroup', 'ModuleCompliance')
(gauge32, unsigned32, integer32, counter32, bits, module_identity, mib_identifier, ip_address, time_ticks, counter64, iso, object_identity, mib_scalar, mib_table, mib_table_row, mib_table_column, notification_type) = mibBuilder.importSymbols('SNMPv2-SMI', 'Gauge32', 'Unsigned32', 'Integer32', 'Counter32', 'Bits', 'ModuleIdentity', 'MibIdentifier', 'IpAddress', 'TimeTicks', 'Counter64', 'iso', 'ObjectIdentity', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'NotificationType')
(display_string, mac_address, truth_value, textual_convention, time_stamp) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'MacAddress', 'TruthValue', 'TextualConvention', 'TimeStamp')
eltex_dot3_oam_mib = module_identity((1, 3, 6, 1, 4, 1, 35265, 30))
eltexDot3OamMIB.setRevisions(('2013-02-22 00:00',))
if mibBuilder.loadTexts:
eltexDot3OamMIB.setLastUpdated('201302220000Z')
if mibBuilder.loadTexts:
eltexDot3OamMIB.setOrganization('Eltex Ent')
eltex_dot3_oam_objects = mib_identifier((1, 3, 6, 1, 4, 1, 35265, 30, 1))
eltex_dot3_oam_clear_statistic = mib_scalar((1, 3, 6, 1, 4, 1, 35265, 30, 1, 7), port_list()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
eltexDot3OamClearStatistic.setStatus('current')
mibBuilder.exportSymbols('ELTEX-DOT3-OAM-MIB', eltexDot3OamMIB=eltexDot3OamMIB, eltexDot3OamClearStatistic=eltexDot3OamClearStatistic, eltexDot3OamObjects=eltexDot3OamObjects, PYSNMP_MODULE_ID=eltexDot3OamMIB) |
# operacoes matematica
x = 53
y = 42
# operacoes comuns
soma = x + y
mult = x * y
div = x / y
sub = x - y
# divisao inteira
div_int = x // y
# resto de Divisao
rest_div = x % y
# potencia
potencia = x ** y
print (soma)
print (mult)
print (div)
print (sub)
print ("Divisao inteira")
print (div_int)
print ("resto divisao")
print (rest_div)
print ("potencia")
print (potencia)
| x = 53
y = 42
soma = x + y
mult = x * y
div = x / y
sub = x - y
div_int = x // y
rest_div = x % y
potencia = x ** y
print(soma)
print(mult)
print(div)
print(sub)
print('Divisao inteira')
print(div_int)
print('resto divisao')
print(rest_div)
print('potencia')
print(potencia) |
class Secret:
def __init__(self):
self._secret=99
self.__top_secret=100
x=Secret()
x._secret
x.__top_secret
x._Secret__top_secret | class Secret:
def __init__(self):
self._secret = 99
self.__top_secret = 100
x = secret()
x._secret
x.__top_secret
x._Secret__top_secret |
### ML SPECIFIC FUNCTIONS
### FOR FEATURE ENGINEERING
# ENCODE EVENT -- 1--event, 0--no event
def bin_event(x):
x=int(x)
if(x!=0):
return 1
else:
return 0
# YES OR NO
def bin_weather(x):
x=float(x)
if(x>0):
return 1
else:
return 0
# BIN PRECIPITATION TYPE
def bin_ptype(x):
if(x==1): # None
return 0
else: # rain, snow or sleet
return 0
# BIN IN d_bin SECONDS
d_bin=10
def bin_delay(x):
x=float(x)
if(x<=0):
return 0
else:
return int(x/d_bin)
#BIN IN t_bin DEGREES
t_bin=10
def bin_temp(x):
x=float(x)
if(x<=0):
return 0
else:
return int(x/t_bin)
# PEAK HOUR BIN
def bin_peak(x):
x=float(x)
if(6<=x<=10 or 4<=x<=7):
return 1
else:
return 0
# WEEKDAY BIN
def bin_weekday(x):
x=float(x)
if(x<5):
return 1 # WEEKDAY
else:
return 0 # WEEKEND
# SEASON
def bin_season(x):
x=float(x)
if(x in {1,2,12}):
return 0 # WINTER
elif(x in {3,4,5}):
return 1 # SPRING
elif(x in {9,10,11}):
return 2 # FALL
elif(x in {6,7,8}):
return 3 # SUMMER
else:
print("NOT A VALID MONTH")
return -1 # WRONG
| def bin_event(x):
x = int(x)
if x != 0:
return 1
else:
return 0
def bin_weather(x):
x = float(x)
if x > 0:
return 1
else:
return 0
def bin_ptype(x):
if x == 1:
return 0
else:
return 0
d_bin = 10
def bin_delay(x):
x = float(x)
if x <= 0:
return 0
else:
return int(x / d_bin)
t_bin = 10
def bin_temp(x):
x = float(x)
if x <= 0:
return 0
else:
return int(x / t_bin)
def bin_peak(x):
x = float(x)
if 6 <= x <= 10 or 4 <= x <= 7:
return 1
else:
return 0
def bin_weekday(x):
x = float(x)
if x < 5:
return 1
else:
return 0
def bin_season(x):
x = float(x)
if x in {1, 2, 12}:
return 0
elif x in {3, 4, 5}:
return 1
elif x in {9, 10, 11}:
return 2
elif x in {6, 7, 8}:
return 3
else:
print('NOT A VALID MONTH')
return -1 |
class DependencyException(Exception):
def __init__(self, message, product):
super(Exception, self).__init__(message)
self.message = message
self.product = product
self.do_not_print = True
class SelfUpgradeException(Exception):
def __init__(self, message, parent_pid):
super(Exception, self).__init__(message)
self.message = message
self.parent_pid = parent_pid
class TaskException(Exception):
def __init__(self, message, product, tb):
super(Exception, self).__init__(message)
self.message = message
self.product = product
self.traceback = tb
class ProductNotFoundError(Exception):
pass
class FeedLoaderDownload(Exception):
pass
class ProductError(Exception):
pass | class Dependencyexception(Exception):
def __init__(self, message, product):
super(Exception, self).__init__(message)
self.message = message
self.product = product
self.do_not_print = True
class Selfupgradeexception(Exception):
def __init__(self, message, parent_pid):
super(Exception, self).__init__(message)
self.message = message
self.parent_pid = parent_pid
class Taskexception(Exception):
def __init__(self, message, product, tb):
super(Exception, self).__init__(message)
self.message = message
self.product = product
self.traceback = tb
class Productnotfounderror(Exception):
pass
class Feedloaderdownload(Exception):
pass
class Producterror(Exception):
pass |
for i in incorrect_idx:
print('%d: Predicted %d True label %d' % (i, pred_y[i], test_y[i]))
# Plot two dimensions
_, ax = plt.subplots()
for n in np.unique(test_y):
idx = np.where(test_y == n)[0]
ax.scatter(test_X[idx, 1], test_X[idx, 2], color=f"C{n}", label=f"Class {str(n)}")
for i, marker in zip(incorrect_idx, ['x', 's', 'v']):
ax.scatter(test_X[i, 1], test_X[i, 2], color="darkred", marker=marker, s=40, label=i)
ax.set(xlabel='sepal width [cm]', ylabel='petal length [cm]', title="Iris Classification results")
plt.legend(loc=1, scatterpoints=1); | for i in incorrect_idx:
print('%d: Predicted %d True label %d' % (i, pred_y[i], test_y[i]))
(_, ax) = plt.subplots()
for n in np.unique(test_y):
idx = np.where(test_y == n)[0]
ax.scatter(test_X[idx, 1], test_X[idx, 2], color=f'C{n}', label=f'Class {str(n)}')
for (i, marker) in zip(incorrect_idx, ['x', 's', 'v']):
ax.scatter(test_X[i, 1], test_X[i, 2], color='darkred', marker=marker, s=40, label=i)
ax.set(xlabel='sepal width [cm]', ylabel='petal length [cm]', title='Iris Classification results')
plt.legend(loc=1, scatterpoints=1) |
y_a = [2, 2, -2, -2, -1, -1, 1, 1]
x_a = [1, -1, 1, -1, 2, -2, 2, -2]
s = []
start = list(map(int, input().split()))
stop = list(map(int, input().split()))
q = [start, None]
c = 0
def add_8_paths(p):
for a in range(8):
np = [p[0] + x_a[a], p[1] + y_a[a]]
if np not in q and np not in s and np[0] > 0 and np[1] > 0:
q.append(np)
while 1:
on = q.pop(0)
s.append(on)
if on == stop:
break
elif on == None:
c += 1
q.append(None)
else:
add_8_paths(on)
print(c) | y_a = [2, 2, -2, -2, -1, -1, 1, 1]
x_a = [1, -1, 1, -1, 2, -2, 2, -2]
s = []
start = list(map(int, input().split()))
stop = list(map(int, input().split()))
q = [start, None]
c = 0
def add_8_paths(p):
for a in range(8):
np = [p[0] + x_a[a], p[1] + y_a[a]]
if np not in q and np not in s and (np[0] > 0) and (np[1] > 0):
q.append(np)
while 1:
on = q.pop(0)
s.append(on)
if on == stop:
break
elif on == None:
c += 1
q.append(None)
else:
add_8_paths(on)
print(c) |
# Software released under the MIT license (see project root for license file)
class Header():
def __init__(self):
self.version = 1
self.test_name = "not set"
# ------------------------------------------------------------------------------
class Base:
def __init__(self):
pass
class Derived1(Base):
def __init__(self, i1 = 7, s2 = "Derived2"):
self.i1 = i1
self.s1 = s2
class Derived2(Base):
def __init__(self, i1 = 9, s2 = "Derived2"):
self.i1 = i1
self.s1 = s2
class OuterG:
def __init__(self):
self.v = []
# ------------------------------------------------------------------------------
class A:
def __init__(self, i = 0, s = ""):
self.i1 = i
self.s1 = s
class OuterA:
def __init__(self):
self.v = []
class OuterB:
def __init__(self):
self.v = []
class OuterC:
def __init__(self):
self.v = []
class OuterD:
def __init__(self):
self.v = []
class OuterE:
def __init__(self):
self.v = []
class OuterF:
def __init__(self):
self.v = []
# ------------------------------------------------------------------------------
class IdentityScrambler:
def __init__(self, base_arr = [], seed = 1):
self.base_arr = base_arr
def __call__(self):
return self.base_arr
# ------------------------------------------------------------------------------
| class Header:
def __init__(self):
self.version = 1
self.test_name = 'not set'
class Base:
def __init__(self):
pass
class Derived1(Base):
def __init__(self, i1=7, s2='Derived2'):
self.i1 = i1
self.s1 = s2
class Derived2(Base):
def __init__(self, i1=9, s2='Derived2'):
self.i1 = i1
self.s1 = s2
class Outerg:
def __init__(self):
self.v = []
class A:
def __init__(self, i=0, s=''):
self.i1 = i
self.s1 = s
class Outera:
def __init__(self):
self.v = []
class Outerb:
def __init__(self):
self.v = []
class Outerc:
def __init__(self):
self.v = []
class Outerd:
def __init__(self):
self.v = []
class Outere:
def __init__(self):
self.v = []
class Outerf:
def __init__(self):
self.v = []
class Identityscrambler:
def __init__(self, base_arr=[], seed=1):
self.base_arr = base_arr
def __call__(self):
return self.base_arr |
# This is an example of staring two servo services
# and showing each servo in a separate tab in the browsee
# Start the servo services
s1 = Runtime.createAndStart("Servo1","Servo")
s2 = Runtime.createAndStart("Servo2","Servo")
# Start the webgui service without starting the browser
webgui = Runtime.create("WebGui","WebGui")
webgui.autoStartBrowser(False)
webgui.startService()
# Start the browsers and show the first service ( Servo1 )
webgui.startBrowser("http://localhost:8888/#/service/Servo1")
# Wait a little before executing the second startBrowser to allow
# the first browser to start so that the second service will be shown
# in a new tab. Without the sleep(1) you will probably get two browsers.
sleep(1)
webgui.startBrowser("http://localhost:8888/#/service/Servo2")
| s1 = Runtime.createAndStart('Servo1', 'Servo')
s2 = Runtime.createAndStart('Servo2', 'Servo')
webgui = Runtime.create('WebGui', 'WebGui')
webgui.autoStartBrowser(False)
webgui.startService()
webgui.startBrowser('http://localhost:8888/#/service/Servo1')
sleep(1)
webgui.startBrowser('http://localhost:8888/#/service/Servo2') |
# pylint: disable=missing-function-docstring, missing-module-docstring/
def compare_str_isnot() :
n = 'hello world'
a = 'hello world'
return n is not a
| def compare_str_isnot():
n = 'hello world'
a = 'hello world'
return n is not a |
def calcOccurrences(itemset: list) -> int:
return len(list(filter(lambda x: x == 1, itemset)))
def calcOccurrencesOfBoth(itemset1: list, itemset2: list) -> int:
count: int = 0
for i in range(len(itemset1)):
if itemset1[i] == 1 and itemset2[i] == 1:
count += 1
return count
def support(*itemsets) -> float:
occurrencesOfItem: float = 0
if len(itemsets) == 1:
occurrencesOfItem = calcOccurrences(itemsets[0])
elif len(itemsets) == 2:
occurrencesOfItem = calcOccurrencesOfBoth(itemsets[0], itemsets[1])
return occurrencesOfItem / len(itemsets[0])
def confidence(itemset1: list, itemset2: list) -> float:
supportOfBoth: float = support(itemset1, itemset2)
return supportOfBoth / support(itemset1)
def lift(itemset1: list, itemset2: list):
supportOfBoth = support(itemset1, itemset2)
return supportOfBoth / (support(itemset1) * support(itemset2))
def main():
basket: dict = {
'milk': [1, 1, 1, 0],
'eggs': [1, 1, 0, 1],
'apples': [0, 0, 0, 1],
'bread': [1, 0, 1, 0]
}
print(f'Support {support(basket["milk"])}')
print(f'Confidence {confidence(basket["milk"], basket["eggs"])}')
print(f'Lift {lift(basket["milk"], basket["eggs"])}')
if __name__ == '__main__':
main()
| def calc_occurrences(itemset: list) -> int:
return len(list(filter(lambda x: x == 1, itemset)))
def calc_occurrences_of_both(itemset1: list, itemset2: list) -> int:
count: int = 0
for i in range(len(itemset1)):
if itemset1[i] == 1 and itemset2[i] == 1:
count += 1
return count
def support(*itemsets) -> float:
occurrences_of_item: float = 0
if len(itemsets) == 1:
occurrences_of_item = calc_occurrences(itemsets[0])
elif len(itemsets) == 2:
occurrences_of_item = calc_occurrences_of_both(itemsets[0], itemsets[1])
return occurrencesOfItem / len(itemsets[0])
def confidence(itemset1: list, itemset2: list) -> float:
support_of_both: float = support(itemset1, itemset2)
return supportOfBoth / support(itemset1)
def lift(itemset1: list, itemset2: list):
support_of_both = support(itemset1, itemset2)
return supportOfBoth / (support(itemset1) * support(itemset2))
def main():
basket: dict = {'milk': [1, 1, 1, 0], 'eggs': [1, 1, 0, 1], 'apples': [0, 0, 0, 1], 'bread': [1, 0, 1, 0]}
print(f"Support {support(basket['milk'])}")
print(f"Confidence {confidence(basket['milk'], basket['eggs'])}")
print(f"Lift {lift(basket['milk'], basket['eggs'])}")
if __name__ == '__main__':
main() |
# names = ['LHL','YB','ZSH','LY','DYC']
# # print(str(x[0]) + str(x[1]) + str(x[2]) + str(x[3]) + str(x[4]));
# for name in names:
# print(name.lower().title());
# print("SB:" + name);
# for name in names:
# print(name.lower().title());
# print("SB:" + name);
# for name in names:
# print(name.lower().title());
# print("SB:" + name);
# x = 0;
# print(x);
provinces = [['Kunming','Anning','Dali'],['Beijing'],['Shenzhen','GuangZhou','ZhuHai','Shantou']]
# [Kunming,Anning,Dali]
for province in provinces:
for city in province:
print(city);
| provinces = [['Kunming', 'Anning', 'Dali'], ['Beijing'], ['Shenzhen', 'GuangZhou', 'ZhuHai', 'Shantou']]
for province in provinces:
for city in province:
print(city) |
# Source : https://leetcode.com/problems/minimum-moves-to-convert-string/
# Author : foxfromworld
# Date : 10/12/2021
# First attempt
class Solution:
def minimumMoves(self, s: str) -> int:
index = 0
ret = 0
while index < len(s):
if s[index] == 'X':
ret += 1
index += 3
else:
index += 1
return ret
| class Solution:
def minimum_moves(self, s: str) -> int:
index = 0
ret = 0
while index < len(s):
if s[index] == 'X':
ret += 1
index += 3
else:
index += 1
return ret |
def fact(n):
return 1 if n == 0 else n*fact(n-1)
def comb(n, x):
return fact(n) / (fact(x) * fact(n-x))
def b(x, n, p):
return comb(n, x) * p**x * (1-p)**(n-x)
l, r = list(map(float, input().split(" ")))
odds = l / r
print(round(sum([b(i, 6, odds / (1 + odds)) for i in range(3, 7)]), 3))
| def fact(n):
return 1 if n == 0 else n * fact(n - 1)
def comb(n, x):
return fact(n) / (fact(x) * fact(n - x))
def b(x, n, p):
return comb(n, x) * p ** x * (1 - p) ** (n - x)
(l, r) = list(map(float, input().split(' ')))
odds = l / r
print(round(sum([b(i, 6, odds / (1 + odds)) for i in range(3, 7)]), 3)) |
n, m = map(int, input().split())
for _ in range(n):
if input().find('LOVE') != -1:
print('YES')
exit()
print('NO')
| (n, m) = map(int, input().split())
for _ in range(n):
if input().find('LOVE') != -1:
print('YES')
exit()
print('NO') |
# base path to YOLO directory
MODEL_PATH = "yolo-coco"
# initialize minimum probability to filter weak detections along with
# the threshold when applying non-maxima suppression
MIN_CONF = 0.3
NMS_THRESH = 0.3
# boolean indicating if NVIDIA CUDA GPU should be used
USE_GPU = True
# define the minimum safe distance (in pixels) that two people can be
# from each other
MIN_DISTANCE = 50
FLOWMAP_DISTANCE = 25
FLOWMAP_SIZE = 1000
FLOWMAP_BATCH = 100
BLOCKSIZE_X = 30
BLOCKSIZE_Y = BLOCKSIZE_X
OUTPUT_X = 960
OUTPUT_Y = 540
| model_path = 'yolo-coco'
min_conf = 0.3
nms_thresh = 0.3
use_gpu = True
min_distance = 50
flowmap_distance = 25
flowmap_size = 1000
flowmap_batch = 100
blocksize_x = 30
blocksize_y = BLOCKSIZE_X
output_x = 960
output_y = 540 |
# server.py flask configuration
# To use this file first export this path as SERVER_SETTINGS, before running
# the flask server. i.e. export SERVER_SETTINGS=config.py
LIRC_PATH = "/dev/lirc0"
SAVE_STATE_PATH = "/tmp/heatpump.state" | lirc_path = '/dev/lirc0'
save_state_path = '/tmp/heatpump.state' |
cx = 0
cy = 0
fsize = 0
counter = 0
class FunnyRect():
def setCenter(self, x,y):
self.cx = x
self.cy = y
def setSize(self, size):
self.size = size
def render(self):
rect(self.cx, self.cy, self.size, self.size)
funnyRect0b = FunnyRect()
funnyRect0b1 = FunnyRect()
def setup():
size(600,600)
smooth()
noStroke()
# rectMode(CENTER)
funnyRect0b.setSize(50)
funnyRect0b1.setSize(20)
def draw():
global counter
background(255)
fill(50)
obX = mouseX + sin( counter )*150
obY = mouseY + cos( counter )*150
funnyRect0b.setCenter(mouseX, mouseY)
funnyRect0b.render()
funnyRect0b1.setCenter(obX, obY)
funnyRect0b1.render()
counter+=0.05
| cx = 0
cy = 0
fsize = 0
counter = 0
class Funnyrect:
def set_center(self, x, y):
self.cx = x
self.cy = y
def set_size(self, size):
self.size = size
def render(self):
rect(self.cx, self.cy, self.size, self.size)
funny_rect0b = funny_rect()
funny_rect0b1 = funny_rect()
def setup():
size(600, 600)
smooth()
no_stroke()
funnyRect0b.setSize(50)
funnyRect0b1.setSize(20)
def draw():
global counter
background(255)
fill(50)
ob_x = mouseX + sin(counter) * 150
ob_y = mouseY + cos(counter) * 150
funnyRect0b.setCenter(mouseX, mouseY)
funnyRect0b.render()
funnyRect0b1.setCenter(obX, obY)
funnyRect0b1.render()
counter += 0.05 |
#
# PySNMP MIB module DVMRP-STD-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/DVMRP-STD-MIB
# Produced by pysmi-0.3.4 at Wed May 1 11:17:27 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ConstraintsIntersection, ConstraintsUnion, ValueRangeConstraint, ValueSizeConstraint, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "ConstraintsUnion", "ValueRangeConstraint", "ValueSizeConstraint", "SingleValueConstraint")
InterfaceIndexOrZero, InterfaceIndex = mibBuilder.importSymbols("IF-MIB", "InterfaceIndexOrZero", "InterfaceIndex")
SnmpAdminString, = mibBuilder.importSymbols("SNMP-FRAMEWORK-MIB", "SnmpAdminString")
NotificationGroup, ModuleCompliance, ObjectGroup = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance", "ObjectGroup")
IpAddress, Integer32, iso, experimental, Bits, Gauge32, ObjectIdentity, NotificationType, MibIdentifier, Counter64, ModuleIdentity, Counter32, TimeTicks, Unsigned32, MibScalar, MibTable, MibTableRow, MibTableColumn = mibBuilder.importSymbols("SNMPv2-SMI", "IpAddress", "Integer32", "iso", "experimental", "Bits", "Gauge32", "ObjectIdentity", "NotificationType", "MibIdentifier", "Counter64", "ModuleIdentity", "Counter32", "TimeTicks", "Unsigned32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn")
DisplayString, TextualConvention, RowStatus = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention", "RowStatus")
dvmrpStdMIB = ModuleIdentity((1, 3, 6, 1, 3, 62))
dvmrpStdMIB.setRevisions(('2001-11-21 12:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: dvmrpStdMIB.setRevisionsDescriptions(('Initial version, published as RFC xxxx (to be filled in by RFC-Editor).',))
if mibBuilder.loadTexts: dvmrpStdMIB.setLastUpdated('200111211200Z')
if mibBuilder.loadTexts: dvmrpStdMIB.setOrganization('IETF IDMR Working Group.')
if mibBuilder.loadTexts: dvmrpStdMIB.setContactInfo(' Dave Thaler Microsoft One Microsoft Way Redmond, WA 98052-6399 EMail: dthaler@microsoft.com')
if mibBuilder.loadTexts: dvmrpStdMIB.setDescription('The MIB module for management of DVMRP routers.')
dvmrpMIBObjects = MibIdentifier((1, 3, 6, 1, 3, 62, 1))
dvmrp = MibIdentifier((1, 3, 6, 1, 3, 62, 1, 1))
dvmrpScalar = MibIdentifier((1, 3, 6, 1, 3, 62, 1, 1, 1))
dvmrpVersionString = MibScalar((1, 3, 6, 1, 3, 62, 1, 1, 1, 1), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: dvmrpVersionString.setStatus('current')
if mibBuilder.loadTexts: dvmrpVersionString.setDescription("The router's DVMRP version information. Similar to sysDescr in MIB-II, this is a free-form field which can be used to display vendor-specific information.")
dvmrpNumRoutes = MibScalar((1, 3, 6, 1, 3, 62, 1, 1, 1, 3), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: dvmrpNumRoutes.setStatus('current')
if mibBuilder.loadTexts: dvmrpNumRoutes.setDescription('The number of entries in the routing table. This can be used to monitor the routing table size.')
dvmrpReachableRoutes = MibScalar((1, 3, 6, 1, 3, 62, 1, 1, 1, 4), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: dvmrpReachableRoutes.setStatus('current')
if mibBuilder.loadTexts: dvmrpReachableRoutes.setDescription('The number of entries in the routing table with non infinite metrics. This can be used to detect network partitions by observing the ratio of reachable routes to total routes.')
dvmrpInterfaceTable = MibTable((1, 3, 6, 1, 3, 62, 1, 1, 2), )
if mibBuilder.loadTexts: dvmrpInterfaceTable.setStatus('current')
if mibBuilder.loadTexts: dvmrpInterfaceTable.setDescription("The (conceptual) table listing the router's multicast- capable interfaces.")
dvmrpInterfaceEntry = MibTableRow((1, 3, 6, 1, 3, 62, 1, 1, 2, 1), ).setIndexNames((0, "DVMRP-STD-MIB", "dvmrpInterfaceIndex"))
if mibBuilder.loadTexts: dvmrpInterfaceEntry.setStatus('current')
if mibBuilder.loadTexts: dvmrpInterfaceEntry.setDescription('An entry (conceptual row) in the dvmrpInterfaceTable. This row augments ipMRouteInterfaceEntry in the IP Multicast MIB, where the threshold object resides.')
dvmrpInterfaceIndex = MibTableColumn((1, 3, 6, 1, 3, 62, 1, 1, 2, 1, 1), InterfaceIndex())
if mibBuilder.loadTexts: dvmrpInterfaceIndex.setStatus('current')
if mibBuilder.loadTexts: dvmrpInterfaceIndex.setDescription('The ifIndex value of the interface for which DVMRP is enabled.')
dvmrpInterfaceLocalAddress = MibTableColumn((1, 3, 6, 1, 3, 62, 1, 1, 2, 1, 2), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: dvmrpInterfaceLocalAddress.setStatus('current')
if mibBuilder.loadTexts: dvmrpInterfaceLocalAddress.setDescription('The IP address this system will use as a source address on this interface. On unnumbered interfaces, it must be the same value as dvmrpInterfaceLocalAddress for some interface on the system.')
dvmrpInterfaceMetric = MibTableColumn((1, 3, 6, 1, 3, 62, 1, 1, 2, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 31)).clone(1)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: dvmrpInterfaceMetric.setStatus('current')
if mibBuilder.loadTexts: dvmrpInterfaceMetric.setDescription('The distance metric for this interface which is used to calculate distance vectors.')
dvmrpInterfaceStatus = MibTableColumn((1, 3, 6, 1, 3, 62, 1, 1, 2, 1, 4), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: dvmrpInterfaceStatus.setStatus('current')
if mibBuilder.loadTexts: dvmrpInterfaceStatus.setDescription('The status of this entry. Creating the entry enables DVMRP on the virtual interface; destroying the entry or setting it to notInService disables DVMRP on the virtual interface.')
dvmrpInterfaceRcvBadPkts = MibTableColumn((1, 3, 6, 1, 3, 62, 1, 1, 2, 1, 5), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: dvmrpInterfaceRcvBadPkts.setStatus('current')
if mibBuilder.loadTexts: dvmrpInterfaceRcvBadPkts.setDescription('The number of DVMRP messages received on the interface by the DVMRP process which were subsequently discarded as invalid (e.g. invalid packet format, or a route report from an unknown neighbor).')
dvmrpInterfaceRcvBadRoutes = MibTableColumn((1, 3, 6, 1, 3, 62, 1, 1, 2, 1, 6), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: dvmrpInterfaceRcvBadRoutes.setStatus('current')
if mibBuilder.loadTexts: dvmrpInterfaceRcvBadRoutes.setDescription('The number of routes, in valid DVMRP packets, which were ignored because the entry was invalid.')
dvmrpInterfaceSentRoutes = MibTableColumn((1, 3, 6, 1, 3, 62, 1, 1, 2, 1, 7), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: dvmrpInterfaceSentRoutes.setStatus('current')
if mibBuilder.loadTexts: dvmrpInterfaceSentRoutes.setDescription('The number of routes, in DVMRP Report packets, which have been sent on this interface. Together with dvmrpNeighborRcvRoutes at a peer, this object is useful for detecting routes being lost.')
dvmrpInterfaceKey = MibTableColumn((1, 3, 6, 1, 3, 62, 1, 1, 2, 1, 8), SnmpAdminString()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: dvmrpInterfaceKey.setStatus('current')
if mibBuilder.loadTexts: dvmrpInterfaceKey.setDescription('The (shared) key for authenticating neighbors on this interface. This object is intended solely for the purpose of setting the interface key, and MUST be accessible only via requests using both authentication and privacy. The agent MAY report an empty string in response to get, get- next, get-bulk requests.')
dvmrpInterfaceKeyVersion = MibTableColumn((1, 3, 6, 1, 3, 62, 1, 1, 2, 1, 9), Integer32()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: dvmrpInterfaceKeyVersion.setStatus('current')
if mibBuilder.loadTexts: dvmrpInterfaceKeyVersion.setDescription('The highest version number of all known interface keys for this interface used for authenticating neighbors.')
dvmrpInterfaceGenerationId = MibTableColumn((1, 3, 6, 1, 3, 62, 1, 1, 2, 1, 10), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: dvmrpInterfaceGenerationId.setStatus('current')
if mibBuilder.loadTexts: dvmrpInterfaceGenerationId.setDescription('The generation identifier for the interface. This is used by neighboring routers to detect whether the DVMRP routing table should be resent.')
dvmrpNeighborTable = MibTable((1, 3, 6, 1, 3, 62, 1, 1, 3), )
if mibBuilder.loadTexts: dvmrpNeighborTable.setStatus('current')
if mibBuilder.loadTexts: dvmrpNeighborTable.setDescription("The (conceptual) table listing the router's DVMRP neighbors, as discovered by receiving DVMRP messages.")
dvmrpNeighborEntry = MibTableRow((1, 3, 6, 1, 3, 62, 1, 1, 3, 1), ).setIndexNames((0, "DVMRP-STD-MIB", "dvmrpNeighborIfIndex"), (0, "DVMRP-STD-MIB", "dvmrpNeighborAddress"))
if mibBuilder.loadTexts: dvmrpNeighborEntry.setStatus('current')
if mibBuilder.loadTexts: dvmrpNeighborEntry.setDescription('An entry (conceptual row) in the dvmrpNeighborTable.')
dvmrpNeighborIfIndex = MibTableColumn((1, 3, 6, 1, 3, 62, 1, 1, 3, 1, 1), InterfaceIndex())
if mibBuilder.loadTexts: dvmrpNeighborIfIndex.setStatus('current')
if mibBuilder.loadTexts: dvmrpNeighborIfIndex.setDescription('The value of ifIndex for the virtual interface used to reach this DVMRP neighbor.')
dvmrpNeighborAddress = MibTableColumn((1, 3, 6, 1, 3, 62, 1, 1, 3, 1, 2), IpAddress())
if mibBuilder.loadTexts: dvmrpNeighborAddress.setStatus('current')
if mibBuilder.loadTexts: dvmrpNeighborAddress.setDescription('The IP address of the DVMRP neighbor for which this entry contains information.')
dvmrpNeighborUpTime = MibTableColumn((1, 3, 6, 1, 3, 62, 1, 1, 3, 1, 3), TimeTicks()).setMaxAccess("readonly")
if mibBuilder.loadTexts: dvmrpNeighborUpTime.setStatus('current')
if mibBuilder.loadTexts: dvmrpNeighborUpTime.setDescription('The time since this DVMRP neighbor (last) became a neighbor of the local router.')
dvmrpNeighborExpiryTime = MibTableColumn((1, 3, 6, 1, 3, 62, 1, 1, 3, 1, 4), TimeTicks()).setMaxAccess("readonly")
if mibBuilder.loadTexts: dvmrpNeighborExpiryTime.setStatus('current')
if mibBuilder.loadTexts: dvmrpNeighborExpiryTime.setDescription('The minimum time remaining before this DVMRP neighbor will be aged out.')
dvmrpNeighborGenerationId = MibTableColumn((1, 3, 6, 1, 3, 62, 1, 1, 3, 1, 5), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: dvmrpNeighborGenerationId.setStatus('current')
if mibBuilder.loadTexts: dvmrpNeighborGenerationId.setDescription("The neighboring router's generation identifier.")
dvmrpNeighborMajorVersion = MibTableColumn((1, 3, 6, 1, 3, 62, 1, 1, 3, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: dvmrpNeighborMajorVersion.setStatus('current')
if mibBuilder.loadTexts: dvmrpNeighborMajorVersion.setDescription("The neighboring router's major DVMRP version number.")
dvmrpNeighborMinorVersion = MibTableColumn((1, 3, 6, 1, 3, 62, 1, 1, 3, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: dvmrpNeighborMinorVersion.setStatus('current')
if mibBuilder.loadTexts: dvmrpNeighborMinorVersion.setDescription("The neighboring router's minor DVMRP version number.")
dvmrpNeighborCapabilities = MibTableColumn((1, 3, 6, 1, 3, 62, 1, 1, 3, 1, 8), Bits().clone(namedValues=NamedValues(("leaf", 0), ("prune", 1), ("generationID", 2), ("mtrace", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: dvmrpNeighborCapabilities.setStatus('current')
if mibBuilder.loadTexts: dvmrpNeighborCapabilities.setDescription("This object describes the neighboring router's capabilities. The leaf bit indicates that the neighbor has only one interface with neighbors. The prune bit indicates that the neighbor supports pruning. The generationID bit indicates that the neighbor sends its generationID in Probe messages. The mtrace bit indicates that the neighbor can handle mtrace requests.")
dvmrpNeighborRcvRoutes = MibTableColumn((1, 3, 6, 1, 3, 62, 1, 1, 3, 1, 9), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: dvmrpNeighborRcvRoutes.setStatus('current')
if mibBuilder.loadTexts: dvmrpNeighborRcvRoutes.setDescription('The total number of routes received in valid DVMRP packets received from this neighbor. This can be used to diagnose problems such as unicast route injection, as well as giving an indication of the level of DVMRP route exchange activity.')
dvmrpNeighborRcvBadPkts = MibTableColumn((1, 3, 6, 1, 3, 62, 1, 1, 3, 1, 10), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: dvmrpNeighborRcvBadPkts.setStatus('current')
if mibBuilder.loadTexts: dvmrpNeighborRcvBadPkts.setDescription('The number of packet received from this neighbor which were discarded as invalid.')
dvmrpNeighborRcvBadRoutes = MibTableColumn((1, 3, 6, 1, 3, 62, 1, 1, 3, 1, 11), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: dvmrpNeighborRcvBadRoutes.setStatus('current')
if mibBuilder.loadTexts: dvmrpNeighborRcvBadRoutes.setDescription('The number of routes, in valid DVMRP packets received from this neighbor, which were ignored because the entry was invalid.')
dvmrpNeighborState = MibTableColumn((1, 3, 6, 1, 3, 62, 1, 1, 3, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("oneway", 1), ("active", 2), ("ignoring", 3), ("down", 4)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: dvmrpNeighborState.setStatus('current')
if mibBuilder.loadTexts: dvmrpNeighborState.setDescription('State of the neighbor adjacency.')
dvmrpRouteTable = MibTable((1, 3, 6, 1, 3, 62, 1, 1, 4), )
if mibBuilder.loadTexts: dvmrpRouteTable.setStatus('current')
if mibBuilder.loadTexts: dvmrpRouteTable.setDescription('The table of routes learned through DVMRP route exchange.')
dvmrpRouteEntry = MibTableRow((1, 3, 6, 1, 3, 62, 1, 1, 4, 1), ).setIndexNames((0, "DVMRP-STD-MIB", "dvmrpRouteSource"), (0, "DVMRP-STD-MIB", "dvmrpRouteSourceMask"))
if mibBuilder.loadTexts: dvmrpRouteEntry.setStatus('current')
if mibBuilder.loadTexts: dvmrpRouteEntry.setDescription('An entry (conceptual row) containing the multicast routing information used by DVMRP in place of the unicast routing information.')
dvmrpRouteSource = MibTableColumn((1, 3, 6, 1, 3, 62, 1, 1, 4, 1, 1), IpAddress())
if mibBuilder.loadTexts: dvmrpRouteSource.setStatus('current')
if mibBuilder.loadTexts: dvmrpRouteSource.setDescription('The network address which when combined with the corresponding value of dvmrpRouteSourceMask identifies the sources for which this entry contains multicast routing information.')
dvmrpRouteSourceMask = MibTableColumn((1, 3, 6, 1, 3, 62, 1, 1, 4, 1, 2), IpAddress())
if mibBuilder.loadTexts: dvmrpRouteSourceMask.setStatus('current')
if mibBuilder.loadTexts: dvmrpRouteSourceMask.setDescription('The network mask which when combined with the corresponding value of dvmrpRouteSource identifies the sources for which this entry contains multicast routing information.')
dvmrpRouteUpstreamNeighbor = MibTableColumn((1, 3, 6, 1, 3, 62, 1, 1, 4, 1, 3), IpAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: dvmrpRouteUpstreamNeighbor.setStatus('current')
if mibBuilder.loadTexts: dvmrpRouteUpstreamNeighbor.setDescription('The address of the upstream neighbor (e.g., RPF neighbor) from which IP datagrams from these sources are received.')
dvmrpRouteIfIndex = MibTableColumn((1, 3, 6, 1, 3, 62, 1, 1, 4, 1, 4), InterfaceIndexOrZero()).setMaxAccess("readonly")
if mibBuilder.loadTexts: dvmrpRouteIfIndex.setStatus('current')
if mibBuilder.loadTexts: dvmrpRouteIfIndex.setDescription('The value of ifIndex for the interface on which IP datagrams sent by these sources are received. A value of 0 typically means the route is an aggregate for which no next- hop interface exists.')
dvmrpRouteMetric = MibTableColumn((1, 3, 6, 1, 3, 62, 1, 1, 4, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 32))).setMaxAccess("readonly")
if mibBuilder.loadTexts: dvmrpRouteMetric.setStatus('current')
if mibBuilder.loadTexts: dvmrpRouteMetric.setDescription('The distance in hops to the source subnet.')
dvmrpRouteExpiryTime = MibTableColumn((1, 3, 6, 1, 3, 62, 1, 1, 4, 1, 6), TimeTicks()).setMaxAccess("readonly")
if mibBuilder.loadTexts: dvmrpRouteExpiryTime.setStatus('current')
if mibBuilder.loadTexts: dvmrpRouteExpiryTime.setDescription('The minimum amount of time remaining before this entry will be aged out.')
dvmrpRouteUpTime = MibTableColumn((1, 3, 6, 1, 3, 62, 1, 1, 4, 1, 7), TimeTicks()).setMaxAccess("readonly")
if mibBuilder.loadTexts: dvmrpRouteUpTime.setStatus('current')
if mibBuilder.loadTexts: dvmrpRouteUpTime.setDescription('The time since the route represented by this entry was learned by the router.')
dvmrpRouteNextHopTable = MibTable((1, 3, 6, 1, 3, 62, 1, 1, 5), )
if mibBuilder.loadTexts: dvmrpRouteNextHopTable.setStatus('current')
if mibBuilder.loadTexts: dvmrpRouteNextHopTable.setDescription('The (conceptual) table containing information on the next hops on outgoing interfaces for routing IP multicast datagrams.')
dvmrpRouteNextHopEntry = MibTableRow((1, 3, 6, 1, 3, 62, 1, 1, 5, 1), ).setIndexNames((0, "DVMRP-STD-MIB", "dvmrpRouteNextHopSource"), (0, "DVMRP-STD-MIB", "dvmrpRouteNextHopSourceMask"), (0, "DVMRP-STD-MIB", "dvmrpRouteNextHopIfIndex"))
if mibBuilder.loadTexts: dvmrpRouteNextHopEntry.setStatus('current')
if mibBuilder.loadTexts: dvmrpRouteNextHopEntry.setDescription('An entry (conceptual row) in the list of next hops on outgoing interfaces to which IP multicast datagrams from particular sources are routed.')
dvmrpRouteNextHopSource = MibTableColumn((1, 3, 6, 1, 3, 62, 1, 1, 5, 1, 1), IpAddress())
if mibBuilder.loadTexts: dvmrpRouteNextHopSource.setStatus('current')
if mibBuilder.loadTexts: dvmrpRouteNextHopSource.setDescription('The network address which when combined with the corresponding value of dvmrpRouteNextHopSourceMask identifies the sources for which this entry specifies a next hop on an outgoing interface.')
dvmrpRouteNextHopSourceMask = MibTableColumn((1, 3, 6, 1, 3, 62, 1, 1, 5, 1, 2), IpAddress())
if mibBuilder.loadTexts: dvmrpRouteNextHopSourceMask.setStatus('current')
if mibBuilder.loadTexts: dvmrpRouteNextHopSourceMask.setDescription('The network mask which when combined with the corresponding value of dvmrpRouteNextHopSource identifies the sources for which this entry specifies a next hop on an outgoing interface.')
dvmrpRouteNextHopIfIndex = MibTableColumn((1, 3, 6, 1, 3, 62, 1, 1, 5, 1, 3), InterfaceIndex())
if mibBuilder.loadTexts: dvmrpRouteNextHopIfIndex.setStatus('current')
if mibBuilder.loadTexts: dvmrpRouteNextHopIfIndex.setDescription('The ifIndex value of the interface for the outgoing interface for this next hop.')
dvmrpRouteNextHopType = MibTableColumn((1, 3, 6, 1, 3, 62, 1, 1, 5, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("leaf", 1), ("branch", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: dvmrpRouteNextHopType.setStatus('current')
if mibBuilder.loadTexts: dvmrpRouteNextHopType.setDescription('Type is leaf if no downstream dependent neighbors exist on the outgoing virtual interface. Otherwise, type is branch.')
dvmrpPruneTable = MibTable((1, 3, 6, 1, 3, 62, 1, 1, 6), )
if mibBuilder.loadTexts: dvmrpPruneTable.setStatus('current')
if mibBuilder.loadTexts: dvmrpPruneTable.setDescription("The (conceptual) table listing the router's upstream prune state.")
dvmrpPruneEntry = MibTableRow((1, 3, 6, 1, 3, 62, 1, 1, 6, 1), ).setIndexNames((0, "DVMRP-STD-MIB", "dvmrpPruneGroup"), (0, "DVMRP-STD-MIB", "dvmrpPruneSource"), (0, "DVMRP-STD-MIB", "dvmrpPruneSourceMask"))
if mibBuilder.loadTexts: dvmrpPruneEntry.setStatus('current')
if mibBuilder.loadTexts: dvmrpPruneEntry.setDescription('An entry (conceptual row) in the dvmrpPruneTable.')
dvmrpPruneGroup = MibTableColumn((1, 3, 6, 1, 3, 62, 1, 1, 6, 1, 1), IpAddress())
if mibBuilder.loadTexts: dvmrpPruneGroup.setStatus('current')
if mibBuilder.loadTexts: dvmrpPruneGroup.setDescription('The group address which has been pruned.')
dvmrpPruneSource = MibTableColumn((1, 3, 6, 1, 3, 62, 1, 1, 6, 1, 2), IpAddress())
if mibBuilder.loadTexts: dvmrpPruneSource.setStatus('current')
if mibBuilder.loadTexts: dvmrpPruneSource.setDescription('The address of the source or source network which has been pruned.')
dvmrpPruneSourceMask = MibTableColumn((1, 3, 6, 1, 3, 62, 1, 1, 6, 1, 3), IpAddress())
if mibBuilder.loadTexts: dvmrpPruneSourceMask.setStatus('current')
if mibBuilder.loadTexts: dvmrpPruneSourceMask.setDescription("The address of the source or source network which has been pruned. The mask must either be all 1's, or else dvmrpPruneSource and dvmrpPruneSourceMask must match dvmrpRouteSource and dvmrpRouteSourceMask for some entry in the dvmrpRouteTable.")
dvmrpPruneExpiryTime = MibTableColumn((1, 3, 6, 1, 3, 62, 1, 1, 6, 1, 4), TimeTicks()).setMaxAccess("readonly")
if mibBuilder.loadTexts: dvmrpPruneExpiryTime.setStatus('current')
if mibBuilder.loadTexts: dvmrpPruneExpiryTime.setDescription("The amount of time remaining before this prune should expire at the upstream neighbor. This value should be the minimum of the default prune lifetime and the remaining prune lifetimes of the local router's downstream neighbors, if any.")
dvmrpTraps = MibIdentifier((1, 3, 6, 1, 3, 62, 1, 1, 7))
dvmrpNeighborLoss = NotificationType((1, 3, 6, 1, 3, 62, 1, 1, 7, 1)).setObjects(("DVMRP-STD-MIB", "dvmrpInterfaceLocalAddress"), ("DVMRP-STD-MIB", "dvmrpNeighborState"))
if mibBuilder.loadTexts: dvmrpNeighborLoss.setStatus('current')
if mibBuilder.loadTexts: dvmrpNeighborLoss.setDescription('A dvmrpNeighborLoss trap signifies the loss of a 2-way adjacency with a neighbor. This trap should be generated when the neighbor state changes from active to one-way, ignoring, or down. The trap should be generated only if the router has no other neighbors on the same interface with a lower IP address than itself.')
dvmrpNeighborNotPruning = NotificationType((1, 3, 6, 1, 3, 62, 1, 1, 7, 2)).setObjects(("DVMRP-STD-MIB", "dvmrpInterfaceLocalAddress"), ("DVMRP-STD-MIB", "dvmrpNeighborCapabilities"))
if mibBuilder.loadTexts: dvmrpNeighborNotPruning.setStatus('current')
if mibBuilder.loadTexts: dvmrpNeighborNotPruning.setDescription('A dvmrpNeighborNotPruning trap signifies that a non-pruning neighbor has been detected (in an implementation-dependent manner). This trap should be generated at most once per generation ID of the neighbor. For example, it should be generated at the time a neighbor is first heard from if the prune bit is not set in its capabilities. It should also be generated if the local system has the ability to tell that a neighbor which sets the the prune bit in its capabilities is not pruning any branches over an extended period of time. The trap should be generated only if the router has no other neighbors on the same interface with a lower IP address than itself.')
dvmrpMIBConformance = MibIdentifier((1, 3, 6, 1, 3, 62, 2))
dvmrpMIBCompliances = MibIdentifier((1, 3, 6, 1, 3, 62, 2, 1))
dvmrpMIBGroups = MibIdentifier((1, 3, 6, 1, 3, 62, 2, 2))
dvmrpMIBCompliance = ModuleCompliance((1, 3, 6, 1, 3, 62, 2, 1, 1)).setObjects(("DVMRP-STD-MIB", "dvmrpGeneralGroup"), ("DVMRP-STD-MIB", "dvmrpInterfaceGroup"), ("DVMRP-STD-MIB", "dvmrpNeighborGroup"), ("DVMRP-STD-MIB", "dvmrpRoutingGroup"), ("DVMRP-STD-MIB", "dvmrpTreeGroup"), ("DVMRP-STD-MIB", "dvmrpSecurityGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
dvmrpMIBCompliance = dvmrpMIBCompliance.setStatus('current')
if mibBuilder.loadTexts: dvmrpMIBCompliance.setDescription('The compliance statement for the DVMRP MIB.')
dvmrpGeneralGroup = ObjectGroup((1, 3, 6, 1, 3, 62, 2, 2, 2)).setObjects(("DVMRP-STD-MIB", "dvmrpVersionString"), ("DVMRP-STD-MIB", "dvmrpNumRoutes"), ("DVMRP-STD-MIB", "dvmrpReachableRoutes"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
dvmrpGeneralGroup = dvmrpGeneralGroup.setStatus('current')
if mibBuilder.loadTexts: dvmrpGeneralGroup.setDescription('A collection of objects used to describe general DVMRP configuration information.')
dvmrpInterfaceGroup = ObjectGroup((1, 3, 6, 1, 3, 62, 2, 2, 3)).setObjects(("DVMRP-STD-MIB", "dvmrpInterfaceLocalAddress"), ("DVMRP-STD-MIB", "dvmrpInterfaceMetric"), ("DVMRP-STD-MIB", "dvmrpInterfaceStatus"), ("DVMRP-STD-MIB", "dvmrpInterfaceGenerationId"), ("DVMRP-STD-MIB", "dvmrpInterfaceRcvBadPkts"), ("DVMRP-STD-MIB", "dvmrpInterfaceRcvBadRoutes"), ("DVMRP-STD-MIB", "dvmrpInterfaceSentRoutes"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
dvmrpInterfaceGroup = dvmrpInterfaceGroup.setStatus('current')
if mibBuilder.loadTexts: dvmrpInterfaceGroup.setDescription('A collection of objects used to describe DVMRP interface configuration and statistics.')
dvmrpNeighborGroup = ObjectGroup((1, 3, 6, 1, 3, 62, 2, 2, 4)).setObjects(("DVMRP-STD-MIB", "dvmrpNeighborUpTime"), ("DVMRP-STD-MIB", "dvmrpNeighborExpiryTime"), ("DVMRP-STD-MIB", "dvmrpNeighborGenerationId"), ("DVMRP-STD-MIB", "dvmrpNeighborMajorVersion"), ("DVMRP-STD-MIB", "dvmrpNeighborMinorVersion"), ("DVMRP-STD-MIB", "dvmrpNeighborCapabilities"), ("DVMRP-STD-MIB", "dvmrpNeighborRcvRoutes"), ("DVMRP-STD-MIB", "dvmrpNeighborRcvBadPkts"), ("DVMRP-STD-MIB", "dvmrpNeighborRcvBadRoutes"), ("DVMRP-STD-MIB", "dvmrpNeighborState"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
dvmrpNeighborGroup = dvmrpNeighborGroup.setStatus('current')
if mibBuilder.loadTexts: dvmrpNeighborGroup.setDescription('A collection of objects used to describe DVMRP peer configuration and statistics.')
dvmrpRoutingGroup = ObjectGroup((1, 3, 6, 1, 3, 62, 2, 2, 5)).setObjects(("DVMRP-STD-MIB", "dvmrpRouteUpstreamNeighbor"), ("DVMRP-STD-MIB", "dvmrpRouteIfIndex"), ("DVMRP-STD-MIB", "dvmrpRouteMetric"), ("DVMRP-STD-MIB", "dvmrpRouteExpiryTime"), ("DVMRP-STD-MIB", "dvmrpRouteUpTime"), ("DVMRP-STD-MIB", "dvmrpRouteNextHopType"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
dvmrpRoutingGroup = dvmrpRoutingGroup.setStatus('current')
if mibBuilder.loadTexts: dvmrpRoutingGroup.setDescription('A collection of objects used to store the DVMRP routing table.')
dvmrpSecurityGroup = ObjectGroup((1, 3, 6, 1, 3, 62, 2, 2, 6)).setObjects(("DVMRP-STD-MIB", "dvmrpInterfaceKey"), ("DVMRP-STD-MIB", "dvmrpInterfaceKeyVersion"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
dvmrpSecurityGroup = dvmrpSecurityGroup.setStatus('current')
if mibBuilder.loadTexts: dvmrpSecurityGroup.setDescription('A collection of objects used to store information related to DVMRP security.')
dvmrpTreeGroup = ObjectGroup((1, 3, 6, 1, 3, 62, 2, 2, 7)).setObjects(("DVMRP-STD-MIB", "dvmrpPruneExpiryTime"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
dvmrpTreeGroup = dvmrpTreeGroup.setStatus('current')
if mibBuilder.loadTexts: dvmrpTreeGroup.setDescription('A collection of objects used to store information related to DVMRP prune state.')
dvmrpNotificationGroup = NotificationGroup((1, 3, 6, 1, 3, 62, 2, 2, 8)).setObjects(("DVMRP-STD-MIB", "dvmrpNeighborLoss"), ("DVMRP-STD-MIB", "dvmrpNeighborNotPruning"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
dvmrpNotificationGroup = dvmrpNotificationGroup.setStatus('current')
if mibBuilder.loadTexts: dvmrpNotificationGroup.setDescription('A collection of notifications for signaling important DVMRP events.')
mibBuilder.exportSymbols("DVMRP-STD-MIB", dvmrpStdMIB=dvmrpStdMIB, dvmrpRouteUpstreamNeighbor=dvmrpRouteUpstreamNeighbor, dvmrpInterfaceLocalAddress=dvmrpInterfaceLocalAddress, dvmrpGeneralGroup=dvmrpGeneralGroup, dvmrpRouteNextHopEntry=dvmrpRouteNextHopEntry, dvmrpNumRoutes=dvmrpNumRoutes, dvmrpRouteNextHopSourceMask=dvmrpRouteNextHopSourceMask, dvmrpRouteNextHopSource=dvmrpRouteNextHopSource, dvmrpNeighborMinorVersion=dvmrpNeighborMinorVersion, dvmrpRouteIfIndex=dvmrpRouteIfIndex, dvmrpNeighborRcvRoutes=dvmrpNeighborRcvRoutes, dvmrpRouteMetric=dvmrpRouteMetric, dvmrpScalar=dvmrpScalar, dvmrpNeighborGenerationId=dvmrpNeighborGenerationId, dvmrpPruneTable=dvmrpPruneTable, dvmrpPruneGroup=dvmrpPruneGroup, dvmrpPruneSourceMask=dvmrpPruneSourceMask, dvmrp=dvmrp, dvmrpNeighborCapabilities=dvmrpNeighborCapabilities, dvmrpMIBConformance=dvmrpMIBConformance, dvmrpInterfaceMetric=dvmrpInterfaceMetric, dvmrpInterfaceKey=dvmrpInterfaceKey, dvmrpNeighborAddress=dvmrpNeighborAddress, dvmrpReachableRoutes=dvmrpReachableRoutes, dvmrpRouteTable=dvmrpRouteTable, dvmrpRouteSource=dvmrpRouteSource, dvmrpRouteSourceMask=dvmrpRouteSourceMask, dvmrpNeighborState=dvmrpNeighborState, dvmrpNeighborGroup=dvmrpNeighborGroup, dvmrpRoutingGroup=dvmrpRoutingGroup, dvmrpPruneSource=dvmrpPruneSource, dvmrpTraps=dvmrpTraps, dvmrpNeighborRcvBadPkts=dvmrpNeighborRcvBadPkts, dvmrpInterfaceRcvBadPkts=dvmrpInterfaceRcvBadPkts, dvmrpNeighborTable=dvmrpNeighborTable, dvmrpNeighborLoss=dvmrpNeighborLoss, dvmrpNeighborNotPruning=dvmrpNeighborNotPruning, dvmrpInterfaceTable=dvmrpInterfaceTable, dvmrpMIBGroups=dvmrpMIBGroups, dvmrpInterfaceGroup=dvmrpInterfaceGroup, PYSNMP_MODULE_ID=dvmrpStdMIB, dvmrpNeighborMajorVersion=dvmrpNeighborMajorVersion, dvmrpVersionString=dvmrpVersionString, dvmrpRouteNextHopType=dvmrpRouteNextHopType, dvmrpInterfaceEntry=dvmrpInterfaceEntry, dvmrpPruneEntry=dvmrpPruneEntry, dvmrpInterfaceKeyVersion=dvmrpInterfaceKeyVersion, dvmrpNeighborRcvBadRoutes=dvmrpNeighborRcvBadRoutes, dvmrpInterfaceIndex=dvmrpInterfaceIndex, dvmrpNeighborUpTime=dvmrpNeighborUpTime, dvmrpNeighborEntry=dvmrpNeighborEntry, dvmrpRouteExpiryTime=dvmrpRouteExpiryTime, dvmrpMIBObjects=dvmrpMIBObjects, dvmrpNeighborIfIndex=dvmrpNeighborIfIndex, dvmrpInterfaceStatus=dvmrpInterfaceStatus, dvmrpTreeGroup=dvmrpTreeGroup, dvmrpInterfaceSentRoutes=dvmrpInterfaceSentRoutes, dvmrpNeighborExpiryTime=dvmrpNeighborExpiryTime, dvmrpInterfaceRcvBadRoutes=dvmrpInterfaceRcvBadRoutes, dvmrpMIBCompliances=dvmrpMIBCompliances, dvmrpRouteNextHopIfIndex=dvmrpRouteNextHopIfIndex, dvmrpSecurityGroup=dvmrpSecurityGroup, dvmrpRouteEntry=dvmrpRouteEntry, dvmrpRouteUpTime=dvmrpRouteUpTime, dvmrpRouteNextHopTable=dvmrpRouteNextHopTable, dvmrpPruneExpiryTime=dvmrpPruneExpiryTime, dvmrpNotificationGroup=dvmrpNotificationGroup, dvmrpMIBCompliance=dvmrpMIBCompliance, dvmrpInterfaceGenerationId=dvmrpInterfaceGenerationId)
| (octet_string, object_identifier, integer) = mibBuilder.importSymbols('ASN1', 'OctetString', 'ObjectIdentifier', 'Integer')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(constraints_intersection, constraints_union, value_range_constraint, value_size_constraint, single_value_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsIntersection', 'ConstraintsUnion', 'ValueRangeConstraint', 'ValueSizeConstraint', 'SingleValueConstraint')
(interface_index_or_zero, interface_index) = mibBuilder.importSymbols('IF-MIB', 'InterfaceIndexOrZero', 'InterfaceIndex')
(snmp_admin_string,) = mibBuilder.importSymbols('SNMP-FRAMEWORK-MIB', 'SnmpAdminString')
(notification_group, module_compliance, object_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance', 'ObjectGroup')
(ip_address, integer32, iso, experimental, bits, gauge32, object_identity, notification_type, mib_identifier, counter64, module_identity, counter32, time_ticks, unsigned32, mib_scalar, mib_table, mib_table_row, mib_table_column) = mibBuilder.importSymbols('SNMPv2-SMI', 'IpAddress', 'Integer32', 'iso', 'experimental', 'Bits', 'Gauge32', 'ObjectIdentity', 'NotificationType', 'MibIdentifier', 'Counter64', 'ModuleIdentity', 'Counter32', 'TimeTicks', 'Unsigned32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn')
(display_string, textual_convention, row_status) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention', 'RowStatus')
dvmrp_std_mib = module_identity((1, 3, 6, 1, 3, 62))
dvmrpStdMIB.setRevisions(('2001-11-21 12:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts:
dvmrpStdMIB.setRevisionsDescriptions(('Initial version, published as RFC xxxx (to be filled in by RFC-Editor).',))
if mibBuilder.loadTexts:
dvmrpStdMIB.setLastUpdated('200111211200Z')
if mibBuilder.loadTexts:
dvmrpStdMIB.setOrganization('IETF IDMR Working Group.')
if mibBuilder.loadTexts:
dvmrpStdMIB.setContactInfo(' Dave Thaler Microsoft One Microsoft Way Redmond, WA 98052-6399 EMail: dthaler@microsoft.com')
if mibBuilder.loadTexts:
dvmrpStdMIB.setDescription('The MIB module for management of DVMRP routers.')
dvmrp_mib_objects = mib_identifier((1, 3, 6, 1, 3, 62, 1))
dvmrp = mib_identifier((1, 3, 6, 1, 3, 62, 1, 1))
dvmrp_scalar = mib_identifier((1, 3, 6, 1, 3, 62, 1, 1, 1))
dvmrp_version_string = mib_scalar((1, 3, 6, 1, 3, 62, 1, 1, 1, 1), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dvmrpVersionString.setStatus('current')
if mibBuilder.loadTexts:
dvmrpVersionString.setDescription("The router's DVMRP version information. Similar to sysDescr in MIB-II, this is a free-form field which can be used to display vendor-specific information.")
dvmrp_num_routes = mib_scalar((1, 3, 6, 1, 3, 62, 1, 1, 1, 3), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dvmrpNumRoutes.setStatus('current')
if mibBuilder.loadTexts:
dvmrpNumRoutes.setDescription('The number of entries in the routing table. This can be used to monitor the routing table size.')
dvmrp_reachable_routes = mib_scalar((1, 3, 6, 1, 3, 62, 1, 1, 1, 4), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dvmrpReachableRoutes.setStatus('current')
if mibBuilder.loadTexts:
dvmrpReachableRoutes.setDescription('The number of entries in the routing table with non infinite metrics. This can be used to detect network partitions by observing the ratio of reachable routes to total routes.')
dvmrp_interface_table = mib_table((1, 3, 6, 1, 3, 62, 1, 1, 2))
if mibBuilder.loadTexts:
dvmrpInterfaceTable.setStatus('current')
if mibBuilder.loadTexts:
dvmrpInterfaceTable.setDescription("The (conceptual) table listing the router's multicast- capable interfaces.")
dvmrp_interface_entry = mib_table_row((1, 3, 6, 1, 3, 62, 1, 1, 2, 1)).setIndexNames((0, 'DVMRP-STD-MIB', 'dvmrpInterfaceIndex'))
if mibBuilder.loadTexts:
dvmrpInterfaceEntry.setStatus('current')
if mibBuilder.loadTexts:
dvmrpInterfaceEntry.setDescription('An entry (conceptual row) in the dvmrpInterfaceTable. This row augments ipMRouteInterfaceEntry in the IP Multicast MIB, where the threshold object resides.')
dvmrp_interface_index = mib_table_column((1, 3, 6, 1, 3, 62, 1, 1, 2, 1, 1), interface_index())
if mibBuilder.loadTexts:
dvmrpInterfaceIndex.setStatus('current')
if mibBuilder.loadTexts:
dvmrpInterfaceIndex.setDescription('The ifIndex value of the interface for which DVMRP is enabled.')
dvmrp_interface_local_address = mib_table_column((1, 3, 6, 1, 3, 62, 1, 1, 2, 1, 2), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
dvmrpInterfaceLocalAddress.setStatus('current')
if mibBuilder.loadTexts:
dvmrpInterfaceLocalAddress.setDescription('The IP address this system will use as a source address on this interface. On unnumbered interfaces, it must be the same value as dvmrpInterfaceLocalAddress for some interface on the system.')
dvmrp_interface_metric = mib_table_column((1, 3, 6, 1, 3, 62, 1, 1, 2, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(1, 31)).clone(1)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
dvmrpInterfaceMetric.setStatus('current')
if mibBuilder.loadTexts:
dvmrpInterfaceMetric.setDescription('The distance metric for this interface which is used to calculate distance vectors.')
dvmrp_interface_status = mib_table_column((1, 3, 6, 1, 3, 62, 1, 1, 2, 1, 4), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
dvmrpInterfaceStatus.setStatus('current')
if mibBuilder.loadTexts:
dvmrpInterfaceStatus.setDescription('The status of this entry. Creating the entry enables DVMRP on the virtual interface; destroying the entry or setting it to notInService disables DVMRP on the virtual interface.')
dvmrp_interface_rcv_bad_pkts = mib_table_column((1, 3, 6, 1, 3, 62, 1, 1, 2, 1, 5), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dvmrpInterfaceRcvBadPkts.setStatus('current')
if mibBuilder.loadTexts:
dvmrpInterfaceRcvBadPkts.setDescription('The number of DVMRP messages received on the interface by the DVMRP process which were subsequently discarded as invalid (e.g. invalid packet format, or a route report from an unknown neighbor).')
dvmrp_interface_rcv_bad_routes = mib_table_column((1, 3, 6, 1, 3, 62, 1, 1, 2, 1, 6), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dvmrpInterfaceRcvBadRoutes.setStatus('current')
if mibBuilder.loadTexts:
dvmrpInterfaceRcvBadRoutes.setDescription('The number of routes, in valid DVMRP packets, which were ignored because the entry was invalid.')
dvmrp_interface_sent_routes = mib_table_column((1, 3, 6, 1, 3, 62, 1, 1, 2, 1, 7), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dvmrpInterfaceSentRoutes.setStatus('current')
if mibBuilder.loadTexts:
dvmrpInterfaceSentRoutes.setDescription('The number of routes, in DVMRP Report packets, which have been sent on this interface. Together with dvmrpNeighborRcvRoutes at a peer, this object is useful for detecting routes being lost.')
dvmrp_interface_key = mib_table_column((1, 3, 6, 1, 3, 62, 1, 1, 2, 1, 8), snmp_admin_string()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
dvmrpInterfaceKey.setStatus('current')
if mibBuilder.loadTexts:
dvmrpInterfaceKey.setDescription('The (shared) key for authenticating neighbors on this interface. This object is intended solely for the purpose of setting the interface key, and MUST be accessible only via requests using both authentication and privacy. The agent MAY report an empty string in response to get, get- next, get-bulk requests.')
dvmrp_interface_key_version = mib_table_column((1, 3, 6, 1, 3, 62, 1, 1, 2, 1, 9), integer32()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
dvmrpInterfaceKeyVersion.setStatus('current')
if mibBuilder.loadTexts:
dvmrpInterfaceKeyVersion.setDescription('The highest version number of all known interface keys for this interface used for authenticating neighbors.')
dvmrp_interface_generation_id = mib_table_column((1, 3, 6, 1, 3, 62, 1, 1, 2, 1, 10), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dvmrpInterfaceGenerationId.setStatus('current')
if mibBuilder.loadTexts:
dvmrpInterfaceGenerationId.setDescription('The generation identifier for the interface. This is used by neighboring routers to detect whether the DVMRP routing table should be resent.')
dvmrp_neighbor_table = mib_table((1, 3, 6, 1, 3, 62, 1, 1, 3))
if mibBuilder.loadTexts:
dvmrpNeighborTable.setStatus('current')
if mibBuilder.loadTexts:
dvmrpNeighborTable.setDescription("The (conceptual) table listing the router's DVMRP neighbors, as discovered by receiving DVMRP messages.")
dvmrp_neighbor_entry = mib_table_row((1, 3, 6, 1, 3, 62, 1, 1, 3, 1)).setIndexNames((0, 'DVMRP-STD-MIB', 'dvmrpNeighborIfIndex'), (0, 'DVMRP-STD-MIB', 'dvmrpNeighborAddress'))
if mibBuilder.loadTexts:
dvmrpNeighborEntry.setStatus('current')
if mibBuilder.loadTexts:
dvmrpNeighborEntry.setDescription('An entry (conceptual row) in the dvmrpNeighborTable.')
dvmrp_neighbor_if_index = mib_table_column((1, 3, 6, 1, 3, 62, 1, 1, 3, 1, 1), interface_index())
if mibBuilder.loadTexts:
dvmrpNeighborIfIndex.setStatus('current')
if mibBuilder.loadTexts:
dvmrpNeighborIfIndex.setDescription('The value of ifIndex for the virtual interface used to reach this DVMRP neighbor.')
dvmrp_neighbor_address = mib_table_column((1, 3, 6, 1, 3, 62, 1, 1, 3, 1, 2), ip_address())
if mibBuilder.loadTexts:
dvmrpNeighborAddress.setStatus('current')
if mibBuilder.loadTexts:
dvmrpNeighborAddress.setDescription('The IP address of the DVMRP neighbor for which this entry contains information.')
dvmrp_neighbor_up_time = mib_table_column((1, 3, 6, 1, 3, 62, 1, 1, 3, 1, 3), time_ticks()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dvmrpNeighborUpTime.setStatus('current')
if mibBuilder.loadTexts:
dvmrpNeighborUpTime.setDescription('The time since this DVMRP neighbor (last) became a neighbor of the local router.')
dvmrp_neighbor_expiry_time = mib_table_column((1, 3, 6, 1, 3, 62, 1, 1, 3, 1, 4), time_ticks()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dvmrpNeighborExpiryTime.setStatus('current')
if mibBuilder.loadTexts:
dvmrpNeighborExpiryTime.setDescription('The minimum time remaining before this DVMRP neighbor will be aged out.')
dvmrp_neighbor_generation_id = mib_table_column((1, 3, 6, 1, 3, 62, 1, 1, 3, 1, 5), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dvmrpNeighborGenerationId.setStatus('current')
if mibBuilder.loadTexts:
dvmrpNeighborGenerationId.setDescription("The neighboring router's generation identifier.")
dvmrp_neighbor_major_version = mib_table_column((1, 3, 6, 1, 3, 62, 1, 1, 3, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dvmrpNeighborMajorVersion.setStatus('current')
if mibBuilder.loadTexts:
dvmrpNeighborMajorVersion.setDescription("The neighboring router's major DVMRP version number.")
dvmrp_neighbor_minor_version = mib_table_column((1, 3, 6, 1, 3, 62, 1, 1, 3, 1, 7), integer32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dvmrpNeighborMinorVersion.setStatus('current')
if mibBuilder.loadTexts:
dvmrpNeighborMinorVersion.setDescription("The neighboring router's minor DVMRP version number.")
dvmrp_neighbor_capabilities = mib_table_column((1, 3, 6, 1, 3, 62, 1, 1, 3, 1, 8), bits().clone(namedValues=named_values(('leaf', 0), ('prune', 1), ('generationID', 2), ('mtrace', 3)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dvmrpNeighborCapabilities.setStatus('current')
if mibBuilder.loadTexts:
dvmrpNeighborCapabilities.setDescription("This object describes the neighboring router's capabilities. The leaf bit indicates that the neighbor has only one interface with neighbors. The prune bit indicates that the neighbor supports pruning. The generationID bit indicates that the neighbor sends its generationID in Probe messages. The mtrace bit indicates that the neighbor can handle mtrace requests.")
dvmrp_neighbor_rcv_routes = mib_table_column((1, 3, 6, 1, 3, 62, 1, 1, 3, 1, 9), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dvmrpNeighborRcvRoutes.setStatus('current')
if mibBuilder.loadTexts:
dvmrpNeighborRcvRoutes.setDescription('The total number of routes received in valid DVMRP packets received from this neighbor. This can be used to diagnose problems such as unicast route injection, as well as giving an indication of the level of DVMRP route exchange activity.')
dvmrp_neighbor_rcv_bad_pkts = mib_table_column((1, 3, 6, 1, 3, 62, 1, 1, 3, 1, 10), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dvmrpNeighborRcvBadPkts.setStatus('current')
if mibBuilder.loadTexts:
dvmrpNeighborRcvBadPkts.setDescription('The number of packet received from this neighbor which were discarded as invalid.')
dvmrp_neighbor_rcv_bad_routes = mib_table_column((1, 3, 6, 1, 3, 62, 1, 1, 3, 1, 11), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dvmrpNeighborRcvBadRoutes.setStatus('current')
if mibBuilder.loadTexts:
dvmrpNeighborRcvBadRoutes.setDescription('The number of routes, in valid DVMRP packets received from this neighbor, which were ignored because the entry was invalid.')
dvmrp_neighbor_state = mib_table_column((1, 3, 6, 1, 3, 62, 1, 1, 3, 1, 12), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('oneway', 1), ('active', 2), ('ignoring', 3), ('down', 4)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dvmrpNeighborState.setStatus('current')
if mibBuilder.loadTexts:
dvmrpNeighborState.setDescription('State of the neighbor adjacency.')
dvmrp_route_table = mib_table((1, 3, 6, 1, 3, 62, 1, 1, 4))
if mibBuilder.loadTexts:
dvmrpRouteTable.setStatus('current')
if mibBuilder.loadTexts:
dvmrpRouteTable.setDescription('The table of routes learned through DVMRP route exchange.')
dvmrp_route_entry = mib_table_row((1, 3, 6, 1, 3, 62, 1, 1, 4, 1)).setIndexNames((0, 'DVMRP-STD-MIB', 'dvmrpRouteSource'), (0, 'DVMRP-STD-MIB', 'dvmrpRouteSourceMask'))
if mibBuilder.loadTexts:
dvmrpRouteEntry.setStatus('current')
if mibBuilder.loadTexts:
dvmrpRouteEntry.setDescription('An entry (conceptual row) containing the multicast routing information used by DVMRP in place of the unicast routing information.')
dvmrp_route_source = mib_table_column((1, 3, 6, 1, 3, 62, 1, 1, 4, 1, 1), ip_address())
if mibBuilder.loadTexts:
dvmrpRouteSource.setStatus('current')
if mibBuilder.loadTexts:
dvmrpRouteSource.setDescription('The network address which when combined with the corresponding value of dvmrpRouteSourceMask identifies the sources for which this entry contains multicast routing information.')
dvmrp_route_source_mask = mib_table_column((1, 3, 6, 1, 3, 62, 1, 1, 4, 1, 2), ip_address())
if mibBuilder.loadTexts:
dvmrpRouteSourceMask.setStatus('current')
if mibBuilder.loadTexts:
dvmrpRouteSourceMask.setDescription('The network mask which when combined with the corresponding value of dvmrpRouteSource identifies the sources for which this entry contains multicast routing information.')
dvmrp_route_upstream_neighbor = mib_table_column((1, 3, 6, 1, 3, 62, 1, 1, 4, 1, 3), ip_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dvmrpRouteUpstreamNeighbor.setStatus('current')
if mibBuilder.loadTexts:
dvmrpRouteUpstreamNeighbor.setDescription('The address of the upstream neighbor (e.g., RPF neighbor) from which IP datagrams from these sources are received.')
dvmrp_route_if_index = mib_table_column((1, 3, 6, 1, 3, 62, 1, 1, 4, 1, 4), interface_index_or_zero()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dvmrpRouteIfIndex.setStatus('current')
if mibBuilder.loadTexts:
dvmrpRouteIfIndex.setDescription('The value of ifIndex for the interface on which IP datagrams sent by these sources are received. A value of 0 typically means the route is an aggregate for which no next- hop interface exists.')
dvmrp_route_metric = mib_table_column((1, 3, 6, 1, 3, 62, 1, 1, 4, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(1, 32))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dvmrpRouteMetric.setStatus('current')
if mibBuilder.loadTexts:
dvmrpRouteMetric.setDescription('The distance in hops to the source subnet.')
dvmrp_route_expiry_time = mib_table_column((1, 3, 6, 1, 3, 62, 1, 1, 4, 1, 6), time_ticks()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dvmrpRouteExpiryTime.setStatus('current')
if mibBuilder.loadTexts:
dvmrpRouteExpiryTime.setDescription('The minimum amount of time remaining before this entry will be aged out.')
dvmrp_route_up_time = mib_table_column((1, 3, 6, 1, 3, 62, 1, 1, 4, 1, 7), time_ticks()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dvmrpRouteUpTime.setStatus('current')
if mibBuilder.loadTexts:
dvmrpRouteUpTime.setDescription('The time since the route represented by this entry was learned by the router.')
dvmrp_route_next_hop_table = mib_table((1, 3, 6, 1, 3, 62, 1, 1, 5))
if mibBuilder.loadTexts:
dvmrpRouteNextHopTable.setStatus('current')
if mibBuilder.loadTexts:
dvmrpRouteNextHopTable.setDescription('The (conceptual) table containing information on the next hops on outgoing interfaces for routing IP multicast datagrams.')
dvmrp_route_next_hop_entry = mib_table_row((1, 3, 6, 1, 3, 62, 1, 1, 5, 1)).setIndexNames((0, 'DVMRP-STD-MIB', 'dvmrpRouteNextHopSource'), (0, 'DVMRP-STD-MIB', 'dvmrpRouteNextHopSourceMask'), (0, 'DVMRP-STD-MIB', 'dvmrpRouteNextHopIfIndex'))
if mibBuilder.loadTexts:
dvmrpRouteNextHopEntry.setStatus('current')
if mibBuilder.loadTexts:
dvmrpRouteNextHopEntry.setDescription('An entry (conceptual row) in the list of next hops on outgoing interfaces to which IP multicast datagrams from particular sources are routed.')
dvmrp_route_next_hop_source = mib_table_column((1, 3, 6, 1, 3, 62, 1, 1, 5, 1, 1), ip_address())
if mibBuilder.loadTexts:
dvmrpRouteNextHopSource.setStatus('current')
if mibBuilder.loadTexts:
dvmrpRouteNextHopSource.setDescription('The network address which when combined with the corresponding value of dvmrpRouteNextHopSourceMask identifies the sources for which this entry specifies a next hop on an outgoing interface.')
dvmrp_route_next_hop_source_mask = mib_table_column((1, 3, 6, 1, 3, 62, 1, 1, 5, 1, 2), ip_address())
if mibBuilder.loadTexts:
dvmrpRouteNextHopSourceMask.setStatus('current')
if mibBuilder.loadTexts:
dvmrpRouteNextHopSourceMask.setDescription('The network mask which when combined with the corresponding value of dvmrpRouteNextHopSource identifies the sources for which this entry specifies a next hop on an outgoing interface.')
dvmrp_route_next_hop_if_index = mib_table_column((1, 3, 6, 1, 3, 62, 1, 1, 5, 1, 3), interface_index())
if mibBuilder.loadTexts:
dvmrpRouteNextHopIfIndex.setStatus('current')
if mibBuilder.loadTexts:
dvmrpRouteNextHopIfIndex.setDescription('The ifIndex value of the interface for the outgoing interface for this next hop.')
dvmrp_route_next_hop_type = mib_table_column((1, 3, 6, 1, 3, 62, 1, 1, 5, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('leaf', 1), ('branch', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dvmrpRouteNextHopType.setStatus('current')
if mibBuilder.loadTexts:
dvmrpRouteNextHopType.setDescription('Type is leaf if no downstream dependent neighbors exist on the outgoing virtual interface. Otherwise, type is branch.')
dvmrp_prune_table = mib_table((1, 3, 6, 1, 3, 62, 1, 1, 6))
if mibBuilder.loadTexts:
dvmrpPruneTable.setStatus('current')
if mibBuilder.loadTexts:
dvmrpPruneTable.setDescription("The (conceptual) table listing the router's upstream prune state.")
dvmrp_prune_entry = mib_table_row((1, 3, 6, 1, 3, 62, 1, 1, 6, 1)).setIndexNames((0, 'DVMRP-STD-MIB', 'dvmrpPruneGroup'), (0, 'DVMRP-STD-MIB', 'dvmrpPruneSource'), (0, 'DVMRP-STD-MIB', 'dvmrpPruneSourceMask'))
if mibBuilder.loadTexts:
dvmrpPruneEntry.setStatus('current')
if mibBuilder.loadTexts:
dvmrpPruneEntry.setDescription('An entry (conceptual row) in the dvmrpPruneTable.')
dvmrp_prune_group = mib_table_column((1, 3, 6, 1, 3, 62, 1, 1, 6, 1, 1), ip_address())
if mibBuilder.loadTexts:
dvmrpPruneGroup.setStatus('current')
if mibBuilder.loadTexts:
dvmrpPruneGroup.setDescription('The group address which has been pruned.')
dvmrp_prune_source = mib_table_column((1, 3, 6, 1, 3, 62, 1, 1, 6, 1, 2), ip_address())
if mibBuilder.loadTexts:
dvmrpPruneSource.setStatus('current')
if mibBuilder.loadTexts:
dvmrpPruneSource.setDescription('The address of the source or source network which has been pruned.')
dvmrp_prune_source_mask = mib_table_column((1, 3, 6, 1, 3, 62, 1, 1, 6, 1, 3), ip_address())
if mibBuilder.loadTexts:
dvmrpPruneSourceMask.setStatus('current')
if mibBuilder.loadTexts:
dvmrpPruneSourceMask.setDescription("The address of the source or source network which has been pruned. The mask must either be all 1's, or else dvmrpPruneSource and dvmrpPruneSourceMask must match dvmrpRouteSource and dvmrpRouteSourceMask for some entry in the dvmrpRouteTable.")
dvmrp_prune_expiry_time = mib_table_column((1, 3, 6, 1, 3, 62, 1, 1, 6, 1, 4), time_ticks()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
dvmrpPruneExpiryTime.setStatus('current')
if mibBuilder.loadTexts:
dvmrpPruneExpiryTime.setDescription("The amount of time remaining before this prune should expire at the upstream neighbor. This value should be the minimum of the default prune lifetime and the remaining prune lifetimes of the local router's downstream neighbors, if any.")
dvmrp_traps = mib_identifier((1, 3, 6, 1, 3, 62, 1, 1, 7))
dvmrp_neighbor_loss = notification_type((1, 3, 6, 1, 3, 62, 1, 1, 7, 1)).setObjects(('DVMRP-STD-MIB', 'dvmrpInterfaceLocalAddress'), ('DVMRP-STD-MIB', 'dvmrpNeighborState'))
if mibBuilder.loadTexts:
dvmrpNeighborLoss.setStatus('current')
if mibBuilder.loadTexts:
dvmrpNeighborLoss.setDescription('A dvmrpNeighborLoss trap signifies the loss of a 2-way adjacency with a neighbor. This trap should be generated when the neighbor state changes from active to one-way, ignoring, or down. The trap should be generated only if the router has no other neighbors on the same interface with a lower IP address than itself.')
dvmrp_neighbor_not_pruning = notification_type((1, 3, 6, 1, 3, 62, 1, 1, 7, 2)).setObjects(('DVMRP-STD-MIB', 'dvmrpInterfaceLocalAddress'), ('DVMRP-STD-MIB', 'dvmrpNeighborCapabilities'))
if mibBuilder.loadTexts:
dvmrpNeighborNotPruning.setStatus('current')
if mibBuilder.loadTexts:
dvmrpNeighborNotPruning.setDescription('A dvmrpNeighborNotPruning trap signifies that a non-pruning neighbor has been detected (in an implementation-dependent manner). This trap should be generated at most once per generation ID of the neighbor. For example, it should be generated at the time a neighbor is first heard from if the prune bit is not set in its capabilities. It should also be generated if the local system has the ability to tell that a neighbor which sets the the prune bit in its capabilities is not pruning any branches over an extended period of time. The trap should be generated only if the router has no other neighbors on the same interface with a lower IP address than itself.')
dvmrp_mib_conformance = mib_identifier((1, 3, 6, 1, 3, 62, 2))
dvmrp_mib_compliances = mib_identifier((1, 3, 6, 1, 3, 62, 2, 1))
dvmrp_mib_groups = mib_identifier((1, 3, 6, 1, 3, 62, 2, 2))
dvmrp_mib_compliance = module_compliance((1, 3, 6, 1, 3, 62, 2, 1, 1)).setObjects(('DVMRP-STD-MIB', 'dvmrpGeneralGroup'), ('DVMRP-STD-MIB', 'dvmrpInterfaceGroup'), ('DVMRP-STD-MIB', 'dvmrpNeighborGroup'), ('DVMRP-STD-MIB', 'dvmrpRoutingGroup'), ('DVMRP-STD-MIB', 'dvmrpTreeGroup'), ('DVMRP-STD-MIB', 'dvmrpSecurityGroup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
dvmrp_mib_compliance = dvmrpMIBCompliance.setStatus('current')
if mibBuilder.loadTexts:
dvmrpMIBCompliance.setDescription('The compliance statement for the DVMRP MIB.')
dvmrp_general_group = object_group((1, 3, 6, 1, 3, 62, 2, 2, 2)).setObjects(('DVMRP-STD-MIB', 'dvmrpVersionString'), ('DVMRP-STD-MIB', 'dvmrpNumRoutes'), ('DVMRP-STD-MIB', 'dvmrpReachableRoutes'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
dvmrp_general_group = dvmrpGeneralGroup.setStatus('current')
if mibBuilder.loadTexts:
dvmrpGeneralGroup.setDescription('A collection of objects used to describe general DVMRP configuration information.')
dvmrp_interface_group = object_group((1, 3, 6, 1, 3, 62, 2, 2, 3)).setObjects(('DVMRP-STD-MIB', 'dvmrpInterfaceLocalAddress'), ('DVMRP-STD-MIB', 'dvmrpInterfaceMetric'), ('DVMRP-STD-MIB', 'dvmrpInterfaceStatus'), ('DVMRP-STD-MIB', 'dvmrpInterfaceGenerationId'), ('DVMRP-STD-MIB', 'dvmrpInterfaceRcvBadPkts'), ('DVMRP-STD-MIB', 'dvmrpInterfaceRcvBadRoutes'), ('DVMRP-STD-MIB', 'dvmrpInterfaceSentRoutes'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
dvmrp_interface_group = dvmrpInterfaceGroup.setStatus('current')
if mibBuilder.loadTexts:
dvmrpInterfaceGroup.setDescription('A collection of objects used to describe DVMRP interface configuration and statistics.')
dvmrp_neighbor_group = object_group((1, 3, 6, 1, 3, 62, 2, 2, 4)).setObjects(('DVMRP-STD-MIB', 'dvmrpNeighborUpTime'), ('DVMRP-STD-MIB', 'dvmrpNeighborExpiryTime'), ('DVMRP-STD-MIB', 'dvmrpNeighborGenerationId'), ('DVMRP-STD-MIB', 'dvmrpNeighborMajorVersion'), ('DVMRP-STD-MIB', 'dvmrpNeighborMinorVersion'), ('DVMRP-STD-MIB', 'dvmrpNeighborCapabilities'), ('DVMRP-STD-MIB', 'dvmrpNeighborRcvRoutes'), ('DVMRP-STD-MIB', 'dvmrpNeighborRcvBadPkts'), ('DVMRP-STD-MIB', 'dvmrpNeighborRcvBadRoutes'), ('DVMRP-STD-MIB', 'dvmrpNeighborState'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
dvmrp_neighbor_group = dvmrpNeighborGroup.setStatus('current')
if mibBuilder.loadTexts:
dvmrpNeighborGroup.setDescription('A collection of objects used to describe DVMRP peer configuration and statistics.')
dvmrp_routing_group = object_group((1, 3, 6, 1, 3, 62, 2, 2, 5)).setObjects(('DVMRP-STD-MIB', 'dvmrpRouteUpstreamNeighbor'), ('DVMRP-STD-MIB', 'dvmrpRouteIfIndex'), ('DVMRP-STD-MIB', 'dvmrpRouteMetric'), ('DVMRP-STD-MIB', 'dvmrpRouteExpiryTime'), ('DVMRP-STD-MIB', 'dvmrpRouteUpTime'), ('DVMRP-STD-MIB', 'dvmrpRouteNextHopType'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
dvmrp_routing_group = dvmrpRoutingGroup.setStatus('current')
if mibBuilder.loadTexts:
dvmrpRoutingGroup.setDescription('A collection of objects used to store the DVMRP routing table.')
dvmrp_security_group = object_group((1, 3, 6, 1, 3, 62, 2, 2, 6)).setObjects(('DVMRP-STD-MIB', 'dvmrpInterfaceKey'), ('DVMRP-STD-MIB', 'dvmrpInterfaceKeyVersion'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
dvmrp_security_group = dvmrpSecurityGroup.setStatus('current')
if mibBuilder.loadTexts:
dvmrpSecurityGroup.setDescription('A collection of objects used to store information related to DVMRP security.')
dvmrp_tree_group = object_group((1, 3, 6, 1, 3, 62, 2, 2, 7)).setObjects(('DVMRP-STD-MIB', 'dvmrpPruneExpiryTime'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
dvmrp_tree_group = dvmrpTreeGroup.setStatus('current')
if mibBuilder.loadTexts:
dvmrpTreeGroup.setDescription('A collection of objects used to store information related to DVMRP prune state.')
dvmrp_notification_group = notification_group((1, 3, 6, 1, 3, 62, 2, 2, 8)).setObjects(('DVMRP-STD-MIB', 'dvmrpNeighborLoss'), ('DVMRP-STD-MIB', 'dvmrpNeighborNotPruning'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
dvmrp_notification_group = dvmrpNotificationGroup.setStatus('current')
if mibBuilder.loadTexts:
dvmrpNotificationGroup.setDescription('A collection of notifications for signaling important DVMRP events.')
mibBuilder.exportSymbols('DVMRP-STD-MIB', dvmrpStdMIB=dvmrpStdMIB, dvmrpRouteUpstreamNeighbor=dvmrpRouteUpstreamNeighbor, dvmrpInterfaceLocalAddress=dvmrpInterfaceLocalAddress, dvmrpGeneralGroup=dvmrpGeneralGroup, dvmrpRouteNextHopEntry=dvmrpRouteNextHopEntry, dvmrpNumRoutes=dvmrpNumRoutes, dvmrpRouteNextHopSourceMask=dvmrpRouteNextHopSourceMask, dvmrpRouteNextHopSource=dvmrpRouteNextHopSource, dvmrpNeighborMinorVersion=dvmrpNeighborMinorVersion, dvmrpRouteIfIndex=dvmrpRouteIfIndex, dvmrpNeighborRcvRoutes=dvmrpNeighborRcvRoutes, dvmrpRouteMetric=dvmrpRouteMetric, dvmrpScalar=dvmrpScalar, dvmrpNeighborGenerationId=dvmrpNeighborGenerationId, dvmrpPruneTable=dvmrpPruneTable, dvmrpPruneGroup=dvmrpPruneGroup, dvmrpPruneSourceMask=dvmrpPruneSourceMask, dvmrp=dvmrp, dvmrpNeighborCapabilities=dvmrpNeighborCapabilities, dvmrpMIBConformance=dvmrpMIBConformance, dvmrpInterfaceMetric=dvmrpInterfaceMetric, dvmrpInterfaceKey=dvmrpInterfaceKey, dvmrpNeighborAddress=dvmrpNeighborAddress, dvmrpReachableRoutes=dvmrpReachableRoutes, dvmrpRouteTable=dvmrpRouteTable, dvmrpRouteSource=dvmrpRouteSource, dvmrpRouteSourceMask=dvmrpRouteSourceMask, dvmrpNeighborState=dvmrpNeighborState, dvmrpNeighborGroup=dvmrpNeighborGroup, dvmrpRoutingGroup=dvmrpRoutingGroup, dvmrpPruneSource=dvmrpPruneSource, dvmrpTraps=dvmrpTraps, dvmrpNeighborRcvBadPkts=dvmrpNeighborRcvBadPkts, dvmrpInterfaceRcvBadPkts=dvmrpInterfaceRcvBadPkts, dvmrpNeighborTable=dvmrpNeighborTable, dvmrpNeighborLoss=dvmrpNeighborLoss, dvmrpNeighborNotPruning=dvmrpNeighborNotPruning, dvmrpInterfaceTable=dvmrpInterfaceTable, dvmrpMIBGroups=dvmrpMIBGroups, dvmrpInterfaceGroup=dvmrpInterfaceGroup, PYSNMP_MODULE_ID=dvmrpStdMIB, dvmrpNeighborMajorVersion=dvmrpNeighborMajorVersion, dvmrpVersionString=dvmrpVersionString, dvmrpRouteNextHopType=dvmrpRouteNextHopType, dvmrpInterfaceEntry=dvmrpInterfaceEntry, dvmrpPruneEntry=dvmrpPruneEntry, dvmrpInterfaceKeyVersion=dvmrpInterfaceKeyVersion, dvmrpNeighborRcvBadRoutes=dvmrpNeighborRcvBadRoutes, dvmrpInterfaceIndex=dvmrpInterfaceIndex, dvmrpNeighborUpTime=dvmrpNeighborUpTime, dvmrpNeighborEntry=dvmrpNeighborEntry, dvmrpRouteExpiryTime=dvmrpRouteExpiryTime, dvmrpMIBObjects=dvmrpMIBObjects, dvmrpNeighborIfIndex=dvmrpNeighborIfIndex, dvmrpInterfaceStatus=dvmrpInterfaceStatus, dvmrpTreeGroup=dvmrpTreeGroup, dvmrpInterfaceSentRoutes=dvmrpInterfaceSentRoutes, dvmrpNeighborExpiryTime=dvmrpNeighborExpiryTime, dvmrpInterfaceRcvBadRoutes=dvmrpInterfaceRcvBadRoutes, dvmrpMIBCompliances=dvmrpMIBCompliances, dvmrpRouteNextHopIfIndex=dvmrpRouteNextHopIfIndex, dvmrpSecurityGroup=dvmrpSecurityGroup, dvmrpRouteEntry=dvmrpRouteEntry, dvmrpRouteUpTime=dvmrpRouteUpTime, dvmrpRouteNextHopTable=dvmrpRouteNextHopTable, dvmrpPruneExpiryTime=dvmrpPruneExpiryTime, dvmrpNotificationGroup=dvmrpNotificationGroup, dvmrpMIBCompliance=dvmrpMIBCompliance, dvmrpInterfaceGenerationId=dvmrpInterfaceGenerationId) |
class Solution(object):
def combinationSum2(self, candidates, target):
result = []
self.combinationSumRecu(sorted(candidates), result, 0, [], target)
return result
def combinationSumRecu(self, candidates, result, start, intermediate, target):
if target == 0:
result.append(list(intermediate))
prev = 0
while start < len(candidates) and candidates[start] <= target:
if prev != candidates[start]:
intermediate.append(candidates[start])
self.combinationSumRecu(candidates, result, start + 1, intermediate, target - candidates[start])
intermediate.pop()
prev = candidates[start]
start += 1
candidates = [10,1,2,7,6,1,5]
target = 8
res = Solution().combinationSum2(candidates, target)
print(res) | class Solution(object):
def combination_sum2(self, candidates, target):
result = []
self.combinationSumRecu(sorted(candidates), result, 0, [], target)
return result
def combination_sum_recu(self, candidates, result, start, intermediate, target):
if target == 0:
result.append(list(intermediate))
prev = 0
while start < len(candidates) and candidates[start] <= target:
if prev != candidates[start]:
intermediate.append(candidates[start])
self.combinationSumRecu(candidates, result, start + 1, intermediate, target - candidates[start])
intermediate.pop()
prev = candidates[start]
start += 1
candidates = [10, 1, 2, 7, 6, 1, 5]
target = 8
res = solution().combinationSum2(candidates, target)
print(res) |
_EVT_INIT = 'INITIALIZE'
EVT_START = 'START'
EVT_READY = 'READY'
EVT_CLOSE = 'CLOSE'
EVT_STOP = 'STOP'
EVT_APP_LOAD = 'APP_LOAD'
EVT_APP_UNLOAD = 'APP_UNLOAD'
EVT_INTENT_SUBSCRIBE = 'INTENT_SUBSCRIBE'
EVT_INTENT_START = 'INTENT_START'
EVT_INTENT_END = 'INTENT_END'
EVT_ANY = '*'
_META_EVENTS = (
_EVT_INIT, EVT_APP_LOAD, EVT_APP_UNLOAD,
EVT_INTENT_SUBSCRIBE, EVT_INTENT_START, EVT_INTENT_END
)
| _evt_init = 'INITIALIZE'
evt_start = 'START'
evt_ready = 'READY'
evt_close = 'CLOSE'
evt_stop = 'STOP'
evt_app_load = 'APP_LOAD'
evt_app_unload = 'APP_UNLOAD'
evt_intent_subscribe = 'INTENT_SUBSCRIBE'
evt_intent_start = 'INTENT_START'
evt_intent_end = 'INTENT_END'
evt_any = '*'
_meta_events = (_EVT_INIT, EVT_APP_LOAD, EVT_APP_UNLOAD, EVT_INTENT_SUBSCRIBE, EVT_INTENT_START, EVT_INTENT_END) |
#
# PySNMP MIB module ADTRAN-AOS-DESKTOP-AUDITING (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ADTRAN-AOS-DESKTOP-AUDITING
# Produced by pysmi-0.3.4 at Wed May 1 11:13:58 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)
#
adGenAOSConformance, adGenAOSSwitch = mibBuilder.importSymbols("ADTRAN-AOS", "adGenAOSConformance", "adGenAOSSwitch")
adIdentity, = mibBuilder.importSymbols("ADTRAN-MIB", "adIdentity")
Integer, OctetString, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "Integer", "OctetString", "ObjectIdentifier")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
SingleValueConstraint, ValueRangeConstraint, ConstraintsIntersection, ValueSizeConstraint, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ValueRangeConstraint", "ConstraintsIntersection", "ValueSizeConstraint", "ConstraintsUnion")
ObjectGroup, NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "ObjectGroup", "NotificationGroup", "ModuleCompliance")
Counter32, NotificationType, ObjectIdentity, Gauge32, iso, Counter64, Integer32, Bits, MibIdentifier, ModuleIdentity, TimeTicks, Unsigned32, MibScalar, MibTable, MibTableRow, MibTableColumn, IpAddress = mibBuilder.importSymbols("SNMPv2-SMI", "Counter32", "NotificationType", "ObjectIdentity", "Gauge32", "iso", "Counter64", "Integer32", "Bits", "MibIdentifier", "ModuleIdentity", "TimeTicks", "Unsigned32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "IpAddress")
DateAndTime, TimeStamp, TruthValue, DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DateAndTime", "TimeStamp", "TruthValue", "DisplayString", "TextualConvention")
adGenAOSDesktopAuditingMib = ModuleIdentity((1, 3, 6, 1, 4, 1, 664, 6, 10000, 53, 4, 1))
if mibBuilder.loadTexts: adGenAOSDesktopAuditingMib.setLastUpdated('200912140000Z')
if mibBuilder.loadTexts: adGenAOSDesktopAuditingMib.setOrganization('ADTRAN, Inc.')
if mibBuilder.loadTexts: adGenAOSDesktopAuditingMib.setContactInfo('Technical Support Dept. Postal: ADTRAN, Inc. 901 Explorer Blvd. Huntsville, AL 35806 Tel: +1 800 726-8663 Fax: +1 256 963 6217 E-mail: support@adtran.com')
if mibBuilder.loadTexts: adGenAOSDesktopAuditingMib.setDescription('First Draft of ADTRAN-AOS-DESKTOP-AUDITING MIB module.')
adGenDesktopAuditing = MibIdentifier((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2))
adGenNapClients = MibIdentifier((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0))
adGenNapClientsTable = MibTable((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0, 1), )
if mibBuilder.loadTexts: adGenNapClientsTable.setStatus('current')
if mibBuilder.loadTexts: adGenNapClientsTable.setDescription('The NAP client table displays NAP information of NAP capable clients. It displays information such as clients firewall, antivirus, antispyware, and security states. ')
adGenNapClientsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0, 1, 1), ).setIndexNames((0, "ADTRAN-AOS-DESKTOP-AUDITING", "adNapClientMac"), (0, "ADTRAN-AOS-DESKTOP-AUDITING", "adNapClientVlanId"))
if mibBuilder.loadTexts: adGenNapClientsEntry.setStatus('current')
if mibBuilder.loadTexts: adGenNapClientsEntry.setDescription('NAP information of the client')
adNapClientMac = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0, 1, 1, 1), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adNapClientMac.setStatus('current')
if mibBuilder.loadTexts: adNapClientMac.setDescription('NAP clients MAC address. This is unique to the Desktop Auditing MIB.')
adNapClientVlanId = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0, 1, 1, 2), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adNapClientVlanId.setStatus('current')
if mibBuilder.loadTexts: adNapClientVlanId.setDescription('NAP clients VLAN ID. This ID is unique to the Desktop Auditing MIB.')
adNapClientIp = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0, 1, 1, 3), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adNapClientIp.setStatus('current')
if mibBuilder.loadTexts: adNapClientIp.setDescription('NAP clients IP address.')
adNapClientHostname = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0, 1, 1, 4), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adNapClientHostname.setStatus('current')
if mibBuilder.loadTexts: adNapClientHostname.setDescription('NAP clients hostname.')
adNapClientSrcPortIfId = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0, 1, 1, 5), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adNapClientSrcPortIfId.setStatus('current')
if mibBuilder.loadTexts: adNapClientSrcPortIfId.setDescription('NAP clients source port interface ID.')
adNapClientSrcPortIfType = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0, 1, 1, 6), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adNapClientSrcPortIfType.setStatus('current')
if mibBuilder.loadTexts: adNapClientSrcPortIfType.setDescription('NAP clients source port interface type.')
adNapServerMac = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0, 1, 1, 7), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adNapServerMac.setStatus('current')
if mibBuilder.loadTexts: adNapServerMac.setDescription('NAP servers MAC address.')
adNapServerIp = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0, 1, 1, 8), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adNapServerIp.setStatus('current')
if mibBuilder.loadTexts: adNapServerIp.setDescription('NAP servers IP address.')
adNapCollectionMethod = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0, 1, 1, 9), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adNapCollectionMethod.setStatus('current')
if mibBuilder.loadTexts: adNapCollectionMethod.setDescription('Method by which the NAP information is collected.')
adNapCollectionTime = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0, 1, 1, 10), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adNapCollectionTime.setStatus('current')
if mibBuilder.loadTexts: adNapCollectionTime.setDescription('Time when the NAP information was collected.')
adNapCapableClient = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0, 1, 1, 11), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adNapCapableClient.setStatus('current')
if mibBuilder.loadTexts: adNapCapableClient.setDescription('Client is NAP capable.')
adNapCapableServer = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0, 1, 1, 12), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adNapCapableServer.setStatus('current')
if mibBuilder.loadTexts: adNapCapableServer.setDescription('Server is NAP capable.')
adNapClientOsVersion = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0, 1, 1, 13), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adNapClientOsVersion.setStatus('current')
if mibBuilder.loadTexts: adNapClientOsVersion.setDescription('NAP clients OS version.')
adNapClientOsServicePk = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0, 1, 1, 14), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adNapClientOsServicePk.setStatus('current')
if mibBuilder.loadTexts: adNapClientOsServicePk.setDescription('NAP clients service pack.')
adNapClientOsProcessorArc = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0, 1, 1, 15), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adNapClientOsProcessorArc.setStatus('current')
if mibBuilder.loadTexts: adNapClientOsProcessorArc.setDescription('NAP clients processor architecture.')
adNapClientLastSecurityUpdate = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0, 1, 1, 16), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adNapClientLastSecurityUpdate.setStatus('current')
if mibBuilder.loadTexts: adNapClientLastSecurityUpdate.setDescription('Last time the NAP clients security was updated.')
adNapClientSecurityUpdateServer = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0, 1, 1, 17), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adNapClientSecurityUpdateServer.setStatus('current')
if mibBuilder.loadTexts: adNapClientSecurityUpdateServer.setDescription('NAP clients security update server.')
adNapClientRequiresRemediation = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0, 1, 1, 18), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("unknown", 1), ("true", 2), ("false", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: adNapClientRequiresRemediation.setStatus('current')
if mibBuilder.loadTexts: adNapClientRequiresRemediation.setDescription('NAP clients requires remediation.')
adNapClientLocalPolicyViolator = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0, 1, 1, 19), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adNapClientLocalPolicyViolator.setStatus('current')
if mibBuilder.loadTexts: adNapClientLocalPolicyViolator.setDescription('NAP clients violates local policies.')
adNapClientFirewallState = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0, 1, 1, 20), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16))).clone(namedValues=NamedValues(("unknown", 1), ("notInstalled", 2), ("wscServiceDown", 3), ("wscNotStarted", 4), ("notEnaNotUTD", 5), ("micsftNotEnaNotUTD", 6), ("notEnaUTD", 7), ("micsftNotEnaUTD", 8), ("enaNotUTDSn", 9), ("micsftEnaNotUTDSn", 10), ("enaNotUTDNotSn", 11), ("micsftEnaNotUTDNotSn", 12), ("enaUTDSn", 13), ("micsftEnaUTDSn", 14), ("enaUTDNotSn", 15), ("micsftEnaUTDNotSn", 16)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: adNapClientFirewallState.setStatus('current')
if mibBuilder.loadTexts: adNapClientFirewallState.setDescription('NAP clients firewall state.')
adNapClientFirewall = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0, 1, 1, 21), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adNapClientFirewall.setStatus('current')
if mibBuilder.loadTexts: adNapClientFirewall.setDescription('NAP clients firewall.')
adNapClientAntivirusState = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0, 1, 1, 22), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16))).clone(namedValues=NamedValues(("unknown", 1), ("notInstalled", 2), ("wscServiceDown", 3), ("wscNotStarted", 4), ("notEnaNotUTD", 5), ("micsftNotEnaNotUTD", 6), ("notEnaUTD", 7), ("micsftNotEnaUTD", 8), ("enaNotUTDSn", 9), ("micsftEnaNotUTDSn", 10), ("enaNotUTDNotSn", 11), ("micsftEnaNotUTDNotSn", 12), ("enaUTDSn", 13), ("micsftEnaUTDSn", 14), ("enaUTDNotSn", 15), ("micsftEnaUTDNotSn", 16)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: adNapClientAntivirusState.setStatus('current')
if mibBuilder.loadTexts: adNapClientAntivirusState.setDescription('NAP clients antivirus state.')
adNapClientAntivirus = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0, 1, 1, 23), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adNapClientAntivirus.setStatus('current')
if mibBuilder.loadTexts: adNapClientAntivirus.setDescription('NAP clients antivirus.')
adNapClientAntispywareState = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0, 1, 1, 24), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16))).clone(namedValues=NamedValues(("unknown", 1), ("notInstalled", 2), ("wscServiceDown", 3), ("wscNotStarted", 4), ("notEnaNotUTD", 5), ("micsftNotEnaNotUTD", 6), ("notEnaUTD", 7), ("micsftNotEnaUTD", 8), ("enaNotUTDSn", 9), ("micsftEnaNotUTDSn", 10), ("enaNotUTDNotSn", 11), ("micsftEnaNotUTDNotSn", 12), ("enaUTDSn", 13), ("micsftEnaUTDSn", 14), ("enaUTDNotSn", 15), ("micsftEnaUTDNotSn", 16)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: adNapClientAntispywareState.setStatus('current')
if mibBuilder.loadTexts: adNapClientAntispywareState.setDescription('NAP clients antispyware state.')
adNapClientAntispyware = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0, 1, 1, 25), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: adNapClientAntispyware.setStatus('current')
if mibBuilder.loadTexts: adNapClientAntispyware.setDescription('NAP clients antispyware.')
adNapClientAutoupdateState = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0, 1, 1, 26), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9))).clone(namedValues=NamedValues(("unknown", 1), ("notInstalled", 2), ("wscServiceDown", 3), ("wscNotStarted", 4), ("notEna", 5), ("enaCkUpdateOnly", 6), ("enaDownload", 7), ("enaDownloadInstall", 8), ("neverConfigured", 9)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: adNapClientAutoupdateState.setStatus('current')
if mibBuilder.loadTexts: adNapClientAutoupdateState.setDescription('NAP clients auto update state.')
adNapClientSecurityupdateState = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0, 1, 1, 27), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9))).clone(namedValues=NamedValues(("unknown", 1), ("noMissingUpdate", 2), ("missingUpdate", 3), ("noWUS", 4), ("noClientID", 5), ("wuaServiceDisabled", 6), ("wuaCommFailed", 7), ("updateInsNeedReboot", 8), ("wuaNotStarted", 9)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: adNapClientSecurityupdateState.setStatus('current')
if mibBuilder.loadTexts: adNapClientSecurityupdateState.setDescription('NAP clients security update state.')
adNapClientSecuritySeverity = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0, 1, 1, 28), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("unknown", 1), ("unspecified", 2), ("low", 3), ("moderate", 4), ("important", 5), ("critical", 6)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: adNapClientSecuritySeverity.setStatus('current')
if mibBuilder.loadTexts: adNapClientSecuritySeverity.setDescription('NAP clients security update severity.')
adNapClientConnectionState = MibTableColumn((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0, 1, 1, 29), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("unknown", 1), ("notRestricted", 2), ("notResMaybeLater", 3), ("restricted", 4)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: adNapClientConnectionState.setStatus('current')
if mibBuilder.loadTexts: adNapClientConnectionState.setDescription('NAP clients network connection state.')
adGenAOSDesktopAuditingConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 664, 5, 53, 99, 10))
adGenAOSDesktopAuditingGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 664, 5, 53, 99, 10, 1))
adGenAOSDesktopAuditingCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 664, 5, 53, 99, 10, 2))
adGenAOSDesktopAuditingFullCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 664, 5, 53, 99, 10, 2, 1)).setObjects(("ADTRAN-AOS-DESKTOP-AUDITING", "adGenNapClientsGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
adGenAOSDesktopAuditingFullCompliance = adGenAOSDesktopAuditingFullCompliance.setStatus('current')
if mibBuilder.loadTexts: adGenAOSDesktopAuditingFullCompliance.setDescription('The compliance statement for SNMP entities which implement version 1 of the adGenAosDesktopAuditing MIB. When this MIB is implemented with support for read-only, then such an implementation can claim full compliance. ')
adGenNapClientsGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 664, 5, 53, 99, 10, 1, 1)).setObjects(("ADTRAN-AOS-DESKTOP-AUDITING", "adNapClientMac"), ("ADTRAN-AOS-DESKTOP-AUDITING", "adNapClientVlanId"), ("ADTRAN-AOS-DESKTOP-AUDITING", "adNapClientIp"), ("ADTRAN-AOS-DESKTOP-AUDITING", "adNapClientHostname"), ("ADTRAN-AOS-DESKTOP-AUDITING", "adNapClientSrcPortIfId"), ("ADTRAN-AOS-DESKTOP-AUDITING", "adNapClientSrcPortIfType"), ("ADTRAN-AOS-DESKTOP-AUDITING", "adNapServerMac"), ("ADTRAN-AOS-DESKTOP-AUDITING", "adNapServerIp"), ("ADTRAN-AOS-DESKTOP-AUDITING", "adNapCollectionMethod"), ("ADTRAN-AOS-DESKTOP-AUDITING", "adNapCollectionTime"), ("ADTRAN-AOS-DESKTOP-AUDITING", "adNapCapableClient"), ("ADTRAN-AOS-DESKTOP-AUDITING", "adNapCapableServer"), ("ADTRAN-AOS-DESKTOP-AUDITING", "adNapClientOsVersion"), ("ADTRAN-AOS-DESKTOP-AUDITING", "adNapClientOsServicePk"), ("ADTRAN-AOS-DESKTOP-AUDITING", "adNapClientOsProcessorArc"), ("ADTRAN-AOS-DESKTOP-AUDITING", "adNapClientLastSecurityUpdate"), ("ADTRAN-AOS-DESKTOP-AUDITING", "adNapClientSecurityUpdateServer"), ("ADTRAN-AOS-DESKTOP-AUDITING", "adNapClientRequiresRemediation"), ("ADTRAN-AOS-DESKTOP-AUDITING", "adNapClientLocalPolicyViolator"), ("ADTRAN-AOS-DESKTOP-AUDITING", "adNapClientFirewallState"), ("ADTRAN-AOS-DESKTOP-AUDITING", "adNapClientFirewall"), ("ADTRAN-AOS-DESKTOP-AUDITING", "adNapClientAntivirusState"), ("ADTRAN-AOS-DESKTOP-AUDITING", "adNapClientAntivirus"), ("ADTRAN-AOS-DESKTOP-AUDITING", "adNapClientAntispywareState"), ("ADTRAN-AOS-DESKTOP-AUDITING", "adNapClientAntispyware"), ("ADTRAN-AOS-DESKTOP-AUDITING", "adNapClientAutoupdateState"), ("ADTRAN-AOS-DESKTOP-AUDITING", "adNapClientSecurityupdateState"), ("ADTRAN-AOS-DESKTOP-AUDITING", "adNapClientSecuritySeverity"), ("ADTRAN-AOS-DESKTOP-AUDITING", "adNapClientConnectionState"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
adGenNapClientsGroup = adGenNapClientsGroup.setStatus('current')
if mibBuilder.loadTexts: adGenNapClientsGroup.setDescription('The adGenNapClientGroup group contains read-only NAP information of clients in the network that are NAP capable.')
mibBuilder.exportSymbols("ADTRAN-AOS-DESKTOP-AUDITING", adNapClientSecurityupdateState=adNapClientSecurityupdateState, adNapClientFirewall=adNapClientFirewall, PYSNMP_MODULE_ID=adGenAOSDesktopAuditingMib, adGenNapClientsTable=adGenNapClientsTable, adGenAOSDesktopAuditingGroups=adGenAOSDesktopAuditingGroups, adNapServerMac=adNapServerMac, adNapServerIp=adNapServerIp, adNapClientMac=adNapClientMac, adNapCollectionMethod=adNapCollectionMethod, adNapClientIp=adNapClientIp, adNapClientSecurityUpdateServer=adNapClientSecurityUpdateServer, adNapClientVlanId=adNapClientVlanId, adNapClientConnectionState=adNapClientConnectionState, adGenAOSDesktopAuditingConformance=adGenAOSDesktopAuditingConformance, adNapClientAntispywareState=adNapClientAntispywareState, adGenAOSDesktopAuditingCompliances=adGenAOSDesktopAuditingCompliances, adGenDesktopAuditing=adGenDesktopAuditing, adNapCollectionTime=adNapCollectionTime, adNapClientOsProcessorArc=adNapClientOsProcessorArc, adGenAOSDesktopAuditingFullCompliance=adGenAOSDesktopAuditingFullCompliance, adNapClientRequiresRemediation=adNapClientRequiresRemediation, adNapClientAutoupdateState=adNapClientAutoupdateState, adNapClientAntivirusState=adNapClientAntivirusState, adNapClientFirewallState=adNapClientFirewallState, adNapClientOsServicePk=adNapClientOsServicePk, adNapClientLocalPolicyViolator=adNapClientLocalPolicyViolator, adNapClientAntivirus=adNapClientAntivirus, adNapClientSrcPortIfType=adNapClientSrcPortIfType, adGenNapClientsEntry=adGenNapClientsEntry, adNapClientSecuritySeverity=adNapClientSecuritySeverity, adNapClientOsVersion=adNapClientOsVersion, adNapCapableServer=adNapCapableServer, adNapCapableClient=adNapCapableClient, adNapClientHostname=adNapClientHostname, adGenNapClients=adGenNapClients, adNapClientAntispyware=adNapClientAntispyware, adGenNapClientsGroup=adGenNapClientsGroup, adGenAOSDesktopAuditingMib=adGenAOSDesktopAuditingMib, adNapClientLastSecurityUpdate=adNapClientLastSecurityUpdate, adNapClientSrcPortIfId=adNapClientSrcPortIfId)
| (ad_gen_aos_conformance, ad_gen_aos_switch) = mibBuilder.importSymbols('ADTRAN-AOS', 'adGenAOSConformance', 'adGenAOSSwitch')
(ad_identity,) = mibBuilder.importSymbols('ADTRAN-MIB', 'adIdentity')
(integer, octet_string, object_identifier) = mibBuilder.importSymbols('ASN1', 'Integer', 'OctetString', 'ObjectIdentifier')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(single_value_constraint, value_range_constraint, constraints_intersection, value_size_constraint, constraints_union) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'SingleValueConstraint', 'ValueRangeConstraint', 'ConstraintsIntersection', 'ValueSizeConstraint', 'ConstraintsUnion')
(object_group, notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'ObjectGroup', 'NotificationGroup', 'ModuleCompliance')
(counter32, notification_type, object_identity, gauge32, iso, counter64, integer32, bits, mib_identifier, module_identity, time_ticks, unsigned32, mib_scalar, mib_table, mib_table_row, mib_table_column, ip_address) = mibBuilder.importSymbols('SNMPv2-SMI', 'Counter32', 'NotificationType', 'ObjectIdentity', 'Gauge32', 'iso', 'Counter64', 'Integer32', 'Bits', 'MibIdentifier', 'ModuleIdentity', 'TimeTicks', 'Unsigned32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'IpAddress')
(date_and_time, time_stamp, truth_value, display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DateAndTime', 'TimeStamp', 'TruthValue', 'DisplayString', 'TextualConvention')
ad_gen_aos_desktop_auditing_mib = module_identity((1, 3, 6, 1, 4, 1, 664, 6, 10000, 53, 4, 1))
if mibBuilder.loadTexts:
adGenAOSDesktopAuditingMib.setLastUpdated('200912140000Z')
if mibBuilder.loadTexts:
adGenAOSDesktopAuditingMib.setOrganization('ADTRAN, Inc.')
if mibBuilder.loadTexts:
adGenAOSDesktopAuditingMib.setContactInfo('Technical Support Dept. Postal: ADTRAN, Inc. 901 Explorer Blvd. Huntsville, AL 35806 Tel: +1 800 726-8663 Fax: +1 256 963 6217 E-mail: support@adtran.com')
if mibBuilder.loadTexts:
adGenAOSDesktopAuditingMib.setDescription('First Draft of ADTRAN-AOS-DESKTOP-AUDITING MIB module.')
ad_gen_desktop_auditing = mib_identifier((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2))
ad_gen_nap_clients = mib_identifier((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0))
ad_gen_nap_clients_table = mib_table((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0, 1))
if mibBuilder.loadTexts:
adGenNapClientsTable.setStatus('current')
if mibBuilder.loadTexts:
adGenNapClientsTable.setDescription('The NAP client table displays NAP information of NAP capable clients. It displays information such as clients firewall, antivirus, antispyware, and security states. ')
ad_gen_nap_clients_entry = mib_table_row((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0, 1, 1)).setIndexNames((0, 'ADTRAN-AOS-DESKTOP-AUDITING', 'adNapClientMac'), (0, 'ADTRAN-AOS-DESKTOP-AUDITING', 'adNapClientVlanId'))
if mibBuilder.loadTexts:
adGenNapClientsEntry.setStatus('current')
if mibBuilder.loadTexts:
adGenNapClientsEntry.setDescription('NAP information of the client')
ad_nap_client_mac = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0, 1, 1, 1), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adNapClientMac.setStatus('current')
if mibBuilder.loadTexts:
adNapClientMac.setDescription('NAP clients MAC address. This is unique to the Desktop Auditing MIB.')
ad_nap_client_vlan_id = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0, 1, 1, 2), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adNapClientVlanId.setStatus('current')
if mibBuilder.loadTexts:
adNapClientVlanId.setDescription('NAP clients VLAN ID. This ID is unique to the Desktop Auditing MIB.')
ad_nap_client_ip = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0, 1, 1, 3), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adNapClientIp.setStatus('current')
if mibBuilder.loadTexts:
adNapClientIp.setDescription('NAP clients IP address.')
ad_nap_client_hostname = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0, 1, 1, 4), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adNapClientHostname.setStatus('current')
if mibBuilder.loadTexts:
adNapClientHostname.setDescription('NAP clients hostname.')
ad_nap_client_src_port_if_id = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0, 1, 1, 5), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adNapClientSrcPortIfId.setStatus('current')
if mibBuilder.loadTexts:
adNapClientSrcPortIfId.setDescription('NAP clients source port interface ID.')
ad_nap_client_src_port_if_type = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0, 1, 1, 6), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adNapClientSrcPortIfType.setStatus('current')
if mibBuilder.loadTexts:
adNapClientSrcPortIfType.setDescription('NAP clients source port interface type.')
ad_nap_server_mac = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0, 1, 1, 7), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adNapServerMac.setStatus('current')
if mibBuilder.loadTexts:
adNapServerMac.setDescription('NAP servers MAC address.')
ad_nap_server_ip = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0, 1, 1, 8), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adNapServerIp.setStatus('current')
if mibBuilder.loadTexts:
adNapServerIp.setDescription('NAP servers IP address.')
ad_nap_collection_method = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0, 1, 1, 9), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adNapCollectionMethod.setStatus('current')
if mibBuilder.loadTexts:
adNapCollectionMethod.setDescription('Method by which the NAP information is collected.')
ad_nap_collection_time = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0, 1, 1, 10), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adNapCollectionTime.setStatus('current')
if mibBuilder.loadTexts:
adNapCollectionTime.setDescription('Time when the NAP information was collected.')
ad_nap_capable_client = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0, 1, 1, 11), truth_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adNapCapableClient.setStatus('current')
if mibBuilder.loadTexts:
adNapCapableClient.setDescription('Client is NAP capable.')
ad_nap_capable_server = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0, 1, 1, 12), truth_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adNapCapableServer.setStatus('current')
if mibBuilder.loadTexts:
adNapCapableServer.setDescription('Server is NAP capable.')
ad_nap_client_os_version = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0, 1, 1, 13), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adNapClientOsVersion.setStatus('current')
if mibBuilder.loadTexts:
adNapClientOsVersion.setDescription('NAP clients OS version.')
ad_nap_client_os_service_pk = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0, 1, 1, 14), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adNapClientOsServicePk.setStatus('current')
if mibBuilder.loadTexts:
adNapClientOsServicePk.setDescription('NAP clients service pack.')
ad_nap_client_os_processor_arc = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0, 1, 1, 15), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adNapClientOsProcessorArc.setStatus('current')
if mibBuilder.loadTexts:
adNapClientOsProcessorArc.setDescription('NAP clients processor architecture.')
ad_nap_client_last_security_update = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0, 1, 1, 16), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adNapClientLastSecurityUpdate.setStatus('current')
if mibBuilder.loadTexts:
adNapClientLastSecurityUpdate.setDescription('Last time the NAP clients security was updated.')
ad_nap_client_security_update_server = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0, 1, 1, 17), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adNapClientSecurityUpdateServer.setStatus('current')
if mibBuilder.loadTexts:
adNapClientSecurityUpdateServer.setDescription('NAP clients security update server.')
ad_nap_client_requires_remediation = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0, 1, 1, 18), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('unknown', 1), ('true', 2), ('false', 3)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adNapClientRequiresRemediation.setStatus('current')
if mibBuilder.loadTexts:
adNapClientRequiresRemediation.setDescription('NAP clients requires remediation.')
ad_nap_client_local_policy_violator = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0, 1, 1, 19), truth_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adNapClientLocalPolicyViolator.setStatus('current')
if mibBuilder.loadTexts:
adNapClientLocalPolicyViolator.setDescription('NAP clients violates local policies.')
ad_nap_client_firewall_state = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0, 1, 1, 20), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16))).clone(namedValues=named_values(('unknown', 1), ('notInstalled', 2), ('wscServiceDown', 3), ('wscNotStarted', 4), ('notEnaNotUTD', 5), ('micsftNotEnaNotUTD', 6), ('notEnaUTD', 7), ('micsftNotEnaUTD', 8), ('enaNotUTDSn', 9), ('micsftEnaNotUTDSn', 10), ('enaNotUTDNotSn', 11), ('micsftEnaNotUTDNotSn', 12), ('enaUTDSn', 13), ('micsftEnaUTDSn', 14), ('enaUTDNotSn', 15), ('micsftEnaUTDNotSn', 16)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adNapClientFirewallState.setStatus('current')
if mibBuilder.loadTexts:
adNapClientFirewallState.setDescription('NAP clients firewall state.')
ad_nap_client_firewall = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0, 1, 1, 21), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adNapClientFirewall.setStatus('current')
if mibBuilder.loadTexts:
adNapClientFirewall.setDescription('NAP clients firewall.')
ad_nap_client_antivirus_state = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0, 1, 1, 22), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16))).clone(namedValues=named_values(('unknown', 1), ('notInstalled', 2), ('wscServiceDown', 3), ('wscNotStarted', 4), ('notEnaNotUTD', 5), ('micsftNotEnaNotUTD', 6), ('notEnaUTD', 7), ('micsftNotEnaUTD', 8), ('enaNotUTDSn', 9), ('micsftEnaNotUTDSn', 10), ('enaNotUTDNotSn', 11), ('micsftEnaNotUTDNotSn', 12), ('enaUTDSn', 13), ('micsftEnaUTDSn', 14), ('enaUTDNotSn', 15), ('micsftEnaUTDNotSn', 16)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adNapClientAntivirusState.setStatus('current')
if mibBuilder.loadTexts:
adNapClientAntivirusState.setDescription('NAP clients antivirus state.')
ad_nap_client_antivirus = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0, 1, 1, 23), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adNapClientAntivirus.setStatus('current')
if mibBuilder.loadTexts:
adNapClientAntivirus.setDescription('NAP clients antivirus.')
ad_nap_client_antispyware_state = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0, 1, 1, 24), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16))).clone(namedValues=named_values(('unknown', 1), ('notInstalled', 2), ('wscServiceDown', 3), ('wscNotStarted', 4), ('notEnaNotUTD', 5), ('micsftNotEnaNotUTD', 6), ('notEnaUTD', 7), ('micsftNotEnaUTD', 8), ('enaNotUTDSn', 9), ('micsftEnaNotUTDSn', 10), ('enaNotUTDNotSn', 11), ('micsftEnaNotUTDNotSn', 12), ('enaUTDSn', 13), ('micsftEnaUTDSn', 14), ('enaUTDNotSn', 15), ('micsftEnaUTDNotSn', 16)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adNapClientAntispywareState.setStatus('current')
if mibBuilder.loadTexts:
adNapClientAntispywareState.setDescription('NAP clients antispyware state.')
ad_nap_client_antispyware = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0, 1, 1, 25), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adNapClientAntispyware.setStatus('current')
if mibBuilder.loadTexts:
adNapClientAntispyware.setDescription('NAP clients antispyware.')
ad_nap_client_autoupdate_state = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0, 1, 1, 26), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9))).clone(namedValues=named_values(('unknown', 1), ('notInstalled', 2), ('wscServiceDown', 3), ('wscNotStarted', 4), ('notEna', 5), ('enaCkUpdateOnly', 6), ('enaDownload', 7), ('enaDownloadInstall', 8), ('neverConfigured', 9)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adNapClientAutoupdateState.setStatus('current')
if mibBuilder.loadTexts:
adNapClientAutoupdateState.setDescription('NAP clients auto update state.')
ad_nap_client_securityupdate_state = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0, 1, 1, 27), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9))).clone(namedValues=named_values(('unknown', 1), ('noMissingUpdate', 2), ('missingUpdate', 3), ('noWUS', 4), ('noClientID', 5), ('wuaServiceDisabled', 6), ('wuaCommFailed', 7), ('updateInsNeedReboot', 8), ('wuaNotStarted', 9)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adNapClientSecurityupdateState.setStatus('current')
if mibBuilder.loadTexts:
adNapClientSecurityupdateState.setDescription('NAP clients security update state.')
ad_nap_client_security_severity = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0, 1, 1, 28), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6))).clone(namedValues=named_values(('unknown', 1), ('unspecified', 2), ('low', 3), ('moderate', 4), ('important', 5), ('critical', 6)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adNapClientSecuritySeverity.setStatus('current')
if mibBuilder.loadTexts:
adNapClientSecuritySeverity.setDescription('NAP clients security update severity.')
ad_nap_client_connection_state = mib_table_column((1, 3, 6, 1, 4, 1, 664, 5, 53, 4, 2, 0, 1, 1, 29), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('unknown', 1), ('notRestricted', 2), ('notResMaybeLater', 3), ('restricted', 4)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
adNapClientConnectionState.setStatus('current')
if mibBuilder.loadTexts:
adNapClientConnectionState.setDescription('NAP clients network connection state.')
ad_gen_aos_desktop_auditing_conformance = mib_identifier((1, 3, 6, 1, 4, 1, 664, 5, 53, 99, 10))
ad_gen_aos_desktop_auditing_groups = mib_identifier((1, 3, 6, 1, 4, 1, 664, 5, 53, 99, 10, 1))
ad_gen_aos_desktop_auditing_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 664, 5, 53, 99, 10, 2))
ad_gen_aos_desktop_auditing_full_compliance = module_compliance((1, 3, 6, 1, 4, 1, 664, 5, 53, 99, 10, 2, 1)).setObjects(('ADTRAN-AOS-DESKTOP-AUDITING', 'adGenNapClientsGroup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ad_gen_aos_desktop_auditing_full_compliance = adGenAOSDesktopAuditingFullCompliance.setStatus('current')
if mibBuilder.loadTexts:
adGenAOSDesktopAuditingFullCompliance.setDescription('The compliance statement for SNMP entities which implement version 1 of the adGenAosDesktopAuditing MIB. When this MIB is implemented with support for read-only, then such an implementation can claim full compliance. ')
ad_gen_nap_clients_group = object_group((1, 3, 6, 1, 4, 1, 664, 5, 53, 99, 10, 1, 1)).setObjects(('ADTRAN-AOS-DESKTOP-AUDITING', 'adNapClientMac'), ('ADTRAN-AOS-DESKTOP-AUDITING', 'adNapClientVlanId'), ('ADTRAN-AOS-DESKTOP-AUDITING', 'adNapClientIp'), ('ADTRAN-AOS-DESKTOP-AUDITING', 'adNapClientHostname'), ('ADTRAN-AOS-DESKTOP-AUDITING', 'adNapClientSrcPortIfId'), ('ADTRAN-AOS-DESKTOP-AUDITING', 'adNapClientSrcPortIfType'), ('ADTRAN-AOS-DESKTOP-AUDITING', 'adNapServerMac'), ('ADTRAN-AOS-DESKTOP-AUDITING', 'adNapServerIp'), ('ADTRAN-AOS-DESKTOP-AUDITING', 'adNapCollectionMethod'), ('ADTRAN-AOS-DESKTOP-AUDITING', 'adNapCollectionTime'), ('ADTRAN-AOS-DESKTOP-AUDITING', 'adNapCapableClient'), ('ADTRAN-AOS-DESKTOP-AUDITING', 'adNapCapableServer'), ('ADTRAN-AOS-DESKTOP-AUDITING', 'adNapClientOsVersion'), ('ADTRAN-AOS-DESKTOP-AUDITING', 'adNapClientOsServicePk'), ('ADTRAN-AOS-DESKTOP-AUDITING', 'adNapClientOsProcessorArc'), ('ADTRAN-AOS-DESKTOP-AUDITING', 'adNapClientLastSecurityUpdate'), ('ADTRAN-AOS-DESKTOP-AUDITING', 'adNapClientSecurityUpdateServer'), ('ADTRAN-AOS-DESKTOP-AUDITING', 'adNapClientRequiresRemediation'), ('ADTRAN-AOS-DESKTOP-AUDITING', 'adNapClientLocalPolicyViolator'), ('ADTRAN-AOS-DESKTOP-AUDITING', 'adNapClientFirewallState'), ('ADTRAN-AOS-DESKTOP-AUDITING', 'adNapClientFirewall'), ('ADTRAN-AOS-DESKTOP-AUDITING', 'adNapClientAntivirusState'), ('ADTRAN-AOS-DESKTOP-AUDITING', 'adNapClientAntivirus'), ('ADTRAN-AOS-DESKTOP-AUDITING', 'adNapClientAntispywareState'), ('ADTRAN-AOS-DESKTOP-AUDITING', 'adNapClientAntispyware'), ('ADTRAN-AOS-DESKTOP-AUDITING', 'adNapClientAutoupdateState'), ('ADTRAN-AOS-DESKTOP-AUDITING', 'adNapClientSecurityupdateState'), ('ADTRAN-AOS-DESKTOP-AUDITING', 'adNapClientSecuritySeverity'), ('ADTRAN-AOS-DESKTOP-AUDITING', 'adNapClientConnectionState'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ad_gen_nap_clients_group = adGenNapClientsGroup.setStatus('current')
if mibBuilder.loadTexts:
adGenNapClientsGroup.setDescription('The adGenNapClientGroup group contains read-only NAP information of clients in the network that are NAP capable.')
mibBuilder.exportSymbols('ADTRAN-AOS-DESKTOP-AUDITING', adNapClientSecurityupdateState=adNapClientSecurityupdateState, adNapClientFirewall=adNapClientFirewall, PYSNMP_MODULE_ID=adGenAOSDesktopAuditingMib, adGenNapClientsTable=adGenNapClientsTable, adGenAOSDesktopAuditingGroups=adGenAOSDesktopAuditingGroups, adNapServerMac=adNapServerMac, adNapServerIp=adNapServerIp, adNapClientMac=adNapClientMac, adNapCollectionMethod=adNapCollectionMethod, adNapClientIp=adNapClientIp, adNapClientSecurityUpdateServer=adNapClientSecurityUpdateServer, adNapClientVlanId=adNapClientVlanId, adNapClientConnectionState=adNapClientConnectionState, adGenAOSDesktopAuditingConformance=adGenAOSDesktopAuditingConformance, adNapClientAntispywareState=adNapClientAntispywareState, adGenAOSDesktopAuditingCompliances=adGenAOSDesktopAuditingCompliances, adGenDesktopAuditing=adGenDesktopAuditing, adNapCollectionTime=adNapCollectionTime, adNapClientOsProcessorArc=adNapClientOsProcessorArc, adGenAOSDesktopAuditingFullCompliance=adGenAOSDesktopAuditingFullCompliance, adNapClientRequiresRemediation=adNapClientRequiresRemediation, adNapClientAutoupdateState=adNapClientAutoupdateState, adNapClientAntivirusState=adNapClientAntivirusState, adNapClientFirewallState=adNapClientFirewallState, adNapClientOsServicePk=adNapClientOsServicePk, adNapClientLocalPolicyViolator=adNapClientLocalPolicyViolator, adNapClientAntivirus=adNapClientAntivirus, adNapClientSrcPortIfType=adNapClientSrcPortIfType, adGenNapClientsEntry=adGenNapClientsEntry, adNapClientSecuritySeverity=adNapClientSecuritySeverity, adNapClientOsVersion=adNapClientOsVersion, adNapCapableServer=adNapCapableServer, adNapCapableClient=adNapCapableClient, adNapClientHostname=adNapClientHostname, adGenNapClients=adGenNapClients, adNapClientAntispyware=adNapClientAntispyware, adGenNapClientsGroup=adGenNapClientsGroup, adGenAOSDesktopAuditingMib=adGenAOSDesktopAuditingMib, adNapClientLastSecurityUpdate=adNapClientLastSecurityUpdate, adNapClientSrcPortIfId=adNapClientSrcPortIfId) |
try:
raise ValueError("invalid!")
except ValueError as error:
print(str(error) + " input")
finally:
print("Finishd")
| try:
raise value_error('invalid!')
except ValueError as error:
print(str(error) + ' input')
finally:
print('Finishd') |
if __name__ == "__main__":
a = [1,2,3]
i = -1
print(a[-1])
for i in range(-1,-4,-1):
print(a[i]) | if __name__ == '__main__':
a = [1, 2, 3]
i = -1
print(a[-1])
for i in range(-1, -4, -1):
print(a[i]) |
N, W = map(int, input().split())
vw = [list(map(int, input().split())) for _ in range(N)]
dp = [[0] * W for _ in range(N)]
for i in range(N):
for w in range(W):
if w >= vw[i][1]:
dp[i + 1][w] = max(dp[i][w - vw[i][1]] + vw[i][0], dp[i][w])
| (n, w) = map(int, input().split())
vw = [list(map(int, input().split())) for _ in range(N)]
dp = [[0] * W for _ in range(N)]
for i in range(N):
for w in range(W):
if w >= vw[i][1]:
dp[i + 1][w] = max(dp[i][w - vw[i][1]] + vw[i][0], dp[i][w]) |
valor = int(input("Informe um valor: "))
triplo = valor * 3
contador = 0
while contador<5:
print(triplo)
contador = contador + 1
print("Acabou!")
| valor = int(input('Informe um valor: '))
triplo = valor * 3
contador = 0
while contador < 5:
print(triplo)
contador = contador + 1
print('Acabou!') |
__author__ = 'alse'
def content_length_test(train_metas, test_examples):
max_length = 0.0
min_length = 1000.0
for metadata in train_metas:
if max_length < metadata.length * 1.0 / metadata.size:
max_length = metadata.length * 1.0 / metadata.size
if min_length > metadata.length * 1.0 / metadata.size:
min_length = metadata.length * 1.0 / metadata.size
avg_length = (min_length + max_length) / 2
sum_length = 0
sum_length += len(" ".join(test_examples).split())
return abs(sum_length * 1.0 / len(test_examples) - avg_length)
def jaccard_similarity(x, y):
intersection_cardinality = len(set.intersection(*[set(x), set(y)]))
union_cardinality = len(set.union(*[set(x), set(y)]))
return intersection_cardinality / float(union_cardinality)
def get_n_grams(sentence, n):
return [sentence[i:i + n] for i in xrange(len(sentence) - n)]
def label_text_test(train_metas, test_label): # TODO check if this is right
return max([jaccard_similarity(get_n_grams(x, 2), get_n_grams(test_label, 2)) for x in train_metas])
| __author__ = 'alse'
def content_length_test(train_metas, test_examples):
max_length = 0.0
min_length = 1000.0
for metadata in train_metas:
if max_length < metadata.length * 1.0 / metadata.size:
max_length = metadata.length * 1.0 / metadata.size
if min_length > metadata.length * 1.0 / metadata.size:
min_length = metadata.length * 1.0 / metadata.size
avg_length = (min_length + max_length) / 2
sum_length = 0
sum_length += len(' '.join(test_examples).split())
return abs(sum_length * 1.0 / len(test_examples) - avg_length)
def jaccard_similarity(x, y):
intersection_cardinality = len(set.intersection(*[set(x), set(y)]))
union_cardinality = len(set.union(*[set(x), set(y)]))
return intersection_cardinality / float(union_cardinality)
def get_n_grams(sentence, n):
return [sentence[i:i + n] for i in xrange(len(sentence) - n)]
def label_text_test(train_metas, test_label):
return max([jaccard_similarity(get_n_grams(x, 2), get_n_grams(test_label, 2)) for x in train_metas]) |
while True:
op = input("Digite o Operador: ")
result = 0
if (op != '+') and (op != '-') and (op != '*') and (op != '/') and (op != '#'):
print("Operador invalido!")
else:
if op == '#':
print("Encerrando!")
break
n1 = float(input("Digite o valor 1: "))
n2 = float(input("Digite o valor 2: "))
if op == '+':
result = n1 + n2
elif op == '-':
result = n1 - n2
elif op == '*':
result = n1 * n2
elif op == '/':
if n2 == 0:
print("Operacao invalida (Divisao por 0)")
else:
result = n1 / n2
print(f"O resultado eh {result}") | while True:
op = input('Digite o Operador: ')
result = 0
if op != '+' and op != '-' and (op != '*') and (op != '/') and (op != '#'):
print('Operador invalido!')
else:
if op == '#':
print('Encerrando!')
break
n1 = float(input('Digite o valor 1: '))
n2 = float(input('Digite o valor 2: '))
if op == '+':
result = n1 + n2
elif op == '-':
result = n1 - n2
elif op == '*':
result = n1 * n2
elif op == '/':
if n2 == 0:
print('Operacao invalida (Divisao por 0)')
else:
result = n1 / n2
print(f'O resultado eh {result}') |
class Solution:
def smallerNumbersThanCurrent(self, nums: List[int]) -> List[int]:
nums_copy = nums.copy()
ret = []
count = 0
for i in range(len(nums)):
nums.pop(i)
nums.insert(0, nums_copy[i])
count = 0
j = 1
while j < len(nums) :
if nums[0] > nums[j]:
count += 1
j += 1
ret.append(count)
return ret
| class Solution:
def smaller_numbers_than_current(self, nums: List[int]) -> List[int]:
nums_copy = nums.copy()
ret = []
count = 0
for i in range(len(nums)):
nums.pop(i)
nums.insert(0, nums_copy[i])
count = 0
j = 1
while j < len(nums):
if nums[0] > nums[j]:
count += 1
j += 1
ret.append(count)
return ret |
#############################################################
# rename or copy this file to config.py if you make changes #
#############################################################
# change this to your fully-qualified domain name to run a
# remote server. The default value of localhost will
# only allow connections from the same computer.
#
# for remote (cloud) deployments, it is advised to remove
# the "local" data_sources item below, and to serve static
# files using a standard webserver
#
# if use_redis is False, server will use in-memory cache.
# TODO: Convert this to JSON file in web-accesible ('static')
# directory.
config = {
# ssl_args for https serving the rpc
# ssl_args = {"keyfile": None, "certfile": None}
# Cache engines are diskcache, redis, or memory if not specified
"cache": {
"engine": "diskcache",
"params": {"size_limit": int(4*2**30)}
},
"data_sources": [
{
"name": "local",
"url": "file:///",
"start_path": "",
},
{
"name": "ncnr",
"url": "http://ncnr.nist.gov/pub/",
"start_path": "ncnrdata",
"file_helper_url": "https://ncnr.nist.gov/ncnrdata/listftpfiles_json.php",
},
{
"name": "charlotte",
"url": "http://charlotte.ncnr.nist.gov/pub",
"start_path": "",
"file_helper_url": "http://charlotte.ncnr.nist.gov/ncnrdata/listftpfiles_json.php",
},
# set start_path for local files to usr/local/nice/server_data/experiments
# for instrument installs
{
"name": "ncnr_DOI",
"DOI": "10.18434/T4201B",
"file_helper_url": "https://ncnr.nist.gov/ncnrdata/listncnrdatafiles_json.php"
},
],
# if not set, will instantiate all instruments.
"instruments": ["refl", "ospec", "sans"]
}
| config = {'cache': {'engine': 'diskcache', 'params': {'size_limit': int(4 * 2 ** 30)}}, 'data_sources': [{'name': 'local', 'url': 'file:///', 'start_path': ''}, {'name': 'ncnr', 'url': 'http://ncnr.nist.gov/pub/', 'start_path': 'ncnrdata', 'file_helper_url': 'https://ncnr.nist.gov/ncnrdata/listftpfiles_json.php'}, {'name': 'charlotte', 'url': 'http://charlotte.ncnr.nist.gov/pub', 'start_path': '', 'file_helper_url': 'http://charlotte.ncnr.nist.gov/ncnrdata/listftpfiles_json.php'}, {'name': 'ncnr_DOI', 'DOI': '10.18434/T4201B', 'file_helper_url': 'https://ncnr.nist.gov/ncnrdata/listncnrdatafiles_json.php'}], 'instruments': ['refl', 'ospec', 'sans']} |
# Kernel config
c.IPKernelApp.pylab = 'inline' # if you want plotting support always in your notebook
c = get_config()
c.NotebookApp.ip = '*'
c.NotebookApp.port = 8888
c.NotebookApp.open_browser = False
c.NotebookApp.token = ''
c.NotebookApp.password = u''
c.notebookApp.open_browser = True | c.IPKernelApp.pylab = 'inline'
c = get_config()
c.NotebookApp.ip = '*'
c.NotebookApp.port = 8888
c.NotebookApp.open_browser = False
c.NotebookApp.token = ''
c.NotebookApp.password = u''
c.notebookApp.open_browser = True |
def check_parity(a: int, b: int, c: int) -> bool:
return a%2 == b%2 == c%2
def print_result(result: bool) -> None:
if result:
print("WIN")
else:
print("FAIL")
a, b, c = map(int, input().strip().split())
print_result(check_parity(a, b, c))
| def check_parity(a: int, b: int, c: int) -> bool:
return a % 2 == b % 2 == c % 2
def print_result(result: bool) -> None:
if result:
print('WIN')
else:
print('FAIL')
(a, b, c) = map(int, input().strip().split())
print_result(check_parity(a, b, c)) |
class employee:
def __init__(self,first,last,pay):
self.first = first
self.last = last
self.pay = pay
self.email = first + '.' +last + '@gmail.com'
def fullname(self):
return '{} {}'.format(self.first,self.last)
#instance variables contain data that is unique to each instances
emp1 = employee('corey','schafer',50000)
emp2 = employee('baken','henry',40000)
# print(emp1)
# print(emp2)
print(emp1.email)
print(emp2.email)
# print('{} {}'.format(emp1.first,emp1.last))
print(emp1.fullname()) | class Employee:
def __init__(self, first, last, pay):
self.first = first
self.last = last
self.pay = pay
self.email = first + '.' + last + '@gmail.com'
def fullname(self):
return '{} {}'.format(self.first, self.last)
emp1 = employee('corey', 'schafer', 50000)
emp2 = employee('baken', 'henry', 40000)
print(emp1.email)
print(emp2.email)
print(emp1.fullname()) |
# Copyright (c) 2013, Tomohiro Kusumi
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# RELEASE is basically always 1.
# It was added only to sync with RPM versioning.
# Everytime a batch of new commits is pushed to GitHub, MINOR2 gets incremented.
# RPM patches within the same fileobj version may or may not increment RELEASE.
MAJOR = 0
MINOR1 = 7
MINOR2 = 106
RELEASE = 1
def get_version():
return MAJOR, MINOR1, MINOR2
def get_release():
return MAJOR, MINOR1, MINOR2, RELEASE
def get_version_string():
return "{0}.{1}.{2}".format(*get_version())
def get_release_string():
return "{0}.{1}.{2}-{3}".format(*get_release())
def get_tag_string():
return "v" + get_version_string()
try:
__version__ = get_version_string()
except Exception:
__version__ = "???" # .format() unsupported
| major = 0
minor1 = 7
minor2 = 106
release = 1
def get_version():
return (MAJOR, MINOR1, MINOR2)
def get_release():
return (MAJOR, MINOR1, MINOR2, RELEASE)
def get_version_string():
return '{0}.{1}.{2}'.format(*get_version())
def get_release_string():
return '{0}.{1}.{2}-{3}'.format(*get_release())
def get_tag_string():
return 'v' + get_version_string()
try:
__version__ = get_version_string()
except Exception:
__version__ = '???' |
def file_name_for_format(file_format):
names = {
'json': 'data',
'xlsx': 'catalog'
}
file_name = names[file_format]
return file_name
| def file_name_for_format(file_format):
names = {'json': 'data', 'xlsx': 'catalog'}
file_name = names[file_format]
return file_name |
def main(request, response):
location = request.GET.first(b"location")
if request.method == u"OPTIONS":
if b"redirect_preflight" in request.GET:
response.status = 302
response.headers.set(b"Location", location)
else:
response.status = 200
response.headers.set(b"Access-Control-Allow-Methods", b"GET")
response.headers.set(b"Access-Control-Max-Age", 1)
elif request.method == u"GET":
response.status = 302
response.headers.set(b"Location", location)
if b"allow_origin" in request.GET:
response.headers.set(b"Access-Control-Allow-Origin", request.headers.get(b"origin"))
if b"allow_header" in request.GET:
response.headers.set(b"Access-Control-Allow-Headers", request.GET.first(b"allow_header"))
| def main(request, response):
location = request.GET.first(b'location')
if request.method == u'OPTIONS':
if b'redirect_preflight' in request.GET:
response.status = 302
response.headers.set(b'Location', location)
else:
response.status = 200
response.headers.set(b'Access-Control-Allow-Methods', b'GET')
response.headers.set(b'Access-Control-Max-Age', 1)
elif request.method == u'GET':
response.status = 302
response.headers.set(b'Location', location)
if b'allow_origin' in request.GET:
response.headers.set(b'Access-Control-Allow-Origin', request.headers.get(b'origin'))
if b'allow_header' in request.GET:
response.headers.set(b'Access-Control-Allow-Headers', request.GET.first(b'allow_header')) |
# set random number generator
np.random.seed(2020)
# initialize step_end, t_range, v and syn
step_end = int(t_max / dt)
t_range = np.linspace(0, t_max, num=step_end)
v = el * np.ones(step_end)
syn = i_mean * (1 + 0.1 * (t_max/dt) ** (0.5) * (2 * np.random.random(step_end) - 1))
# loop for step_end - 1 steps
for step in range(1, step_end):
v[step] = v[step - 1] + (dt / tau) * (el - v[step - 1] + r * syn[step])
with plt.xkcd():
# initialize the figure
plt.figure()
plt.title('$V_m$ with random I(t)')
plt.xlabel('time (s)')
plt.ylabel(r'$V_m$ (V)')
plt.plot(t_range, v, 'k.')
plt.show() | np.random.seed(2020)
step_end = int(t_max / dt)
t_range = np.linspace(0, t_max, num=step_end)
v = el * np.ones(step_end)
syn = i_mean * (1 + 0.1 * (t_max / dt) ** 0.5 * (2 * np.random.random(step_end) - 1))
for step in range(1, step_end):
v[step] = v[step - 1] + dt / tau * (el - v[step - 1] + r * syn[step])
with plt.xkcd():
plt.figure()
plt.title('$V_m$ with random I(t)')
plt.xlabel('time (s)')
plt.ylabel('$V_m$ (V)')
plt.plot(t_range, v, 'k.')
plt.show() |
##Patterns: E0107
def test():
a = 1
##Err: E0107
++a
##Err: E0107
--a | def test():
a = 1
++a
--a |
#
# PySNMP MIB module BIANCA-BRICK-OSPF-ERR-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/BIANCA-BRICK-OSPF-ERR-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 17:21:24 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")
ValueRangeConstraint, SingleValueConstraint, ConstraintsUnion, ValueSizeConstraint, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "SingleValueConstraint", "ConstraintsUnion", "ValueSizeConstraint", "ConstraintsIntersection")
NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance")
Integer32, iso, Bits, enterprises, ModuleIdentity, Unsigned32, Gauge32, ObjectIdentity, MibIdentifier, TimeTicks, MibScalar, MibTable, MibTableRow, MibTableColumn, Counter32, NotificationType, Counter64, IpAddress = mibBuilder.importSymbols("SNMPv2-SMI", "Integer32", "iso", "Bits", "enterprises", "ModuleIdentity", "Unsigned32", "Gauge32", "ObjectIdentity", "MibIdentifier", "TimeTicks", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Counter32", "NotificationType", "Counter64", "IpAddress")
DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention")
bintec = MibIdentifier((1, 3, 6, 1, 4, 1, 272))
bibo = MibIdentifier((1, 3, 6, 1, 4, 1, 272, 4))
biboip = MibIdentifier((1, 3, 6, 1, 4, 1, 272, 4, 5))
ospfErr = MibIdentifier((1, 3, 6, 1, 4, 1, 272, 4, 5, 11))
ospfErrOspfBadVersion = MibScalar((1, 3, 6, 1, 4, 1, 272, 4, 5, 11, 1), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ospfErrOspfBadVersion.setStatus('mandatory')
ospfErrOspfBadPacketType = MibScalar((1, 3, 6, 1, 4, 1, 272, 4, 5, 11, 2), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ospfErrOspfBadPacketType.setStatus('mandatory')
ospfErrOspfBadChecksum = MibScalar((1, 3, 6, 1, 4, 1, 272, 4, 5, 11, 3), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ospfErrOspfBadChecksum.setStatus('mandatory')
ospfErrIpBadDestination = MibScalar((1, 3, 6, 1, 4, 1, 272, 4, 5, 11, 4), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ospfErrIpBadDestination.setStatus('mandatory')
ospfErrOspfBadAreaId = MibScalar((1, 3, 6, 1, 4, 1, 272, 4, 5, 11, 5), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ospfErrOspfBadAreaId.setStatus('mandatory')
ospfErrOspfAuthenticationFailed = MibScalar((1, 3, 6, 1, 4, 1, 272, 4, 5, 11, 6), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ospfErrOspfAuthenticationFailed.setStatus('mandatory')
ospfErrOspfUnknownNeighbor = MibScalar((1, 3, 6, 1, 4, 1, 272, 4, 5, 11, 7), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ospfErrOspfUnknownNeighbor.setStatus('mandatory')
ospfErrHelloNetmaskMismatch = MibScalar((1, 3, 6, 1, 4, 1, 272, 4, 5, 11, 8), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ospfErrHelloNetmaskMismatch.setStatus('mandatory')
ospfErrHelloDeadTimerMismatch = MibScalar((1, 3, 6, 1, 4, 1, 272, 4, 5, 11, 9), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ospfErrHelloDeadTimerMismatch.setStatus('mandatory')
ospfErrHelloTimerMismatch = MibScalar((1, 3, 6, 1, 4, 1, 272, 4, 5, 11, 10), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ospfErrHelloTimerMismatch.setStatus('mandatory')
ospfErrHelloOptionMismatch = MibScalar((1, 3, 6, 1, 4, 1, 272, 4, 5, 11, 11), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ospfErrHelloOptionMismatch.setStatus('mandatory')
ospfErrOspfRouterIdConfusion = MibScalar((1, 3, 6, 1, 4, 1, 272, 4, 5, 11, 12), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ospfErrOspfRouterIdConfusion.setStatus('mandatory')
ospfErrOspfUnknownLsaType = MibScalar((1, 3, 6, 1, 4, 1, 272, 4, 5, 11, 13), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ospfErrOspfUnknownLsaType.setStatus('mandatory')
ospfErrDdOptionMismatch = MibScalar((1, 3, 6, 1, 4, 1, 272, 4, 5, 11, 14), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ospfErrDdOptionMismatch.setStatus('mandatory')
ospfErrDdNeighborStateLow = MibScalar((1, 3, 6, 1, 4, 1, 272, 4, 5, 11, 15), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ospfErrDdNeighborStateLow.setStatus('mandatory')
ospfErrLsackBadAck = MibScalar((1, 3, 6, 1, 4, 1, 272, 4, 5, 11, 16), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ospfErrLsackBadAck.setStatus('mandatory')
ospfErrLsackDuplicateAck = MibScalar((1, 3, 6, 1, 4, 1, 272, 4, 5, 11, 17), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ospfErrLsackDuplicateAck.setStatus('mandatory')
ospfErrLsreqBadRequest = MibScalar((1, 3, 6, 1, 4, 1, 272, 4, 5, 11, 18), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ospfErrLsreqBadRequest.setStatus('mandatory')
ospfErrLsreqNeighborStateLow = MibScalar((1, 3, 6, 1, 4, 1, 272, 4, 5, 11, 19), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ospfErrLsreqNeighborStateLow.setStatus('mandatory')
ospfErrLsupdNeighborStateLow = MibScalar((1, 3, 6, 1, 4, 1, 272, 4, 5, 11, 20), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ospfErrLsupdNeighborStateLow.setStatus('mandatory')
ospfErrLsupdBadLsaChecksum = MibScalar((1, 3, 6, 1, 4, 1, 272, 4, 5, 11, 21), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ospfErrLsupdBadLsaChecksum.setStatus('mandatory')
ospfErrLsupdNewerSelfgenLsa = MibScalar((1, 3, 6, 1, 4, 1, 272, 4, 5, 11, 22), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ospfErrLsupdNewerSelfgenLsa.setStatus('mandatory')
ospfErrLsupdLessRecentLsa = MibScalar((1, 3, 6, 1, 4, 1, 272, 4, 5, 11, 23), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: ospfErrLsupdLessRecentLsa.setStatus('mandatory')
mibBuilder.exportSymbols("BIANCA-BRICK-OSPF-ERR-MIB", ospfErrLsupdBadLsaChecksum=ospfErrLsupdBadLsaChecksum, ospfErrOspfBadChecksum=ospfErrOspfBadChecksum, ospfErr=ospfErr, ospfErrHelloTimerMismatch=ospfErrHelloTimerMismatch, ospfErrOspfBadVersion=ospfErrOspfBadVersion, ospfErrOspfUnknownNeighbor=ospfErrOspfUnknownNeighbor, ospfErrOspfUnknownLsaType=ospfErrOspfUnknownLsaType, ospfErrOspfRouterIdConfusion=ospfErrOspfRouterIdConfusion, ospfErrLsackBadAck=ospfErrLsackBadAck, ospfErrLsupdNewerSelfgenLsa=ospfErrLsupdNewerSelfgenLsa, bibo=bibo, ospfErrLsreqNeighborStateLow=ospfErrLsreqNeighborStateLow, ospfErrLsreqBadRequest=ospfErrLsreqBadRequest, ospfErrDdOptionMismatch=ospfErrDdOptionMismatch, ospfErrLsupdNeighborStateLow=ospfErrLsupdNeighborStateLow, ospfErrLsackDuplicateAck=ospfErrLsackDuplicateAck, ospfErrOspfBadAreaId=ospfErrOspfBadAreaId, ospfErrLsupdLessRecentLsa=ospfErrLsupdLessRecentLsa, ospfErrHelloOptionMismatch=ospfErrHelloOptionMismatch, ospfErrOspfBadPacketType=ospfErrOspfBadPacketType, ospfErrHelloDeadTimerMismatch=ospfErrHelloDeadTimerMismatch, ospfErrDdNeighborStateLow=ospfErrDdNeighborStateLow, bintec=bintec, ospfErrOspfAuthenticationFailed=ospfErrOspfAuthenticationFailed, ospfErrHelloNetmaskMismatch=ospfErrHelloNetmaskMismatch, biboip=biboip, ospfErrIpBadDestination=ospfErrIpBadDestination)
| (octet_string, integer, object_identifier) = mibBuilder.importSymbols('ASN1', 'OctetString', 'Integer', 'ObjectIdentifier')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(value_range_constraint, single_value_constraint, constraints_union, value_size_constraint, constraints_intersection) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueRangeConstraint', 'SingleValueConstraint', 'ConstraintsUnion', 'ValueSizeConstraint', 'ConstraintsIntersection')
(notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance')
(integer32, iso, bits, enterprises, module_identity, unsigned32, gauge32, object_identity, mib_identifier, time_ticks, mib_scalar, mib_table, mib_table_row, mib_table_column, counter32, notification_type, counter64, ip_address) = mibBuilder.importSymbols('SNMPv2-SMI', 'Integer32', 'iso', 'Bits', 'enterprises', 'ModuleIdentity', 'Unsigned32', 'Gauge32', 'ObjectIdentity', 'MibIdentifier', 'TimeTicks', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Counter32', 'NotificationType', 'Counter64', 'IpAddress')
(display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention')
bintec = mib_identifier((1, 3, 6, 1, 4, 1, 272))
bibo = mib_identifier((1, 3, 6, 1, 4, 1, 272, 4))
biboip = mib_identifier((1, 3, 6, 1, 4, 1, 272, 4, 5))
ospf_err = mib_identifier((1, 3, 6, 1, 4, 1, 272, 4, 5, 11))
ospf_err_ospf_bad_version = mib_scalar((1, 3, 6, 1, 4, 1, 272, 4, 5, 11, 1), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ospfErrOspfBadVersion.setStatus('mandatory')
ospf_err_ospf_bad_packet_type = mib_scalar((1, 3, 6, 1, 4, 1, 272, 4, 5, 11, 2), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ospfErrOspfBadPacketType.setStatus('mandatory')
ospf_err_ospf_bad_checksum = mib_scalar((1, 3, 6, 1, 4, 1, 272, 4, 5, 11, 3), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ospfErrOspfBadChecksum.setStatus('mandatory')
ospf_err_ip_bad_destination = mib_scalar((1, 3, 6, 1, 4, 1, 272, 4, 5, 11, 4), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ospfErrIpBadDestination.setStatus('mandatory')
ospf_err_ospf_bad_area_id = mib_scalar((1, 3, 6, 1, 4, 1, 272, 4, 5, 11, 5), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ospfErrOspfBadAreaId.setStatus('mandatory')
ospf_err_ospf_authentication_failed = mib_scalar((1, 3, 6, 1, 4, 1, 272, 4, 5, 11, 6), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ospfErrOspfAuthenticationFailed.setStatus('mandatory')
ospf_err_ospf_unknown_neighbor = mib_scalar((1, 3, 6, 1, 4, 1, 272, 4, 5, 11, 7), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ospfErrOspfUnknownNeighbor.setStatus('mandatory')
ospf_err_hello_netmask_mismatch = mib_scalar((1, 3, 6, 1, 4, 1, 272, 4, 5, 11, 8), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ospfErrHelloNetmaskMismatch.setStatus('mandatory')
ospf_err_hello_dead_timer_mismatch = mib_scalar((1, 3, 6, 1, 4, 1, 272, 4, 5, 11, 9), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ospfErrHelloDeadTimerMismatch.setStatus('mandatory')
ospf_err_hello_timer_mismatch = mib_scalar((1, 3, 6, 1, 4, 1, 272, 4, 5, 11, 10), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ospfErrHelloTimerMismatch.setStatus('mandatory')
ospf_err_hello_option_mismatch = mib_scalar((1, 3, 6, 1, 4, 1, 272, 4, 5, 11, 11), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ospfErrHelloOptionMismatch.setStatus('mandatory')
ospf_err_ospf_router_id_confusion = mib_scalar((1, 3, 6, 1, 4, 1, 272, 4, 5, 11, 12), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ospfErrOspfRouterIdConfusion.setStatus('mandatory')
ospf_err_ospf_unknown_lsa_type = mib_scalar((1, 3, 6, 1, 4, 1, 272, 4, 5, 11, 13), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ospfErrOspfUnknownLsaType.setStatus('mandatory')
ospf_err_dd_option_mismatch = mib_scalar((1, 3, 6, 1, 4, 1, 272, 4, 5, 11, 14), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ospfErrDdOptionMismatch.setStatus('mandatory')
ospf_err_dd_neighbor_state_low = mib_scalar((1, 3, 6, 1, 4, 1, 272, 4, 5, 11, 15), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ospfErrDdNeighborStateLow.setStatus('mandatory')
ospf_err_lsack_bad_ack = mib_scalar((1, 3, 6, 1, 4, 1, 272, 4, 5, 11, 16), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ospfErrLsackBadAck.setStatus('mandatory')
ospf_err_lsack_duplicate_ack = mib_scalar((1, 3, 6, 1, 4, 1, 272, 4, 5, 11, 17), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ospfErrLsackDuplicateAck.setStatus('mandatory')
ospf_err_lsreq_bad_request = mib_scalar((1, 3, 6, 1, 4, 1, 272, 4, 5, 11, 18), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ospfErrLsreqBadRequest.setStatus('mandatory')
ospf_err_lsreq_neighbor_state_low = mib_scalar((1, 3, 6, 1, 4, 1, 272, 4, 5, 11, 19), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ospfErrLsreqNeighborStateLow.setStatus('mandatory')
ospf_err_lsupd_neighbor_state_low = mib_scalar((1, 3, 6, 1, 4, 1, 272, 4, 5, 11, 20), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ospfErrLsupdNeighborStateLow.setStatus('mandatory')
ospf_err_lsupd_bad_lsa_checksum = mib_scalar((1, 3, 6, 1, 4, 1, 272, 4, 5, 11, 21), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ospfErrLsupdBadLsaChecksum.setStatus('mandatory')
ospf_err_lsupd_newer_selfgen_lsa = mib_scalar((1, 3, 6, 1, 4, 1, 272, 4, 5, 11, 22), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ospfErrLsupdNewerSelfgenLsa.setStatus('mandatory')
ospf_err_lsupd_less_recent_lsa = mib_scalar((1, 3, 6, 1, 4, 1, 272, 4, 5, 11, 23), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
ospfErrLsupdLessRecentLsa.setStatus('mandatory')
mibBuilder.exportSymbols('BIANCA-BRICK-OSPF-ERR-MIB', ospfErrLsupdBadLsaChecksum=ospfErrLsupdBadLsaChecksum, ospfErrOspfBadChecksum=ospfErrOspfBadChecksum, ospfErr=ospfErr, ospfErrHelloTimerMismatch=ospfErrHelloTimerMismatch, ospfErrOspfBadVersion=ospfErrOspfBadVersion, ospfErrOspfUnknownNeighbor=ospfErrOspfUnknownNeighbor, ospfErrOspfUnknownLsaType=ospfErrOspfUnknownLsaType, ospfErrOspfRouterIdConfusion=ospfErrOspfRouterIdConfusion, ospfErrLsackBadAck=ospfErrLsackBadAck, ospfErrLsupdNewerSelfgenLsa=ospfErrLsupdNewerSelfgenLsa, bibo=bibo, ospfErrLsreqNeighborStateLow=ospfErrLsreqNeighborStateLow, ospfErrLsreqBadRequest=ospfErrLsreqBadRequest, ospfErrDdOptionMismatch=ospfErrDdOptionMismatch, ospfErrLsupdNeighborStateLow=ospfErrLsupdNeighborStateLow, ospfErrLsackDuplicateAck=ospfErrLsackDuplicateAck, ospfErrOspfBadAreaId=ospfErrOspfBadAreaId, ospfErrLsupdLessRecentLsa=ospfErrLsupdLessRecentLsa, ospfErrHelloOptionMismatch=ospfErrHelloOptionMismatch, ospfErrOspfBadPacketType=ospfErrOspfBadPacketType, ospfErrHelloDeadTimerMismatch=ospfErrHelloDeadTimerMismatch, ospfErrDdNeighborStateLow=ospfErrDdNeighborStateLow, bintec=bintec, ospfErrOspfAuthenticationFailed=ospfErrOspfAuthenticationFailed, ospfErrHelloNetmaskMismatch=ospfErrHelloNetmaskMismatch, biboip=biboip, ospfErrIpBadDestination=ospfErrIpBadDestination) |
def deep_index(lst, w):
return [[i, sub.index(w)] for (i, sub) in enumerate(lst) if w in sub]
class variable():
def __init__(self, name, val):
self.name = name
self.val = val
class variableHandler():
def __init__(self):
self.varList = []
def create(self, varName, varVal):
inList = False
for var in self.varList:
if var.name == varName:
inList = True
if not inList:
var = variable(varName, varVal)
self.varList.append(var)
return var
else:
for var in self.varList:
if var.name == varName:
var.val = varVal
return variable(varName, varVal)
def get(self, varName):
for var in self.varList:
if var.name == varName:
return var.val
return None | def deep_index(lst, w):
return [[i, sub.index(w)] for (i, sub) in enumerate(lst) if w in sub]
class Variable:
def __init__(self, name, val):
self.name = name
self.val = val
class Variablehandler:
def __init__(self):
self.varList = []
def create(self, varName, varVal):
in_list = False
for var in self.varList:
if var.name == varName:
in_list = True
if not inList:
var = variable(varName, varVal)
self.varList.append(var)
return var
else:
for var in self.varList:
if var.name == varName:
var.val = varVal
return variable(varName, varVal)
def get(self, varName):
for var in self.varList:
if var.name == varName:
return var.val
return None |
#!/usr/bin/python3
# code for AdventOfCode day 1 http://adventofcode.com/2017/day/1
# get user input WITHOUT validation
# the code will fail when repeating non numeric chars
input_seq = input()
# append first algarism to the end of a new 'extended'
# that way we can use a single 'for' loop for everything
input_seq_extended = str(input_seq) + str(input_seq[0])
# initialize the output as an integer
total_output = 0
for i in range(0, len(input_seq)):
# not sure if this checking of range happens every loop.
# # maybe its inefficient
# permute all the input checking for repeated chars
if input_seq_extended[i] == input_seq_extended[i+1]:
print("Match! "+ str(i) + " Total output: " + str(total_output))
total_output += int(input_seq_extended[i])
print("Output: " + str(total_output))
| input_seq = input()
input_seq_extended = str(input_seq) + str(input_seq[0])
total_output = 0
for i in range(0, len(input_seq)):
if input_seq_extended[i] == input_seq_extended[i + 1]:
print('Match! ' + str(i) + ' Total output: ' + str(total_output))
total_output += int(input_seq_extended[i])
print('Output: ' + str(total_output)) |
class Player:
next_id = 1
def __init__(self, name, corp_id=None, runner_id=None):
self.id = Player.next_id
Player.next_id += 1
self.name = name
self.corp_id = corp_id
self.runner_id = runner_id
self.score = 0
self.sos = 0
self.esos = 0
self.side_bias = 0
# self.opponents is a dictionary key'd by opponent ID
# value is the side they played against the opponent
self.opponents = {}
self.byes_recieved = 0
self.dropped = False
self.is_bye = False
def __repr__(self):
return f"<Player> {self.id} : {self.name}"
def allowable_pairings(self, opp_id):
# For a given opponent return what sides they can play
# Only works in swiss
if opp_id not in self.opponents.keys():
return 0 # Sum of -1 and 1
if self.opponents[opp_id] == 0:
return None
else:
return self.opponents[opp_id] * (-1)
def games_played(self):
count = 0
for side in self.opponents.values():
if side == 0:
count += 2
else:
count += 1
return count
| class Player:
next_id = 1
def __init__(self, name, corp_id=None, runner_id=None):
self.id = Player.next_id
Player.next_id += 1
self.name = name
self.corp_id = corp_id
self.runner_id = runner_id
self.score = 0
self.sos = 0
self.esos = 0
self.side_bias = 0
self.opponents = {}
self.byes_recieved = 0
self.dropped = False
self.is_bye = False
def __repr__(self):
return f'<Player> {self.id} : {self.name}'
def allowable_pairings(self, opp_id):
if opp_id not in self.opponents.keys():
return 0
if self.opponents[opp_id] == 0:
return None
else:
return self.opponents[opp_id] * -1
def games_played(self):
count = 0
for side in self.opponents.values():
if side == 0:
count += 2
else:
count += 1
return count |
word = input('Enter a word')
letter = input('Enter a letter')
def count(word, letter):
counter = 0
for character in word:
if character == letter:
counter = counter + 1
print(counter)
count(word, letter)
| word = input('Enter a word')
letter = input('Enter a letter')
def count(word, letter):
counter = 0
for character in word:
if character == letter:
counter = counter + 1
print(counter)
count(word, letter) |
'''
Implement a function which takes as input a string s
and returns true if s is a palindromic string.
'''
def is_palindrome(s): # Time: O(n)
# i moves forward, and j moves backward.
i, j = 0, len(s) - 1
while i < j:
# i and j both skip non-alphanumeric characters.
while not s[i].isalnum() and i < j:
i += 1
while not s[j].isalnum() and i < j:
j -= 1
if s[i].lower() != s[j].lower():
return False
i, j = i + 1, j - 1
return True
assert(is_palindrome('A man, a plan, a canal, Panama.') == True)
assert(is_palindrome('Able was I, ere I saw Elba!') == True)
assert(is_palindrome('Ray a Ray') == False)
| """
Implement a function which takes as input a string s
and returns true if s is a palindromic string.
"""
def is_palindrome(s):
(i, j) = (0, len(s) - 1)
while i < j:
while not s[i].isalnum() and i < j:
i += 1
while not s[j].isalnum() and i < j:
j -= 1
if s[i].lower() != s[j].lower():
return False
(i, j) = (i + 1, j - 1)
return True
assert is_palindrome('A man, a plan, a canal, Panama.') == True
assert is_palindrome('Able was I, ere I saw Elba!') == True
assert is_palindrome('Ray a Ray') == False |
def game(player1, player2):
history = []
while len(player1) != 0 and len(player2) != 0:
state = {'player1': player1.copy(), 'player2': player2.copy()}
if state in history:
return True, player1 + player2
history.append(state)
num1 = player1.pop(0)
num2 = player2.pop(0)
if num1 <= len(player1) and num2 <= len(player2):
winner, deck = game(player1[0:num1], player2[0:num2])
else:
winner = num1 > num2
if winner:
player1 += [num1, num2]
else:
player2 += [num2, num1]
return len(player1) != 0, player1 + player2
paragraph = open("input.txt", "r").read().split('\n\n')
g1 = list(map(int, paragraph[0].split('\n')[1:]))
g2 = list(map(int, paragraph[1].split('\n')[1:]))
final = game(g1, g2)[1][::-1] # get second result because is winner final deck
total = 0
for i in range(len(final)):
total += (i + 1) * final[i]
print(total)
| def game(player1, player2):
history = []
while len(player1) != 0 and len(player2) != 0:
state = {'player1': player1.copy(), 'player2': player2.copy()}
if state in history:
return (True, player1 + player2)
history.append(state)
num1 = player1.pop(0)
num2 = player2.pop(0)
if num1 <= len(player1) and num2 <= len(player2):
(winner, deck) = game(player1[0:num1], player2[0:num2])
else:
winner = num1 > num2
if winner:
player1 += [num1, num2]
else:
player2 += [num2, num1]
return (len(player1) != 0, player1 + player2)
paragraph = open('input.txt', 'r').read().split('\n\n')
g1 = list(map(int, paragraph[0].split('\n')[1:]))
g2 = list(map(int, paragraph[1].split('\n')[1:]))
final = game(g1, g2)[1][::-1]
total = 0
for i in range(len(final)):
total += (i + 1) * final[i]
print(total) |
#!/usr/bin/env python3
######################################################################################
# #
# Program purpose: Creates a string made of the first 2 and the last 2 chars #
# from a given string. If the string length is less than 2, #
# returns instead an empty string. #
# Program Author : Happi Yvan <ivensteinpoker@gmail.com> #
# Creation Date : October 10, 2019 #
# #
######################################################################################
def get_user_string(mess: str):
is_valid = False
data = ''
while is_valid is False:
try:
data = input(mess)
if len(data) == 0:
raise ValueError("Please provide a string")
is_valid = True
except ValueError as ve:
print(f'[ERROR]: {ve}')
return data
def process_data(main_data: str):
if len(main_data) < 2:
return ''
return main_data[:2] + main_data[-2:]
if __name__ == "__main__":
user_str = get_user_string('Enter some string: ')
print(f'Processed data: {process_data(main_data=user_str)}') | def get_user_string(mess: str):
is_valid = False
data = ''
while is_valid is False:
try:
data = input(mess)
if len(data) == 0:
raise value_error('Please provide a string')
is_valid = True
except ValueError as ve:
print(f'[ERROR]: {ve}')
return data
def process_data(main_data: str):
if len(main_data) < 2:
return ''
return main_data[:2] + main_data[-2:]
if __name__ == '__main__':
user_str = get_user_string('Enter some string: ')
print(f'Processed data: {process_data(main_data=user_str)}') |
# Program to implement Affine Cipher for encryption and decryption
#returns gcd of two numbers
def gcd(num1, num2):
if num2 == 0:
return num1
return gcd(num2, num1 % num2)
#returns the inverse of a number if it exists, else '-1', under mod
def inverse(number, mod):
if gcd(number, mod) != 1:
return None
t1 = 0
t2 = 1
while number != 0:
quotient = mod // number
remainder = mod % number
t = t1 - quotient*t2
mod = number
number = remainder
t1 = t2
t2 = t
return t1
class AffineCipher:
def __init__(self, key1, key2):
self.key1 = key1
self.key2 = key2
self.keyInverse = inverse(self.key1, 26)
#returns index of the given alphabet
def index(self, alphabet):
return ord(alphabet.upper()) - ord('A')
# returns a cipher text by encrypting a plain text using affine cipher algorithm
def encrypt(self, plainTxt):
cipherTxt = str()
if not self.keyInverse:
return "INVERSE NOT FOUND!!"
for x in plainTxt:
if x.isalpha():
cipherTxt += chr((self.index(x)*self.key1 + self.key2)%26 + ord('A'))
else:
cipherTxt += x
return cipherTxt
# returns a plain text by decrypting a plain text using additive cipher algorithm
def decrypt(self, cipherTxt):
plainTxt = str()
if not self.keyInverse:
return "INVERSE NOT FOUND!!"
for x in cipherTxt:
if x.isalpha():
plainTxt += chr(((self.index(x)-self.key2) * self.keyInverse)%26 + ord('A'))
else:
plainTxt += x
return plainTxt
if __name__ == '__main__':
aff = AffineCipher(7,2)
print(aff.encrypt("hello"))
print(aff.decrypt(aff.encrypt("hello")))
| def gcd(num1, num2):
if num2 == 0:
return num1
return gcd(num2, num1 % num2)
def inverse(number, mod):
if gcd(number, mod) != 1:
return None
t1 = 0
t2 = 1
while number != 0:
quotient = mod // number
remainder = mod % number
t = t1 - quotient * t2
mod = number
number = remainder
t1 = t2
t2 = t
return t1
class Affinecipher:
def __init__(self, key1, key2):
self.key1 = key1
self.key2 = key2
self.keyInverse = inverse(self.key1, 26)
def index(self, alphabet):
return ord(alphabet.upper()) - ord('A')
def encrypt(self, plainTxt):
cipher_txt = str()
if not self.keyInverse:
return 'INVERSE NOT FOUND!!'
for x in plainTxt:
if x.isalpha():
cipher_txt += chr((self.index(x) * self.key1 + self.key2) % 26 + ord('A'))
else:
cipher_txt += x
return cipherTxt
def decrypt(self, cipherTxt):
plain_txt = str()
if not self.keyInverse:
return 'INVERSE NOT FOUND!!'
for x in cipherTxt:
if x.isalpha():
plain_txt += chr((self.index(x) - self.key2) * self.keyInverse % 26 + ord('A'))
else:
plain_txt += x
return plainTxt
if __name__ == '__main__':
aff = affine_cipher(7, 2)
print(aff.encrypt('hello'))
print(aff.decrypt(aff.encrypt('hello'))) |
# coding=utf-8
# autogenerated using ms_props_generator.py
PROPS_ID_MAP = {
"0x0001": {"data_type": "0x0102", "name": "TemplateData"},
"0x0002": {"data_type": "0x000B", "name": "AlternateRecipientAllowed"},
"0x0004": {"data_type": "0x0102", "name": "ScriptData"},
"0x0005": {"data_type": "0x000B", "name": "AutoForwarded"},
"0x000F": {"data_type": "0x0040", "name": "DeferredDeliveryTime"},
"0x0010": {"data_type": "0x0040", "name": "DeliverTime"},
"0x0015": {"data_type": "0x0040", "name": "ExpiryTime"},
"0x0017": {"data_type": "0x0003", "name": "Importance"},
"0x001A": {"data_type": "0x001F", "name": "MessageClass"},
"0x0023": {"data_type": "0x000B", "name": "OriginatorDeliveryReportRequested"},
"0x0025": {"data_type": "0x0102", "name": "ParentKey"},
"0x0026": {"data_type": "0x0003", "name": "Priority"},
"0x0029": {"data_type": "0x000B", "name": "ReadReceiptRequested"},
"0x002A": {"data_type": "0x0040", "name": "ReceiptTime"},
"0x002B": {"data_type": "0x000B", "name": "RecipientReassignmentProhibited"},
"0x002E": {"data_type": "0x0003", "name": "OriginalSensitivity"},
"0x0030": {"data_type": "0x0040", "name": "ReplyTime"},
"0x0031": {"data_type": "0x0102", "name": "ReportTag"},
"0x0032": {"data_type": "0x0040", "name": "ReportTime"},
"0x0036": {"data_type": "0x0003", "name": "Sensitivity"},
"0x0037": {"data_type": "0x001F", "name": "Subject"},
"0x0039": {"data_type": "0x0040", "name": "ClientSubmitTime"},
"0x003A": {"data_type": "0x001F", "name": "ReportName"},
"0x003B": {"data_type": "0x0102", "name": "SentRepresentingSearchKey"},
"0x003D": {"data_type": "0x001F", "name": "SubjectPrefix"},
"0x003F": {"data_type": "0x0102", "name": "ReceivedByEntryId"},
"0x0040": {"data_type": "0x001F", "name": "ReceivedByName"},
"0x0041": {"data_type": "0x0102", "name": "SentRepresentingEntryId"},
"0x0042": {"data_type": "0x001F", "name": "SentRepresentingName"},
"0x0043": {"data_type": "0x0102", "name": "ReceivedRepresentingEntryId"},
"0x0044": {"data_type": "0x001F", "name": "ReceivedRepresentingName"},
"0x0045": {"data_type": "0x0102", "name": "ReportEntryId"},
"0x0046": {"data_type": "0x0102", "name": "ReadReceiptEntryId"},
"0x0047": {"data_type": "0x0102", "name": "MessageSubmissionId"},
"0x0049": {"data_type": "0x001F", "name": "OriginalSubject"},
"0x004B": {"data_type": "0x001F", "name": "OriginalMessageClass"},
"0x004C": {"data_type": "0x0102", "name": "OriginalAuthorEntryId"},
"0x004D": {"data_type": "0x001F", "name": "OriginalAuthorName"},
"0x004E": {"data_type": "0x0040", "name": "OriginalSubmitTime"},
"0x004F": {"data_type": "0x0102", "name": "ReplyRecipientEntries"},
"0x0050": {"data_type": "0x001F", "name": "ReplyRecipientNames"},
"0x0051": {"data_type": "0x0102", "name": "ReceivedBySearchKey"},
"0x0052": {"data_type": "0x0102", "name": "ReceivedRepresentingSearchKey"},
"0x0053": {"data_type": "0x0102", "name": "ReadReceiptSearchKey"},
"0x0054": {"data_type": "0x0102", "name": "ReportSearchKey"},
"0x0055": {"data_type": "0x0040", "name": "OriginalDeliveryTime"},
"0x0057": {"data_type": "0x000B", "name": "MessageToMe"},
"0x0058": {"data_type": "0x000B", "name": "MessageCcMe"},
"0x0059": {"data_type": "0x000B", "name": "MessageRecipientMe"},
"0x005A": {"data_type": "0x001F", "name": "OriginalSenderName"},
"0x005B": {"data_type": "0x0102", "name": "OriginalSenderEntryId"},
"0x005C": {"data_type": "0x0102", "name": "OriginalSenderSearchKey"},
"0x005D": {"data_type": "0x001F", "name": "OriginalSentRepresentingName"},
"0x005E": {"data_type": "0x0102", "name": "OriginalSentRepresentingEntryId"},
"0x005F": {"data_type": "0x0102", "name": "OriginalSentRepresentingSearchKey"},
"0x0060": {"data_type": "0x0040", "name": "StartDate"},
"0x0061": {"data_type": "0x0040", "name": "EndDate"},
"0x0062": {"data_type": "0x0003", "name": "OwnerAppointmentId"},
"0x0063": {"data_type": "0x000B", "name": "ResponseRequested"},
"0x0064": {"data_type": "0x001F", "name": "SentRepresentingAddressType"},
"0x0065": {"data_type": "0x001F", "name": "SentRepresentingEmailAddress"},
"0x0066": {"data_type": "0x001F", "name": "OriginalSenderAddressType"},
"0x0067": {"data_type": "0x001F", "name": "OriginalSenderEmailAddress"},
"0x0068": {"data_type": "0x001F", "name": "OriginalSentRepresentingAddressType"},
"0x0069": {"data_type": "0x001F", "name": "OriginalSentRepresentingEmailAddress"},
"0x0070": {"data_type": "0x001F", "name": "ConversationTopic"},
"0x0071": {"data_type": "0x0102", "name": "ConversationIndex"},
"0x0072": {"data_type": "0x001F", "name": "OriginalDisplayBcc"},
"0x0073": {"data_type": "0x001F", "name": "OriginalDisplayCc"},
"0x0074": {"data_type": "0x001F", "name": "OriginalDisplayTo"},
"0x0075": {"data_type": "0x001F", "name": "ReceivedByAddressType"},
"0x0076": {"data_type": "0x001F", "name": "ReceivedByEmailAddress"},
"0x0077": {"data_type": "0x001F", "name": "ReceivedRepresentingAddressType"},
"0x0078": {"data_type": "0x001F", "name": "ReceivedRepresentingEmailAddress"},
"0x007D": {"data_type": "0x001F", "name": "TransportMessageHeaders"},
"0x007F": {"data_type": "0x0102", "name": "TnefCorrelationKey"},
"0x0080": {"data_type": "0x001F", "name": "ReportDisposition"},
"0x0081": {"data_type": "0x001F", "name": "ReportDispositionMode"},
"0x0807": {"data_type": "0x0003", "name": "AddressBookRoomCapacity"},
"0x0809": {"data_type": "0x001F", "name": "AddressBookRoomDescription"},
"0x0C04": {"data_type": "0x0003", "name": "NonDeliveryReportReasonCode"},
"0x0C05": {"data_type": "0x0003", "name": "NonDeliveryReportDiagCode"},
"0x0C06": {"data_type": "0x000B", "name": "NonReceiptNotificationRequested"},
"0x0C08": {"data_type": "0x000B", "name": "OriginatorNonDeliveryReportRequested"},
"0x0C15": {"data_type": "0x0003", "name": "RecipientType"},
"0x0C17": {"data_type": "0x000B", "name": "ReplyRequested"},
"0x0C19": {"data_type": "0x0102", "name": "SenderEntryId"},
"0x0C1A": {"data_type": "0x001F", "name": "SenderName"},
"0x0C1B": {"data_type": "0x001F", "name": "SupplementaryInfo"},
"0x0C1D": {"data_type": "0x0102", "name": "SenderSearchKey"},
"0x0C1E": {"data_type": "0x001F", "name": "SenderAddressType"},
"0x0C1F": {"data_type": "0x001F", "name": "SenderEmailAddress"},
"0x0C21": {"data_type": "0x001F", "name": "RemoteMessageTransferAgent"},
"0x0E01": {"data_type": "0x000B", "name": "DeleteAfterSubmit"},
"0x0E02": {"data_type": "0x001F", "name": "DisplayBcc"},
"0x0E03": {"data_type": "0x001F", "name": "DisplayCc"},
"0x0E04": {"data_type": "0x001F", "name": "DisplayTo"},
"0x0E06": {"data_type": "0x0040", "name": "MessageDeliveryTime"},
"0x0E07": {"data_type": "0x0003", "name": "MessageFlags"},
"0x0E08": {"data_type": "0x0014", "name": "MessageSizeExtended"},
"0x0E09": {"data_type": "0x0102", "name": "ParentEntryId"},
"0x0E0F": {"data_type": "0x000B", "name": "Responsibility"},
"0x0E12": {"data_type": "0x000D", "name": "MessageRecipients"},
"0x0E13": {"data_type": "0x000D", "name": "MessageAttachments"},
"0x0E17": {"data_type": "0x0003", "name": "MessageStatus"},
"0x0E1B": {"data_type": "0x000B", "name": "HasAttachments"},
"0x0E1D": {"data_type": "0x001F", "name": "NormalizedSubject"},
"0x0E1F": {"data_type": "0x000B", "name": "RtfInSync"},
"0x0E20": {"data_type": "0x0003", "name": "AttachSize"},
"0x0E21": {"data_type": "0x0003", "name": "AttachNumber"},
"0x0E28": {"data_type": "0x001F", "name": "PrimarySendAccount"},
"0x0E29": {"data_type": "0x001F", "name": "NextSendAcct"},
"0x0E2B": {"data_type": "0x0003", "name": "ToDoItemFlags"},
"0x0E2C": {"data_type": "0x0102", "name": "SwappedToDoStore"},
"0x0E2D": {"data_type": "0x0102", "name": "SwappedToDoData"},
"0x0E69": {"data_type": "0x000B", "name": "Read"},
"0x0E6A": {"data_type": "0x001F", "name": "SecurityDescriptorAsXml"},
"0x0E79": {"data_type": "0x0003", "name": "TrustSender"},
"0x0E84": {"data_type": "0x0102", "name": "ExchangeNTSecurityDescriptor"},
"0x0E99": {"data_type": "0x0102", "name": "ExtendedRuleMessageActions"},
"0x0E9A": {"data_type": "0x0102", "name": "ExtendedRuleMessageCondition"},
"0x0E9B": {"data_type": "0x0003", "name": "ExtendedRuleSizeLimit"},
"0x0FF4": {"data_type": "0x0003", "name": "Access"},
"0x0FF5": {"data_type": "0x0003", "name": "RowType"},
"0x0FF6": {"data_type": "0x0102", "name": "InstanceKey"},
"0x0FF7": {"data_type": "0x0003", "name": "AccessLevel"},
"0x0FF8": {"data_type": "0x0102", "name": "MappingSignature"},
"0x0FF9": {"data_type": "0x0102", "name": "RecordKey"},
"0x0FFB": {"data_type": "0x0102", "name": "StoreEntryId"},
"0x0FFE": {"data_type": "0x0003", "name": "ObjectType"},
"0x0FFF": {"data_type": "0x0102", "name": "EntryId"},
"0x1000": {"data_type": "0x001F", "name": "Body"},
"0x1001": {"data_type": "0x001F", "name": "ReportText"},
"0x1009": {"data_type": "0x0102", "name": "RtfCompressed"},
"0x1013": {"data_type": "0x0102", "name": "Html"},
"0x1014": {"data_type": "0x001F", "name": "BodyContentLocation"},
"0x1015": {"data_type": "0x001F", "name": "BodyContentId"},
"0x1016": {"data_type": "0x0003", "name": "NativeBody"},
"0x1035": {"data_type": "0x001F", "name": "InternetMessageId"},
"0x1039": {"data_type": "0x001F", "name": "InternetReferences"},
"0x1042": {"data_type": "0x001F", "name": "InReplyToId"},
"0x1043": {"data_type": "0x001F", "name": "ListHelp"},
"0x1044": {"data_type": "0x001F", "name": "ListSubscribe"},
"0x1045": {"data_type": "0x001F", "name": "ListUnsubscribe"},
"0x1046": {"data_type": "0x001F", "name": "OriginalMessageId"},
"0x1080": {"data_type": "0x0003", "name": "IconIndex"},
"0x1081": {"data_type": "0x0003", "name": "LastVerbExecuted"},
"0x1082": {"data_type": "0x0040", "name": "LastVerbExecutionTime"},
"0x1090": {"data_type": "0x0003", "name": "FlagStatus"},
"0x1091": {"data_type": "0x0040", "name": "FlagCompleteTime"},
"0x1095": {"data_type": "0x0003", "name": "FollowupIcon"},
"0x1096": {"data_type": "0x0003", "name": "BlockStatus"},
"0x10C3": {"data_type": "0x0040", "name": "ICalendarStartTime"},
"0x10C4": {"data_type": "0x0040", "name": "ICalendarEndTime"},
"0x10C5": {"data_type": "0x0040", "name": "CdoRecurrenceid"},
"0x10CA": {"data_type": "0x0040", "name": "ICalendarReminderNextTime"},
"0x10F4": {"data_type": "0x000B", "name": "AttributeHidden"},
"0x10F6": {"data_type": "0x000B", "name": "AttributeReadOnly"},
"0x3000": {"data_type": "0x0003", "name": "Rowid"},
"0x3001": {"data_type": "0x001F", "name": "DisplayName"},
"0x3002": {"data_type": "0x001F", "name": "AddressType"},
"0x3003": {"data_type": "0x001F", "name": "EmailAddress"},
"0x3004": {"data_type": "0x001F", "name": "Comment"},
"0x3005": {"data_type": "0x0003", "name": "Depth"},
"0x3007": {"data_type": "0x0040", "name": "CreationTime"},
"0x3008": {"data_type": "0x0040", "name": "LastModificationTime"},
"0x300B": {"data_type": "0x0102", "name": "SearchKey"},
"0x3010": {"data_type": "0x0102", "name": "TargetEntryId"},
"0x3013": {"data_type": "0x0102", "name": "ConversationId"},
"0x3016": {"data_type": "0x000B", "name": "ConversationIndexTracking"},
"0x3018": {"data_type": "0x0102", "name": "ArchiveTag"},
"0x3019": {"data_type": "0x0102", "name": "PolicyTag"},
"0x301A": {"data_type": "0x0003", "name": "RetentionPeriod"},
"0x301B": {"data_type": "0x0102", "name": "StartDateEtc"},
"0x301C": {"data_type": "0x0040", "name": "RetentionDate"},
"0x301D": {"data_type": "0x0003", "name": "RetentionFlags"},
"0x301E": {"data_type": "0x0003", "name": "ArchivePeriod"},
"0x301F": {"data_type": "0x0040", "name": "ArchiveDate"},
"0x340D": {"data_type": "0x0003", "name": "StoreSupportMask"},
"0x340E": {"data_type": "0x0003", "name": "StoreState"},
"0x3600": {"data_type": "0x0003", "name": "ContainerFlags"},
"0x3601": {"data_type": "0x0003", "name": "FolderType"},
"0x3602": {"data_type": "0x0003", "name": "ContentCount"},
"0x3603": {"data_type": "0x0003", "name": "ContentUnreadCount"},
"0x3609": {"data_type": "0x000B", "name": "Selectable"},
"0x360A": {"data_type": "0x000B", "name": "Subfolders"},
"0x360C": {"data_type": "0x001F", "name": "Anr"},
"0x360E": {"data_type": "0x000D", "name": "ContainerHierarchy"},
"0x360F": {"data_type": "0x000D", "name": "ContainerContents"},
"0x3610": {"data_type": "0x000D", "name": "FolderAssociatedContents"},
"0x3613": {"data_type": "0x001F", "name": "ContainerClass"},
"0x36D0": {"data_type": "0x0102", "name": "IpmAppointmentEntryId"},
"0x36D1": {"data_type": "0x0102", "name": "IpmContactEntryId"},
"0x36D2": {"data_type": "0x0102", "name": "IpmJournalEntryId"},
"0x36D3": {"data_type": "0x0102", "name": "IpmNoteEntryId"},
"0x36D4": {"data_type": "0x0102", "name": "IpmTaskEntryId"},
"0x36D5": {"data_type": "0x0102", "name": "RemindersOnlineEntryId"},
"0x36D7": {"data_type": "0x0102", "name": "IpmDraftsEntryId"},
"0x36D8": {"data_type": "0x1102", "name": "AdditionalRenEntryIds"},
"0x36D9": {"data_type": "0x0102", "name": "AdditionalRenEntryIdsEx"},
"0x36DA": {"data_type": "0x0102", "name": "ExtendedFolderFlags"},
"0x36E2": {"data_type": "0x0003", "name": "OrdinalMost"},
"0x36E4": {"data_type": "0x1102", "name": "FreeBusyEntryIds"},
"0x36E5": {"data_type": "0x001F", "name": "DefaultPostMessageClass"},
"0x3701": {"data_type": "0x000D", "name": "AttachDataObject"},
"0x3702": {"data_type": "0x0102", "name": "AttachEncoding"},
"0x3703": {"data_type": "0x001F", "name": "AttachExtension"},
"0x3704": {"data_type": "0x001F", "name": "AttachFilename"},
"0x3705": {"data_type": "0x0003", "name": "AttachMethod"},
"0x3707": {"data_type": "0x001F", "name": "AttachLongFilename"},
"0x3708": {"data_type": "0x001F", "name": "AttachPathname"},
"0x3709": {"data_type": "0x0102", "name": "AttachRendering"},
"0x370A": {"data_type": "0x0102", "name": "AttachTag"},
"0x370B": {"data_type": "0x0003", "name": "RenderingPosition"},
"0x370C": {"data_type": "0x001F", "name": "AttachTransportName"},
"0x370D": {"data_type": "0x001F", "name": "AttachLongPathname"},
"0x370E": {"data_type": "0x001F", "name": "AttachMimeTag"},
"0x370F": {"data_type": "0x0102", "name": "AttachAdditionalInformation"},
"0x3711": {"data_type": "0x001F", "name": "AttachContentBase"},
"0x3712": {"data_type": "0x001F", "name": "AttachContentId"},
"0x3713": {"data_type": "0x001F", "name": "AttachContentLocation"},
"0x3714": {"data_type": "0x0003", "name": "AttachFlags"},
"0x3719": {"data_type": "0x001F", "name": "AttachPayloadProviderGuidString"},
"0x371A": {"data_type": "0x001F", "name": "AttachPayloadClass"},
"0x371B": {"data_type": "0x001F", "name": "TextAttachmentCharset"},
"0x3900": {"data_type": "0x0003", "name": "DisplayType"},
"0x3902": {"data_type": "0x0102", "name": "Templateid"},
"0x3905": {"data_type": "0x0003", "name": "DisplayTypeEx"},
"0x39FE": {"data_type": "0x001F", "name": "SmtpAddress"},
"0x39FF": {"data_type": "0x001F", "name": "AddressBookDisplayNamePrintable"},
"0x3A00": {"data_type": "0x001F", "name": "Account"},
"0x3A02": {"data_type": "0x001F", "name": "CallbackTelephoneNumber"},
"0x3A05": {"data_type": "0x001F", "name": "Generation"},
"0x3A06": {"data_type": "0x001F", "name": "GivenName"},
"0x3A07": {"data_type": "0x001F", "name": "GovernmentIdNumber"},
"0x3A08": {"data_type": "0x001F", "name": "BusinessTelephoneNumber"},
"0x3A09": {"data_type": "0x001F", "name": "HomeTelephoneNumber"},
"0x3A0A": {"data_type": "0x001F", "name": "Initials"},
"0x3A0B": {"data_type": "0x001F", "name": "Keyword"},
"0x3A0C": {"data_type": "0x001F", "name": "Language"},
"0x3A0D": {"data_type": "0x001F", "name": "Location"},
"0x3A0F": {"data_type": "0x001F", "name": "MessageHandlingSystemCommonName"},
"0x3A10": {"data_type": "0x001F", "name": "OrganizationalIdNumber"},
"0x3A11": {"data_type": "0x001F", "name": "Surname"},
"0x3A12": {"data_type": "0x0102", "name": "OriginalEntryId"},
"0x3A15": {"data_type": "0x001F", "name": "PostalAddress"},
"0x3A16": {"data_type": "0x001F", "name": "CompanyName"},
"0x3A17": {"data_type": "0x001F", "name": "Title"},
"0x3A18": {"data_type": "0x001F", "name": "DepartmentName"},
"0x3A19": {"data_type": "0x001F", "name": "OfficeLocation"},
"0x3A1A": {"data_type": "0x001F", "name": "PrimaryTelephoneNumber"},
"0x3A1B": {"data_type": "0x101F", "name": "Business2TelephoneNumbers"},
"0x3A1C": {"data_type": "0x001F", "name": "MobileTelephoneNumber"},
"0x3A1D": {"data_type": "0x001F", "name": "RadioTelephoneNumber"},
"0x3A1E": {"data_type": "0x001F", "name": "CarTelephoneNumber"},
"0x3A1F": {"data_type": "0x001F", "name": "OtherTelephoneNumber"},
"0x3A20": {"data_type": "0x001F", "name": "TransmittableDisplayName"},
"0x3A21": {"data_type": "0x001F", "name": "PagerTelephoneNumber"},
"0x3A22": {"data_type": "0x0102", "name": "UserCertificate"},
"0x3A23": {"data_type": "0x001F", "name": "PrimaryFaxNumber"},
"0x3A24": {"data_type": "0x001F", "name": "BusinessFaxNumber"},
"0x3A25": {"data_type": "0x001F", "name": "HomeFaxNumber"},
"0x3A26": {"data_type": "0x001F", "name": "Country"},
"0x3A27": {"data_type": "0x001F", "name": "Locality"},
"0x3A28": {"data_type": "0x001F", "name": "StateOrProvince"},
"0x3A29": {"data_type": "0x001F", "name": "StreetAddress"},
"0x3A2A": {"data_type": "0x001F", "name": "PostalCode"},
"0x3A2B": {"data_type": "0x001F", "name": "PostOfficeBox"},
"0x3A2C": {
"data_type": "0x001F; PtypMultipleBinary, 0x1102",
"name": "TelexNumber",
},
"0x3A2D": {"data_type": "0x001F", "name": "IsdnNumber"},
"0x3A2E": {"data_type": "0x001F", "name": "AssistantTelephoneNumber"},
"0x3A2F": {"data_type": "0x101F", "name": "Home2TelephoneNumbers"},
"0x3A30": {"data_type": "0x001F", "name": "Assistant"},
"0x3A40": {"data_type": "0x000B", "name": "SendRichInfo"},
"0x3A41": {"data_type": "0x0040", "name": "WeddingAnniversary"},
"0x3A42": {"data_type": "0x0040", "name": "Birthday"},
"0x3A43": {"data_type": "0x001F", "name": "Hobbies"},
"0x3A44": {"data_type": "0x001F", "name": "MiddleName"},
"0x3A45": {"data_type": "0x001F", "name": "DisplayNamePrefix"},
"0x3A46": {"data_type": "0x001F", "name": "Profession"},
"0x3A47": {"data_type": "0x001F", "name": "ReferredByName"},
"0x3A48": {"data_type": "0x001F", "name": "SpouseName"},
"0x3A49": {"data_type": "0x001F", "name": "ComputerNetworkName"},
"0x3A4A": {"data_type": "0x001F", "name": "CustomerId"},
"0x3A4B": {
"data_type": "0x001F",
"name": "TelecommunicationsDeviceForDeafTelephoneNumber",
},
"0x3A4C": {"data_type": "0x001F", "name": "FtpSite"},
"0x3A4D": {"data_type": "0x0002", "name": "Gender"},
"0x3A4E": {"data_type": "0x001F", "name": "ManagerName"},
"0x3A4F": {"data_type": "0x001F", "name": "Nickname"},
"0x3A50": {"data_type": "0x001F", "name": "PersonalHomePage"},
"0x3A51": {"data_type": "0x001F", "name": "BusinessHomePage"},
"0x3A57": {"data_type": "0x001F", "name": "CompanyMainTelephoneNumber"},
"0x3A58": {"data_type": "0x101F", "name": "ChildrensNames"},
"0x3A59": {"data_type": "0x001F", "name": "HomeAddressCity"},
"0x3A5A": {"data_type": "0x001F", "name": "HomeAddressCountry"},
"0x3A5B": {"data_type": "0x001F", "name": "HomeAddressPostalCode"},
"0x3A5C": {"data_type": "0x001F", "name": "HomeAddressStateOrProvince"},
"0x3A5D": {"data_type": "0x001F", "name": "HomeAddressStreet"},
"0x3A5E": {"data_type": "0x001F", "name": "HomeAddressPostOfficeBox"},
"0x3A5F": {"data_type": "0x001F", "name": "OtherAddressCity"},
"0x3A60": {"data_type": "0x001F", "name": "OtherAddressCountry"},
"0x3A61": {"data_type": "0x001F", "name": "OtherAddressPostalCode"},
"0x3A62": {"data_type": "0x001F", "name": "OtherAddressStateOrProvince"},
"0x3A63": {"data_type": "0x001F", "name": "OtherAddressStreet"},
"0x3A64": {"data_type": "0x001F", "name": "OtherAddressPostOfficeBox"},
"0x3A70": {"data_type": "0x1102", "name": "UserX509Certificate"},
"0x3A71": {"data_type": "0x0003", "name": "SendInternetEncoding"},
"0x3F08": {"data_type": "0x0003", "name": "InitialDetailsPane"},
"0x3FDE": {"data_type": "0x0003", "name": "InternetCodepage"},
"0x3FDF": {"data_type": "0x0003", "name": "AutoResponseSuppress"},
"0x3FE0": {"data_type": "0x0102", "name": "AccessControlListData"},
"0x3FE3": {"data_type": "0x000B", "name": "DelegatedByRule"},
"0x3FE7": {"data_type": "0x0003", "name": "ResolveMethod"},
"0x3FEA": {"data_type": "0x000B", "name": "HasDeferredActionMessages"},
"0x3FEB": {"data_type": "0x0003", "name": "DeferredSendNumber"},
"0x3FEC": {"data_type": "0x0003", "name": "DeferredSendUnits"},
"0x3FED": {"data_type": "0x0003", "name": "ExpiryNumber"},
"0x3FEE": {"data_type": "0x0003", "name": "ExpiryUnits"},
"0x3FEF": {"data_type": "0x0040", "name": "DeferredSendTime"},
"0x3FF0": {"data_type": "0x0102", "name": "ConflictEntryId"},
"0x3FF1": {"data_type": "0x0003", "name": "MessageLocaleId"},
"0x3FF8": {"data_type": "0x001F", "name": "CreatorName"},
"0x3FF9": {"data_type": "0x0102", "name": "CreatorEntryId"},
"0x3FFA": {"data_type": "0x001F", "name": "LastModifierName"},
"0x3FFB": {"data_type": "0x0102", "name": "LastModifierEntryId"},
"0x3FFD": {"data_type": "0x0003", "name": "MessageCodepage"},
"0x401A": {"data_type": "0x0003", "name": "SentRepresentingFlags"},
"0x4029": {"data_type": "0x001F", "name": "ReadReceiptAddressType"},
"0x402A": {"data_type": "0x001F", "name": "ReadReceiptEmailAddress"},
"0x402B": {"data_type": "0x001F", "name": "ReadReceiptName"},
"0x4076": {"data_type": "0x0003", "name": "ContentFilterSpamConfidenceLevel"},
"0x4079": {"data_type": "0x0003", "name": "SenderIdStatus"},
"0x4082": {"data_type": "0x0040", "name": "HierRev"},
"0x4083": {"data_type": "0x001F", "name": "PurportedSenderDomain"},
"0x5902": {"data_type": "0x0003", "name": "InternetMailOverrideFormat"},
"0x5909": {"data_type": "0x0003", "name": "MessageEditorFormat"},
"0x5D01": {"data_type": "0x001F", "name": "SenderSmtpAddress"},
"0x5D02": {"data_type": "0x001F", "name": "SentRepresentingSmtpAddress"},
"0x5D05": {"data_type": "0x001F", "name": "ReadReceiptSmtpAddress"},
"0x5D07": {"data_type": "0x001F", "name": "ReceivedBySmtpAddress"},
"0x5D08": {"data_type": "0x001F", "name": "ReceivedRepresentingSmtpAddress"},
"0x5FDF": {"data_type": "0x0003", "name": "RecipientOrder"},
"0x5FE1": {"data_type": "0x000B", "name": "RecipientProposed"},
"0x5FE3": {"data_type": "0x0040", "name": "RecipientProposedStartTime"},
"0x5FE4": {"data_type": "0x0040", "name": "RecipientProposedEndTime"},
"0x5FF6": {"data_type": "0x001F", "name": "RecipientDisplayName"},
"0x5FF7": {"data_type": "0x0102", "name": "RecipientEntryId"},
"0x5FFB": {"data_type": "0x0040", "name": "RecipientTrackStatusTime"},
"0x5FFD": {"data_type": "0x0003", "name": "RecipientFlags"},
"0x5FFF": {"data_type": "0x0003", "name": "RecipientTrackStatus"},
"0x6100": {"data_type": "0x0003", "name": "JunkIncludeContacts"},
"0x6101": {"data_type": "0x0003", "name": "JunkThreshold"},
"0x6102": {"data_type": "0x0003", "name": "JunkPermanentlyDelete"},
"0x6103": {"data_type": "0x0003", "name": "JunkAddRecipientsToSafeSendersList"},
"0x6107": {"data_type": "0x000B", "name": "JunkPhishingEnableLinks"},
"0x64F0": {"data_type": "0x0102", "name": "MimeSkeleton"},
"0x65C2": {"data_type": "0x0102", "name": "ReplyTemplateId"},
"0x65E0": {"data_type": "0x0102", "name": "SourceKey"},
"0x65E1": {"data_type": "0x0102", "name": "ParentSourceKey"},
"0x65E2": {"data_type": "0x0102", "name": "ChangeKey"},
"0x65E3": {"data_type": "0x0102", "name": "PredecessorChangeList"},
"0x65E9": {"data_type": "0x0003", "name": "RuleMessageState"},
"0x65EA": {"data_type": "0x0003", "name": "RuleMessageUserFlags"},
"0x65EB": {"data_type": "0x001F", "name": "RuleMessageProvider"},
"0x65EC": {"data_type": "0x001F", "name": "RuleMessageName"},
"0x65ED": {"data_type": "0x0003", "name": "RuleMessageLevel"},
"0x65EE": {"data_type": "0x0102", "name": "RuleMessageProviderData"},
"0x65F3": {"data_type": "0x0003", "name": "RuleMessageSequence"},
"0x6619": {"data_type": "0x0102", "name": "UserEntryId"},
"0x661B": {"data_type": "0x0102", "name": "MailboxOwnerEntryId"},
"0x661C": {"data_type": "0x001F", "name": "MailboxOwnerName"},
"0x661D": {"data_type": "0x000B", "name": "OutOfOfficeState"},
"0x6622": {"data_type": "0x0102", "name": "SchedulePlusFreeBusyEntryId"},
"0x6638": {"data_type": "0x0102", "name": "SerializedReplidGuidMap"},
"0x6639": {"data_type": "0x0003", "name": "Rights"},
"0x663A": {"data_type": "0x000B", "name": "HasRules"},
"0x663B": {"data_type": "0x0102", "name": "AddressBookEntryId"},
"0x663E": {"data_type": "0x0003", "name": "HierarchyChangeNumber"},
"0x6645": {"data_type": "0x0102", "name": "ClientActions"},
"0x6646": {"data_type": "0x0102", "name": "DamOriginalEntryId"},
"0x6647": {"data_type": "0x000B", "name": "DamBackPatched"},
"0x6648": {"data_type": "0x0003", "name": "RuleError"},
"0x6649": {"data_type": "0x0003", "name": "RuleActionType"},
"0x664A": {"data_type": "0x000B", "name": "HasNamedProperties"},
"0x6650": {"data_type": "0x0003", "name": "RuleActionNumber"},
"0x6651": {"data_type": "0x0102", "name": "RuleFolderEntryId"},
"0x666A": {"data_type": "0x0003", "name": "ProhibitReceiveQuota"},
"0x666C": {"data_type": "0x000B", "name": "InConflict"},
"0x666D": {"data_type": "0x0003", "name": "MaximumSubmitMessageSize"},
"0x666E": {"data_type": "0x0003", "name": "ProhibitSendQuota"},
"0x6671": {"data_type": "0x0014", "name": "MemberId"},
"0x6672": {"data_type": "0x001F", "name": "MemberName"},
"0x6673": {"data_type": "0x0003", "name": "MemberRights"},
"0x6674": {"data_type": "0x0014", "name": "RuleId"},
"0x6675": {"data_type": "0x0102", "name": "RuleIds"},
"0x6676": {"data_type": "0x0003", "name": "RuleSequence"},
"0x6677": {"data_type": "0x0003", "name": "RuleState"},
"0x6678": {"data_type": "0x0003", "name": "RuleUserFlags"},
"0x6679": {"data_type": "0x00FD", "name": "RuleCondition"},
"0x6680": {"data_type": "0x00FE", "name": "RuleActions"},
"0x6681": {"data_type": "0x001F", "name": "RuleProvider"},
"0x6682": {"data_type": "0x001F", "name": "RuleName"},
"0x6683": {"data_type": "0x0003", "name": "RuleLevel"},
"0x6684": {"data_type": "0x0102", "name": "RuleProviderData"},
"0x668F": {"data_type": "0x0040", "name": "DeletedOn"},
"0x66A1": {"data_type": "0x0003", "name": "LocaleId"},
"0x66A8": {"data_type": "0x0003", "name": "FolderFlags"},
"0x66C3": {"data_type": "0x0003", "name": "CodePageId"},
"0x6704": {"data_type": "0x000D", "name": "AddressBookManageDistributionList"},
"0x6705": {"data_type": "0x0003", "name": "SortLocaleId"},
"0x6709": {"data_type": "0x0040", "name": "LocalCommitTime"},
"0x670A": {"data_type": "0x0040", "name": "LocalCommitTimeMax"},
"0x670B": {"data_type": "0x0003", "name": "DeletedCountTotal"},
"0x670E": {"data_type": "0x001F", "name": "FlatUrlName"},
"0x6740": {"data_type": "0x00FB", "name": "SentMailSvrEID"},
"0x6741": {"data_type": "0x00FB", "name": "DeferredActionMessageOriginalEntryId"},
"0x6748": {"data_type": "0x0014", "name": "FolderId"},
"0x6749": {"data_type": "0x0014", "name": "ParentFolderId"},
"0x674A": {"data_type": "0x0014", "name": "Mid"},
"0x674D": {"data_type": "0x0014", "name": "InstID"},
"0x674E": {"data_type": "0x0003", "name": "InstanceNum"},
"0x674F": {"data_type": "0x0014", "name": "AddressBookMessageId"},
"0x67A4": {"data_type": "0x0014", "name": "ChangeNumber"},
"0x67AA": {"data_type": "0x000B", "name": "Associated"},
"0x6800": {"data_type": "0x001F", "name": "OfflineAddressBookName"},
"0x6801": {"data_type": "0x0003", "name": "VoiceMessageDuration"},
"0x6802": {"data_type": "0x001F", "name": "SenderTelephoneNumber"},
"0x6803": {"data_type": "0x001F", "name": "VoiceMessageSenderName"},
"0x6804": {"data_type": "0x001E", "name": "OfflineAddressBookDistinguishedName"},
"0x6805": {"data_type": "0x001F", "name": "VoiceMessageAttachmentOrder"},
"0x6806": {"data_type": "0x001F", "name": "CallId"},
"0x6820": {"data_type": "0x001F", "name": "ReportingMessageTransferAgent"},
"0x6834": {"data_type": "0x0003", "name": "SearchFolderLastUsed"},
"0x683A": {"data_type": "0x0003", "name": "SearchFolderExpiration"},
"0x6841": {"data_type": "0x0003", "name": "SearchFolderTemplateId"},
"0x6842": {"data_type": "0x0102", "name": "WlinkGroupHeaderID"},
"0x6843": {"data_type": "0x000B", "name": "ScheduleInfoDontMailDelegates"},
"0x6844": {"data_type": "0x0102", "name": "SearchFolderRecreateInfo"},
"0x6845": {"data_type": "0x0102", "name": "SearchFolderDefinition"},
"0x6846": {"data_type": "0x0003", "name": "SearchFolderStorageType"},
"0x6847": {"data_type": "0x0003", "name": "WlinkSaveStamp"},
"0x6848": {"data_type": "0x0003", "name": "SearchFolderEfpFlags"},
"0x6849": {"data_type": "0x0003", "name": "WlinkType"},
"0x684A": {"data_type": "0x0003", "name": "WlinkFlags"},
"0x684B": {"data_type": "0x0102", "name": "WlinkOrdinal"},
"0x684C": {"data_type": "0x0102", "name": "WlinkEntryId"},
"0x684D": {"data_type": "0x0102", "name": "WlinkRecordKey"},
"0x684E": {"data_type": "0x0102", "name": "WlinkStoreEntryId"},
"0x684F": {"data_type": "0x0102", "name": "WlinkFolderType"},
"0x6850": {"data_type": "0x0102", "name": "WlinkGroupClsid"},
"0x6851": {"data_type": "0x001F", "name": "WlinkGroupName"},
"0x6852": {"data_type": "0x0003", "name": "WlinkSection"},
"0x6853": {"data_type": "0x0003", "name": "WlinkCalendarColor"},
"0x6854": {"data_type": "0x0102", "name": "WlinkAddressBookEID"},
"0x6855": {"data_type": "0x1003", "name": "ScheduleInfoMonthsAway"},
"0x6856": {"data_type": "0x1102", "name": "ScheduleInfoFreeBusyAway"},
"0x6868": {"data_type": "0x0040", "name": "FreeBusyRangeTimestamp"},
"0x6869": {"data_type": "0x0003", "name": "FreeBusyCountMonths"},
"0x686A": {"data_type": "0x0102", "name": "ScheduleInfoAppointmentTombstone"},
"0x686B": {"data_type": "0x1003", "name": "DelegateFlags"},
"0x686C": {"data_type": "0x0102", "name": "ScheduleInfoFreeBusy"},
"0x686D": {"data_type": "0x000B", "name": "ScheduleInfoAutoAcceptAppointments"},
"0x686E": {"data_type": "0x000B", "name": "ScheduleInfoDisallowRecurringAppts"},
"0x686F": {"data_type": "0x000B", "name": "ScheduleInfoDisallowOverlappingAppts"},
"0x6890": {"data_type": "0x0102", "name": "WlinkClientID"},
"0x6891": {"data_type": "0x0102", "name": "WlinkAddressBookStoreEID"},
"0x6892": {"data_type": "0x0003", "name": "WlinkROGroupType"},
"0x7001": {"data_type": "0x0102", "name": "ViewDescriptorBinary"},
"0x7002": {"data_type": "0x001F", "name": "ViewDescriptorStrings"},
"0x7006": {"data_type": "0x001F", "name": "ViewDescriptorName"},
"0x7007": {"data_type": "0x0003", "name": "ViewDescriptorVersion"},
"0x7C06": {"data_type": "0x0003", "name": "RoamingDatatypes"},
"0x7C07": {"data_type": "0x0102", "name": "RoamingDictionary"},
"0x7C08": {"data_type": "0x0102", "name": "RoamingXmlStream"},
"0x7C24": {"data_type": "0x000B", "name": "OscSyncEnabled"},
"0x7D01": {"data_type": "0x000B", "name": "Processed"},
"0x7FF9": {"data_type": "0x0040", "name": "ExceptionReplaceTime"},
"0x7FFA": {"data_type": "0x0003", "name": "AttachmentLinkId"},
"0x7FFB": {"data_type": "0x0040", "name": "ExceptionStartTime"},
"0x7FFC": {"data_type": "0x0040", "name": "ExceptionEndTime"},
"0x7FFD": {"data_type": "0x0003", "name": "AttachmentFlags"},
"0x7FFE": {"data_type": "0x000B", "name": "AttachmentHidden"},
"0x7FFF": {"data_type": "0x000B", "name": "AttachmentContactPhoto"},
"0x8004": {"data_type": "0x001F", "name": "AddressBookFolderPathname"},
"0x8005": {"data_type": "0x001F", "name": "AddressBookManagerDistinguishedName"},
"0x8006": {"data_type": "0x001E", "name": "AddressBookHomeMessageDatabase"},
"0x8008": {"data_type": "0x001E", "name": "AddressBookIsMemberOfDistributionList"},
"0x8009": {"data_type": "0x000D", "name": "AddressBookMember"},
"0x800C": {"data_type": "0x000D", "name": "AddressBookOwner"},
"0x800E": {"data_type": "0x000D", "name": "AddressBookReports"},
"0x800F": {"data_type": "0x101F", "name": "AddressBookProxyAddresses"},
"0x8011": {"data_type": "0x001F", "name": "AddressBookTargetAddress"},
"0x8015": {"data_type": "0x000D", "name": "AddressBookPublicDelegates"},
"0x8024": {"data_type": "0x000D", "name": "AddressBookOwnerBackLink"},
"0x802D": {"data_type": "0x001F", "name": "AddressBookExtensionAttribute1"},
"0x802E": {"data_type": "0x001F", "name": "AddressBookExtensionAttribute2"},
"0x802F": {"data_type": "0x001F", "name": "AddressBookExtensionAttribute3"},
"0x8030": {"data_type": "0x001F", "name": "AddressBookExtensionAttribute4"},
"0x8031": {"data_type": "0x001F", "name": "AddressBookExtensionAttribute5"},
"0x8032": {"data_type": "0x001F", "name": "AddressBookExtensionAttribute6"},
"0x8033": {"data_type": "0x001F", "name": "AddressBookExtensionAttribute7"},
"0x8034": {"data_type": "0x001F", "name": "AddressBookExtensionAttribute8"},
"0x8035": {"data_type": "0x001F", "name": "AddressBookExtensionAttribute9"},
"0x8036": {"data_type": "0x001F", "name": "AddressBookExtensionAttribute10"},
"0x803C": {"data_type": "0x001F", "name": "AddressBookObjectDistinguishedName"},
"0x806A": {"data_type": "0x0003", "name": "AddressBookDeliveryContentLength"},
"0x8073": {
"data_type": "0x000D",
"name": "AddressBookDistributionListMemberSubmitAccepted",
},
"0x8170": {"data_type": "0x101F", "name": "AddressBookNetworkAddress"},
"0x8C57": {"data_type": "0x001F", "name": "AddressBookExtensionAttribute11"},
"0x8C58": {"data_type": "0x001F", "name": "AddressBookExtensionAttribute12"},
"0x8C59": {"data_type": "0x001F", "name": "AddressBookExtensionAttribute13"},
"0x8C60": {"data_type": "0x001F", "name": "AddressBookExtensionAttribute14"},
"0x8C61": {"data_type": "0x001F", "name": "AddressBookExtensionAttribute15"},
"0x8C6A": {"data_type": "0x1102", "name": "AddressBookX509Certificate"},
"0x8C6D": {"data_type": "0x0102", "name": "AddressBookObjectGuid"},
"0x8C8E": {"data_type": "0x001F", "name": "AddressBookPhoneticGivenName"},
"0x8C8F": {"data_type": "0x001F", "name": "AddressBookPhoneticSurname"},
"0x8C90": {"data_type": "0x001F", "name": "AddressBookPhoneticDepartmentName"},
"0x8C91": {"data_type": "0x001F", "name": "AddressBookPhoneticCompanyName"},
"0x8C92": {"data_type": "0x001F", "name": "AddressBookPhoneticDisplayName"},
"0x8C93": {"data_type": "0x0003", "name": "AddressBookDisplayTypeExtended"},
"0x8C94": {
"data_type": "0x000D",
"name": "AddressBookHierarchicalShowInDepartments",
},
"0x8C96": {"data_type": "0x101F", "name": "AddressBookRoomContainers"},
"0x8C97": {
"data_type": "0x000D",
"name": "AddressBookHierarchicalDepartmentMembers",
},
"0x8C98": {"data_type": "0x001E", "name": "AddressBookHierarchicalRootDepartment"},
"0x8C99": {
"data_type": "0x000D",
"name": "AddressBookHierarchicalParentDepartment",
},
"0x8C9A": {
"data_type": "0x000D",
"name": "AddressBookHierarchicalChildDepartments",
},
"0x8C9E": {"data_type": "0x0102", "name": "ThumbnailPhoto"},
"0x8CA0": {"data_type": "0x0003", "name": "AddressBookSeniorityIndex"},
"0x8CA8": {
"data_type": "0x001F",
"name": "AddressBookOrganizationalUnitRootDistinguishedName",
},
"0x8CAC": {"data_type": "0x101F", "name": "AddressBookSenderHintTranslations"},
"0x8CB5": {"data_type": "0x000B", "name": "AddressBookModerationEnabled"},
"0x8CC2": {"data_type": "0x0102", "name": "SpokenName"},
"0x8CD8": {"data_type": "0x000D", "name": "AddressBookAuthorizedSenders"},
"0x8CD9": {"data_type": "0x000D", "name": "AddressBookUnauthorizedSenders"},
"0x8CDA": {
"data_type": "0x000D",
"name": "AddressBookDistributionListMemberSubmitRejected",
},
"0x8CDB": {
"data_type": "0x000D",
"name": "AddressBookDistributionListRejectMessagesFromDLMembers",
},
"0x8CDD": {
"data_type": "0x000B",
"name": "AddressBookHierarchicalIsHierarchicalGroup",
},
"0x8CE2": {"data_type": "0x0003", "name": "AddressBookDistributionListMemberCount"},
"0x8CE3": {
"data_type": "0x0003",
"name": "AddressBookDistributionListExternalMemberCount",
},
"0xFFFB": {"data_type": "0x000B", "name": "AddressBookIsMaster"},
"0xFFFC": {"data_type": "0x0102", "name": "AddressBookParentEntryId"},
"0xFFFD": {"data_type": "0x0003", "name": "AddressBookContainerId"},
}
| props_id_map = {'0x0001': {'data_type': '0x0102', 'name': 'TemplateData'}, '0x0002': {'data_type': '0x000B', 'name': 'AlternateRecipientAllowed'}, '0x0004': {'data_type': '0x0102', 'name': 'ScriptData'}, '0x0005': {'data_type': '0x000B', 'name': 'AutoForwarded'}, '0x000F': {'data_type': '0x0040', 'name': 'DeferredDeliveryTime'}, '0x0010': {'data_type': '0x0040', 'name': 'DeliverTime'}, '0x0015': {'data_type': '0x0040', 'name': 'ExpiryTime'}, '0x0017': {'data_type': '0x0003', 'name': 'Importance'}, '0x001A': {'data_type': '0x001F', 'name': 'MessageClass'}, '0x0023': {'data_type': '0x000B', 'name': 'OriginatorDeliveryReportRequested'}, '0x0025': {'data_type': '0x0102', 'name': 'ParentKey'}, '0x0026': {'data_type': '0x0003', 'name': 'Priority'}, '0x0029': {'data_type': '0x000B', 'name': 'ReadReceiptRequested'}, '0x002A': {'data_type': '0x0040', 'name': 'ReceiptTime'}, '0x002B': {'data_type': '0x000B', 'name': 'RecipientReassignmentProhibited'}, '0x002E': {'data_type': '0x0003', 'name': 'OriginalSensitivity'}, '0x0030': {'data_type': '0x0040', 'name': 'ReplyTime'}, '0x0031': {'data_type': '0x0102', 'name': 'ReportTag'}, '0x0032': {'data_type': '0x0040', 'name': 'ReportTime'}, '0x0036': {'data_type': '0x0003', 'name': 'Sensitivity'}, '0x0037': {'data_type': '0x001F', 'name': 'Subject'}, '0x0039': {'data_type': '0x0040', 'name': 'ClientSubmitTime'}, '0x003A': {'data_type': '0x001F', 'name': 'ReportName'}, '0x003B': {'data_type': '0x0102', 'name': 'SentRepresentingSearchKey'}, '0x003D': {'data_type': '0x001F', 'name': 'SubjectPrefix'}, '0x003F': {'data_type': '0x0102', 'name': 'ReceivedByEntryId'}, '0x0040': {'data_type': '0x001F', 'name': 'ReceivedByName'}, '0x0041': {'data_type': '0x0102', 'name': 'SentRepresentingEntryId'}, '0x0042': {'data_type': '0x001F', 'name': 'SentRepresentingName'}, '0x0043': {'data_type': '0x0102', 'name': 'ReceivedRepresentingEntryId'}, '0x0044': {'data_type': '0x001F', 'name': 'ReceivedRepresentingName'}, '0x0045': {'data_type': '0x0102', 'name': 'ReportEntryId'}, '0x0046': {'data_type': '0x0102', 'name': 'ReadReceiptEntryId'}, '0x0047': {'data_type': '0x0102', 'name': 'MessageSubmissionId'}, '0x0049': {'data_type': '0x001F', 'name': 'OriginalSubject'}, '0x004B': {'data_type': '0x001F', 'name': 'OriginalMessageClass'}, '0x004C': {'data_type': '0x0102', 'name': 'OriginalAuthorEntryId'}, '0x004D': {'data_type': '0x001F', 'name': 'OriginalAuthorName'}, '0x004E': {'data_type': '0x0040', 'name': 'OriginalSubmitTime'}, '0x004F': {'data_type': '0x0102', 'name': 'ReplyRecipientEntries'}, '0x0050': {'data_type': '0x001F', 'name': 'ReplyRecipientNames'}, '0x0051': {'data_type': '0x0102', 'name': 'ReceivedBySearchKey'}, '0x0052': {'data_type': '0x0102', 'name': 'ReceivedRepresentingSearchKey'}, '0x0053': {'data_type': '0x0102', 'name': 'ReadReceiptSearchKey'}, '0x0054': {'data_type': '0x0102', 'name': 'ReportSearchKey'}, '0x0055': {'data_type': '0x0040', 'name': 'OriginalDeliveryTime'}, '0x0057': {'data_type': '0x000B', 'name': 'MessageToMe'}, '0x0058': {'data_type': '0x000B', 'name': 'MessageCcMe'}, '0x0059': {'data_type': '0x000B', 'name': 'MessageRecipientMe'}, '0x005A': {'data_type': '0x001F', 'name': 'OriginalSenderName'}, '0x005B': {'data_type': '0x0102', 'name': 'OriginalSenderEntryId'}, '0x005C': {'data_type': '0x0102', 'name': 'OriginalSenderSearchKey'}, '0x005D': {'data_type': '0x001F', 'name': 'OriginalSentRepresentingName'}, '0x005E': {'data_type': '0x0102', 'name': 'OriginalSentRepresentingEntryId'}, '0x005F': {'data_type': '0x0102', 'name': 'OriginalSentRepresentingSearchKey'}, '0x0060': {'data_type': '0x0040', 'name': 'StartDate'}, '0x0061': {'data_type': '0x0040', 'name': 'EndDate'}, '0x0062': {'data_type': '0x0003', 'name': 'OwnerAppointmentId'}, '0x0063': {'data_type': '0x000B', 'name': 'ResponseRequested'}, '0x0064': {'data_type': '0x001F', 'name': 'SentRepresentingAddressType'}, '0x0065': {'data_type': '0x001F', 'name': 'SentRepresentingEmailAddress'}, '0x0066': {'data_type': '0x001F', 'name': 'OriginalSenderAddressType'}, '0x0067': {'data_type': '0x001F', 'name': 'OriginalSenderEmailAddress'}, '0x0068': {'data_type': '0x001F', 'name': 'OriginalSentRepresentingAddressType'}, '0x0069': {'data_type': '0x001F', 'name': 'OriginalSentRepresentingEmailAddress'}, '0x0070': {'data_type': '0x001F', 'name': 'ConversationTopic'}, '0x0071': {'data_type': '0x0102', 'name': 'ConversationIndex'}, '0x0072': {'data_type': '0x001F', 'name': 'OriginalDisplayBcc'}, '0x0073': {'data_type': '0x001F', 'name': 'OriginalDisplayCc'}, '0x0074': {'data_type': '0x001F', 'name': 'OriginalDisplayTo'}, '0x0075': {'data_type': '0x001F', 'name': 'ReceivedByAddressType'}, '0x0076': {'data_type': '0x001F', 'name': 'ReceivedByEmailAddress'}, '0x0077': {'data_type': '0x001F', 'name': 'ReceivedRepresentingAddressType'}, '0x0078': {'data_type': '0x001F', 'name': 'ReceivedRepresentingEmailAddress'}, '0x007D': {'data_type': '0x001F', 'name': 'TransportMessageHeaders'}, '0x007F': {'data_type': '0x0102', 'name': 'TnefCorrelationKey'}, '0x0080': {'data_type': '0x001F', 'name': 'ReportDisposition'}, '0x0081': {'data_type': '0x001F', 'name': 'ReportDispositionMode'}, '0x0807': {'data_type': '0x0003', 'name': 'AddressBookRoomCapacity'}, '0x0809': {'data_type': '0x001F', 'name': 'AddressBookRoomDescription'}, '0x0C04': {'data_type': '0x0003', 'name': 'NonDeliveryReportReasonCode'}, '0x0C05': {'data_type': '0x0003', 'name': 'NonDeliveryReportDiagCode'}, '0x0C06': {'data_type': '0x000B', 'name': 'NonReceiptNotificationRequested'}, '0x0C08': {'data_type': '0x000B', 'name': 'OriginatorNonDeliveryReportRequested'}, '0x0C15': {'data_type': '0x0003', 'name': 'RecipientType'}, '0x0C17': {'data_type': '0x000B', 'name': 'ReplyRequested'}, '0x0C19': {'data_type': '0x0102', 'name': 'SenderEntryId'}, '0x0C1A': {'data_type': '0x001F', 'name': 'SenderName'}, '0x0C1B': {'data_type': '0x001F', 'name': 'SupplementaryInfo'}, '0x0C1D': {'data_type': '0x0102', 'name': 'SenderSearchKey'}, '0x0C1E': {'data_type': '0x001F', 'name': 'SenderAddressType'}, '0x0C1F': {'data_type': '0x001F', 'name': 'SenderEmailAddress'}, '0x0C21': {'data_type': '0x001F', 'name': 'RemoteMessageTransferAgent'}, '0x0E01': {'data_type': '0x000B', 'name': 'DeleteAfterSubmit'}, '0x0E02': {'data_type': '0x001F', 'name': 'DisplayBcc'}, '0x0E03': {'data_type': '0x001F', 'name': 'DisplayCc'}, '0x0E04': {'data_type': '0x001F', 'name': 'DisplayTo'}, '0x0E06': {'data_type': '0x0040', 'name': 'MessageDeliveryTime'}, '0x0E07': {'data_type': '0x0003', 'name': 'MessageFlags'}, '0x0E08': {'data_type': '0x0014', 'name': 'MessageSizeExtended'}, '0x0E09': {'data_type': '0x0102', 'name': 'ParentEntryId'}, '0x0E0F': {'data_type': '0x000B', 'name': 'Responsibility'}, '0x0E12': {'data_type': '0x000D', 'name': 'MessageRecipients'}, '0x0E13': {'data_type': '0x000D', 'name': 'MessageAttachments'}, '0x0E17': {'data_type': '0x0003', 'name': 'MessageStatus'}, '0x0E1B': {'data_type': '0x000B', 'name': 'HasAttachments'}, '0x0E1D': {'data_type': '0x001F', 'name': 'NormalizedSubject'}, '0x0E1F': {'data_type': '0x000B', 'name': 'RtfInSync'}, '0x0E20': {'data_type': '0x0003', 'name': 'AttachSize'}, '0x0E21': {'data_type': '0x0003', 'name': 'AttachNumber'}, '0x0E28': {'data_type': '0x001F', 'name': 'PrimarySendAccount'}, '0x0E29': {'data_type': '0x001F', 'name': 'NextSendAcct'}, '0x0E2B': {'data_type': '0x0003', 'name': 'ToDoItemFlags'}, '0x0E2C': {'data_type': '0x0102', 'name': 'SwappedToDoStore'}, '0x0E2D': {'data_type': '0x0102', 'name': 'SwappedToDoData'}, '0x0E69': {'data_type': '0x000B', 'name': 'Read'}, '0x0E6A': {'data_type': '0x001F', 'name': 'SecurityDescriptorAsXml'}, '0x0E79': {'data_type': '0x0003', 'name': 'TrustSender'}, '0x0E84': {'data_type': '0x0102', 'name': 'ExchangeNTSecurityDescriptor'}, '0x0E99': {'data_type': '0x0102', 'name': 'ExtendedRuleMessageActions'}, '0x0E9A': {'data_type': '0x0102', 'name': 'ExtendedRuleMessageCondition'}, '0x0E9B': {'data_type': '0x0003', 'name': 'ExtendedRuleSizeLimit'}, '0x0FF4': {'data_type': '0x0003', 'name': 'Access'}, '0x0FF5': {'data_type': '0x0003', 'name': 'RowType'}, '0x0FF6': {'data_type': '0x0102', 'name': 'InstanceKey'}, '0x0FF7': {'data_type': '0x0003', 'name': 'AccessLevel'}, '0x0FF8': {'data_type': '0x0102', 'name': 'MappingSignature'}, '0x0FF9': {'data_type': '0x0102', 'name': 'RecordKey'}, '0x0FFB': {'data_type': '0x0102', 'name': 'StoreEntryId'}, '0x0FFE': {'data_type': '0x0003', 'name': 'ObjectType'}, '0x0FFF': {'data_type': '0x0102', 'name': 'EntryId'}, '0x1000': {'data_type': '0x001F', 'name': 'Body'}, '0x1001': {'data_type': '0x001F', 'name': 'ReportText'}, '0x1009': {'data_type': '0x0102', 'name': 'RtfCompressed'}, '0x1013': {'data_type': '0x0102', 'name': 'Html'}, '0x1014': {'data_type': '0x001F', 'name': 'BodyContentLocation'}, '0x1015': {'data_type': '0x001F', 'name': 'BodyContentId'}, '0x1016': {'data_type': '0x0003', 'name': 'NativeBody'}, '0x1035': {'data_type': '0x001F', 'name': 'InternetMessageId'}, '0x1039': {'data_type': '0x001F', 'name': 'InternetReferences'}, '0x1042': {'data_type': '0x001F', 'name': 'InReplyToId'}, '0x1043': {'data_type': '0x001F', 'name': 'ListHelp'}, '0x1044': {'data_type': '0x001F', 'name': 'ListSubscribe'}, '0x1045': {'data_type': '0x001F', 'name': 'ListUnsubscribe'}, '0x1046': {'data_type': '0x001F', 'name': 'OriginalMessageId'}, '0x1080': {'data_type': '0x0003', 'name': 'IconIndex'}, '0x1081': {'data_type': '0x0003', 'name': 'LastVerbExecuted'}, '0x1082': {'data_type': '0x0040', 'name': 'LastVerbExecutionTime'}, '0x1090': {'data_type': '0x0003', 'name': 'FlagStatus'}, '0x1091': {'data_type': '0x0040', 'name': 'FlagCompleteTime'}, '0x1095': {'data_type': '0x0003', 'name': 'FollowupIcon'}, '0x1096': {'data_type': '0x0003', 'name': 'BlockStatus'}, '0x10C3': {'data_type': '0x0040', 'name': 'ICalendarStartTime'}, '0x10C4': {'data_type': '0x0040', 'name': 'ICalendarEndTime'}, '0x10C5': {'data_type': '0x0040', 'name': 'CdoRecurrenceid'}, '0x10CA': {'data_type': '0x0040', 'name': 'ICalendarReminderNextTime'}, '0x10F4': {'data_type': '0x000B', 'name': 'AttributeHidden'}, '0x10F6': {'data_type': '0x000B', 'name': 'AttributeReadOnly'}, '0x3000': {'data_type': '0x0003', 'name': 'Rowid'}, '0x3001': {'data_type': '0x001F', 'name': 'DisplayName'}, '0x3002': {'data_type': '0x001F', 'name': 'AddressType'}, '0x3003': {'data_type': '0x001F', 'name': 'EmailAddress'}, '0x3004': {'data_type': '0x001F', 'name': 'Comment'}, '0x3005': {'data_type': '0x0003', 'name': 'Depth'}, '0x3007': {'data_type': '0x0040', 'name': 'CreationTime'}, '0x3008': {'data_type': '0x0040', 'name': 'LastModificationTime'}, '0x300B': {'data_type': '0x0102', 'name': 'SearchKey'}, '0x3010': {'data_type': '0x0102', 'name': 'TargetEntryId'}, '0x3013': {'data_type': '0x0102', 'name': 'ConversationId'}, '0x3016': {'data_type': '0x000B', 'name': 'ConversationIndexTracking'}, '0x3018': {'data_type': '0x0102', 'name': 'ArchiveTag'}, '0x3019': {'data_type': '0x0102', 'name': 'PolicyTag'}, '0x301A': {'data_type': '0x0003', 'name': 'RetentionPeriod'}, '0x301B': {'data_type': '0x0102', 'name': 'StartDateEtc'}, '0x301C': {'data_type': '0x0040', 'name': 'RetentionDate'}, '0x301D': {'data_type': '0x0003', 'name': 'RetentionFlags'}, '0x301E': {'data_type': '0x0003', 'name': 'ArchivePeriod'}, '0x301F': {'data_type': '0x0040', 'name': 'ArchiveDate'}, '0x340D': {'data_type': '0x0003', 'name': 'StoreSupportMask'}, '0x340E': {'data_type': '0x0003', 'name': 'StoreState'}, '0x3600': {'data_type': '0x0003', 'name': 'ContainerFlags'}, '0x3601': {'data_type': '0x0003', 'name': 'FolderType'}, '0x3602': {'data_type': '0x0003', 'name': 'ContentCount'}, '0x3603': {'data_type': '0x0003', 'name': 'ContentUnreadCount'}, '0x3609': {'data_type': '0x000B', 'name': 'Selectable'}, '0x360A': {'data_type': '0x000B', 'name': 'Subfolders'}, '0x360C': {'data_type': '0x001F', 'name': 'Anr'}, '0x360E': {'data_type': '0x000D', 'name': 'ContainerHierarchy'}, '0x360F': {'data_type': '0x000D', 'name': 'ContainerContents'}, '0x3610': {'data_type': '0x000D', 'name': 'FolderAssociatedContents'}, '0x3613': {'data_type': '0x001F', 'name': 'ContainerClass'}, '0x36D0': {'data_type': '0x0102', 'name': 'IpmAppointmentEntryId'}, '0x36D1': {'data_type': '0x0102', 'name': 'IpmContactEntryId'}, '0x36D2': {'data_type': '0x0102', 'name': 'IpmJournalEntryId'}, '0x36D3': {'data_type': '0x0102', 'name': 'IpmNoteEntryId'}, '0x36D4': {'data_type': '0x0102', 'name': 'IpmTaskEntryId'}, '0x36D5': {'data_type': '0x0102', 'name': 'RemindersOnlineEntryId'}, '0x36D7': {'data_type': '0x0102', 'name': 'IpmDraftsEntryId'}, '0x36D8': {'data_type': '0x1102', 'name': 'AdditionalRenEntryIds'}, '0x36D9': {'data_type': '0x0102', 'name': 'AdditionalRenEntryIdsEx'}, '0x36DA': {'data_type': '0x0102', 'name': 'ExtendedFolderFlags'}, '0x36E2': {'data_type': '0x0003', 'name': 'OrdinalMost'}, '0x36E4': {'data_type': '0x1102', 'name': 'FreeBusyEntryIds'}, '0x36E5': {'data_type': '0x001F', 'name': 'DefaultPostMessageClass'}, '0x3701': {'data_type': '0x000D', 'name': 'AttachDataObject'}, '0x3702': {'data_type': '0x0102', 'name': 'AttachEncoding'}, '0x3703': {'data_type': '0x001F', 'name': 'AttachExtension'}, '0x3704': {'data_type': '0x001F', 'name': 'AttachFilename'}, '0x3705': {'data_type': '0x0003', 'name': 'AttachMethod'}, '0x3707': {'data_type': '0x001F', 'name': 'AttachLongFilename'}, '0x3708': {'data_type': '0x001F', 'name': 'AttachPathname'}, '0x3709': {'data_type': '0x0102', 'name': 'AttachRendering'}, '0x370A': {'data_type': '0x0102', 'name': 'AttachTag'}, '0x370B': {'data_type': '0x0003', 'name': 'RenderingPosition'}, '0x370C': {'data_type': '0x001F', 'name': 'AttachTransportName'}, '0x370D': {'data_type': '0x001F', 'name': 'AttachLongPathname'}, '0x370E': {'data_type': '0x001F', 'name': 'AttachMimeTag'}, '0x370F': {'data_type': '0x0102', 'name': 'AttachAdditionalInformation'}, '0x3711': {'data_type': '0x001F', 'name': 'AttachContentBase'}, '0x3712': {'data_type': '0x001F', 'name': 'AttachContentId'}, '0x3713': {'data_type': '0x001F', 'name': 'AttachContentLocation'}, '0x3714': {'data_type': '0x0003', 'name': 'AttachFlags'}, '0x3719': {'data_type': '0x001F', 'name': 'AttachPayloadProviderGuidString'}, '0x371A': {'data_type': '0x001F', 'name': 'AttachPayloadClass'}, '0x371B': {'data_type': '0x001F', 'name': 'TextAttachmentCharset'}, '0x3900': {'data_type': '0x0003', 'name': 'DisplayType'}, '0x3902': {'data_type': '0x0102', 'name': 'Templateid'}, '0x3905': {'data_type': '0x0003', 'name': 'DisplayTypeEx'}, '0x39FE': {'data_type': '0x001F', 'name': 'SmtpAddress'}, '0x39FF': {'data_type': '0x001F', 'name': 'AddressBookDisplayNamePrintable'}, '0x3A00': {'data_type': '0x001F', 'name': 'Account'}, '0x3A02': {'data_type': '0x001F', 'name': 'CallbackTelephoneNumber'}, '0x3A05': {'data_type': '0x001F', 'name': 'Generation'}, '0x3A06': {'data_type': '0x001F', 'name': 'GivenName'}, '0x3A07': {'data_type': '0x001F', 'name': 'GovernmentIdNumber'}, '0x3A08': {'data_type': '0x001F', 'name': 'BusinessTelephoneNumber'}, '0x3A09': {'data_type': '0x001F', 'name': 'HomeTelephoneNumber'}, '0x3A0A': {'data_type': '0x001F', 'name': 'Initials'}, '0x3A0B': {'data_type': '0x001F', 'name': 'Keyword'}, '0x3A0C': {'data_type': '0x001F', 'name': 'Language'}, '0x3A0D': {'data_type': '0x001F', 'name': 'Location'}, '0x3A0F': {'data_type': '0x001F', 'name': 'MessageHandlingSystemCommonName'}, '0x3A10': {'data_type': '0x001F', 'name': 'OrganizationalIdNumber'}, '0x3A11': {'data_type': '0x001F', 'name': 'Surname'}, '0x3A12': {'data_type': '0x0102', 'name': 'OriginalEntryId'}, '0x3A15': {'data_type': '0x001F', 'name': 'PostalAddress'}, '0x3A16': {'data_type': '0x001F', 'name': 'CompanyName'}, '0x3A17': {'data_type': '0x001F', 'name': 'Title'}, '0x3A18': {'data_type': '0x001F', 'name': 'DepartmentName'}, '0x3A19': {'data_type': '0x001F', 'name': 'OfficeLocation'}, '0x3A1A': {'data_type': '0x001F', 'name': 'PrimaryTelephoneNumber'}, '0x3A1B': {'data_type': '0x101F', 'name': 'Business2TelephoneNumbers'}, '0x3A1C': {'data_type': '0x001F', 'name': 'MobileTelephoneNumber'}, '0x3A1D': {'data_type': '0x001F', 'name': 'RadioTelephoneNumber'}, '0x3A1E': {'data_type': '0x001F', 'name': 'CarTelephoneNumber'}, '0x3A1F': {'data_type': '0x001F', 'name': 'OtherTelephoneNumber'}, '0x3A20': {'data_type': '0x001F', 'name': 'TransmittableDisplayName'}, '0x3A21': {'data_type': '0x001F', 'name': 'PagerTelephoneNumber'}, '0x3A22': {'data_type': '0x0102', 'name': 'UserCertificate'}, '0x3A23': {'data_type': '0x001F', 'name': 'PrimaryFaxNumber'}, '0x3A24': {'data_type': '0x001F', 'name': 'BusinessFaxNumber'}, '0x3A25': {'data_type': '0x001F', 'name': 'HomeFaxNumber'}, '0x3A26': {'data_type': '0x001F', 'name': 'Country'}, '0x3A27': {'data_type': '0x001F', 'name': 'Locality'}, '0x3A28': {'data_type': '0x001F', 'name': 'StateOrProvince'}, '0x3A29': {'data_type': '0x001F', 'name': 'StreetAddress'}, '0x3A2A': {'data_type': '0x001F', 'name': 'PostalCode'}, '0x3A2B': {'data_type': '0x001F', 'name': 'PostOfficeBox'}, '0x3A2C': {'data_type': '0x001F; PtypMultipleBinary, 0x1102', 'name': 'TelexNumber'}, '0x3A2D': {'data_type': '0x001F', 'name': 'IsdnNumber'}, '0x3A2E': {'data_type': '0x001F', 'name': 'AssistantTelephoneNumber'}, '0x3A2F': {'data_type': '0x101F', 'name': 'Home2TelephoneNumbers'}, '0x3A30': {'data_type': '0x001F', 'name': 'Assistant'}, '0x3A40': {'data_type': '0x000B', 'name': 'SendRichInfo'}, '0x3A41': {'data_type': '0x0040', 'name': 'WeddingAnniversary'}, '0x3A42': {'data_type': '0x0040', 'name': 'Birthday'}, '0x3A43': {'data_type': '0x001F', 'name': 'Hobbies'}, '0x3A44': {'data_type': '0x001F', 'name': 'MiddleName'}, '0x3A45': {'data_type': '0x001F', 'name': 'DisplayNamePrefix'}, '0x3A46': {'data_type': '0x001F', 'name': 'Profession'}, '0x3A47': {'data_type': '0x001F', 'name': 'ReferredByName'}, '0x3A48': {'data_type': '0x001F', 'name': 'SpouseName'}, '0x3A49': {'data_type': '0x001F', 'name': 'ComputerNetworkName'}, '0x3A4A': {'data_type': '0x001F', 'name': 'CustomerId'}, '0x3A4B': {'data_type': '0x001F', 'name': 'TelecommunicationsDeviceForDeafTelephoneNumber'}, '0x3A4C': {'data_type': '0x001F', 'name': 'FtpSite'}, '0x3A4D': {'data_type': '0x0002', 'name': 'Gender'}, '0x3A4E': {'data_type': '0x001F', 'name': 'ManagerName'}, '0x3A4F': {'data_type': '0x001F', 'name': 'Nickname'}, '0x3A50': {'data_type': '0x001F', 'name': 'PersonalHomePage'}, '0x3A51': {'data_type': '0x001F', 'name': 'BusinessHomePage'}, '0x3A57': {'data_type': '0x001F', 'name': 'CompanyMainTelephoneNumber'}, '0x3A58': {'data_type': '0x101F', 'name': 'ChildrensNames'}, '0x3A59': {'data_type': '0x001F', 'name': 'HomeAddressCity'}, '0x3A5A': {'data_type': '0x001F', 'name': 'HomeAddressCountry'}, '0x3A5B': {'data_type': '0x001F', 'name': 'HomeAddressPostalCode'}, '0x3A5C': {'data_type': '0x001F', 'name': 'HomeAddressStateOrProvince'}, '0x3A5D': {'data_type': '0x001F', 'name': 'HomeAddressStreet'}, '0x3A5E': {'data_type': '0x001F', 'name': 'HomeAddressPostOfficeBox'}, '0x3A5F': {'data_type': '0x001F', 'name': 'OtherAddressCity'}, '0x3A60': {'data_type': '0x001F', 'name': 'OtherAddressCountry'}, '0x3A61': {'data_type': '0x001F', 'name': 'OtherAddressPostalCode'}, '0x3A62': {'data_type': '0x001F', 'name': 'OtherAddressStateOrProvince'}, '0x3A63': {'data_type': '0x001F', 'name': 'OtherAddressStreet'}, '0x3A64': {'data_type': '0x001F', 'name': 'OtherAddressPostOfficeBox'}, '0x3A70': {'data_type': '0x1102', 'name': 'UserX509Certificate'}, '0x3A71': {'data_type': '0x0003', 'name': 'SendInternetEncoding'}, '0x3F08': {'data_type': '0x0003', 'name': 'InitialDetailsPane'}, '0x3FDE': {'data_type': '0x0003', 'name': 'InternetCodepage'}, '0x3FDF': {'data_type': '0x0003', 'name': 'AutoResponseSuppress'}, '0x3FE0': {'data_type': '0x0102', 'name': 'AccessControlListData'}, '0x3FE3': {'data_type': '0x000B', 'name': 'DelegatedByRule'}, '0x3FE7': {'data_type': '0x0003', 'name': 'ResolveMethod'}, '0x3FEA': {'data_type': '0x000B', 'name': 'HasDeferredActionMessages'}, '0x3FEB': {'data_type': '0x0003', 'name': 'DeferredSendNumber'}, '0x3FEC': {'data_type': '0x0003', 'name': 'DeferredSendUnits'}, '0x3FED': {'data_type': '0x0003', 'name': 'ExpiryNumber'}, '0x3FEE': {'data_type': '0x0003', 'name': 'ExpiryUnits'}, '0x3FEF': {'data_type': '0x0040', 'name': 'DeferredSendTime'}, '0x3FF0': {'data_type': '0x0102', 'name': 'ConflictEntryId'}, '0x3FF1': {'data_type': '0x0003', 'name': 'MessageLocaleId'}, '0x3FF8': {'data_type': '0x001F', 'name': 'CreatorName'}, '0x3FF9': {'data_type': '0x0102', 'name': 'CreatorEntryId'}, '0x3FFA': {'data_type': '0x001F', 'name': 'LastModifierName'}, '0x3FFB': {'data_type': '0x0102', 'name': 'LastModifierEntryId'}, '0x3FFD': {'data_type': '0x0003', 'name': 'MessageCodepage'}, '0x401A': {'data_type': '0x0003', 'name': 'SentRepresentingFlags'}, '0x4029': {'data_type': '0x001F', 'name': 'ReadReceiptAddressType'}, '0x402A': {'data_type': '0x001F', 'name': 'ReadReceiptEmailAddress'}, '0x402B': {'data_type': '0x001F', 'name': 'ReadReceiptName'}, '0x4076': {'data_type': '0x0003', 'name': 'ContentFilterSpamConfidenceLevel'}, '0x4079': {'data_type': '0x0003', 'name': 'SenderIdStatus'}, '0x4082': {'data_type': '0x0040', 'name': 'HierRev'}, '0x4083': {'data_type': '0x001F', 'name': 'PurportedSenderDomain'}, '0x5902': {'data_type': '0x0003', 'name': 'InternetMailOverrideFormat'}, '0x5909': {'data_type': '0x0003', 'name': 'MessageEditorFormat'}, '0x5D01': {'data_type': '0x001F', 'name': 'SenderSmtpAddress'}, '0x5D02': {'data_type': '0x001F', 'name': 'SentRepresentingSmtpAddress'}, '0x5D05': {'data_type': '0x001F', 'name': 'ReadReceiptSmtpAddress'}, '0x5D07': {'data_type': '0x001F', 'name': 'ReceivedBySmtpAddress'}, '0x5D08': {'data_type': '0x001F', 'name': 'ReceivedRepresentingSmtpAddress'}, '0x5FDF': {'data_type': '0x0003', 'name': 'RecipientOrder'}, '0x5FE1': {'data_type': '0x000B', 'name': 'RecipientProposed'}, '0x5FE3': {'data_type': '0x0040', 'name': 'RecipientProposedStartTime'}, '0x5FE4': {'data_type': '0x0040', 'name': 'RecipientProposedEndTime'}, '0x5FF6': {'data_type': '0x001F', 'name': 'RecipientDisplayName'}, '0x5FF7': {'data_type': '0x0102', 'name': 'RecipientEntryId'}, '0x5FFB': {'data_type': '0x0040', 'name': 'RecipientTrackStatusTime'}, '0x5FFD': {'data_type': '0x0003', 'name': 'RecipientFlags'}, '0x5FFF': {'data_type': '0x0003', 'name': 'RecipientTrackStatus'}, '0x6100': {'data_type': '0x0003', 'name': 'JunkIncludeContacts'}, '0x6101': {'data_type': '0x0003', 'name': 'JunkThreshold'}, '0x6102': {'data_type': '0x0003', 'name': 'JunkPermanentlyDelete'}, '0x6103': {'data_type': '0x0003', 'name': 'JunkAddRecipientsToSafeSendersList'}, '0x6107': {'data_type': '0x000B', 'name': 'JunkPhishingEnableLinks'}, '0x64F0': {'data_type': '0x0102', 'name': 'MimeSkeleton'}, '0x65C2': {'data_type': '0x0102', 'name': 'ReplyTemplateId'}, '0x65E0': {'data_type': '0x0102', 'name': 'SourceKey'}, '0x65E1': {'data_type': '0x0102', 'name': 'ParentSourceKey'}, '0x65E2': {'data_type': '0x0102', 'name': 'ChangeKey'}, '0x65E3': {'data_type': '0x0102', 'name': 'PredecessorChangeList'}, '0x65E9': {'data_type': '0x0003', 'name': 'RuleMessageState'}, '0x65EA': {'data_type': '0x0003', 'name': 'RuleMessageUserFlags'}, '0x65EB': {'data_type': '0x001F', 'name': 'RuleMessageProvider'}, '0x65EC': {'data_type': '0x001F', 'name': 'RuleMessageName'}, '0x65ED': {'data_type': '0x0003', 'name': 'RuleMessageLevel'}, '0x65EE': {'data_type': '0x0102', 'name': 'RuleMessageProviderData'}, '0x65F3': {'data_type': '0x0003', 'name': 'RuleMessageSequence'}, '0x6619': {'data_type': '0x0102', 'name': 'UserEntryId'}, '0x661B': {'data_type': '0x0102', 'name': 'MailboxOwnerEntryId'}, '0x661C': {'data_type': '0x001F', 'name': 'MailboxOwnerName'}, '0x661D': {'data_type': '0x000B', 'name': 'OutOfOfficeState'}, '0x6622': {'data_type': '0x0102', 'name': 'SchedulePlusFreeBusyEntryId'}, '0x6638': {'data_type': '0x0102', 'name': 'SerializedReplidGuidMap'}, '0x6639': {'data_type': '0x0003', 'name': 'Rights'}, '0x663A': {'data_type': '0x000B', 'name': 'HasRules'}, '0x663B': {'data_type': '0x0102', 'name': 'AddressBookEntryId'}, '0x663E': {'data_type': '0x0003', 'name': 'HierarchyChangeNumber'}, '0x6645': {'data_type': '0x0102', 'name': 'ClientActions'}, '0x6646': {'data_type': '0x0102', 'name': 'DamOriginalEntryId'}, '0x6647': {'data_type': '0x000B', 'name': 'DamBackPatched'}, '0x6648': {'data_type': '0x0003', 'name': 'RuleError'}, '0x6649': {'data_type': '0x0003', 'name': 'RuleActionType'}, '0x664A': {'data_type': '0x000B', 'name': 'HasNamedProperties'}, '0x6650': {'data_type': '0x0003', 'name': 'RuleActionNumber'}, '0x6651': {'data_type': '0x0102', 'name': 'RuleFolderEntryId'}, '0x666A': {'data_type': '0x0003', 'name': 'ProhibitReceiveQuota'}, '0x666C': {'data_type': '0x000B', 'name': 'InConflict'}, '0x666D': {'data_type': '0x0003', 'name': 'MaximumSubmitMessageSize'}, '0x666E': {'data_type': '0x0003', 'name': 'ProhibitSendQuota'}, '0x6671': {'data_type': '0x0014', 'name': 'MemberId'}, '0x6672': {'data_type': '0x001F', 'name': 'MemberName'}, '0x6673': {'data_type': '0x0003', 'name': 'MemberRights'}, '0x6674': {'data_type': '0x0014', 'name': 'RuleId'}, '0x6675': {'data_type': '0x0102', 'name': 'RuleIds'}, '0x6676': {'data_type': '0x0003', 'name': 'RuleSequence'}, '0x6677': {'data_type': '0x0003', 'name': 'RuleState'}, '0x6678': {'data_type': '0x0003', 'name': 'RuleUserFlags'}, '0x6679': {'data_type': '0x00FD', 'name': 'RuleCondition'}, '0x6680': {'data_type': '0x00FE', 'name': 'RuleActions'}, '0x6681': {'data_type': '0x001F', 'name': 'RuleProvider'}, '0x6682': {'data_type': '0x001F', 'name': 'RuleName'}, '0x6683': {'data_type': '0x0003', 'name': 'RuleLevel'}, '0x6684': {'data_type': '0x0102', 'name': 'RuleProviderData'}, '0x668F': {'data_type': '0x0040', 'name': 'DeletedOn'}, '0x66A1': {'data_type': '0x0003', 'name': 'LocaleId'}, '0x66A8': {'data_type': '0x0003', 'name': 'FolderFlags'}, '0x66C3': {'data_type': '0x0003', 'name': 'CodePageId'}, '0x6704': {'data_type': '0x000D', 'name': 'AddressBookManageDistributionList'}, '0x6705': {'data_type': '0x0003', 'name': 'SortLocaleId'}, '0x6709': {'data_type': '0x0040', 'name': 'LocalCommitTime'}, '0x670A': {'data_type': '0x0040', 'name': 'LocalCommitTimeMax'}, '0x670B': {'data_type': '0x0003', 'name': 'DeletedCountTotal'}, '0x670E': {'data_type': '0x001F', 'name': 'FlatUrlName'}, '0x6740': {'data_type': '0x00FB', 'name': 'SentMailSvrEID'}, '0x6741': {'data_type': '0x00FB', 'name': 'DeferredActionMessageOriginalEntryId'}, '0x6748': {'data_type': '0x0014', 'name': 'FolderId'}, '0x6749': {'data_type': '0x0014', 'name': 'ParentFolderId'}, '0x674A': {'data_type': '0x0014', 'name': 'Mid'}, '0x674D': {'data_type': '0x0014', 'name': 'InstID'}, '0x674E': {'data_type': '0x0003', 'name': 'InstanceNum'}, '0x674F': {'data_type': '0x0014', 'name': 'AddressBookMessageId'}, '0x67A4': {'data_type': '0x0014', 'name': 'ChangeNumber'}, '0x67AA': {'data_type': '0x000B', 'name': 'Associated'}, '0x6800': {'data_type': '0x001F', 'name': 'OfflineAddressBookName'}, '0x6801': {'data_type': '0x0003', 'name': 'VoiceMessageDuration'}, '0x6802': {'data_type': '0x001F', 'name': 'SenderTelephoneNumber'}, '0x6803': {'data_type': '0x001F', 'name': 'VoiceMessageSenderName'}, '0x6804': {'data_type': '0x001E', 'name': 'OfflineAddressBookDistinguishedName'}, '0x6805': {'data_type': '0x001F', 'name': 'VoiceMessageAttachmentOrder'}, '0x6806': {'data_type': '0x001F', 'name': 'CallId'}, '0x6820': {'data_type': '0x001F', 'name': 'ReportingMessageTransferAgent'}, '0x6834': {'data_type': '0x0003', 'name': 'SearchFolderLastUsed'}, '0x683A': {'data_type': '0x0003', 'name': 'SearchFolderExpiration'}, '0x6841': {'data_type': '0x0003', 'name': 'SearchFolderTemplateId'}, '0x6842': {'data_type': '0x0102', 'name': 'WlinkGroupHeaderID'}, '0x6843': {'data_type': '0x000B', 'name': 'ScheduleInfoDontMailDelegates'}, '0x6844': {'data_type': '0x0102', 'name': 'SearchFolderRecreateInfo'}, '0x6845': {'data_type': '0x0102', 'name': 'SearchFolderDefinition'}, '0x6846': {'data_type': '0x0003', 'name': 'SearchFolderStorageType'}, '0x6847': {'data_type': '0x0003', 'name': 'WlinkSaveStamp'}, '0x6848': {'data_type': '0x0003', 'name': 'SearchFolderEfpFlags'}, '0x6849': {'data_type': '0x0003', 'name': 'WlinkType'}, '0x684A': {'data_type': '0x0003', 'name': 'WlinkFlags'}, '0x684B': {'data_type': '0x0102', 'name': 'WlinkOrdinal'}, '0x684C': {'data_type': '0x0102', 'name': 'WlinkEntryId'}, '0x684D': {'data_type': '0x0102', 'name': 'WlinkRecordKey'}, '0x684E': {'data_type': '0x0102', 'name': 'WlinkStoreEntryId'}, '0x684F': {'data_type': '0x0102', 'name': 'WlinkFolderType'}, '0x6850': {'data_type': '0x0102', 'name': 'WlinkGroupClsid'}, '0x6851': {'data_type': '0x001F', 'name': 'WlinkGroupName'}, '0x6852': {'data_type': '0x0003', 'name': 'WlinkSection'}, '0x6853': {'data_type': '0x0003', 'name': 'WlinkCalendarColor'}, '0x6854': {'data_type': '0x0102', 'name': 'WlinkAddressBookEID'}, '0x6855': {'data_type': '0x1003', 'name': 'ScheduleInfoMonthsAway'}, '0x6856': {'data_type': '0x1102', 'name': 'ScheduleInfoFreeBusyAway'}, '0x6868': {'data_type': '0x0040', 'name': 'FreeBusyRangeTimestamp'}, '0x6869': {'data_type': '0x0003', 'name': 'FreeBusyCountMonths'}, '0x686A': {'data_type': '0x0102', 'name': 'ScheduleInfoAppointmentTombstone'}, '0x686B': {'data_type': '0x1003', 'name': 'DelegateFlags'}, '0x686C': {'data_type': '0x0102', 'name': 'ScheduleInfoFreeBusy'}, '0x686D': {'data_type': '0x000B', 'name': 'ScheduleInfoAutoAcceptAppointments'}, '0x686E': {'data_type': '0x000B', 'name': 'ScheduleInfoDisallowRecurringAppts'}, '0x686F': {'data_type': '0x000B', 'name': 'ScheduleInfoDisallowOverlappingAppts'}, '0x6890': {'data_type': '0x0102', 'name': 'WlinkClientID'}, '0x6891': {'data_type': '0x0102', 'name': 'WlinkAddressBookStoreEID'}, '0x6892': {'data_type': '0x0003', 'name': 'WlinkROGroupType'}, '0x7001': {'data_type': '0x0102', 'name': 'ViewDescriptorBinary'}, '0x7002': {'data_type': '0x001F', 'name': 'ViewDescriptorStrings'}, '0x7006': {'data_type': '0x001F', 'name': 'ViewDescriptorName'}, '0x7007': {'data_type': '0x0003', 'name': 'ViewDescriptorVersion'}, '0x7C06': {'data_type': '0x0003', 'name': 'RoamingDatatypes'}, '0x7C07': {'data_type': '0x0102', 'name': 'RoamingDictionary'}, '0x7C08': {'data_type': '0x0102', 'name': 'RoamingXmlStream'}, '0x7C24': {'data_type': '0x000B', 'name': 'OscSyncEnabled'}, '0x7D01': {'data_type': '0x000B', 'name': 'Processed'}, '0x7FF9': {'data_type': '0x0040', 'name': 'ExceptionReplaceTime'}, '0x7FFA': {'data_type': '0x0003', 'name': 'AttachmentLinkId'}, '0x7FFB': {'data_type': '0x0040', 'name': 'ExceptionStartTime'}, '0x7FFC': {'data_type': '0x0040', 'name': 'ExceptionEndTime'}, '0x7FFD': {'data_type': '0x0003', 'name': 'AttachmentFlags'}, '0x7FFE': {'data_type': '0x000B', 'name': 'AttachmentHidden'}, '0x7FFF': {'data_type': '0x000B', 'name': 'AttachmentContactPhoto'}, '0x8004': {'data_type': '0x001F', 'name': 'AddressBookFolderPathname'}, '0x8005': {'data_type': '0x001F', 'name': 'AddressBookManagerDistinguishedName'}, '0x8006': {'data_type': '0x001E', 'name': 'AddressBookHomeMessageDatabase'}, '0x8008': {'data_type': '0x001E', 'name': 'AddressBookIsMemberOfDistributionList'}, '0x8009': {'data_type': '0x000D', 'name': 'AddressBookMember'}, '0x800C': {'data_type': '0x000D', 'name': 'AddressBookOwner'}, '0x800E': {'data_type': '0x000D', 'name': 'AddressBookReports'}, '0x800F': {'data_type': '0x101F', 'name': 'AddressBookProxyAddresses'}, '0x8011': {'data_type': '0x001F', 'name': 'AddressBookTargetAddress'}, '0x8015': {'data_type': '0x000D', 'name': 'AddressBookPublicDelegates'}, '0x8024': {'data_type': '0x000D', 'name': 'AddressBookOwnerBackLink'}, '0x802D': {'data_type': '0x001F', 'name': 'AddressBookExtensionAttribute1'}, '0x802E': {'data_type': '0x001F', 'name': 'AddressBookExtensionAttribute2'}, '0x802F': {'data_type': '0x001F', 'name': 'AddressBookExtensionAttribute3'}, '0x8030': {'data_type': '0x001F', 'name': 'AddressBookExtensionAttribute4'}, '0x8031': {'data_type': '0x001F', 'name': 'AddressBookExtensionAttribute5'}, '0x8032': {'data_type': '0x001F', 'name': 'AddressBookExtensionAttribute6'}, '0x8033': {'data_type': '0x001F', 'name': 'AddressBookExtensionAttribute7'}, '0x8034': {'data_type': '0x001F', 'name': 'AddressBookExtensionAttribute8'}, '0x8035': {'data_type': '0x001F', 'name': 'AddressBookExtensionAttribute9'}, '0x8036': {'data_type': '0x001F', 'name': 'AddressBookExtensionAttribute10'}, '0x803C': {'data_type': '0x001F', 'name': 'AddressBookObjectDistinguishedName'}, '0x806A': {'data_type': '0x0003', 'name': 'AddressBookDeliveryContentLength'}, '0x8073': {'data_type': '0x000D', 'name': 'AddressBookDistributionListMemberSubmitAccepted'}, '0x8170': {'data_type': '0x101F', 'name': 'AddressBookNetworkAddress'}, '0x8C57': {'data_type': '0x001F', 'name': 'AddressBookExtensionAttribute11'}, '0x8C58': {'data_type': '0x001F', 'name': 'AddressBookExtensionAttribute12'}, '0x8C59': {'data_type': '0x001F', 'name': 'AddressBookExtensionAttribute13'}, '0x8C60': {'data_type': '0x001F', 'name': 'AddressBookExtensionAttribute14'}, '0x8C61': {'data_type': '0x001F', 'name': 'AddressBookExtensionAttribute15'}, '0x8C6A': {'data_type': '0x1102', 'name': 'AddressBookX509Certificate'}, '0x8C6D': {'data_type': '0x0102', 'name': 'AddressBookObjectGuid'}, '0x8C8E': {'data_type': '0x001F', 'name': 'AddressBookPhoneticGivenName'}, '0x8C8F': {'data_type': '0x001F', 'name': 'AddressBookPhoneticSurname'}, '0x8C90': {'data_type': '0x001F', 'name': 'AddressBookPhoneticDepartmentName'}, '0x8C91': {'data_type': '0x001F', 'name': 'AddressBookPhoneticCompanyName'}, '0x8C92': {'data_type': '0x001F', 'name': 'AddressBookPhoneticDisplayName'}, '0x8C93': {'data_type': '0x0003', 'name': 'AddressBookDisplayTypeExtended'}, '0x8C94': {'data_type': '0x000D', 'name': 'AddressBookHierarchicalShowInDepartments'}, '0x8C96': {'data_type': '0x101F', 'name': 'AddressBookRoomContainers'}, '0x8C97': {'data_type': '0x000D', 'name': 'AddressBookHierarchicalDepartmentMembers'}, '0x8C98': {'data_type': '0x001E', 'name': 'AddressBookHierarchicalRootDepartment'}, '0x8C99': {'data_type': '0x000D', 'name': 'AddressBookHierarchicalParentDepartment'}, '0x8C9A': {'data_type': '0x000D', 'name': 'AddressBookHierarchicalChildDepartments'}, '0x8C9E': {'data_type': '0x0102', 'name': 'ThumbnailPhoto'}, '0x8CA0': {'data_type': '0x0003', 'name': 'AddressBookSeniorityIndex'}, '0x8CA8': {'data_type': '0x001F', 'name': 'AddressBookOrganizationalUnitRootDistinguishedName'}, '0x8CAC': {'data_type': '0x101F', 'name': 'AddressBookSenderHintTranslations'}, '0x8CB5': {'data_type': '0x000B', 'name': 'AddressBookModerationEnabled'}, '0x8CC2': {'data_type': '0x0102', 'name': 'SpokenName'}, '0x8CD8': {'data_type': '0x000D', 'name': 'AddressBookAuthorizedSenders'}, '0x8CD9': {'data_type': '0x000D', 'name': 'AddressBookUnauthorizedSenders'}, '0x8CDA': {'data_type': '0x000D', 'name': 'AddressBookDistributionListMemberSubmitRejected'}, '0x8CDB': {'data_type': '0x000D', 'name': 'AddressBookDistributionListRejectMessagesFromDLMembers'}, '0x8CDD': {'data_type': '0x000B', 'name': 'AddressBookHierarchicalIsHierarchicalGroup'}, '0x8CE2': {'data_type': '0x0003', 'name': 'AddressBookDistributionListMemberCount'}, '0x8CE3': {'data_type': '0x0003', 'name': 'AddressBookDistributionListExternalMemberCount'}, '0xFFFB': {'data_type': '0x000B', 'name': 'AddressBookIsMaster'}, '0xFFFC': {'data_type': '0x0102', 'name': 'AddressBookParentEntryId'}, '0xFFFD': {'data_type': '0x0003', 'name': 'AddressBookContainerId'}} |
try:
with open("input.txt", "r") as fileContent:
segments = [[segment.split(" -> ")]
for segment in fileContent.readlines()]
segments = [tuple([int(axis) for axis in coordinate.strip().split(",")])
for segment in segments for coordinates in segment for coordinate in coordinates]
segments = [segments[index:index + 2]
for index in range(0, len(segments), 2)]
except FileNotFoundError:
print("[!] The input file was not found. The program will not continue.")
exit(-1)
highestX = 0
highestY = 0
for segment in segments:
for coordinates in segment:
x, y = coordinates[0], coordinates[1]
highestX = x if x > highestX else highestX
highestY = y if y > highestY else highestY
grid = [[0 for _ in range(highestX + 1)] for _ in range(highestY + 1)]
for segment in segments:
start, end = segment[0], segment[1]
x1, y1, x2, y2 = start[0], start[1], end[0], end[1]
if x1 == x2:
for row in range(y1 if y1 < y2 else y2, (y2 + 1) if y1 < y2 else (y1 + 1)):
grid[row][x1] += 1
elif y1 == y2:
for col in range(x1 if x1 < x2 else x2, (x2 + 1) if x1 < x2 else (x1 + 1)):
grid[y1][col] += 1
dangerousAreas = sum([1 for row in grid for cell in row if cell >= 2])
print(dangerousAreas)
| try:
with open('input.txt', 'r') as file_content:
segments = [[segment.split(' -> ')] for segment in fileContent.readlines()]
segments = [tuple([int(axis) for axis in coordinate.strip().split(',')]) for segment in segments for coordinates in segment for coordinate in coordinates]
segments = [segments[index:index + 2] for index in range(0, len(segments), 2)]
except FileNotFoundError:
print('[!] The input file was not found. The program will not continue.')
exit(-1)
highest_x = 0
highest_y = 0
for segment in segments:
for coordinates in segment:
(x, y) = (coordinates[0], coordinates[1])
highest_x = x if x > highestX else highestX
highest_y = y if y > highestY else highestY
grid = [[0 for _ in range(highestX + 1)] for _ in range(highestY + 1)]
for segment in segments:
(start, end) = (segment[0], segment[1])
(x1, y1, x2, y2) = (start[0], start[1], end[0], end[1])
if x1 == x2:
for row in range(y1 if y1 < y2 else y2, y2 + 1 if y1 < y2 else y1 + 1):
grid[row][x1] += 1
elif y1 == y2:
for col in range(x1 if x1 < x2 else x2, x2 + 1 if x1 < x2 else x1 + 1):
grid[y1][col] += 1
dangerous_areas = sum([1 for row in grid for cell in row if cell >= 2])
print(dangerousAreas) |
def return_rate_limit(github):
rate_limit = github.get_rate_limit()
rate = rate_limit.rate
return rate.remaining
| def return_rate_limit(github):
rate_limit = github.get_rate_limit()
rate = rate_limit.rate
return rate.remaining |
class Node:
def __init__(self, key, left=None, right=None):
self.key = key
self.left = left
self.right = right
def __str__(self):
return str(self.key)
def print_path(path):
s = ""
for p in path:
s += str(p) + " "
print(f"{s}\n---")
def paths_with_sum(root, total):
return _paths_with_sum(root, total)
def _paths_with_sum(root, total, curr_total=0, curr_path=[]):
if not root:
return []
paths = []
curr_path.append(root)
curr_total += root.key
if curr_total == total:
paths.append(curr_path)
# look for paths continuing with the curr_path
l_paths = _paths_with_sum(root.left, total, curr_total, curr_path.copy())
r_paths = _paths_with_sum(root.right, total, curr_total, curr_path.copy())
paths += l_paths + r_paths
# look for paths using children as root
l_paths = _paths_with_sum(root.left, total, 0, [])
r_paths = _paths_with_sum(root.right, total, 0, [])
paths += l_paths + r_paths
return paths
if __name__ == '__main__':
root = Node(2)
x0 = Node(0)
x0.left = Node(1)
x3 = Node(3)
x3.right = x0
x1 = Node(1)
x1.right = Node(4, None, Node(1))
x1.left = x3
root.left = x1
x5 = Node(5)
x5.right = Node(0, Node(-1), None)
root.right = x5
paths = paths_with_sum(root, 6)
for path in paths:
print_path(path)
| class Node:
def __init__(self, key, left=None, right=None):
self.key = key
self.left = left
self.right = right
def __str__(self):
return str(self.key)
def print_path(path):
s = ''
for p in path:
s += str(p) + ' '
print(f'{s}\n---')
def paths_with_sum(root, total):
return _paths_with_sum(root, total)
def _paths_with_sum(root, total, curr_total=0, curr_path=[]):
if not root:
return []
paths = []
curr_path.append(root)
curr_total += root.key
if curr_total == total:
paths.append(curr_path)
l_paths = _paths_with_sum(root.left, total, curr_total, curr_path.copy())
r_paths = _paths_with_sum(root.right, total, curr_total, curr_path.copy())
paths += l_paths + r_paths
l_paths = _paths_with_sum(root.left, total, 0, [])
r_paths = _paths_with_sum(root.right, total, 0, [])
paths += l_paths + r_paths
return paths
if __name__ == '__main__':
root = node(2)
x0 = node(0)
x0.left = node(1)
x3 = node(3)
x3.right = x0
x1 = node(1)
x1.right = node(4, None, node(1))
x1.left = x3
root.left = x1
x5 = node(5)
x5.right = node(0, node(-1), None)
root.right = x5
paths = paths_with_sum(root, 6)
for path in paths:
print_path(path) |
a = 35
b = 7
print("a % b =", a % b)
| a = 35
b = 7
print('a % b =', a % b) |
def valid_parentheses(s):
if not s:
return True
elif len(s) == 1:
return False
d = {"(": ")", "{": "}", "[": "]"}
stack = []
for bracket in s:
if bracket in d:
stack.append(bracket)
elif d[stack.pop()] != bracket:
return False
return len(stack) == 0
if __name__ == "__main__":
string = "[[{{}}]](())([])"
print(valid_parentheses(string)) | def valid_parentheses(s):
if not s:
return True
elif len(s) == 1:
return False
d = {'(': ')', '{': '}', '[': ']'}
stack = []
for bracket in s:
if bracket in d:
stack.append(bracket)
elif d[stack.pop()] != bracket:
return False
return len(stack) == 0
if __name__ == '__main__':
string = '[[{{}}]](())([])'
print(valid_parentheses(string)) |
#!/usr/bin/env python3
#
# Copyright (c) 2018-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
#
DOH_URI = '/.well-known/dns-query'
DOH_MEDIA_TYPE = 'application/dns-udpwireformat'
DOH_CONTENT_TYPE_PARAM = 'ct'
DOH_BODY_PARAM = 'body'
DOH_H2_NPN_PROTOCOLS = ['h2']
| doh_uri = '/.well-known/dns-query'
doh_media_type = 'application/dns-udpwireformat'
doh_content_type_param = 'ct'
doh_body_param = 'body'
doh_h2_npn_protocols = ['h2'] |
load("//ruby/private:constants.bzl", "RULES_RUBY_WORKSPACE_NAME")
load("//ruby/private:providers.bzl", "RubyRuntimeContext")
DEFAULT_BUNDLER_VERSION = "2.1.2"
BUNDLE_BIN_PATH = "bin"
BUNDLE_PATH = "lib"
SCRIPT_INSTALL_BUNDLER = "download_bundler.rb"
SCRIPT_ACTIVATE_GEMS = "activate_gems.rb"
SCRIPT_BUILD_FILE_GENERATOR = "create_bundle_build_file.rb"
# Runs bundler with arbitrary arguments
# eg: run_bundler(runtime_ctx, [ "lock", " --gemfile", "Gemfile.rails5" ])
def run_bundler(runtime_ctx, bundler_arguments):
# Now we are running bundle install
args = [
runtime_ctx.interpreter, # ruby
"-I",
".",
"-I", # Used to tell Ruby where to load the library scripts
BUNDLE_PATH, # Add vendor/bundle to the list of resolvers
"bundler/gems/bundler-{}/exe/bundle".format(runtime_ctx.bundler_version), # our binary
] + bundler_arguments
kwargs = {}
if "BUNDLER_TIMEOUT" in runtime_ctx.ctx.os.environ:
timeout_in_secs = runtime_ctx.ctx.os.environ["BUNDLER_TIMEOUT"]
if timeout_in_secs.isdigit():
kwargs["timeout"] = int(timeout_in_secs)
else:
fail("'%s' is invalid value for BUNDLER_TIMEOUT. Must be an integer." % (timeout_in_secs))
return runtime_ctx.ctx.execute(
args,
quiet = False,
# Need to run this command with GEM_HOME set so tgat the bin stubs can load the correct bundler
environment = {"GEM_HOME": "bundler", "GEM_PATH": "bundler"},
**kwargs
)
def install_bundler(runtime_ctx):
args = [
runtime_ctx.interpreter,
SCRIPT_INSTALL_BUNDLER,
runtime_ctx.bundler_version,
]
result = runtime_ctx.ctx.execute(args, environment = runtime_ctx.environment, quiet = False)
if result.return_code:
fail("Error installing bundler: {} {}".format(result.stdout, result.stderr))
def bundle_install(runtime_ctx):
result = run_bundler(
runtime_ctx,
[
"install", # bundle install
"--standalone", # Makes a bundle that can work without depending on Rubygems or Bundler at runtime.
"--binstubs={}".format(BUNDLE_BIN_PATH), # Creates a directory and place any executables from the gem there.
"--path={}".format(BUNDLE_PATH), # The location to install the specified gems to.
"--jobs=10", # run a few jobs to ensure no gem install is blocking another
],
)
if result.return_code:
fail("bundle install failed: %s%s" % (result.stdout, result.stderr))
def generate_bundle_build_file(runtime_ctx):
# Create the BUILD file to expose the gems to the WORKSPACE
# USAGE: ./create_bundle_build_file.rb BUILD.bazel Gemfile.lock repo-name [excludes-json] workspace-name
args = [
runtime_ctx.interpreter, # ruby interpreter
SCRIPT_BUILD_FILE_GENERATOR, # The template used to created bundle file
"BUILD.bazel", # Bazel build file (can be empty)
"Gemfile.lock", # Gemfile.lock where we list all direct and transitive dependencies
runtime_ctx.ctx.name, # Name of the target
repr(runtime_ctx.ctx.attr.excludes),
RULES_RUBY_WORKSPACE_NAME,
runtime_ctx.bundler_version,
]
result = runtime_ctx.ctx.execute(
args,
# The build file generation script requires bundler so we add this to make
# the correct version of bundler available
environment = {"GEM_HOME": "bundler", "GEM_PATH": "bundler"},
quiet = False,
)
if result.return_code:
fail("build file generation failed: %s%s" % (result.stdout, result.stderr))
def _rb_bundle_impl(ctx):
ctx.symlink(ctx.attr.gemfile, "Gemfile")
ctx.symlink(ctx.attr.gemfile_lock, "Gemfile.lock")
ctx.symlink(ctx.attr._create_bundle_build_file, SCRIPT_BUILD_FILE_GENERATOR)
ctx.symlink(ctx.attr._install_bundler, SCRIPT_INSTALL_BUNDLER)
ctx.symlink(ctx.attr._activate_gems, SCRIPT_ACTIVATE_GEMS)
# Setup this provider that we pass around between functions for convenience
runtime_ctx = RubyRuntimeContext(
ctx = ctx,
interpreter = ctx.path(ctx.attr.ruby_interpreter),
environment = {"RUBYOPT": "--enable-gems"},
bundler_version = ctx.attr.bundler_version,
)
# 1. Install the right version of the Bundler Gem
install_bundler(runtime_ctx)
# Create label for the Bundler executable
bundler = Label("//:bundler/gems/bundler-{}/exe/bundle".format(runtime_ctx.bundler_version))
# Run bundle install
bundle_install(runtime_ctx)
# Generate the BUILD file for the bundle
generate_bundle_build_file(runtime_ctx)
rb_bundle = repository_rule(
implementation = _rb_bundle_impl,
attrs = {
"ruby_sdk": attr.string(
default = "@org_ruby_lang_ruby_toolchain",
),
"ruby_interpreter": attr.label(
default = "@org_ruby_lang_ruby_toolchain//:ruby",
),
"gemfile": attr.label(
allow_single_file = True,
mandatory = True,
),
"gemfile_lock": attr.label(
allow_single_file = True,
),
"version": attr.string(
mandatory = False,
),
"bundler_version": attr.string(
default = DEFAULT_BUNDLER_VERSION,
),
"excludes": attr.string_list_dict(
doc = "List of glob patterns per gem to be excluded from the library",
),
"_install_bundler": attr.label(
default = "%s//ruby/private/bundle:%s" % (
RULES_RUBY_WORKSPACE_NAME,
SCRIPT_INSTALL_BUNDLER,
),
allow_single_file = True,
),
"_create_bundle_build_file": attr.label(
default = "%s//ruby/private/bundle:%s" % (
RULES_RUBY_WORKSPACE_NAME,
SCRIPT_BUILD_FILE_GENERATOR,
),
doc = "Creates the BUILD file",
allow_single_file = True,
),
"_activate_gems": attr.label(
default = "%s//ruby/private/bundle:%s" % (
RULES_RUBY_WORKSPACE_NAME,
SCRIPT_ACTIVATE_GEMS,
),
allow_single_file = True,
),
},
)
| load('//ruby/private:constants.bzl', 'RULES_RUBY_WORKSPACE_NAME')
load('//ruby/private:providers.bzl', 'RubyRuntimeContext')
default_bundler_version = '2.1.2'
bundle_bin_path = 'bin'
bundle_path = 'lib'
script_install_bundler = 'download_bundler.rb'
script_activate_gems = 'activate_gems.rb'
script_build_file_generator = 'create_bundle_build_file.rb'
def run_bundler(runtime_ctx, bundler_arguments):
args = [runtime_ctx.interpreter, '-I', '.', '-I', BUNDLE_PATH, 'bundler/gems/bundler-{}/exe/bundle'.format(runtime_ctx.bundler_version)] + bundler_arguments
kwargs = {}
if 'BUNDLER_TIMEOUT' in runtime_ctx.ctx.os.environ:
timeout_in_secs = runtime_ctx.ctx.os.environ['BUNDLER_TIMEOUT']
if timeout_in_secs.isdigit():
kwargs['timeout'] = int(timeout_in_secs)
else:
fail("'%s' is invalid value for BUNDLER_TIMEOUT. Must be an integer." % timeout_in_secs)
return runtime_ctx.ctx.execute(args, quiet=False, environment={'GEM_HOME': 'bundler', 'GEM_PATH': 'bundler'}, **kwargs)
def install_bundler(runtime_ctx):
args = [runtime_ctx.interpreter, SCRIPT_INSTALL_BUNDLER, runtime_ctx.bundler_version]
result = runtime_ctx.ctx.execute(args, environment=runtime_ctx.environment, quiet=False)
if result.return_code:
fail('Error installing bundler: {} {}'.format(result.stdout, result.stderr))
def bundle_install(runtime_ctx):
result = run_bundler(runtime_ctx, ['install', '--standalone', '--binstubs={}'.format(BUNDLE_BIN_PATH), '--path={}'.format(BUNDLE_PATH), '--jobs=10'])
if result.return_code:
fail('bundle install failed: %s%s' % (result.stdout, result.stderr))
def generate_bundle_build_file(runtime_ctx):
args = [runtime_ctx.interpreter, SCRIPT_BUILD_FILE_GENERATOR, 'BUILD.bazel', 'Gemfile.lock', runtime_ctx.ctx.name, repr(runtime_ctx.ctx.attr.excludes), RULES_RUBY_WORKSPACE_NAME, runtime_ctx.bundler_version]
result = runtime_ctx.ctx.execute(args, environment={'GEM_HOME': 'bundler', 'GEM_PATH': 'bundler'}, quiet=False)
if result.return_code:
fail('build file generation failed: %s%s' % (result.stdout, result.stderr))
def _rb_bundle_impl(ctx):
ctx.symlink(ctx.attr.gemfile, 'Gemfile')
ctx.symlink(ctx.attr.gemfile_lock, 'Gemfile.lock')
ctx.symlink(ctx.attr._create_bundle_build_file, SCRIPT_BUILD_FILE_GENERATOR)
ctx.symlink(ctx.attr._install_bundler, SCRIPT_INSTALL_BUNDLER)
ctx.symlink(ctx.attr._activate_gems, SCRIPT_ACTIVATE_GEMS)
runtime_ctx = ruby_runtime_context(ctx=ctx, interpreter=ctx.path(ctx.attr.ruby_interpreter), environment={'RUBYOPT': '--enable-gems'}, bundler_version=ctx.attr.bundler_version)
install_bundler(runtime_ctx)
bundler = label('//:bundler/gems/bundler-{}/exe/bundle'.format(runtime_ctx.bundler_version))
bundle_install(runtime_ctx)
generate_bundle_build_file(runtime_ctx)
rb_bundle = repository_rule(implementation=_rb_bundle_impl, attrs={'ruby_sdk': attr.string(default='@org_ruby_lang_ruby_toolchain'), 'ruby_interpreter': attr.label(default='@org_ruby_lang_ruby_toolchain//:ruby'), 'gemfile': attr.label(allow_single_file=True, mandatory=True), 'gemfile_lock': attr.label(allow_single_file=True), 'version': attr.string(mandatory=False), 'bundler_version': attr.string(default=DEFAULT_BUNDLER_VERSION), 'excludes': attr.string_list_dict(doc='List of glob patterns per gem to be excluded from the library'), '_install_bundler': attr.label(default='%s//ruby/private/bundle:%s' % (RULES_RUBY_WORKSPACE_NAME, SCRIPT_INSTALL_BUNDLER), allow_single_file=True), '_create_bundle_build_file': attr.label(default='%s//ruby/private/bundle:%s' % (RULES_RUBY_WORKSPACE_NAME, SCRIPT_BUILD_FILE_GENERATOR), doc='Creates the BUILD file', allow_single_file=True), '_activate_gems': attr.label(default='%s//ruby/private/bundle:%s' % (RULES_RUBY_WORKSPACE_NAME, SCRIPT_ACTIVATE_GEMS), allow_single_file=True)}) |
# Designing window for login
def login():
global login_screen
login_screen = Toplevel(main_screen)
login_screen.title("Login")
login_screen.geometry("300x250")
Label(login_screen, text="Please enter details below to login").pack()
Label(login_screen, text="").pack()
global username_verify
global password_verify
username_verify = StringVar()
password_verify = StringVar()
global username_login_entry
global password_login_entry
Label(login_screen, text="Username * ").pack()
username_login_entry = Entry(login_screen, textvariable=username_verify)
username_login_entry.pack()
Label(login_screen, text="").pack()
Label(login_screen, text="Password * ").pack()
password_login_entry = Entry(login_screen, textvariable=password_verify, show= '*')
password_login_entry.pack()
Label(login_screen, text="").pack()
Button(login_screen, text="Login", width=10, height=1, command = login_verify).pack()
def login_sucess():
global login_success_screen
login_success_screen = Toplevel(login_screen)
login_success_screen.title("Success")
login_success_screen.geometry("150x100")
Label(login_success_screen, text="Login Success").pack()
Button(login_success_screen, text="OK", command=delete_login_success).pack()
# Designing popup for login invalid password
def password_not_recognised():
global password_not_recog_screen
password_not_recog_screen = Toplevel(login_screen)
password_not_recog_screen.title("Success")
password_not_recog_screen.geometry("150x100")
Label(password_not_recog_screen, text="Invalid Password ").pack()
Button(password_not_recog_screen, text="OK", command=delete_password_not_recognised).pack()
# Designing popup for user not found
def user_not_found():
global user_not_found_screen
user_not_found_screen = Toplevel(login_screen)
user_not_found_screen.title("Success")
user_not_found_screen.geometry("150x100")
Label(user_not_found_screen, text="User Not Found").pack()
Button(user_not_found_screen, text="OK", command=delete_user_not_found_screen).pack()
# Deleting popups
def delete_login_success():
login_success_screen.destroy()
def delete_password_not_recognised():
password_not_recog_screen.destroy()
def delete_user_not_found_screen():
user_not_found_screen.destroy()
| def login():
global login_screen
login_screen = toplevel(main_screen)
login_screen.title('Login')
login_screen.geometry('300x250')
label(login_screen, text='Please enter details below to login').pack()
label(login_screen, text='').pack()
global username_verify
global password_verify
username_verify = string_var()
password_verify = string_var()
global username_login_entry
global password_login_entry
label(login_screen, text='Username * ').pack()
username_login_entry = entry(login_screen, textvariable=username_verify)
username_login_entry.pack()
label(login_screen, text='').pack()
label(login_screen, text='Password * ').pack()
password_login_entry = entry(login_screen, textvariable=password_verify, show='*')
password_login_entry.pack()
label(login_screen, text='').pack()
button(login_screen, text='Login', width=10, height=1, command=login_verify).pack()
def login_sucess():
global login_success_screen
login_success_screen = toplevel(login_screen)
login_success_screen.title('Success')
login_success_screen.geometry('150x100')
label(login_success_screen, text='Login Success').pack()
button(login_success_screen, text='OK', command=delete_login_success).pack()
def password_not_recognised():
global password_not_recog_screen
password_not_recog_screen = toplevel(login_screen)
password_not_recog_screen.title('Success')
password_not_recog_screen.geometry('150x100')
label(password_not_recog_screen, text='Invalid Password ').pack()
button(password_not_recog_screen, text='OK', command=delete_password_not_recognised).pack()
def user_not_found():
global user_not_found_screen
user_not_found_screen = toplevel(login_screen)
user_not_found_screen.title('Success')
user_not_found_screen.geometry('150x100')
label(user_not_found_screen, text='User Not Found').pack()
button(user_not_found_screen, text='OK', command=delete_user_not_found_screen).pack()
def delete_login_success():
login_success_screen.destroy()
def delete_password_not_recognised():
password_not_recog_screen.destroy()
def delete_user_not_found_screen():
user_not_found_screen.destroy() |
def solution(n, times):
leftLim = 1; rightLim = max(times) * n; answer = max(times) * n
while leftLim <= rightLim:
# print(leftLim, rightLim)
lim = (leftLim + rightLim)//2; check = sum([lim//time for time in times])
if check >= n:
answer = min(answer, lim)
rightLim = lim - 1
elif check < n:
leftLim = lim + 1
return answer | def solution(n, times):
left_lim = 1
right_lim = max(times) * n
answer = max(times) * n
while leftLim <= rightLim:
lim = (leftLim + rightLim) // 2
check = sum([lim // time for time in times])
if check >= n:
answer = min(answer, lim)
right_lim = lim - 1
elif check < n:
left_lim = lim + 1
return answer |
def resta(num_1, num_2):
print('Restando:', num_1, '-', num_2)
resta_total = num_1 - num_2
print('El resultado es:',resta_total)
return resta_total
def app_resta():
inp_1 = None # Can be used 'None' instead of 0 too
inp_2 = None
while inp_1 == None:
try:
inp_1 = int(input('Numero 1?: '))
except ValueError:
print('Numero invalido, intenta de nuevo')
while inp_2 == None:
try:
inp_2 = int(input('Numero 2?: '))
except ValueError:
print('Numero invalido, intenta de nuevo')
resta(inp_1, inp_2)
#app_resta()
| def resta(num_1, num_2):
print('Restando:', num_1, '-', num_2)
resta_total = num_1 - num_2
print('El resultado es:', resta_total)
return resta_total
def app_resta():
inp_1 = None
inp_2 = None
while inp_1 == None:
try:
inp_1 = int(input('Numero 1?: '))
except ValueError:
print('Numero invalido, intenta de nuevo')
while inp_2 == None:
try:
inp_2 = int(input('Numero 2?: '))
except ValueError:
print('Numero invalido, intenta de nuevo')
resta(inp_1, inp_2) |
def cycleSort(array, *args):
for cycle_start in range(0, len(array) - 1):
item = array[cycle_start]
pos = cycle_start
for i in range(cycle_start + 1, len(array)):
if array[i] < item:
pos += 1
if pos == cycle_start:
continue
while array[pos] == item:
pos += 1
yield array, cycle_start, pos, -1, -1
array[pos], item = item, array[pos]
while pos != cycle_start:
pos = cycle_start
for i in range(cycle_start + 1, len(array)):
if array[i] < item:
pos += 1
while array[pos] == item:
pos += 1
yield array, cycle_start, pos, -1, -1
array[pos], item = item, array[pos]
| def cycle_sort(array, *args):
for cycle_start in range(0, len(array) - 1):
item = array[cycle_start]
pos = cycle_start
for i in range(cycle_start + 1, len(array)):
if array[i] < item:
pos += 1
if pos == cycle_start:
continue
while array[pos] == item:
pos += 1
yield (array, cycle_start, pos, -1, -1)
(array[pos], item) = (item, array[pos])
while pos != cycle_start:
pos = cycle_start
for i in range(cycle_start + 1, len(array)):
if array[i] < item:
pos += 1
while array[pos] == item:
pos += 1
yield (array, cycle_start, pos, -1, -1)
(array[pos], item) = (item, array[pos]) |
aI, aO, aT, aJ, aL, aS, aZ = map(int, input().split())
ans = aO
p = [aI, aJ, aL]
for i in range(3):
if p[i] >= 2:
if p[i] % 2 == 0:
ans += (p[i] - 2) // 2 * 2
p[i] = 2
else:
ans += p[i] // 2 * 2
p[i] = 1
p.sort()
if sum(p) >= 5:
ans += sum(p) // 2 * 2
elif sum(p) == 4:
if p == [1, 1, 2]:
ans += 3
elif p == [0, 2, 2]:
ans += 4
else:
assert(False)
elif sum(p) == 3:
if p == [0, 1, 2]:
ans += 2
elif p == [1, 1, 1]:
ans += 3
else:
assert(False)
elif sum(p) == 2:
if p == [0, 0, 2]:
ans += 2
elif p == [0, 1, 1]:
pass
else:
assert(False)
else:
assert(sum(p) <= 1)
print(ans)
| (a_i, a_o, a_t, a_j, a_l, a_s, a_z) = map(int, input().split())
ans = aO
p = [aI, aJ, aL]
for i in range(3):
if p[i] >= 2:
if p[i] % 2 == 0:
ans += (p[i] - 2) // 2 * 2
p[i] = 2
else:
ans += p[i] // 2 * 2
p[i] = 1
p.sort()
if sum(p) >= 5:
ans += sum(p) // 2 * 2
elif sum(p) == 4:
if p == [1, 1, 2]:
ans += 3
elif p == [0, 2, 2]:
ans += 4
else:
assert False
elif sum(p) == 3:
if p == [0, 1, 2]:
ans += 2
elif p == [1, 1, 1]:
ans += 3
else:
assert False
elif sum(p) == 2:
if p == [0, 0, 2]:
ans += 2
elif p == [0, 1, 1]:
pass
else:
assert False
else:
assert sum(p) <= 1
print(ans) |
class Solution:
def twoSum(self, nums , target) :
# a python dictionary(hash)
# key is number
# value is index of list: nums
number_dictionary = dict()
for index, number in enumerate(nums):
# put every number into dictionary with index
number_dictionary[ number ] = index
# a list for index storage for i, index_of_dual that nums[i] + nums[index_of_dual] = target
solution = list()
for i in range( len(nums) ):
value = nums[i]
# compute the dual that makes value + dual = target
dual = target - value
index_of_dual = number_dictionary.get( dual, None)
if index_of_dual is not None and index_of_dual != i:
# Note: we can't use the same element twice, thus return empty list
# make a list for solution list
solution = list([i, index_of_dual])
break
else:
# if index_of_dual is None, keeps going to next iteration
# Problem description says that each input would have exactly one solution
continue
# return index of nums that makes the sum equal to target
return solution | class Solution:
def two_sum(self, nums, target):
number_dictionary = dict()
for (index, number) in enumerate(nums):
number_dictionary[number] = index
solution = list()
for i in range(len(nums)):
value = nums[i]
dual = target - value
index_of_dual = number_dictionary.get(dual, None)
if index_of_dual is not None and index_of_dual != i:
solution = list([i, index_of_dual])
break
else:
continue
return solution |
n = int(input("Enter the number : "))
fact = 1
for i in range(1,n + 1):
fact = fact * i
print("Factorial of {} is {}".format(n,fact)) | n = int(input('Enter the number : '))
fact = 1
for i in range(1, n + 1):
fact = fact * i
print('Factorial of {} is {}'.format(n, fact)) |
pkgname = "lua5.4-zlib"
pkgver = "1.2"
pkgrel = 0
build_style = "makefile"
make_build_target = "linux"
hostmakedepends = ["pkgconf"]
makedepends = ["lua5.4-devel", "zlib-devel"]
pkgdesc = "Zlib streaming interface for Lua (5.4)"
maintainer = "q66 <q66@chimera-linux.org>"
license = "MIT"
url = "https://github.com/brimworks/lua-zlib"
source = f"{url}/archive/v{pkgver}.tar.gz"
sha256 = "26b813ad39c94fc930b168c3418e2e746af3b2e80b92f94f306f6f954cc31e7d"
# no test suite
options = ["!check"]
def init_configure(self):
tcflags = self.get_cflags(["-shared"], shell = True)
eargs = [
f"LIBS={tcflags} -lz -llua5.4 -lm",
"INCDIR=-I/usr/include -I/usr/include/lua5.4",
"LIBDIR=-L/usr/lib",
"LUACPATH=/usr/lib/lua/5.4",
"LUAPATH=/usr/share/lua/5.4",
]
self.make_build_args += eargs
self.make_install_args += eargs
self.make_check_args += eargs
self.tools["LD"] = self.get_tool("CC")
def do_install(self):
self.install_license("README")
self.install_file("zlib.so", "usr/lib/lua/5.4", mode = 0o755)
| pkgname = 'lua5.4-zlib'
pkgver = '1.2'
pkgrel = 0
build_style = 'makefile'
make_build_target = 'linux'
hostmakedepends = ['pkgconf']
makedepends = ['lua5.4-devel', 'zlib-devel']
pkgdesc = 'Zlib streaming interface for Lua (5.4)'
maintainer = 'q66 <q66@chimera-linux.org>'
license = 'MIT'
url = 'https://github.com/brimworks/lua-zlib'
source = f'{url}/archive/v{pkgver}.tar.gz'
sha256 = '26b813ad39c94fc930b168c3418e2e746af3b2e80b92f94f306f6f954cc31e7d'
options = ['!check']
def init_configure(self):
tcflags = self.get_cflags(['-shared'], shell=True)
eargs = [f'LIBS={tcflags} -lz -llua5.4 -lm', 'INCDIR=-I/usr/include -I/usr/include/lua5.4', 'LIBDIR=-L/usr/lib', 'LUACPATH=/usr/lib/lua/5.4', 'LUAPATH=/usr/share/lua/5.4']
self.make_build_args += eargs
self.make_install_args += eargs
self.make_check_args += eargs
self.tools['LD'] = self.get_tool('CC')
def do_install(self):
self.install_license('README')
self.install_file('zlib.so', 'usr/lib/lua/5.4', mode=493) |
# TempConv.py
# Celcius to Fahreinheit
def Fahreinheit(temp):
temp = float(temp)
temp = (temp*9/5)+32
return temp
# Fahreinheit to Celcius
def Celcius(temp):
temp = float(temp)
temp = (temp-32)*5/9
return temp
| def fahreinheit(temp):
temp = float(temp)
temp = temp * 9 / 5 + 32
return temp
def celcius(temp):
temp = float(temp)
temp = (temp - 32) * 5 / 9
return temp |
friends = ["Sam","Samantha","Saurab"]
start_with_s = [x for x in friends if x.startswith("S")]
#compare list friends and start_with_s, bot are same value but result should be false.
#Because two are different list
print(friends is start_with_s)
print("friends : ", id(friends)," start_with_s : ",id(start_with_s))
#if we compare data then output will be true
print(friends[0] is start_with_s[0])
| friends = ['Sam', 'Samantha', 'Saurab']
start_with_s = [x for x in friends if x.startswith('S')]
print(friends is start_with_s)
print('friends : ', id(friends), ' start_with_s : ', id(start_with_s))
print(friends[0] is start_with_s[0]) |
## Given a position, write a function to
## find if that position is within 5 points of a monster:
a_treasure_map = {
"45,46": "sea monster",
"55,38": "air monster",
"33,78": "lava monster",
"22,23": "shining castle",
"64,97": "shield of truth",
"97,3": "sword of power",
}
def near_monster(position, a_treasure_map):
x,y = position.split(",")
playerX = int(x)
playerY = int(y)
for key, value in a_treasure_map.items():
if value.endswith('monster'):
monsterX, monsterY = map(int, key.split(","))
distance = ((monsterX - playerX)**2 + (monsterY - playerY)**2)**0.5
if distance <= 5:
return True
return False
print(near_monster("44,48", a_treasure_map))
print(near_monster("3,7", a_treasure_map))
## Given your current position, are you closer to the secret gem,
## or the hidden springs? Write a function that returns the closest treasure to you
a_treasure_map = {
"38.2859417,-122.3599983": "secret_gem",
"34.3183327,-118.1399376": "hidden_springs"
}
def closest_treasure(position,a_treasure_map):
positionX, positionY = map(float, position.split(","))
min_distance = 1000000
min_value = ""
for key, value in a_treasure_map.items():
treasureX, treasureY = map(float, key.split(","))
distance = ((treasureX - positionX)**2 + (treasureY - positionY)**2)**0.5
if distance < min_distance:
min_distance = distance
min_value = value
return min_value
print(closest_treasure("5,6", a_treasure_map))
print(closest_treasure("36,-122", a_treasure_map))
| a_treasure_map = {'45,46': 'sea monster', '55,38': 'air monster', '33,78': 'lava monster', '22,23': 'shining castle', '64,97': 'shield of truth', '97,3': 'sword of power'}
def near_monster(position, a_treasure_map):
(x, y) = position.split(',')
player_x = int(x)
player_y = int(y)
for (key, value) in a_treasure_map.items():
if value.endswith('monster'):
(monster_x, monster_y) = map(int, key.split(','))
distance = ((monsterX - playerX) ** 2 + (monsterY - playerY) ** 2) ** 0.5
if distance <= 5:
return True
return False
print(near_monster('44,48', a_treasure_map))
print(near_monster('3,7', a_treasure_map))
a_treasure_map = {'38.2859417,-122.3599983': 'secret_gem', '34.3183327,-118.1399376': 'hidden_springs'}
def closest_treasure(position, a_treasure_map):
(position_x, position_y) = map(float, position.split(','))
min_distance = 1000000
min_value = ''
for (key, value) in a_treasure_map.items():
(treasure_x, treasure_y) = map(float, key.split(','))
distance = ((treasureX - positionX) ** 2 + (treasureY - positionY) ** 2) ** 0.5
if distance < min_distance:
min_distance = distance
min_value = value
return min_value
print(closest_treasure('5,6', a_treasure_map))
print(closest_treasure('36,-122', a_treasure_map)) |
def batch_iterator(iterable, batch_size):
iterator = iter(iterable)
iteration_stopped = False
while True:
batch = []
for _ in range(batch_size):
try:
batch.append(next(iterator))
except StopIteration:
iteration_stopped = True
break
yield batch
if iteration_stopped:
break
| def batch_iterator(iterable, batch_size):
iterator = iter(iterable)
iteration_stopped = False
while True:
batch = []
for _ in range(batch_size):
try:
batch.append(next(iterator))
except StopIteration:
iteration_stopped = True
break
yield batch
if iteration_stopped:
break |
def cuberoot2(x0):
x = x0
i = 0
while True:
nextIt = (1/3)*(2*x+2/(x**2))
if (abs(nextIt - x) <= 10**-7):
break
else:
i += 1
x = nextIt
print("The sequence starting at", x0, "converges to", x,"in", i, "iterations.")
cuberoot2(20)
def nesty(x):
f = (x - 1) ** 5
g = x ** 5 - 5 * x ** 4 + 10 * x ** 3 - 10 * x ** 2 + 5 * x -1
h = x * (5 - x * (10 - x * (10 - x * (5 - x)))) - 1
print("x =", x, ", f(x) =", f, ", g(x) =", g, ", h(x) =", h)
for i in range(1,8):
nesty(1 + 10 ** -i)
#the answer *should* be (10^-n)^5 = 10 ^ -5n. With n ranging from 1 to 7, that goes as low as 10 ^ -35! This means that we want to minimize our loss of significance or face massive relative error
#f minimized the number of operations (in particular subtraction) to the answer, thereby minimizing loss of significance and the relative error
#therefore f output the best results
#on the other hand, g and h had more subtraction, resulting in greater loss of significance, worse relative error, and worse results | def cuberoot2(x0):
x = x0
i = 0
while True:
next_it = 1 / 3 * (2 * x + 2 / x ** 2)
if abs(nextIt - x) <= 10 ** (-7):
break
else:
i += 1
x = nextIt
print('The sequence starting at', x0, 'converges to', x, 'in', i, 'iterations.')
cuberoot2(20)
def nesty(x):
f = (x - 1) ** 5
g = x ** 5 - 5 * x ** 4 + 10 * x ** 3 - 10 * x ** 2 + 5 * x - 1
h = x * (5 - x * (10 - x * (10 - x * (5 - x)))) - 1
print('x =', x, ', f(x) =', f, ', g(x) =', g, ', h(x) =', h)
for i in range(1, 8):
nesty(1 + 10 ** (-i)) |
# add a key to a dicitonary
# Sample dictionary: {0:10,1:20}
# Expected Result: {0:10,1:20,2:30}
a={0:10,1:20}
a[2]=30
print(a) | a = {0: 10, 1: 20}
a[2] = 30
print(a) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.