content stringlengths 7 1.05M | fixed_cases stringlengths 1 1.28M |
|---|---|
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://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.
# the mini-batch size
batch_size = 32
# the number of epochs
epochs=10
# once the model is compiled and the image data has been preprocessed,
# the fit method will start training the model, where x_train and y_train
# are the preprocessed image data and one-hot encoded labels
model.fit(x_train, y_train, batch_size=batch_size, epochs=epochs) | batch_size = 32
epochs = 10
model.fit(x_train, y_train, batch_size=batch_size, epochs=epochs) |
''' base class for a WES Client'''
class WESClient:
def __init__(self, api_url_base):
self.api_url_base = api_url_base
def runWorkflow(self, fileurl):
# use a temporary file to write out the input file
inputJson = {"md5Sum.inputFile":fileurl}
return None
| """ base class for a WES Client"""
class Wesclient:
def __init__(self, api_url_base):
self.api_url_base = api_url_base
def run_workflow(self, fileurl):
input_json = {'md5Sum.inputFile': fileurl}
return None |
def enumize(obj, enum_type):
if isinstance(obj, enum_type):
return obj
else:
try:
return enum_type(obj)
except ValueError as exc:
try:
return enum_type[obj]
except KeyError:
raise exc
def deenumize(obj):
return obj.value if hasattr(obj, "value") else obj
def norm_params(params: dict, *, func=None) -> dict:
rparams = {}
annotations = {}
if func is not None:
annotations = func.__annotations__
for name, value in params.items():
cls = annotations.get(name)
if hasattr(value, "value"): # enum support
value = value.value
elif cls in {bool, float, int, str}:
value = cls(value)
if value is not None:
rparams[name] = value
return rparams or None
| def enumize(obj, enum_type):
if isinstance(obj, enum_type):
return obj
else:
try:
return enum_type(obj)
except ValueError as exc:
try:
return enum_type[obj]
except KeyError:
raise exc
def deenumize(obj):
return obj.value if hasattr(obj, 'value') else obj
def norm_params(params: dict, *, func=None) -> dict:
rparams = {}
annotations = {}
if func is not None:
annotations = func.__annotations__
for (name, value) in params.items():
cls = annotations.get(name)
if hasattr(value, 'value'):
value = value.value
elif cls in {bool, float, int, str}:
value = cls(value)
if value is not None:
rparams[name] = value
return rparams or None |
# remainder Of any number
while True:
a = int(input("Enter The Dividend Number : "))
b = int(input("Enter The Divisor Number : "))
Quotient = "Quotient Number", (a / b) % 2 * 2
print(Quotient)
| while True:
a = int(input('Enter The Dividend Number : '))
b = int(input('Enter The Divisor Number : '))
quotient = ('Quotient Number', a / b % 2 * 2)
print(Quotient) |
class NoRulesForTaskException(Exception):
def __init__(self, message="at least one rule needs to be defined for task"):
super().__init__(message)
self.message = message
class NoValidActionFoundException(Exception):
def __init__(self, message="rule at least has to have one valid action"):
super().__init__(message)
self.message = message
| class Norulesfortaskexception(Exception):
def __init__(self, message='at least one rule needs to be defined for task'):
super().__init__(message)
self.message = message
class Novalidactionfoundexception(Exception):
def __init__(self, message='rule at least has to have one valid action'):
super().__init__(message)
self.message = message |
v = [int(input()) for x in range(20)]
maior, menor = v[0], v[0]
for i in range(20):
if v[i] < menor:
menor = v[i]
elif v[i] > maior:
maior = v[i]
print(f'Menor: {menor}\nMaior: {maior}')
| v = [int(input()) for x in range(20)]
(maior, menor) = (v[0], v[0])
for i in range(20):
if v[i] < menor:
menor = v[i]
elif v[i] > maior:
maior = v[i]
print(f'Menor: {menor}\nMaior: {maior}') |
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
# Time Complexity: O(N), N is the number of nodes
# Space Complexity: O(h), h is the height of the tree
class Solution:
def isSameTree(self, p: Optional[TreeNode], q: Optional[TreeNode]) -> bool:
# two trees are empty
if not p and not q:
return True
# one of trees is empty, return false
if not p or not q:
return False
return p.val == q.val and self.isSameTree(p.left, q.left) and self.isSameTree(p.right, q.right)
| class Solution:
def is_same_tree(self, p: Optional[TreeNode], q: Optional[TreeNode]) -> bool:
if not p and (not q):
return True
if not p or not q:
return False
return p.val == q.val and self.isSameTree(p.left, q.left) and self.isSameTree(p.right, q.right) |
GMUSIC_EMAIL = 'g_email'
GMUSIC_PASSWORD = 'g_password'
SPOTIFY_CLIENT_ID = 'id'
SPOTIFY_CLIENT_SECRET = 'secret'
SPOTIFY_REDIRECT_URI = 'redirect'
SPOTIFY_USER = 's_user' | gmusic_email = 'g_email'
gmusic_password = 'g_password'
spotify_client_id = 'id'
spotify_client_secret = 'secret'
spotify_redirect_uri = 'redirect'
spotify_user = 's_user' |
class Term(object):
literal = None
def __init__(self, literal):
self.literal = literal
# Here be extensions (as per the task)
def __eq__(self, other):
if isinstance(other, self.__class__):
return self.__dict__ == other.__dict__ # Dictionary of class members
else:
return False
def __ne__(self, other):
return not self.__eq__(other)
def __str__(self):
return str(self.literal)
def __repr__(self):
return str(self.literal)
def __hash__(self, *args, **kwargs):
return hash(self.literal)
def __lt__(self, other):
return self.literal < other.literal | class Term(object):
literal = None
def __init__(self, literal):
self.literal = literal
def __eq__(self, other):
if isinstance(other, self.__class__):
return self.__dict__ == other.__dict__
else:
return False
def __ne__(self, other):
return not self.__eq__(other)
def __str__(self):
return str(self.literal)
def __repr__(self):
return str(self.literal)
def __hash__(self, *args, **kwargs):
return hash(self.literal)
def __lt__(self, other):
return self.literal < other.literal |
# Operators
a = 5
b = 7
r = a + b
print("r:", r, type(r))
r = a * b
print("r:", r, type(r))
r = a / b
print("r:", r, type(r))
a = 2 * b
r = a / b
print("r:", r, type(r)) | a = 5
b = 7
r = a + b
print('r:', r, type(r))
r = a * b
print('r:', r, type(r))
r = a / b
print('r:', r, type(r))
a = 2 * b
r = a / b
print('r:', r, type(r)) |
# Changing and adding Dictionary Elements
my_dict = {'name': 'Nguyen Khang', 'age': 17}
# update value
my_dict['age'] = 18
#Output: {'name': 'Nguyen Khang', 'age': 18}
print(my_dict)
# add item
my_dict['address'] = 'Ho Chi Minh'
# Output: {'name': 'Nguyen Khang', 'age': 18, 'address': 'Ho Chi Minh'}
print(my_dict)
| my_dict = {'name': 'Nguyen Khang', 'age': 17}
my_dict['age'] = 18
print(my_dict)
my_dict['address'] = 'Ho Chi Minh'
print(my_dict) |
class Solution:
def exist(self, board: List[List[str]], word: str) -> bool:
visited = set()
for i in range(len(board)):
for j in range(len(board[0])):
if board[i][j] == word[0]:
visited.add((i, j))
if self._dfs(board, word, 1, i, j, visited):
return True
visited.discard((i, j))
return False
def _dfs(self, board, word, idx, i, j, visited):
if idx == len(word):
return True
for ni, nj in [(i+1, j), (i-1, j), (i, j+1), (i, j-1)]:
if 0 <= ni < len(board) and 0 <= nj < len(board[0]) and word[idx] == board[ni][nj] and (ni, nj) not in visited:
visited.add((ni, nj))
if self._dfs(board, word, idx+1, ni, nj, visited):
return True
visited.discard((ni, nj))
return False
| class Solution:
def exist(self, board: List[List[str]], word: str) -> bool:
visited = set()
for i in range(len(board)):
for j in range(len(board[0])):
if board[i][j] == word[0]:
visited.add((i, j))
if self._dfs(board, word, 1, i, j, visited):
return True
visited.discard((i, j))
return False
def _dfs(self, board, word, idx, i, j, visited):
if idx == len(word):
return True
for (ni, nj) in [(i + 1, j), (i - 1, j), (i, j + 1), (i, j - 1)]:
if 0 <= ni < len(board) and 0 <= nj < len(board[0]) and (word[idx] == board[ni][nj]) and ((ni, nj) not in visited):
visited.add((ni, nj))
if self._dfs(board, word, idx + 1, ni, nj, visited):
return True
visited.discard((ni, nj))
return False |
BRIGHTON = 2151001
sm.setSpeakerID(2151001)
sm.sendNext("What is it?\r\n\r\n#L0##bI want to talk to you.")
sm.sendNext("Well... I'm not really that good with words, you see... I'm not the best person to hang around with.") | brighton = 2151001
sm.setSpeakerID(2151001)
sm.sendNext('What is it?\r\n\r\n#L0##bI want to talk to you.')
sm.sendNext("Well... I'm not really that good with words, you see... I'm not the best person to hang around with.") |
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution:
def distanceK(self, root: TreeNode, target: TreeNode, k: int) -> List[int]:
def dfs( node, par=None ):
if node:
node.par = par
dfs(node.left, node)
dfs(node.right, node)
dfs(root)
queue = collections.deque( [(target, 0)] )
seen = {target}
while queue:
if queue[0][1] == k:
return [node.val for node, d in queue]
node, d = queue.popleft()
for nei in (node.left, node.right, node.par):
if nei and nei not in seen:
seen.add(nei)
queue.append((nei,d+1))
return []
| class Solution:
def distance_k(self, root: TreeNode, target: TreeNode, k: int) -> List[int]:
def dfs(node, par=None):
if node:
node.par = par
dfs(node.left, node)
dfs(node.right, node)
dfs(root)
queue = collections.deque([(target, 0)])
seen = {target}
while queue:
if queue[0][1] == k:
return [node.val for (node, d) in queue]
(node, d) = queue.popleft()
for nei in (node.left, node.right, node.par):
if nei and nei not in seen:
seen.add(nei)
queue.append((nei, d + 1))
return [] |
RAMSIZE=128
iochannel = CoramIoChannel(idx=0, datawidth=32)
ram = CoramMemory(idx=0, datawidth=32, size=RAMSIZE, length=1, scattergather=False)
channel = CoramChannel(idx=0, datawidth=32, size=16)
def main():
sum = 0
addr = iochannel.read()
read_size = iochannel.read()
size = 0
while size < read_size:
req_size = RAMSIZE if size + RAMSIZE <= read_size else read_size - size
ram.write(0, addr, req_size) # from DRAM to BlockRAM
channel.write(addr)
addr += req_size * 4
size += req_size
sum = channel.read()
print('sum=', sum)
iochannel.write(sum)
while True:
main()
| ramsize = 128
iochannel = coram_io_channel(idx=0, datawidth=32)
ram = coram_memory(idx=0, datawidth=32, size=RAMSIZE, length=1, scattergather=False)
channel = coram_channel(idx=0, datawidth=32, size=16)
def main():
sum = 0
addr = iochannel.read()
read_size = iochannel.read()
size = 0
while size < read_size:
req_size = RAMSIZE if size + RAMSIZE <= read_size else read_size - size
ram.write(0, addr, req_size)
channel.write(addr)
addr += req_size * 4
size += req_size
sum = channel.read()
print('sum=', sum)
iochannel.write(sum)
while True:
main() |
class Animal(object):
def run(self):
print(self.__class__.__name__, ' is running...')
class Dog(Animal):
pass
class Cat(Animal):
pass
dog = Dog()
dog.run()
cat = Cat()
cat.run()
print(isinstance(dog, Dog))
print(isinstance(dog, Animal))
print(isinstance(dog, Cat))
class Plant:
def run(self):
print('Start...')
t = Plant()
print(isinstance(t,Animal))
print("type dog", type(dog))
print("type cat", type(cat))
print("type cat", type(t))
print("dir dog", dir(dog))
| class Animal(object):
def run(self):
print(self.__class__.__name__, ' is running...')
class Dog(Animal):
pass
class Cat(Animal):
pass
dog = dog()
dog.run()
cat = cat()
cat.run()
print(isinstance(dog, Dog))
print(isinstance(dog, Animal))
print(isinstance(dog, Cat))
class Plant:
def run(self):
print('Start...')
t = plant()
print(isinstance(t, Animal))
print('type dog', type(dog))
print('type cat', type(cat))
print('type cat', type(t))
print('dir dog', dir(dog)) |
text = "Order: pizza, fries, milkshake"
encoded = text.replace("pizza", "1").replace("fries", "2").replace("milkshake", "3")
print(encoded)
# Order: 1, 2, 3
codes = {"pizza": "1", "fries": "2", "milkshake": "3"}
text = "Order: pizza, fries, milkshake"
encoded = text
for value, code in codes.items():
encoded = encoded.replace(value, code)
print(encoded)
# Order: 1, 2, 3 | text = 'Order: pizza, fries, milkshake'
encoded = text.replace('pizza', '1').replace('fries', '2').replace('milkshake', '3')
print(encoded)
codes = {'pizza': '1', 'fries': '2', 'milkshake': '3'}
text = 'Order: pizza, fries, milkshake'
encoded = text
for (value, code) in codes.items():
encoded = encoded.replace(value, code)
print(encoded) |
def scan_dependencies(project, env, files):
if 'USE_DEP_SCANNER' not in env.toolchain_options:
with open(f'{project.build_dir}/skipped_files.txt', 'w') as out:
out.write('none')
return files
deps = {f: [] for f in files}
def strip_name(name):
return name.split('/')[-1][:-2]
names = {strip_name(f): f for f in files}
for f in files:
with open(f) as file:
for line in file.readlines():
if line.startswith('#include "'):
name = strip_name(line[len('#include "'): -2])
deps[f].append(name)
checked = []
def walk_dep_tree(file):
if file in checked:
return []
checked.append(file)
used = [strip_name(file)]
for dep in deps[file]:
used.append(dep)
if dep != strip_name(file) and dep in names:
used.extend(walk_dep_tree(names[dep]))
return used
used_files = walk_dep_tree('src/main.c')
for f in env.force_include:
used_files.append(strip_name(f))
# fix special cases
if 'uart' in used_files:
used_files.append('uart1')
used_files.append('uart2')
used_files.append('uart3')
used_files.append('uart4')
used_files.append('uart5')
if 'hash' in used_files:
used_files.append('hash_function')
for f in files:
if strip_name(f).startswith('sh_'):
used_files.append(strip_name(f))
# swap back to full file names
result = [names[f] for f in set(used_files) if f in names]
# write the results to file
with open(f'{project.build_dir}/skipped_files.txt', 'w') as out:
out.write('\n'.join([f for f in files if f not in result]))
return result
| def scan_dependencies(project, env, files):
if 'USE_DEP_SCANNER' not in env.toolchain_options:
with open(f'{project.build_dir}/skipped_files.txt', 'w') as out:
out.write('none')
return files
deps = {f: [] for f in files}
def strip_name(name):
return name.split('/')[-1][:-2]
names = {strip_name(f): f for f in files}
for f in files:
with open(f) as file:
for line in file.readlines():
if line.startswith('#include "'):
name = strip_name(line[len('#include "'):-2])
deps[f].append(name)
checked = []
def walk_dep_tree(file):
if file in checked:
return []
checked.append(file)
used = [strip_name(file)]
for dep in deps[file]:
used.append(dep)
if dep != strip_name(file) and dep in names:
used.extend(walk_dep_tree(names[dep]))
return used
used_files = walk_dep_tree('src/main.c')
for f in env.force_include:
used_files.append(strip_name(f))
if 'uart' in used_files:
used_files.append('uart1')
used_files.append('uart2')
used_files.append('uart3')
used_files.append('uart4')
used_files.append('uart5')
if 'hash' in used_files:
used_files.append('hash_function')
for f in files:
if strip_name(f).startswith('sh_'):
used_files.append(strip_name(f))
result = [names[f] for f in set(used_files) if f in names]
with open(f'{project.build_dir}/skipped_files.txt', 'w') as out:
out.write('\n'.join([f for f in files if f not in result]))
return result |
# -*- coding: utf-8 -*-
description = "Denex common detector setup"
group = "lowlevel"
includes = ["counter", "shutter", "detector_sinks"]
tango_base = "tango://phys.maria.frm2:10000/maria/"
devices = dict(
full = device("nicos.devices.generic.RateChannel",
description = "Full detector cts and rate",
),
roi1 = device("nicos.devices.generic.RateRectROIChannel",
description = "ROI 1",
roi = (480, 200, 64, 624),
),
roi2 = device("nicos.devices.generic.RateRectROIChannel",
description = "ROI 2",
roi = (500, 350, 24, 344),
),
roi3 = device("nicos.devices.generic.RateRectROIChannel",
description = "ROI 3",
roi = (570, 300, 80, 424),
),
roi4 = device("nicos.devices.generic.RateRectROIChannel",
description = "ROI 4",
roi = (570, 200, 80, 624),
),
roi5 = device("nicos.devices.generic.RateRectROIChannel",
description = "ROI 5",
roi = (502, 497, 20, 30),
),
roi6 = device("nicos.devices.generic.RateRectROIChannel",
description = "ROI 6",
roi = (508, 300, 8, 420),
),
HV_anode = device("nicos.devices.tango.Actuator",
description = "Anode voltage (2800V)",
tangodevice = tango_base + "iseg/ch_a",
fmtstr = "%d",
precision = 4,
warnlimits = (2795, 2805),
),
HV_drift = device("nicos.devices.tango.Actuator",
description = "Drift voltage (-1000V)",
tangodevice = tango_base + "iseg/ch_b",
fmtstr = "%d",
precision = 2,
warnlimits = (-1005, -995),
),
)
| description = 'Denex common detector setup'
group = 'lowlevel'
includes = ['counter', 'shutter', 'detector_sinks']
tango_base = 'tango://phys.maria.frm2:10000/maria/'
devices = dict(full=device('nicos.devices.generic.RateChannel', description='Full detector cts and rate'), roi1=device('nicos.devices.generic.RateRectROIChannel', description='ROI 1', roi=(480, 200, 64, 624)), roi2=device('nicos.devices.generic.RateRectROIChannel', description='ROI 2', roi=(500, 350, 24, 344)), roi3=device('nicos.devices.generic.RateRectROIChannel', description='ROI 3', roi=(570, 300, 80, 424)), roi4=device('nicos.devices.generic.RateRectROIChannel', description='ROI 4', roi=(570, 200, 80, 624)), roi5=device('nicos.devices.generic.RateRectROIChannel', description='ROI 5', roi=(502, 497, 20, 30)), roi6=device('nicos.devices.generic.RateRectROIChannel', description='ROI 6', roi=(508, 300, 8, 420)), HV_anode=device('nicos.devices.tango.Actuator', description='Anode voltage (2800V)', tangodevice=tango_base + 'iseg/ch_a', fmtstr='%d', precision=4, warnlimits=(2795, 2805)), HV_drift=device('nicos.devices.tango.Actuator', description='Drift voltage (-1000V)', tangodevice=tango_base + 'iseg/ch_b', fmtstr='%d', precision=2, warnlimits=(-1005, -995))) |
# NAME AGE FUNCTION:
def str_spaces(fstring,sstring):
print(fstring + ' ' + sstring)
mstring = input()
nstring = input()
str_spaces(mstring,nstring)
def nage(string,string2):
print(string,end=' ')
print(string2,end='')
nstr = input()
astr = input()
nage(nstr,astr)
#REVERSE STRING 39:
def revstr(fstring):
string =''
for i in fstring:
string = i + string
print(string)
mstring = input()
revstr(mstring)
def revstr(fstring):
string =''
for i in range(1,len(fstring)+1):
string = string + fstring[len(fstring)-i]
print(string)
mstring = input()
revstr(mstring)
# SQUARE RECTANGLE:
def squrec(length,breadth):
if length == breadth:
print('Yes')
else:
print('No')
lrec = int(input())
brec = int(input())
squrec(lrec,brec)
#VBIT EMPLOYEE
def bonus(sal,year):
if year > 5:
sal = int(sal*(5/100))
print(f'Bonus is {sal}')
else:
print("No Bonus")
salary = int(input())
syears = int(input())
bonus(salary,syears)
#MULTIPLICATION TABLE
def multiples(multi):
n = 1
while n<=10:
print(multi*n)
n = n+1
mul = int(input())
multiples(mul)
| def str_spaces(fstring, sstring):
print(fstring + ' ' + sstring)
mstring = input()
nstring = input()
str_spaces(mstring, nstring)
def nage(string, string2):
print(string, end=' ')
print(string2, end='')
nstr = input()
astr = input()
nage(nstr, astr)
def revstr(fstring):
string = ''
for i in fstring:
string = i + string
print(string)
mstring = input()
revstr(mstring)
def revstr(fstring):
string = ''
for i in range(1, len(fstring) + 1):
string = string + fstring[len(fstring) - i]
print(string)
mstring = input()
revstr(mstring)
def squrec(length, breadth):
if length == breadth:
print('Yes')
else:
print('No')
lrec = int(input())
brec = int(input())
squrec(lrec, brec)
def bonus(sal, year):
if year > 5:
sal = int(sal * (5 / 100))
print(f'Bonus is {sal}')
else:
print('No Bonus')
salary = int(input())
syears = int(input())
bonus(salary, syears)
def multiples(multi):
n = 1
while n <= 10:
print(multi * n)
n = n + 1
mul = int(input())
multiples(mul) |
class GenericObj:
def __init__(self, obj):
self.type = obj['type']
self.id = obj['id']
self.uri = obj['uri']
self.tracks = obj['tracks']
class GenericAlbumObj:
def __init__(self, album):
self.id = album['id']
self.uri = album['uri']
self.name = album['name']
self.release_date = album['release_date']
class GenericArtistsObj:
def __init__(self, artists):
self.data = []
for artist in artists:
temp = {'id': artist['id'], 'uri': artist['uri'], 'name': artist['name']}
self.data.append(temp)
class GenericTrackObj:
def __init__(self, track):
self.type = track['type']
self.id = track['id']
self.uri = track['uri']
self.name = track['name']
self.duration_ms = track['duration_ms']
self.artists = GenericArtistsObj(track['artists']).data
self.album = GenericAlbumObj(track['album']).__dict__
self.full_name = ', '.join(
[str(elem['name']) for elem in track['artists']]) + f" - {track['name']}"
self.duration = int(track['duration_ms'] / 1000)
self.is_remix = 'remix' in track['name'].lower()
self.is_instrumental = 'instrumental' in track['name'].lower()
self.is_live = 'live' in track['name'].lower()
self.is_official = not self.is_remix and not self.is_instrumental
| class Genericobj:
def __init__(self, obj):
self.type = obj['type']
self.id = obj['id']
self.uri = obj['uri']
self.tracks = obj['tracks']
class Genericalbumobj:
def __init__(self, album):
self.id = album['id']
self.uri = album['uri']
self.name = album['name']
self.release_date = album['release_date']
class Genericartistsobj:
def __init__(self, artists):
self.data = []
for artist in artists:
temp = {'id': artist['id'], 'uri': artist['uri'], 'name': artist['name']}
self.data.append(temp)
class Generictrackobj:
def __init__(self, track):
self.type = track['type']
self.id = track['id']
self.uri = track['uri']
self.name = track['name']
self.duration_ms = track['duration_ms']
self.artists = generic_artists_obj(track['artists']).data
self.album = generic_album_obj(track['album']).__dict__
self.full_name = ', '.join([str(elem['name']) for elem in track['artists']]) + f" - {track['name']}"
self.duration = int(track['duration_ms'] / 1000)
self.is_remix = 'remix' in track['name'].lower()
self.is_instrumental = 'instrumental' in track['name'].lower()
self.is_live = 'live' in track['name'].lower()
self.is_official = not self.is_remix and (not self.is_instrumental) |
#: E201:5
spam( ham[1], {eggs: 2})
#: E201:9
spam(ham[ 1], {eggs: 2})
#: E201:14
spam(ham[1], { eggs: 2})
# Okay
spam(ham[1], {eggs: 2})
#: E202:22
spam(ham[1], {eggs: 2} )
#: E202:21
spam(ham[1], {eggs: 2 })
#: E202:10
spam(ham[1 ], {eggs: 2})
# Okay
spam(ham[1], {eggs: 2})
result = func(
arg1='some value',
arg2='another value',
)
result = func(
arg1='some value',
arg2='another value'
)
result = [
item for item in items
if item > 5
]
#: E203:9
if x == 4 :
foo(x, y)
x, y = y, x
if x == 4:
#: E203:12 E702:13
a = x, y ; x, y = y, x
if x == 4:
foo(x, y)
#: E203:12
x, y = y , x
# Okay
if x == 4:
foo(x, y)
x, y = y, x
a[b1, :1] == 3
b = a[:, b1]
| spam(ham[1], {eggs: 2})
spam(ham[1], {eggs: 2})
spam(ham[1], {eggs: 2})
spam(ham[1], {eggs: 2})
spam(ham[1], {eggs: 2})
spam(ham[1], {eggs: 2})
spam(ham[1], {eggs: 2})
spam(ham[1], {eggs: 2})
result = func(arg1='some value', arg2='another value')
result = func(arg1='some value', arg2='another value')
result = [item for item in items if item > 5]
if x == 4:
foo(x, y)
(x, y) = (y, x)
if x == 4:
a = (x, y)
(x, y) = (y, x)
if x == 4:
foo(x, y)
(x, y) = (y, x)
if x == 4:
foo(x, y)
(x, y) = (y, x)
a[b1, :1] == 3
b = a[:, b1] |
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, x):
# self.val = x
# self.next = None
class Solution:
def reverseKGroup(self, head: ListNode, k: int) -> ListNode:
dummyhead = ListNode(None)
dummyhead.next = head
start, end = head, dummyhead
flag = True
while True:
count = k
while count and end:
end = end.next
count -= 1
if end is None:
break
if flag:
dummyhead.next = end
flag = False
else:
head.next = end
head = start
end = end.next
prev = end
curr = start
while curr != end:
temp = curr.next
curr.next = prev
prev = curr
curr = temp
start = head.next
end = head
return dummyhead.next | class Solution:
def reverse_k_group(self, head: ListNode, k: int) -> ListNode:
dummyhead = list_node(None)
dummyhead.next = head
(start, end) = (head, dummyhead)
flag = True
while True:
count = k
while count and end:
end = end.next
count -= 1
if end is None:
break
if flag:
dummyhead.next = end
flag = False
else:
head.next = end
head = start
end = end.next
prev = end
curr = start
while curr != end:
temp = curr.next
curr.next = prev
prev = curr
curr = temp
start = head.next
end = head
return dummyhead.next |
# OpenWeatherMap API Key
weather_api_key = "164b9f7c3b721e89f1f4f14974c7b483"
# Google API Key
g_key = "AIzaSyAayBobFwssdE52dGXGCHY1_vddvDVUX34"
| weather_api_key = '164b9f7c3b721e89f1f4f14974c7b483'
g_key = 'AIzaSyAayBobFwssdE52dGXGCHY1_vddvDVUX34' |
def duplicate_encode(word):
#your code here
b=[]
word = word.lower()
for char in word:
if word.count(char) == 1:
b.append('(')
else:
b.append(')')
result = "".join(b)
return result
| def duplicate_encode(word):
b = []
word = word.lower()
for char in word:
if word.count(char) == 1:
b.append('(')
else:
b.append(')')
result = ''.join(b)
return result |
#!/usr/bin/env python
#
# description: First Unique Character in a String
# difficulty: Easy
# leetcode_num: 387
# leetcode_url: https://leetcode.com/problems/first-unique-character-in-a-string/
#
# Given a string s, return the first non-repeating character in it and return
# its index. If it does not exist, return -1.
#
# Example 1:
# Input: s = "leetcode"
# Output: 0
#
# Example 2:
# Input: s = "loveleetcode"
# Output: 2
#
# Example 3:
# Input: s = "aabb"
# Output: -1
#
# Constraints:
#
# 1 <= s.length <= 105
# s consists of only lowercase English letters.
# Uses array
def FirstUniqueChar(text):
char_ctr = [0] * 26
for c in text:
idx = ord(c) - ord('a')
char_ctr[idx] += 1
for i, c in enumerate(list(text)):
idx = ord(c) - ord('a')
if char_ctr[idx] == 1:
return i
return -1
# Uses dictionary
def FirstUniqueCharDict(text):
char_ctr = {}
for c in text:
char_ctr.setdefault(c, 0)
char_ctr[c] += 1
for i, c in enumerate(list(text)):
if char_ctr[c] == 1:
return i
return -1
if __name__ == '__main__':
test_cases = [
('leetcode', 0),
('loveleetcode', 2),
('aabb', -1)
]
for text, res in test_cases:
assert FirstUniqueChar(text) == res, 'Test Failed'
assert FirstUniqueCharDict(text) == res, 'Test Failed'
| def first_unique_char(text):
char_ctr = [0] * 26
for c in text:
idx = ord(c) - ord('a')
char_ctr[idx] += 1
for (i, c) in enumerate(list(text)):
idx = ord(c) - ord('a')
if char_ctr[idx] == 1:
return i
return -1
def first_unique_char_dict(text):
char_ctr = {}
for c in text:
char_ctr.setdefault(c, 0)
char_ctr[c] += 1
for (i, c) in enumerate(list(text)):
if char_ctr[c] == 1:
return i
return -1
if __name__ == '__main__':
test_cases = [('leetcode', 0), ('loveleetcode', 2), ('aabb', -1)]
for (text, res) in test_cases:
assert first_unique_char(text) == res, 'Test Failed'
assert first_unique_char_dict(text) == res, 'Test Failed' |
def handler(context, inputs):
greeting = "Hello, {0}!".format(inputs["target"])
print(greeting)
outputs = {
"greeting": greeting
}
return outputs
| def handler(context, inputs):
greeting = 'Hello, {0}!'.format(inputs['target'])
print(greeting)
outputs = {'greeting': greeting}
return outputs |
#
# PySNMP MIB module WWP-LEOS-8021X-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/WWP-LEOS-8021X-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 21:30:55 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
ObjectIdentifier, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueRangeConstraint, ConstraintsUnion, SingleValueConstraint, ValueSizeConstraint, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "ConstraintsUnion", "SingleValueConstraint", "ValueSizeConstraint", "ConstraintsIntersection")
ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup")
Bits, Unsigned32, Counter32, IpAddress, Integer32, MibIdentifier, ModuleIdentity, TimeTicks, iso, MibScalar, MibTable, MibTableRow, MibTableColumn, Gauge32, Counter64, ObjectIdentity, NotificationType = mibBuilder.importSymbols("SNMPv2-SMI", "Bits", "Unsigned32", "Counter32", "IpAddress", "Integer32", "MibIdentifier", "ModuleIdentity", "TimeTicks", "iso", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Gauge32", "Counter64", "ObjectIdentity", "NotificationType")
TruthValue, DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "TruthValue", "DisplayString", "TextualConvention")
wwpModulesLeos, = mibBuilder.importSymbols("WWP-SMI", "wwpModulesLeos")
wwpLeos8021xMibModule = ModuleIdentity((1, 3, 6, 1, 4, 1, 6141, 2, 60, 401))
wwpLeos8021xMibModule.setRevisions(('2005-08-28 19:35',))
if mibBuilder.loadTexts: wwpLeos8021xMibModule.setLastUpdated('200508281935Z')
if mibBuilder.loadTexts: wwpLeos8021xMibModule.setOrganization('Ciena, Inc')
wwpLeos8021xMIB = MibIdentifier((1, 3, 6, 1, 4, 1, 6141, 2, 60, 401, 1))
wwpLeos8021xConf = MibIdentifier((1, 3, 6, 1, 4, 1, 6141, 2, 60, 401, 1, 1))
wwpLeos8021xGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 6141, 2, 60, 401, 1, 1, 1))
wwpLeos8021xCompls = MibIdentifier((1, 3, 6, 1, 4, 1, 6141, 2, 60, 401, 1, 1, 2))
wwpLeos8021xObjs = MibIdentifier((1, 3, 6, 1, 4, 1, 6141, 2, 60, 401, 1, 2))
wwpLeos8021xPortTable = MibTable((1, 3, 6, 1, 4, 1, 6141, 2, 60, 401, 1, 2, 1), )
if mibBuilder.loadTexts: wwpLeos8021xPortTable.setStatus('current')
wwpLeos8021xPortEntry = MibTableRow((1, 3, 6, 1, 4, 1, 6141, 2, 60, 401, 1, 2, 1, 1), ).setIndexNames((0, "WWP-LEOS-8021X-MIB", "wwpLeos8021xPort"))
if mibBuilder.loadTexts: wwpLeos8021xPortEntry.setStatus('current')
wwpLeos8021xPort = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 401, 1, 2, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 1000))).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeos8021xPort.setStatus('current')
wwpLeos8021xRole = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 401, 1, 2, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("none", 1), ("supplicant", 2), ("authenticator", 3), ("both", 4)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wwpLeos8021xRole.setStatus('current')
wwpLeos8021xAuthPortStatsClear = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 401, 1, 2, 1, 1, 3), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wwpLeos8021xAuthPortStatsClear.setStatus('current')
wwpLeos8021xEvents = MibIdentifier((1, 3, 6, 1, 4, 1, 6141, 2, 60, 401, 1, 3))
wwpLeos8021xEventsV2 = MibIdentifier((1, 3, 6, 1, 4, 1, 6141, 2, 60, 401, 1, 3, 0))
wwpLeos8021xSuppTable = MibTable((1, 3, 6, 1, 4, 1, 6141, 2, 60, 401, 1, 2, 2), )
if mibBuilder.loadTexts: wwpLeos8021xSuppTable.setStatus('current')
wwpLeos8021xSuppEntry = MibTableRow((1, 3, 6, 1, 4, 1, 6141, 2, 60, 401, 1, 2, 2, 1), ).setIndexNames((0, "WWP-LEOS-8021X-MIB", "wwpLeos8021xSuppPort"))
if mibBuilder.loadTexts: wwpLeos8021xSuppEntry.setStatus('current')
wwpLeos8021xSuppPort = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 401, 1, 2, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 1000))).setMaxAccess("readonly")
if mibBuilder.loadTexts: wwpLeos8021xSuppPort.setStatus('current')
wwpLeos8021xSuppUserName = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 401, 1, 2, 2, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 15))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wwpLeos8021xSuppUserName.setStatus('current')
wwpLeos8021xSuppPassword = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 401, 1, 2, 2, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 15))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wwpLeos8021xSuppPassword.setStatus('current')
wwpLeos8021xSuppPortStatsClear = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 401, 1, 2, 2, 1, 5), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wwpLeos8021xSuppPortStatsClear.setStatus('current')
wwpLeos8021xSuppEAPMethod = MibTableColumn((1, 3, 6, 1, 4, 1, 6141, 2, 60, 401, 1, 2, 2, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1))).clone(namedValues=NamedValues(("eapMd5", 1)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wwpLeos8021xSuppEAPMethod.setStatus('current')
wwpLeos8021xGlobalAttrs = MibIdentifier((1, 3, 6, 1, 4, 1, 6141, 2, 60, 401, 1, 2, 3))
wwpLeos8021xAuthStatsClear = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 401, 1, 2, 3, 1), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wwpLeos8021xAuthStatsClear.setStatus('current')
wwpLeos8021xSuppStatsClear = MibScalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 401, 1, 2, 3, 2), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: wwpLeos8021xSuppStatsClear.setStatus('current')
mibBuilder.exportSymbols("WWP-LEOS-8021X-MIB", PYSNMP_MODULE_ID=wwpLeos8021xMibModule, wwpLeos8021xSuppTable=wwpLeos8021xSuppTable, wwpLeos8021xEvents=wwpLeos8021xEvents, wwpLeos8021xSuppEAPMethod=wwpLeos8021xSuppEAPMethod, wwpLeos8021xPort=wwpLeos8021xPort, wwpLeos8021xAuthPortStatsClear=wwpLeos8021xAuthPortStatsClear, wwpLeos8021xGlobalAttrs=wwpLeos8021xGlobalAttrs, wwpLeos8021xMibModule=wwpLeos8021xMibModule, wwpLeos8021xMIB=wwpLeos8021xMIB, wwpLeos8021xGroups=wwpLeos8021xGroups, wwpLeos8021xCompls=wwpLeos8021xCompls, wwpLeos8021xSuppPassword=wwpLeos8021xSuppPassword, wwpLeos8021xSuppEntry=wwpLeos8021xSuppEntry, wwpLeos8021xPortEntry=wwpLeos8021xPortEntry, wwpLeos8021xSuppPort=wwpLeos8021xSuppPort, wwpLeos8021xPortTable=wwpLeos8021xPortTable, wwpLeos8021xAuthStatsClear=wwpLeos8021xAuthStatsClear, wwpLeos8021xObjs=wwpLeos8021xObjs, wwpLeos8021xSuppPortStatsClear=wwpLeos8021xSuppPortStatsClear, wwpLeos8021xSuppUserName=wwpLeos8021xSuppUserName, wwpLeos8021xRole=wwpLeos8021xRole, wwpLeos8021xSuppStatsClear=wwpLeos8021xSuppStatsClear, wwpLeos8021xConf=wwpLeos8021xConf, wwpLeos8021xEventsV2=wwpLeos8021xEventsV2)
| (object_identifier, octet_string, integer) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'OctetString', 'Integer')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(value_range_constraint, constraints_union, single_value_constraint, value_size_constraint, constraints_intersection) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueRangeConstraint', 'ConstraintsUnion', 'SingleValueConstraint', 'ValueSizeConstraint', 'ConstraintsIntersection')
(module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup')
(bits, unsigned32, counter32, ip_address, integer32, mib_identifier, module_identity, time_ticks, iso, mib_scalar, mib_table, mib_table_row, mib_table_column, gauge32, counter64, object_identity, notification_type) = mibBuilder.importSymbols('SNMPv2-SMI', 'Bits', 'Unsigned32', 'Counter32', 'IpAddress', 'Integer32', 'MibIdentifier', 'ModuleIdentity', 'TimeTicks', 'iso', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Gauge32', 'Counter64', 'ObjectIdentity', 'NotificationType')
(truth_value, display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'TruthValue', 'DisplayString', 'TextualConvention')
(wwp_modules_leos,) = mibBuilder.importSymbols('WWP-SMI', 'wwpModulesLeos')
wwp_leos8021x_mib_module = module_identity((1, 3, 6, 1, 4, 1, 6141, 2, 60, 401))
wwpLeos8021xMibModule.setRevisions(('2005-08-28 19:35',))
if mibBuilder.loadTexts:
wwpLeos8021xMibModule.setLastUpdated('200508281935Z')
if mibBuilder.loadTexts:
wwpLeos8021xMibModule.setOrganization('Ciena, Inc')
wwp_leos8021x_mib = mib_identifier((1, 3, 6, 1, 4, 1, 6141, 2, 60, 401, 1))
wwp_leos8021x_conf = mib_identifier((1, 3, 6, 1, 4, 1, 6141, 2, 60, 401, 1, 1))
wwp_leos8021x_groups = mib_identifier((1, 3, 6, 1, 4, 1, 6141, 2, 60, 401, 1, 1, 1))
wwp_leos8021x_compls = mib_identifier((1, 3, 6, 1, 4, 1, 6141, 2, 60, 401, 1, 1, 2))
wwp_leos8021x_objs = mib_identifier((1, 3, 6, 1, 4, 1, 6141, 2, 60, 401, 1, 2))
wwp_leos8021x_port_table = mib_table((1, 3, 6, 1, 4, 1, 6141, 2, 60, 401, 1, 2, 1))
if mibBuilder.loadTexts:
wwpLeos8021xPortTable.setStatus('current')
wwp_leos8021x_port_entry = mib_table_row((1, 3, 6, 1, 4, 1, 6141, 2, 60, 401, 1, 2, 1, 1)).setIndexNames((0, 'WWP-LEOS-8021X-MIB', 'wwpLeos8021xPort'))
if mibBuilder.loadTexts:
wwpLeos8021xPortEntry.setStatus('current')
wwp_leos8021x_port = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 401, 1, 2, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 1000))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wwpLeos8021xPort.setStatus('current')
wwp_leos8021x_role = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 401, 1, 2, 1, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('none', 1), ('supplicant', 2), ('authenticator', 3), ('both', 4)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wwpLeos8021xRole.setStatus('current')
wwp_leos8021x_auth_port_stats_clear = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 401, 1, 2, 1, 1, 3), truth_value()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wwpLeos8021xAuthPortStatsClear.setStatus('current')
wwp_leos8021x_events = mib_identifier((1, 3, 6, 1, 4, 1, 6141, 2, 60, 401, 1, 3))
wwp_leos8021x_events_v2 = mib_identifier((1, 3, 6, 1, 4, 1, 6141, 2, 60, 401, 1, 3, 0))
wwp_leos8021x_supp_table = mib_table((1, 3, 6, 1, 4, 1, 6141, 2, 60, 401, 1, 2, 2))
if mibBuilder.loadTexts:
wwpLeos8021xSuppTable.setStatus('current')
wwp_leos8021x_supp_entry = mib_table_row((1, 3, 6, 1, 4, 1, 6141, 2, 60, 401, 1, 2, 2, 1)).setIndexNames((0, 'WWP-LEOS-8021X-MIB', 'wwpLeos8021xSuppPort'))
if mibBuilder.loadTexts:
wwpLeos8021xSuppEntry.setStatus('current')
wwp_leos8021x_supp_port = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 401, 1, 2, 2, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 1000))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
wwpLeos8021xSuppPort.setStatus('current')
wwp_leos8021x_supp_user_name = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 401, 1, 2, 2, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(0, 15))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wwpLeos8021xSuppUserName.setStatus('current')
wwp_leos8021x_supp_password = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 401, 1, 2, 2, 1, 3), display_string().subtype(subtypeSpec=value_size_constraint(0, 15))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wwpLeos8021xSuppPassword.setStatus('current')
wwp_leos8021x_supp_port_stats_clear = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 401, 1, 2, 2, 1, 5), truth_value()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wwpLeos8021xSuppPortStatsClear.setStatus('current')
wwp_leos8021x_supp_eap_method = mib_table_column((1, 3, 6, 1, 4, 1, 6141, 2, 60, 401, 1, 2, 2, 1, 10), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1))).clone(namedValues=named_values(('eapMd5', 1)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wwpLeos8021xSuppEAPMethod.setStatus('current')
wwp_leos8021x_global_attrs = mib_identifier((1, 3, 6, 1, 4, 1, 6141, 2, 60, 401, 1, 2, 3))
wwp_leos8021x_auth_stats_clear = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 401, 1, 2, 3, 1), truth_value()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wwpLeos8021xAuthStatsClear.setStatus('current')
wwp_leos8021x_supp_stats_clear = mib_scalar((1, 3, 6, 1, 4, 1, 6141, 2, 60, 401, 1, 2, 3, 2), truth_value()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
wwpLeos8021xSuppStatsClear.setStatus('current')
mibBuilder.exportSymbols('WWP-LEOS-8021X-MIB', PYSNMP_MODULE_ID=wwpLeos8021xMibModule, wwpLeos8021xSuppTable=wwpLeos8021xSuppTable, wwpLeos8021xEvents=wwpLeos8021xEvents, wwpLeos8021xSuppEAPMethod=wwpLeos8021xSuppEAPMethod, wwpLeos8021xPort=wwpLeos8021xPort, wwpLeos8021xAuthPortStatsClear=wwpLeos8021xAuthPortStatsClear, wwpLeos8021xGlobalAttrs=wwpLeos8021xGlobalAttrs, wwpLeos8021xMibModule=wwpLeos8021xMibModule, wwpLeos8021xMIB=wwpLeos8021xMIB, wwpLeos8021xGroups=wwpLeos8021xGroups, wwpLeos8021xCompls=wwpLeos8021xCompls, wwpLeos8021xSuppPassword=wwpLeos8021xSuppPassword, wwpLeos8021xSuppEntry=wwpLeos8021xSuppEntry, wwpLeos8021xPortEntry=wwpLeos8021xPortEntry, wwpLeos8021xSuppPort=wwpLeos8021xSuppPort, wwpLeos8021xPortTable=wwpLeos8021xPortTable, wwpLeos8021xAuthStatsClear=wwpLeos8021xAuthStatsClear, wwpLeos8021xObjs=wwpLeos8021xObjs, wwpLeos8021xSuppPortStatsClear=wwpLeos8021xSuppPortStatsClear, wwpLeos8021xSuppUserName=wwpLeos8021xSuppUserName, wwpLeos8021xRole=wwpLeos8021xRole, wwpLeos8021xSuppStatsClear=wwpLeos8021xSuppStatsClear, wwpLeos8021xConf=wwpLeos8021xConf, wwpLeos8021xEventsV2=wwpLeos8021xEventsV2) |
def regEX(ref, char_comp):
test_passed = True
for i in ref:
if i == char_comp:
test_passed = False
return test_passed
| def reg_ex(ref, char_comp):
test_passed = True
for i in ref:
if i == char_comp:
test_passed = False
return test_passed |
def sod(n):
ans = 0
while n:
rem = n%10
ans += rem
n = n // 10
return ans
t = int(input())
while t:
n = int(input())
a_score = 0
b_score = 0
while n:
a,b = map(int, input().split())
a_sum = sod(a)
b_sum = sod(b)
# print(a_sum,b_sum)
if a_sum > b_sum:
a_score += 1
elif a_sum == b_sum:
a_score += 1
b_score += 1
else:
b_score += 1
n = n - 1
if a_score > b_score:
print(0,a_score)
elif a_score == b_score:
print(2, a_score)
else:
print(1, b_score)
t -= 1 | def sod(n):
ans = 0
while n:
rem = n % 10
ans += rem
n = n // 10
return ans
t = int(input())
while t:
n = int(input())
a_score = 0
b_score = 0
while n:
(a, b) = map(int, input().split())
a_sum = sod(a)
b_sum = sod(b)
if a_sum > b_sum:
a_score += 1
elif a_sum == b_sum:
a_score += 1
b_score += 1
else:
b_score += 1
n = n - 1
if a_score > b_score:
print(0, a_score)
elif a_score == b_score:
print(2, a_score)
else:
print(1, b_score)
t -= 1 |
class MeterInfo(object):
def __init__(self, address: int
, dbid: int, devStr: str
, mBrand: str, mModel: str):
# - - - - - - - - - -
self.modbusAddress: int = address
self.meterDBID: int = dbid
self.deviceSystemString: str = devStr
self.meterBrand: str = mBrand
self.meterModel: str = mModel
| class Meterinfo(object):
def __init__(self, address: int, dbid: int, devStr: str, mBrand: str, mModel: str):
self.modbusAddress: int = address
self.meterDBID: int = dbid
self.deviceSystemString: str = devStr
self.meterBrand: str = mBrand
self.meterModel: str = mModel |
class Solution:
def chalkReplacer(self, chalk: List[int], k: int) -> int:
gg = sum(chalk)
k = k%gg
for i,n in enumerate(chalk):
if n>k:
return i
k-=n
return len(chalk)-1 | class Solution:
def chalk_replacer(self, chalk: List[int], k: int) -> int:
gg = sum(chalk)
k = k % gg
for (i, n) in enumerate(chalk):
if n > k:
return i
k -= n
return len(chalk) - 1 |
#-------------------------------------------------------------------------------
# Name: module1
# Purpose:
#
# Author: mo-mo-
#
# Created: 23/09/2018
# Copyright: (c) mo-mo- 2018
# Licence: <your licence>
#-------------------------------------------------------------------------------
a = list(map(int, input().split()))
a.sort()
ans = a[2]*10 + a[1] + a[0]
print(ans)
| a = list(map(int, input().split()))
a.sort()
ans = a[2] * 10 + a[1] + a[0]
print(ans) |
# Write simple .camelCase method (camel_case function in PHP, CamelCase in C# or camelCase in Java) for strings. All
# words must have their first letter capitalized without spaces.
#
# For instance:
#
# camelcase("hello case") => HelloCase
# camelcase("camel case word") => CamelCaseWord
# Don't forget to rate this kata! Thanks :)
def camel_case(string):
output_string = ''
first_letter = True
for x in string:
if x != ' ':
if first_letter:
output_string += x.upper()
first_letter = False
else:
output_string += x.lower()
else:
first_letter = True
return output_string
| def camel_case(string):
output_string = ''
first_letter = True
for x in string:
if x != ' ':
if first_letter:
output_string += x.upper()
first_letter = False
else:
output_string += x.lower()
else:
first_letter = True
return output_string |
load("@io_bazel_rules_dotnet//dotnet/private:rules/nuget.bzl", "nuget_package")
def dotnet_repositories_xunit():
### Generated by the tool
nuget_package(
name = "xunit.runner.console",
package = "xunit.runner.console",
version = "2.4.1",
sha256 = "23f0b49edbfe5be8f8554e7f4317a390949bb96bdb2f8309ebe27c6855fad38f",
core_lib = {
"netcoreapp2.0": "tools/netcoreapp2.0/xunit.abstractions.dll",
"netcoreapp2.1": "tools/netcoreapp2.0/xunit.abstractions.dll",
},
net_lib = {
"net452": "tools/net452/xunit.abstractions.dll",
"net46": "tools/net46/xunit.abstractions.dll",
"net461": "tools/net461/xunit.abstractions.dll",
"net462": "tools/net462/xunit.abstractions.dll",
"net47": "tools/net47/xunit.abstractions.dll",
"net471": "tools/net471/xunit.abstractions.dll",
"net472": "tools/net472/xunit.abstractions.dll",
},
mono_lib = "tools/net472/xunit.abstractions.dll",
core_tool = {
"netcoreapp2.0": "tools/netcoreapp2.0/xunit.console.dll",
"netcoreapp2.1": "tools/netcoreapp2.0/xunit.console.dll",
},
net_tool = {
"net452": "tools/net452/xunit.console.exe",
"net46": "tools/net46/xunit.console.exe",
"net461": "tools/net461/xunit.console.exe",
"net462": "tools/net462/xunit.console.exe",
"net47": "tools/net47/xunit.console.exe",
"net471": "tools/net471/xunit.console.exe",
"net472": "tools/net472/xunit.console.exe",
},
mono_tool = "tools/net472/xunit.console.exe",
core_files = {
"netcoreapp2.0": [
"tools/netcoreapp2.0/xunit.abstractions.dll",
"tools/netcoreapp2.0/xunit.console.deps.json",
"tools/netcoreapp2.0/xunit.console.dll",
"tools/netcoreapp2.0/xunit.console.dll.config",
"tools/netcoreapp2.0/xunit.console.runtimeconfig.json",
"tools/netcoreapp2.0/xunit.runner.reporters.netcoreapp10.dll",
"tools/netcoreapp2.0/xunit.runner.utility.netcoreapp10.dll",
"tools/netcoreapp2.0/xunit.runner.utility.netcoreapp10.xml",
],
"netcoreapp2.1": [
"tools/netcoreapp2.0/xunit.abstractions.dll",
"tools/netcoreapp2.0/xunit.console.deps.json",
"tools/netcoreapp2.0/xunit.console.dll",
"tools/netcoreapp2.0/xunit.console.dll.config",
"tools/netcoreapp2.0/xunit.console.runtimeconfig.json",
"tools/netcoreapp2.0/xunit.runner.reporters.netcoreapp10.dll",
"tools/netcoreapp2.0/xunit.runner.utility.netcoreapp10.dll",
"tools/netcoreapp2.0/xunit.runner.utility.netcoreapp10.xml",
],
},
net_files = {
"net452": [
"tools/net452/xunit.abstractions.dll",
"tools/net452/xunit.console.exe",
"tools/net452/xunit.console.exe.config",
"tools/net452/xunit.console.x86.exe",
"tools/net452/xunit.console.x86.exe.config",
"tools/net452/xunit.runner.reporters.net452.dll",
"tools/net452/xunit.runner.utility.net452.dll",
],
"net46": [
"tools/net46/xunit.abstractions.dll",
"tools/net46/xunit.console.exe",
"tools/net46/xunit.console.exe.config",
"tools/net46/xunit.console.x86.exe",
"tools/net46/xunit.console.x86.exe.config",
"tools/net46/xunit.runner.reporters.net452.dll",
"tools/net46/xunit.runner.utility.net452.dll",
],
"net461": [
"tools/net461/xunit.abstractions.dll",
"tools/net461/xunit.console.exe",
"tools/net461/xunit.console.exe.config",
"tools/net461/xunit.console.x86.exe",
"tools/net461/xunit.console.x86.exe.config",
"tools/net461/xunit.runner.reporters.net452.dll",
"tools/net461/xunit.runner.utility.net452.dll",
],
"net462": [
"tools/net462/xunit.abstractions.dll",
"tools/net462/xunit.console.exe",
"tools/net462/xunit.console.exe.config",
"tools/net462/xunit.console.x86.exe",
"tools/net462/xunit.console.x86.exe.config",
"tools/net462/xunit.runner.reporters.net452.dll",
"tools/net462/xunit.runner.utility.net452.dll",
],
"net47": [
"tools/net47/xunit.abstractions.dll",
"tools/net47/xunit.console.exe",
"tools/net47/xunit.console.exe.config",
"tools/net47/xunit.console.x86.exe",
"tools/net47/xunit.console.x86.exe.config",
"tools/net47/xunit.runner.reporters.net452.dll",
"tools/net47/xunit.runner.utility.net452.dll",
],
"net471": [
"tools/net471/xunit.abstractions.dll",
"tools/net471/xunit.console.exe",
"tools/net471/xunit.console.exe.config",
"tools/net471/xunit.console.x86.exe",
"tools/net471/xunit.console.x86.exe.config",
"tools/net471/xunit.runner.reporters.net452.dll",
"tools/net471/xunit.runner.utility.net452.dll",
],
"net472": [
"tools/net472/xunit.abstractions.dll",
"tools/net472/xunit.console.exe",
"tools/net472/xunit.console.exe.config",
"tools/net472/xunit.console.x86.exe",
"tools/net472/xunit.console.x86.exe.config",
"tools/net472/xunit.runner.reporters.net452.dll",
"tools/net472/xunit.runner.utility.net452.dll",
],
},
mono_files = [
"tools/net472/xunit.abstractions.dll",
"tools/net472/xunit.console.exe",
"tools/net472/xunit.console.exe.config",
"tools/net472/xunit.console.x86.exe",
"tools/net472/xunit.console.x86.exe.config",
"tools/net472/xunit.runner.reporters.net452.dll",
"tools/net472/xunit.runner.utility.net452.dll",
],
)
nuget_package(
name = "xunit.assert",
package = "xunit.assert",
version = "2.4.1",
sha256 = "865d5c3126a4025c24a4511c87108d31dbd089ee8f309d6e16b87380e0b7bec6",
core_lib = {
"netcoreapp2.0": "lib/netstandard1.1/xunit.assert.dll",
"netcoreapp2.1": "lib/netstandard1.1/xunit.assert.dll",
},
net_lib = {
"net45": "lib/netstandard1.1/xunit.assert.dll",
"net451": "lib/netstandard1.1/xunit.assert.dll",
"net452": "lib/netstandard1.1/xunit.assert.dll",
"net46": "lib/netstandard1.1/xunit.assert.dll",
"net461": "lib/netstandard1.1/xunit.assert.dll",
"net462": "lib/netstandard1.1/xunit.assert.dll",
"net47": "lib/netstandard1.1/xunit.assert.dll",
"net471": "lib/netstandard1.1/xunit.assert.dll",
"net472": "lib/netstandard1.1/xunit.assert.dll",
"netstandard1.1": "lib/netstandard1.1/xunit.assert.dll",
"netstandard1.2": "lib/netstandard1.1/xunit.assert.dll",
"netstandard1.3": "lib/netstandard1.1/xunit.assert.dll",
"netstandard1.4": "lib/netstandard1.1/xunit.assert.dll",
"netstandard1.5": "lib/netstandard1.1/xunit.assert.dll",
"netstandard1.6": "lib/netstandard1.1/xunit.assert.dll",
"netstandard2.0": "lib/netstandard1.1/xunit.assert.dll",
},
mono_lib = "lib/netstandard1.1/xunit.assert.dll",
core_files = {
"netcoreapp2.0": [
"lib/netstandard1.1/xunit.assert.dll",
"lib/netstandard1.1/xunit.assert.xml",
],
"netcoreapp2.1": [
"lib/netstandard1.1/xunit.assert.dll",
"lib/netstandard1.1/xunit.assert.xml",
],
},
net_files = {
"net45": [
"lib/netstandard1.1/xunit.assert.dll",
"lib/netstandard1.1/xunit.assert.xml",
],
"net451": [
"lib/netstandard1.1/xunit.assert.dll",
"lib/netstandard1.1/xunit.assert.xml",
],
"net452": [
"lib/netstandard1.1/xunit.assert.dll",
"lib/netstandard1.1/xunit.assert.xml",
],
"net46": [
"lib/netstandard1.1/xunit.assert.dll",
"lib/netstandard1.1/xunit.assert.xml",
],
"net461": [
"lib/netstandard1.1/xunit.assert.dll",
"lib/netstandard1.1/xunit.assert.xml",
],
"net462": [
"lib/netstandard1.1/xunit.assert.dll",
"lib/netstandard1.1/xunit.assert.xml",
],
"net47": [
"lib/netstandard1.1/xunit.assert.dll",
"lib/netstandard1.1/xunit.assert.xml",
],
"net471": [
"lib/netstandard1.1/xunit.assert.dll",
"lib/netstandard1.1/xunit.assert.xml",
],
"net472": [
"lib/netstandard1.1/xunit.assert.dll",
"lib/netstandard1.1/xunit.assert.xml",
],
"netstandard1.1": [
"lib/netstandard1.1/xunit.assert.dll",
"lib/netstandard1.1/xunit.assert.xml",
],
"netstandard1.2": [
"lib/netstandard1.1/xunit.assert.dll",
"lib/netstandard1.1/xunit.assert.xml",
],
"netstandard1.3": [
"lib/netstandard1.1/xunit.assert.dll",
"lib/netstandard1.1/xunit.assert.xml",
],
"netstandard1.4": [
"lib/netstandard1.1/xunit.assert.dll",
"lib/netstandard1.1/xunit.assert.xml",
],
"netstandard1.5": [
"lib/netstandard1.1/xunit.assert.dll",
"lib/netstandard1.1/xunit.assert.xml",
],
"netstandard1.6": [
"lib/netstandard1.1/xunit.assert.dll",
"lib/netstandard1.1/xunit.assert.xml",
],
"netstandard2.0": [
"lib/netstandard1.1/xunit.assert.dll",
"lib/netstandard1.1/xunit.assert.xml",
],
},
mono_files = [
"lib/netstandard1.1/xunit.assert.dll",
"lib/netstandard1.1/xunit.assert.xml",
],
)
nuget_package(
name = "xunit.abstractions",
package = "xunit.abstractions",
version = "2.0.3",
sha256 = "d03d72fc2df8880448f7a81bddb00e1bcb5c18f323c7e7cc69b4cfa727469403",
core_lib = {
"netcoreapp2.0": "lib/netstandard2.0/xunit.abstractions.dll",
"netcoreapp2.1": "lib/netstandard2.0/xunit.abstractions.dll",
},
net_lib = {
"net45": "lib/net35/xunit.abstractions.dll",
"net451": "lib/net35/xunit.abstractions.dll",
"net452": "lib/net35/xunit.abstractions.dll",
"net46": "lib/net35/xunit.abstractions.dll",
"net461": "lib/net35/xunit.abstractions.dll",
"net462": "lib/net35/xunit.abstractions.dll",
"net47": "lib/net35/xunit.abstractions.dll",
"net471": "lib/net35/xunit.abstractions.dll",
"net472": "lib/net35/xunit.abstractions.dll",
"netstandard1.0": "lib/netstandard1.0/xunit.abstractions.dll",
"netstandard1.1": "lib/netstandard1.0/xunit.abstractions.dll",
"netstandard1.2": "lib/netstandard1.0/xunit.abstractions.dll",
"netstandard1.3": "lib/netstandard1.0/xunit.abstractions.dll",
"netstandard1.4": "lib/netstandard1.0/xunit.abstractions.dll",
"netstandard1.5": "lib/netstandard1.0/xunit.abstractions.dll",
"netstandard1.6": "lib/netstandard1.0/xunit.abstractions.dll",
"netstandard2.0": "lib/netstandard2.0/xunit.abstractions.dll",
},
mono_lib = "lib/net35/xunit.abstractions.dll",
core_files = {
"netcoreapp2.0": [
"lib/netstandard2.0/xunit.abstractions.dll",
"lib/netstandard2.0/xunit.abstractions.xml",
],
"netcoreapp2.1": [
"lib/netstandard2.0/xunit.abstractions.dll",
"lib/netstandard2.0/xunit.abstractions.xml",
],
},
net_files = {
"net45": [
"lib/net35/xunit.abstractions.dll",
"lib/net35/xunit.abstractions.xml",
],
"net451": [
"lib/net35/xunit.abstractions.dll",
"lib/net35/xunit.abstractions.xml",
],
"net452": [
"lib/net35/xunit.abstractions.dll",
"lib/net35/xunit.abstractions.xml",
],
"net46": [
"lib/net35/xunit.abstractions.dll",
"lib/net35/xunit.abstractions.xml",
],
"net461": [
"lib/net35/xunit.abstractions.dll",
"lib/net35/xunit.abstractions.xml",
],
"net462": [
"lib/net35/xunit.abstractions.dll",
"lib/net35/xunit.abstractions.xml",
],
"net47": [
"lib/net35/xunit.abstractions.dll",
"lib/net35/xunit.abstractions.xml",
],
"net471": [
"lib/net35/xunit.abstractions.dll",
"lib/net35/xunit.abstractions.xml",
],
"net472": [
"lib/net35/xunit.abstractions.dll",
"lib/net35/xunit.abstractions.xml",
],
"netstandard1.0": [
"lib/netstandard1.0/xunit.abstractions.dll",
"lib/netstandard1.0/xunit.abstractions.xml",
],
"netstandard1.1": [
"lib/netstandard1.0/xunit.abstractions.dll",
"lib/netstandard1.0/xunit.abstractions.xml",
],
"netstandard1.2": [
"lib/netstandard1.0/xunit.abstractions.dll",
"lib/netstandard1.0/xunit.abstractions.xml",
],
"netstandard1.3": [
"lib/netstandard1.0/xunit.abstractions.dll",
"lib/netstandard1.0/xunit.abstractions.xml",
],
"netstandard1.4": [
"lib/netstandard1.0/xunit.abstractions.dll",
"lib/netstandard1.0/xunit.abstractions.xml",
],
"netstandard1.5": [
"lib/netstandard1.0/xunit.abstractions.dll",
"lib/netstandard1.0/xunit.abstractions.xml",
],
"netstandard1.6": [
"lib/netstandard1.0/xunit.abstractions.dll",
"lib/netstandard1.0/xunit.abstractions.xml",
],
"netstandard2.0": [
"lib/netstandard2.0/xunit.abstractions.dll",
"lib/netstandard2.0/xunit.abstractions.xml",
],
},
mono_files = [
"lib/net35/xunit.abstractions.dll",
"lib/net35/xunit.abstractions.xml",
],
)
nuget_package(
name = "xunit.analyzers",
package = "xunit.analyzers",
version = "0.10.0",
sha256 = "f254598688171d892c6bd0a19e4157a419d33252e5608beedc0bfba90616c096",
core_lib = {
"netcoreapp2.0": "",
"netcoreapp2.1": "",
},
net_lib = {
"net45": "",
"net451": "",
"net452": "",
"net46": "",
"net461": "",
"net462": "",
"net47": "",
"net471": "",
"net472": "",
"netstandard1.0": "",
"netstandard1.1": "",
"netstandard1.2": "",
"netstandard1.3": "",
"netstandard1.4": "",
"netstandard1.5": "",
"netstandard1.6": "",
"netstandard2.0": "",
},
core_files = {
"netcoreapp2.0": [
"tools/install.ps1",
"tools/uninstall.ps1",
],
"netcoreapp2.1": [
"tools/install.ps1",
"tools/uninstall.ps1",
],
},
net_files = {
"net45": [
"tools/install.ps1",
"tools/uninstall.ps1",
],
"net451": [
"tools/install.ps1",
"tools/uninstall.ps1",
],
"net452": [
"tools/install.ps1",
"tools/uninstall.ps1",
],
"net46": [
"tools/install.ps1",
"tools/uninstall.ps1",
],
"net461": [
"tools/install.ps1",
"tools/uninstall.ps1",
],
"net462": [
"tools/install.ps1",
"tools/uninstall.ps1",
],
"net47": [
"tools/install.ps1",
"tools/uninstall.ps1",
],
"net471": [
"tools/install.ps1",
"tools/uninstall.ps1",
],
"net472": [
"tools/install.ps1",
"tools/uninstall.ps1",
],
"netstandard1.0": [
"tools/install.ps1",
"tools/uninstall.ps1",
],
"netstandard1.1": [
"tools/install.ps1",
"tools/uninstall.ps1",
],
"netstandard1.2": [
"tools/install.ps1",
"tools/uninstall.ps1",
],
"netstandard1.3": [
"tools/install.ps1",
"tools/uninstall.ps1",
],
"netstandard1.4": [
"tools/install.ps1",
"tools/uninstall.ps1",
],
"netstandard1.5": [
"tools/install.ps1",
"tools/uninstall.ps1",
],
"netstandard1.6": [
"tools/install.ps1",
"tools/uninstall.ps1",
],
"netstandard2.0": [
"tools/install.ps1",
"tools/uninstall.ps1",
],
},
mono_files = [
"tools/install.ps1",
"tools/uninstall.ps1",
],
)
nuget_package(
name = "xunit.extensibility.core",
package = "xunit.extensibility.core",
version = "2.4.1",
sha256 = "a000953abbc5e1798a16bfbc66a3d5a636e8a5981e470697bde2465b65d47880",
core_lib = {
"netcoreapp2.0": "lib/netstandard1.1/xunit.core.dll",
"netcoreapp2.1": "lib/netstandard1.1/xunit.core.dll",
},
net_lib = {
"net45": "lib/netstandard1.1/xunit.core.dll",
"net451": "lib/netstandard1.1/xunit.core.dll",
"net452": "lib/net452/xunit.core.dll",
"net46": "lib/net452/xunit.core.dll",
"net461": "lib/net452/xunit.core.dll",
"net462": "lib/net452/xunit.core.dll",
"net47": "lib/net452/xunit.core.dll",
"net471": "lib/net452/xunit.core.dll",
"net472": "lib/net452/xunit.core.dll",
"netstandard1.1": "lib/netstandard1.1/xunit.core.dll",
"netstandard1.2": "lib/netstandard1.1/xunit.core.dll",
"netstandard1.3": "lib/netstandard1.1/xunit.core.dll",
"netstandard1.4": "lib/netstandard1.1/xunit.core.dll",
"netstandard1.5": "lib/netstandard1.1/xunit.core.dll",
"netstandard1.6": "lib/netstandard1.1/xunit.core.dll",
"netstandard2.0": "lib/netstandard1.1/xunit.core.dll",
},
mono_lib = "lib/net452/xunit.core.dll",
core_deps = {
"netcoreapp2.0": [
"@xunit.abstractions//:netcoreapp2.0_core",
],
"netcoreapp2.1": [
"@xunit.abstractions//:netcoreapp2.1_core",
],
},
net_deps = {
"net45": [
"@xunit.abstractions//:net45_net",
],
"net451": [
"@xunit.abstractions//:net451_net",
],
"net452": [
"@xunit.abstractions//:net452_net",
],
"net46": [
"@xunit.abstractions//:net46_net",
],
"net461": [
"@xunit.abstractions//:net461_net",
],
"net462": [
"@xunit.abstractions//:net462_net",
],
"net47": [
"@xunit.abstractions//:net47_net",
],
"net471": [
"@xunit.abstractions//:net471_net",
],
"net472": [
"@xunit.abstractions//:net472_net",
],
"netstandard1.1": [
"@xunit.abstractions//:netstandard1.1_net",
],
"netstandard1.2": [
"@xunit.abstractions//:netstandard1.2_net",
],
"netstandard1.3": [
"@xunit.abstractions//:netstandard1.3_net",
],
"netstandard1.4": [
"@xunit.abstractions//:netstandard1.4_net",
],
"netstandard1.5": [
"@xunit.abstractions//:netstandard1.5_net",
],
"netstandard1.6": [
"@xunit.abstractions//:netstandard1.6_net",
],
"netstandard2.0": [
"@xunit.abstractions//:netstandard2.0_net",
],
},
mono_deps = [
"@xunit.abstractions//:mono",
],
core_files = {
"netcoreapp2.0": [
"lib/netstandard1.1/xunit.core.dll",
"lib/netstandard1.1/xunit.core.xml",
],
"netcoreapp2.1": [
"lib/netstandard1.1/xunit.core.dll",
"lib/netstandard1.1/xunit.core.xml",
],
},
net_files = {
"net45": [
"lib/netstandard1.1/xunit.core.dll",
"lib/netstandard1.1/xunit.core.xml",
],
"net451": [
"lib/netstandard1.1/xunit.core.dll",
"lib/netstandard1.1/xunit.core.xml",
],
"net452": [
"lib/net452/xunit.core.dll",
"lib/net452/xunit.core.dll.tdnet",
"lib/net452/xunit.core.xml",
"lib/net452/xunit.runner.tdnet.dll",
"lib/net452/xunit.runner.utility.net452.dll",
],
"net46": [
"lib/net452/xunit.core.dll",
"lib/net452/xunit.core.dll.tdnet",
"lib/net452/xunit.core.xml",
"lib/net452/xunit.runner.tdnet.dll",
"lib/net452/xunit.runner.utility.net452.dll",
],
"net461": [
"lib/net452/xunit.core.dll",
"lib/net452/xunit.core.dll.tdnet",
"lib/net452/xunit.core.xml",
"lib/net452/xunit.runner.tdnet.dll",
"lib/net452/xunit.runner.utility.net452.dll",
],
"net462": [
"lib/net452/xunit.core.dll",
"lib/net452/xunit.core.dll.tdnet",
"lib/net452/xunit.core.xml",
"lib/net452/xunit.runner.tdnet.dll",
"lib/net452/xunit.runner.utility.net452.dll",
],
"net47": [
"lib/net452/xunit.core.dll",
"lib/net452/xunit.core.dll.tdnet",
"lib/net452/xunit.core.xml",
"lib/net452/xunit.runner.tdnet.dll",
"lib/net452/xunit.runner.utility.net452.dll",
],
"net471": [
"lib/net452/xunit.core.dll",
"lib/net452/xunit.core.dll.tdnet",
"lib/net452/xunit.core.xml",
"lib/net452/xunit.runner.tdnet.dll",
"lib/net452/xunit.runner.utility.net452.dll",
],
"net472": [
"lib/net452/xunit.core.dll",
"lib/net452/xunit.core.dll.tdnet",
"lib/net452/xunit.core.xml",
"lib/net452/xunit.runner.tdnet.dll",
"lib/net452/xunit.runner.utility.net452.dll",
],
"netstandard1.1": [
"lib/netstandard1.1/xunit.core.dll",
"lib/netstandard1.1/xunit.core.xml",
],
"netstandard1.2": [
"lib/netstandard1.1/xunit.core.dll",
"lib/netstandard1.1/xunit.core.xml",
],
"netstandard1.3": [
"lib/netstandard1.1/xunit.core.dll",
"lib/netstandard1.1/xunit.core.xml",
],
"netstandard1.4": [
"lib/netstandard1.1/xunit.core.dll",
"lib/netstandard1.1/xunit.core.xml",
],
"netstandard1.5": [
"lib/netstandard1.1/xunit.core.dll",
"lib/netstandard1.1/xunit.core.xml",
],
"netstandard1.6": [
"lib/netstandard1.1/xunit.core.dll",
"lib/netstandard1.1/xunit.core.xml",
],
"netstandard2.0": [
"lib/netstandard1.1/xunit.core.dll",
"lib/netstandard1.1/xunit.core.xml",
],
},
mono_files = [
"lib/net452/xunit.core.dll",
"lib/net452/xunit.core.dll.tdnet",
"lib/net452/xunit.core.xml",
"lib/net452/xunit.runner.tdnet.dll",
"lib/net452/xunit.runner.utility.net452.dll",
],
)
nuget_package(
name = "xunit.extensibility.execution",
package = "xunit.extensibility.execution",
version = "2.4.1",
sha256 = "2a6284760b14ab8cee409dac689034613d42219d80ba164be55edc1760a771dd",
core_lib = {
"netcoreapp2.0": "lib/netstandard1.1/xunit.execution.dotnet.dll",
"netcoreapp2.1": "lib/netstandard1.1/xunit.execution.dotnet.dll",
},
net_lib = {
"net45": "lib/netstandard1.1/xunit.execution.dotnet.dll",
"net451": "lib/netstandard1.1/xunit.execution.dotnet.dll",
"net452": "lib/net452/xunit.execution.desktop.dll",
"net46": "lib/net452/xunit.execution.desktop.dll",
"net461": "lib/net452/xunit.execution.desktop.dll",
"net462": "lib/net452/xunit.execution.desktop.dll",
"net47": "lib/net452/xunit.execution.desktop.dll",
"net471": "lib/net452/xunit.execution.desktop.dll",
"net472": "lib/net452/xunit.execution.desktop.dll",
"netstandard1.1": "lib/netstandard1.1/xunit.execution.dotnet.dll",
"netstandard1.2": "lib/netstandard1.1/xunit.execution.dotnet.dll",
"netstandard1.3": "lib/netstandard1.1/xunit.execution.dotnet.dll",
"netstandard1.4": "lib/netstandard1.1/xunit.execution.dotnet.dll",
"netstandard1.5": "lib/netstandard1.1/xunit.execution.dotnet.dll",
"netstandard1.6": "lib/netstandard1.1/xunit.execution.dotnet.dll",
"netstandard2.0": "lib/netstandard1.1/xunit.execution.dotnet.dll",
},
mono_lib = "lib/net452/xunit.execution.desktop.dll",
core_deps = {
"netcoreapp2.0": [
"@xunit.extensibility.core//:netcoreapp2.0_core",
],
"netcoreapp2.1": [
"@xunit.extensibility.core//:netcoreapp2.1_core",
],
},
net_deps = {
"net45": [
"@xunit.extensibility.core//:net45_net",
],
"net451": [
"@xunit.extensibility.core//:net451_net",
],
"net452": [
"@xunit.extensibility.core//:net452_net",
],
"net46": [
"@xunit.extensibility.core//:net46_net",
],
"net461": [
"@xunit.extensibility.core//:net461_net",
],
"net462": [
"@xunit.extensibility.core//:net462_net",
],
"net47": [
"@xunit.extensibility.core//:net47_net",
],
"net471": [
"@xunit.extensibility.core//:net471_net",
],
"net472": [
"@xunit.extensibility.core//:net472_net",
],
"netstandard1.1": [
"@xunit.extensibility.core//:netstandard1.1_net",
],
"netstandard1.2": [
"@xunit.extensibility.core//:netstandard1.2_net",
],
"netstandard1.3": [
"@xunit.extensibility.core//:netstandard1.3_net",
],
"netstandard1.4": [
"@xunit.extensibility.core//:netstandard1.4_net",
],
"netstandard1.5": [
"@xunit.extensibility.core//:netstandard1.5_net",
],
"netstandard1.6": [
"@xunit.extensibility.core//:netstandard1.6_net",
],
"netstandard2.0": [
"@xunit.extensibility.core//:netstandard2.0_net",
],
},
mono_deps = [
"@xunit.extensibility.core//:mono",
],
core_files = {
"netcoreapp2.0": [
"lib/netstandard1.1/xunit.execution.dotnet.dll",
"lib/netstandard1.1/xunit.execution.dotnet.xml",
],
"netcoreapp2.1": [
"lib/netstandard1.1/xunit.execution.dotnet.dll",
"lib/netstandard1.1/xunit.execution.dotnet.xml",
],
},
net_files = {
"net45": [
"lib/netstandard1.1/xunit.execution.dotnet.dll",
"lib/netstandard1.1/xunit.execution.dotnet.xml",
],
"net451": [
"lib/netstandard1.1/xunit.execution.dotnet.dll",
"lib/netstandard1.1/xunit.execution.dotnet.xml",
],
"net452": [
"lib/net452/xunit.execution.desktop.dll",
"lib/net452/xunit.execution.desktop.xml",
],
"net46": [
"lib/net452/xunit.execution.desktop.dll",
"lib/net452/xunit.execution.desktop.xml",
],
"net461": [
"lib/net452/xunit.execution.desktop.dll",
"lib/net452/xunit.execution.desktop.xml",
],
"net462": [
"lib/net452/xunit.execution.desktop.dll",
"lib/net452/xunit.execution.desktop.xml",
],
"net47": [
"lib/net452/xunit.execution.desktop.dll",
"lib/net452/xunit.execution.desktop.xml",
],
"net471": [
"lib/net452/xunit.execution.desktop.dll",
"lib/net452/xunit.execution.desktop.xml",
],
"net472": [
"lib/net452/xunit.execution.desktop.dll",
"lib/net452/xunit.execution.desktop.xml",
],
"netstandard1.1": [
"lib/netstandard1.1/xunit.execution.dotnet.dll",
"lib/netstandard1.1/xunit.execution.dotnet.xml",
],
"netstandard1.2": [
"lib/netstandard1.1/xunit.execution.dotnet.dll",
"lib/netstandard1.1/xunit.execution.dotnet.xml",
],
"netstandard1.3": [
"lib/netstandard1.1/xunit.execution.dotnet.dll",
"lib/netstandard1.1/xunit.execution.dotnet.xml",
],
"netstandard1.4": [
"lib/netstandard1.1/xunit.execution.dotnet.dll",
"lib/netstandard1.1/xunit.execution.dotnet.xml",
],
"netstandard1.5": [
"lib/netstandard1.1/xunit.execution.dotnet.dll",
"lib/netstandard1.1/xunit.execution.dotnet.xml",
],
"netstandard1.6": [
"lib/netstandard1.1/xunit.execution.dotnet.dll",
"lib/netstandard1.1/xunit.execution.dotnet.xml",
],
"netstandard2.0": [
"lib/netstandard1.1/xunit.execution.dotnet.dll",
"lib/netstandard1.1/xunit.execution.dotnet.xml",
],
},
mono_files = [
"lib/net452/xunit.execution.desktop.dll",
"lib/net452/xunit.execution.desktop.xml",
],
)
nuget_package(
name = "xunit.core",
package = "xunit.core",
version = "2.4.1",
sha256 = "2a05200082483c7439550e05881fa2e6ed895d26319af30257ccd73f891ccbda",
core_deps = {
"netcoreapp2.0": [
"@xunit.extensibility.core//:netcoreapp2.0_core",
"@xunit.extensibility.execution//:netcoreapp2.0_core",
],
"netcoreapp2.1": [
"@xunit.extensibility.core//:netcoreapp2.1_core",
"@xunit.extensibility.execution//:netcoreapp2.1_core",
],
},
net_deps = {
"net45": [
"@xunit.extensibility.core//:net45_net",
"@xunit.extensibility.execution//:net45_net",
],
"net451": [
"@xunit.extensibility.core//:net451_net",
"@xunit.extensibility.execution//:net451_net",
],
"net452": [
"@xunit.extensibility.core//:net452_net",
"@xunit.extensibility.execution//:net452_net",
],
"net46": [
"@xunit.extensibility.core//:net46_net",
"@xunit.extensibility.execution//:net46_net",
],
"net461": [
"@xunit.extensibility.core//:net461_net",
"@xunit.extensibility.execution//:net461_net",
],
"net462": [
"@xunit.extensibility.core//:net462_net",
"@xunit.extensibility.execution//:net462_net",
],
"net47": [
"@xunit.extensibility.core//:net47_net",
"@xunit.extensibility.execution//:net47_net",
],
"net471": [
"@xunit.extensibility.core//:net471_net",
"@xunit.extensibility.execution//:net471_net",
],
"net472": [
"@xunit.extensibility.core//:net472_net",
"@xunit.extensibility.execution//:net472_net",
],
"netstandard1.0": [
"@xunit.extensibility.core//:netstandard1.0_net",
"@xunit.extensibility.execution//:netstandard1.0_net",
],
"netstandard1.1": [
"@xunit.extensibility.core//:netstandard1.1_net",
"@xunit.extensibility.execution//:netstandard1.1_net",
],
"netstandard1.2": [
"@xunit.extensibility.core//:netstandard1.2_net",
"@xunit.extensibility.execution//:netstandard1.2_net",
],
"netstandard1.3": [
"@xunit.extensibility.core//:netstandard1.3_net",
"@xunit.extensibility.execution//:netstandard1.3_net",
],
"netstandard1.4": [
"@xunit.extensibility.core//:netstandard1.4_net",
"@xunit.extensibility.execution//:netstandard1.4_net",
],
"netstandard1.5": [
"@xunit.extensibility.core//:netstandard1.5_net",
"@xunit.extensibility.execution//:netstandard1.5_net",
],
"netstandard1.6": [
"@xunit.extensibility.core//:netstandard1.6_net",
"@xunit.extensibility.execution//:netstandard1.6_net",
],
"netstandard2.0": [
"@xunit.extensibility.core//:netstandard2.0_net",
"@xunit.extensibility.execution//:netstandard2.0_net",
],
},
mono_deps = [
"@xunit.extensibility.core//:mono",
"@xunit.extensibility.execution//:mono",
],
)
nuget_package(
name = "xunit",
package = "xunit",
version = "2.4.1",
sha256 = "4060ee134667b31c8424e34ff06709f343e63de6fe39ac307525bccbbd9ac375",
core_deps = {
"netcoreapp2.0": [
"@xunit.core//:netcoreapp2.0_core",
"@xunit.assert//:netcoreapp2.0_core",
"@xunit.analyzers//:netcoreapp2.0_core",
],
"netcoreapp2.1": [
"@xunit.core//:netcoreapp2.1_core",
"@xunit.assert//:netcoreapp2.1_core",
"@xunit.analyzers//:netcoreapp2.1_core",
],
},
net_deps = {
"net45": [
"@xunit.core//:net45_net",
"@xunit.assert//:net45_net",
"@xunit.analyzers//:net45_net",
],
"net451": [
"@xunit.core//:net451_net",
"@xunit.assert//:net451_net",
"@xunit.analyzers//:net451_net",
],
"net452": [
"@xunit.core//:net452_net",
"@xunit.assert//:net452_net",
"@xunit.analyzers//:net452_net",
],
"net46": [
"@xunit.core//:net46_net",
"@xunit.assert//:net46_net",
"@xunit.analyzers//:net46_net",
],
"net461": [
"@xunit.core//:net461_net",
"@xunit.assert//:net461_net",
"@xunit.analyzers//:net461_net",
],
"net462": [
"@xunit.core//:net462_net",
"@xunit.assert//:net462_net",
"@xunit.analyzers//:net462_net",
],
"net47": [
"@xunit.core//:net47_net",
"@xunit.assert//:net47_net",
"@xunit.analyzers//:net47_net",
],
"net471": [
"@xunit.core//:net471_net",
"@xunit.assert//:net471_net",
"@xunit.analyzers//:net471_net",
],
"net472": [
"@xunit.core//:net472_net",
"@xunit.assert//:net472_net",
"@xunit.analyzers//:net472_net",
],
"netstandard1.0": [
"@xunit.core//:netstandard1.0_net",
"@xunit.assert//:netstandard1.0_net",
"@xunit.analyzers//:netstandard1.0_net",
],
"netstandard1.1": [
"@xunit.core//:netstandard1.1_net",
"@xunit.assert//:netstandard1.1_net",
"@xunit.analyzers//:netstandard1.1_net",
],
"netstandard1.2": [
"@xunit.core//:netstandard1.2_net",
"@xunit.assert//:netstandard1.2_net",
"@xunit.analyzers//:netstandard1.2_net",
],
"netstandard1.3": [
"@xunit.core//:netstandard1.3_net",
"@xunit.assert//:netstandard1.3_net",
"@xunit.analyzers//:netstandard1.3_net",
],
"netstandard1.4": [
"@xunit.core//:netstandard1.4_net",
"@xunit.assert//:netstandard1.4_net",
"@xunit.analyzers//:netstandard1.4_net",
],
"netstandard1.5": [
"@xunit.core//:netstandard1.5_net",
"@xunit.assert//:netstandard1.5_net",
"@xunit.analyzers//:netstandard1.5_net",
],
"netstandard1.6": [
"@xunit.core//:netstandard1.6_net",
"@xunit.assert//:netstandard1.6_net",
"@xunit.analyzers//:netstandard1.6_net",
],
"netstandard2.0": [
"@xunit.core//:netstandard2.0_net",
"@xunit.assert//:netstandard2.0_net",
"@xunit.analyzers//:netstandard2.0_net",
],
},
mono_deps = [
"@xunit.core//:mono",
"@xunit.assert//:mono",
"@xunit.analyzers//:mono",
],
)
### End of generated by the tool
| load('@io_bazel_rules_dotnet//dotnet/private:rules/nuget.bzl', 'nuget_package')
def dotnet_repositories_xunit():
nuget_package(name='xunit.runner.console', package='xunit.runner.console', version='2.4.1', sha256='23f0b49edbfe5be8f8554e7f4317a390949bb96bdb2f8309ebe27c6855fad38f', core_lib={'netcoreapp2.0': 'tools/netcoreapp2.0/xunit.abstractions.dll', 'netcoreapp2.1': 'tools/netcoreapp2.0/xunit.abstractions.dll'}, net_lib={'net452': 'tools/net452/xunit.abstractions.dll', 'net46': 'tools/net46/xunit.abstractions.dll', 'net461': 'tools/net461/xunit.abstractions.dll', 'net462': 'tools/net462/xunit.abstractions.dll', 'net47': 'tools/net47/xunit.abstractions.dll', 'net471': 'tools/net471/xunit.abstractions.dll', 'net472': 'tools/net472/xunit.abstractions.dll'}, mono_lib='tools/net472/xunit.abstractions.dll', core_tool={'netcoreapp2.0': 'tools/netcoreapp2.0/xunit.console.dll', 'netcoreapp2.1': 'tools/netcoreapp2.0/xunit.console.dll'}, net_tool={'net452': 'tools/net452/xunit.console.exe', 'net46': 'tools/net46/xunit.console.exe', 'net461': 'tools/net461/xunit.console.exe', 'net462': 'tools/net462/xunit.console.exe', 'net47': 'tools/net47/xunit.console.exe', 'net471': 'tools/net471/xunit.console.exe', 'net472': 'tools/net472/xunit.console.exe'}, mono_tool='tools/net472/xunit.console.exe', core_files={'netcoreapp2.0': ['tools/netcoreapp2.0/xunit.abstractions.dll', 'tools/netcoreapp2.0/xunit.console.deps.json', 'tools/netcoreapp2.0/xunit.console.dll', 'tools/netcoreapp2.0/xunit.console.dll.config', 'tools/netcoreapp2.0/xunit.console.runtimeconfig.json', 'tools/netcoreapp2.0/xunit.runner.reporters.netcoreapp10.dll', 'tools/netcoreapp2.0/xunit.runner.utility.netcoreapp10.dll', 'tools/netcoreapp2.0/xunit.runner.utility.netcoreapp10.xml'], 'netcoreapp2.1': ['tools/netcoreapp2.0/xunit.abstractions.dll', 'tools/netcoreapp2.0/xunit.console.deps.json', 'tools/netcoreapp2.0/xunit.console.dll', 'tools/netcoreapp2.0/xunit.console.dll.config', 'tools/netcoreapp2.0/xunit.console.runtimeconfig.json', 'tools/netcoreapp2.0/xunit.runner.reporters.netcoreapp10.dll', 'tools/netcoreapp2.0/xunit.runner.utility.netcoreapp10.dll', 'tools/netcoreapp2.0/xunit.runner.utility.netcoreapp10.xml']}, net_files={'net452': ['tools/net452/xunit.abstractions.dll', 'tools/net452/xunit.console.exe', 'tools/net452/xunit.console.exe.config', 'tools/net452/xunit.console.x86.exe', 'tools/net452/xunit.console.x86.exe.config', 'tools/net452/xunit.runner.reporters.net452.dll', 'tools/net452/xunit.runner.utility.net452.dll'], 'net46': ['tools/net46/xunit.abstractions.dll', 'tools/net46/xunit.console.exe', 'tools/net46/xunit.console.exe.config', 'tools/net46/xunit.console.x86.exe', 'tools/net46/xunit.console.x86.exe.config', 'tools/net46/xunit.runner.reporters.net452.dll', 'tools/net46/xunit.runner.utility.net452.dll'], 'net461': ['tools/net461/xunit.abstractions.dll', 'tools/net461/xunit.console.exe', 'tools/net461/xunit.console.exe.config', 'tools/net461/xunit.console.x86.exe', 'tools/net461/xunit.console.x86.exe.config', 'tools/net461/xunit.runner.reporters.net452.dll', 'tools/net461/xunit.runner.utility.net452.dll'], 'net462': ['tools/net462/xunit.abstractions.dll', 'tools/net462/xunit.console.exe', 'tools/net462/xunit.console.exe.config', 'tools/net462/xunit.console.x86.exe', 'tools/net462/xunit.console.x86.exe.config', 'tools/net462/xunit.runner.reporters.net452.dll', 'tools/net462/xunit.runner.utility.net452.dll'], 'net47': ['tools/net47/xunit.abstractions.dll', 'tools/net47/xunit.console.exe', 'tools/net47/xunit.console.exe.config', 'tools/net47/xunit.console.x86.exe', 'tools/net47/xunit.console.x86.exe.config', 'tools/net47/xunit.runner.reporters.net452.dll', 'tools/net47/xunit.runner.utility.net452.dll'], 'net471': ['tools/net471/xunit.abstractions.dll', 'tools/net471/xunit.console.exe', 'tools/net471/xunit.console.exe.config', 'tools/net471/xunit.console.x86.exe', 'tools/net471/xunit.console.x86.exe.config', 'tools/net471/xunit.runner.reporters.net452.dll', 'tools/net471/xunit.runner.utility.net452.dll'], 'net472': ['tools/net472/xunit.abstractions.dll', 'tools/net472/xunit.console.exe', 'tools/net472/xunit.console.exe.config', 'tools/net472/xunit.console.x86.exe', 'tools/net472/xunit.console.x86.exe.config', 'tools/net472/xunit.runner.reporters.net452.dll', 'tools/net472/xunit.runner.utility.net452.dll']}, mono_files=['tools/net472/xunit.abstractions.dll', 'tools/net472/xunit.console.exe', 'tools/net472/xunit.console.exe.config', 'tools/net472/xunit.console.x86.exe', 'tools/net472/xunit.console.x86.exe.config', 'tools/net472/xunit.runner.reporters.net452.dll', 'tools/net472/xunit.runner.utility.net452.dll'])
nuget_package(name='xunit.assert', package='xunit.assert', version='2.4.1', sha256='865d5c3126a4025c24a4511c87108d31dbd089ee8f309d6e16b87380e0b7bec6', core_lib={'netcoreapp2.0': 'lib/netstandard1.1/xunit.assert.dll', 'netcoreapp2.1': 'lib/netstandard1.1/xunit.assert.dll'}, net_lib={'net45': 'lib/netstandard1.1/xunit.assert.dll', 'net451': 'lib/netstandard1.1/xunit.assert.dll', 'net452': 'lib/netstandard1.1/xunit.assert.dll', 'net46': 'lib/netstandard1.1/xunit.assert.dll', 'net461': 'lib/netstandard1.1/xunit.assert.dll', 'net462': 'lib/netstandard1.1/xunit.assert.dll', 'net47': 'lib/netstandard1.1/xunit.assert.dll', 'net471': 'lib/netstandard1.1/xunit.assert.dll', 'net472': 'lib/netstandard1.1/xunit.assert.dll', 'netstandard1.1': 'lib/netstandard1.1/xunit.assert.dll', 'netstandard1.2': 'lib/netstandard1.1/xunit.assert.dll', 'netstandard1.3': 'lib/netstandard1.1/xunit.assert.dll', 'netstandard1.4': 'lib/netstandard1.1/xunit.assert.dll', 'netstandard1.5': 'lib/netstandard1.1/xunit.assert.dll', 'netstandard1.6': 'lib/netstandard1.1/xunit.assert.dll', 'netstandard2.0': 'lib/netstandard1.1/xunit.assert.dll'}, mono_lib='lib/netstandard1.1/xunit.assert.dll', core_files={'netcoreapp2.0': ['lib/netstandard1.1/xunit.assert.dll', 'lib/netstandard1.1/xunit.assert.xml'], 'netcoreapp2.1': ['lib/netstandard1.1/xunit.assert.dll', 'lib/netstandard1.1/xunit.assert.xml']}, net_files={'net45': ['lib/netstandard1.1/xunit.assert.dll', 'lib/netstandard1.1/xunit.assert.xml'], 'net451': ['lib/netstandard1.1/xunit.assert.dll', 'lib/netstandard1.1/xunit.assert.xml'], 'net452': ['lib/netstandard1.1/xunit.assert.dll', 'lib/netstandard1.1/xunit.assert.xml'], 'net46': ['lib/netstandard1.1/xunit.assert.dll', 'lib/netstandard1.1/xunit.assert.xml'], 'net461': ['lib/netstandard1.1/xunit.assert.dll', 'lib/netstandard1.1/xunit.assert.xml'], 'net462': ['lib/netstandard1.1/xunit.assert.dll', 'lib/netstandard1.1/xunit.assert.xml'], 'net47': ['lib/netstandard1.1/xunit.assert.dll', 'lib/netstandard1.1/xunit.assert.xml'], 'net471': ['lib/netstandard1.1/xunit.assert.dll', 'lib/netstandard1.1/xunit.assert.xml'], 'net472': ['lib/netstandard1.1/xunit.assert.dll', 'lib/netstandard1.1/xunit.assert.xml'], 'netstandard1.1': ['lib/netstandard1.1/xunit.assert.dll', 'lib/netstandard1.1/xunit.assert.xml'], 'netstandard1.2': ['lib/netstandard1.1/xunit.assert.dll', 'lib/netstandard1.1/xunit.assert.xml'], 'netstandard1.3': ['lib/netstandard1.1/xunit.assert.dll', 'lib/netstandard1.1/xunit.assert.xml'], 'netstandard1.4': ['lib/netstandard1.1/xunit.assert.dll', 'lib/netstandard1.1/xunit.assert.xml'], 'netstandard1.5': ['lib/netstandard1.1/xunit.assert.dll', 'lib/netstandard1.1/xunit.assert.xml'], 'netstandard1.6': ['lib/netstandard1.1/xunit.assert.dll', 'lib/netstandard1.1/xunit.assert.xml'], 'netstandard2.0': ['lib/netstandard1.1/xunit.assert.dll', 'lib/netstandard1.1/xunit.assert.xml']}, mono_files=['lib/netstandard1.1/xunit.assert.dll', 'lib/netstandard1.1/xunit.assert.xml'])
nuget_package(name='xunit.abstractions', package='xunit.abstractions', version='2.0.3', sha256='d03d72fc2df8880448f7a81bddb00e1bcb5c18f323c7e7cc69b4cfa727469403', core_lib={'netcoreapp2.0': 'lib/netstandard2.0/xunit.abstractions.dll', 'netcoreapp2.1': 'lib/netstandard2.0/xunit.abstractions.dll'}, net_lib={'net45': 'lib/net35/xunit.abstractions.dll', 'net451': 'lib/net35/xunit.abstractions.dll', 'net452': 'lib/net35/xunit.abstractions.dll', 'net46': 'lib/net35/xunit.abstractions.dll', 'net461': 'lib/net35/xunit.abstractions.dll', 'net462': 'lib/net35/xunit.abstractions.dll', 'net47': 'lib/net35/xunit.abstractions.dll', 'net471': 'lib/net35/xunit.abstractions.dll', 'net472': 'lib/net35/xunit.abstractions.dll', 'netstandard1.0': 'lib/netstandard1.0/xunit.abstractions.dll', 'netstandard1.1': 'lib/netstandard1.0/xunit.abstractions.dll', 'netstandard1.2': 'lib/netstandard1.0/xunit.abstractions.dll', 'netstandard1.3': 'lib/netstandard1.0/xunit.abstractions.dll', 'netstandard1.4': 'lib/netstandard1.0/xunit.abstractions.dll', 'netstandard1.5': 'lib/netstandard1.0/xunit.abstractions.dll', 'netstandard1.6': 'lib/netstandard1.0/xunit.abstractions.dll', 'netstandard2.0': 'lib/netstandard2.0/xunit.abstractions.dll'}, mono_lib='lib/net35/xunit.abstractions.dll', core_files={'netcoreapp2.0': ['lib/netstandard2.0/xunit.abstractions.dll', 'lib/netstandard2.0/xunit.abstractions.xml'], 'netcoreapp2.1': ['lib/netstandard2.0/xunit.abstractions.dll', 'lib/netstandard2.0/xunit.abstractions.xml']}, net_files={'net45': ['lib/net35/xunit.abstractions.dll', 'lib/net35/xunit.abstractions.xml'], 'net451': ['lib/net35/xunit.abstractions.dll', 'lib/net35/xunit.abstractions.xml'], 'net452': ['lib/net35/xunit.abstractions.dll', 'lib/net35/xunit.abstractions.xml'], 'net46': ['lib/net35/xunit.abstractions.dll', 'lib/net35/xunit.abstractions.xml'], 'net461': ['lib/net35/xunit.abstractions.dll', 'lib/net35/xunit.abstractions.xml'], 'net462': ['lib/net35/xunit.abstractions.dll', 'lib/net35/xunit.abstractions.xml'], 'net47': ['lib/net35/xunit.abstractions.dll', 'lib/net35/xunit.abstractions.xml'], 'net471': ['lib/net35/xunit.abstractions.dll', 'lib/net35/xunit.abstractions.xml'], 'net472': ['lib/net35/xunit.abstractions.dll', 'lib/net35/xunit.abstractions.xml'], 'netstandard1.0': ['lib/netstandard1.0/xunit.abstractions.dll', 'lib/netstandard1.0/xunit.abstractions.xml'], 'netstandard1.1': ['lib/netstandard1.0/xunit.abstractions.dll', 'lib/netstandard1.0/xunit.abstractions.xml'], 'netstandard1.2': ['lib/netstandard1.0/xunit.abstractions.dll', 'lib/netstandard1.0/xunit.abstractions.xml'], 'netstandard1.3': ['lib/netstandard1.0/xunit.abstractions.dll', 'lib/netstandard1.0/xunit.abstractions.xml'], 'netstandard1.4': ['lib/netstandard1.0/xunit.abstractions.dll', 'lib/netstandard1.0/xunit.abstractions.xml'], 'netstandard1.5': ['lib/netstandard1.0/xunit.abstractions.dll', 'lib/netstandard1.0/xunit.abstractions.xml'], 'netstandard1.6': ['lib/netstandard1.0/xunit.abstractions.dll', 'lib/netstandard1.0/xunit.abstractions.xml'], 'netstandard2.0': ['lib/netstandard2.0/xunit.abstractions.dll', 'lib/netstandard2.0/xunit.abstractions.xml']}, mono_files=['lib/net35/xunit.abstractions.dll', 'lib/net35/xunit.abstractions.xml'])
nuget_package(name='xunit.analyzers', package='xunit.analyzers', version='0.10.0', sha256='f254598688171d892c6bd0a19e4157a419d33252e5608beedc0bfba90616c096', core_lib={'netcoreapp2.0': '', 'netcoreapp2.1': ''}, net_lib={'net45': '', 'net451': '', 'net452': '', 'net46': '', 'net461': '', 'net462': '', 'net47': '', 'net471': '', 'net472': '', 'netstandard1.0': '', 'netstandard1.1': '', 'netstandard1.2': '', 'netstandard1.3': '', 'netstandard1.4': '', 'netstandard1.5': '', 'netstandard1.6': '', 'netstandard2.0': ''}, core_files={'netcoreapp2.0': ['tools/install.ps1', 'tools/uninstall.ps1'], 'netcoreapp2.1': ['tools/install.ps1', 'tools/uninstall.ps1']}, net_files={'net45': ['tools/install.ps1', 'tools/uninstall.ps1'], 'net451': ['tools/install.ps1', 'tools/uninstall.ps1'], 'net452': ['tools/install.ps1', 'tools/uninstall.ps1'], 'net46': ['tools/install.ps1', 'tools/uninstall.ps1'], 'net461': ['tools/install.ps1', 'tools/uninstall.ps1'], 'net462': ['tools/install.ps1', 'tools/uninstall.ps1'], 'net47': ['tools/install.ps1', 'tools/uninstall.ps1'], 'net471': ['tools/install.ps1', 'tools/uninstall.ps1'], 'net472': ['tools/install.ps1', 'tools/uninstall.ps1'], 'netstandard1.0': ['tools/install.ps1', 'tools/uninstall.ps1'], 'netstandard1.1': ['tools/install.ps1', 'tools/uninstall.ps1'], 'netstandard1.2': ['tools/install.ps1', 'tools/uninstall.ps1'], 'netstandard1.3': ['tools/install.ps1', 'tools/uninstall.ps1'], 'netstandard1.4': ['tools/install.ps1', 'tools/uninstall.ps1'], 'netstandard1.5': ['tools/install.ps1', 'tools/uninstall.ps1'], 'netstandard1.6': ['tools/install.ps1', 'tools/uninstall.ps1'], 'netstandard2.0': ['tools/install.ps1', 'tools/uninstall.ps1']}, mono_files=['tools/install.ps1', 'tools/uninstall.ps1'])
nuget_package(name='xunit.extensibility.core', package='xunit.extensibility.core', version='2.4.1', sha256='a000953abbc5e1798a16bfbc66a3d5a636e8a5981e470697bde2465b65d47880', core_lib={'netcoreapp2.0': 'lib/netstandard1.1/xunit.core.dll', 'netcoreapp2.1': 'lib/netstandard1.1/xunit.core.dll'}, net_lib={'net45': 'lib/netstandard1.1/xunit.core.dll', 'net451': 'lib/netstandard1.1/xunit.core.dll', 'net452': 'lib/net452/xunit.core.dll', 'net46': 'lib/net452/xunit.core.dll', 'net461': 'lib/net452/xunit.core.dll', 'net462': 'lib/net452/xunit.core.dll', 'net47': 'lib/net452/xunit.core.dll', 'net471': 'lib/net452/xunit.core.dll', 'net472': 'lib/net452/xunit.core.dll', 'netstandard1.1': 'lib/netstandard1.1/xunit.core.dll', 'netstandard1.2': 'lib/netstandard1.1/xunit.core.dll', 'netstandard1.3': 'lib/netstandard1.1/xunit.core.dll', 'netstandard1.4': 'lib/netstandard1.1/xunit.core.dll', 'netstandard1.5': 'lib/netstandard1.1/xunit.core.dll', 'netstandard1.6': 'lib/netstandard1.1/xunit.core.dll', 'netstandard2.0': 'lib/netstandard1.1/xunit.core.dll'}, mono_lib='lib/net452/xunit.core.dll', core_deps={'netcoreapp2.0': ['@xunit.abstractions//:netcoreapp2.0_core'], 'netcoreapp2.1': ['@xunit.abstractions//:netcoreapp2.1_core']}, net_deps={'net45': ['@xunit.abstractions//:net45_net'], 'net451': ['@xunit.abstractions//:net451_net'], 'net452': ['@xunit.abstractions//:net452_net'], 'net46': ['@xunit.abstractions//:net46_net'], 'net461': ['@xunit.abstractions//:net461_net'], 'net462': ['@xunit.abstractions//:net462_net'], 'net47': ['@xunit.abstractions//:net47_net'], 'net471': ['@xunit.abstractions//:net471_net'], 'net472': ['@xunit.abstractions//:net472_net'], 'netstandard1.1': ['@xunit.abstractions//:netstandard1.1_net'], 'netstandard1.2': ['@xunit.abstractions//:netstandard1.2_net'], 'netstandard1.3': ['@xunit.abstractions//:netstandard1.3_net'], 'netstandard1.4': ['@xunit.abstractions//:netstandard1.4_net'], 'netstandard1.5': ['@xunit.abstractions//:netstandard1.5_net'], 'netstandard1.6': ['@xunit.abstractions//:netstandard1.6_net'], 'netstandard2.0': ['@xunit.abstractions//:netstandard2.0_net']}, mono_deps=['@xunit.abstractions//:mono'], core_files={'netcoreapp2.0': ['lib/netstandard1.1/xunit.core.dll', 'lib/netstandard1.1/xunit.core.xml'], 'netcoreapp2.1': ['lib/netstandard1.1/xunit.core.dll', 'lib/netstandard1.1/xunit.core.xml']}, net_files={'net45': ['lib/netstandard1.1/xunit.core.dll', 'lib/netstandard1.1/xunit.core.xml'], 'net451': ['lib/netstandard1.1/xunit.core.dll', 'lib/netstandard1.1/xunit.core.xml'], 'net452': ['lib/net452/xunit.core.dll', 'lib/net452/xunit.core.dll.tdnet', 'lib/net452/xunit.core.xml', 'lib/net452/xunit.runner.tdnet.dll', 'lib/net452/xunit.runner.utility.net452.dll'], 'net46': ['lib/net452/xunit.core.dll', 'lib/net452/xunit.core.dll.tdnet', 'lib/net452/xunit.core.xml', 'lib/net452/xunit.runner.tdnet.dll', 'lib/net452/xunit.runner.utility.net452.dll'], 'net461': ['lib/net452/xunit.core.dll', 'lib/net452/xunit.core.dll.tdnet', 'lib/net452/xunit.core.xml', 'lib/net452/xunit.runner.tdnet.dll', 'lib/net452/xunit.runner.utility.net452.dll'], 'net462': ['lib/net452/xunit.core.dll', 'lib/net452/xunit.core.dll.tdnet', 'lib/net452/xunit.core.xml', 'lib/net452/xunit.runner.tdnet.dll', 'lib/net452/xunit.runner.utility.net452.dll'], 'net47': ['lib/net452/xunit.core.dll', 'lib/net452/xunit.core.dll.tdnet', 'lib/net452/xunit.core.xml', 'lib/net452/xunit.runner.tdnet.dll', 'lib/net452/xunit.runner.utility.net452.dll'], 'net471': ['lib/net452/xunit.core.dll', 'lib/net452/xunit.core.dll.tdnet', 'lib/net452/xunit.core.xml', 'lib/net452/xunit.runner.tdnet.dll', 'lib/net452/xunit.runner.utility.net452.dll'], 'net472': ['lib/net452/xunit.core.dll', 'lib/net452/xunit.core.dll.tdnet', 'lib/net452/xunit.core.xml', 'lib/net452/xunit.runner.tdnet.dll', 'lib/net452/xunit.runner.utility.net452.dll'], 'netstandard1.1': ['lib/netstandard1.1/xunit.core.dll', 'lib/netstandard1.1/xunit.core.xml'], 'netstandard1.2': ['lib/netstandard1.1/xunit.core.dll', 'lib/netstandard1.1/xunit.core.xml'], 'netstandard1.3': ['lib/netstandard1.1/xunit.core.dll', 'lib/netstandard1.1/xunit.core.xml'], 'netstandard1.4': ['lib/netstandard1.1/xunit.core.dll', 'lib/netstandard1.1/xunit.core.xml'], 'netstandard1.5': ['lib/netstandard1.1/xunit.core.dll', 'lib/netstandard1.1/xunit.core.xml'], 'netstandard1.6': ['lib/netstandard1.1/xunit.core.dll', 'lib/netstandard1.1/xunit.core.xml'], 'netstandard2.0': ['lib/netstandard1.1/xunit.core.dll', 'lib/netstandard1.1/xunit.core.xml']}, mono_files=['lib/net452/xunit.core.dll', 'lib/net452/xunit.core.dll.tdnet', 'lib/net452/xunit.core.xml', 'lib/net452/xunit.runner.tdnet.dll', 'lib/net452/xunit.runner.utility.net452.dll'])
nuget_package(name='xunit.extensibility.execution', package='xunit.extensibility.execution', version='2.4.1', sha256='2a6284760b14ab8cee409dac689034613d42219d80ba164be55edc1760a771dd', core_lib={'netcoreapp2.0': 'lib/netstandard1.1/xunit.execution.dotnet.dll', 'netcoreapp2.1': 'lib/netstandard1.1/xunit.execution.dotnet.dll'}, net_lib={'net45': 'lib/netstandard1.1/xunit.execution.dotnet.dll', 'net451': 'lib/netstandard1.1/xunit.execution.dotnet.dll', 'net452': 'lib/net452/xunit.execution.desktop.dll', 'net46': 'lib/net452/xunit.execution.desktop.dll', 'net461': 'lib/net452/xunit.execution.desktop.dll', 'net462': 'lib/net452/xunit.execution.desktop.dll', 'net47': 'lib/net452/xunit.execution.desktop.dll', 'net471': 'lib/net452/xunit.execution.desktop.dll', 'net472': 'lib/net452/xunit.execution.desktop.dll', 'netstandard1.1': 'lib/netstandard1.1/xunit.execution.dotnet.dll', 'netstandard1.2': 'lib/netstandard1.1/xunit.execution.dotnet.dll', 'netstandard1.3': 'lib/netstandard1.1/xunit.execution.dotnet.dll', 'netstandard1.4': 'lib/netstandard1.1/xunit.execution.dotnet.dll', 'netstandard1.5': 'lib/netstandard1.1/xunit.execution.dotnet.dll', 'netstandard1.6': 'lib/netstandard1.1/xunit.execution.dotnet.dll', 'netstandard2.0': 'lib/netstandard1.1/xunit.execution.dotnet.dll'}, mono_lib='lib/net452/xunit.execution.desktop.dll', core_deps={'netcoreapp2.0': ['@xunit.extensibility.core//:netcoreapp2.0_core'], 'netcoreapp2.1': ['@xunit.extensibility.core//:netcoreapp2.1_core']}, net_deps={'net45': ['@xunit.extensibility.core//:net45_net'], 'net451': ['@xunit.extensibility.core//:net451_net'], 'net452': ['@xunit.extensibility.core//:net452_net'], 'net46': ['@xunit.extensibility.core//:net46_net'], 'net461': ['@xunit.extensibility.core//:net461_net'], 'net462': ['@xunit.extensibility.core//:net462_net'], 'net47': ['@xunit.extensibility.core//:net47_net'], 'net471': ['@xunit.extensibility.core//:net471_net'], 'net472': ['@xunit.extensibility.core//:net472_net'], 'netstandard1.1': ['@xunit.extensibility.core//:netstandard1.1_net'], 'netstandard1.2': ['@xunit.extensibility.core//:netstandard1.2_net'], 'netstandard1.3': ['@xunit.extensibility.core//:netstandard1.3_net'], 'netstandard1.4': ['@xunit.extensibility.core//:netstandard1.4_net'], 'netstandard1.5': ['@xunit.extensibility.core//:netstandard1.5_net'], 'netstandard1.6': ['@xunit.extensibility.core//:netstandard1.6_net'], 'netstandard2.0': ['@xunit.extensibility.core//:netstandard2.0_net']}, mono_deps=['@xunit.extensibility.core//:mono'], core_files={'netcoreapp2.0': ['lib/netstandard1.1/xunit.execution.dotnet.dll', 'lib/netstandard1.1/xunit.execution.dotnet.xml'], 'netcoreapp2.1': ['lib/netstandard1.1/xunit.execution.dotnet.dll', 'lib/netstandard1.1/xunit.execution.dotnet.xml']}, net_files={'net45': ['lib/netstandard1.1/xunit.execution.dotnet.dll', 'lib/netstandard1.1/xunit.execution.dotnet.xml'], 'net451': ['lib/netstandard1.1/xunit.execution.dotnet.dll', 'lib/netstandard1.1/xunit.execution.dotnet.xml'], 'net452': ['lib/net452/xunit.execution.desktop.dll', 'lib/net452/xunit.execution.desktop.xml'], 'net46': ['lib/net452/xunit.execution.desktop.dll', 'lib/net452/xunit.execution.desktop.xml'], 'net461': ['lib/net452/xunit.execution.desktop.dll', 'lib/net452/xunit.execution.desktop.xml'], 'net462': ['lib/net452/xunit.execution.desktop.dll', 'lib/net452/xunit.execution.desktop.xml'], 'net47': ['lib/net452/xunit.execution.desktop.dll', 'lib/net452/xunit.execution.desktop.xml'], 'net471': ['lib/net452/xunit.execution.desktop.dll', 'lib/net452/xunit.execution.desktop.xml'], 'net472': ['lib/net452/xunit.execution.desktop.dll', 'lib/net452/xunit.execution.desktop.xml'], 'netstandard1.1': ['lib/netstandard1.1/xunit.execution.dotnet.dll', 'lib/netstandard1.1/xunit.execution.dotnet.xml'], 'netstandard1.2': ['lib/netstandard1.1/xunit.execution.dotnet.dll', 'lib/netstandard1.1/xunit.execution.dotnet.xml'], 'netstandard1.3': ['lib/netstandard1.1/xunit.execution.dotnet.dll', 'lib/netstandard1.1/xunit.execution.dotnet.xml'], 'netstandard1.4': ['lib/netstandard1.1/xunit.execution.dotnet.dll', 'lib/netstandard1.1/xunit.execution.dotnet.xml'], 'netstandard1.5': ['lib/netstandard1.1/xunit.execution.dotnet.dll', 'lib/netstandard1.1/xunit.execution.dotnet.xml'], 'netstandard1.6': ['lib/netstandard1.1/xunit.execution.dotnet.dll', 'lib/netstandard1.1/xunit.execution.dotnet.xml'], 'netstandard2.0': ['lib/netstandard1.1/xunit.execution.dotnet.dll', 'lib/netstandard1.1/xunit.execution.dotnet.xml']}, mono_files=['lib/net452/xunit.execution.desktop.dll', 'lib/net452/xunit.execution.desktop.xml'])
nuget_package(name='xunit.core', package='xunit.core', version='2.4.1', sha256='2a05200082483c7439550e05881fa2e6ed895d26319af30257ccd73f891ccbda', core_deps={'netcoreapp2.0': ['@xunit.extensibility.core//:netcoreapp2.0_core', '@xunit.extensibility.execution//:netcoreapp2.0_core'], 'netcoreapp2.1': ['@xunit.extensibility.core//:netcoreapp2.1_core', '@xunit.extensibility.execution//:netcoreapp2.1_core']}, net_deps={'net45': ['@xunit.extensibility.core//:net45_net', '@xunit.extensibility.execution//:net45_net'], 'net451': ['@xunit.extensibility.core//:net451_net', '@xunit.extensibility.execution//:net451_net'], 'net452': ['@xunit.extensibility.core//:net452_net', '@xunit.extensibility.execution//:net452_net'], 'net46': ['@xunit.extensibility.core//:net46_net', '@xunit.extensibility.execution//:net46_net'], 'net461': ['@xunit.extensibility.core//:net461_net', '@xunit.extensibility.execution//:net461_net'], 'net462': ['@xunit.extensibility.core//:net462_net', '@xunit.extensibility.execution//:net462_net'], 'net47': ['@xunit.extensibility.core//:net47_net', '@xunit.extensibility.execution//:net47_net'], 'net471': ['@xunit.extensibility.core//:net471_net', '@xunit.extensibility.execution//:net471_net'], 'net472': ['@xunit.extensibility.core//:net472_net', '@xunit.extensibility.execution//:net472_net'], 'netstandard1.0': ['@xunit.extensibility.core//:netstandard1.0_net', '@xunit.extensibility.execution//:netstandard1.0_net'], 'netstandard1.1': ['@xunit.extensibility.core//:netstandard1.1_net', '@xunit.extensibility.execution//:netstandard1.1_net'], 'netstandard1.2': ['@xunit.extensibility.core//:netstandard1.2_net', '@xunit.extensibility.execution//:netstandard1.2_net'], 'netstandard1.3': ['@xunit.extensibility.core//:netstandard1.3_net', '@xunit.extensibility.execution//:netstandard1.3_net'], 'netstandard1.4': ['@xunit.extensibility.core//:netstandard1.4_net', '@xunit.extensibility.execution//:netstandard1.4_net'], 'netstandard1.5': ['@xunit.extensibility.core//:netstandard1.5_net', '@xunit.extensibility.execution//:netstandard1.5_net'], 'netstandard1.6': ['@xunit.extensibility.core//:netstandard1.6_net', '@xunit.extensibility.execution//:netstandard1.6_net'], 'netstandard2.0': ['@xunit.extensibility.core//:netstandard2.0_net', '@xunit.extensibility.execution//:netstandard2.0_net']}, mono_deps=['@xunit.extensibility.core//:mono', '@xunit.extensibility.execution//:mono'])
nuget_package(name='xunit', package='xunit', version='2.4.1', sha256='4060ee134667b31c8424e34ff06709f343e63de6fe39ac307525bccbbd9ac375', core_deps={'netcoreapp2.0': ['@xunit.core//:netcoreapp2.0_core', '@xunit.assert//:netcoreapp2.0_core', '@xunit.analyzers//:netcoreapp2.0_core'], 'netcoreapp2.1': ['@xunit.core//:netcoreapp2.1_core', '@xunit.assert//:netcoreapp2.1_core', '@xunit.analyzers//:netcoreapp2.1_core']}, net_deps={'net45': ['@xunit.core//:net45_net', '@xunit.assert//:net45_net', '@xunit.analyzers//:net45_net'], 'net451': ['@xunit.core//:net451_net', '@xunit.assert//:net451_net', '@xunit.analyzers//:net451_net'], 'net452': ['@xunit.core//:net452_net', '@xunit.assert//:net452_net', '@xunit.analyzers//:net452_net'], 'net46': ['@xunit.core//:net46_net', '@xunit.assert//:net46_net', '@xunit.analyzers//:net46_net'], 'net461': ['@xunit.core//:net461_net', '@xunit.assert//:net461_net', '@xunit.analyzers//:net461_net'], 'net462': ['@xunit.core//:net462_net', '@xunit.assert//:net462_net', '@xunit.analyzers//:net462_net'], 'net47': ['@xunit.core//:net47_net', '@xunit.assert//:net47_net', '@xunit.analyzers//:net47_net'], 'net471': ['@xunit.core//:net471_net', '@xunit.assert//:net471_net', '@xunit.analyzers//:net471_net'], 'net472': ['@xunit.core//:net472_net', '@xunit.assert//:net472_net', '@xunit.analyzers//:net472_net'], 'netstandard1.0': ['@xunit.core//:netstandard1.0_net', '@xunit.assert//:netstandard1.0_net', '@xunit.analyzers//:netstandard1.0_net'], 'netstandard1.1': ['@xunit.core//:netstandard1.1_net', '@xunit.assert//:netstandard1.1_net', '@xunit.analyzers//:netstandard1.1_net'], 'netstandard1.2': ['@xunit.core//:netstandard1.2_net', '@xunit.assert//:netstandard1.2_net', '@xunit.analyzers//:netstandard1.2_net'], 'netstandard1.3': ['@xunit.core//:netstandard1.3_net', '@xunit.assert//:netstandard1.3_net', '@xunit.analyzers//:netstandard1.3_net'], 'netstandard1.4': ['@xunit.core//:netstandard1.4_net', '@xunit.assert//:netstandard1.4_net', '@xunit.analyzers//:netstandard1.4_net'], 'netstandard1.5': ['@xunit.core//:netstandard1.5_net', '@xunit.assert//:netstandard1.5_net', '@xunit.analyzers//:netstandard1.5_net'], 'netstandard1.6': ['@xunit.core//:netstandard1.6_net', '@xunit.assert//:netstandard1.6_net', '@xunit.analyzers//:netstandard1.6_net'], 'netstandard2.0': ['@xunit.core//:netstandard2.0_net', '@xunit.assert//:netstandard2.0_net', '@xunit.analyzers//:netstandard2.0_net']}, mono_deps=['@xunit.core//:mono', '@xunit.assert//:mono', '@xunit.analyzers//:mono']) |
def test(tested_mod, Assert):
test_cases = [
# (expected, inputs)
([], []),
([1, 3, 5, 6], [1, 3, 5, 6]),
([1], [1, 1, 1]),
([3, 1, 5, 2], [3, 1, 1, 5, 2, 2, 2])
]
return Assert.all(tested_mod.loesche_doppelte, test_cases)
| def test(tested_mod, Assert):
test_cases = [([], []), ([1, 3, 5, 6], [1, 3, 5, 6]), ([1], [1, 1, 1]), ([3, 1, 5, 2], [3, 1, 1, 5, 2, 2, 2])]
return Assert.all(tested_mod.loesche_doppelte, test_cases) |
class Solution:
def inorderTraversal(self, root: TreeNode) -> List[int]:
trans_list=[]
if root==None:
return []
else:
trans_list+=self.inorderTraversal(root.left)
trans_list.append(root.val)
trans_list+=self.inorderTraversal(root.right)
return trans_list | class Solution:
def inorder_traversal(self, root: TreeNode) -> List[int]:
trans_list = []
if root == None:
return []
else:
trans_list += self.inorderTraversal(root.left)
trans_list.append(root.val)
trans_list += self.inorderTraversal(root.right)
return trans_list |
# ========================
# Information
# ========================
# Direct Link: https://www.hackerrank.com/challenges/find-second-maximum-number-in-a-list/problem
# Difficulty: Easy
# Max Score: 10
# Language: Python
# ========================
# Solution
# ========================
N = int(input())
ARRAY = map(int, input().split())
MY_LIST = list(ARRAY)
MY_LIST.sort()
HIGHEST_NUMBER = max(MY_LIST)
for i in range(len(MY_LIST)-1, -1, -1):
if MY_LIST[i] < HIGHEST_NUMBER:
break
print(MY_LIST[i])
| n = int(input())
array = map(int, input().split())
my_list = list(ARRAY)
MY_LIST.sort()
highest_number = max(MY_LIST)
for i in range(len(MY_LIST) - 1, -1, -1):
if MY_LIST[i] < HIGHEST_NUMBER:
break
print(MY_LIST[i]) |
# Copyright (c) Vera Galstyan Feb 2018
restaurant = input("How many people are in your group: ")
if int(restaurant)>=8:
print("You have to wait for a table, because you are " + restaurant)
else:
print("Your table is ready, because you are " + restaurant) | restaurant = input('How many people are in your group: ')
if int(restaurant) >= 8:
print('You have to wait for a table, because you are ' + restaurant)
else:
print('Your table is ready, because you are ' + restaurant) |
if exists("1580195068422.png"):
click("1580195068422.png")
if exists("1580196282023.png"):
click("1580196282023.png")
click("1580193456450.png")
sleep(1)
click("1580193473300.png")
sleep(1)
click("1580193506111.png")
sleep(1)
click("1580193456450.png")
click("1580193641655.png")
click("1580193668585.png")
click(Pattern("1580193691183.png").targetOffset(-125,1))
click(Pattern("1580193722709.png").targetOffset(-35,0))
click(Pattern("1580193738511.png").targetOffset(-41,0))
click(Pattern("1580193761791.png").targetOffset(-40,-1))
click(Pattern("1580193778893.png").targetOffset(-49,1))
click("1580193795299.png")
click("1580193805208.png")
exit(0) | if exists('1580195068422.png'):
click('1580195068422.png')
if exists('1580196282023.png'):
click('1580196282023.png')
click('1580193456450.png')
sleep(1)
click('1580193473300.png')
sleep(1)
click('1580193506111.png')
sleep(1)
click('1580193456450.png')
click('1580193641655.png')
click('1580193668585.png')
click(pattern('1580193691183.png').targetOffset(-125, 1))
click(pattern('1580193722709.png').targetOffset(-35, 0))
click(pattern('1580193738511.png').targetOffset(-41, 0))
click(pattern('1580193761791.png').targetOffset(-40, -1))
click(pattern('1580193778893.png').targetOffset(-49, 1))
click('1580193795299.png')
click('1580193805208.png')
exit(0) |
lines = []
with open("input.txt") as f:
lines = f.readlines()
width = 31
def calc_hits(right_steps, down_steps, lines):
right_pos = right_steps
down_pos = down_steps
trees_hit = 0
while down_pos < len(lines):
if lines[down_pos][right_pos] == '#':
trees_hit += 1
down_pos += down_steps
right_pos = (right_pos + right_steps) % width
return trees_hit
print("Hit trees on the way down (1 right, 1 down): " + str(calc_hits(1, 1, lines)))
print("Hit trees on the way down (3 right, 1 down): " + str(calc_hits(3, 1, lines)))
print("Hit trees on the way down (5 right, 1 down): " + str(calc_hits(5, 1, lines)))
print("Hit trees on the way down (7 right, 1 down): " + str(calc_hits(7, 1, lines)))
print("Hit trees on the way down (1 right, 2 down): " + str(calc_hits(1, 2, lines)))
| lines = []
with open('input.txt') as f:
lines = f.readlines()
width = 31
def calc_hits(right_steps, down_steps, lines):
right_pos = right_steps
down_pos = down_steps
trees_hit = 0
while down_pos < len(lines):
if lines[down_pos][right_pos] == '#':
trees_hit += 1
down_pos += down_steps
right_pos = (right_pos + right_steps) % width
return trees_hit
print('Hit trees on the way down (1 right, 1 down): ' + str(calc_hits(1, 1, lines)))
print('Hit trees on the way down (3 right, 1 down): ' + str(calc_hits(3, 1, lines)))
print('Hit trees on the way down (5 right, 1 down): ' + str(calc_hits(5, 1, lines)))
print('Hit trees on the way down (7 right, 1 down): ' + str(calc_hits(7, 1, lines)))
print('Hit trees on the way down (1 right, 2 down): ' + str(calc_hits(1, 2, lines))) |
#import urllib
#from lxml import html
#url = "https://material-ui.com/customization/color/"
#page = html.fromstring(urllib.urlopen(url).read())
#colors={}
#for color in page.xpath("//*[@class='jss260']"):
# colorName = color.xpath(".//*[@class='jss257']/text()")[0]
# value = {}
# for val in color.xpath(".//*[@class='jss259']"):
# value[val.xpath("./span[1]/text()")[0]] = val.xpath("./span[2]/text()")[0]
# colors[colorName]=value
#print(colors)
colors={'pink': {'200': '#f48fb1', '900': '#880e4f', '600': '#d81b60', 'A100': '#ff80ab', '300': '#f06292', 'A400': '#f50057', '700': '#c2185b', '50': '#fce4ec', 'A700': '#c51162', '400': '#ec407a', '100': '#f8bbd0', '800': '#ad1457', 'A200': '#ff4081', '500': '#e91e63'}, 'blue': {'200': '#90caf9', '900': '#0d47a1', '600': '#1e88e5', 'A100': '#82b1ff', '300': '#64b5f6', 'A400': '#2979ff', '700': '#1976d2', '50': '#e3f2fd', 'A700': '#2962ff', '400': '#42a5f5', '100': '#bbdefb', '800': '#1565c0', 'A200': '#448aff', '500': '#2196f3'}, 'indigo': {'200': '#9fa8da', '900': '#1a237e', '600': '#3949ab', 'A100': '#8c9eff', '300': '#7986cb', 'A400': '#3d5afe', '700': '#303f9f', '50': '#e8eaf6', 'A700': '#304ffe', '400': '#5c6bc0', '100': '#c5cae9', '800': '#283593', 'A200': '#536dfe', '500': '#3f51b5'}, 'blueGrey': {'200': '#b0bec5', '900': '#263238', '600': '#546e7a', '300': '#90a4ae', '700': '#455a64', '50': '#eceff1', '400': '#78909c', '100': '#cfd8dc', '800': '#37474f', '500': '#607d8b'}, 'brown': {'200': '#bcaaa4', '900': '#3e2723', '600': '#6d4c41', '300': '#a1887f', '700': '#5d4037', '50': '#efebe9', '400': '#8d6e63', '100': '#d7ccc8', '800': '#4e342e', '500': '#795548'}, 'lightBlue': {'200': '#81d4fa', '900': '#01579b', '600': '#039be5', 'A100': '#80d8ff', '300': '#4fc3f7', 'A400': '#00b0ff', '700': '#0288d1', '50': '#e1f5fe', 'A700': '#0091ea', '400': '#29b6f6', '100': '#b3e5fc', '800': '#0277bd', 'A200': '#40c4ff', '500': '#03a9f4'}, 'purple': {'200': '#ce93d8', '900': '#4a148c', '600': '#8e24aa', 'A100': '#ea80fc', '300': '#ba68c8', 'A400': '#d500f9', '700': '#7b1fa2', '50': '#f3e5f5', 'A700': '#aa00ff', '400': '#ab47bc', '100': '#e1bee7', '800': '#6a1b9a', 'A200': '#e040fb', '500': '#9c27b0'}, 'deepOrange': {'200': '#ffab91', '900': '#bf360c', '600': '#f4511e', 'A100': '#ff9e80', '300': '#ff8a65', 'A400': '#ff3d00', '700': '#e64a19', '50': '#fbe9e7', 'A700': '#dd2c00', '400': '#ff7043', '100': '#ffccbc', '800': '#d84315', 'A200': '#ff6e40', '500': '#ff5722'}, 'yellow': {'200': '#fff59d', '900': '#f57f17', '600': '#fdd835', 'A100': '#ffff8d', '300': '#fff176', 'A400': '#ffea00', '700': '#fbc02d', '50': '#fffde7', 'A700': '#ffd600', '400': '#ffee58', '100': '#fff9c4', '800': '#f9a825', 'A200': '#ffff00', '500': '#ffeb3b'}, 'lightGreen': {'200': '#c5e1a5', '900': '#33691e', '600': '#7cb342', 'A100': '#ccff90', '300': '#aed581', 'A400': '#76ff03', '700': '#689f38', '50': '#f1f8e9', 'A700': '#64dd17', '400': '#9ccc65', '100': '#dcedc8', '800': '#558b2f', 'A200': '#b2ff59', '500': '#8bc34a'}, 'grey': {'200': '#eeeeee', '900': '#212121', '600': '#757575', '300': '#e0e0e0', '700': '#616161', '50': '#fafafa', '400': '#bdbdbd', '100': '#f5f5f5', '800': '#424242', '500': '#9e9e9e'}, 'amber': {'200': '#ffe082', '900': '#ff6f00', '600': '#ffb300', 'A100': '#ffe57f', '300': '#ffd54f', 'A400': '#ffc400', '700': '#ffa000', '50': '#fff8e1', 'A700': '#ffab00', '400': '#ffca28', '100': '#ffecb3', '800': '#ff8f00', 'A200': '#ffd740', '500': '#ffc107'}, 'green': {'200': '#a5d6a7', '900': '#1b5e20', '600': '#43a047', 'A100': '#b9f6ca', '300': '#81c784', 'A400': '#00e676', '700': '#388e3c', '50': '#e8f5e9', 'A700': '#00c853', '400': '#66bb6a', '100': '#c8e6c9', '800': '#2e7d32', 'A200': '#69f0ae', '500': '#4caf50'}, 'red': {'200': '#ef9a9a', '900': '#b71c1c', '600': '#e53935', 'A100': '#ff8a80', '300': '#e57373', 'A400': '#ff1744', '700': '#d32f2f', '50': '#ffebee', 'A700': '#d50000', '400': '#ef5350', '100': '#ffcdd2', '800': '#c62828', 'A200': '#ff5252', '500': '#f44336'}, 'teal': {'200': '#80cbc4', '900': '#004d40', '600': '#00897b', 'A100': '#a7ffeb', '300': '#4db6ac', 'A400': '#1de9b6', '700': '#00796b', '50': '#e0f2f1', 'A700': '#00bfa5', '400': '#26a69a', '100': '#b2dfdb', '800': '#00695c', 'A200': '#64ffda', '500': '#009688'}, 'orange': {'200': '#ffcc80', '900': '#e65100', '600': '#fb8c00', 'A100': '#ffd180', '300': '#ffb74d', 'A400': '#ff9100', '700': '#f57c00', '50': '#fff3e0', 'A700': '#ff6d00', '400': '#ffa726', '100': '#ffe0b2', '800': '#ef6c00', 'A200': '#ffab40', '500': '#ff9800'}, 'cyan': {'200': '#80deea', '900': '#006064', '600': '#00acc1', 'A100': '#84ffff', '300': '#4dd0e1', 'A400': '#00e5ff', '700': '#0097a7', '50': '#e0f7fa', 'A700': '#00b8d4', '400': '#26c6da', '100': '#b2ebf2', '800': '#00838f', 'A200': '#18ffff', '500': '#00bcd4'}, 'deepPurple': {'200': '#b39ddb', '900': '#311b92', '600': '#5e35b1', 'A100': '#b388ff', '300': '#9575cd', 'A400': '#651fff', '700': '#512da8', '50': '#ede7f6', 'A700': '#6200ea', '400': '#7e57c2', '100': '#d1c4e9', '800': '#4527a0', 'A200': '#7c4dff', '500': '#673ab7'}, 'lime': {'200': '#e6ee9c', '900': '#827717', '600': '#c0ca33', 'A100': '#f4ff81', '300': '#dce775', 'A400': '#c6ff00', '700': '#afb42b', '50': '#f9fbe7', 'A700': '#aeea00', '400': '#d4e157', '100': '#f0f4c3', '800': '#9e9d24', 'A200': '#eeff41', '500': '#cddc39'}}
for primary in colors:
for accent in colors:
if primary != accent:
filein = file('template_color.css')
txt = filein.read()
for val in colors[primary]:
txt = txt.replace('Primary'+val, colors[primary][val])
for val in colors[accent]:
txt = txt.replace('Accent'+val, colors[accent][val])
fileout = file('color-'+primary+'-'+accent+'.css', 'w')
fileout.write(txt)
fileout.close()
filein.close()
| colors = {'pink': {'200': '#f48fb1', '900': '#880e4f', '600': '#d81b60', 'A100': '#ff80ab', '300': '#f06292', 'A400': '#f50057', '700': '#c2185b', '50': '#fce4ec', 'A700': '#c51162', '400': '#ec407a', '100': '#f8bbd0', '800': '#ad1457', 'A200': '#ff4081', '500': '#e91e63'}, 'blue': {'200': '#90caf9', '900': '#0d47a1', '600': '#1e88e5', 'A100': '#82b1ff', '300': '#64b5f6', 'A400': '#2979ff', '700': '#1976d2', '50': '#e3f2fd', 'A700': '#2962ff', '400': '#42a5f5', '100': '#bbdefb', '800': '#1565c0', 'A200': '#448aff', '500': '#2196f3'}, 'indigo': {'200': '#9fa8da', '900': '#1a237e', '600': '#3949ab', 'A100': '#8c9eff', '300': '#7986cb', 'A400': '#3d5afe', '700': '#303f9f', '50': '#e8eaf6', 'A700': '#304ffe', '400': '#5c6bc0', '100': '#c5cae9', '800': '#283593', 'A200': '#536dfe', '500': '#3f51b5'}, 'blueGrey': {'200': '#b0bec5', '900': '#263238', '600': '#546e7a', '300': '#90a4ae', '700': '#455a64', '50': '#eceff1', '400': '#78909c', '100': '#cfd8dc', '800': '#37474f', '500': '#607d8b'}, 'brown': {'200': '#bcaaa4', '900': '#3e2723', '600': '#6d4c41', '300': '#a1887f', '700': '#5d4037', '50': '#efebe9', '400': '#8d6e63', '100': '#d7ccc8', '800': '#4e342e', '500': '#795548'}, 'lightBlue': {'200': '#81d4fa', '900': '#01579b', '600': '#039be5', 'A100': '#80d8ff', '300': '#4fc3f7', 'A400': '#00b0ff', '700': '#0288d1', '50': '#e1f5fe', 'A700': '#0091ea', '400': '#29b6f6', '100': '#b3e5fc', '800': '#0277bd', 'A200': '#40c4ff', '500': '#03a9f4'}, 'purple': {'200': '#ce93d8', '900': '#4a148c', '600': '#8e24aa', 'A100': '#ea80fc', '300': '#ba68c8', 'A400': '#d500f9', '700': '#7b1fa2', '50': '#f3e5f5', 'A700': '#aa00ff', '400': '#ab47bc', '100': '#e1bee7', '800': '#6a1b9a', 'A200': '#e040fb', '500': '#9c27b0'}, 'deepOrange': {'200': '#ffab91', '900': '#bf360c', '600': '#f4511e', 'A100': '#ff9e80', '300': '#ff8a65', 'A400': '#ff3d00', '700': '#e64a19', '50': '#fbe9e7', 'A700': '#dd2c00', '400': '#ff7043', '100': '#ffccbc', '800': '#d84315', 'A200': '#ff6e40', '500': '#ff5722'}, 'yellow': {'200': '#fff59d', '900': '#f57f17', '600': '#fdd835', 'A100': '#ffff8d', '300': '#fff176', 'A400': '#ffea00', '700': '#fbc02d', '50': '#fffde7', 'A700': '#ffd600', '400': '#ffee58', '100': '#fff9c4', '800': '#f9a825', 'A200': '#ffff00', '500': '#ffeb3b'}, 'lightGreen': {'200': '#c5e1a5', '900': '#33691e', '600': '#7cb342', 'A100': '#ccff90', '300': '#aed581', 'A400': '#76ff03', '700': '#689f38', '50': '#f1f8e9', 'A700': '#64dd17', '400': '#9ccc65', '100': '#dcedc8', '800': '#558b2f', 'A200': '#b2ff59', '500': '#8bc34a'}, 'grey': {'200': '#eeeeee', '900': '#212121', '600': '#757575', '300': '#e0e0e0', '700': '#616161', '50': '#fafafa', '400': '#bdbdbd', '100': '#f5f5f5', '800': '#424242', '500': '#9e9e9e'}, 'amber': {'200': '#ffe082', '900': '#ff6f00', '600': '#ffb300', 'A100': '#ffe57f', '300': '#ffd54f', 'A400': '#ffc400', '700': '#ffa000', '50': '#fff8e1', 'A700': '#ffab00', '400': '#ffca28', '100': '#ffecb3', '800': '#ff8f00', 'A200': '#ffd740', '500': '#ffc107'}, 'green': {'200': '#a5d6a7', '900': '#1b5e20', '600': '#43a047', 'A100': '#b9f6ca', '300': '#81c784', 'A400': '#00e676', '700': '#388e3c', '50': '#e8f5e9', 'A700': '#00c853', '400': '#66bb6a', '100': '#c8e6c9', '800': '#2e7d32', 'A200': '#69f0ae', '500': '#4caf50'}, 'red': {'200': '#ef9a9a', '900': '#b71c1c', '600': '#e53935', 'A100': '#ff8a80', '300': '#e57373', 'A400': '#ff1744', '700': '#d32f2f', '50': '#ffebee', 'A700': '#d50000', '400': '#ef5350', '100': '#ffcdd2', '800': '#c62828', 'A200': '#ff5252', '500': '#f44336'}, 'teal': {'200': '#80cbc4', '900': '#004d40', '600': '#00897b', 'A100': '#a7ffeb', '300': '#4db6ac', 'A400': '#1de9b6', '700': '#00796b', '50': '#e0f2f1', 'A700': '#00bfa5', '400': '#26a69a', '100': '#b2dfdb', '800': '#00695c', 'A200': '#64ffda', '500': '#009688'}, 'orange': {'200': '#ffcc80', '900': '#e65100', '600': '#fb8c00', 'A100': '#ffd180', '300': '#ffb74d', 'A400': '#ff9100', '700': '#f57c00', '50': '#fff3e0', 'A700': '#ff6d00', '400': '#ffa726', '100': '#ffe0b2', '800': '#ef6c00', 'A200': '#ffab40', '500': '#ff9800'}, 'cyan': {'200': '#80deea', '900': '#006064', '600': '#00acc1', 'A100': '#84ffff', '300': '#4dd0e1', 'A400': '#00e5ff', '700': '#0097a7', '50': '#e0f7fa', 'A700': '#00b8d4', '400': '#26c6da', '100': '#b2ebf2', '800': '#00838f', 'A200': '#18ffff', '500': '#00bcd4'}, 'deepPurple': {'200': '#b39ddb', '900': '#311b92', '600': '#5e35b1', 'A100': '#b388ff', '300': '#9575cd', 'A400': '#651fff', '700': '#512da8', '50': '#ede7f6', 'A700': '#6200ea', '400': '#7e57c2', '100': '#d1c4e9', '800': '#4527a0', 'A200': '#7c4dff', '500': '#673ab7'}, 'lime': {'200': '#e6ee9c', '900': '#827717', '600': '#c0ca33', 'A100': '#f4ff81', '300': '#dce775', 'A400': '#c6ff00', '700': '#afb42b', '50': '#f9fbe7', 'A700': '#aeea00', '400': '#d4e157', '100': '#f0f4c3', '800': '#9e9d24', 'A200': '#eeff41', '500': '#cddc39'}}
for primary in colors:
for accent in colors:
if primary != accent:
filein = file('template_color.css')
txt = filein.read()
for val in colors[primary]:
txt = txt.replace('Primary' + val, colors[primary][val])
for val in colors[accent]:
txt = txt.replace('Accent' + val, colors[accent][val])
fileout = file('color-' + primary + '-' + accent + '.css', 'w')
fileout.write(txt)
fileout.close()
filein.close() |
#
# PySNMP MIB module CISCO-DYNAMIC-ARP-INSPECTION-CAPABILITY (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-DYNAMIC-ARP-INSPECTION-CAPABILITY
# Produced by pysmi-0.3.4 at Wed May 1 11:56:22 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
Integer, OctetString, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "Integer", "OctetString", "ObjectIdentifier")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueSizeConstraint, ValueRangeConstraint, ConstraintsUnion, ConstraintsIntersection, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "ValueRangeConstraint", "ConstraintsUnion", "ConstraintsIntersection", "SingleValueConstraint")
ciscoAgentCapability, = mibBuilder.importSymbols("CISCO-SMI", "ciscoAgentCapability")
ModuleCompliance, AgentCapabilities, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "AgentCapabilities", "NotificationGroup")
iso, NotificationType, Integer32, IpAddress, MibScalar, MibTable, MibTableRow, MibTableColumn, Counter32, ModuleIdentity, Counter64, Gauge32, ObjectIdentity, MibIdentifier, Unsigned32, TimeTicks, Bits = mibBuilder.importSymbols("SNMPv2-SMI", "iso", "NotificationType", "Integer32", "IpAddress", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Counter32", "ModuleIdentity", "Counter64", "Gauge32", "ObjectIdentity", "MibIdentifier", "Unsigned32", "TimeTicks", "Bits")
DisplayString, TextualConvention, RowStatus = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention", "RowStatus")
ciscoDynamicArpInspCapability = ModuleIdentity((1, 3, 6, 1, 4, 1, 9, 7, 382))
ciscoDynamicArpInspCapability.setRevisions(('2011-03-24 00:00', '2010-05-07 00:00', '2007-07-02 00:00', '2004-01-13 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: ciscoDynamicArpInspCapability.setRevisionsDescriptions(('Added cdaiCapV15R0002SGPCat4K agent capability statement.', 'Added cdaiCapV12R0254SGPCat4K agent capability statement.', 'Added cdaiCapV12R0233SXHPCat6k agent capability statement.', 'Initial version of this MIB module.',))
if mibBuilder.loadTexts: ciscoDynamicArpInspCapability.setLastUpdated('201103240000Z')
if mibBuilder.loadTexts: ciscoDynamicArpInspCapability.setOrganization('Cisco Systems, Inc.')
if mibBuilder.loadTexts: ciscoDynamicArpInspCapability.setContactInfo('Cisco Systems Customer Service Postal: 170 West Tasman Drive San Jose, CA 95134 USA Tel: +1 800 553-NETS E-mail: cs-lan-switch-snmp@cisco.com')
if mibBuilder.loadTexts: ciscoDynamicArpInspCapability.setDescription('The capabilities description of CISCO-DYNAMIC-ARP-INSPECTION-MIB.')
cdaiCapabilityCatOSV08R0301Cat6k = AgentCapabilities((1, 3, 6, 1, 4, 1, 9, 7, 382, 1))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cdaiCapabilityCatOSV08R0301Cat6k = cdaiCapabilityCatOSV08R0301Cat6k.setProductRelease('Cisco CatOS 8.3(1) on Catalyst 6000/6500\n and Cisco 7600 series devices.')
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cdaiCapabilityCatOSV08R0301Cat6k = cdaiCapabilityCatOSV08R0301Cat6k.setStatus('current')
if mibBuilder.loadTexts: cdaiCapabilityCatOSV08R0301Cat6k.setDescription('CISCO-DYNAMIC-ARP-INSPECTION-MIB capabilities.')
cdaiCapV12R0233SXHPCat6k = AgentCapabilities((1, 3, 6, 1, 4, 1, 9, 7, 382, 2))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cdaiCapV12R0233SXHPCat6k = cdaiCapV12R0233SXHPCat6k.setProductRelease('Cisco IOS 12.2(33)SXH on Catalyst 6000/6500\n series devices.')
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cdaiCapV12R0233SXHPCat6k = cdaiCapV12R0233SXHPCat6k.setStatus('current')
if mibBuilder.loadTexts: cdaiCapV12R0233SXHPCat6k.setDescription('CISCO-DYNAMIC-ARP-INSPECTION-MIB capabilities.')
cdaiCapV12R0254SGPCat4K = AgentCapabilities((1, 3, 6, 1, 4, 1, 9, 7, 382, 3))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cdaiCapV12R0254SGPCat4K = cdaiCapV12R0254SGPCat4K.setProductRelease('Cisco IOS 12.2(54)SG on Cat4K family switches.')
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cdaiCapV12R0254SGPCat4K = cdaiCapV12R0254SGPCat4K.setStatus('current')
if mibBuilder.loadTexts: cdaiCapV12R0254SGPCat4K.setDescription('CISCO-DYNAMIC-ARP-INSPECTION-MIB capabilities.')
cdaiCapV15R0002SGPCat4K = AgentCapabilities((1, 3, 6, 1, 4, 1, 9, 7, 382, 4))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cdaiCapV15R0002SGPCat4K = cdaiCapV15R0002SGPCat4K.setProductRelease('Cisco IOS 15.0(2)SG on Cat4K family switches.')
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cdaiCapV15R0002SGPCat4K = cdaiCapV15R0002SGPCat4K.setStatus('current')
if mibBuilder.loadTexts: cdaiCapV15R0002SGPCat4K.setDescription('CISCO-DYNAMIC-ARP-INSPECTION-MIB capabilities.')
mibBuilder.exportSymbols("CISCO-DYNAMIC-ARP-INSPECTION-CAPABILITY", ciscoDynamicArpInspCapability=ciscoDynamicArpInspCapability, cdaiCapV12R0254SGPCat4K=cdaiCapV12R0254SGPCat4K, cdaiCapabilityCatOSV08R0301Cat6k=cdaiCapabilityCatOSV08R0301Cat6k, cdaiCapV15R0002SGPCat4K=cdaiCapV15R0002SGPCat4K, PYSNMP_MODULE_ID=ciscoDynamicArpInspCapability, cdaiCapV12R0233SXHPCat6k=cdaiCapV12R0233SXHPCat6k)
| (integer, octet_string, object_identifier) = mibBuilder.importSymbols('ASN1', 'Integer', 'OctetString', 'ObjectIdentifier')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(value_size_constraint, value_range_constraint, constraints_union, constraints_intersection, single_value_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueSizeConstraint', 'ValueRangeConstraint', 'ConstraintsUnion', 'ConstraintsIntersection', 'SingleValueConstraint')
(cisco_agent_capability,) = mibBuilder.importSymbols('CISCO-SMI', 'ciscoAgentCapability')
(module_compliance, agent_capabilities, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'AgentCapabilities', 'NotificationGroup')
(iso, notification_type, integer32, ip_address, mib_scalar, mib_table, mib_table_row, mib_table_column, counter32, module_identity, counter64, gauge32, object_identity, mib_identifier, unsigned32, time_ticks, bits) = mibBuilder.importSymbols('SNMPv2-SMI', 'iso', 'NotificationType', 'Integer32', 'IpAddress', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Counter32', 'ModuleIdentity', 'Counter64', 'Gauge32', 'ObjectIdentity', 'MibIdentifier', 'Unsigned32', 'TimeTicks', 'Bits')
(display_string, textual_convention, row_status) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention', 'RowStatus')
cisco_dynamic_arp_insp_capability = module_identity((1, 3, 6, 1, 4, 1, 9, 7, 382))
ciscoDynamicArpInspCapability.setRevisions(('2011-03-24 00:00', '2010-05-07 00:00', '2007-07-02 00:00', '2004-01-13 00:00'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts:
ciscoDynamicArpInspCapability.setRevisionsDescriptions(('Added cdaiCapV15R0002SGPCat4K agent capability statement.', 'Added cdaiCapV12R0254SGPCat4K agent capability statement.', 'Added cdaiCapV12R0233SXHPCat6k agent capability statement.', 'Initial version of this MIB module.'))
if mibBuilder.loadTexts:
ciscoDynamicArpInspCapability.setLastUpdated('201103240000Z')
if mibBuilder.loadTexts:
ciscoDynamicArpInspCapability.setOrganization('Cisco Systems, Inc.')
if mibBuilder.loadTexts:
ciscoDynamicArpInspCapability.setContactInfo('Cisco Systems Customer Service Postal: 170 West Tasman Drive San Jose, CA 95134 USA Tel: +1 800 553-NETS E-mail: cs-lan-switch-snmp@cisco.com')
if mibBuilder.loadTexts:
ciscoDynamicArpInspCapability.setDescription('The capabilities description of CISCO-DYNAMIC-ARP-INSPECTION-MIB.')
cdai_capability_cat_osv08_r0301_cat6k = agent_capabilities((1, 3, 6, 1, 4, 1, 9, 7, 382, 1))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cdai_capability_cat_osv08_r0301_cat6k = cdaiCapabilityCatOSV08R0301Cat6k.setProductRelease('Cisco CatOS 8.3(1) on Catalyst 6000/6500\n and Cisco 7600 series devices.')
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cdai_capability_cat_osv08_r0301_cat6k = cdaiCapabilityCatOSV08R0301Cat6k.setStatus('current')
if mibBuilder.loadTexts:
cdaiCapabilityCatOSV08R0301Cat6k.setDescription('CISCO-DYNAMIC-ARP-INSPECTION-MIB capabilities.')
cdai_cap_v12_r0233_sxhp_cat6k = agent_capabilities((1, 3, 6, 1, 4, 1, 9, 7, 382, 2))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cdai_cap_v12_r0233_sxhp_cat6k = cdaiCapV12R0233SXHPCat6k.setProductRelease('Cisco IOS 12.2(33)SXH on Catalyst 6000/6500\n series devices.')
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cdai_cap_v12_r0233_sxhp_cat6k = cdaiCapV12R0233SXHPCat6k.setStatus('current')
if mibBuilder.loadTexts:
cdaiCapV12R0233SXHPCat6k.setDescription('CISCO-DYNAMIC-ARP-INSPECTION-MIB capabilities.')
cdai_cap_v12_r0254_sgp_cat4_k = agent_capabilities((1, 3, 6, 1, 4, 1, 9, 7, 382, 3))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cdai_cap_v12_r0254_sgp_cat4_k = cdaiCapV12R0254SGPCat4K.setProductRelease('Cisco IOS 12.2(54)SG on Cat4K family switches.')
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cdai_cap_v12_r0254_sgp_cat4_k = cdaiCapV12R0254SGPCat4K.setStatus('current')
if mibBuilder.loadTexts:
cdaiCapV12R0254SGPCat4K.setDescription('CISCO-DYNAMIC-ARP-INSPECTION-MIB capabilities.')
cdai_cap_v15_r0002_sgp_cat4_k = agent_capabilities((1, 3, 6, 1, 4, 1, 9, 7, 382, 4))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cdai_cap_v15_r0002_sgp_cat4_k = cdaiCapV15R0002SGPCat4K.setProductRelease('Cisco IOS 15.0(2)SG on Cat4K family switches.')
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cdai_cap_v15_r0002_sgp_cat4_k = cdaiCapV15R0002SGPCat4K.setStatus('current')
if mibBuilder.loadTexts:
cdaiCapV15R0002SGPCat4K.setDescription('CISCO-DYNAMIC-ARP-INSPECTION-MIB capabilities.')
mibBuilder.exportSymbols('CISCO-DYNAMIC-ARP-INSPECTION-CAPABILITY', ciscoDynamicArpInspCapability=ciscoDynamicArpInspCapability, cdaiCapV12R0254SGPCat4K=cdaiCapV12R0254SGPCat4K, cdaiCapabilityCatOSV08R0301Cat6k=cdaiCapabilityCatOSV08R0301Cat6k, cdaiCapV15R0002SGPCat4K=cdaiCapV15R0002SGPCat4K, PYSNMP_MODULE_ID=ciscoDynamicArpInspCapability, cdaiCapV12R0233SXHPCat6k=cdaiCapV12R0233SXHPCat6k) |
#!/usr/bin/env python3
digits = input()
skip = len(digits) // 2
print(sum(int(a) for a, b in zip(digits, digits[skip:]+digits[:skip]) if a == b))
| digits = input()
skip = len(digits) // 2
print(sum((int(a) for (a, b) in zip(digits, digits[skip:] + digits[:skip]) if a == b))) |
with open('input.txt', 'r') as file:
input = file.readlines()
input = [ line.strip() for line in input ]
def part1():
return
def part2():
return
print(part1())
print(part2()) | with open('input.txt', 'r') as file:
input = file.readlines()
input = [line.strip() for line in input]
def part1():
return
def part2():
return
print(part1())
print(part2()) |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# default settings for database schema router
DATABASE_ROUTERS = [ 'navigator.pgschema.routers.schemaRouter' ]
DATABASE_STATEMENT_TIMEOUT = 60000 # on milliseconds
DATABASE_COLLATION = 'UTF8'
DEBUG_SQL = True
DATABASE_TZ = 'UTC'
| database_routers = ['navigator.pgschema.routers.schemaRouter']
database_statement_timeout = 60000
database_collation = 'UTF8'
debug_sql = True
database_tz = 'UTC' |
n = int(input())
value = n * (n - 1) // 2
if n % 2 == 0:
print('Even' if value % 2 == 0 else 'Odd')
else:
print('Either')
| n = int(input())
value = n * (n - 1) // 2
if n % 2 == 0:
print('Even' if value % 2 == 0 else 'Odd')
else:
print('Either') |
# (C) Datadog, Inc. 2019-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
SECOND = 1
MILLISECOND = 1000
MICROSECOND = 1000000
NANOSECOND = 1000000000
TIME_UNITS = {'microsecond': MICROSECOND, 'millisecond': MILLISECOND, 'nanosecond': NANOSECOND, 'second': SECOND}
| second = 1
millisecond = 1000
microsecond = 1000000
nanosecond = 1000000000
time_units = {'microsecond': MICROSECOND, 'millisecond': MILLISECOND, 'nanosecond': NANOSECOND, 'second': SECOND} |
expected_output={
"interface":{
"GigabitEthernet3":{
"crypto_map_tag":"vpn-crypto-map",
"ident":{
1:{
"acl":"origin_is_acl,",
"action":"PERMIT",
"current_outbound_spi":"0x397C36EE(964441838)",
"dh_group":"none",
"inbound_ah_sas":{
},
"inbound_esp_sas":{
"spi":{
"0x658F7C11(1703902225)":{
"conn_id":2076,
"crypto_map":"vpn-crypto-map",
"flow_id":"CSR",
"flow_id_val":76,
"transform":"esp-256-aes esp-sha256-hmac",
"in_use_settings":"Tunnel, ",
"iv_size":"16 bytes",
"remaining_key_lifetime":"(4607999/83143)",
"replay_detection_support":"Y",
"sibling_flags":"FFFFFFFF80000048",
"status":"ACTIVE(ACTIVE)"
}
}
},
"inbound_pcp_sas":{
},
"ip_mtu_idb":"GigabitEthernet3",
"local_crypto_endpt":"1.1.1.2",
"local_ident":{
"addr":"20.20.20.0",
"mask":"255.255.255.0",
"port":"0",
"prot":"0"
},
"outbound_ah_sas":{
},
"outbound_esp_sas":{
"spi":{
"0x397C36EE(964441838)":{
"conn_id":2075,
"crypto_map":"vpn-crypto-map",
"flow_id":"CSR",
"flow_id_val":75,
"transform":"esp-256-aes esp-sha256-hmac",
"in_use_settings":"Tunnel, ",
"iv_size":"16 bytes",
"remaining_key_lifetime":"(4607999/83143)",
"replay_detection_support":"Y",
"sibling_flags":"FFFFFFFF80000048",
"status":"ACTIVE(ACTIVE)"
}
}
},
"outbound_pcp_sas":{
},
"path_mtu":1500,
"peer_ip":"1.1.1.1",
"pfs":"N",
"pkts_compr_failed":0,
"pkts_compressed":0,
"pkts_decaps":4,
"pkts_decompress_failed":0,
"pkts_decompressed":0,
"pkts_decrypt":4,
"pkts_internal_err_recv":0,
"pkts_internal_err_send":0,
"pkts_invalid_identity_recv":0,
"pkts_invalid_prot_recv":0,
"pkts_invalid_sa_rcv":0,
"pkts_no_sa_send":0,
"pkts_not_compressed":0,
"pkts_not_decompressed":0,
"pkts_not_tagged_send":0,
"pkts_not_untagged_rcv":0,
"pkts_replay_failed_rcv":0,
"pkts_replay_rollover_rcv":0,
"pkts_replay_rollover_send":0,
"pkts_tagged_send":0,
"pkts_untagged_rcv":0,
"pkts_verify":4,
"pkts_verify_failed":0,
"plaintext_mtu":1438,
"ip_mtu":1500,
"port":500,
"protected_vrf":"(none)",
"remote_crypto_endpt":"1.1.1.1",
"remote_ident":{
"addr":"10.10.10.0",
"mask":"255.255.255.0",
"port":"0",
"prot":"0"
}
},
2:{
"acl":"origin_is_acl,",
"action":"PERMIT",
"current_outbound_spi":"0x0(0)",
"dh_group":"none",
"inbound_ah_sas":{
},
"inbound_esp_sas":{
},
"inbound_pcp_sas":{
},
"ip_mtu_idb":"GigabitEthernet3",
"local_crypto_endpt":"1.1.1.2",
"local_ident":{
"addr":"40.40.40.0",
"mask":"255.255.255.0",
"port":"0",
"prot":"0"
},
"outbound_ah_sas":{
},
"outbound_esp_sas":{
},
"outbound_pcp_sas":{
},
"path_mtu":1500,
"peer_ip":"1.1.1.1",
"pfs":"N",
"pkts_compr_failed":0,
"pkts_compressed":0,
"pkts_decaps":0,
"pkts_decompress_failed":0,
"pkts_decompressed":0,
"pkts_decrypt":0,
"pkts_internal_err_recv":0,
"pkts_internal_err_send":0,
"pkts_invalid_identity_recv":0,
"pkts_invalid_prot_recv":0,
"pkts_invalid_sa_rcv":0,
"pkts_no_sa_send":0,
"pkts_not_compressed":0,
"pkts_not_decompressed":0,
"pkts_not_tagged_send":0,
"pkts_not_untagged_rcv":0,
"pkts_replay_failed_rcv":0,
"pkts_replay_rollover_rcv":0,
"pkts_replay_rollover_send":0,
"pkts_tagged_send":0,
"pkts_untagged_rcv":0,
"pkts_verify":0,
"pkts_verify_failed":0,
"plaintext_mtu":1500,
"port":500,
"ip_mtu":1500,
"protected_vrf":"(none)",
"remote_crypto_endpt":"1.1.1.1",
"remote_ident":{
"addr":"30.30.30.0",
"mask":"255.255.255.0",
"port":"0",
"prot":"0"
}
}
},
"local_addr":"1.1.1.2"
},
"Tunnel0":{
"crypto_map_tag":"Tunnel0-head-0",
"ident":{
1:{
"acl":"origin_is_acl,",
"action":"PERMIT",
"current_outbound_spi":"0x2E8482F8(780436216)",
"dh_group":"none",
"inbound_ah_sas":{
},
"inbound_esp_sas":{
"spi":{
"0xA54D38A4(2773301412)":{
"conn_id":2077,
"crypto_map":"Tunnel0-head-0",
"flow_id":"CSR",
"flow_id_val":77,
"transform":"esp-256-aes esp-sha256-hmac",
"in_use_settings":"Tunnel, ",
"iv_size":"16 bytes",
"remaining_key_lifetime":"(4608000/3189)",
"replay_detection_support":"Y",
"sibling_flags":"FFFFFFFF80004048",
"status":"ACTIVE(ACTIVE)"
}
}
},
"inbound_pcp_sas":{
},
"ip_mtu_idb":"GigabitEthernet5",
"local_crypto_endpt":"2.2.2.2",
"local_ident":{
"addr":"0.0.0.0",
"mask":"0.0.0.0",
"port":"0",
"prot":"0"
},
"outbound_ah_sas":{
},
"outbound_esp_sas":{
"spi":{
"0x2E8482F8(780436216)":{
"conn_id":2078,
"crypto_map":"Tunnel0-head-0",
"flow_id":"CSR",
"flow_id_val":78,
"transform":"esp-256-aes esp-sha256-hmac",
"in_use_settings":"Tunnel, ",
"iv_size":"16 bytes",
"remaining_key_lifetime":"(4608000/3189)",
"replay_detection_support":"Y",
"sibling_flags":"FFFFFFFF80004048",
"status":"ACTIVE(ACTIVE)"
}
}
},
"outbound_pcp_sas":{
},
"path_mtu":1500,
"peer_ip":"2.2.2.1",
"pfs":"N",
"pkts_compr_failed":0,
"pkts_compressed":0,
"pkts_decaps":0,
"pkts_decompress_failed":0,
"pkts_decompressed":0,
"pkts_decrypt":0,
"pkts_internal_err_recv":0,
"pkts_internal_err_send":0,
"pkts_invalid_identity_recv":0,
"pkts_invalid_prot_recv":0,
"pkts_invalid_sa_rcv":0,
"pkts_no_sa_send":0,
"pkts_not_compressed":0,
"pkts_not_decompressed":0,
"pkts_not_tagged_send":0,
"pkts_not_untagged_rcv":0,
"pkts_replay_failed_rcv":0,
"pkts_replay_rollover_rcv":0,
"pkts_replay_rollover_send":0,
"pkts_tagged_send":0,
"pkts_untagged_rcv":0,
"pkts_verify":0,
"pkts_verify_failed":0,
"plaintext_mtu":1438,
"port":500,
"ip_mtu":1500,
"protected_vrf":"(none)",
"remote_crypto_endpt":"2.2.2.1",
"remote_ident":{
"addr":"0.0.0.0",
"mask":"0.0.0.0",
"port":"0",
"prot":"0"
}
}
},
"local_addr":"2.2.2.2"
}
}
} | expected_output = {'interface': {'GigabitEthernet3': {'crypto_map_tag': 'vpn-crypto-map', 'ident': {1: {'acl': 'origin_is_acl,', 'action': 'PERMIT', 'current_outbound_spi': '0x397C36EE(964441838)', 'dh_group': 'none', 'inbound_ah_sas': {}, 'inbound_esp_sas': {'spi': {'0x658F7C11(1703902225)': {'conn_id': 2076, 'crypto_map': 'vpn-crypto-map', 'flow_id': 'CSR', 'flow_id_val': 76, 'transform': 'esp-256-aes esp-sha256-hmac', 'in_use_settings': 'Tunnel, ', 'iv_size': '16 bytes', 'remaining_key_lifetime': '(4607999/83143)', 'replay_detection_support': 'Y', 'sibling_flags': 'FFFFFFFF80000048', 'status': 'ACTIVE(ACTIVE)'}}}, 'inbound_pcp_sas': {}, 'ip_mtu_idb': 'GigabitEthernet3', 'local_crypto_endpt': '1.1.1.2', 'local_ident': {'addr': '20.20.20.0', 'mask': '255.255.255.0', 'port': '0', 'prot': '0'}, 'outbound_ah_sas': {}, 'outbound_esp_sas': {'spi': {'0x397C36EE(964441838)': {'conn_id': 2075, 'crypto_map': 'vpn-crypto-map', 'flow_id': 'CSR', 'flow_id_val': 75, 'transform': 'esp-256-aes esp-sha256-hmac', 'in_use_settings': 'Tunnel, ', 'iv_size': '16 bytes', 'remaining_key_lifetime': '(4607999/83143)', 'replay_detection_support': 'Y', 'sibling_flags': 'FFFFFFFF80000048', 'status': 'ACTIVE(ACTIVE)'}}}, 'outbound_pcp_sas': {}, 'path_mtu': 1500, 'peer_ip': '1.1.1.1', 'pfs': 'N', 'pkts_compr_failed': 0, 'pkts_compressed': 0, 'pkts_decaps': 4, 'pkts_decompress_failed': 0, 'pkts_decompressed': 0, 'pkts_decrypt': 4, 'pkts_internal_err_recv': 0, 'pkts_internal_err_send': 0, 'pkts_invalid_identity_recv': 0, 'pkts_invalid_prot_recv': 0, 'pkts_invalid_sa_rcv': 0, 'pkts_no_sa_send': 0, 'pkts_not_compressed': 0, 'pkts_not_decompressed': 0, 'pkts_not_tagged_send': 0, 'pkts_not_untagged_rcv': 0, 'pkts_replay_failed_rcv': 0, 'pkts_replay_rollover_rcv': 0, 'pkts_replay_rollover_send': 0, 'pkts_tagged_send': 0, 'pkts_untagged_rcv': 0, 'pkts_verify': 4, 'pkts_verify_failed': 0, 'plaintext_mtu': 1438, 'ip_mtu': 1500, 'port': 500, 'protected_vrf': '(none)', 'remote_crypto_endpt': '1.1.1.1', 'remote_ident': {'addr': '10.10.10.0', 'mask': '255.255.255.0', 'port': '0', 'prot': '0'}}, 2: {'acl': 'origin_is_acl,', 'action': 'PERMIT', 'current_outbound_spi': '0x0(0)', 'dh_group': 'none', 'inbound_ah_sas': {}, 'inbound_esp_sas': {}, 'inbound_pcp_sas': {}, 'ip_mtu_idb': 'GigabitEthernet3', 'local_crypto_endpt': '1.1.1.2', 'local_ident': {'addr': '40.40.40.0', 'mask': '255.255.255.0', 'port': '0', 'prot': '0'}, 'outbound_ah_sas': {}, 'outbound_esp_sas': {}, 'outbound_pcp_sas': {}, 'path_mtu': 1500, 'peer_ip': '1.1.1.1', 'pfs': 'N', 'pkts_compr_failed': 0, 'pkts_compressed': 0, 'pkts_decaps': 0, 'pkts_decompress_failed': 0, 'pkts_decompressed': 0, 'pkts_decrypt': 0, 'pkts_internal_err_recv': 0, 'pkts_internal_err_send': 0, 'pkts_invalid_identity_recv': 0, 'pkts_invalid_prot_recv': 0, 'pkts_invalid_sa_rcv': 0, 'pkts_no_sa_send': 0, 'pkts_not_compressed': 0, 'pkts_not_decompressed': 0, 'pkts_not_tagged_send': 0, 'pkts_not_untagged_rcv': 0, 'pkts_replay_failed_rcv': 0, 'pkts_replay_rollover_rcv': 0, 'pkts_replay_rollover_send': 0, 'pkts_tagged_send': 0, 'pkts_untagged_rcv': 0, 'pkts_verify': 0, 'pkts_verify_failed': 0, 'plaintext_mtu': 1500, 'port': 500, 'ip_mtu': 1500, 'protected_vrf': '(none)', 'remote_crypto_endpt': '1.1.1.1', 'remote_ident': {'addr': '30.30.30.0', 'mask': '255.255.255.0', 'port': '0', 'prot': '0'}}}, 'local_addr': '1.1.1.2'}, 'Tunnel0': {'crypto_map_tag': 'Tunnel0-head-0', 'ident': {1: {'acl': 'origin_is_acl,', 'action': 'PERMIT', 'current_outbound_spi': '0x2E8482F8(780436216)', 'dh_group': 'none', 'inbound_ah_sas': {}, 'inbound_esp_sas': {'spi': {'0xA54D38A4(2773301412)': {'conn_id': 2077, 'crypto_map': 'Tunnel0-head-0', 'flow_id': 'CSR', 'flow_id_val': 77, 'transform': 'esp-256-aes esp-sha256-hmac', 'in_use_settings': 'Tunnel, ', 'iv_size': '16 bytes', 'remaining_key_lifetime': '(4608000/3189)', 'replay_detection_support': 'Y', 'sibling_flags': 'FFFFFFFF80004048', 'status': 'ACTIVE(ACTIVE)'}}}, 'inbound_pcp_sas': {}, 'ip_mtu_idb': 'GigabitEthernet5', 'local_crypto_endpt': '2.2.2.2', 'local_ident': {'addr': '0.0.0.0', 'mask': '0.0.0.0', 'port': '0', 'prot': '0'}, 'outbound_ah_sas': {}, 'outbound_esp_sas': {'spi': {'0x2E8482F8(780436216)': {'conn_id': 2078, 'crypto_map': 'Tunnel0-head-0', 'flow_id': 'CSR', 'flow_id_val': 78, 'transform': 'esp-256-aes esp-sha256-hmac', 'in_use_settings': 'Tunnel, ', 'iv_size': '16 bytes', 'remaining_key_lifetime': '(4608000/3189)', 'replay_detection_support': 'Y', 'sibling_flags': 'FFFFFFFF80004048', 'status': 'ACTIVE(ACTIVE)'}}}, 'outbound_pcp_sas': {}, 'path_mtu': 1500, 'peer_ip': '2.2.2.1', 'pfs': 'N', 'pkts_compr_failed': 0, 'pkts_compressed': 0, 'pkts_decaps': 0, 'pkts_decompress_failed': 0, 'pkts_decompressed': 0, 'pkts_decrypt': 0, 'pkts_internal_err_recv': 0, 'pkts_internal_err_send': 0, 'pkts_invalid_identity_recv': 0, 'pkts_invalid_prot_recv': 0, 'pkts_invalid_sa_rcv': 0, 'pkts_no_sa_send': 0, 'pkts_not_compressed': 0, 'pkts_not_decompressed': 0, 'pkts_not_tagged_send': 0, 'pkts_not_untagged_rcv': 0, 'pkts_replay_failed_rcv': 0, 'pkts_replay_rollover_rcv': 0, 'pkts_replay_rollover_send': 0, 'pkts_tagged_send': 0, 'pkts_untagged_rcv': 0, 'pkts_verify': 0, 'pkts_verify_failed': 0, 'plaintext_mtu': 1438, 'port': 500, 'ip_mtu': 1500, 'protected_vrf': '(none)', 'remote_crypto_endpt': '2.2.2.1', 'remote_ident': {'addr': '0.0.0.0', 'mask': '0.0.0.0', 'port': '0', 'prot': '0'}}}, 'local_addr': '2.2.2.2'}}} |
class kycInfo:
def __init__(self, registerNumber, name, gender, dob=None, address=None):
self.registerNumber = registerNumber
self.name = name
self.gender = gender
self.dob = dob
self.address = address
| class Kycinfo:
def __init__(self, registerNumber, name, gender, dob=None, address=None):
self.registerNumber = registerNumber
self.name = name
self.gender = gender
self.dob = dob
self.address = address |
GOOGLE_CLOUD_SPEECH_CREDENTIALS = "Insert Google Cloud Speech API Key"
mongourl = "Insert MongoDB URL"
stdlib = "Insert stdlib API Key"
| google_cloud_speech_credentials = 'Insert Google Cloud Speech API Key'
mongourl = 'Insert MongoDB URL'
stdlib = 'Insert stdlib API Key' |
# These are the common special chars occured with numbers
Num_Special_Chars = [',', '-', '+', ' ']
# get_type_lst will sample at most x entries from a given query
MAX_SAMPLE_SIZE = 500
| num__special__chars = [',', '-', '+', ' ']
max_sample_size = 500 |
# Fitur .add()
print(">>> Fitur .add()")
set_buah = {'Jeruk','Apel','Anggur'}
set_buah.add('Melon')
print(set_buah)
# Fitur .clear()
print(">>> Fitur .clear()")
set_buah = {'Jeruk','Apel','Anggur'}
set_buah.clear()
print(set_buah)
# Fitur .copy()
print(">>> Fitur .copy()")
set_buah1 = {'Jeruk','Apel','Anggur'}
set_buah2 = set_buah1
set_buah3 = set_buah1.copy()
set_buah2.add('Melon')
set_buah3.add('Kiwi')
print(set_buah1)
print(set_buah2)
# Fitur .update()
print(">>> Fitur .update()")
parcel1 = {'Anggur','Apel','Jeruk'}
parcel2 = {'Apel','Kiwi','Melon'}
parcel1.update(parcel2)
print(parcel1)
# Fitur .pop()
print(">>> Fitur .pop()")
parcel = {'Anggur','Apel','Jeruk'}
buah = parcel.pop()
print(buah)
print(parcel)
# Fitur .remove()
print(">>> Fitur .remove()")
parcel = {'Anggur','Apel','Jeruk'}
parcel.remove('Apel')
print(parcel) | print('>>> Fitur .add()')
set_buah = {'Jeruk', 'Apel', 'Anggur'}
set_buah.add('Melon')
print(set_buah)
print('>>> Fitur .clear()')
set_buah = {'Jeruk', 'Apel', 'Anggur'}
set_buah.clear()
print(set_buah)
print('>>> Fitur .copy()')
set_buah1 = {'Jeruk', 'Apel', 'Anggur'}
set_buah2 = set_buah1
set_buah3 = set_buah1.copy()
set_buah2.add('Melon')
set_buah3.add('Kiwi')
print(set_buah1)
print(set_buah2)
print('>>> Fitur .update()')
parcel1 = {'Anggur', 'Apel', 'Jeruk'}
parcel2 = {'Apel', 'Kiwi', 'Melon'}
parcel1.update(parcel2)
print(parcel1)
print('>>> Fitur .pop()')
parcel = {'Anggur', 'Apel', 'Jeruk'}
buah = parcel.pop()
print(buah)
print(parcel)
print('>>> Fitur .remove()')
parcel = {'Anggur', 'Apel', 'Jeruk'}
parcel.remove('Apel')
print(parcel) |
class Config:
MASTER_GEOMETRY_FIELDNAME = "wkb_geometry"
SCHEMA = "public"
SQL_FILE_EXTENSION = ".sql"
DATABASE_NAME = "gensmd"
PQSL_TEMPLATE = '"c:/Program Files/PostgreSQL/9.5/bin/psql.exe" -U postgres -q -d %s -f %s\n' % DATABASE_NAME
ID_FIELD_NAME = "zdroj_id"
PG_CONNECTOR = "dbname=%s user=postgres" % DATABASE_NAME
config = Config() | class Config:
master_geometry_fieldname = 'wkb_geometry'
schema = 'public'
sql_file_extension = '.sql'
database_name = 'gensmd'
pqsl_template = '"c:/Program Files/PostgreSQL/9.5/bin/psql.exe" -U postgres -q -d %s -f %s\n' % DATABASE_NAME
id_field_name = 'zdroj_id'
pg_connector = 'dbname=%s user=postgres' % DATABASE_NAME
config = config() |
palindrome = input("What word or phrase would you like to check?")
palindromeNoSpace = palindrome.replace(" ","")
lengthCheck = False
wordLength = 0
while lengthCheck == False:
if len(palindrome) == 0:
print("Please enter a word or phrase")
palindrome = input("What word or phrase would you like to check?")
palindromeNoSpace = palindrome.replace(" ","")
else:
palindromeReversed = palindromeNoSpace[::-1]
if palindromeNoSpace == palindromeReversed:
print(palindrome + " is a Palindrome!")
lengthCheck = True
else:
print(palindrome + " is not a Palindrome")
palindrome = input("What word or phrase would you like to check?")
palindromeNoSpace = palindrome.replace(" ","")
lengthCheck = False
| palindrome = input('What word or phrase would you like to check?')
palindrome_no_space = palindrome.replace(' ', '')
length_check = False
word_length = 0
while lengthCheck == False:
if len(palindrome) == 0:
print('Please enter a word or phrase')
palindrome = input('What word or phrase would you like to check?')
palindrome_no_space = palindrome.replace(' ', '')
else:
palindrome_reversed = palindromeNoSpace[::-1]
if palindromeNoSpace == palindromeReversed:
print(palindrome + ' is a Palindrome!')
length_check = True
else:
print(palindrome + ' is not a Palindrome')
palindrome = input('What word or phrase would you like to check?')
palindrome_no_space = palindrome.replace(' ', '')
length_check = False |
s="Paraschiv Alexandru-Andrei"
crt=0
nume=0
poz=0
i=0
lg=len(s)
for i in range (lg):
if (i==0 or s[i-1]==" " or s[i-1]=="-"):
if s[i].islower():
print("Nume gresit")
break
if s[i]=="-":
crt+=1
if crt>1:
print("Nume gresit")
break
if s[i]=="-" or s[i]==" ":
if i-poz+1<3:
print("Nume gresit")
break
poz=i
if s[i].isdigit():
print("Nume gresit")
break
if s[i]==" " or s[i]=="-":
nume+=1
if nume>4:
print("Nume gresit")
break
# print(crt)
else:
print("Nume corect")
| s = 'Paraschiv Alexandru-Andrei'
crt = 0
nume = 0
poz = 0
i = 0
lg = len(s)
for i in range(lg):
if i == 0 or s[i - 1] == ' ' or s[i - 1] == '-':
if s[i].islower():
print('Nume gresit')
break
if s[i] == '-':
crt += 1
if crt > 1:
print('Nume gresit')
break
if s[i] == '-' or s[i] == ' ':
if i - poz + 1 < 3:
print('Nume gresit')
break
poz = i
if s[i].isdigit():
print('Nume gresit')
break
if s[i] == ' ' or s[i] == '-':
nume += 1
if nume > 4:
print('Nume gresit')
break
else:
print('Nume corect') |
#
# PySNMP MIB module HPN-ICF-FC-TRACE-ROUTE-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HPN-ICF-FC-TRACE-ROUTE-MIB
# Produced by pysmi-0.3.4 at Wed May 1 13:38:54 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, ConstraintsIntersection, ConstraintsUnion, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "SingleValueConstraint", "ConstraintsIntersection", "ConstraintsUnion", "ValueSizeConstraint")
HpnicfFcVsanIndex, HpnicfFcAddress, HpnicfFcStartOper, HpnicfFcAddressType, HpnicfFcNameId = mibBuilder.importSymbols("HPN-ICF-FC-TC-MIB", "HpnicfFcVsanIndex", "HpnicfFcAddress", "HpnicfFcStartOper", "HpnicfFcAddressType", "HpnicfFcNameId")
hpnicfSan, = mibBuilder.importSymbols("HPN-ICF-VSAN-MIB", "hpnicfSan")
NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance")
MibScalar, MibTable, MibTableRow, MibTableColumn, iso, Gauge32, TimeTicks, Counter64, IpAddress, Unsigned32, NotificationType, Counter32, Bits, Integer32, ObjectIdentity, MibIdentifier, ModuleIdentity = mibBuilder.importSymbols("SNMPv2-SMI", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "iso", "Gauge32", "TimeTicks", "Counter64", "IpAddress", "Unsigned32", "NotificationType", "Counter32", "Bits", "Integer32", "ObjectIdentity", "MibIdentifier", "ModuleIdentity")
TruthValue, RowStatus, DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "TruthValue", "RowStatus", "DisplayString", "TextualConvention")
hpnicfFcTraceRoute = ModuleIdentity((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 127, 4))
hpnicfFcTraceRoute.setRevisions(('2013-02-27 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: hpnicfFcTraceRoute.setRevisionsDescriptions(('Initial version of this MIB module.',))
if mibBuilder.loadTexts: hpnicfFcTraceRoute.setLastUpdated('201302270000Z')
if mibBuilder.loadTexts: hpnicfFcTraceRoute.setOrganization('')
if mibBuilder.loadTexts: hpnicfFcTraceRoute.setContactInfo('')
if mibBuilder.loadTexts: hpnicfFcTraceRoute.setDescription('This MIB module is for the management of the Fibre Channel Trace Route functionality.')
hpnicfFcTraceRouteObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 127, 4, 1))
hpnicfFcTraceRouteConfigurations = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 127, 4, 1, 1))
hpnicfFcTraceRouteResults = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 127, 4, 1, 2))
hpnicfFcTraceRouteNotifications = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 127, 4, 1, 3))
hpnicfFcTraceRouteNotifyPrefix = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 127, 4, 1, 3, 0))
hpnicfFcTraceRouteTable = MibTable((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 127, 4, 1, 1, 1), )
if mibBuilder.loadTexts: hpnicfFcTraceRouteTable.setStatus('current')
if mibBuilder.loadTexts: hpnicfFcTraceRouteTable.setDescription('A table of trace route entries containing a group of trace route requests that need to be executed at the agent.')
hpnicfFcTraceRouteEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 127, 4, 1, 1, 1, 1), ).setIndexNames((0, "HPN-ICF-FC-TRACE-ROUTE-MIB", "hpnicfFcTraceRouteIndex"))
if mibBuilder.loadTexts: hpnicfFcTraceRouteEntry.setStatus('current')
if mibBuilder.loadTexts: hpnicfFcTraceRouteEntry.setDescription('A trace route request entry that needs to be executed at the agent.')
hpnicfFcTraceRouteIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 127, 4, 1, 1, 1, 1, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))).setMaxAccess("accessiblefornotify")
if mibBuilder.loadTexts: hpnicfFcTraceRouteIndex.setStatus('current')
if mibBuilder.loadTexts: hpnicfFcTraceRouteIndex.setDescription('The index of the current trace route entry. This object uniquely identifies a trace route request entry in a specified VSAN (Virtual Storage Area Network).')
hpnicfFcTraceRouteVsan = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 127, 4, 1, 1, 1, 1, 2), HpnicfFcVsanIndex()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: hpnicfFcTraceRouteVsan.setStatus('current')
if mibBuilder.loadTexts: hpnicfFcTraceRouteVsan.setDescription("The VSAN on which the trace route request will be executed. If the corresponding instance value of hpnicfFcTraceRouteOperStatus is 'inProgress', the object cannot be modified.")
hpnicfFcTraceRouteAddressType = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 127, 4, 1, 1, 1, 1, 3), HpnicfFcAddressType().clone('fcid')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: hpnicfFcTraceRouteAddressType.setStatus('current')
if mibBuilder.loadTexts: hpnicfFcTraceRouteAddressType.setDescription('The type of the corresponding instance of hpnicfFcTraceRouteAddress object.')
hpnicfFcTraceRouteAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 127, 4, 1, 1, 1, 1, 4), HpnicfFcAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: hpnicfFcTraceRouteAddress.setStatus('current')
if mibBuilder.loadTexts: hpnicfFcTraceRouteAddress.setDescription("The address to which the route will be traced. This object will contain an 8-octet WWN (World Wide Name), if the value of the associated instance of hpnicfFcTraceRouteAddressType object is 'wwn'. This object will contain a 3-octet Fibre Channel ID, if the value of the associated instance of hpnicfFcTraceRouteAddressType object is 'fcid'.")
hpnicfFcTraceRouteTimeout = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 127, 4, 1, 1, 1, 1, 5), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 10)).clone(5)).setUnits('seconds').setMaxAccess("readcreate")
if mibBuilder.loadTexts: hpnicfFcTraceRouteTimeout.setStatus('current')
if mibBuilder.loadTexts: hpnicfFcTraceRouteTimeout.setDescription("The value of timeout for this trace route request. If the corresponding instance value of hpnicfFcTraceRouteOperStatus object is 'inProgress', this object cannot be modified.")
hpnicfFcTraceRouteAdminStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 127, 4, 1, 1, 1, 1, 6), HpnicfFcStartOper().clone('disable')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: hpnicfFcTraceRouteAdminStatus.setStatus('current')
if mibBuilder.loadTexts: hpnicfFcTraceRouteAdminStatus.setDescription("The administrative status of each hpnicfFcTraceRouteEntry. The object has two values: enable - Activate the entry. disable - Deactivate the entry. When the trace route entry is being executed, this object cannot be modified. If this object is being read, a value of 'enable' will be returned. When the execution finishes, the value of this object will be set to 'disable'.")
hpnicfFcTraceRouteOperStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 127, 4, 1, 1, 1, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("inProgress", 1), ("success", 2), ("partialSuccess", 3), ("failure", 4), ("disabled", 5)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfFcTraceRouteOperStatus.setStatus('current')
if mibBuilder.loadTexts: hpnicfFcTraceRouteOperStatus.setDescription('This object indicates the operational status of this hpnicfFcTraceRouteEntry. The value specifications are listed as follows: inProgress - Trace route is in progress. success - Trace route has succeeded. partialSuccess - Trace route has partially succeeded. failure - Trace route has failed due to resource limitations. disabled - Trace route is disabled.')
hpnicfFcTraceRouteAgeInterval = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 127, 4, 1, 1, 1, 1, 8), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(500, 900)).clone(500)).setUnits('seconds').setMaxAccess("readcreate")
if mibBuilder.loadTexts: hpnicfFcTraceRouteAgeInterval.setStatus('current')
if mibBuilder.loadTexts: hpnicfFcTraceRouteAgeInterval.setDescription('The interval time for an entry to age out after a trace route test is completed.')
hpnicfFcTraceRouteTrapOnCompletion = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 127, 4, 1, 1, 1, 1, 9), TruthValue().clone('false')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: hpnicfFcTraceRouteTrapOnCompletion.setStatus('current')
if mibBuilder.loadTexts: hpnicfFcTraceRouteTrapOnCompletion.setDescription('This object indicates whether a hpnicfFcTraceRouteCompletionNotify notification should be generated when this trace route test completes.')
hpnicfFcTraceRouteRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 127, 4, 1, 1, 1, 1, 10), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: hpnicfFcTraceRouteRowStatus.setStatus('current')
if mibBuilder.loadTexts: hpnicfFcTraceRouteRowStatus.setDescription('The status of this conceptual row.')
hpnicfFcTraceRouteHopsTable = MibTable((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 127, 4, 1, 2, 1), )
if mibBuilder.loadTexts: hpnicfFcTraceRouteHopsTable.setStatus('current')
if mibBuilder.loadTexts: hpnicfFcTraceRouteHopsTable.setDescription('A table of trace route hop results. This table indicates the hop-by-hop result of a trace route test associated with an entry in the hpnicfFcTraceRouteTable.')
hpnicfFcTraceRouteHopsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 127, 4, 1, 2, 1, 1), ).setIndexNames((0, "HPN-ICF-FC-TRACE-ROUTE-MIB", "hpnicfFcTraceRouteIndex"), (0, "HPN-ICF-FC-TRACE-ROUTE-MIB", "hpnicfFcTraceRouteHopsIndex"))
if mibBuilder.loadTexts: hpnicfFcTraceRouteHopsEntry.setStatus('current')
if mibBuilder.loadTexts: hpnicfFcTraceRouteHopsEntry.setDescription('A trace route hop entry. The first index member specifies the hpnicfFcTraceRouteEntry that an hpnicfFcTraceRouteHopsEntry is associated with. The second index element identifies a hop in a trace route path. In the case of a complete path being traced, entries corresponding to an hpnicfFcTraceRouteEntry are created automatically in this table. Each hop in the complete path will be listed in this table. When an hpnicfFcTraceRouteEntry is deleted or aged out, the entries corresponding to the hpnicfFcTraceRouteEntry in this table are also deleted.')
hpnicfFcTraceRouteHopsIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 127, 4, 1, 2, 1, 1, 1), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535)))
if mibBuilder.loadTexts: hpnicfFcTraceRouteHopsIndex.setStatus('current')
if mibBuilder.loadTexts: hpnicfFcTraceRouteHopsIndex.setDescription('This object indicates the hop index for a trace route hop. Values for this object associated with the same hpnicfFcTraceRouteIndex MUST begin with 1 and automatically increase by 1.')
hpnicfFcTraceRouteHopsAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 127, 4, 1, 2, 1, 1, 2), HpnicfFcNameId()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfFcTraceRouteHopsAddr.setStatus('current')
if mibBuilder.loadTexts: hpnicfFcTraceRouteHopsAddr.setDescription('This object specifies the WWN of the device associated with this hop.')
hpnicfFcTraceRouteCompletionNotify = NotificationType((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 127, 4, 1, 3, 0, 1)).setObjects(("HPN-ICF-FC-TRACE-ROUTE-MIB", "hpnicfFcTraceRouteIndex"), ("HPN-ICF-FC-TRACE-ROUTE-MIB", "hpnicfFcTraceRouteVsan"), ("HPN-ICF-FC-TRACE-ROUTE-MIB", "hpnicfFcTraceRouteAddressType"), ("HPN-ICF-FC-TRACE-ROUTE-MIB", "hpnicfFcTraceRouteAddress"), ("HPN-ICF-FC-TRACE-ROUTE-MIB", "hpnicfFcTraceRouteOperStatus"))
if mibBuilder.loadTexts: hpnicfFcTraceRouteCompletionNotify.setStatus('current')
if mibBuilder.loadTexts: hpnicfFcTraceRouteCompletionNotify.setDescription("When a trace route test is finished and the instance of hpnicfFcTraceRouteTrapOnCompletion associated with the test is set to 'true', this notification occurred.")
mibBuilder.exportSymbols("HPN-ICF-FC-TRACE-ROUTE-MIB", hpnicfFcTraceRouteTable=hpnicfFcTraceRouteTable, hpnicfFcTraceRouteOperStatus=hpnicfFcTraceRouteOperStatus, hpnicfFcTraceRouteAddress=hpnicfFcTraceRouteAddress, hpnicfFcTraceRouteObjects=hpnicfFcTraceRouteObjects, hpnicfFcTraceRouteTrapOnCompletion=hpnicfFcTraceRouteTrapOnCompletion, hpnicfFcTraceRouteTimeout=hpnicfFcTraceRouteTimeout, hpnicfFcTraceRouteHopsTable=hpnicfFcTraceRouteHopsTable, hpnicfFcTraceRouteConfigurations=hpnicfFcTraceRouteConfigurations, hpnicfFcTraceRouteNotifyPrefix=hpnicfFcTraceRouteNotifyPrefix, hpnicfFcTraceRouteNotifications=hpnicfFcTraceRouteNotifications, hpnicfFcTraceRoute=hpnicfFcTraceRoute, hpnicfFcTraceRouteRowStatus=hpnicfFcTraceRouteRowStatus, hpnicfFcTraceRouteHopsAddr=hpnicfFcTraceRouteHopsAddr, hpnicfFcTraceRouteAddressType=hpnicfFcTraceRouteAddressType, hpnicfFcTraceRouteCompletionNotify=hpnicfFcTraceRouteCompletionNotify, hpnicfFcTraceRouteAdminStatus=hpnicfFcTraceRouteAdminStatus, hpnicfFcTraceRouteResults=hpnicfFcTraceRouteResults, hpnicfFcTraceRouteHopsIndex=hpnicfFcTraceRouteHopsIndex, hpnicfFcTraceRouteEntry=hpnicfFcTraceRouteEntry, hpnicfFcTraceRouteAgeInterval=hpnicfFcTraceRouteAgeInterval, hpnicfFcTraceRouteIndex=hpnicfFcTraceRouteIndex, hpnicfFcTraceRouteHopsEntry=hpnicfFcTraceRouteHopsEntry, PYSNMP_MODULE_ID=hpnicfFcTraceRoute, hpnicfFcTraceRouteVsan=hpnicfFcTraceRouteVsan)
| (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_intersection, constraints_union, value_size_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueRangeConstraint', 'SingleValueConstraint', 'ConstraintsIntersection', 'ConstraintsUnion', 'ValueSizeConstraint')
(hpnicf_fc_vsan_index, hpnicf_fc_address, hpnicf_fc_start_oper, hpnicf_fc_address_type, hpnicf_fc_name_id) = mibBuilder.importSymbols('HPN-ICF-FC-TC-MIB', 'HpnicfFcVsanIndex', 'HpnicfFcAddress', 'HpnicfFcStartOper', 'HpnicfFcAddressType', 'HpnicfFcNameId')
(hpnicf_san,) = mibBuilder.importSymbols('HPN-ICF-VSAN-MIB', 'hpnicfSan')
(notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance')
(mib_scalar, mib_table, mib_table_row, mib_table_column, iso, gauge32, time_ticks, counter64, ip_address, unsigned32, notification_type, counter32, bits, integer32, object_identity, mib_identifier, module_identity) = mibBuilder.importSymbols('SNMPv2-SMI', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'iso', 'Gauge32', 'TimeTicks', 'Counter64', 'IpAddress', 'Unsigned32', 'NotificationType', 'Counter32', 'Bits', 'Integer32', 'ObjectIdentity', 'MibIdentifier', 'ModuleIdentity')
(truth_value, row_status, display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'TruthValue', 'RowStatus', 'DisplayString', 'TextualConvention')
hpnicf_fc_trace_route = module_identity((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 127, 4))
hpnicfFcTraceRoute.setRevisions(('2013-02-27 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts:
hpnicfFcTraceRoute.setRevisionsDescriptions(('Initial version of this MIB module.',))
if mibBuilder.loadTexts:
hpnicfFcTraceRoute.setLastUpdated('201302270000Z')
if mibBuilder.loadTexts:
hpnicfFcTraceRoute.setOrganization('')
if mibBuilder.loadTexts:
hpnicfFcTraceRoute.setContactInfo('')
if mibBuilder.loadTexts:
hpnicfFcTraceRoute.setDescription('This MIB module is for the management of the Fibre Channel Trace Route functionality.')
hpnicf_fc_trace_route_objects = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 127, 4, 1))
hpnicf_fc_trace_route_configurations = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 127, 4, 1, 1))
hpnicf_fc_trace_route_results = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 127, 4, 1, 2))
hpnicf_fc_trace_route_notifications = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 127, 4, 1, 3))
hpnicf_fc_trace_route_notify_prefix = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 127, 4, 1, 3, 0))
hpnicf_fc_trace_route_table = mib_table((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 127, 4, 1, 1, 1))
if mibBuilder.loadTexts:
hpnicfFcTraceRouteTable.setStatus('current')
if mibBuilder.loadTexts:
hpnicfFcTraceRouteTable.setDescription('A table of trace route entries containing a group of trace route requests that need to be executed at the agent.')
hpnicf_fc_trace_route_entry = mib_table_row((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 127, 4, 1, 1, 1, 1)).setIndexNames((0, 'HPN-ICF-FC-TRACE-ROUTE-MIB', 'hpnicfFcTraceRouteIndex'))
if mibBuilder.loadTexts:
hpnicfFcTraceRouteEntry.setStatus('current')
if mibBuilder.loadTexts:
hpnicfFcTraceRouteEntry.setDescription('A trace route request entry that needs to be executed at the agent.')
hpnicf_fc_trace_route_index = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 127, 4, 1, 1, 1, 1, 1), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 65535))).setMaxAccess('accessiblefornotify')
if mibBuilder.loadTexts:
hpnicfFcTraceRouteIndex.setStatus('current')
if mibBuilder.loadTexts:
hpnicfFcTraceRouteIndex.setDescription('The index of the current trace route entry. This object uniquely identifies a trace route request entry in a specified VSAN (Virtual Storage Area Network).')
hpnicf_fc_trace_route_vsan = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 127, 4, 1, 1, 1, 1, 2), hpnicf_fc_vsan_index()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
hpnicfFcTraceRouteVsan.setStatus('current')
if mibBuilder.loadTexts:
hpnicfFcTraceRouteVsan.setDescription("The VSAN on which the trace route request will be executed. If the corresponding instance value of hpnicfFcTraceRouteOperStatus is 'inProgress', the object cannot be modified.")
hpnicf_fc_trace_route_address_type = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 127, 4, 1, 1, 1, 1, 3), hpnicf_fc_address_type().clone('fcid')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
hpnicfFcTraceRouteAddressType.setStatus('current')
if mibBuilder.loadTexts:
hpnicfFcTraceRouteAddressType.setDescription('The type of the corresponding instance of hpnicfFcTraceRouteAddress object.')
hpnicf_fc_trace_route_address = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 127, 4, 1, 1, 1, 1, 4), hpnicf_fc_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
hpnicfFcTraceRouteAddress.setStatus('current')
if mibBuilder.loadTexts:
hpnicfFcTraceRouteAddress.setDescription("The address to which the route will be traced. This object will contain an 8-octet WWN (World Wide Name), if the value of the associated instance of hpnicfFcTraceRouteAddressType object is 'wwn'. This object will contain a 3-octet Fibre Channel ID, if the value of the associated instance of hpnicfFcTraceRouteAddressType object is 'fcid'.")
hpnicf_fc_trace_route_timeout = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 127, 4, 1, 1, 1, 1, 5), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 10)).clone(5)).setUnits('seconds').setMaxAccess('readcreate')
if mibBuilder.loadTexts:
hpnicfFcTraceRouteTimeout.setStatus('current')
if mibBuilder.loadTexts:
hpnicfFcTraceRouteTimeout.setDescription("The value of timeout for this trace route request. If the corresponding instance value of hpnicfFcTraceRouteOperStatus object is 'inProgress', this object cannot be modified.")
hpnicf_fc_trace_route_admin_status = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 127, 4, 1, 1, 1, 1, 6), hpnicf_fc_start_oper().clone('disable')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
hpnicfFcTraceRouteAdminStatus.setStatus('current')
if mibBuilder.loadTexts:
hpnicfFcTraceRouteAdminStatus.setDescription("The administrative status of each hpnicfFcTraceRouteEntry. The object has two values: enable - Activate the entry. disable - Deactivate the entry. When the trace route entry is being executed, this object cannot be modified. If this object is being read, a value of 'enable' will be returned. When the execution finishes, the value of this object will be set to 'disable'.")
hpnicf_fc_trace_route_oper_status = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 127, 4, 1, 1, 1, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('inProgress', 1), ('success', 2), ('partialSuccess', 3), ('failure', 4), ('disabled', 5)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfFcTraceRouteOperStatus.setStatus('current')
if mibBuilder.loadTexts:
hpnicfFcTraceRouteOperStatus.setDescription('This object indicates the operational status of this hpnicfFcTraceRouteEntry. The value specifications are listed as follows: inProgress - Trace route is in progress. success - Trace route has succeeded. partialSuccess - Trace route has partially succeeded. failure - Trace route has failed due to resource limitations. disabled - Trace route is disabled.')
hpnicf_fc_trace_route_age_interval = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 127, 4, 1, 1, 1, 1, 8), unsigned32().subtype(subtypeSpec=value_range_constraint(500, 900)).clone(500)).setUnits('seconds').setMaxAccess('readcreate')
if mibBuilder.loadTexts:
hpnicfFcTraceRouteAgeInterval.setStatus('current')
if mibBuilder.loadTexts:
hpnicfFcTraceRouteAgeInterval.setDescription('The interval time for an entry to age out after a trace route test is completed.')
hpnicf_fc_trace_route_trap_on_completion = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 127, 4, 1, 1, 1, 1, 9), truth_value().clone('false')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
hpnicfFcTraceRouteTrapOnCompletion.setStatus('current')
if mibBuilder.loadTexts:
hpnicfFcTraceRouteTrapOnCompletion.setDescription('This object indicates whether a hpnicfFcTraceRouteCompletionNotify notification should be generated when this trace route test completes.')
hpnicf_fc_trace_route_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 127, 4, 1, 1, 1, 1, 10), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
hpnicfFcTraceRouteRowStatus.setStatus('current')
if mibBuilder.loadTexts:
hpnicfFcTraceRouteRowStatus.setDescription('The status of this conceptual row.')
hpnicf_fc_trace_route_hops_table = mib_table((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 127, 4, 1, 2, 1))
if mibBuilder.loadTexts:
hpnicfFcTraceRouteHopsTable.setStatus('current')
if mibBuilder.loadTexts:
hpnicfFcTraceRouteHopsTable.setDescription('A table of trace route hop results. This table indicates the hop-by-hop result of a trace route test associated with an entry in the hpnicfFcTraceRouteTable.')
hpnicf_fc_trace_route_hops_entry = mib_table_row((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 127, 4, 1, 2, 1, 1)).setIndexNames((0, 'HPN-ICF-FC-TRACE-ROUTE-MIB', 'hpnicfFcTraceRouteIndex'), (0, 'HPN-ICF-FC-TRACE-ROUTE-MIB', 'hpnicfFcTraceRouteHopsIndex'))
if mibBuilder.loadTexts:
hpnicfFcTraceRouteHopsEntry.setStatus('current')
if mibBuilder.loadTexts:
hpnicfFcTraceRouteHopsEntry.setDescription('A trace route hop entry. The first index member specifies the hpnicfFcTraceRouteEntry that an hpnicfFcTraceRouteHopsEntry is associated with. The second index element identifies a hop in a trace route path. In the case of a complete path being traced, entries corresponding to an hpnicfFcTraceRouteEntry are created automatically in this table. Each hop in the complete path will be listed in this table. When an hpnicfFcTraceRouteEntry is deleted or aged out, the entries corresponding to the hpnicfFcTraceRouteEntry in this table are also deleted.')
hpnicf_fc_trace_route_hops_index = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 127, 4, 1, 2, 1, 1, 1), unsigned32().subtype(subtypeSpec=value_range_constraint(1, 65535)))
if mibBuilder.loadTexts:
hpnicfFcTraceRouteHopsIndex.setStatus('current')
if mibBuilder.loadTexts:
hpnicfFcTraceRouteHopsIndex.setDescription('This object indicates the hop index for a trace route hop. Values for this object associated with the same hpnicfFcTraceRouteIndex MUST begin with 1 and automatically increase by 1.')
hpnicf_fc_trace_route_hops_addr = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 127, 4, 1, 2, 1, 1, 2), hpnicf_fc_name_id()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfFcTraceRouteHopsAddr.setStatus('current')
if mibBuilder.loadTexts:
hpnicfFcTraceRouteHopsAddr.setDescription('This object specifies the WWN of the device associated with this hop.')
hpnicf_fc_trace_route_completion_notify = notification_type((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 2, 127, 4, 1, 3, 0, 1)).setObjects(('HPN-ICF-FC-TRACE-ROUTE-MIB', 'hpnicfFcTraceRouteIndex'), ('HPN-ICF-FC-TRACE-ROUTE-MIB', 'hpnicfFcTraceRouteVsan'), ('HPN-ICF-FC-TRACE-ROUTE-MIB', 'hpnicfFcTraceRouteAddressType'), ('HPN-ICF-FC-TRACE-ROUTE-MIB', 'hpnicfFcTraceRouteAddress'), ('HPN-ICF-FC-TRACE-ROUTE-MIB', 'hpnicfFcTraceRouteOperStatus'))
if mibBuilder.loadTexts:
hpnicfFcTraceRouteCompletionNotify.setStatus('current')
if mibBuilder.loadTexts:
hpnicfFcTraceRouteCompletionNotify.setDescription("When a trace route test is finished and the instance of hpnicfFcTraceRouteTrapOnCompletion associated with the test is set to 'true', this notification occurred.")
mibBuilder.exportSymbols('HPN-ICF-FC-TRACE-ROUTE-MIB', hpnicfFcTraceRouteTable=hpnicfFcTraceRouteTable, hpnicfFcTraceRouteOperStatus=hpnicfFcTraceRouteOperStatus, hpnicfFcTraceRouteAddress=hpnicfFcTraceRouteAddress, hpnicfFcTraceRouteObjects=hpnicfFcTraceRouteObjects, hpnicfFcTraceRouteTrapOnCompletion=hpnicfFcTraceRouteTrapOnCompletion, hpnicfFcTraceRouteTimeout=hpnicfFcTraceRouteTimeout, hpnicfFcTraceRouteHopsTable=hpnicfFcTraceRouteHopsTable, hpnicfFcTraceRouteConfigurations=hpnicfFcTraceRouteConfigurations, hpnicfFcTraceRouteNotifyPrefix=hpnicfFcTraceRouteNotifyPrefix, hpnicfFcTraceRouteNotifications=hpnicfFcTraceRouteNotifications, hpnicfFcTraceRoute=hpnicfFcTraceRoute, hpnicfFcTraceRouteRowStatus=hpnicfFcTraceRouteRowStatus, hpnicfFcTraceRouteHopsAddr=hpnicfFcTraceRouteHopsAddr, hpnicfFcTraceRouteAddressType=hpnicfFcTraceRouteAddressType, hpnicfFcTraceRouteCompletionNotify=hpnicfFcTraceRouteCompletionNotify, hpnicfFcTraceRouteAdminStatus=hpnicfFcTraceRouteAdminStatus, hpnicfFcTraceRouteResults=hpnicfFcTraceRouteResults, hpnicfFcTraceRouteHopsIndex=hpnicfFcTraceRouteHopsIndex, hpnicfFcTraceRouteEntry=hpnicfFcTraceRouteEntry, hpnicfFcTraceRouteAgeInterval=hpnicfFcTraceRouteAgeInterval, hpnicfFcTraceRouteIndex=hpnicfFcTraceRouteIndex, hpnicfFcTraceRouteHopsEntry=hpnicfFcTraceRouteHopsEntry, PYSNMP_MODULE_ID=hpnicfFcTraceRoute, hpnicfFcTraceRouteVsan=hpnicfFcTraceRouteVsan) |
class StartupError(Exception):
def __init__(self, message):
self.message = message
class DeviceRegistrationError(Exception):
def __init__(self, message):
self.message = message
class OverlayRegistrationError(Exception):
def __init__(self, message):
self.message = message
class CannotAddToOverlay(Exception):
def __init__(self, message):
self.message = message
| class Startuperror(Exception):
def __init__(self, message):
self.message = message
class Deviceregistrationerror(Exception):
def __init__(self, message):
self.message = message
class Overlayregistrationerror(Exception):
def __init__(self, message):
self.message = message
class Cannotaddtooverlay(Exception):
def __init__(self, message):
self.message = message |
s = 0
last = 1
for i in range(int(input())):
if int(input()) in [2,3]:
s+=1
print(s) | s = 0
last = 1
for i in range(int(input())):
if int(input()) in [2, 3]:
s += 1
print(s) |
class PageSections(object):
def __init__(self, driver):
super().__init__()
self.driver = driver
def click_menu(self):
return
| class Pagesections(object):
def __init__(self, driver):
super().__init__()
self.driver = driver
def click_menu(self):
return |
def test_nodenet_statuslogger(app, runtime, test_nodenet):
net = runtime.get_nodenet(test_nodenet)
sl = net.netapi.statuslogger
sl.info("Learning.Foo", sl.ACTIVE, progress=(5, 23))
logs = runtime.get_logger_messages(sl.name)
assert "Learning.Foo" in logs['logs'][1]['msg']
result = app.get_json('/rpc/get_status_tree?nodenet_uid=%s' % test_nodenet)
tree = result.json_body['data']
assert tree['Learning']['level'] == "info"
assert tree['Learning']['children']['Foo']['level'] == "info"
assert tree['Learning']['children']['Foo']['state'] == sl.ACTIVE
assert tree['Learning']['children']['Foo']['progress'] == [5, 23]
result = app.get_json('/rpc/get_status_tree?nodenet_uid=%s&level=warning' % test_nodenet)
tree = result.json_body['data']
assert tree == {}
| def test_nodenet_statuslogger(app, runtime, test_nodenet):
net = runtime.get_nodenet(test_nodenet)
sl = net.netapi.statuslogger
sl.info('Learning.Foo', sl.ACTIVE, progress=(5, 23))
logs = runtime.get_logger_messages(sl.name)
assert 'Learning.Foo' in logs['logs'][1]['msg']
result = app.get_json('/rpc/get_status_tree?nodenet_uid=%s' % test_nodenet)
tree = result.json_body['data']
assert tree['Learning']['level'] == 'info'
assert tree['Learning']['children']['Foo']['level'] == 'info'
assert tree['Learning']['children']['Foo']['state'] == sl.ACTIVE
assert tree['Learning']['children']['Foo']['progress'] == [5, 23]
result = app.get_json('/rpc/get_status_tree?nodenet_uid=%s&level=warning' % test_nodenet)
tree = result.json_body['data']
assert tree == {} |
# rotate 180 degrees
# need to call show after rotating as rotating only sets the remapping bits on the remap and offset registers
# show repopulates the gddram in the new correct order
display.rotate(True)
display.show()
# rotate 0 degrees
display.write_cmd(ssd1327.SET_DISP_OFFSET) # 0xA2
display.write_cmd(128 - display.height)
display.write_cmd(ssd1327.SET_SEG_REMAP) # 0xA0
display.write_cmd(0x51)
display.show()
# rotate 0 degrees (flip horizontal)
display.write_cmd(ssd1327.SET_DISP_OFFSET) # 0xA2
display.write_cmd(128 - display.height)
display.write_cmd(ssd1327.SET_SEG_REMAP) # 0xA0
display.write_cmd(0x52)
display.show()
# rotate 180 degrees
display.write_cmd(ssd1327.SET_DISP_OFFSET) # 0xA2
display.write_cmd(display.height)
display.write_cmd(ssd1327.SET_SEG_REMAP) # 0xA0
display.write_cmd(0x42)
display.show()
# rotate 180 degrees (flip horizontal)
display.write_cmd(ssd1327.SET_DISP_OFFSET) # 0xA2
display.write_cmd(display.height)
display.write_cmd(ssd1327.SET_SEG_REMAP) # 0xA0
display.write_cmd(0x41)
display.show()
# rotate 0 degrees
display.rotate(False)
display.show()
| display.rotate(True)
display.show()
display.write_cmd(ssd1327.SET_DISP_OFFSET)
display.write_cmd(128 - display.height)
display.write_cmd(ssd1327.SET_SEG_REMAP)
display.write_cmd(81)
display.show()
display.write_cmd(ssd1327.SET_DISP_OFFSET)
display.write_cmd(128 - display.height)
display.write_cmd(ssd1327.SET_SEG_REMAP)
display.write_cmd(82)
display.show()
display.write_cmd(ssd1327.SET_DISP_OFFSET)
display.write_cmd(display.height)
display.write_cmd(ssd1327.SET_SEG_REMAP)
display.write_cmd(66)
display.show()
display.write_cmd(ssd1327.SET_DISP_OFFSET)
display.write_cmd(display.height)
display.write_cmd(ssd1327.SET_SEG_REMAP)
display.write_cmd(65)
display.show()
display.rotate(False)
display.show() |
# Created by MechAviv
# Custom Puppy Damage Skin | (2439442)
if sm.addDamageSkin(2439442):
sm.chat("'Custom Puppy Damage Skin' Damage Skin has been added to your account's damage skin collection.")
sm.consumeItem() | if sm.addDamageSkin(2439442):
sm.chat("'Custom Puppy Damage Skin' Damage Skin has been added to your account's damage skin collection.")
sm.consumeItem() |
#
# PySNMP MIB module CISCO-WAN-NCDP-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-WAN-NCDP-MIB
# Produced by pysmi-0.3.4 at Wed May 1 12:20:37 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
OctetString, Integer, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "OctetString", "Integer", "ObjectIdentifier")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ConstraintsIntersection, ConstraintsUnion, ValueSizeConstraint, ValueRangeConstraint, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "ConstraintsUnion", "ValueSizeConstraint", "ValueRangeConstraint", "SingleValueConstraint")
ciscoMgmt, = mibBuilder.importSymbols("CISCO-SMI", "ciscoMgmt")
ifIndex, InterfaceIndexOrZero = mibBuilder.importSymbols("IF-MIB", "ifIndex", "InterfaceIndexOrZero")
ModuleCompliance, NotificationGroup, ObjectGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup", "ObjectGroup")
Counter64, ModuleIdentity, MibScalar, MibTable, MibTableRow, MibTableColumn, ObjectIdentity, IpAddress, Counter32, TimeTicks, NotificationType, Unsigned32, Gauge32, Integer32, MibIdentifier, Bits, iso = mibBuilder.importSymbols("SNMPv2-SMI", "Counter64", "ModuleIdentity", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "ObjectIdentity", "IpAddress", "Counter32", "TimeTicks", "NotificationType", "Unsigned32", "Gauge32", "Integer32", "MibIdentifier", "Bits", "iso")
TimeStamp, RowStatus, DisplayString, TruthValue, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "TimeStamp", "RowStatus", "DisplayString", "TruthValue", "TextualConvention")
ciscoWanNcdpMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 9, 9, 223))
ciscoWanNcdpMIB.setRevisions(('2001-11-07 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: ciscoWanNcdpMIB.setRevisionsDescriptions(('Initial version of the MIB.',))
if mibBuilder.loadTexts: ciscoWanNcdpMIB.setLastUpdated('200111070000Z')
if mibBuilder.loadTexts: ciscoWanNcdpMIB.setOrganization('Cisco System Inc.')
if mibBuilder.loadTexts: ciscoWanNcdpMIB.setContactInfo(' Cisco Systems Customer Service Postal: 170 West Tasman Drive, San Jose CA 95134-1706. USA Tel: +1 800 553-NETS E-mail: cs-atm@ciscoWAN.com')
if mibBuilder.loadTexts: ciscoWanNcdpMIB.setDescription("This MIB module is intended for the management of network clock distribution and the Network Clock Distribution Protocol (NCDP) in Cisco MGX ATM switches. This MIB allows enabling automatic network clock configuration and distribution as well as configuration of manual clock sources. NCDP allows automatic distribution of network clocking sources in the network. A spanning network clock distribution tree is constructed by each node in the network and each node is synchonized to one single 'master' clock reference. A source of network clock for the device may be an oscillator local to the device or a Building Integrated Timing Supply (BITS) port or an interface that supports synchronous clock recovery. An 'index'('cwnClockSourceIndex') is assigned by the NCDP protocol entity in the managed system to identify each available source of network clock on the managed system.")
cwnMIBObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 223, 1))
cwnGlobal = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 1))
cwnClockSource = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 2))
cwnManualSource = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 3))
cwnAtmSource = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 4))
cwnAtmInterface = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 5))
class ClockStratum(TextualConvention, Integer32):
reference = "American National Standards Institute, ANSI T1.101, 'Synchronization Interface for Digital Networks'. Bell Communications Research, GR-436-CORE, 'Digital Network Synchronization Plan'."
description = 'The stratum level associated with a source of network clock or a device.'
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8))
namedValues = NamedValues(("other", 1), ("s1", 2), ("s2e", 3), ("s2", 4), ("s3e", 5), ("s3", 6), ("s4e", 7), ("s4", 8))
class ClockHealthStatus(TextualConvention, Integer32):
description = "The health of a source of network clock. A value of 'good' indicates that a given source of network clock is known by the managed system to be good. This indicates the managed system was able to 'lock' onto the clock source. A value of 'bad' indicates that a given source of network clock is known by the managed system to be bad. This indicates the managed system was not able to 'lock' onto the clock source. A value of 'unknown' indicates that the health of the source of network clock is unknown to the managed system. This indicates the managed system has not tried to 'lock' onto the clock source."
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3))
namedValues = NamedValues(("good", 1), ("bad", 2), ("unknown", 3))
class ClockSourceIndex(TextualConvention, Integer32):
description = "An 'index' assigned by the device that uniquely identifies an available clock source on the device."
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(1, 2147483647)
cwnDistributionMethod = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("ncdp", 1), ("manual", 2))).clone('ncdp')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cwnDistributionMethod.setStatus('current')
if mibBuilder.loadTexts: cwnDistributionMethod.setDescription("The method used to distribute network clock for the device. When the mode of operation is 'ncdp', this device participates in NCDP protocol. A single 'master' clock source will be identified as the clock source for this network as a result. The tables 'cwnAtmSourceTable' and 'cwnAtmInterfaceTable' are used in this mode. When the mode of operation is 'manual', the network clock source is statically configured in this device. The table 'cwnManualSourceTable' is used in this mode.")
cwnNodeStratum = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 1, 2), ClockStratum().clone('s2')).setMaxAccess("readonly")
if mibBuilder.loadTexts: cwnNodeStratum.setStatus('current')
if mibBuilder.loadTexts: cwnNodeStratum.setDescription("This variable contains the stratum level of the node. This object is only used if the distribution method is 'ncdp'.")
cwnMaxDiameter = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(3, 255)).clone(20)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cwnMaxDiameter.setStatus('current')
if mibBuilder.loadTexts: cwnMaxDiameter.setDescription("The maximum possible height of a network clock distribution tree in the network. This variable must be configured with the same value for all devices participating in NCDP within the network. This object is only used if the distribution method is 'ncdp'.")
cwnMessageInterval = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(75, 60000)).clone(500)).setUnits('milliseconds').setMaxAccess("readwrite")
if mibBuilder.loadTexts: cwnMessageInterval.setStatus('current')
if mibBuilder.loadTexts: cwnMessageInterval.setDescription("The interval at which NCDP configuration PDUs ('Hellos') are to be generated. The message interval directly affects the convergence time of the NCDP algorithm. Convergence time is equal to the max network diameter * message interval + transmission delays + the time a configuration PDU is spent being processed in each device. Thus if transmission delays and processing delays are both close to 0, the convergence time is approximately ( max network diameter * message interval ) milliseconds. This object is only used if the distribution method is 'ncdp'.")
cwnHoldTime = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(75, 60000)).clone(500)).setUnits('milliseconds').setMaxAccess("readwrite")
if mibBuilder.loadTexts: cwnHoldTime.setStatus('current')
if mibBuilder.loadTexts: cwnHoldTime.setDescription("The minimum delay between the transmission of two consecutive NCDP configuration PDUs on an interface. The value of this object should normally be set to match the value of cwnMessageInterval. If the value of this object is higher than the value of cwnMessageInterval, NCDP configuration PDUs will end up being propagated at the rate specified by the value of this object instead. This object is only used if the distribution method is 'ncdp'.")
cwnChangeReason = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("other", 1), ("none", 2), ("lossOfLock", 3), ("lossOfActivity", 4), ("ncdpRestructure", 5)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cwnChangeReason.setStatus('current')
if mibBuilder.loadTexts: cwnChangeReason.setDescription("The reason for the most recent change of a source of network clock, as indicated by the change in the value of 'ciscoWanChangeTimeStamp'. 'none' indicates that the source of network clock has not changed. 'lossOfLock' indicates that the clock source was changed because the network clocking hardware lost lock on the previous network clock source. 'lossOfActivity' indicates that the clock source was changed because the network clocking hardware detected a loss of activity on the previous network clock source. 'ncdpRestructure' indicates that the NCDP entity has changed the clock source as a result of a network-wide network clock distribution tree restructuring process. When the reason for a clock switchover is none of the above, the value of this object is 'other'.")
cwnChangeTimeStamp = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 1, 7), TimeStamp()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cwnChangeTimeStamp.setStatus('current')
if mibBuilder.loadTexts: cwnChangeTimeStamp.setDescription('The value of sysUpTime when the most recent change of a source of network clock occurred. A value of 0 indicates that no such event has occurred since the instantiation of this object.')
cwnRootClockSource = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 1, 8), ClockSourceIndex()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cwnRootClockSource.setStatus('current')
if mibBuilder.loadTexts: cwnRootClockSource.setDescription("The 'index' of the network clock source that is actively supplying network clock within the device. When the value of this variable is used as an index into the 'cwnAtmSourceTable' and the indicated clock source has 'cwnAtmSourceBestClockSource' with value 'true', then the indicated clock source is the root of some clock distribution tree.")
cwnClockSourceTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 2, 1), )
if mibBuilder.loadTexts: cwnClockSourceTable.setStatus('current')
if mibBuilder.loadTexts: cwnClockSourceTable.setDescription('A table of network clock sources available to the managed system.')
cwnClockSourceEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 2, 1, 1), ).setIndexNames((0, "CISCO-WAN-NCDP-MIB", "cwnClockSourceIndex"))
if mibBuilder.loadTexts: cwnClockSourceEntry.setStatus('current')
if mibBuilder.loadTexts: cwnClockSourceEntry.setDescription("An entry in this table contains an available clock source on the device. A source of network clock for the device may be an oscillator local to the device or a Building Integrated Timing Supply (BITS) port or an interface that supports synchronous clock recovery. An index is assigned by the device to uniquely identify each of the source of networking clock on the managed system. A description is associated with each clock source. This description gives detail information of this clock source. The management station should poll this table to obtain these 'cwnClockSourceIndex' and use these indexes to configure clock source in 'cwnManualSourceTable' or 'cwnAtmSourceTable'.")
cwnClockSourceIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 2, 1, 1, 1), ClockSourceIndex())
if mibBuilder.loadTexts: cwnClockSourceIndex.setStatus('current')
if mibBuilder.loadTexts: cwnClockSourceIndex.setDescription("An 'index' assigned by the device which uniquely identifies an available clock source on the device. ")
cwnClockSourceDesc = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 2, 1, 1, 2), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cwnClockSourceDesc.setStatus('current')
if mibBuilder.loadTexts: cwnClockSourceDesc.setDescription('A description of the clock source associated with this entry. The description contains port/type information of this clock source. The format of this entry is implementation specific.')
cwnInterfaceIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 2, 1, 1, 3), InterfaceIndexOrZero()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cwnInterfaceIndex.setStatus('current')
if mibBuilder.loadTexts: cwnInterfaceIndex.setDescription("If this variable has a non-zero value, this is the 'ifIndex' associated with this entry. The 'ifIndex' identifies an ATM Virtual Interface (ifType 'atmVirtual(149)'). If this variable has a value of 'zero', this entry is not associated with an 'ifIndex' and its type is identified by 'cwnOtherClockSource'.")
cwnOtherClockSource = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 2, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("none", 1), ("internalOscillator", 2), ("bitsClockE1", 3), ("bitsClockT1", 4)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cwnOtherClockSource.setStatus('current')
if mibBuilder.loadTexts: cwnOtherClockSource.setDescription("This variable identifies the type of a clock source that does not have an 'ifIndex' associated. This value is 'none(1) if 'cwnInterfaceIndex' contains a non-zero value. The value 'internalOscillator(1) indicates a clock source is an oscillator local to the device. The value 'bitsClockE1(2) indicates a Building Integrated Timing Supply (BITS) clock source on an E1 port. The value 'bitsClockT1(3) indicates a BITS clock source on a T1 port.")
cwnManualSourceTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 3, 1), )
if mibBuilder.loadTexts: cwnManualSourceTable.setStatus('current')
if mibBuilder.loadTexts: cwnManualSourceTable.setDescription('A table of network clock sources to be manually configured for the managed system.')
cwnManualSourceEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 3, 1, 1), ).setIndexNames((0, "CISCO-WAN-NCDP-MIB", "cwnManualSourcePriority"))
if mibBuilder.loadTexts: cwnManualSourceEntry.setStatus('current')
if mibBuilder.loadTexts: cwnManualSourceEntry.setDescription("When the value of cwnDistributionMethod is 'manual', the managed system uses this table to select a source of network clock for the managed system from the entries in 'cwnClockSourceTable'. The management system uses 'cwnClockSourceIndex' to configure the associated clock source to be a primary, secondary or default clock source. A source of network clock for the device may be an oscillator local to the device or a Building Integrated Timing Supply (BITS) port or an interface that supports synchronous clock recovery. When the managed system initializes it creates a row for the device's default source of network clock, (the entry having 'cwnManualSourcePriority' with value 'default'). Only read operations is allowed on the columnar objects in this row. Other rows are created or destroyed by a management station or through the device's local management interface when a source of network clock is configured or removed. A row is not made active until a valid value for 'cwnManualSourceIndex' is supplied. A management station may perform a write operation on any columnar object while the row is active or not in service. ")
cwnManualSourcePriority = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 3, 1, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("primary", 1), ("secondary", 2), ("default", 3))))
if mibBuilder.loadTexts: cwnManualSourcePriority.setStatus('current')
if mibBuilder.loadTexts: cwnManualSourcePriority.setDescription('A value used to configure an available network clock source to be primary, secondary or default manual clock source.')
cwnManualSourceIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 3, 1, 1, 2), ClockSourceIndex()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cwnManualSourceIndex.setStatus('current')
if mibBuilder.loadTexts: cwnManualSourceIndex.setDescription("An 'index' value used to identify the primary, secondary ,or default manual clock source.")
cwnManualClockHealth = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 3, 1, 1, 3), ClockHealthStatus()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cwnManualClockHealth.setStatus('current')
if mibBuilder.loadTexts: cwnManualClockHealth.setDescription('The health of the clock source.')
cwnManualRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 3, 1, 1, 4), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cwnManualRowStatus.setStatus('current')
if mibBuilder.loadTexts: cwnManualRowStatus.setDescription('The status of this conceptual row.')
cwnAtmSourceTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 4, 1), )
if mibBuilder.loadTexts: cwnAtmSourceTable.setStatus('current')
if mibBuilder.loadTexts: cwnAtmSourceTable.setDescription('A table of configured network clock sources advertised by this managed system when using NCDP.')
cwnAtmSourceEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 4, 1, 1), ).setIndexNames((0, "CISCO-WAN-NCDP-MIB", "cwnClockSourceIndex"))
if mibBuilder.loadTexts: cwnAtmSourceEntry.setStatus('current')
if mibBuilder.loadTexts: cwnAtmSourceEntry.setDescription("Network clock status for sources of network clock identified by 'cwnClockSourceIndex' and used by the managed system when the value of 'cwnDistributionMethod' is 'ncdp'. The managed device selects one entry in this table to advertise as the best available clock source for the device. Cooperating NCDP protocol entities select the best available clock source among those advertised within the cooperating group and build a clock distribution tree rooted at that clock source. When the value of 'cwnRootClockSource' is used as an index into this table and the indicated clock source has 'cwnAtmSourceBestClockSource' with value 'true' then the indicated clock source is the root of some clock distribution tree. If only one such root exists on all participating devices in the network, then it is the root of a network wide clock distribution tree. When the managed system initializes it creates a row for the device's default source of network clock. This row cannot be destroyed by a management station. Within this row a write operation is only allowed on the 'cwnAtmSourcePriority' object. The status of this row is always active. The default source can always be found by issuing a read operation on the row within 'cwnManualSourceTable' that has 'default' as the value of 'cwnManualSourcePriority'. The other rows are created or destroyed by a management station or through the device's local management interface when a source of network clock is configured or removed. The values of 'cwnAtmSourcePriority', 'cwnAtmSourceStratum' and 'cwnAtmSourcePRSReference' collectively describe a source of network clock. They are the three components of a vector used as an input to the NCDP algorithm to make clock source selection decisions.")
cwnAtmSourceBestClockSource = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 4, 1, 1, 1), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cwnAtmSourceBestClockSource.setStatus('current')
if mibBuilder.loadTexts: cwnAtmSourceBestClockSource.setDescription('An indication of whether this is the best clock source being advertised.')
cwnAtmSourcePriority = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 4, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 255)).clone(128)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cwnAtmSourcePriority.setStatus('current')
if mibBuilder.loadTexts: cwnAtmSourcePriority.setDescription("The network-wide priority of this clock source if configured as a source of network clock for NCDP. The highest priority clock source is that clock source having the lowest positive numeric value. The clock source with the highest priority is selected as the root of the clock distribution tree by the NCDP algorithm. If more that one clock source is configured with with the same priority the NCDP algorithm uses the value 'cwnAtmSourceStratum' as a tiebreaker.")
cwnAtmSourceStratum = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 4, 1, 1, 3), ClockStratum().clone('s2')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cwnAtmSourceStratum.setStatus('current')
if mibBuilder.loadTexts: cwnAtmSourceStratum.setDescription("The stratum level associated with this clock source if configured as a source of network clock for NCDP. If the value of this object is used as a tiebreaker , the lower of the given values is the winner. If the values are the same, the value of 'cwnAtmSourcePRSReference' is used as a tiebreaker by the NCDP algorithm.")
cwnAtmSourcePRSReference = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 4, 1, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("internal", 1), ("external", 2)))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cwnAtmSourcePRSReference.setStatus('current')
if mibBuilder.loadTexts: cwnAtmSourcePRSReference.setDescription("An value that identifies the Primary Reference Source that the network clock available from this source is traceable to if configured as a source of network clock for NCDP. The object takes the value 'internal' when the PRS for this source is an onboard oscillator local to the device. For any other cases the value 'external' is used. If the value of this object is used as a tiebreaker by the algorithm,'external' wins over 'internal'. All 'external' sources of network clock are assumed to be traceable to the same PRS by the NCDP protocol entity.")
cwnAtmSourceClockHealth = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 4, 1, 1, 5), ClockHealthStatus()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cwnAtmSourceClockHealth.setStatus('current')
if mibBuilder.loadTexts: cwnAtmSourceClockHealth.setDescription('The health of the clock source.')
cwnAtmSourceRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 4, 1, 1, 6), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cwnAtmSourceRowStatus.setStatus('current')
if mibBuilder.loadTexts: cwnAtmSourceRowStatus.setDescription('The status of this conceptual row.')
cwnAtmInterfaceTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 5, 1), )
if mibBuilder.loadTexts: cwnAtmInterfaceTable.setStatus('current')
if mibBuilder.loadTexts: cwnAtmInterfaceTable.setDescription("A table containing the status of NCDP on the device's ATM Network-to-Network(NNI) interfaces.")
cwnAtmInterfaceEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 5, 1, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"))
if mibBuilder.loadTexts: cwnAtmInterfaceEntry.setStatus('current')
if mibBuilder.loadTexts: cwnAtmInterfaceEntry.setDescription("An entry in this table contains the status of NCDP on an ATM Netowrk-to-Network (NNI) interface. A row in this table is created by the managed system and disappears when the associated entity disappears. When a row is created all of the row objects are instantiated. Each entry identified by 'ifIndex' is of ifType 'atmvirtual(149)'. ")
cwnAtmInterfaceEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 5, 1, 1, 1), TruthValue().clone('true')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cwnAtmInterfaceEnable.setStatus('current')
if mibBuilder.loadTexts: cwnAtmInterfaceEnable.setDescription("An indication of whether NCDP is presently running on an ATM Network-to-Network interface. When NCDP is enabled for an interface, the interface is an active member of the clock distribution topology. After this object is instantiated by the agent the managed system initializes the value of this object to 'true'. By default, all Network-to-Network interfaces participate in NCDP until it's disabled by setting the value of this object to 'false'.")
cwnAtmInterfaceAdminWeight = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 5, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 16777215)).clone(10)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cwnAtmInterfaceAdminWeight.setStatus('current')
if mibBuilder.loadTexts: cwnAtmInterfaceAdminWeight.setDescription('A weight metric used by the NCDP protocol entity and associated with a physical interface that supports synchronous clock recovery. When NCDP is enabled for the physical interface the value of this object is used by NCDP algorithms during tree computations. The lower the administrative weight, the more attractive the given link is to the NCDP algorithm. If the weight of a link is changed, it can cause the NCDP protocol entity to reconstruct the clock distribution tree.')
cwnAtmInterfaceVpi = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 5, 1, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 4095))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cwnAtmInterfaceVpi.setStatus('current')
if mibBuilder.loadTexts: cwnAtmInterfaceVpi.setDescription("The Virtual Path Identifier(VPI) value of the Virtual Channel Connection(VCC) supporting the NCDP entity at this ATM interface. If the values of 'cwnAtmInterfaceVpi' and 'cwnAtmInterfaceVci' are both equal to zero then the NCDP entity is not supported at this ATM interface.")
cwnAtmInterfaceVci = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 5, 1, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535)).clone(34)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cwnAtmInterfaceVci.setStatus('current')
if mibBuilder.loadTexts: cwnAtmInterfaceVci.setDescription("The Virtual Channel Identifier(VCI) value of the VCC supporting the NCDP entity at this ATM interface. If the values of 'cwnAtmInterfaceVpi' and 'cwnAtmInterfaceVci' are both equal to zero then the NCDP entity is not supported at this ATM interface.")
ciscoWanNcdpMIBNotificationPrefix = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 223, 2))
ciscoWanNcdpMIBNotifications = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 223, 2, 0))
ciscoWanNcdpMIBConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 223, 3))
ciscoWanNcdpMIBCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 223, 3, 1))
ciscoWanNcdpMIBGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 223, 3, 2))
ciscoWanMIBCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 223, 3, 1, 1)).setObjects(("CISCO-WAN-NCDP-MIB", "ciscoWanNcdpGlobalGroup"), ("CISCO-WAN-NCDP-MIB", "ciscoWanNcdpClockSourceGroup"), ("CISCO-WAN-NCDP-MIB", "ciscoWanNcdpManualGroup"), ("CISCO-WAN-NCDP-MIB", "ciscoWanNcdpAtmGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ciscoWanMIBCompliance = ciscoWanMIBCompliance.setStatus('current')
if mibBuilder.loadTexts: ciscoWanMIBCompliance.setDescription('The compliance statement for SNMPv2 entities which implement network clock distribution methods and NCDP.')
ciscoWanNcdpGlobalGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 223, 3, 2, 1)).setObjects(("CISCO-WAN-NCDP-MIB", "cwnDistributionMethod"), ("CISCO-WAN-NCDP-MIB", "cwnNodeStratum"), ("CISCO-WAN-NCDP-MIB", "cwnMaxDiameter"), ("CISCO-WAN-NCDP-MIB", "cwnMessageInterval"), ("CISCO-WAN-NCDP-MIB", "cwnHoldTime"), ("CISCO-WAN-NCDP-MIB", "cwnChangeReason"), ("CISCO-WAN-NCDP-MIB", "cwnChangeTimeStamp"), ("CISCO-WAN-NCDP-MIB", "cwnRootClockSource"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ciscoWanNcdpGlobalGroup = ciscoWanNcdpGlobalGroup.setStatus('current')
if mibBuilder.loadTexts: ciscoWanNcdpGlobalGroup.setDescription('This group contains global objects providing for management of network clock distribution and NCDP entities.')
ciscoWanNcdpClockSourceGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 223, 3, 2, 2)).setObjects(("CISCO-WAN-NCDP-MIB", "cwnClockSourceDesc"), ("CISCO-WAN-NCDP-MIB", "cwnInterfaceIndex"), ("CISCO-WAN-NCDP-MIB", "cwnOtherClockSource"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ciscoWanNcdpClockSourceGroup = ciscoWanNcdpClockSourceGroup.setStatus('current')
if mibBuilder.loadTexts: ciscoWanNcdpClockSourceGroup.setDescription('This group contains the available clock source on the managed system.')
ciscoWanNcdpManualGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 223, 3, 2, 3)).setObjects(("CISCO-WAN-NCDP-MIB", "cwnManualSourceIndex"), ("CISCO-WAN-NCDP-MIB", "cwnManualClockHealth"), ("CISCO-WAN-NCDP-MIB", "cwnManualRowStatus"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ciscoWanNcdpManualGroup = ciscoWanNcdpManualGroup.setStatus('current')
if mibBuilder.loadTexts: ciscoWanNcdpManualGroup.setDescription('This group contains objects for manual configuration of clock sources on the managed system.')
ciscoWanNcdpAtmGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 223, 3, 2, 4)).setObjects(("CISCO-WAN-NCDP-MIB", "cwnAtmSourceBestClockSource"), ("CISCO-WAN-NCDP-MIB", "cwnAtmSourcePriority"), ("CISCO-WAN-NCDP-MIB", "cwnAtmSourceStratum"), ("CISCO-WAN-NCDP-MIB", "cwnAtmSourcePRSReference"), ("CISCO-WAN-NCDP-MIB", "cwnAtmSourceClockHealth"), ("CISCO-WAN-NCDP-MIB", "cwnAtmSourceRowStatus"), ("CISCO-WAN-NCDP-MIB", "cwnAtmInterfaceEnable"), ("CISCO-WAN-NCDP-MIB", "cwnAtmInterfaceAdminWeight"), ("CISCO-WAN-NCDP-MIB", "cwnAtmInterfaceVpi"), ("CISCO-WAN-NCDP-MIB", "cwnAtmInterfaceVci"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ciscoWanNcdpAtmGroup = ciscoWanNcdpAtmGroup.setStatus('current')
if mibBuilder.loadTexts: ciscoWanNcdpAtmGroup.setDescription('This group contains objects for configuration of NCDP entity on an ATM platform.')
mibBuilder.exportSymbols("CISCO-WAN-NCDP-MIB", cwnMaxDiameter=cwnMaxDiameter, PYSNMP_MODULE_ID=ciscoWanNcdpMIB, cwnInterfaceIndex=cwnInterfaceIndex, cwnManualSource=cwnManualSource, cwnManualClockHealth=cwnManualClockHealth, ciscoWanNcdpMIBCompliances=ciscoWanNcdpMIBCompliances, cwnAtmSource=cwnAtmSource, ciscoWanNcdpMIBConformance=ciscoWanNcdpMIBConformance, cwnAtmInterfaceVci=cwnAtmInterfaceVci, ciscoWanNcdpMIBNotificationPrefix=ciscoWanNcdpMIBNotificationPrefix, cwnAtmSourceStratum=cwnAtmSourceStratum, ClockStratum=ClockStratum, cwnAtmInterface=cwnAtmInterface, cwnManualSourceEntry=cwnManualSourceEntry, cwnMIBObjects=cwnMIBObjects, cwnAtmSourceClockHealth=cwnAtmSourceClockHealth, cwnClockSourceEntry=cwnClockSourceEntry, cwnClockSource=cwnClockSource, ciscoWanMIBCompliance=ciscoWanMIBCompliance, cwnAtmInterfaceEnable=cwnAtmInterfaceEnable, cwnChangeReason=cwnChangeReason, cwnClockSourceIndex=cwnClockSourceIndex, ciscoWanNcdpManualGroup=ciscoWanNcdpManualGroup, cwnNodeStratum=cwnNodeStratum, cwnChangeTimeStamp=cwnChangeTimeStamp, cwnAtmInterfaceAdminWeight=cwnAtmInterfaceAdminWeight, ciscoWanNcdpClockSourceGroup=ciscoWanNcdpClockSourceGroup, cwnManualSourceIndex=cwnManualSourceIndex, cwnAtmSourceRowStatus=cwnAtmSourceRowStatus, cwnGlobal=cwnGlobal, cwnHoldTime=cwnHoldTime, cwnMessageInterval=cwnMessageInterval, cwnAtmInterfaceTable=cwnAtmInterfaceTable, cwnAtmSourcePRSReference=cwnAtmSourcePRSReference, cwnClockSourceTable=cwnClockSourceTable, cwnAtmInterfaceVpi=cwnAtmInterfaceVpi, cwnDistributionMethod=cwnDistributionMethod, cwnClockSourceDesc=cwnClockSourceDesc, cwnAtmSourcePriority=cwnAtmSourcePriority, ciscoWanNcdpAtmGroup=ciscoWanNcdpAtmGroup, ciscoWanNcdpMIB=ciscoWanNcdpMIB, cwnAtmSourceBestClockSource=cwnAtmSourceBestClockSource, cwnAtmInterfaceEntry=cwnAtmInterfaceEntry, cwnAtmSourceTable=cwnAtmSourceTable, cwnRootClockSource=cwnRootClockSource, cwnOtherClockSource=cwnOtherClockSource, ClockSourceIndex=ClockSourceIndex, ciscoWanNcdpGlobalGroup=ciscoWanNcdpGlobalGroup, cwnManualRowStatus=cwnManualRowStatus, cwnManualSourceTable=cwnManualSourceTable, ciscoWanNcdpMIBGroups=ciscoWanNcdpMIBGroups, ClockHealthStatus=ClockHealthStatus, cwnAtmSourceEntry=cwnAtmSourceEntry, ciscoWanNcdpMIBNotifications=ciscoWanNcdpMIBNotifications, cwnManualSourcePriority=cwnManualSourcePriority)
| (octet_string, integer, object_identifier) = mibBuilder.importSymbols('ASN1', 'OctetString', 'Integer', 'ObjectIdentifier')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(constraints_intersection, constraints_union, value_size_constraint, value_range_constraint, single_value_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsIntersection', 'ConstraintsUnion', 'ValueSizeConstraint', 'ValueRangeConstraint', 'SingleValueConstraint')
(cisco_mgmt,) = mibBuilder.importSymbols('CISCO-SMI', 'ciscoMgmt')
(if_index, interface_index_or_zero) = mibBuilder.importSymbols('IF-MIB', 'ifIndex', 'InterfaceIndexOrZero')
(module_compliance, notification_group, object_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup', 'ObjectGroup')
(counter64, module_identity, mib_scalar, mib_table, mib_table_row, mib_table_column, object_identity, ip_address, counter32, time_ticks, notification_type, unsigned32, gauge32, integer32, mib_identifier, bits, iso) = mibBuilder.importSymbols('SNMPv2-SMI', 'Counter64', 'ModuleIdentity', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'ObjectIdentity', 'IpAddress', 'Counter32', 'TimeTicks', 'NotificationType', 'Unsigned32', 'Gauge32', 'Integer32', 'MibIdentifier', 'Bits', 'iso')
(time_stamp, row_status, display_string, truth_value, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'TimeStamp', 'RowStatus', 'DisplayString', 'TruthValue', 'TextualConvention')
cisco_wan_ncdp_mib = module_identity((1, 3, 6, 1, 4, 1, 9, 9, 223))
ciscoWanNcdpMIB.setRevisions(('2001-11-07 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts:
ciscoWanNcdpMIB.setRevisionsDescriptions(('Initial version of the MIB.',))
if mibBuilder.loadTexts:
ciscoWanNcdpMIB.setLastUpdated('200111070000Z')
if mibBuilder.loadTexts:
ciscoWanNcdpMIB.setOrganization('Cisco System Inc.')
if mibBuilder.loadTexts:
ciscoWanNcdpMIB.setContactInfo(' Cisco Systems Customer Service Postal: 170 West Tasman Drive, San Jose CA 95134-1706. USA Tel: +1 800 553-NETS E-mail: cs-atm@ciscoWAN.com')
if mibBuilder.loadTexts:
ciscoWanNcdpMIB.setDescription("This MIB module is intended for the management of network clock distribution and the Network Clock Distribution Protocol (NCDP) in Cisco MGX ATM switches. This MIB allows enabling automatic network clock configuration and distribution as well as configuration of manual clock sources. NCDP allows automatic distribution of network clocking sources in the network. A spanning network clock distribution tree is constructed by each node in the network and each node is synchonized to one single 'master' clock reference. A source of network clock for the device may be an oscillator local to the device or a Building Integrated Timing Supply (BITS) port or an interface that supports synchronous clock recovery. An 'index'('cwnClockSourceIndex') is assigned by the NCDP protocol entity in the managed system to identify each available source of network clock on the managed system.")
cwn_mib_objects = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 223, 1))
cwn_global = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 1))
cwn_clock_source = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 2))
cwn_manual_source = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 3))
cwn_atm_source = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 4))
cwn_atm_interface = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 5))
class Clockstratum(TextualConvention, Integer32):
reference = "American National Standards Institute, ANSI T1.101, 'Synchronization Interface for Digital Networks'. Bell Communications Research, GR-436-CORE, 'Digital Network Synchronization Plan'."
description = 'The stratum level associated with a source of network clock or a device.'
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8))
named_values = named_values(('other', 1), ('s1', 2), ('s2e', 3), ('s2', 4), ('s3e', 5), ('s3', 6), ('s4e', 7), ('s4', 8))
class Clockhealthstatus(TextualConvention, Integer32):
description = "The health of a source of network clock. A value of 'good' indicates that a given source of network clock is known by the managed system to be good. This indicates the managed system was able to 'lock' onto the clock source. A value of 'bad' indicates that a given source of network clock is known by the managed system to be bad. This indicates the managed system was not able to 'lock' onto the clock source. A value of 'unknown' indicates that the health of the source of network clock is unknown to the managed system. This indicates the managed system has not tried to 'lock' onto the clock source."
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3))
named_values = named_values(('good', 1), ('bad', 2), ('unknown', 3))
class Clocksourceindex(TextualConvention, Integer32):
description = "An 'index' assigned by the device that uniquely identifies an available clock source on the device."
status = 'current'
subtype_spec = Integer32.subtypeSpec + value_range_constraint(1, 2147483647)
cwn_distribution_method = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('ncdp', 1), ('manual', 2))).clone('ncdp')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cwnDistributionMethod.setStatus('current')
if mibBuilder.loadTexts:
cwnDistributionMethod.setDescription("The method used to distribute network clock for the device. When the mode of operation is 'ncdp', this device participates in NCDP protocol. A single 'master' clock source will be identified as the clock source for this network as a result. The tables 'cwnAtmSourceTable' and 'cwnAtmInterfaceTable' are used in this mode. When the mode of operation is 'manual', the network clock source is statically configured in this device. The table 'cwnManualSourceTable' is used in this mode.")
cwn_node_stratum = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 1, 2), clock_stratum().clone('s2')).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cwnNodeStratum.setStatus('current')
if mibBuilder.loadTexts:
cwnNodeStratum.setDescription("This variable contains the stratum level of the node. This object is only used if the distribution method is 'ncdp'.")
cwn_max_diameter = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(3, 255)).clone(20)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cwnMaxDiameter.setStatus('current')
if mibBuilder.loadTexts:
cwnMaxDiameter.setDescription("The maximum possible height of a network clock distribution tree in the network. This variable must be configured with the same value for all devices participating in NCDP within the network. This object is only used if the distribution method is 'ncdp'.")
cwn_message_interval = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(75, 60000)).clone(500)).setUnits('milliseconds').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cwnMessageInterval.setStatus('current')
if mibBuilder.loadTexts:
cwnMessageInterval.setDescription("The interval at which NCDP configuration PDUs ('Hellos') are to be generated. The message interval directly affects the convergence time of the NCDP algorithm. Convergence time is equal to the max network diameter * message interval + transmission delays + the time a configuration PDU is spent being processed in each device. Thus if transmission delays and processing delays are both close to 0, the convergence time is approximately ( max network diameter * message interval ) milliseconds. This object is only used if the distribution method is 'ncdp'.")
cwn_hold_time = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(75, 60000)).clone(500)).setUnits('milliseconds').setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cwnHoldTime.setStatus('current')
if mibBuilder.loadTexts:
cwnHoldTime.setDescription("The minimum delay between the transmission of two consecutive NCDP configuration PDUs on an interface. The value of this object should normally be set to match the value of cwnMessageInterval. If the value of this object is higher than the value of cwnMessageInterval, NCDP configuration PDUs will end up being propagated at the rate specified by the value of this object instead. This object is only used if the distribution method is 'ncdp'.")
cwn_change_reason = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('other', 1), ('none', 2), ('lossOfLock', 3), ('lossOfActivity', 4), ('ncdpRestructure', 5)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cwnChangeReason.setStatus('current')
if mibBuilder.loadTexts:
cwnChangeReason.setDescription("The reason for the most recent change of a source of network clock, as indicated by the change in the value of 'ciscoWanChangeTimeStamp'. 'none' indicates that the source of network clock has not changed. 'lossOfLock' indicates that the clock source was changed because the network clocking hardware lost lock on the previous network clock source. 'lossOfActivity' indicates that the clock source was changed because the network clocking hardware detected a loss of activity on the previous network clock source. 'ncdpRestructure' indicates that the NCDP entity has changed the clock source as a result of a network-wide network clock distribution tree restructuring process. When the reason for a clock switchover is none of the above, the value of this object is 'other'.")
cwn_change_time_stamp = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 1, 7), time_stamp()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cwnChangeTimeStamp.setStatus('current')
if mibBuilder.loadTexts:
cwnChangeTimeStamp.setDescription('The value of sysUpTime when the most recent change of a source of network clock occurred. A value of 0 indicates that no such event has occurred since the instantiation of this object.')
cwn_root_clock_source = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 1, 8), clock_source_index()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cwnRootClockSource.setStatus('current')
if mibBuilder.loadTexts:
cwnRootClockSource.setDescription("The 'index' of the network clock source that is actively supplying network clock within the device. When the value of this variable is used as an index into the 'cwnAtmSourceTable' and the indicated clock source has 'cwnAtmSourceBestClockSource' with value 'true', then the indicated clock source is the root of some clock distribution tree.")
cwn_clock_source_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 2, 1))
if mibBuilder.loadTexts:
cwnClockSourceTable.setStatus('current')
if mibBuilder.loadTexts:
cwnClockSourceTable.setDescription('A table of network clock sources available to the managed system.')
cwn_clock_source_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 2, 1, 1)).setIndexNames((0, 'CISCO-WAN-NCDP-MIB', 'cwnClockSourceIndex'))
if mibBuilder.loadTexts:
cwnClockSourceEntry.setStatus('current')
if mibBuilder.loadTexts:
cwnClockSourceEntry.setDescription("An entry in this table contains an available clock source on the device. A source of network clock for the device may be an oscillator local to the device or a Building Integrated Timing Supply (BITS) port or an interface that supports synchronous clock recovery. An index is assigned by the device to uniquely identify each of the source of networking clock on the managed system. A description is associated with each clock source. This description gives detail information of this clock source. The management station should poll this table to obtain these 'cwnClockSourceIndex' and use these indexes to configure clock source in 'cwnManualSourceTable' or 'cwnAtmSourceTable'.")
cwn_clock_source_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 2, 1, 1, 1), clock_source_index())
if mibBuilder.loadTexts:
cwnClockSourceIndex.setStatus('current')
if mibBuilder.loadTexts:
cwnClockSourceIndex.setDescription("An 'index' assigned by the device which uniquely identifies an available clock source on the device. ")
cwn_clock_source_desc = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 2, 1, 1, 2), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cwnClockSourceDesc.setStatus('current')
if mibBuilder.loadTexts:
cwnClockSourceDesc.setDescription('A description of the clock source associated with this entry. The description contains port/type information of this clock source. The format of this entry is implementation specific.')
cwn_interface_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 2, 1, 1, 3), interface_index_or_zero()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cwnInterfaceIndex.setStatus('current')
if mibBuilder.loadTexts:
cwnInterfaceIndex.setDescription("If this variable has a non-zero value, this is the 'ifIndex' associated with this entry. The 'ifIndex' identifies an ATM Virtual Interface (ifType 'atmVirtual(149)'). If this variable has a value of 'zero', this entry is not associated with an 'ifIndex' and its type is identified by 'cwnOtherClockSource'.")
cwn_other_clock_source = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 2, 1, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('none', 1), ('internalOscillator', 2), ('bitsClockE1', 3), ('bitsClockT1', 4)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cwnOtherClockSource.setStatus('current')
if mibBuilder.loadTexts:
cwnOtherClockSource.setDescription("This variable identifies the type of a clock source that does not have an 'ifIndex' associated. This value is 'none(1) if 'cwnInterfaceIndex' contains a non-zero value. The value 'internalOscillator(1) indicates a clock source is an oscillator local to the device. The value 'bitsClockE1(2) indicates a Building Integrated Timing Supply (BITS) clock source on an E1 port. The value 'bitsClockT1(3) indicates a BITS clock source on a T1 port.")
cwn_manual_source_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 3, 1))
if mibBuilder.loadTexts:
cwnManualSourceTable.setStatus('current')
if mibBuilder.loadTexts:
cwnManualSourceTable.setDescription('A table of network clock sources to be manually configured for the managed system.')
cwn_manual_source_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 3, 1, 1)).setIndexNames((0, 'CISCO-WAN-NCDP-MIB', 'cwnManualSourcePriority'))
if mibBuilder.loadTexts:
cwnManualSourceEntry.setStatus('current')
if mibBuilder.loadTexts:
cwnManualSourceEntry.setDescription("When the value of cwnDistributionMethod is 'manual', the managed system uses this table to select a source of network clock for the managed system from the entries in 'cwnClockSourceTable'. The management system uses 'cwnClockSourceIndex' to configure the associated clock source to be a primary, secondary or default clock source. A source of network clock for the device may be an oscillator local to the device or a Building Integrated Timing Supply (BITS) port or an interface that supports synchronous clock recovery. When the managed system initializes it creates a row for the device's default source of network clock, (the entry having 'cwnManualSourcePriority' with value 'default'). Only read operations is allowed on the columnar objects in this row. Other rows are created or destroyed by a management station or through the device's local management interface when a source of network clock is configured or removed. A row is not made active until a valid value for 'cwnManualSourceIndex' is supplied. A management station may perform a write operation on any columnar object while the row is active or not in service. ")
cwn_manual_source_priority = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 3, 1, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('primary', 1), ('secondary', 2), ('default', 3))))
if mibBuilder.loadTexts:
cwnManualSourcePriority.setStatus('current')
if mibBuilder.loadTexts:
cwnManualSourcePriority.setDescription('A value used to configure an available network clock source to be primary, secondary or default manual clock source.')
cwn_manual_source_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 3, 1, 1, 2), clock_source_index()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cwnManualSourceIndex.setStatus('current')
if mibBuilder.loadTexts:
cwnManualSourceIndex.setDescription("An 'index' value used to identify the primary, secondary ,or default manual clock source.")
cwn_manual_clock_health = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 3, 1, 1, 3), clock_health_status()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cwnManualClockHealth.setStatus('current')
if mibBuilder.loadTexts:
cwnManualClockHealth.setDescription('The health of the clock source.')
cwn_manual_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 3, 1, 1, 4), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cwnManualRowStatus.setStatus('current')
if mibBuilder.loadTexts:
cwnManualRowStatus.setDescription('The status of this conceptual row.')
cwn_atm_source_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 4, 1))
if mibBuilder.loadTexts:
cwnAtmSourceTable.setStatus('current')
if mibBuilder.loadTexts:
cwnAtmSourceTable.setDescription('A table of configured network clock sources advertised by this managed system when using NCDP.')
cwn_atm_source_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 4, 1, 1)).setIndexNames((0, 'CISCO-WAN-NCDP-MIB', 'cwnClockSourceIndex'))
if mibBuilder.loadTexts:
cwnAtmSourceEntry.setStatus('current')
if mibBuilder.loadTexts:
cwnAtmSourceEntry.setDescription("Network clock status for sources of network clock identified by 'cwnClockSourceIndex' and used by the managed system when the value of 'cwnDistributionMethod' is 'ncdp'. The managed device selects one entry in this table to advertise as the best available clock source for the device. Cooperating NCDP protocol entities select the best available clock source among those advertised within the cooperating group and build a clock distribution tree rooted at that clock source. When the value of 'cwnRootClockSource' is used as an index into this table and the indicated clock source has 'cwnAtmSourceBestClockSource' with value 'true' then the indicated clock source is the root of some clock distribution tree. If only one such root exists on all participating devices in the network, then it is the root of a network wide clock distribution tree. When the managed system initializes it creates a row for the device's default source of network clock. This row cannot be destroyed by a management station. Within this row a write operation is only allowed on the 'cwnAtmSourcePriority' object. The status of this row is always active. The default source can always be found by issuing a read operation on the row within 'cwnManualSourceTable' that has 'default' as the value of 'cwnManualSourcePriority'. The other rows are created or destroyed by a management station or through the device's local management interface when a source of network clock is configured or removed. The values of 'cwnAtmSourcePriority', 'cwnAtmSourceStratum' and 'cwnAtmSourcePRSReference' collectively describe a source of network clock. They are the three components of a vector used as an input to the NCDP algorithm to make clock source selection decisions.")
cwn_atm_source_best_clock_source = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 4, 1, 1, 1), truth_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cwnAtmSourceBestClockSource.setStatus('current')
if mibBuilder.loadTexts:
cwnAtmSourceBestClockSource.setDescription('An indication of whether this is the best clock source being advertised.')
cwn_atm_source_priority = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 4, 1, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(1, 255)).clone(128)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cwnAtmSourcePriority.setStatus('current')
if mibBuilder.loadTexts:
cwnAtmSourcePriority.setDescription("The network-wide priority of this clock source if configured as a source of network clock for NCDP. The highest priority clock source is that clock source having the lowest positive numeric value. The clock source with the highest priority is selected as the root of the clock distribution tree by the NCDP algorithm. If more that one clock source is configured with with the same priority the NCDP algorithm uses the value 'cwnAtmSourceStratum' as a tiebreaker.")
cwn_atm_source_stratum = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 4, 1, 1, 3), clock_stratum().clone('s2')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cwnAtmSourceStratum.setStatus('current')
if mibBuilder.loadTexts:
cwnAtmSourceStratum.setDescription("The stratum level associated with this clock source if configured as a source of network clock for NCDP. If the value of this object is used as a tiebreaker , the lower of the given values is the winner. If the values are the same, the value of 'cwnAtmSourcePRSReference' is used as a tiebreaker by the NCDP algorithm.")
cwn_atm_source_prs_reference = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 4, 1, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('internal', 1), ('external', 2)))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cwnAtmSourcePRSReference.setStatus('current')
if mibBuilder.loadTexts:
cwnAtmSourcePRSReference.setDescription("An value that identifies the Primary Reference Source that the network clock available from this source is traceable to if configured as a source of network clock for NCDP. The object takes the value 'internal' when the PRS for this source is an onboard oscillator local to the device. For any other cases the value 'external' is used. If the value of this object is used as a tiebreaker by the algorithm,'external' wins over 'internal'. All 'external' sources of network clock are assumed to be traceable to the same PRS by the NCDP protocol entity.")
cwn_atm_source_clock_health = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 4, 1, 1, 5), clock_health_status()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cwnAtmSourceClockHealth.setStatus('current')
if mibBuilder.loadTexts:
cwnAtmSourceClockHealth.setDescription('The health of the clock source.')
cwn_atm_source_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 4, 1, 1, 6), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cwnAtmSourceRowStatus.setStatus('current')
if mibBuilder.loadTexts:
cwnAtmSourceRowStatus.setDescription('The status of this conceptual row.')
cwn_atm_interface_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 5, 1))
if mibBuilder.loadTexts:
cwnAtmInterfaceTable.setStatus('current')
if mibBuilder.loadTexts:
cwnAtmInterfaceTable.setDescription("A table containing the status of NCDP on the device's ATM Network-to-Network(NNI) interfaces.")
cwn_atm_interface_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 5, 1, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex'))
if mibBuilder.loadTexts:
cwnAtmInterfaceEntry.setStatus('current')
if mibBuilder.loadTexts:
cwnAtmInterfaceEntry.setDescription("An entry in this table contains the status of NCDP on an ATM Netowrk-to-Network (NNI) interface. A row in this table is created by the managed system and disappears when the associated entity disappears. When a row is created all of the row objects are instantiated. Each entry identified by 'ifIndex' is of ifType 'atmvirtual(149)'. ")
cwn_atm_interface_enable = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 5, 1, 1, 1), truth_value().clone('true')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cwnAtmInterfaceEnable.setStatus('current')
if mibBuilder.loadTexts:
cwnAtmInterfaceEnable.setDescription("An indication of whether NCDP is presently running on an ATM Network-to-Network interface. When NCDP is enabled for an interface, the interface is an active member of the clock distribution topology. After this object is instantiated by the agent the managed system initializes the value of this object to 'true'. By default, all Network-to-Network interfaces participate in NCDP until it's disabled by setting the value of this object to 'false'.")
cwn_atm_interface_admin_weight = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 5, 1, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(1, 16777215)).clone(10)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cwnAtmInterfaceAdminWeight.setStatus('current')
if mibBuilder.loadTexts:
cwnAtmInterfaceAdminWeight.setDescription('A weight metric used by the NCDP protocol entity and associated with a physical interface that supports synchronous clock recovery. When NCDP is enabled for the physical interface the value of this object is used by NCDP algorithms during tree computations. The lower the administrative weight, the more attractive the given link is to the NCDP algorithm. If the weight of a link is changed, it can cause the NCDP protocol entity to reconstruct the clock distribution tree.')
cwn_atm_interface_vpi = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 5, 1, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 4095))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cwnAtmInterfaceVpi.setStatus('current')
if mibBuilder.loadTexts:
cwnAtmInterfaceVpi.setDescription("The Virtual Path Identifier(VPI) value of the Virtual Channel Connection(VCC) supporting the NCDP entity at this ATM interface. If the values of 'cwnAtmInterfaceVpi' and 'cwnAtmInterfaceVci' are both equal to zero then the NCDP entity is not supported at this ATM interface.")
cwn_atm_interface_vci = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 223, 1, 5, 1, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535)).clone(34)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cwnAtmInterfaceVci.setStatus('current')
if mibBuilder.loadTexts:
cwnAtmInterfaceVci.setDescription("The Virtual Channel Identifier(VCI) value of the VCC supporting the NCDP entity at this ATM interface. If the values of 'cwnAtmInterfaceVpi' and 'cwnAtmInterfaceVci' are both equal to zero then the NCDP entity is not supported at this ATM interface.")
cisco_wan_ncdp_mib_notification_prefix = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 223, 2))
cisco_wan_ncdp_mib_notifications = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 223, 2, 0))
cisco_wan_ncdp_mib_conformance = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 223, 3))
cisco_wan_ncdp_mib_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 223, 3, 1))
cisco_wan_ncdp_mib_groups = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 223, 3, 2))
cisco_wan_mib_compliance = module_compliance((1, 3, 6, 1, 4, 1, 9, 9, 223, 3, 1, 1)).setObjects(('CISCO-WAN-NCDP-MIB', 'ciscoWanNcdpGlobalGroup'), ('CISCO-WAN-NCDP-MIB', 'ciscoWanNcdpClockSourceGroup'), ('CISCO-WAN-NCDP-MIB', 'ciscoWanNcdpManualGroup'), ('CISCO-WAN-NCDP-MIB', 'ciscoWanNcdpAtmGroup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cisco_wan_mib_compliance = ciscoWanMIBCompliance.setStatus('current')
if mibBuilder.loadTexts:
ciscoWanMIBCompliance.setDescription('The compliance statement for SNMPv2 entities which implement network clock distribution methods and NCDP.')
cisco_wan_ncdp_global_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 223, 3, 2, 1)).setObjects(('CISCO-WAN-NCDP-MIB', 'cwnDistributionMethod'), ('CISCO-WAN-NCDP-MIB', 'cwnNodeStratum'), ('CISCO-WAN-NCDP-MIB', 'cwnMaxDiameter'), ('CISCO-WAN-NCDP-MIB', 'cwnMessageInterval'), ('CISCO-WAN-NCDP-MIB', 'cwnHoldTime'), ('CISCO-WAN-NCDP-MIB', 'cwnChangeReason'), ('CISCO-WAN-NCDP-MIB', 'cwnChangeTimeStamp'), ('CISCO-WAN-NCDP-MIB', 'cwnRootClockSource'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cisco_wan_ncdp_global_group = ciscoWanNcdpGlobalGroup.setStatus('current')
if mibBuilder.loadTexts:
ciscoWanNcdpGlobalGroup.setDescription('This group contains global objects providing for management of network clock distribution and NCDP entities.')
cisco_wan_ncdp_clock_source_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 223, 3, 2, 2)).setObjects(('CISCO-WAN-NCDP-MIB', 'cwnClockSourceDesc'), ('CISCO-WAN-NCDP-MIB', 'cwnInterfaceIndex'), ('CISCO-WAN-NCDP-MIB', 'cwnOtherClockSource'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cisco_wan_ncdp_clock_source_group = ciscoWanNcdpClockSourceGroup.setStatus('current')
if mibBuilder.loadTexts:
ciscoWanNcdpClockSourceGroup.setDescription('This group contains the available clock source on the managed system.')
cisco_wan_ncdp_manual_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 223, 3, 2, 3)).setObjects(('CISCO-WAN-NCDP-MIB', 'cwnManualSourceIndex'), ('CISCO-WAN-NCDP-MIB', 'cwnManualClockHealth'), ('CISCO-WAN-NCDP-MIB', 'cwnManualRowStatus'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cisco_wan_ncdp_manual_group = ciscoWanNcdpManualGroup.setStatus('current')
if mibBuilder.loadTexts:
ciscoWanNcdpManualGroup.setDescription('This group contains objects for manual configuration of clock sources on the managed system.')
cisco_wan_ncdp_atm_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 223, 3, 2, 4)).setObjects(('CISCO-WAN-NCDP-MIB', 'cwnAtmSourceBestClockSource'), ('CISCO-WAN-NCDP-MIB', 'cwnAtmSourcePriority'), ('CISCO-WAN-NCDP-MIB', 'cwnAtmSourceStratum'), ('CISCO-WAN-NCDP-MIB', 'cwnAtmSourcePRSReference'), ('CISCO-WAN-NCDP-MIB', 'cwnAtmSourceClockHealth'), ('CISCO-WAN-NCDP-MIB', 'cwnAtmSourceRowStatus'), ('CISCO-WAN-NCDP-MIB', 'cwnAtmInterfaceEnable'), ('CISCO-WAN-NCDP-MIB', 'cwnAtmInterfaceAdminWeight'), ('CISCO-WAN-NCDP-MIB', 'cwnAtmInterfaceVpi'), ('CISCO-WAN-NCDP-MIB', 'cwnAtmInterfaceVci'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cisco_wan_ncdp_atm_group = ciscoWanNcdpAtmGroup.setStatus('current')
if mibBuilder.loadTexts:
ciscoWanNcdpAtmGroup.setDescription('This group contains objects for configuration of NCDP entity on an ATM platform.')
mibBuilder.exportSymbols('CISCO-WAN-NCDP-MIB', cwnMaxDiameter=cwnMaxDiameter, PYSNMP_MODULE_ID=ciscoWanNcdpMIB, cwnInterfaceIndex=cwnInterfaceIndex, cwnManualSource=cwnManualSource, cwnManualClockHealth=cwnManualClockHealth, ciscoWanNcdpMIBCompliances=ciscoWanNcdpMIBCompliances, cwnAtmSource=cwnAtmSource, ciscoWanNcdpMIBConformance=ciscoWanNcdpMIBConformance, cwnAtmInterfaceVci=cwnAtmInterfaceVci, ciscoWanNcdpMIBNotificationPrefix=ciscoWanNcdpMIBNotificationPrefix, cwnAtmSourceStratum=cwnAtmSourceStratum, ClockStratum=ClockStratum, cwnAtmInterface=cwnAtmInterface, cwnManualSourceEntry=cwnManualSourceEntry, cwnMIBObjects=cwnMIBObjects, cwnAtmSourceClockHealth=cwnAtmSourceClockHealth, cwnClockSourceEntry=cwnClockSourceEntry, cwnClockSource=cwnClockSource, ciscoWanMIBCompliance=ciscoWanMIBCompliance, cwnAtmInterfaceEnable=cwnAtmInterfaceEnable, cwnChangeReason=cwnChangeReason, cwnClockSourceIndex=cwnClockSourceIndex, ciscoWanNcdpManualGroup=ciscoWanNcdpManualGroup, cwnNodeStratum=cwnNodeStratum, cwnChangeTimeStamp=cwnChangeTimeStamp, cwnAtmInterfaceAdminWeight=cwnAtmInterfaceAdminWeight, ciscoWanNcdpClockSourceGroup=ciscoWanNcdpClockSourceGroup, cwnManualSourceIndex=cwnManualSourceIndex, cwnAtmSourceRowStatus=cwnAtmSourceRowStatus, cwnGlobal=cwnGlobal, cwnHoldTime=cwnHoldTime, cwnMessageInterval=cwnMessageInterval, cwnAtmInterfaceTable=cwnAtmInterfaceTable, cwnAtmSourcePRSReference=cwnAtmSourcePRSReference, cwnClockSourceTable=cwnClockSourceTable, cwnAtmInterfaceVpi=cwnAtmInterfaceVpi, cwnDistributionMethod=cwnDistributionMethod, cwnClockSourceDesc=cwnClockSourceDesc, cwnAtmSourcePriority=cwnAtmSourcePriority, ciscoWanNcdpAtmGroup=ciscoWanNcdpAtmGroup, ciscoWanNcdpMIB=ciscoWanNcdpMIB, cwnAtmSourceBestClockSource=cwnAtmSourceBestClockSource, cwnAtmInterfaceEntry=cwnAtmInterfaceEntry, cwnAtmSourceTable=cwnAtmSourceTable, cwnRootClockSource=cwnRootClockSource, cwnOtherClockSource=cwnOtherClockSource, ClockSourceIndex=ClockSourceIndex, ciscoWanNcdpGlobalGroup=ciscoWanNcdpGlobalGroup, cwnManualRowStatus=cwnManualRowStatus, cwnManualSourceTable=cwnManualSourceTable, ciscoWanNcdpMIBGroups=ciscoWanNcdpMIBGroups, ClockHealthStatus=ClockHealthStatus, cwnAtmSourceEntry=cwnAtmSourceEntry, ciscoWanNcdpMIBNotifications=ciscoWanNcdpMIBNotifications, cwnManualSourcePriority=cwnManualSourcePriority) |
substvars = {
'SCRIPTS_DIR' : 'scripts',
}
tasks = {
'util' : {
'features' : 'cshlib',
'source' : 'shlib/**/*.c',
#'includes' : '.',
#'toolchain' : 'auto-c',
# 'install-files' testing
'install-files' : [
{
# copy whole directory
'src' : 'scripts',
'dst': '${PREFIX}/share/${PROJECT_NAME}/${SCRIPTS_DIR}',
'chmod' : 0o755,
},
{
# copy all files from directory
'src' : 'scripts/*',
'dst': '${PREFIX}/share/${PROJECT_NAME}/${SCRIPTS_DIR}2',
'chmod' : '755',
# copy links as is
'follow-symlinks' : False,
},
{
# copy all files from directory recursively
'src' : 'scripts/**/', # the same as 'scripts/**'
'dst': '${PREFIX}/share/${PROJECT_NAME}/${SCRIPTS_DIR}3',
},
{
# copy as
'do' : 'copy-as',
'src' : 'scripts/my-script.py',
'dst': '${PREFIX}/share/${PROJECT_NAME}/${SCRIPTS_DIR}/mtest.py',
'chmod' : '750',
},
],
},
'test' : {
'features' : 'cxxprogram',
'source' : 'prog/**/*.cpp',
#'includes' : '.',
'use' : 'util',
#'toolchain' : 'auto-c++',
# 'install-files' testing
'install-files.select' : {
'linux' : [
{
# symlink
'src' : '${PREFIX}/share/${PROJECT_NAME}/${SCRIPTS_DIR}/mtest.py',
'symlink': '${PREFIX}/share/${PROJECT_NAME}/${SCRIPTS_DIR}/mtest-link.py',
},
],
},
},
}
| substvars = {'SCRIPTS_DIR': 'scripts'}
tasks = {'util': {'features': 'cshlib', 'source': 'shlib/**/*.c', 'install-files': [{'src': 'scripts', 'dst': '${PREFIX}/share/${PROJECT_NAME}/${SCRIPTS_DIR}', 'chmod': 493}, {'src': 'scripts/*', 'dst': '${PREFIX}/share/${PROJECT_NAME}/${SCRIPTS_DIR}2', 'chmod': '755', 'follow-symlinks': False}, {'src': 'scripts/**/', 'dst': '${PREFIX}/share/${PROJECT_NAME}/${SCRIPTS_DIR}3'}, {'do': 'copy-as', 'src': 'scripts/my-script.py', 'dst': '${PREFIX}/share/${PROJECT_NAME}/${SCRIPTS_DIR}/mtest.py', 'chmod': '750'}]}, 'test': {'features': 'cxxprogram', 'source': 'prog/**/*.cpp', 'use': 'util', 'install-files.select': {'linux': [{'src': '${PREFIX}/share/${PROJECT_NAME}/${SCRIPTS_DIR}/mtest.py', 'symlink': '${PREFIX}/share/${PROJECT_NAME}/${SCRIPTS_DIR}/mtest-link.py'}]}}} |
#
# PySNMP MIB module CISCO-ST-TC (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-ST-TC
# Produced by pysmi-0.3.4 at Mon Apr 29 17:36:22 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")
SingleValueConstraint, ValueRangeConstraint, ConstraintsIntersection, ConstraintsUnion, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ValueRangeConstraint", "ConstraintsIntersection", "ConstraintsUnion", "ValueSizeConstraint")
ciscoModules, = mibBuilder.importSymbols("CISCO-SMI", "ciscoModules")
ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup")
MibIdentifier, Bits, Counter32, MibScalar, MibTable, MibTableRow, MibTableColumn, Integer32, NotificationType, ObjectIdentity, Unsigned32, ModuleIdentity, TimeTicks, Gauge32, Counter64, iso, IpAddress = mibBuilder.importSymbols("SNMPv2-SMI", "MibIdentifier", "Bits", "Counter32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Integer32", "NotificationType", "ObjectIdentity", "Unsigned32", "ModuleIdentity", "TimeTicks", "Gauge32", "Counter64", "iso", "IpAddress")
TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString")
storageTextualConventions = ModuleIdentity((1, 3, 6, 1, 4, 1, 9, 12, 4))
storageTextualConventions.setRevisions(('2012-08-08 00:00', '2011-07-26 00:00', '2010-12-24 00:00', '2008-05-16 00:00', '2005-12-17 00:00', '2004-05-18 00:00', '2003-09-26 00:00', '2003-08-07 00:00', '2002-10-04 00:00', '2002-09-24 00:00',))
if mibBuilder.loadTexts: storageTextualConventions.setLastUpdated('201208080000Z')
if mibBuilder.loadTexts: storageTextualConventions.setOrganization('Cisco Systems, Inc.')
class VsanIndex(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(1, 4094)
class DomainId(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(1, 239)
class DomainIdOrZero(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(0, 239)
class FcAddressId(TextualConvention, OctetString):
status = 'current'
subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(3, 3)
fixedLength = 3
class FcNameId(TextualConvention, OctetString):
reference = 'Fibre Channel Framing and Signaling (FC-FS) Rev 1.70 - Section 14 Name_Indentifier Formats.'
status = 'current'
subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(8, 8)
fixedLength = 8
class FcNameIdOrZero(TextualConvention, OctetString):
status = 'current'
subtypeSpec = OctetString.subtypeSpec + ConstraintsUnion(ValueSizeConstraint(0, 0), ValueSizeConstraint(8, 8), ValueSizeConstraint(16, 16), )
class FcClassOfServices(TextualConvention, Bits):
status = 'current'
namedValues = NamedValues(("classF", 0), ("class1", 1), ("class2", 2), ("class3", 3), ("class4", 4), ("class5", 5), ("class6", 6))
class FcPortTypes(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18))
namedValues = NamedValues(("auto", 1), ("fPort", 2), ("flPort", 3), ("ePort", 4), ("bPort", 5), ("fxPort", 6), ("sdPort", 7), ("tlPort", 8), ("nPort", 9), ("nlPort", 10), ("nxPort", 11), ("tePort", 12), ("fvPort", 13), ("portOperDown", 14), ("stPort", 15), ("npPort", 16), ("tfPort", 17), ("tnpPort", 18))
class FcPortTxTypes(TextualConvention, Integer32):
reference = 'IEEE Std 802.3-2005 carrier sense multiple access with collision detection (CSMA/CD) access method and physical layer specification.'
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12))
namedValues = NamedValues(("unknown", 1), ("longWaveLaser", 2), ("shortWaveLaser", 3), ("longWaveLaserCostReduced", 4), ("electrical", 5), ("tenGigBaseSr", 6), ("tenGigBaseLr", 7), ("tenGigBaseEr", 8), ("tenGigBaseLx4", 9), ("tenGigBaseSw", 10), ("tenGigBaseLw", 11), ("tenGigBaseEw", 12))
class FcPortModuleTypes(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20))
namedValues = NamedValues(("unknown", 1), ("other", 2), ("gbic", 3), ("embedded", 4), ("glm", 5), ("gbicWithSerialID", 6), ("gbicWithoutSerialID", 7), ("sfpWithSerialID", 8), ("sfpWithoutSerialID", 9), ("xfp", 10), ("x2Short", 11), ("x2Medium", 12), ("x2Tall", 13), ("xpakShort", 14), ("xpakMedium", 15), ("xpakTall", 16), ("xenpak", 17), ("sfpDwdm", 18), ("qsfp", 19), ("x2Dwdm", 20))
class FcIfSpeed(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11))
namedValues = NamedValues(("auto", 1), ("oneG", 2), ("twoG", 3), ("fourG", 4), ("autoMaxTwoG", 5), ("eightG", 6), ("autoMaxFourG", 7), ("tenG", 8), ("autoMaxEightG", 9), ("sixteenG", 10), ("autoMaxSixteenG", 11))
class PortMemberList(TextualConvention, OctetString):
status = 'current'
subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(0, 64)
class FcAddress(TextualConvention, OctetString):
status = 'current'
subtypeSpec = OctetString.subtypeSpec + ConstraintsUnion(ValueSizeConstraint(3, 3), ValueSizeConstraint(8, 8), )
class FcAddressType(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2))
namedValues = NamedValues(("wwn", 1), ("fcid", 2))
class InterfaceOperMode(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21))
namedValues = NamedValues(("auto", 1), ("fPort", 2), ("flPort", 3), ("ePort", 4), ("bPort", 5), ("fxPort", 6), ("sdPort", 7), ("tlPort", 8), ("nPort", 9), ("nlPort", 10), ("nxPort", 11), ("tePort", 12), ("fvPort", 13), ("portOperDown", 14), ("stPort", 15), ("mgmtPort", 16), ("ipsPort", 17), ("evPort", 18), ("npPort", 19), ("tfPort", 20), ("tnpPort", 21))
class FcIfServiceStateType(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2))
namedValues = NamedValues(("inService", 1), ("outOfService", 2))
class FcIfSfpDiagLevelType(TextualConvention, Integer32):
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))
namedValues = NamedValues(("unknown", 1), ("normal", 2), ("lowWarning", 3), ("lowAlarm", 4), ("highWarning", 5), ("highAlarm", 6))
mibBuilder.exportSymbols("CISCO-ST-TC", PortMemberList=PortMemberList, FcIfSfpDiagLevelType=FcIfSfpDiagLevelType, DomainIdOrZero=DomainIdOrZero, storageTextualConventions=storageTextualConventions, PYSNMP_MODULE_ID=storageTextualConventions, FcPortTxTypes=FcPortTxTypes, FcAddressType=FcAddressType, FcIfSpeed=FcIfSpeed, FcNameId=FcNameId, FcIfServiceStateType=FcIfServiceStateType, VsanIndex=VsanIndex, FcAddressId=FcAddressId, FcPortModuleTypes=FcPortModuleTypes, FcClassOfServices=FcClassOfServices, DomainId=DomainId, InterfaceOperMode=InterfaceOperMode, FcNameIdOrZero=FcNameIdOrZero, FcPortTypes=FcPortTypes, FcAddress=FcAddress)
| (integer, object_identifier, octet_string) = mibBuilder.importSymbols('ASN1', 'Integer', 'ObjectIdentifier', 'OctetString')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(single_value_constraint, value_range_constraint, constraints_intersection, constraints_union, value_size_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'SingleValueConstraint', 'ValueRangeConstraint', 'ConstraintsIntersection', 'ConstraintsUnion', 'ValueSizeConstraint')
(cisco_modules,) = mibBuilder.importSymbols('CISCO-SMI', 'ciscoModules')
(module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup')
(mib_identifier, bits, counter32, mib_scalar, mib_table, mib_table_row, mib_table_column, integer32, notification_type, object_identity, unsigned32, module_identity, time_ticks, gauge32, counter64, iso, ip_address) = mibBuilder.importSymbols('SNMPv2-SMI', 'MibIdentifier', 'Bits', 'Counter32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Integer32', 'NotificationType', 'ObjectIdentity', 'Unsigned32', 'ModuleIdentity', 'TimeTicks', 'Gauge32', 'Counter64', 'iso', 'IpAddress')
(textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString')
storage_textual_conventions = module_identity((1, 3, 6, 1, 4, 1, 9, 12, 4))
storageTextualConventions.setRevisions(('2012-08-08 00:00', '2011-07-26 00:00', '2010-12-24 00:00', '2008-05-16 00:00', '2005-12-17 00:00', '2004-05-18 00:00', '2003-09-26 00:00', '2003-08-07 00:00', '2002-10-04 00:00', '2002-09-24 00:00'))
if mibBuilder.loadTexts:
storageTextualConventions.setLastUpdated('201208080000Z')
if mibBuilder.loadTexts:
storageTextualConventions.setOrganization('Cisco Systems, Inc.')
class Vsanindex(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + value_range_constraint(1, 4094)
class Domainid(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + value_range_constraint(1, 239)
class Domainidorzero(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + value_range_constraint(0, 239)
class Fcaddressid(TextualConvention, OctetString):
status = 'current'
subtype_spec = OctetString.subtypeSpec + value_size_constraint(3, 3)
fixed_length = 3
class Fcnameid(TextualConvention, OctetString):
reference = 'Fibre Channel Framing and Signaling (FC-FS) Rev 1.70 - Section 14 Name_Indentifier Formats.'
status = 'current'
subtype_spec = OctetString.subtypeSpec + value_size_constraint(8, 8)
fixed_length = 8
class Fcnameidorzero(TextualConvention, OctetString):
status = 'current'
subtype_spec = OctetString.subtypeSpec + constraints_union(value_size_constraint(0, 0), value_size_constraint(8, 8), value_size_constraint(16, 16))
class Fcclassofservices(TextualConvention, Bits):
status = 'current'
named_values = named_values(('classF', 0), ('class1', 1), ('class2', 2), ('class3', 3), ('class4', 4), ('class5', 5), ('class6', 6))
class Fcporttypes(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18))
named_values = named_values(('auto', 1), ('fPort', 2), ('flPort', 3), ('ePort', 4), ('bPort', 5), ('fxPort', 6), ('sdPort', 7), ('tlPort', 8), ('nPort', 9), ('nlPort', 10), ('nxPort', 11), ('tePort', 12), ('fvPort', 13), ('portOperDown', 14), ('stPort', 15), ('npPort', 16), ('tfPort', 17), ('tnpPort', 18))
class Fcporttxtypes(TextualConvention, Integer32):
reference = 'IEEE Std 802.3-2005 carrier sense multiple access with collision detection (CSMA/CD) access method and physical layer specification.'
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12))
named_values = named_values(('unknown', 1), ('longWaveLaser', 2), ('shortWaveLaser', 3), ('longWaveLaserCostReduced', 4), ('electrical', 5), ('tenGigBaseSr', 6), ('tenGigBaseLr', 7), ('tenGigBaseEr', 8), ('tenGigBaseLx4', 9), ('tenGigBaseSw', 10), ('tenGigBaseLw', 11), ('tenGigBaseEw', 12))
class Fcportmoduletypes(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20))
named_values = named_values(('unknown', 1), ('other', 2), ('gbic', 3), ('embedded', 4), ('glm', 5), ('gbicWithSerialID', 6), ('gbicWithoutSerialID', 7), ('sfpWithSerialID', 8), ('sfpWithoutSerialID', 9), ('xfp', 10), ('x2Short', 11), ('x2Medium', 12), ('x2Tall', 13), ('xpakShort', 14), ('xpakMedium', 15), ('xpakTall', 16), ('xenpak', 17), ('sfpDwdm', 18), ('qsfp', 19), ('x2Dwdm', 20))
class Fcifspeed(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11))
named_values = named_values(('auto', 1), ('oneG', 2), ('twoG', 3), ('fourG', 4), ('autoMaxTwoG', 5), ('eightG', 6), ('autoMaxFourG', 7), ('tenG', 8), ('autoMaxEightG', 9), ('sixteenG', 10), ('autoMaxSixteenG', 11))
class Portmemberlist(TextualConvention, OctetString):
status = 'current'
subtype_spec = OctetString.subtypeSpec + value_size_constraint(0, 64)
class Fcaddress(TextualConvention, OctetString):
status = 'current'
subtype_spec = OctetString.subtypeSpec + constraints_union(value_size_constraint(3, 3), value_size_constraint(8, 8))
class Fcaddresstype(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2))
named_values = named_values(('wwn', 1), ('fcid', 2))
class Interfaceopermode(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21))
named_values = named_values(('auto', 1), ('fPort', 2), ('flPort', 3), ('ePort', 4), ('bPort', 5), ('fxPort', 6), ('sdPort', 7), ('tlPort', 8), ('nPort', 9), ('nlPort', 10), ('nxPort', 11), ('tePort', 12), ('fvPort', 13), ('portOperDown', 14), ('stPort', 15), ('mgmtPort', 16), ('ipsPort', 17), ('evPort', 18), ('npPort', 19), ('tfPort', 20), ('tnpPort', 21))
class Fcifservicestatetype(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2))
named_values = named_values(('inService', 1), ('outOfService', 2))
class Fcifsfpdiagleveltype(TextualConvention, Integer32):
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6))
named_values = named_values(('unknown', 1), ('normal', 2), ('lowWarning', 3), ('lowAlarm', 4), ('highWarning', 5), ('highAlarm', 6))
mibBuilder.exportSymbols('CISCO-ST-TC', PortMemberList=PortMemberList, FcIfSfpDiagLevelType=FcIfSfpDiagLevelType, DomainIdOrZero=DomainIdOrZero, storageTextualConventions=storageTextualConventions, PYSNMP_MODULE_ID=storageTextualConventions, FcPortTxTypes=FcPortTxTypes, FcAddressType=FcAddressType, FcIfSpeed=FcIfSpeed, FcNameId=FcNameId, FcIfServiceStateType=FcIfServiceStateType, VsanIndex=VsanIndex, FcAddressId=FcAddressId, FcPortModuleTypes=FcPortModuleTypes, FcClassOfServices=FcClassOfServices, DomainId=DomainId, InterfaceOperMode=InterfaceOperMode, FcNameIdOrZero=FcNameIdOrZero, FcPortTypes=FcPortTypes, FcAddress=FcAddress) |
# acm thailand 2011
def refill(lf_c, lf_h, lf_v, path=''):
'''recursive fill the walk path, if filled check if the walk are valid'''
global answer
if answer:
return
if lf_c == 0 and lf_h == 0 and lf_v == 0:
if chk(path):
## on valid path, ignore furthermore path ##
answer = True
print(len(path))
return
## must start from left_center to make sure the shortest path come first ##
if lf_c > 0:
refill(lf_c-1, lf_h, lf_v, path + 'c')
if lf_h > 0:
refill(lf_c, lf_h-1, lf_v, path + 'h')
if lf_v > 0:
refill(lf_c, lf_h, lf_v-1, path + 'v')
def walk(n):
'''loop through all possible walk path pattern'''
for i in range(n+1):
refill(n-i, i, i)
def chk(path):
'''check if the walk path is valid by test walk with xmap'''
x, y = 0, 0
for ew in path:
if xmap[y][x] != '':
for ec in xmap[y][x]:
if ec == ew:
return False
if ew == 'c':
x += 1
y += 1
if ew == 'h':
x += 1
if ew == 'v':
y += 1
return True
################################################################################
while True:
size = int(input())
if size == 0:
break
## create xmap - the map of invalid step ##
xmap = [['' for j in range(size+1)] for i in range(size+1)]
for j in range(size):
inrow = input()
for i in range(size):
if inrow[i] == '#':
xmap[j][i] += 'c'
if j > 0:
if xmap[j-1][i] != '':
xmap[j][i] += 'h'
if i > 0:
if xmap[j][i-1] != '':
xmap[j][i] += 'v'
## for fast execution, loop through shortest first and stop if answered ##
answer = False
walk(size)
| def refill(lf_c, lf_h, lf_v, path=''):
"""recursive fill the walk path, if filled check if the walk are valid"""
global answer
if answer:
return
if lf_c == 0 and lf_h == 0 and (lf_v == 0):
if chk(path):
answer = True
print(len(path))
return
if lf_c > 0:
refill(lf_c - 1, lf_h, lf_v, path + 'c')
if lf_h > 0:
refill(lf_c, lf_h - 1, lf_v, path + 'h')
if lf_v > 0:
refill(lf_c, lf_h, lf_v - 1, path + 'v')
def walk(n):
"""loop through all possible walk path pattern"""
for i in range(n + 1):
refill(n - i, i, i)
def chk(path):
"""check if the walk path is valid by test walk with xmap"""
(x, y) = (0, 0)
for ew in path:
if xmap[y][x] != '':
for ec in xmap[y][x]:
if ec == ew:
return False
if ew == 'c':
x += 1
y += 1
if ew == 'h':
x += 1
if ew == 'v':
y += 1
return True
while True:
size = int(input())
if size == 0:
break
xmap = [['' for j in range(size + 1)] for i in range(size + 1)]
for j in range(size):
inrow = input()
for i in range(size):
if inrow[i] == '#':
xmap[j][i] += 'c'
if j > 0:
if xmap[j - 1][i] != '':
xmap[j][i] += 'h'
if i > 0:
if xmap[j][i - 1] != '':
xmap[j][i] += 'v'
answer = False
walk(size) |
'''
Write a function that takes in an array of positive integers and returns an integer representing the maximum sum of non-adjacent elements
in the array.
If a sum cannot be generated, the function should return 0.
[7,10,12,7,9,14] 7+12+14=33
'''
# O(n) time | O(n) space
# def maxSubsetSumNoAdjacent(array):
# # Write your code here.
# if not len(array):
# return 0
# elif len(array)==1:
# return array[0]
# maxSums = array[:]
# maxSums[1] = max(array[0], array[1])
# for i in range(2, len(array)):
# maxSums[i] = max(maxSums[i-1], maxSums[i-2]+ array[i])
# return maxSums[-1]
def maxSubsetSumNoAdjacent(array):
if not len(array):
return 0
elif len(array) == 1:
return array[0]
second = array[0]
first = max(array[0], array[1])
for i in range(2, len(array)):
current = max(first, second + array[i])
second = first
first = current
return first
| """
Write a function that takes in an array of positive integers and returns an integer representing the maximum sum of non-adjacent elements
in the array.
If a sum cannot be generated, the function should return 0.
[7,10,12,7,9,14] 7+12+14=33
"""
def max_subset_sum_no_adjacent(array):
if not len(array):
return 0
elif len(array) == 1:
return array[0]
second = array[0]
first = max(array[0], array[1])
for i in range(2, len(array)):
current = max(first, second + array[i])
second = first
first = current
return first |
#number of lines you want in the new file
lines_per_file = 100000
smallfile = None
with open('/home/cantos/Downloads/index.jsonl') as bigfile: #give the file name and extension
for lineno, line in enumerate(bigfile):
if lineno % lines_per_file == 0:
if smallfile:
smallfile.close()
small_filename = 'small_file_{}.jsonl'.format(lineno + lines_per_file) #give the new file names and extension for smaller files
smallfile = open(small_filename, "w")
smallfile.write(line)
if smallfile:
smallfile.close() | lines_per_file = 100000
smallfile = None
with open('/home/cantos/Downloads/index.jsonl') as bigfile:
for (lineno, line) in enumerate(bigfile):
if lineno % lines_per_file == 0:
if smallfile:
smallfile.close()
small_filename = 'small_file_{}.jsonl'.format(lineno + lines_per_file)
smallfile = open(small_filename, 'w')
smallfile.write(line)
if smallfile:
smallfile.close() |
'''
stuff = 'X\nY'
print("stuff[:] 'X\\nY'", stuff[:])
print("stuff", stuff)
print("len(stuff)", len(stuff))
#fhand = open('mboxnoexists.txt')
# print(fhand)
fhand = open('mbox.txt')
print(fhand)
count = 0
for line in fhand:
count = count + 1
print('mbox.txt line count: %d' % count)
# read all data to memory
# fhand is at last line once it's last line was used
fhand = open('mbox.txt')
inp = fhand.read()
print(len(inp))
print(inp[:58])
# find file
fhand = open('mbox.txt')
for line in fhand:
# if line.startswith('From'):
if not line.startswith('From'):
continue
print(line.rstrip())
fhand = open('mbox.txt')
for line in fhand:
line = line.rstrip()
if line.find('@uct.ac.za') == -1 :continue
print(line)
# read
fname = input('please input your file name:')
try :
fhand = open(str(fname))
except:
print('please check file name')
exit()
count = 0
for line in fhand :
if line.startswith('Subject'):
count = count + 1
print('There were', count, 'subject lines in', fname)
'''
# write
fout = open('output.txt','w')
print(fout)
line1 = "this here's the wattle, \n"
fout.write(line1)
fout.write("the emblem of our land. \n")
fout.close()
s = '1 2\t 3\n 4'
print('repr(s)', repr(s))
print('s',s) | """
stuff = 'X
Y'
print("stuff[:] 'X\\nY'", stuff[:])
print("stuff", stuff)
print("len(stuff)", len(stuff))
#fhand = open('mboxnoexists.txt')
# print(fhand)
fhand = open('mbox.txt')
print(fhand)
count = 0
for line in fhand:
count = count + 1
print('mbox.txt line count: %d' % count)
# read all data to memory
# fhand is at last line once it's last line was used
fhand = open('mbox.txt')
inp = fhand.read()
print(len(inp))
print(inp[:58])
# find file
fhand = open('mbox.txt')
for line in fhand:
# if line.startswith('From'):
if not line.startswith('From'):
continue
print(line.rstrip())
fhand = open('mbox.txt')
for line in fhand:
line = line.rstrip()
if line.find('@uct.ac.za') == -1 :continue
print(line)
# read
fname = input('please input your file name:')
try :
fhand = open(str(fname))
except:
print('please check file name')
exit()
count = 0
for line in fhand :
if line.startswith('Subject'):
count = count + 1
print('There were', count, 'subject lines in', fname)
"""
fout = open('output.txt', 'w')
print(fout)
line1 = "this here's the wattle, \n"
fout.write(line1)
fout.write('the emblem of our land. \n')
fout.close()
s = '1 2\t 3\n 4'
print('repr(s)', repr(s))
print('s', s) |
nkpop_list = ["https://www.youtube.com/watch?v=VCrdiTA0RqI",
"https://www.youtube.com/watch?v=S1KIh0MBBX4",
"https://www.youtube.com/watch?v=qhXrye7zkwY",
"https://www.youtube.com/watch?v=lNES9HTJ27U",
"https://www.youtube.com/watch?v=NKIiglf4bfA",
"https://www.youtube.com/watch?v=e3D4nH9FnpY",
"https://www.youtube.com/watch?v=AOH41w7M2tU",
"https://www.youtube.com/watch?v=3TOzFz7pr8o",
"https://www.youtube.com/watch?v=z-bnpQLwDsE",
"https://www.youtube.com/watch?v=mvMnSCGzHTk",
"https://www.youtube.com/watch?v=i-1iEYCBzes",
"https://www.youtube.com/watch?v=heXPirh4UJs",
"https://www.youtube.com/watch?v=crByEE0wuMo",
"https://www.youtube.com/watch?v=nrKDcfT07bc",
"https://www.youtube.com/watch?v=dteukX3tRXg",
"https://www.youtube.com/watch?v=p6cuspqYWLA",
"https://www.youtube.com/watch?v=seMsAQQexfM",
"https://www.youtube.com/watch?v=CH50E-oHdWI",
"https://www.youtube.com/watch?v=Y6zcLBI9eYo",
"https://www.youtube.com/watch?v=d-rEsJBhLUY",
"https://www.youtube.com/watch?v=qh2Ct_WZ5oY",
"https://www.youtube.com/watch?v=WlBm5zez9HY",
"https://www.youtube.com/watch?v=xWgAcIThxf8",
"https://www.youtube.com/watch?v=Hcmw57tiRlI",
"https://www.youtube.com/watch?v=JuPqqwE42aI",
"https://www.youtube.com/watch?v=2W5EgrrVWLE",
"https://www.youtube.com/watch?v=-vexJ2q-bhY",
"https://www.youtube.com/watch?v=fMtm0yODvgY",
"https://www.youtube.com/watch?v=BHxJEirZqdY",
"https://www.youtube.com/watch?v=TAniy21QoQk",
"https://www.youtube.com/watch?v=ukBcC-sK3wQ",
"https://www.youtube.com/watch?v=VkMI9XjbztQ",
"https://www.youtube.com/watch?v=1Cflqninbos",
"https://www.youtube.com/watch?v=9wQkij2l-8E",
"https://www.youtube.com/watch?v=8EZLq7pN1Y0",
"https://www.youtube.com/watch?v=ox7XWuCjp1Y",
"https://www.youtube.com/watch?v=Ln4JknvG4gQ",
"https://www.youtube.com/watch?v=st2MjkKqdZ8",
"https://www.youtube.com/watch?v=i4NgkxkBZi0",
"https://www.youtube.com/watch?v=1qblI4tF770",
"https://www.youtube.com/watch?v=Vr2YaOIfhqc",
"https://www.youtube.com/watch?v=NJcd1kPL9dk",
"https://www.youtube.com/watch?v=J-oa0GJ673c",
"https://www.youtube.com/watch?v=ME7osnyceEk",
"https://www.youtube.com/watch?v=gm2mm8RbzGU",
"https://www.youtube.com/watch?v=h8Xs1Hht-vc",
"https://www.youtube.com/watch?v=5lMhmHtUwHU",
"https://www.youtube.com/watch?v=Brm4hzZb0Zs",
"https://www.youtube.com/watch?v=xvC1e4STgAo",
"https://www.youtube.com/watch?v=wkAwF2JyUX0",
"https://www.youtube.com/watch?v=ZABKF4Qz0e0",
"https://www.youtube.com/watch?v=7Wrxlj4CFRY",
"https://www.youtube.com/watch?v=iVEMj9pBN7k",
"https://www.youtube.com/watch?v=4hLxYznrmZA",
"https://www.youtube.com/watch?v=HQqN_XB8b9E",
"https://www.youtube.com/watch?v=HmkT7LFG3_g",
"https://www.youtube.com/watch?v=rhqz0qNOcl0",
"https://www.youtube.com/watch?v=gI69OF2gjKA",
"https://www.youtube.com/watch?v=AbFf8CEECC8",
"https://www.youtube.com/watch?v=zHiGIuvsAok",
"https://www.youtube.com/watch?v=XgXKz_Ckwj8",
"https://www.youtube.com/watch?v=yyndOxZCqH0",
"https://www.youtube.com/watch?v=_jZXapSPDVQ",
"https://www.youtube.com/watch?v=qn3b7dW3Zzw",
"https://www.youtube.com/watch?v=gZRGPb02WeI",
"https://www.youtube.com/watch?v=l5csyzejj5s",
"https://www.youtube.com/watch?v=IRL5ml4ybwI",
"https://www.youtube.com/watch?v=GymUHpq-cjw",
"https://www.youtube.com/watch?v=fZoCt-YorRw",
"https://www.youtube.com/watch?v=lmQKnOyD8QE",
"https://www.youtube.com/watch?v=kCq1inGch9Y",
"https://www.youtube.com/watch?v=iy1Ev_77qC0",
"https://www.youtube.com/watch?v=p8LN5x3vguI",
"https://www.youtube.com/watch?v=BYtpqIr_zG8",
"https://www.youtube.com/watch?v=yj5_ad-TtFA",
"https://www.youtube.com/watch?v=z-6hlO_BB48",
"https://www.youtube.com/watch?v=2qyaOKiSLlk",
"https://www.youtube.com/watch?v=Hk1_hValwGs",
"https://www.youtube.com/watch?v=iUngkch-Txg",
"https://www.youtube.com/watch?v=EtquVL9PLL8",
"https://www.youtube.com/watch?v=FUjqYfyvynQ",
"https://www.youtube.com/watch?v=qgksrZZu5j0",
"https://www.youtube.com/watch?v=hDdqTVFmfIo",
"https://www.youtube.com/watch?v=by73XrMmcdg",
"https://www.youtube.com/watch?v=7GKh08VbGDc",
"https://www.youtube.com/watch?v=eweZkTWwuSQ",
"https://www.youtube.com/watch?v=e17MYjfKyaY",
"https://www.youtube.com/watch?v=3pj2W_P58Nc",
"https://www.youtube.com/watch?v=T19e6lpHdxk",
"https://www.youtube.com/watch?v=V4ZufjjPb6Y",
"https://www.youtube.com/watch?v=HrtlEybS1_M",
"https://www.youtube.com/watch?v=KQx6HIcVxFg",
"https://www.youtube.com/watch?v=IWT1sFswLCw",
"https://www.youtube.com/watch?v=iO4Q1iPv3qw",
"https://www.youtube.com/watch?v=LQRLaJ225dU",
"https://www.youtube.com/watch?v=6Au7TZwm3eg",
"https://www.youtube.com/watch?v=iFHVMaY_TLk",
"https://www.youtube.com/watch?v=vqCbTD6h_JY",
"https://www.youtube.com/watch?v=QuJxdzozV10",
"https://www.youtube.com/watch?v=9Kjdanxjmhg",
"https://www.youtube.com/watch?v=QozrjMBtgkQ",
"https://www.youtube.com/watch?v=_L_GFCRNh68",
"https://www.youtube.com/watch?v=9xUQTIax0Mg",
"https://www.youtube.com/watch?v=0LF7sxwK5Hc",
"https://www.youtube.com/watch?v=Tm7A1JNLSvE",
"https://www.youtube.com/watch?v=mgMCWnCbayg",
"https://www.youtube.com/watch?v=5n9PTRv1E60",
"https://www.youtube.com/watch?v=nhirZ_xk8Og",
"https://www.youtube.com/watch?v=rVsaOYZl3E0"]
| nkpop_list = ['https://www.youtube.com/watch?v=VCrdiTA0RqI', 'https://www.youtube.com/watch?v=S1KIh0MBBX4', 'https://www.youtube.com/watch?v=qhXrye7zkwY', 'https://www.youtube.com/watch?v=lNES9HTJ27U', 'https://www.youtube.com/watch?v=NKIiglf4bfA', 'https://www.youtube.com/watch?v=e3D4nH9FnpY', 'https://www.youtube.com/watch?v=AOH41w7M2tU', 'https://www.youtube.com/watch?v=3TOzFz7pr8o', 'https://www.youtube.com/watch?v=z-bnpQLwDsE', 'https://www.youtube.com/watch?v=mvMnSCGzHTk', 'https://www.youtube.com/watch?v=i-1iEYCBzes', 'https://www.youtube.com/watch?v=heXPirh4UJs', 'https://www.youtube.com/watch?v=crByEE0wuMo', 'https://www.youtube.com/watch?v=nrKDcfT07bc', 'https://www.youtube.com/watch?v=dteukX3tRXg', 'https://www.youtube.com/watch?v=p6cuspqYWLA', 'https://www.youtube.com/watch?v=seMsAQQexfM', 'https://www.youtube.com/watch?v=CH50E-oHdWI', 'https://www.youtube.com/watch?v=Y6zcLBI9eYo', 'https://www.youtube.com/watch?v=d-rEsJBhLUY', 'https://www.youtube.com/watch?v=qh2Ct_WZ5oY', 'https://www.youtube.com/watch?v=WlBm5zez9HY', 'https://www.youtube.com/watch?v=xWgAcIThxf8', 'https://www.youtube.com/watch?v=Hcmw57tiRlI', 'https://www.youtube.com/watch?v=JuPqqwE42aI', 'https://www.youtube.com/watch?v=2W5EgrrVWLE', 'https://www.youtube.com/watch?v=-vexJ2q-bhY', 'https://www.youtube.com/watch?v=fMtm0yODvgY', 'https://www.youtube.com/watch?v=BHxJEirZqdY', 'https://www.youtube.com/watch?v=TAniy21QoQk', 'https://www.youtube.com/watch?v=ukBcC-sK3wQ', 'https://www.youtube.com/watch?v=VkMI9XjbztQ', 'https://www.youtube.com/watch?v=1Cflqninbos', 'https://www.youtube.com/watch?v=9wQkij2l-8E', 'https://www.youtube.com/watch?v=8EZLq7pN1Y0', 'https://www.youtube.com/watch?v=ox7XWuCjp1Y', 'https://www.youtube.com/watch?v=Ln4JknvG4gQ', 'https://www.youtube.com/watch?v=st2MjkKqdZ8', 'https://www.youtube.com/watch?v=i4NgkxkBZi0', 'https://www.youtube.com/watch?v=1qblI4tF770', 'https://www.youtube.com/watch?v=Vr2YaOIfhqc', 'https://www.youtube.com/watch?v=NJcd1kPL9dk', 'https://www.youtube.com/watch?v=J-oa0GJ673c', 'https://www.youtube.com/watch?v=ME7osnyceEk', 'https://www.youtube.com/watch?v=gm2mm8RbzGU', 'https://www.youtube.com/watch?v=h8Xs1Hht-vc', 'https://www.youtube.com/watch?v=5lMhmHtUwHU', 'https://www.youtube.com/watch?v=Brm4hzZb0Zs', 'https://www.youtube.com/watch?v=xvC1e4STgAo', 'https://www.youtube.com/watch?v=wkAwF2JyUX0', 'https://www.youtube.com/watch?v=ZABKF4Qz0e0', 'https://www.youtube.com/watch?v=7Wrxlj4CFRY', 'https://www.youtube.com/watch?v=iVEMj9pBN7k', 'https://www.youtube.com/watch?v=4hLxYznrmZA', 'https://www.youtube.com/watch?v=HQqN_XB8b9E', 'https://www.youtube.com/watch?v=HmkT7LFG3_g', 'https://www.youtube.com/watch?v=rhqz0qNOcl0', 'https://www.youtube.com/watch?v=gI69OF2gjKA', 'https://www.youtube.com/watch?v=AbFf8CEECC8', 'https://www.youtube.com/watch?v=zHiGIuvsAok', 'https://www.youtube.com/watch?v=XgXKz_Ckwj8', 'https://www.youtube.com/watch?v=yyndOxZCqH0', 'https://www.youtube.com/watch?v=_jZXapSPDVQ', 'https://www.youtube.com/watch?v=qn3b7dW3Zzw', 'https://www.youtube.com/watch?v=gZRGPb02WeI', 'https://www.youtube.com/watch?v=l5csyzejj5s', 'https://www.youtube.com/watch?v=IRL5ml4ybwI', 'https://www.youtube.com/watch?v=GymUHpq-cjw', 'https://www.youtube.com/watch?v=fZoCt-YorRw', 'https://www.youtube.com/watch?v=lmQKnOyD8QE', 'https://www.youtube.com/watch?v=kCq1inGch9Y', 'https://www.youtube.com/watch?v=iy1Ev_77qC0', 'https://www.youtube.com/watch?v=p8LN5x3vguI', 'https://www.youtube.com/watch?v=BYtpqIr_zG8', 'https://www.youtube.com/watch?v=yj5_ad-TtFA', 'https://www.youtube.com/watch?v=z-6hlO_BB48', 'https://www.youtube.com/watch?v=2qyaOKiSLlk', 'https://www.youtube.com/watch?v=Hk1_hValwGs', 'https://www.youtube.com/watch?v=iUngkch-Txg', 'https://www.youtube.com/watch?v=EtquVL9PLL8', 'https://www.youtube.com/watch?v=FUjqYfyvynQ', 'https://www.youtube.com/watch?v=qgksrZZu5j0', 'https://www.youtube.com/watch?v=hDdqTVFmfIo', 'https://www.youtube.com/watch?v=by73XrMmcdg', 'https://www.youtube.com/watch?v=7GKh08VbGDc', 'https://www.youtube.com/watch?v=eweZkTWwuSQ', 'https://www.youtube.com/watch?v=e17MYjfKyaY', 'https://www.youtube.com/watch?v=3pj2W_P58Nc', 'https://www.youtube.com/watch?v=T19e6lpHdxk', 'https://www.youtube.com/watch?v=V4ZufjjPb6Y', 'https://www.youtube.com/watch?v=HrtlEybS1_M', 'https://www.youtube.com/watch?v=KQx6HIcVxFg', 'https://www.youtube.com/watch?v=IWT1sFswLCw', 'https://www.youtube.com/watch?v=iO4Q1iPv3qw', 'https://www.youtube.com/watch?v=LQRLaJ225dU', 'https://www.youtube.com/watch?v=6Au7TZwm3eg', 'https://www.youtube.com/watch?v=iFHVMaY_TLk', 'https://www.youtube.com/watch?v=vqCbTD6h_JY', 'https://www.youtube.com/watch?v=QuJxdzozV10', 'https://www.youtube.com/watch?v=9Kjdanxjmhg', 'https://www.youtube.com/watch?v=QozrjMBtgkQ', 'https://www.youtube.com/watch?v=_L_GFCRNh68', 'https://www.youtube.com/watch?v=9xUQTIax0Mg', 'https://www.youtube.com/watch?v=0LF7sxwK5Hc', 'https://www.youtube.com/watch?v=Tm7A1JNLSvE', 'https://www.youtube.com/watch?v=mgMCWnCbayg', 'https://www.youtube.com/watch?v=5n9PTRv1E60', 'https://www.youtube.com/watch?v=nhirZ_xk8Og', 'https://www.youtube.com/watch?v=rVsaOYZl3E0'] |
print('===== DESAFIO 009 =====')
x = int(input('Digite um numero para ser Multiplicado : '))
x1 = 1 * x
x2 = 2 * x
x3 = 3 * x
x4 = 4 * x
x5 = 5 * x
x6 = 6 * x
x7 = 7 * x
x8 = 8 * x
x9 = 9 * x
x10 = 10 * x
print('-' * 12)
print(f'Tabuada \n '
f'{x} x 1 = {x1} \n '
f'{x} x 2 = {x2} \n '
f'{x} x 3 = {x3} \n '
f'{x} x 4 = {x4} \n '
f'{x} x 5 = {x5} \n '
f'{x} x 6 = {x6} \n '
f'{x} x 7 = {x7} \n '
f'{x} x 8 = {x8} \n '
f'{x} x 9 = {x9} \n '
f'{x} x 10 = {x10}')
print('-' * 12)
| print('===== DESAFIO 009 =====')
x = int(input('Digite um numero para ser Multiplicado : '))
x1 = 1 * x
x2 = 2 * x
x3 = 3 * x
x4 = 4 * x
x5 = 5 * x
x6 = 6 * x
x7 = 7 * x
x8 = 8 * x
x9 = 9 * x
x10 = 10 * x
print('-' * 12)
print(f'Tabuada \n {x} x 1 = {x1} \n {x} x 2 = {x2} \n {x} x 3 = {x3} \n {x} x 4 = {x4} \n {x} x 5 = {x5} \n {x} x 6 = {x6} \n {x} x 7 = {x7} \n {x} x 8 = {x8} \n {x} x 9 = {x9} \n {x} x 10 = {x10}')
print('-' * 12) |
def solution(numbers, hand):
answer = ''
left = (3,0)
right = (3,2)
_dict = {
1:(0,0),
2:(0,1),
3:(0,2),
4:(1,0),
5:(1,1),
6:(1,2),
7:(2,0),
8:(2,1),
9:(2,2),
0:(3,1)
}
for i in numbers:
if (i==1 or i==4 or i==7):
answer+='L'
left=_dict[i]
elif (i==3 or i==6 or i==9):
answer+='R'
right=_dict[i]
else:
current = _dict[i]
ldistance = abs(current[0]-left[0]) + abs(current[1]-left[1])
rdistance = abs(current[0]-right[0]) + abs(current[1]-right[1])
if(ldistance>rdistance):
answer+='R'
right=current
elif(ldistance<rdistance):
answer+='L'
left=current
else:
if(hand=='right'):
answer+='R'
right=current
else:
answer+='L'
left=current
return answer
| def solution(numbers, hand):
answer = ''
left = (3, 0)
right = (3, 2)
_dict = {1: (0, 0), 2: (0, 1), 3: (0, 2), 4: (1, 0), 5: (1, 1), 6: (1, 2), 7: (2, 0), 8: (2, 1), 9: (2, 2), 0: (3, 1)}
for i in numbers:
if i == 1 or i == 4 or i == 7:
answer += 'L'
left = _dict[i]
elif i == 3 or i == 6 or i == 9:
answer += 'R'
right = _dict[i]
else:
current = _dict[i]
ldistance = abs(current[0] - left[0]) + abs(current[1] - left[1])
rdistance = abs(current[0] - right[0]) + abs(current[1] - right[1])
if ldistance > rdistance:
answer += 'R'
right = current
elif ldistance < rdistance:
answer += 'L'
left = current
elif hand == 'right':
answer += 'R'
right = current
else:
answer += 'L'
left = current
return answer |
class FactorConf(object):
FACTOR_INIT_VERSION = "INIT_VERSION"
GROUP_FACTOR_PREFIX = "FACTOR_KEEPER_GROUP_FACTOR_"
FACTOR_LENGTH = 4740
@staticmethod
def get_group_factor_name(factors):
factors = sorted(factors)
return FactorConf.GROUP_FACTOR_PREFIX + "#".join(factors)
| class Factorconf(object):
factor_init_version = 'INIT_VERSION'
group_factor_prefix = 'FACTOR_KEEPER_GROUP_FACTOR_'
factor_length = 4740
@staticmethod
def get_group_factor_name(factors):
factors = sorted(factors)
return FactorConf.GROUP_FACTOR_PREFIX + '#'.join(factors) |
def map_fn(obj, objs, apply_fn):
if isinstance(obj, dict):
return dict(map(lambda kv: (kv[0], map_fn(kv[1], list(map(lambda x: x[kv[0]], objs)), apply_fn)), obj.items()))
elif isinstance(obj, list):
return list(map(lambda e: map_fn(e[0], e[1:], apply_fn), zip(obj, *objs)))
elif isinstance(obj, tuple):
return tuple(map(lambda e: map_fn(e[0], e[1:], apply_fn), zip(obj, *objs)))
else:
return apply_fn(*objs)
| def map_fn(obj, objs, apply_fn):
if isinstance(obj, dict):
return dict(map(lambda kv: (kv[0], map_fn(kv[1], list(map(lambda x: x[kv[0]], objs)), apply_fn)), obj.items()))
elif isinstance(obj, list):
return list(map(lambda e: map_fn(e[0], e[1:], apply_fn), zip(obj, *objs)))
elif isinstance(obj, tuple):
return tuple(map(lambda e: map_fn(e[0], e[1:], apply_fn), zip(obj, *objs)))
else:
return apply_fn(*objs) |
class Solution:
def fizzBuzz(self, n: int) -> List[str]:
l = []
for i in range(1,n+1):
if i%15==0 :
l.append("FizzBuzz")
elif i%3 == 0:
l.append("Fizz")
elif i%5 == 0:
l.append("Buzz")
else:
l.append(str(i))
return l
| class Solution:
def fizz_buzz(self, n: int) -> List[str]:
l = []
for i in range(1, n + 1):
if i % 15 == 0:
l.append('FizzBuzz')
elif i % 3 == 0:
l.append('Fizz')
elif i % 5 == 0:
l.append('Buzz')
else:
l.append(str(i))
return l |
__all__ = ['NamecheapError', 'ApiError']
class NamecheapError(Exception):
pass
# https://www.namecheap.com/support/api/error-codes.aspx
class ApiError(NamecheapError):
def __init__(self, number, text):
Exception.__init__(self, '%s - %s' % (number, text))
self.number = number
self.text = text
| __all__ = ['NamecheapError', 'ApiError']
class Namecheaperror(Exception):
pass
class Apierror(NamecheapError):
def __init__(self, number, text):
Exception.__init__(self, '%s - %s' % (number, text))
self.number = number
self.text = text |
def tribo(N):
if N == 0 or N == 1:
return 0
elif N == 2:
return 1
return tribo(N-1) + tribo(N-2)
def main():
N = int(input())
output = tribo(N)
print(output)
if __name__=='__main__':
main() | def tribo(N):
if N == 0 or N == 1:
return 0
elif N == 2:
return 1
return tribo(N - 1) + tribo(N - 2)
def main():
n = int(input())
output = tribo(N)
print(output)
if __name__ == '__main__':
main() |
class dataScientist():
employees = []
def __init__(self):
self.languages = []
self.department = ''
def add_language(self, new_language):
self.languages.append(new_language)
dilara = dataScientist()
pitircik = dataScientist()
pitircik.add_language("R")
print(pitircik.languages)
print(dilara.languages)
| class Datascientist:
employees = []
def __init__(self):
self.languages = []
self.department = ''
def add_language(self, new_language):
self.languages.append(new_language)
dilara = data_scientist()
pitircik = data_scientist()
pitircik.add_language('R')
print(pitircik.languages)
print(dilara.languages) |
class html:
def __init__(self, line) -> None: #("# oi # <teddy>oi</teddy> # oi # <teddy>5</teddy> %")
self.line = line
self.tm = []
self.tl = []
self.start(self.line + ' ')
def start(self, line):
before = line[:line.find('<teddy>')]
# "# oi #"
self.tm.append(before)
l = line.find('</teddy>')+8
# :"# oi # <teddy>5</teddy> %"
var = line[l:]
# " # oi # <teddy>5</teddy> %"
after = var[:var.find('<teddy>')]
# " # oi # "
self.tm.append(after)
if not line.find('<teddy>') == -1:
self.tl.append(line[line.find('<teddy>')+7:line.find('</teddy>')])
if '<teddy>' in var: # "<teddy>5</teddy> %""
self.tm.append(self.start(var[len(after):]))
else:
return after
| class Html:
def __init__(self, line) -> None:
self.line = line
self.tm = []
self.tl = []
self.start(self.line + ' ')
def start(self, line):
before = line[:line.find('<teddy>')]
self.tm.append(before)
l = line.find('</teddy>') + 8
var = line[l:]
after = var[:var.find('<teddy>')]
self.tm.append(after)
if not line.find('<teddy>') == -1:
self.tl.append(line[line.find('<teddy>') + 7:line.find('</teddy>')])
if '<teddy>' in var:
self.tm.append(self.start(var[len(after):]))
else:
return after |
n = int(input())
ans = 0
if n >= 1000:
ans += n - 999
if n >= 1000000:
ans += n - 999999
if n >= 1000000000:
ans += n - 999999999
if n >= 1000000000000:
ans += n - 999999999999
if n >= 1000000000000000:
ans += n - 999999999999999
print(ans)
| n = int(input())
ans = 0
if n >= 1000:
ans += n - 999
if n >= 1000000:
ans += n - 999999
if n >= 1000000000:
ans += n - 999999999
if n >= 1000000000000:
ans += n - 999999999999
if n >= 1000000000000000:
ans += n - 999999999999999
print(ans) |
def pluralize(word,num):
if num > 1:
if word [-3:]== "ife" :
return( word[:-3] + "ives")
elif word[-2:] == "sh" or word[-2:] == "ch" :
return( word + "es")
elif word[-2:] == "us":
return(word[:-2] + "i")
elif word[-2:] == "ay" or word[-2:] == "oy" or word[-2:] == "ey" or word[-2:] == "uy":
return(word + "s")
elif word[-1:] == "y":
return(word[:-1] + "ies")
else:
return(word +"s")
else:
return word
print(pluralize(raw_input("enter word: "),int(raw_input("enter number: "))))
| def pluralize(word, num):
if num > 1:
if word[-3:] == 'ife':
return word[:-3] + 'ives'
elif word[-2:] == 'sh' or word[-2:] == 'ch':
return word + 'es'
elif word[-2:] == 'us':
return word[:-2] + 'i'
elif word[-2:] == 'ay' or word[-2:] == 'oy' or word[-2:] == 'ey' or (word[-2:] == 'uy'):
return word + 's'
elif word[-1:] == 'y':
return word[:-1] + 'ies'
else:
return word + 's'
else:
return word
print(pluralize(raw_input('enter word: '), int(raw_input('enter number: ')))) |
class Token(object):
def __init__(self, symbol, spec, line):
self.symbol = symbol
self.spec = spec
self.line = line
if spec == 'error':
self.value = symbol
elif spec == 'const':
self.value = int(symbol)
elif spec == 'OCT':
self.value = oct(int(symbol, base=8))
elif spec == 'HEX':
self.value = hex(int(symbol, base=16))
elif spec == 'float':
self.value = float(symbol)
elif spec == 'IDN':
self.value = symbol
else:
self.value = '_'
def get_spec(self):
return self.spec
def get_value(self):
return self.value
def __repr__(self):
return "{:} < {:}, {:}, {} >".format(self.symbol, self.spec.upper(), self.value, self.line)
def __str__(self):
return "{:} < {:}, {:}, {} >".format(self.symbol, self.spec.upper(), self.value, self.line) | class Token(object):
def __init__(self, symbol, spec, line):
self.symbol = symbol
self.spec = spec
self.line = line
if spec == 'error':
self.value = symbol
elif spec == 'const':
self.value = int(symbol)
elif spec == 'OCT':
self.value = oct(int(symbol, base=8))
elif spec == 'HEX':
self.value = hex(int(symbol, base=16))
elif spec == 'float':
self.value = float(symbol)
elif spec == 'IDN':
self.value = symbol
else:
self.value = '_'
def get_spec(self):
return self.spec
def get_value(self):
return self.value
def __repr__(self):
return '{:} < {:}, {:}, {} >'.format(self.symbol, self.spec.upper(), self.value, self.line)
def __str__(self):
return '{:} < {:}, {:}, {} >'.format(self.symbol, self.spec.upper(), self.value, self.line) |
template = {
'dns': {},
'inbounds':
[
{
'listen': '0.0.0.0',
'port': 1080,
'protocol': 'socks',
'settings': {
'auth': 'noauth',
'udp': True
}
},
{
'listen': '0.0.0.0',
'port': 8080,
'protocol': 'http',
'settings': {'timeout': 300}
}
],
'log':
{
'access': '/dev/stdout',
'error': '/dev/stderr',
'loglevel': 'warning'
},
'outbounds':
[
{
'protocol': 'vmess',
'settings':
{
'vnext':
[
{
'address': 'proxy-server.com',
'port': 443,
'users':
[
{
'id': '657cd87b-9c0a-4399-afdc-1ccc7091972d'
}
]
}
]
},
'streamSettings':
{
'network': 'ws',
'security': 'tls',
'tlsSettings':
{
'serverName': 'www.baidu.com'
},
'wsSettings':
{
'path': '/v2ray'
}
},
'tag': 'proxy'
},
{
'protocol': 'freedom',
'settings': {},
'tag': 'direct'
},
{
'protocol': 'blackhole',
'settings': {},
'tag': 'blocked'}
],
'routing':
{
'domainStrategy': 'AsIs',
'rules':
[
{
'domain': ['geosite:cn'],
'outboundTag': 'direct',
'type': 'field'
},
{
'domain': ['geosite:category-ads-all'],
'outboundTag': 'blocked',
'type': 'field'
},
{
'domain': ['geosite:google', 'geosite:facebook'],
'outboundTag': 'proxy',
'type': 'field'
},
{
'ip': ['geoip:private'],
'outboundTag': 'blocked',
'type': 'field'
}
]
}
}
ws_template = {
'protocol': 'vmess',
'settings':
{
'vnext':
[
{
'address': 'proxy-server.com',
'port': 443,
'users':
[
{
'id': '657cd87b-9c0a-4399-afdc-1ccc7091972d',
"alterId": 4,
"security": "auto"
}
]
}
]
},
'streamSettings':
{
'network': 'ws',
'security': 'tls',
'tlsSettings':
{
'serverName': 'www.baidu.com'
},
'wsSettings':
{
'path': '/v2ray'
}
},
'tag': 'proxy'
}
tcp_template = {
"protocol": "vmess",
"settings": {
"vnext": [
{
"address": "proxy-server.com",
"port": 12345,
"users": [
{
"id": "657cd87b-9c0a-4399-afdc-1ccc7091972d",
"alterId": 4,
"security": "auto"
}
]
}
]
},
"tag": "proxy",
"streamSettings": {
"network": "tcp",
"security": "tls"
}
}
| template = {'dns': {}, 'inbounds': [{'listen': '0.0.0.0', 'port': 1080, 'protocol': 'socks', 'settings': {'auth': 'noauth', 'udp': True}}, {'listen': '0.0.0.0', 'port': 8080, 'protocol': 'http', 'settings': {'timeout': 300}}], 'log': {'access': '/dev/stdout', 'error': '/dev/stderr', 'loglevel': 'warning'}, 'outbounds': [{'protocol': 'vmess', 'settings': {'vnext': [{'address': 'proxy-server.com', 'port': 443, 'users': [{'id': '657cd87b-9c0a-4399-afdc-1ccc7091972d'}]}]}, 'streamSettings': {'network': 'ws', 'security': 'tls', 'tlsSettings': {'serverName': 'www.baidu.com'}, 'wsSettings': {'path': '/v2ray'}}, 'tag': 'proxy'}, {'protocol': 'freedom', 'settings': {}, 'tag': 'direct'}, {'protocol': 'blackhole', 'settings': {}, 'tag': 'blocked'}], 'routing': {'domainStrategy': 'AsIs', 'rules': [{'domain': ['geosite:cn'], 'outboundTag': 'direct', 'type': 'field'}, {'domain': ['geosite:category-ads-all'], 'outboundTag': 'blocked', 'type': 'field'}, {'domain': ['geosite:google', 'geosite:facebook'], 'outboundTag': 'proxy', 'type': 'field'}, {'ip': ['geoip:private'], 'outboundTag': 'blocked', 'type': 'field'}]}}
ws_template = {'protocol': 'vmess', 'settings': {'vnext': [{'address': 'proxy-server.com', 'port': 443, 'users': [{'id': '657cd87b-9c0a-4399-afdc-1ccc7091972d', 'alterId': 4, 'security': 'auto'}]}]}, 'streamSettings': {'network': 'ws', 'security': 'tls', 'tlsSettings': {'serverName': 'www.baidu.com'}, 'wsSettings': {'path': '/v2ray'}}, 'tag': 'proxy'}
tcp_template = {'protocol': 'vmess', 'settings': {'vnext': [{'address': 'proxy-server.com', 'port': 12345, 'users': [{'id': '657cd87b-9c0a-4399-afdc-1ccc7091972d', 'alterId': 4, 'security': 'auto'}]}]}, 'tag': 'proxy', 'streamSettings': {'network': 'tcp', 'security': 'tls'}} |
def exibe(v, n):
for i in range(n):
print(v[i], end=' ')
print('')
def troca(v, i, j):
v[i],v[j] = v[j],v[i]
def empurra(v, n):
for i in range(n - 1):
if v[i] > v[i+1]:
troca(v, i, i+1)
def bubble_sort(v, n):
exibe(v, n)
tam = n
while tam > 1:
empurra(v, tam)
exibe(v, tam)
tam = tam - 1
exibe(v, n)
def run():
bubble_sort([40, 20, 50, 30, 10], 5)
if __name__ == '__main__':
run()
| def exibe(v, n):
for i in range(n):
print(v[i], end=' ')
print('')
def troca(v, i, j):
(v[i], v[j]) = (v[j], v[i])
def empurra(v, n):
for i in range(n - 1):
if v[i] > v[i + 1]:
troca(v, i, i + 1)
def bubble_sort(v, n):
exibe(v, n)
tam = n
while tam > 1:
empurra(v, tam)
exibe(v, tam)
tam = tam - 1
exibe(v, n)
def run():
bubble_sort([40, 20, 50, 30, 10], 5)
if __name__ == '__main__':
run() |
n=input()
for i in n:
a=int(i)
if(a%2!=0):
print(i,end="")
| n = input()
for i in n:
a = int(i)
if a % 2 != 0:
print(i, end='') |
class Node:
def __init__(self, code, id, name, definition, version, revision, superclass, dictionary_code):
self.code = code
self.id = id
self.name = name
self.definition = definition
self.version = version
self.revision = revision
self.superclass = superclass
self.children = []
self.dictionary_code = dictionary_code
def to_string(self):
return 'code: ' + self.code + ', id: ' + self.id
def addChild(self, node):
self.children.append(node)
def __getitem__(self, key):
return getattr(self, key) | class Node:
def __init__(self, code, id, name, definition, version, revision, superclass, dictionary_code):
self.code = code
self.id = id
self.name = name
self.definition = definition
self.version = version
self.revision = revision
self.superclass = superclass
self.children = []
self.dictionary_code = dictionary_code
def to_string(self):
return 'code: ' + self.code + ', id: ' + self.id
def add_child(self, node):
self.children.append(node)
def __getitem__(self, key):
return getattr(self, key) |
with open("subreddits_list.txt", "r") as f:
subreddits = f.read().splitlines()
with open("script.sql", "w") as f:
for i in subreddits:
f.write(
f"CREATE TABLE IF NOT EXISTS '{i}' (Name text, Date text, Subscribers int, Live_Users int);\n"
f"INSERT INTO '{i}' SELECT * FROM measures where Name='{i}';\n"
)
| with open('subreddits_list.txt', 'r') as f:
subreddits = f.read().splitlines()
with open('script.sql', 'w') as f:
for i in subreddits:
f.write(f"CREATE TABLE IF NOT EXISTS '{i}' (Name text, Date text, Subscribers int, Live_Users int);\nINSERT INTO '{i}' SELECT * FROM measures where Name='{i}';\n") |
def parse(raw):
depth = 0
start = 0
pairs = []
for idx, ch in enumerate(raw):
if ch == '<':
depth += 1
if depth == 1:
pairs.append([start, idx])
elif ch == '>':
depth -= 1
if depth <= 0 and start == -1:
start = idx
res = []
for pair in pairs:
if pair[1] - pair[0] >= 10:
res.append(pair)
return res
if __name__ == '__main__':
raw = open('test.htm', 'r').read()
p = parseHTML(raw)
| def parse(raw):
depth = 0
start = 0
pairs = []
for (idx, ch) in enumerate(raw):
if ch == '<':
depth += 1
if depth == 1:
pairs.append([start, idx])
elif ch == '>':
depth -= 1
if depth <= 0 and start == -1:
start = idx
res = []
for pair in pairs:
if pair[1] - pair[0] >= 10:
res.append(pair)
return res
if __name__ == '__main__':
raw = open('test.htm', 'r').read()
p = parse_html(raw) |
class Snake:
def __init__(self, uuid, name, pos, direction):
self.uuid = uuid
self.name = name
self.body = [pos]
self.direction = direction
self.length = 6
self.colors = [[100, 100, 100]]
self.ticks = 0
def get_head(self):
return self.body[-1]
def tick(self):
head = self.get_head()
x, y = 0, 0
if self.direction == 0:
x -= 1
elif self.direction == 1:
y += 1
elif self.direction == 2:
x += 1
elif self.direction == 3:
y -= 1
# print(f"Client: {self.ticks} {(head[0] + x, head[1] + y)}")
self.body.append((head[0] + x, head[1] + y))
if len(self.body) > self.length:
self.body.pop(0)
self.ticks += 1
| class Snake:
def __init__(self, uuid, name, pos, direction):
self.uuid = uuid
self.name = name
self.body = [pos]
self.direction = direction
self.length = 6
self.colors = [[100, 100, 100]]
self.ticks = 0
def get_head(self):
return self.body[-1]
def tick(self):
head = self.get_head()
(x, y) = (0, 0)
if self.direction == 0:
x -= 1
elif self.direction == 1:
y += 1
elif self.direction == 2:
x += 1
elif self.direction == 3:
y -= 1
self.body.append((head[0] + x, head[1] + y))
if len(self.body) > self.length:
self.body.pop(0)
self.ticks += 1 |
class dotPartLine_t(object):
# no doc
aPoints = None
nPoints = None
PartID = None
PartLineCutted = None
PartLineType = None
| class Dotpartline_T(object):
a_points = None
n_points = None
part_id = None
part_line_cutted = None
part_line_type = None |
#: The interval which http server refreshes its routing table
HTTP_ROUTER_CHECKER_INTERVAL_S = 2
#: Actor name used to register actor nursery
SERVE_NURSERY_NAME = "SERVE_ACTOR_NURSERY"
#: KVStore connector key in bootstrap config
BOOTSTRAP_KV_STORE_CONN_KEY = "kv_store_connector"
#: HTTP Address
DEFAULT_HTTP_ADDRESS = "http://0.0.0.0:8000"
#: HTTP Host
DEFAULT_HTTP_HOST = "0.0.0.0"
#: HTTP Port
DEFAULT_HTTP_PORT = 8000
| http_router_checker_interval_s = 2
serve_nursery_name = 'SERVE_ACTOR_NURSERY'
bootstrap_kv_store_conn_key = 'kv_store_connector'
default_http_address = 'http://0.0.0.0:8000'
default_http_host = '0.0.0.0'
default_http_port = 8000 |
class UserContext:
@property
def user_id(self) -> int:
return self._user_id
@property
def is_admin(self) -> bool:
return self._is_admin
def __init__(self, user_id: int, is_admin: bool) -> None:
self._user_id = user_id
self._is_admin = is_admin
| class Usercontext:
@property
def user_id(self) -> int:
return self._user_id
@property
def is_admin(self) -> bool:
return self._is_admin
def __init__(self, user_id: int, is_admin: bool) -> None:
self._user_id = user_id
self._is_admin = is_admin |
numero = str(input('Digite um numero de 0 a 9999:'))
unidade = numero[3]
dezena = numero[2]
centena = numero[1]
milhar = numero[0]
print('''unidade:{},
centena:{},
dezena:{},
milhar:{}'''.format(unidade,dezena,centena,milhar)) | numero = str(input('Digite um numero de 0 a 9999:'))
unidade = numero[3]
dezena = numero[2]
centena = numero[1]
milhar = numero[0]
print('unidade:{},\ncentena:{},\ndezena:{},\nmilhar:{}'.format(unidade, dezena, centena, milhar)) |
class PrintDT:
def py_data(self,list):
self.list=[]
print(self.list)
def py_data(self,tuple):
self.tuple=()
print(tuple)
def py_data(self,str):
self.str=''
print(str)
p=PrintDT()
p.py_data([1,2,3])
p.py_data(('a',[8,4,6],"mouse"))
p.py_data('Abhay') | class Printdt:
def py_data(self, list):
self.list = []
print(self.list)
def py_data(self, tuple):
self.tuple = ()
print(tuple)
def py_data(self, str):
self.str = ''
print(str)
p = print_dt()
p.py_data([1, 2, 3])
p.py_data(('a', [8, 4, 6], 'mouse'))
p.py_data('Abhay') |
# -*- coding: utf-8 -*-
extensions = [
'sphinx.ext.intersphinx',
'sphinx.ext.mathjax',
]
#'sphinxcontrib.matlab',
#templates_path = ['_templates']
source_suffix = '.rst'
master_doc = 'index'
project = u'pyrenn'
copyright = u'2016, Dennis Atabay'
author = u'Dennis Atabay'
version = '0.1'
release = '0.1'
exclude_patterns = ['_build']
#pygments_style = 'sphinx'
# HTML output
htmlhelp_basename = 'pyrenndoc'
# LaTeX output
latex_elements = {
'papersize': 'a4paper',
'pointsize': '11pt',
}
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'pyrenn.tex', u'pyrenn Documentation',
u'Dannis Atabay', 'manual'),
]
# Manual page output
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'pyrenn', u'pyrenn Documentation',
[author], 1)
]
# Texinfo output
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'pyrenn', u'pyrenn Documentation',
author, 'pyrenn', 'A (mixed integer) linear optimisation model for local energy systems',
'Miscellaneous'),
]
# Epub output
# Bibliographic Dublin Core info.
epub_title = u'pyrenn'
epub_author = u'Dennis Atabay'
epub_publisher = u'Dennis Atabay'
epub_copyright = u'2016, Dennis Atabay'
epub_exclude_files = ['search.html']
# Intersphinx
# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {
'http://docs.python.org/': None,
'pandas': ('http://pandas.pydata.org/pandas-docs/stable/', None),
'matplotlib': ('http://matplotlib.org/', None)}
| extensions = ['sphinx.ext.intersphinx', 'sphinx.ext.mathjax']
source_suffix = '.rst'
master_doc = 'index'
project = u'pyrenn'
copyright = u'2016, Dennis Atabay'
author = u'Dennis Atabay'
version = '0.1'
release = '0.1'
exclude_patterns = ['_build']
htmlhelp_basename = 'pyrenndoc'
latex_elements = {'papersize': 'a4paper', 'pointsize': '11pt'}
latex_documents = [(master_doc, 'pyrenn.tex', u'pyrenn Documentation', u'Dannis Atabay', 'manual')]
man_pages = [(master_doc, 'pyrenn', u'pyrenn Documentation', [author], 1)]
texinfo_documents = [(master_doc, 'pyrenn', u'pyrenn Documentation', author, 'pyrenn', 'A (mixed integer) linear optimisation model for local energy systems', 'Miscellaneous')]
epub_title = u'pyrenn'
epub_author = u'Dennis Atabay'
epub_publisher = u'Dennis Atabay'
epub_copyright = u'2016, Dennis Atabay'
epub_exclude_files = ['search.html']
intersphinx_mapping = {'http://docs.python.org/': None, 'pandas': ('http://pandas.pydata.org/pandas-docs/stable/', None), 'matplotlib': ('http://matplotlib.org/', None)} |
num_elves = 3014387
elves = [[1, i + 1] for i in range(num_elves)]
while len(elves) > 1:
for i in range(len(elves)):
if elves[i][0] != 0:
elves[i][0] += elves[(i + 1) % len(elves)][0]
elves[(i + 1) % len(elves)][0] = 0
elves = [x for x in elves if x[0] != 0]
print('The elf with all the presents at the end is elf {}.'.format(elves[0][1]))
| num_elves = 3014387
elves = [[1, i + 1] for i in range(num_elves)]
while len(elves) > 1:
for i in range(len(elves)):
if elves[i][0] != 0:
elves[i][0] += elves[(i + 1) % len(elves)][0]
elves[(i + 1) % len(elves)][0] = 0
elves = [x for x in elves if x[0] != 0]
print('The elf with all the presents at the end is elf {}.'.format(elves[0][1])) |
class Node:
def __init__(self, data, nextNode):
self.data = data
self.nextNode = nextNode
class Stack:
def __init__(self):
self.top = None
def Peek(self):
return self.top
def Push(self, data):
nextNode = self.top
self.top = Node(data, nextNode)
def Pop(self):
if self.top is None:
return None
removed = self.top
self.top = self.top.nextNode
return removed
| class Node:
def __init__(self, data, nextNode):
self.data = data
self.nextNode = nextNode
class Stack:
def __init__(self):
self.top = None
def peek(self):
return self.top
def push(self, data):
next_node = self.top
self.top = node(data, nextNode)
def pop(self):
if self.top is None:
return None
removed = self.top
self.top = self.top.nextNode
return removed |
def resultado_f1(**podium):
for posicao, piloto in podium.items():
print(f'{posicao} --> {piloto}')
if __name__ == '__main__':
resultado_f1(primeiro='Piloto1',
segundo='Piloto2',
terceiro='Piloto3')
| def resultado_f1(**podium):
for (posicao, piloto) in podium.items():
print(f'{posicao} --> {piloto}')
if __name__ == '__main__':
resultado_f1(primeiro='Piloto1', segundo='Piloto2', terceiro='Piloto3') |
# coding: utf-8
class GradsCondition(object):
def __init__(self, name, values):
self.name = name
self.values = values
if self.name == 'level':
self.values = [float(v) for v in self.values]
def __eq__(self, other):
if isinstance(other, self.__class__):
return self.__dict__ == other.__dict__
else:
return False
def is_fit(self, record):
if self.name == "var":
if record['name'] in self.values:
return True
elif self.name == "level":
if record['level'] in self.values:
return True
else:
raise NotImplemented("condition not implemented: " + self.name)
return False
| class Gradscondition(object):
def __init__(self, name, values):
self.name = name
self.values = values
if self.name == 'level':
self.values = [float(v) for v in self.values]
def __eq__(self, other):
if isinstance(other, self.__class__):
return self.__dict__ == other.__dict__
else:
return False
def is_fit(self, record):
if self.name == 'var':
if record['name'] in self.values:
return True
elif self.name == 'level':
if record['level'] in self.values:
return True
else:
raise not_implemented('condition not implemented: ' + self.name)
return False |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.