content
stringlengths 7
1.05M
|
|---|
class Solution:
def checkValidString(self, s: str) -> bool:
left_count = 0
star_count = 0
for char in s:
if char == '(':
left_count += 1
elif char == '*':
star_count += 1
else:
if left_count > 0:
left_count -= 1
elif star_count > 0:
star_count -= 1
else:
return False
if left_count == 0:
return True
right_count = 0
star_count = 0
for char in s[::-1]:
if char == ')':
right_count += 1
elif char == '*':
star_count += 1
else:
if right_count > 0:
right_count -= 1
elif star_count >0:
star_count -= 1
else:
return False
return True
|
class SanSize(int):
"""
Size in bytes
Range : [0..2^63-1].
"""
@staticmethod
def get_api_name():
return "san-size"
|
class FibonacciTable:
def __init__(self):
self.forward_look_up_table = {0: 0, 1: 1}
self.backward_look_up_table = {0: 0, 1: 1}
def _build_lookup_table(self, fib_index: int) -> None:
if fib_index in self.forward_look_up_table.keys():
return
current_highest_index = max(self.forward_look_up_table.keys())
next_value = self.forward_look_up_table[current_highest_index - 1] + self.forward_look_up_table[
current_highest_index]
self.forward_look_up_table[current_highest_index + 1] = next_value
self.backward_look_up_table[next_value] = current_highest_index + 1
self._build_lookup_table(fib_index)
def _build_non_fibonacci_lookup_table(self, fib_number: int) -> None:
current_index = self.backward_look_up_table[max(self.backward_look_up_table.keys())]
previous_index = current_index - 1
if abs(fib_number - self.forward_look_up_table[previous_index]) <= abs(
fib_number - self.forward_look_up_table[current_index]):
self.backward_look_up_table[fib_number] = previous_index
else:
self.backward_look_up_table[fib_number] = current_index
def _update_look_up_table_number(self, fib_index: int) -> None:
while fib_index > max(self.forward_look_up_table.keys()):
self._build_lookup_table(fib_index)
def _update_look_up_table_index(self, fib_number) -> None:
while fib_number >= max(self.backward_look_up_table.keys()):
current_index = self.backward_look_up_table[max(self.backward_look_up_table.keys())]
self._build_lookup_table(current_index + 1) # hier is het een fibonacci getal
if fib_number is not max(self.backward_look_up_table.keys()):
self._build_non_fibonacci_lookup_table(fib_number) # hier is het geen fibonacci getal
def new_fibonacci_number(self, fib_index: int) -> int:
self._update_look_up_table_number(fib_index)
return self.forward_look_up_table[fib_index]
def new_index_fibonacci_number(self, number: int) -> int:
"""Returns an index corresponding to the given fibonacci number."""
self._update_look_up_table_index(number)
return self.backward_look_up_table[number]
|
# Given an array of ints length 3, return an array with the elements "rotated
# left" so {1, 2, 3} yields {2, 3, 1}.
# rotate_left3([1, 2, 3]) --> [2, 3, 1]
# rotate_left3([5, 11, 9]) --> [11, 9, 5]
# rotate_left3([7, 0, 0]) --> [0, 0, 7]
def rotate_left3(nums):
nums.append(nums.pop(0))
return nums
print(rotate_left3([1, 2, 3]))
print(rotate_left3([5, 11, 9]))
print(rotate_left3([7, 0, 0]))
|
""" This module provides procedures to check if an instance describes preferences that are single-crossing.
"""
def isSingleCrossing(instance):
""" Tests whether the instance describe a profile of single-crossed preferences.
:param instance: The instance to take the orders from.
:type instance: preflibtools.instance.preflibinstance.PreflibInstance
:return: A boolean indicating whether the instance is single-crossed or no.
:rtype: bool
"""
def prefers(a, b, o):
return o.index(a) < o.index(b)
def conflictSet(o1, o2):
res = set([])
for i in range(len(o1)):
for j in range(i + 1, len(o1)):
if ((prefers(o1[i], o1[j], o1) and prefers(o1[j], o1[i], o2)) or
(prefers(o1[j], o1[i], o1) and prefers(o1[i], o1[j], o2))):
res.add((min(o1[i][0], o1[j][0]), max(o1[i][0], o1[j][0])))
return res
def isSCwithFirst(i, profile):
for j in range(len(profile)):
for k in range(len(profile)):
conflictij = conflictSet(profile[i], profile[j])
conflictik = conflictSet(profile[i], profile[k])
if not (conflictij.issubset(conflictik) or conflictik.issubset(conflictij)):
return False
return True
for i in range(len(instance.orders)):
if isSCwithFirst(i, instance.orders):
return True
return False
|
#!/usr/bin/env python3
# Parse input
lines = []
with open("10/input.txt", "r") as fd:
for line in fd:
lines.append(line.rstrip())
illegal = []
for line in lines:
stack = list()
for c in line:
if c == "(":
stack.append(")")
elif c == "[":
stack.append("]")
elif c == "{":
stack.append("}")
elif c == "<":
stack.append(">")
else:
# Closing
if len(stack) == 0:
illegal.append(c)
break
expected = stack.pop()
if c != expected:
illegal.append(c)
break
mapping = {
")": 3,
"]": 57,
"}": 1197,
">": 25137
}
print(sum([mapping[x] for x in illegal]))
|
class Node:
def __init__(self, data):
self.data = data
self.next = None
class Queue:
def __init__(self):
self.front = self.back = None
def isEmpty(self):
return self.front == None
def EnQueue(self, item):
temp = Node(item)
if(self.back == None):
self.front = self.back = temp
return
self.back.next = temp
self.back = temp
def DeQueue(self):
if(self.isEmpty()):
return
temp = self.front
self.front = temp.next
if(self.front == None):
self.back = None
if __name__ == "__main__":
queue = Queue()
queue.EnQueue(20)
queue.EnQueue(30)
queue.DeQueue()
queue.DeQueue()
queue.EnQueue(40)
queue.EnQueue(50)
queue.EnQueue(60)
queue.DeQueue()
print("Queue Front " + str(queue.front.data))
print("Queue Back " + str(queue.back.data))
|
#/* *** ODSATag: RFact *** */
# Recursively compute and return n!
def rfact(n):
if n < 0: raise ValueError
if n <= 1: return 1 # Base case: return base solution
return n * rfact(n-1) # Recursive call for n > 1
#/* *** ODSAendTag: RFact *** */
#/* *** ODSATag: Sfact *** */
# Return n!
def sfact(n):
if n < 0: raise ValueError
# Make a stack just big enough
S = AStack(n)
while n > 1:
S.push(n)
n -= 1
result = 1
while S.length() > 0:
result = result * S.pop()
return result
#/* *** ODSAendTag: Sfact *** */
|
"""
Range
range(stop)
range(start, stop)
range(start, stop, step)
start = 0
step = 1
- iterable object
- string is iterable
"""
r = range(5, 10, 2)
print(r.start)
print(r.stop)
print(r.step)
|
# https://www.hackerrank.com/challenges/ctci-is-binary-search-tree
""" Node is defined as
class node:
def __init__(self, data):
self.data = data
self.left = None
self.right = None
"""
arr = []
inlen = 0
def checkBST(root):
global arr
if root is None:
return True
if checkBST(root.left):
arr.append(root.data)
if len(arr)>=2:
if arr[-1]>arr[-2]:
return True and checkBST(root.right)
else:
return False
else:
return checkBST(root.right)
else:
return False
# def checkBST(root):
# if root.left is None and root.right is None:
# return True
# elif root.left is None and root.data <= root.right.data:
# return checkBST(root.right)
# elif root.right is None and root.data >= root.left.data:
# return checkBST(root.left)
# elif root.left.data <= root.data <= root.right.data:
# return checkBST(root.left) and checkBST(root.right)
# else:
# return False
|
nome = str(input("Qual é seu nome? "))
if nome == 'César':
print("Que nome lindo!!")
elif nome == "Enzo":
print('Caralho mlk')
elif nome in "Paula Bruna Marcela":
print("Olha que coisa mais linda e mais cheia de graça...")
else:
print("Nomezinho xexelento viu..")
print("Tenha um bom dia {}.".format(nome))
|
r1, c1 = map(int, input().split())
r2, c2 = map(int, input().split())
if abs(r1 - r2) + abs(c1 - c2) == 0:
print(0)
exit()
# Move
if abs(r1 - r2) + abs(c1 - c2) <= 3:
print(1)
exit()
r3 = r2
t = abs(r1 - r2)
if abs(c1 + t - c2) < abs(c1 - t - c2):
c3 = c1 + t
else:
c3 = c1 - t
# Bishop warp
if c3 == c2:
print(1)
exit()
# Move + Move
if abs(r1 - r2) + abs(c1 - c2) <= 6:
print(2)
exit()
# Bishop warp + Move
if abs(r3 - r2) + abs(c3 - c2) <= 3:
print(2)
exit()
# Bishop warp + Bishop warp
if (r1 + c1) % 2 == (r2 + c2) % 2:
print(2)
exit()
# Bishop warp + Bishop warp + Move
print(3)
|
age = 10
num = 0
while num < age:
if num == 0:
num += 1
continue
if num % 2 == 0:
print(num)
if num > 4:
break
num += 1
|
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sat May 25 19:01:56 2019
@author: joscelynec
"""
"""
Iterative Binary Search of a Sorted Array
Adapted from:
https://codereview.stackexchange.com/questions/117180/python-2-binary-search
"""
def binary_search(array, value):
start, stop = 0, len(array)
while start < stop:
offset = start + stop >> 1
sample = array[offset]
if sample < value:
start = offset + 1
elif sample > value:
stop = offset
else:
return offset
return -1
"""
Finds pivot index in sorted rotated list
for example, for [6, 7, 8, 9, 10, 1, 2, 3, 4]
pivot = 5
"""
def find_pivot(input_list):
start = 0
end = len(input_list) - 1
while start <= end:
mid = (start + end)//2
if input_list[start] <= input_list[end]: #check if list is not rotated
return start
elif input_list[start] <= input_list[mid]: #first to mid is sorted, pivot is in other half of list
start = mid +1
else: #pivot is in first half of list
end = mid
return start
"""
Modify/adapt binary search to search a rotated sorted input_list
in O(nlog n) time
Uses find_pivot(input_list) and then binary search on two sub lists
Find the index by searching in a rotated sorted input_list
Args:
input_list(input_list), number(int): Input input_list to search and the target
Returns:
int: Index or -1
"""
def rotated_input_list_search(input_list, number):
#Null input
if input_list == None or number == None:
return -1
#Empty List
if input_list == [] or number == None:
return -1
pivot_index = find_pivot(input_list)
#perform binary search on each list divided into at the pivot
temp = binary_search(input_list[0: pivot_index], number)
if temp != -1:
return temp
temp = binary_search(input_list[pivot_index: len(input_list)], number)
if temp != -1:
return temp + pivot_index
#number not found
return -1
#print(rotated_input_list_search([6, 7, 8, 1, 2, 3, 4], 6))
def linear_search(input_list, number):
#Null input
if input_list == None or number == None:
return -1
#Empty List
if input_list == [] or number == None:
return -1
for index, element in enumerate(input_list):
if element == number:
return index
return -1
#Udacity test function modified for None or Empty inputs
def test_function(test_case):
if test_case == None:
print("None")
return
input_list = test_case[0]
if input_list == [None]:
print("None")
return
number = test_case[1]
if number == None:
print("None")
return
if linear_search(input_list, number) == rotated_input_list_search(input_list, number):
print("Pass")
else:
print("Fail")
test_function(None)#Null Inputs
test_function([[None], None])#Null Input_lists
test_function([[None], 6])#Null Input_lists
test_function([[], None])#Empty List, None for number
test_function([[], 6])#Empty List
test_function([[8], 8])#Singleton List with value
test_function([[8], 7])#Singleton List without value
#More tests two element lists
test_function([[7,8], 8])
test_function([[8,5], 8])
test_function([[7,8], 9])
test_function([[8,5], 4])
#Full cycle of a sorted list, value present and not present
test_function([[1, 2, 3, 4, 5], 3])
test_function([[1, 2, 3, 4, 5], 6])
test_function([[2, 3, 4, 5, 1], 3])
test_function([[2, 3, 4, 5, 1], 6])
test_function([[3, 4, 5, 1, 2], 3])
test_function([[3, 4, 5, 1, 2], 6])
test_function([[4, 5, 1, 2, 3], 3])
test_function([[4, 5, 1, 2, 3], 6])
test_function([[5, 1, 2, 3, 4], 3])
test_function([[5, 1, 2, 3, 4], 6])
#Udacity supplied tests
test_function([[6, 7, 8, 9, 10, 1, 2, 3, 4], 6])
test_function([[6, 7, 8, 9, 10, 1, 2, 3, 4], 1])
test_function([[6, 7, 8, 1, 2, 3, 4], 8])
test_function([[6, 7, 8, 1, 2, 3, 4], 1])
test_function([[6, 7, 8, 1, 2, 3, 4], 10])
"""
None
None
None
None
Pass
Pass
Pass
Pass
Pass
Pass
Pass
Pass
Pass
Pass
Pass
Pass
Pass
Pass
Pass
Pass
Pass
Pass
Pass
Pass
Pass
Pass
"""
|
# -*- coding: utf-8 -*-
"""
Created on Tue Dec 24 15:29:32 2019
@author: mwhitten
"""
def g2d1(Fy, Aw, Cv):
"""Nominal shear strength
The nominal shear strength, Vn, of unstiffened or stiffened webs, according
to the limit states of shear yielding and shear buckling, is
Vn = 0.6*Fy*Aw*Cv
Args:
Fy (float):
Aw (float):
Cv (float):
"""
Vn = 0.6*Fy*Aw*Cv
text = ()
return Vn, text
def g2d2(h, tw, E, Fy):
"""Web shear coefficient, Case (a)
For webs of rolled I-shaped member with
if h/tw <= 2.24*math.sqrt(E,Fy):
Cv = 1.0
else:
Cv = None
Args:
h (float):
web height
tw (float):
web thickness
E (float):
modulus of elasticity
Fy (float):
yield strength of web
Returns:
Cv (tuple(float, str)):
web shear coefficient
"""
if h/tw <= 2.24*math.sqrt(E/Fy):
Cv = 1.0
text = ()
else:
Cv = None
text = ()
return Cv, text
def g2d3(h, tw, kv, E, Fy):
"""Web shear coefficient, Case (b)(i)
For webs of all other doubly symmetric shapes and single symmetric shapes
and channels, excepts round HSS, the web shear coefficient, Cv, is
determined as follows
if h/tw <= 1.10*math.sqrt(kv*E/Fy):
Cv = 1.0
else:
Cv = None
Args:
h (float):
web height
tw (float):
web thickness
kv (float):
E (float):
modulus of elasticity
Fy (float):
yield strength of web
Returns:
Cv (tuple(float, str)):
web shear coefficient
"""
if h/tw <= 1.10*math.sqrt(kv*E/Fy):
Cv = 1.0
text = ()
else:
Cv = None
text = ()
return Cv, text
|
# This is Stack build using Singly Linked List
class StackNode:
def __init__(self, value):
self.value = value
self._next = None
class Stack:
def __init__(self):
self.head = None # bottom
self.tail = None # top
self.size = 0
def __len__(self):
return self.size
def _size(self):
return self.size
def is_empty(self):
return self.size == 0
def __str__(self):
linked_list = ""
current_node = self.head
while current_node is not None:
linked_list += f"{current_node.value} -> "
current_node = current_node._next
linked_list += "None"
return linked_list
def __repr__(self):
return str(self)
def push(self, value):
node = StackNode(value)
if self.is_empty():
self.head = self.tail = node
else:
self.tail._next = node
self.tail = node
self.size += 1
def pop(self):
assert self.size != 0, 'Stack is empty'
tmp = self.head
self.size -= 1
if self.is_empty():
self.head = self.tail = None
else:
self.head = self.head._next
return tmp
s = Stack()
print(s.is_empty())
# print(s)
s.push(1)
print(s, s.head.value, s.tail.value)
s.push(2)
print(s, s.head.value, s.tail.value)
s.push(3)
print(s, s.head.value, s.tail.value)
s.push(4)
print(s, s.head.value, s.tail.value)
print(s.pop().value)
print(s, s.head.value, s.tail.value)
print(s.pop().value)
print(s, s.head.value, s.tail.value)
print(s.pop().value)
print(s, s.head.value, s.tail.value)
print(s.pop().value)
print(s)
|
def create_data(n):
temp = [i for i in range(n)]
return temp
n = 100
target = n + 11
ma_list = create_data(n)
def binary_search(input_list,target):
found = False
low = 0
high = len(input_list) - 1
mid = int((high + low) / 2)
while (low <=high) and (not found):
curr = input_list[mid]
if curr == target:
found = True
return True
elif curr < target:
low = mid +1
elif curr > target:
high = mid - 1
mid = int((high + low) / 2)
print(mid)
return False
print(binary_search(ma_list,target))
|
# @Author: Ozan YILDIZ@2022
# Simple printing operation
val = 12
if __name__ == '__main__':
#print operation
print("Boolean True (True)", val)
|
#!/usr/bin/env python3
# Oppgave av Stian Knudsen
# 2.a
# x = 10
print("{:<21}{}".format("x = 10 :", "Datatypen til x er int"))
# x = 10 + 10
print("{:<21}{}".format("x = 10 + 10 :", "Datatypen til x er int"))
# x = 5.5
print("{:<21}{}".format("x = 5.5 :", "Datatypen til x er float"))
# x = 10 + 5.5
print("{:<21}{}".format("x = 10 + 5.5 :", "Datatypen til x er float"))
# x = 5.5 + 5.5
print("{:<21}{}".format("x = 5.5 + 5.5 :", "Datatypen til x er float"))
# x = "abc"
print("{:<21}{}".format("x = \"abc\" :", "Datatypen til x er str"))
# x = "abc" + "5"
print("{:<21}{}".format("x = \"abc\" + \"5\" :", "Datatypen til x er str"))
# x = "abc" + 5
print("{:<21}{}".format("x = \"abc\" + 5 :", "Det er ikke mulig å sette sammen en streng(\"abc\") og et heltall(5)."))
# x = "abc" + str(5)
print("{:<21}{}".format("x = \"abc\" + str(5) :", "Datatypen til x str"))
# x = "5" + 5
print("{:<21}{}".format("x = \"5\" + 5 :", "Det er ikke mulig å sette sammen en streng(\"5\") og et heltall(5)."))
# x = int("5") + 5
print("{:<21}{}".format("x = int(\"5\") + 5 :", "Datatypen til x er int"))
|
class FlightParsingConfig(object):
"""
Configuration for parsing an IGC file.
Defines a set of parameters used to validate a file, and to detect
thermals and flight mode. Details in comments.
"""
#
# Flight validation parameters.
#
# Minimum of fixes required before takeoff for file to be regarded valid
min_fixes_before_takeoff = 5
# Minimum number of fixes in a file.
min_fixes = 50
# Maximum time between fixes, seconds.
# Soft limit, some fixes are allowed to exceed.
max_seconds_between_fixes = 50.0
# Minimum time between fixes, seconds.
# Soft limit, some fixes are allowed to exceed.
min_seconds_between_fixes = 1.0
# Maximum number of fixes exceeding time between fix constraints.
max_time_violations = 10
# Maximum number of times a file can cross the 0:00 UTC time.
max_new_days_in_flight = 2
# Minimum average of absolute values of altitude changes in a file.
# This is needed to discover altitude sensors (either pressure or
# gps) that report either always constant altitude, or almost
# always constant altitude, and therefore are invalid. The unit
# is meters/fix.
min_avg_abs_alt_change = 0.01
# Maximum altitude change per second between fixes, meters per second.
# Soft limit, some fixes are allowed to exceed.
max_alt_change_rate = 50.0
# Maximum number of fixes that exceed the altitude change limit.
max_alt_change_violations = 3
# Absolute maximum altitude, meters.
max_alt = 10000.0
# Absolute minimum altitude, meters.
min_alt = -600.0
#
# Flight detection parameters.
#
# Minimum ground speed to switch to flight mode, km/h.
min_gsp_flight = 15.0
# Minimum idle time (i.e. time with speed below min_gsp_flight) to switch
# to landing, seconds. Exception: end of the file (tail fixes that
# do not trigger the above condition), no limit is applied there.
min_landing_time = 5.0 * 60.0
# In case there are multiple continuous segments with ground
# speed exceeding the limit, which one should be taken?
# Available options:
# - "first": take the first segment, ignore the part after
# the first detected landing.
# - "concat": concatenate all segments; will include the down
# periods between segments (legacy behavior)
# - "all": create seperate flight objects for all detected takeoffs
which_flight_to_pick = "first"
#
# Thermal detection parameters.
#
# Minimum bearing change to enter a thermal, deg/sec.
min_bearing_change_circling = 6.0
# Minimum time between fixes to calculate bearing change, seconds.
# See the usage for a more detailed comment on why this is useful.
min_time_for_bearing_change = 5.0
# Minimum time to consider circling a thermal, seconds.
min_time_for_thermal = 60.0
#
# Engine detection parameters.
#
# Which sensor to choose to detect engine run if available
sensors = ['RPM', 'ENL', 'MOP', 'CUR']
# minima of these sensor to detect raw engine emissions
min_sensor_level = {'RPM': 50, 'ENL': 500, 'MOP': 50, 'CUR': 5}
# minima of fixes above min_sensor_level
min_engine_running = 10
#
# Tow detection parameters.
#
# Minimum climbing rate on tow, used for raw emissions for tow detections
min_vario_on_tow = 0.0
# Maximum bearing change on tow, deg/sec.
max_bearing_change_on_tow = 10.0
# maybe also speed change after tow release?
#
# Scoring parameters.
#
# Maximum scoring speed - used to disregard windows based on time, km/h
max_scoring_speed = 300
|
"""URL creator for the evergreen API."""
class UrlCreator:
"""Class to create evergreen URLs."""
def __init__(self, api_server: str) -> None:
"""
Initialize a url creator.
:param api_server: Hostname API server to connect to.
"""
self.api_server = api_server
def rest_v2(self, endpoint: str) -> str:
"""
Create a REST V2 url.
:param endpoint: Endpoint to connect to.
:return: URL to access given endpoint.
"""
return f"{self.api_server}/rest/v2/{endpoint}"
|
# Fonte: https://leetcode.com/problems/contains-duplicate-ii/
# Autor: Bruno Harlis
# Data: 21/09/2021
"""
PROBLEMA PROSPOSTO:
Dado um array inteiro nums e um inteiro k, retorna true se houver dois
índices distintos i e j no array tal nums[i] == nums[j] e abs(i - j) <= k.
Exemplo 1:
Entrada: nums = [1,2,3,1], k = 3
Saída: verdadeiro
Exemplo 2:
Entrada: nums = [1,0,1,1], k = 1
Saída: verdadeiro
Exemplo 3:
Entrada: nums = [1,2,3,1,2,3], k = 2
Saída: falso
Tempo de execução: 588 ms, mais rápido do que 90,50 % dos envios.
Uso de memória: 25,9 MB, menos de 83,66 % dos envios.
"""
def containsNearbyDuplicate(nums, k):
if len(nums) == len(set(nums)):
return False
for i in range(len(nums)):
for j in range(i+1, len(nums)):
if nums[i] == nums[j]:
if abs(i-j) <= k:
return True
else:
break
return False
|
#http://shell-storm.org/shellcode/files/shellcode-103.php
"""
\x7f\x45\x4c\x46\x01\x01\x01\x09\x00\x00\x00\x00\x00\x00\x00\x00
\x02\x00\x03\x00\x01\x00\x00\x00\x74\x80\x04\x08\x34\x00\x00\x00
\xa8\x00\x00\x00\x00\x00\x00\x00\x34\x00\x20\x00\x02\x00\x28\x00
\x05\x00\x04\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x80\x04\x08
\x00\x80\x04\x08\x8b\x00\x00\x00\x8b\x00\x00\x00\x05\x00\x00\x00
\x00\x10\x00\x00\x01\x00\x00\x00\x8c\x00\x00\x00\x8c\x90\x04\x08
\x8c\x90\x04\x08\x00\x00\x00\x00\x00\x00\x00\x00\x06\x00\x00\x00
\x00\x10\x00\x00
"""
"""
\x31\xc0\x50\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69
\x6e\x89\xe3\x50\x54\x53\x50\xb0\x3b\xcd\x80\x44
"""
"""
"\x7f\x45\x4c\x46\x01\x01\x01\x09\x00\x00\x00\x00\x00\x00\x00\x00
\x02\x00\x03\x00\x01\x00\x00\x00\x74\x80\x04\x08\x34\x00\x00\x00
\xa8\x00\x00\x00\x00\x00\x00\x00\x34\x00\x20\x00\x02\x00\x28\x00
\x05\x00\x04\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x80\x04\x08
\x00\x80\x04\x08\x8b\x00\x00\x00\x8b\x00\x00\x00\x05\x00\x00\x00
\x00\x10\x00\x00\x01\x00\x00\x00\x8c\x00\x00\x00\x8c\x90\x04\x08
\x8c\x90\x04\x08\x00\x00\x00\x00\x00\x00\x00\x00\x06\x00\x00\x00
\x00\x10\x00\x00
"""
"""
\x31\xc0\x50\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\x50\x54\x53\x50\xb0\x3b\xcd\x80\x44
"""
|
#Finding least trial
def least_trial_num(n):
#making 1000001 size buffer
buffer = []
for i in range(1000001):
buffer += [0]
#Minimum calculation of 1 is 0 times.
buffer[1] = 0
#Minimum calculations of other values
for i in range(2, n + 1):
#Since calculations of (n - 1), (n / 2), (n / 3) is all minimum-guaranteed, n is also minimum.
#First, we set to calculations of n to 1 + calculations of (n - 1)
buffer[i] = buffer[i - 1] + 1
#Comparing two if n can be divided by 2
if i % 2 == 0:
buffer[i] = min2(buffer[i], buffer[i // 2] + 1)
#Comparing two if n can be divided by 3
if i % 3 == 0:
buffer[i] = min2(buffer[i], buffer[i // 3] + 1)
#Returning a value
return buffer[n]
#This is fumction which finds least value of two
def min2(a, b):
if a < b: return a
else: return b
#Input part
N = int(input())
#Output part
print(least_trial_num(N))
|
#!/usr/local/bin/python3
# -*- coding: utf-8 -*-
"""
Date: 2019/11/27
Author: Xiao-Le Deng
Email: xiaoledeng at gmail.com
Function: get a list of each line in the file
"""
def read_file_to_list(file):
"""Return a list of each line in the file"""
result=[]
with open(file,'rt',encoding='utf-8') as f:
for line in f:
result.append(list(line.strip('\n').split(','))[0])
return result
# # example
# a = read_file_to_list("example.txt")
# print('The len of the list is:',len(a))
# print(a)
|
# environment variables
ATOM_PROGRAM = '/home/physics/bin/atm'
ATOM_UTILS_DIR ='/home/physics/bin/pseudo'
element = "Al"
equil_volume = 16.4796
# general calculation parameters
calc = {"element": element,
"lattice": "FCC",
"xc": "pb",
"n_core": 3,
"n_val": 2,
"is_spin_pol": False,
"core": True,
}
# pseudopotential parameters
electrons = [2, 1]
radii = [2.4, 2.8, 2.3, 2.3, 0.7]
# SIESTA calculation parameters
siesta_calc = {"element": element,
"title": element + " SIESTA calc",
"xc_f": "GGA",
"xc": "PBE"
}
# electronic configurations
configs = [[1.5, 1.5],
[1, 2],
[0.5, 2.5],
[0, 3]]
# number of atoms in cubic cell
_nat_cell = {"SC": 1,
"BCC": 2,
"FCC": 4}
nat = _nat_cell[calc["lattice"]]
|
idir="<path to public/template database>/";
odir=idir+"output/";
public_dir='DPA_contest2_public_base_diff_vcc_a128_2009_12_23/'
template_dir='DPA_contest2_template_base_diff_vcc_a128_2009_12_23/'
template_index_file=idir+'DPA_contest2_template_base_index_file'
public_index_file=idir+'DPA_contest2_public_base_index_file'
template_keymsg_file=idir+'keymsg_template_base_dpacontest2'
public_keymsg_file=idir+'keymsg_public_base_dpacontest2'
template_idir=idir+template_dir
public_idir=idir+public_dir
|
def getNoZeroIntegers(self, n: int) -> List[int]:
for i in range(1, n):
a = i
b = n - i
if "0" in str(a) or "0" in str(b):
continue
return [a, b]
|
province = input('Enter you province: ')
if province.lower() == 'surigao':
print('Hi, I am from Surigao too.')
else:
print(f'Hi, so your from { province.capitalize() }')
|
def print_num(n):
"""Print a number with proper formatting depending on int/float"""
if float(n).is_integer():
return print(int(n))
else:
return print(n)
|
PrimeNums = []
Target = 10001
Number = 0
while len(PrimeNums) < Target:
isPrime = True
Number += 1
for x in range(2,9):
if Number % x == 0 and Number != x:
isPrime = False
if isPrime:
if Number == 1:
False
else:
PrimeNums.append(Number)
print(PrimeNums[-1])
|
# SET MISMATCH LEETCODE SOLUTION:
# creating a class.
class Solution(object):
# creating a function to solve the problem.
def findErrorNums(self, nums):
# creating multiple variables to store various sums.
actual_sum = sum(nums)
set_sum = sum(set(nums))
a_sum = len(nums) * (len(nums) + 1) / 2
# returning the difference between appropriate sums.
return [actual_sum - set_sum, a_sum - set_sum]
|
def modulo_pastel(key: int) -> str:
"""
Select a pastel color on a modulo cycle.
Args:
key (int): The index modulo index.
Returns:
str: The selected RGB pastel color code.
"""
hex_codes = [
"957DAD",
"B5EAD7",
"C7CEEA",
"D291BC",
"E0BBE4",
"E2F0CB",
"FEC8D8",
"FF9AA2",
"FFB7B2",
"FFDFD3",
]
return hex_codes[key % len(hex_codes)]
|
# Copyright 2020 The Pigweed Authors
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# 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.
# AUTOGENERATED - DO NOT EDIT
# This file contains test data generated by generate_decoding_test_data.cc.
"""Generated test data."""
# pylint: disable=line-too-long
# C++ test case type for varint_decoding:
# std::tuple<const char*, const char*, const char*, const char*, std::string_view>
def TestCase(*args): # pylint: disable=invalid-name
return tuple(args)
# yapf: disable
TEST_DATA = (
# Important numbers
TestCase("%d", "0", "%u", "0", b'\x00'),
TestCase("%d", "-32768", "%u", "4294934528", b'\xff\xff\x03'),
TestCase("%d", "-32767", "%u", "4294934529", b'\xfd\xff\x03'),
TestCase("%d", "32766", "%u", "32766", b'\xfc\xff\x03'),
TestCase("%d", "32767", "%u", "32767", b'\xfe\xff\x03'),
TestCase("%d", "-2147483648", "%u", "2147483648", b'\xff\xff\xff\xff\x0f'),
TestCase("%d", "-2147483647", "%u", "2147483649", b'\xfd\xff\xff\xff\x0f'),
TestCase("%d", "2147483646", "%u", "2147483646", b'\xfc\xff\xff\xff\x0f'),
TestCase("%d", "2147483647", "%u", "2147483647", b'\xfe\xff\xff\xff\x0f'),
TestCase("%lld", "-9223372036854775808", "%llu", "9223372036854775808", b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01'),
TestCase("%lld", "-9223372036854775807", "%llu", "9223372036854775809", b'\xfd\xff\xff\xff\xff\xff\xff\xff\xff\x01'),
TestCase("%lld", "9223372036854775806", "%llu", "9223372036854775806", b'\xfc\xff\xff\xff\xff\xff\xff\xff\xff\x01'),
TestCase("%lld", "9223372036854775807", "%llu", "9223372036854775807", b'\xfe\xff\xff\xff\xff\xff\xff\xff\xff\x01'),
# Random 64-bit ints
TestCase("%lld", "5922204476835468009", "%llu", "5922204476835468009", b'\xd2\xcb\x8c\x90\x86\xe6\xf2\xaf\xa4\x01'),
TestCase("%lld", "2004795154352895159", "%llu", "2004795154352895159", b'\xee\xd2\x87\xea\xc5\xa4\xbb\xd2\x37'),
TestCase("%lld", "7672492112153174982", "%llu", "7672492112153174982", b'\x8c\x8f\x83\xee\x9c\xbb\x95\xfa\xd4\x01'),
TestCase("%lld", "6325664365257058358", "%llu", "6325664365257058358", b'\xec\xa0\xf3\xb7\xb6\x8e\xa3\xc9\xaf\x01'),
TestCase("%lld", "4553661289274231220", "%llu", "4553661289274231220", b'\xe8\xa6\x9a\xea\x9e\xb4\xed\xb1\x7e'),
TestCase("%lld", "6372308406878241426", "%llu", "6372308406878241426", b'\xa4\x8a\xb4\xf3\xfd\xae\xfe\xee\xb0\x01'),
TestCase("%lld", "7156998241444634343", "%llu", "7156998241444634343", b'\xce\xfb\xb8\xf6\xe5\xfe\xe1\xd2\xc6\x01'),
TestCase("%lld", "1376699938710259787", "%llu", "1376699938710259787", b'\x96\xa1\x84\x92\x9b\xd3\x82\x9b\x26'),
TestCase("%lld", "3051600409971083011", "%llu", "3051600409971083011", b'\x86\x9c\x9a\x8c\xf4\x99\xbb\xd9\x54'),
TestCase("%lld", "6288685020493584850", "%llu", "6288685020493584850", b'\xa4\xe7\xb8\xed\xa1\xed\xf2\xc5\xae\x01'),
TestCase("%lld", "5705831195318701531", "%llu", "5705831195318701531", b'\xb6\xb7\x82\x95\xb9\xcf\x97\xaf\x9e\x01'),
TestCase("%lld", "2504359322455446492", "%llu", "2504359322455446492", b'\xb8\xcf\xa8\xce\x9f\xe2\xa2\xc1\x45'),
TestCase("%lld", "3679108774547190895", "%llu", "3679108774547190895", b'\xde\xd1\xc3\xce\x81\xfc\xe8\x8e\x66'),
TestCase("%lld", "1452704646622358274", "%llu", "1452704646622358274", b'\x84\xac\xe1\x97\xbd\xcb\x85\xa9\x28'),
TestCase("%lld", "1846464682573605487", "%llu", "1846464682573605487", b'\xde\xa9\xd5\xf1\x90\xf6\xfa\x9f\x33'),
TestCase("%lld", "4528166100111793966", "%llu", "4528166100111793966", b'\xdc\xfc\x88\x92\xf5\xc4\xa3\xd7\x7d'),
TestCase("%lld", "8393903718445878140", "%llu", "8393903718445878140", b'\xf8\xad\xe0\x8c\xb1\xbd\x91\xfd\xe8\x01'),
TestCase("%lld", "3957962835363152585", "%llu", "3957962835363152585", b'\x92\x8b\xa6\xc0\xd0\x8e\xc1\xed\x6d'),
TestCase("%lld", "3190545832108956470", "%llu", "3190545832108956470", b'\xec\xec\xa8\xa7\xf6\xa1\x8c\xc7\x58'),
TestCase("%lld", "5105279414768576647", "%llu", "5105279414768576647", b'\x8e\xa2\xa9\xc6\x85\xa5\xcc\xd9\x8d\x01'),
TestCase("%lld", "6049173436098818195", "%llu", "6049173436098818195", b'\xa6\xc2\xb1\xb6\x96\xcc\xfd\xf2\xa7\x01'),
TestCase("%lld", "3892265018717256260", "%llu", "3892265018717256260", b'\x88\xe9\x91\xc5\xb2\x9a\x8d\x84\x6c'),
TestCase("%lld", "6832059613091767623", "%llu", "6832059613091767623", b'\x8e\x95\x85\xaa\xa6\x81\xad\xd0\xbd\x01'),
TestCase("%lld", "810303956798710343", "%llu", "810303956798710343", b'\x8e\x89\xa5\x91\xfa\xc9\xe3\xbe\x16'),
TestCase("%lld", "970283311264054945", "%llu", "970283311264054945", b'\xc2\xfa\x91\xb6\xfc\xe1\x91\xf7\x1a'),
TestCase("%lld", "8832180626190956378", "%llu", "8832180626190956378", b'\xb4\xdd\x97\x83\x82\xdf\x9a\x92\xf5\x01'),
TestCase("%lld", "5816722312163363604", "%llu", "5816722312163363604", b'\xa8\xac\xb0\xd9\xfc\x87\x93\xb9\xa1\x01'),
TestCase("%lld", "4851344105826850048", "%llu", "4851344105826850048", b'\x80\xd4\xf4\xef\xd7\xf0\xb7\xd3\x86\x01'),
TestCase("%lld", "7829421709149921671", "%llu", "7829421709149921671", b'\x8e\x86\xe7\xa9\xff\xe3\xd8\xa7\xd9\x01'),
TestCase("%lld", "3885303859151835407", "%llu", "3885303859151835407", b'\x9e\xc4\x98\x93\xca\xd1\xaf\xeb\x6b'),
TestCase("%lld", "7185454812706950393", "%llu", "7185454812706950393", b'\xf2\xb3\xa6\xd0\x9f\xc5\xee\xb7\xc7\x01'),
TestCase("%lld", "4013414114257689954", "%llu", "4013414114257689954", b'\xc4\xf5\xf2\x8d\xef\xb7\xc1\xb2\x6f'),
TestCase("%lld", "964780727032512252", "%llu", "964780727032512252", b'\xf8\xfb\xd3\x8e\xb5\xbd\xcb\xe3\x1a'),
TestCase("%lld", "4207054084101944455", "%llu", "4207054084101944455", b'\x8e\xd2\x85\x9c\xc9\xd9\xba\xe2\x74'),
TestCase("%lld", "3970605724487453205", "%llu", "3970605724487453205", b'\xaa\xa8\xa8\xf3\xd0\xb7\xb6\x9a\x6e'),
TestCase("%lld", "7289505649862167307", "%llu", "7289505649862167307", b'\x96\xac\xe6\x83\x8c\xb1\xc3\xa9\xca\x01'),
TestCase("%lld", "1556249843733915123", "%llu", "1556249843733915123", b'\xe6\x97\xa3\xd8\x99\xbf\xf4\x98\x2b'),
TestCase("%lld", "646757550612212450", "%llu", "646757550612212450", b'\xc4\xab\xd7\xc0\x99\xa4\xdf\xf9\x11'),
TestCase("%lld", "551608669266414637", "%llu", "551608669266414637", b'\xda\xb0\xb4\xaa\xb0\xca\xda\xa7\x0f'),
TestCase("%lld", "5294527771240555016", "%llu", "5294527771240555016", b'\x90\x88\xdf\xa3\x9a\xbd\xf8\xf9\x92\x01'),
TestCase("%lld", "6427334826534330711", "%llu", "6427334826534330711", b'\xae\x85\x9b\xc1\x94\xbe\xbd\xb2\xb2\x01'),
TestCase("%lld", "4061389961487213535", "%llu", "4061389961487213535", b'\xbe\x8f\xc3\xcc\xdb\xa9\xfa\xdc\x70'),
TestCase("%lld", "6681126070454200740", "%llu", "6681126070454200740", b'\xc8\xa6\xb1\x90\xea\xb0\x90\xb8\xb9\x01'),
TestCase("%lld", "7083829078452288754", "%llu", "7083829078452288754", b'\xe4\xf3\xd9\xeb\xfb\xc0\xe8\xce\xc4\x01'),
TestCase("%lld", "4993075148853633222", "%llu", "4993075148853633222", b'\x8c\x83\x83\x84\x97\xd9\xfb\xca\x8a\x01'),
TestCase("%lld", "4002626457632111277", "%llu", "4002626457632111277", b'\xda\xea\xef\xfb\xcd\xe3\x97\x8c\x6f'),
TestCase("%lld", "6319581401334276901", "%llu", "6319581401334276901", b'\xca\x8c\x8f\xbb\xa9\xf3\xd4\xb3\xaf\x01'),
TestCase("%lld", "3705575452837642392", "%llu", "3705575452837642392", b'\xb0\x82\xdc\xac\xb9\xcf\xec\xec\x66'),
TestCase("%lld", "4291800171892412066", "%llu", "4291800171892412066", b'\xc4\xba\xdc\xc9\x8e\xe1\xc4\x8f\x77'),
TestCase("%lld", "6557245727662973594", "%llu", "6557245727662973594", b'\xb4\x8a\xe5\xe4\xeb\x8f\x82\x80\xb6\x01'),
TestCase("%lld", "3849893339411366329", "%llu", "3849893339411366329", b'\xf2\x86\x8e\xec\x86\xe6\xc8\xed\x6a'),
TestCase("%lld", "5454275499512896944", "%llu", "5454275499512896944", b'\xe0\xf6\xa8\xf9\xe6\xaa\xbd\xb1\x97\x01'),
TestCase("%lld", "5265826841850021261", "%llu", "5265826841850021261", b'\x9a\x96\x80\xd3\x9e\xe7\xfc\x93\x92\x01'),
TestCase("%lld", "9044083069173435164", "%llu", "9044083069173435164", b'\xb8\xac\xa8\x93\xc8\xe8\x84\x83\xfb\x01'),
TestCase("%lld", "7588739275664019217", "%llu", "7588739275664019217", b'\xa2\xbc\x92\xb0\xc2\x8a\xcf\xd0\xd2\x01'),
TestCase("%lld", "5076270483973408909", "%llu", "5076270483973408909", b'\x9a\xa2\xc8\xd0\x84\xc7\xc4\xf2\x8c\x01'),
TestCase("%lld", "4196804979465246477", "%llu", "4196804979465246477", b'\x9a\xdc\xee\x89\x95\xf9\x85\xbe\x74'),
TestCase("%lld", "6514086955327654755", "%llu", "6514086955327654755", b'\xc6\xad\xfc\x84\xd4\xe4\xd7\xe6\xb4\x01'),
TestCase("%lld", "9208944818170478756", "%llu", "9208944818170478756", b'\xc8\x82\xce\xb3\xac\xa1\xdf\xcc\xff\x01'),
TestCase("%lld", "4628058100229254151", "%llu", "4628058100229254151", b'\x8e\xb0\xc5\x80\xcb\x94\x95\xba\x80\x01'),
TestCase("%lld", "5505985599159795437", "%llu", "5505985599159795437", b'\xda\xfb\xaf\x85\xe0\xae\x98\xe9\x98\x01'),
TestCase("%lld", "1076793340331741575", "%llu", "1076793340331741575", b'\x8e\xc6\xd6\xaf\xd0\xf5\xc4\xf1\x1d'),
TestCase("%lld", "8835790874608329711", "%llu", "8835790874608329711", b'\xde\x8f\xd7\xea\x90\xbf\x84\x9f\xf5\x01'),
TestCase("%lld", "5264779051526567427", "%llu", "5264779051526567427", b'\x86\xd8\xc5\xb2\xe8\xa9\xa0\x90\x92\x01'),
TestCase("%lld", "3825505252128459194", "%llu", "3825505252128459194", b'\xf4\xa6\x90\xf8\xc4\xb0\xf6\x96\x6a'),
TestCase("%lld", "6197432947465793532", "%llu", "6197432947465793532", b'\xf8\xbf\x81\x90\xc5\x9b\xda\x81\xac\x01'),
TestCase("%lld", "6345326312201569781", "%llu", "6345326312201569781", b'\xea\x97\xb6\xeb\xae\xaa\x90\x8f\xb0\x01'),
TestCase("%lld", "1939578830432974807", "%llu", "1939578830432974807", b'\xae\xdf\x99\x9d\xf0\xaa\xe2\xea\x35'),
TestCase("%lld", "2091703771056304968", "%llu", "2091703771056304968", b'\x90\xcd\xbf\x92\xeb\xdf\x9c\x87\x3a'),
TestCase("%lld", "4252410814844357301", "%llu", "4252410814844357301", b'\xea\xaa\x9e\x9d\xe3\xc6\xcc\x83\x76'),
TestCase("%lld", "8660402439522563566", "%llu", "8660402439522563566", b'\xdc\xd7\xd9\xba\xc9\x88\xf7\xaf\xf0\x01'),
TestCase("%lld", "4095317955084962012", "%llu", "4095317955084962012", b'\xb8\xa3\xf2\xb1\xee\xfe\xbe\xd5\x71'),
TestCase("%lld", "3854481529221205087", "%llu", "3854481529221205087", b'\xbe\xb1\xc6\xe8\xec\xa1\xef\xfd\x6a'),
TestCase("%lld", "8433702361086030159", "%llu", "8433702361086030159", b'\x9e\xc5\xbf\xde\xa3\xe7\xc3\x8a\xea\x01'),
TestCase("%lld", "9155414173781516949", "%llu", "9155414173781516949", b'\xaa\x8a\x97\xfd\xdf\xab\xc8\x8e\xfe\x01'),
TestCase("%lld", "5127196966915280688", "%llu", "5127196966915280688", b'\xe0\xbc\x90\xa7\xbe\x9e\xbb\xa7\x8e\x01'),
TestCase("%lld", "4492265357832577542", "%llu", "4492265357832577542", b'\x8c\x88\xbb\xa6\xd7\xe2\xdd\xd7\x7c'),
TestCase("%lld", "8259453203008866922", "%llu", "8259453203008866922", b'\xd4\xa9\xf2\xc4\xaf\xbb\xbc\x9f\xe5\x01'),
TestCase("%lld", "5064367472631091289", "%llu", "5064367472631091289", b'\xb2\xc1\xc0\xa3\xcb\xd8\x9f\xc8\x8c\x01'),
TestCase("%lld", "8275937406817640763", "%llu", "8275937406817640763", b'\xf6\x84\xdd\xcb\xa8\xce\x84\xda\xe5\x01'),
TestCase("%lld", "1904310933731893847", "%llu", "1904310933731893847", b'\xae\x89\xdb\xaf\x8d\xad\xbc\xed\x34'),
TestCase("%lld", "997754361730893686", "%llu", "997754361730893686", b'\xec\x9d\x88\x81\xc8\x93\xde\xd8\x1b'),
TestCase("%lld", "4328168087819780921", "%llu", "4328168087819780921", b'\xf2\x8c\xf0\xaa\xb7\xfc\xde\x90\x78'),
TestCase("%lld", "256781249510239018", "%llu", "256781249510239018", b'\xd4\xac\xcf\xa0\xf3\xcb\xa2\x90\x07'),
TestCase("%lld", "7784993871819474513", "%llu", "7784993871819474513", b'\xa2\x99\xa4\xc6\xc0\xab\xed\x89\xd8\x01'),
TestCase("%lld", "2332871340892345868", "%llu", "2332871340892345868", b'\x98\xd8\x9e\xc9\xfb\x87\x83\xe0\x40'),
TestCase("%lld", "4894959346005630664", "%llu", "4894959346005630664", b'\x90\xfb\xa6\x8a\xe6\xe5\xb1\xee\x87\x01'),
TestCase("%lld", "1987972021100915124", "%llu", "1987972021100915124", b'\xe8\xa6\x95\xd2\xa7\x81\xd9\x96\x37'),
TestCase("%lld", "3114100465793448092", "%llu", "3114100465793448092", b'\xb8\xe2\xf9\xa7\xfb\xf7\xc0\xb7\x56'),
TestCase("%lld", "5784824274936856659", "%llu", "5784824274936856659", b'\xa6\x81\xd8\xba\xeb\xc1\xe9\xc7\xa0\x01'),
TestCase("%lld", "3207654208325833422", "%llu", "3207654208325833422", b'\x9c\xcb\xe2\x98\xbe\xa0\xf0\x83\x59'),
TestCase("%lld", "1164916386415315063", "%llu", "1164916386415315063", b'\xee\xa1\x88\xd5\x81\xd2\xce\xaa\x20'),
TestCase("%lld", "293049028994436992", "%llu", "293049028994436992", b'\x80\xbe\xe4\xaf\xc1\xa2\x8f\x91\x08'),
TestCase("%lld", "3140932642079254647", "%llu", "3140932642079254647", b'\xee\xa1\x81\xa9\x97\xe6\xea\x96\x57'),
TestCase("%lld", "1847278515897189565", "%llu", "1847278515897189565", b'\xfa\x92\x9a\xd4\xbb\x81\xed\xa2\x33'),
TestCase("%lld", "7940449326902609449", "%llu", "7940449326902609449", b'\xd2\x98\xa8\xf0\xf5\xa5\x92\xb2\xdc\x01'),
TestCase("%lld", "4324626723061920101", "%llu", "4324626723061920101", b'\xca\xc5\xa3\xe4\xef\xc5\x94\x84\x78'),
TestCase("%lld", "5240496025593009868", "%llu", "5240496025593009868", b'\x98\xdb\x8a\xc5\xd6\xd7\xfd\xb9\x91\x01'),
TestCase("%lld", "483285195300941883", "%llu", "483285195300941883", b'\xf6\xc0\xf1\xf1\xe2\xd4\xfc\xb4\x0d'),
TestCase("%lld", "5038839083535780307", "%llu", "5038839083535780307", b'\xa6\xa7\x8a\xe8\xe2\xdc\xc6\xed\x8b\x01'),
TestCase("%lld", "3649778670280906901", "%llu", "3649778670280906901", b'\xaa\xe2\xa0\xee\x9f\x97\xcf\xa6\x65'),
TestCase("%lld", "3630797309549363234", "%llu", "3630797309549363234", b'\xc4\x80\x92\xf2\xd1\xba\x97\xe3\x64'),
TestCase("%lld", "8062002663843236945", "%llu", "8062002663843236945", b'\xa2\xb1\x88\xca\xab\xad\xfe\xe1\xdf\x01'),
TestCase("%lld", "3467724524658884800", "%llu", "3467724524658884800", b'\x80\x83\xa0\xf3\xa2\xc5\xea\x9f\x60'),
TestCase("%lld", "5254956975956143854", "%llu", "5254956975956143854", b'\xdc\xbb\x9d\xdd\xe2\xe1\xad\xed\x91\x01'),
TestCase("%lld", "7712429266319135356", "%llu", "7712429266319135356", b'\xf8\xc9\xba\xe4\xc6\xe3\x86\x88\xd6\x01'),
TestCase("%lld", "5229125731492990833", "%llu", "5229125731492990833", b'\xe2\xbd\xf4\xf7\xb9\x89\xcb\x91\x91\x01'),
TestCase("%lld", "3291981441856444913", "%llu", "3291981441856444913", b'\xe2\xe7\xc0\x90\xc0\xeb\xbb\xaf\x5b'),
TestCase("%lld", "7968602228742132523", "%llu", "7968602228742132523", b'\xd6\xcc\xfc\x88\xbe\xe0\x94\x96\xdd\x01'),
TestCase("%lld", "4919847686728209916", "%llu", "4919847686728209916", b'\xf8\xd7\xb2\xc7\xf2\xd9\xe7\xc6\x88\x01'),
TestCase("%lld", "3071319170242969136", "%llu", "3071319170242969136", b'\xe0\xf8\xef\xe2\xe8\xa0\xc2\x9f\x55'),
TestCase("%lld", "6001314382948090489", "%llu", "6001314382948090489", b'\xf2\x89\x82\xd1\xd1\xe8\xf9\xc8\xa6\x01'),
TestCase("%lld", "5477548339997458345", "%llu", "5477548339997458345", b'\xd2\xfe\xa1\xd9\xb4\xcc\x94\x84\x98\x01'),
TestCase("%lld", "3119268858057174477", "%llu", "3119268858057174477", b'\x9a\xb7\xfd\xb6\xfe\x9f\xef\xc9\x56'),
TestCase("%lld", "2972175343159318480", "%llu", "2972175343159318480", b'\xa0\xdf\xfc\xb2\xc6\xee\xa4\xbf\x52'),
TestCase("%lld", "3141952960809904282", "%llu", "3141952960809904282", b'\xb4\xa2\xfd\xa0\xc6\xe4\xba\x9a\x57'),
TestCase("%lld", "7404358508754117308", "%llu", "7404358508754117308", b'\xf8\x8a\xf1\xfe\xad\xb5\xc8\xc1\xcd\x01'),
TestCase("%lld", "3962329461475475834", "%llu", "3962329461475475834", b'\xf4\x85\xfc\xa4\xdc\xe9\x82\xfd\x6d'),
TestCase("%lld", "8646072927884668865", "%llu", "8646072927884668865", b'\x82\xbf\xff\x8a\x9c\xe1\x82\xfd\xef\x01'),
TestCase("%lld", "6705183005166907218", "%llu", "6705183005166907218", b'\xa4\xbd\xad\x8f\xdd\x9a\xcc\x8d\xba\x01'),
TestCase("%lld", "8724568879186548965", "%llu", "8724568879186548965", b'\xca\xe3\xbc\xe5\xf7\xca\xf2\x93\xf2\x01'),
TestCase("%lld", "5275577307833715720", "%llu", "5275577307833715720", b'\x90\xb0\xd2\xa8\x87\xe7\xce\xb6\x92\x01'),
TestCase("%lld", "6278774444907314544", "%llu", "6278774444907314544", b'\xe0\xf5\x81\xd8\xeb\x85\xd8\xa2\xae\x01'),
TestCase("%lld", "4999233507689781945", "%llu", "4999233507689781945", b'\xf2\xea\xa2\xf1\xeb\x98\xec\xe0\x8a\x01'),
TestCase("%lld", "4257240410533938703", "%llu", "4257240410533938703", b'\x9e\x98\x82\x95\x9f\xe6\xe0\x94\x76'),
TestCase("%lld", "2788213596089450528", "%llu", "2788213596089450528", b'\xc0\x80\x9c\x8d\xc7\xdf\xdc\xb1\x4d'),
TestCase("%lld", "7141567845119971606", "%llu", "7141567845119971606", b'\xac\xc4\xd2\xbb\xc2\x87\xf9\x9b\xc6\x01'),
TestCase("%lld", "1507235571856201971", "%llu", "1507235571856201971", b'\xe6\xe3\x92\xd5\x8a\xb1\xe3\xea\x29'),
TestCase("%lld", "2967582888677845820", "%llu", "2967582888677845820", b'\xf8\xac\xdd\x92\xc2\xba\xfc\xae\x52'),
TestCase("%lld", "8120818212305491728", "%llu", "8120818212305491728", b'\xa0\xdc\xee\xdf\xeb\xc8\xf8\xb2\xe1\x01'),
TestCase("%lld", "8554950908976020523", "%llu", "8554950908976020523", b'\xd6\xf0\xdd\x86\xd2\xa1\xa5\xb9\xed\x01'),
TestCase("%lld", "850107129610567275", "%llu", "850107129610567275", b'\xd6\xf9\xb7\x97\xc5\xfb\x97\xcc\x17'),
TestCase("%lld", "3548380829014863866", "%llu", "3548380829014863866", b'\xf4\xbf\xe5\x93\x8b\xe4\xb0\xbe\x62'),
TestCase("%lld", "3619717899166040237", "%llu", "3619717899166040237", b'\xda\x82\xd2\xee\x89\x90\xe9\xbb\x64'),
TestCase("%lld", "25117409533303638", "%llu", "25117409533303638", b'\xac\xed\xc8\x8e\xd4\x89\x9e\x59'),
TestCase("%lld", "4766478454387430761", "%llu", "4766478454387430761", b'\xd2\xd5\x86\xf5\xcf\xb9\xf7\xa5\x84\x01'),
TestCase("%lld", "4030046377721652704", "%llu", "4030046377721652704", b'\xc0\x97\x97\xc7\x82\xf5\xcc\xed\x6f'),
TestCase("%lld", "7278057998974406311", "%llu", "7278057998974406311", b'\xce\xba\xfa\xb8\x8e\xcc\xed\x80\xca\x01'),
TestCase("%lld", "8751771536062737093", "%llu", "8751771536062737093", b'\x8a\xab\xa7\xa6\xfb\xf5\xc4\xf4\xf2\x01'),
TestCase("%lld", "3273441488341945355", "%llu", "3273441488341945355", b'\x96\xb0\xae\x9a\x96\xec\xcc\xed\x5a'),
TestCase("%lld", "5220278114967040707", "%llu", "5220278114967040707", b'\x86\xcb\xd9\xf5\xb1\xd2\x93\xf2\x90\x01'),
TestCase("%lld", "1352148195246416250", "%llu", "1352148195246416250", b'\xf4\x85\xc9\xd5\xd3\xe7\xe5\xc3\x25'),
TestCase("%lld", "5133499936442391273", "%llu", "5133499936442391273", b'\xd2\xeb\x9c\xe2\xcc\xbf\xed\xbd\x8e\x01'),
TestCase("%lld", "1676322249364352341", "%llu", "1676322249364352341", b'\xaa\xb5\x91\xa7\x89\x8d\xbf\xc3\x2e'),
TestCase("%lld", "5174306005887408729", "%llu", "5174306005887408729", b'\xb2\xe9\xb6\x81\xba\xf9\xe9\xce\x8f\x01'),
TestCase("%lld", "2333671424671038513", "%llu", "2333671424671038513", b'\xe2\xf0\xf9\x9f\xfc\xf2\xee\xe2\x40'),
TestCase("%lld", "6396005668587144321", "%llu", "6396005668587144321", b'\x82\x92\xac\x98\x94\xd1\x96\xc3\xb1\x01'),
TestCase("%lld", "4281900075145433102", "%llu", "4281900075145433102", b'\x9c\xc0\x98\xec\xd1\xdb\xae\xec\x76'),
TestCase("%lld", "8097189911969434437", "%llu", "8097189911969434437", b'\x8a\xad\x84\xdd\xdf\xd4\xff\xde\xe0\x01'),
TestCase("%lld", "1034989118514460270", "%llu", "1034989118514460270", b'\xdc\xd9\x97\xb7\xd4\xc7\x82\xdd\x1c'),
TestCase("%lld", "2879184457747193418", "%llu", "2879184457747193418", b'\x94\xf9\xc6\xed\xcf\xc0\xf5\xf4\x4f'),
TestCase("%lld", "2474224803315291647", "%llu", "2474224803315291647", b'\xfe\xd7\x8c\x81\xb0\x96\x9b\xd6\x44'),
TestCase("%lld", "3663174277129677254", "%llu", "3663174277129677254", b'\x8c\xa7\xcd\xaa\x98\xe6\x9a\xd6\x65'),
TestCase("%lld", "6086297047179889204", "%llu", "6086297047179889204", b'\xe8\xa8\xd4\xea\xde\xba\xef\xf6\xa8\x01'),
TestCase("%lld", "3403521624041286389", "%llu", "3403521624041286389", b'\xea\xab\xbb\xa5\xcd\xb8\xde\xbb\x5e'),
TestCase("%lld", "4129732865765686804", "%llu", "4129732865765686804", b'\xa8\xf8\xc1\x93\xa8\x8a\xe1\xcf\x72'),
TestCase("%lld", "8456228405596121943", "%llu", "8456228405596121943", b'\xae\xad\xff\xf1\xd1\xbb\xc7\xda\xea\x01'),
TestCase("%lld", "8297459921109698914", "%llu", "8297459921109698914", b'\xc4\xa5\xc6\xfc\xc3\xf5\xbf\xa6\xe6\x01'),
TestCase("%lld", "2758981765762549667", "%llu", "2758981765762549667", b'\xc6\x9e\xf4\xa0\x8b\xd3\xef\xc9\x4c'),
TestCase("%lld", "8848352886883606505", "%llu", "8848352886883606505", b'\xd2\xff\xfe\xdf\xbd\x84\xd5\xcb\xf5\x01'),
TestCase("%lld", "1195805645371054808", "%llu", "1195805645371054808", b'\xb0\xeb\xfc\x8b\xc3\xb9\xad\x98\x21'),
TestCase("%lld", "639367729021931858", "%llu", "639367729021931858", b'\xa4\xc5\x9a\x93\xfc\xe3\xbe\xdf\x11'),
TestCase("%lld", "2232000679497729109", "%llu", "2232000679497729109", b'\xaa\x91\xa4\xfe\xda\xb2\xd4\xf9\x3d'),
TestCase("%lld", "4168177859746898377", "%llu", "4168177859746898377", b'\x92\x87\xe5\xad\xbe\xeb\xab\xd8\x73'),
TestCase("%lld", "1260186573202255124", "%llu", "1260186573202255124", b'\xa8\xb4\xff\xe6\xde\xc0\x8a\xfd\x22'),
TestCase("%lld", "8933020158994285890", "%llu", "8933020158994285890", b'\x84\x95\x90\xc4\xac\xa0\xbb\xf8\xf7\x01'),
TestCase("%lld", "7418694076181766474", "%llu", "7418694076181766474", b'\x94\x85\xdf\xc1\x9a\xbd\xbf\xf4\xcd\x01'),
TestCase("%lld", "2904831533300168615", "%llu", "2904831533300168615", b'\xce\xde\xad\xab\xf3\xb8\x84\xd0\x50'),
TestCase("%lld", "7673041265242461202", "%llu", "7673041265242461202", b'\xa4\xd0\x86\x9b\x92\x98\x8f\xfc\xd4\x01'),
TestCase("%lld", "625118648746706096", "%llu", "625118648746706096", b'\xe0\x92\xa8\x90\xab\x86\xef\xac\x11'),
TestCase("%lld", "7640289034141395187", "%llu", "7640289034141395187", b'\xe6\xa3\xfb\xd4\xb0\x99\xe1\x87\xd4\x01'),
TestCase("%lld", "3317249430279903162", "%llu", "3317249430279903162", b'\xf4\xde\x9a\xb3\x80\xb2\x9e\x89\x5c'),
TestCase("%lld", "3172349440293538054", "%llu", "3172349440293538054", b'\x8c\xa4\xd8\xc1\xc2\xc0\xb9\x86\x58'),
TestCase("%lld", "2529759202900350655", "%llu", "2529759202900350655", b'\xfe\xda\xb4\x82\xf0\xa5\xc1\x9b\x46'),
TestCase("%lld", "7039166187898074754", "%llu", "7039166187898074754", b'\x84\xda\xd7\x89\xca\x96\x92\xb0\xc3\x01'),
TestCase("%lld", "4162847733300040370", "%llu", "4162847733300040370", b'\xe4\xca\x9c\xd6\xa5\xfd\xb3\xc5\x73'),
TestCase("%lld", "2754081621805980671", "%llu", "2754081621805980671", b'\xfe\xef\xea\xe2\x95\xa9\xbb\xb8\x4c'),
TestCase("%lld", "8048952107112912959", "%llu", "8048952107112912959", b'\xfe\xe0\xc6\xe9\xfa\xd2\xcf\xb3\xdf\x01'),
TestCase("%lld", "6063152674026149391", "%llu", "6063152674026149391", b'\x9e\xd8\xce\xa4\xf5\xce\xd2\xa4\xa8\x01'),
TestCase("%lld", "1860779983819210237", "%llu", "1860779983819210237", b'\xfa\xf7\x9b\xcb\xaa\xe2\xe8\xd2\x33'),
TestCase("%lld", "5403475014208127092", "%llu", "5403475014208127092", b'\xe8\x81\x98\xe9\xb0\xf9\xff\xfc\x95\x01'),
TestCase("%lld", "133586295505940516", "%llu", "133586295505940516", b'\xc8\xc0\xef\xa7\xe5\x81\xcc\xda\x03'),
TestCase("%lld", "5951209029639904448", "%llu", "5951209029639904448", b'\x80\xf3\xc4\xbc\x9c\xc5\xf8\x96\xa5\x01'),
TestCase("%lld", "476590412526583632", "%llu", "476590412526583632", b'\xa0\xfd\x87\xa0\x90\x9d\x98\x9d\x0d'),
TestCase("%lld", "6125277199963519765", "%llu", "6125277199963519765", b'\xaa\xec\xff\xe9\xa0\xca\xad\x81\xaa\x01'),
TestCase("%lld", "7182329075191030773", "%llu", "7182329075191030773", b'\xea\x8f\xc5\xab\xb0\x8f\xe1\xac\xc7\x01'),
TestCase("%lld", "3739073677431428339", "%llu", "3739073677431428339", b'\xe6\xd3\x82\xc5\xdf\xec\xed\xe3\x67'),
TestCase("%lld", "6781911602451840052", "%llu", "6781911602451840052", b'\xe8\xf0\xef\xa3\xf3\xaa\x98\x9e\xbc\x01'),
TestCase("%lld", "5097852782557067317", "%llu", "5097852782557067317", b'\xea\xe0\xe7\xd8\x93\x86\x9b\xbf\x8d\x01'),
TestCase("%lld", "2755779697069684711", "%llu", "2755779697069684711", b'\xce\xdf\x93\xb1\x94\xc2\xbf\xbe\x4c'),
TestCase("%lld", "4587140119625129692", "%llu", "4587140119625129692", b'\xb8\xfb\x96\xd3\xd2\xe8\xe5\xa8\x7f'),
TestCase("%lld", "7605101363071432517", "%llu", "7605101363071432517", b'\x8a\xdd\xb1\xab\xad\xd9\xdf\x8a\xd3\x01'),
TestCase("%lld", "785644280652604147", "%llu", "785644280652604147", b'\xe6\x8b\xed\xc1\xf1\xd3\x95\xe7\x15'),
TestCase("%lld", "8440954818933111077", "%llu", "8440954818933111077", b'\xca\xe4\x89\xba\xf1\xeb\xa5\xa4\xea\x01'),
TestCase("%lld", "3478923299848040400", "%llu", "3478923299848040400", b'\xa0\xbf\xad\x84\xe4\x93\xcf\xc7\x60'),
TestCase("%lld", "177390365453428882", "%llu", "177390365453428882", b'\xa4\xa2\xed\xf6\x9e\xe6\x9b\xf6\x04'),
TestCase("%lld", "2241679290640917987", "%llu", "2241679290640917987", b'\xc6\x97\x83\xb0\x83\xdc\x85\x9c\x3e'),
TestCase("%lld", "2690515256289614444", "%llu", "2690515256289614444", b'\xd8\xe9\xca\x9e\xdc\xd7\xd0\xd6\x4a'),
TestCase("%lld", "5284047940288483819", "%llu", "5284047940288483819", b'\xd6\xc7\xbc\x90\xe1\xe6\xda\xd4\x92\x01'),
TestCase("%lld", "7345613454774364586", "%llu", "7345613454774364586", b'\xd4\xa6\xbf\xd2\x96\xa1\xee\xf0\xcb\x01'),
TestCase("%lld", "7027616933390126935", "%llu", "7027616933390126935", b'\xae\xbd\xe8\xc3\xbe\x97\x8e\x87\xc3\x01'),
TestCase("%lld", "6370586723714568954", "%llu", "6370586723714568954", b'\xf4\xcb\x9c\xdd\xea\xb7\xef\xe8\xb0\x01'),
TestCase("%lld", "5815295050302678849", "%llu", "5815295050302678849", b'\x82\x9d\x87\x96\xb3\x82\x8a\xb4\xa1\x01'),
TestCase("%lld", "731720363738568228", "%llu", "731720363738568228", b'\xc8\xd8\xf4\xb8\xe8\xf2\xcb\xa7\x14'),
TestCase("%lld", "7895064303389261530", "%llu", "7895064303389261530", b'\xb4\xfb\x91\xa6\xee\xc9\xf3\x90\xdb\x01'),
TestCase("%lld", "9161537274294991160", "%llu", "9161537274294991160", b'\xf0\xe4\xd3\xed\x8d\xe7\xa8\xa4\xfe\x01'),
TestCase("%lld", "5626051873332343381", "%llu", "5626051873332343381", b'\xaa\xc9\xa9\xde\xdc\x97\xe0\x93\x9c\x01'),
TestCase("%lld", "1558715097695343451", "%llu", "1558715097695343451", b'\xb6\xcd\xda\x82\xef\xc7\xd5\xa1\x2b'),
TestCase("%lld", "418389641884993571", "%llu", "418389641884993571", b'\xc6\xa0\x90\xe4\xb3\xca\xb5\xce\x0b'),
TestCase("%lld", "366808135709449019", "%llu", "366808135709449019", b'\xf6\xec\xfa\xda\xca\x83\x95\x97\x0a'),
TestCase("%lld", "7559429297343079575", "%llu", "7559429297343079575", b'\xae\x92\x85\xcd\x9e\xb9\xbe\xe8\xd1\x01'),
TestCase("%lld", "891656539731055874", "%llu", "891656539731055874", b'\x84\xd4\x96\x85\xc2\xb9\xe6\xdf\x18'),
TestCase("%lld", "3187530423573642791", "%llu", "3187530423573642791", b'\xce\xf8\xdb\xfd\x85\x82\xb1\xbc\x58'),
TestCase("%lld", "3732114429930137548", "%llu", "3732114429930137548", b'\x98\x9f\xc3\x91\x9d\x93\x91\xcb\x67'),
TestCase("%lld", "4317425874089886561", "%llu", "4317425874089886561", b'\xc2\x8d\xaa\x93\xa6\xfd\xc9\xea\x77'),
TestCase("%lld", "8113837181842537067", "%llu", "8113837181842537067", b'\xd6\xe9\xa5\xd1\xb1\xfb\x91\x9a\xe1\x01'),
TestCase("%lld", "4647576880061632962", "%llu", "4647576880061632962", b'\x84\xc7\xa2\xa6\x8d\xa3\xc1\xff\x80\x01'),
TestCase("%lld", "2770024080011047550", "%llu", "2770024080011047550", b'\xfc\xc9\xb1\xc5\xaf\x8e\x8d\xf1\x4c'),
TestCase("%lld", "5715833275239865339", "%llu", "5715833275239865339", b'\xf6\xef\xbc\xe0\x8f\x85\xdc\xd2\x9e\x01'),
TestCase("%lld", "4697198541546045125", "%llu", "4697198541546045125", b'\x8a\xfb\xad\xc5\xf9\xcb\xe6\xaf\x82\x01'),
TestCase("%lld", "9140962295727161515", "%llu", "9140962295727161515", b'\xd6\x82\xf4\xe0\xdd\xb1\x9c\xdb\xfd\x01'),
TestCase("%lld", "1018100739973888361", "%llu", "1018100739973888361", b'\xd2\xe5\xa5\xfb\xd2\xce\x82\xa1\x1c'),
TestCase("%lld", "2450943428072886064", "%llu", "2450943428072886064", b'\xe0\xbc\xe6\xad\xfd\x83\xc0\x83\x44'),
TestCase("%lld", "4859753067646279323", "%llu", "4859753067646279323", b'\xb6\xfa\xde\xd2\xd7\xea\xa7\xf1\x86\x01'),
TestCase("%lld", "2904532547632894569", "%llu", "2904532547632894569", b'\xd2\xc9\xc0\xc3\xd2\xbd\xfc\xce\x50'),
TestCase("%lld", "549670438443165922", "%llu", "549670438443165922", b'\xc4\xa3\x81\xaf\xbf\x96\xe9\xa0\x0f'),
TestCase("%lld", "569815776002665926", "%llu", "569815776002665926", b'\x8c\xb7\xeb\xc0\xbc\x9b\xb2\xe8\x0f'),
TestCase("%lld", "3444356383434812300", "%llu", "3444356383434812300", b'\x98\xae\xd9\xa7\xb7\xf8\xe7\xcc\x5f'),
TestCase("%lld", "2151972984861854191", "%llu", "2151972984861854191", b'\xde\xa7\xec\x8e\xe6\x81\xac\xdd\x3b'),
TestCase("%lld", "2011546512680833085", "%llu", "2011546512680833085", b'\xfa\xc0\xa2\x98\xa9\xb9\xb9\xea\x37'),
TestCase("%lld", "4628394148228357534", "%llu", "4628394148228357534", b'\xbc\xf6\xae\xda\x93\xfd\xad\xbb\x80\x01'),
TestCase("%lld", "4692262078416922470", "%llu", "4692262078416922470", b'\xcc\x9d\x9d\x91\xfd\xdf\xa1\x9e\x82\x01'),
TestCase("%lld", "7858502056959645817", "%llu", "7858502056959645817", b'\xf2\xe1\x8c\xbc\x82\xff\x80\x8f\xda\x01'),
TestCase("%lld", "4919691286333696629", "%llu", "4919691286333696629", b'\xea\xa9\x89\xe8\x98\xca\xa0\xc6\x88\x01'),
TestCase("%lld", "5678520073874798535", "%llu", "5678520073874798535", b'\x8e\xdf\xdb\xd3\xf9\xfa\x93\xce\x9d\x01'),
TestCase("%lld", "1241746909443220722", "%llu", "1241746909443220722", b'\xe4\x93\xeb\xe4\x85\x8f\xc9\xbb\x22'),
TestCase("%lld", "5292137023426454572", "%llu", "5292137023426454572", b'\xd8\x90\xb7\x80\xaf\xa5\xb9\xf1\x92\x01'),
TestCase("%lld", "1941514050836526867", "%llu", "1941514050836526867", b'\xa6\xdc\xd3\xe8\xc3\xaf\xd2\xf1\x35'),
TestCase("%lld", "9145606885382902500", "%llu", "9145606885382902500", b'\xc8\xcb\xea\xa9\xb7\xc0\xdc\xeb\xfd\x01'),
TestCase("%lld", "3509957387132194637", "%llu", "3509957387132194637", b'\x9a\xbd\xae\xcc\xb4\xe9\xef\xb5\x61'),
TestCase("%lld", "8233948220616670992", "%llu", "8233948220616670992", b'\xa0\xfc\x87\xcd\x80\x92\xee\xc4\xe4\x01'),
TestCase("%lld", "8024983545482782384", "%llu", "8024983545482782384", b'\xe0\x9a\xd9\xcd\x86\x81\xbc\xde\xde\x01'),
TestCase("%lld", "6571000011597423770", "%llu", "6571000011597423770", b'\xb4\x92\xd1\xe5\xc4\xec\xf0\xb0\xb6\x01'),
TestCase("%lld", "5058360797369425151", "%llu", "5058360797369425151", b'\xfe\xf3\xba\x8f\x89\x96\xf4\xb2\x8c\x01'),
TestCase("%lld", "4606483085449113835", "%llu", "4606483085449113835", b'\xd6\xc3\xd1\xc0\xb8\xfd\xc1\xed\x7f'),
TestCase("%lld", "6529118911438932678", "%llu", "6529118911438932678", b'\x8c\xab\xd2\xc9\xd4\xc3\x8b\x9c\xb5\x01'),
TestCase("%lld", "4203154114144238442", "%llu", "4203154114144238442", b'\xd4\xed\xcf\xdc\xb8\x99\xcd\xd4\x74'),
TestCase("%lld", "4463425652718897265", "%llu", "4463425652718897265", b'\xe2\xa1\xe8\xfa\xf3\xfe\xa2\xf1\x7b'),
TestCase("%lld", "75152304545876858", "%llu", "75152304545876858", b'\xf4\xad\x92\x88\xee\xa7\xff\x8a\x02'),
TestCase("%lld", "5434900075521908661", "%llu", "5434900075521908661", b'\xea\xfe\xd0\xf3\xd8\xb4\xd2\xec\x96\x01'),
TestCase("%lld", "5308383100912368033", "%llu", "5308383100912368033", b'\xc2\xe6\x8b\xd9\xc4\x93\x95\xab\x93\x01'),
TestCase("%lld", "715267470600062067", "%llu", "715267470600062067", b'\xe6\x91\x92\x88\xb2\xfe\x91\xed\x13'),
TestCase("%lld", "5171700275229723650", "%llu", "5171700275229723650", b'\x84\xb0\xdc\xdd\xfb\xff\xc8\xc5\x8f\x01'),
TestCase("%lld", "3926011308434788247", "%llu", "3926011308434788247", b'\xae\xbe\xe0\xf6\xfd\x9e\xff\xfb\x6c'),
TestCase("%lld", "5440336360732713747", "%llu", "5440336360732713747", b'\xa6\x8c\xeb\x81\x92\xc6\xfa\xff\x96\x01'),
TestCase("%lld", "1478056893002169192", "%llu", "1478056893002169192", b'\xd0\xed\xb1\x93\xb8\xba\x8e\x83\x29'),
TestCase("%lld", "3160377536621687761", "%llu", "3160377536621687761", b'\xa2\xcf\xad\xa7\x81\xa8\xf5\xdb\x57'),
TestCase("%lld", "7128491551588143718", "%llu", "7128491551588143718", b'\xcc\xc9\xc6\xcc\x87\xd3\xbe\xed\xc5\x01'),
TestCase("%lld", "7376169372313052441", "%llu", "7376169372313052441", b'\xb2\x94\xaf\xfd\xd4\xbd\xb5\xdd\xcc\x01'),
TestCase("%lld", "193231861624509923", "%llu", "193231861624509923", b'\xc6\xd7\xd4\xf6\xd6\xd6\xbf\xae\x05'),
TestCase("%lld", "1955429981000213095", "%llu", "1955429981000213095", b'\xce\x89\xd5\x8a\xa3\xcd\x8a\xa3\x36'),
TestCase("%lld", "4888125773563526975", "%llu", "4888125773563526975", b'\xfe\xfc\xfb\xea\xc3\x9f\x8e\xd6\x87\x01'),
TestCase("%lld", "5921662978695331131", "%llu", "5921662978695331131", b'\xf6\xf4\xbb\xcb\xda\xc6\xfc\xad\xa4\x01'),
TestCase("%lld", "7673779374634366645", "%llu", "7673779374634366645", b'\xea\xda\xe7\xdc\xe1\xeb\xde\xfe\xd4\x01'),
TestCase("%lld", "48609148367913892", "%llu", "48609148367913892", b'\xc8\x8e\xee\xd4\xe9\xf0\xd8\xac\x01'),
TestCase("%lld", "5854341954344571365", "%llu", "5854341954344571365", b'\xca\xc7\xfe\xe5\xac\xbf\xe6\xbe\xa2\x01'),
TestCase("%lld", "4673618806014082273", "%llu", "4673618806014082273", b'\xc2\xf3\xef\xc0\xd9\xe2\x83\xdc\x81\x01'),
TestCase("%lld", "2326184191199164007", "%llu", "2326184191199164007", b'\xce\xd9\xf1\xe8\xcf\x8c\xa2\xc8\x40'),
TestCase("%lld", "3495015264127128735", "%llu", "3495015264127128735", b'\xbe\xd2\xec\xed\xb0\xf7\xe4\x80\x61'),
TestCase("%lld", "1424330851786829530", "%llu", "1424330851786829530", b'\xb4\xbb\x91\xf6\x9f\xd7\x9e\xc4\x27'),
TestCase("%lld", "5191701707746974065", "%llu", "5191701707746974065", b'\xe2\xe5\xe0\xe0\xc8\xcc\xd0\x8c\x90\x01'),
TestCase("%lld", "6389735809259880362", "%llu", "6389735809259880362", b'\xd4\xfe\xb9\xf8\xa7\xb7\xf3\xac\xb1\x01'),
TestCase("%lld", "7792983928750025393", "%llu", "7792983928750025393", b'\xe2\xaa\xc9\xd7\x83\xe6\x9e\xa6\xd8\x01'),
TestCase("%lld", "4564825427452770815", "%llu", "4564825427452770815", b'\xfe\xe7\xf1\x8f\xce\xa2\xc2\xd9\x7e'),
TestCase("%lld", "943049921933903574", "%llu", "943049921933903574", b'\xac\x9b\xa4\xa5\x8a\xba\xb1\x96\x1a'),
TestCase("%lld", "1621021906259841134", "%llu", "1621021906259841134", b'\xdc\xc1\xf4\xfb\xb9\xb5\x83\xff\x2c'),
TestCase("%lld", "7630179381739069820", "%llu", "7630179381739069820", b'\xf8\x85\x89\xd1\x94\xee\xeb\xe3\xd3\x01'),
TestCase("%lld", "8025284571884195522", "%llu", "8025284571884195522", b'\x84\xbb\xa4\x89\x8c\xf3\xc4\xdf\xde\x01'),
TestCase("%lld", "5839395391962199967", "%llu", "5839395391962199967", b'\xbe\xde\xad\x8f\xf5\xca\xd9\x89\xa2\x01'),
TestCase("%lld", "1310759272316304459", "%llu", "1310759272316304459", b'\x96\xf1\xb3\xc7\xa1\xa7\xe0\xb0\x24'),
TestCase("%lld", "3663531610526815443", "%llu", "3663531610526815443", b'\xa6\xd3\xec\xcd\xdd\xa5\xbd\xd7\x65'),
TestCase("%lld", "3661335273992329249", "%llu", "3661335273992329249", b'\xc2\xe0\xdc\x9e\x8f\xc2\xd6\xcf\x65'),
TestCase("%lld", "3545512604455022758", "%llu", "3545512604455022758", b'\xcc\xc2\xb1\xf3\xb8\xbb\x98\xb4\x62'),
TestCase("%lld", "4908269103466540013", "%llu", "4908269103466540013", b'\xda\xaf\xaf\xe2\xd2\xaf\xd6\x9d\x88\x01'),
TestCase("%lld", "9012690640501821443", "%llu", "9012690640501821443", b'\x86\xc0\xca\x99\xdc\x98\xc1\x93\xfa\x01'),
TestCase("%lld", "6541851858139706195", "%llu", "6541851858139706195", b'\xa6\xcd\xab\x9a\xda\xe6\xa9\xc9\xb5\x01'),
TestCase("%lld", "6391701285149964727", "%llu", "6391701285149964727", b'\xee\xe6\xab\xbc\x88\x9d\xf1\xb3\xb1\x01'),
TestCase("%lld", "4510904210489015127", "%llu", "4510904210489015127", b'\xae\xed\x97\xa0\xd9\xde\xf9\x99\x7d'),
TestCase("%lld", "5119199357584793664", "%llu", "5119199357584793664", b'\x80\x81\xff\xb3\xad\xac\x86\x8b\x8e\x01'),
TestCase("%lld", "1751202991906984173", "%llu", "1751202991906984173", b'\xda\xc3\xbc\xe3\xf8\xf5\xc2\xcd\x30'),
TestCase("%lld", "4471970899266236465", "%llu", "4471970899266236465", b'\xe2\xc0\xaf\x8a\xdc\xf5\xd0\x8f\x7c'),
TestCase("%lld", "7912743439818658557", "%llu", "7912743439818658557", b'\xfa\xcb\x8c\x93\x85\x8f\xdb\xcf\xdb\x01'),
TestCase("%lld", "6642713590355959471", "%llu", "6642713590355959471", b'\xde\xfa\x9c\x9d\x9b\xb4\xd4\xaf\xb8\x01'),
TestCase("%lld", "7865046769076850396", "%llu", "7865046769076850396", b'\xb8\xbb\xc6\xca\xb3\x97\xa1\xa6\xda\x01'),
TestCase("%lld", "4109397703148639581", "%llu", "4109397703148639581", b'\xba\xd5\xd8\x8f\x88\xdc\xc1\x87\x72'),
TestCase("%lld", "436719658465345699", "%llu", "436719658465345699", b'\xc6\x82\x8e\xd4\xe5\x8d\xc5\x8f\x0c'),
TestCase("%lld", "2553774266074455395", "%llu", "2553774266074455395", b'\xc6\xf5\xb6\xde\xc3\x8a\xea\xf0\x46'),
TestCase("%lld", "6212224561138197241", "%llu", "6212224561138197241", b'\xf2\x8b\xcb\xf9\xe2\xd4\xa0\xb6\xac\x01'),
TestCase("%lld", "53039180701654763", "%llu", "53039180701654763", b'\xd6\xfb\xb2\xce\xd2\xb6\xb7\xbc\x01'),
TestCase("%lld", "5419660422277913790", "%llu", "5419660422277913790", b'\xfc\xf2\xf2\x91\x90\x9c\xc0\xb6\x96\x01'),
TestCase("%lld", "7637231844465361135", "%llu", "7637231844465361135", b'\xde\x83\xc6\xca\xc2\xf9\xf2\xfc\xd3\x01'),
TestCase("%lld", "1955771002711010609", "%llu", "1955771002711010609", b'\xe2\xb4\xcb\xe9\xac\xd7\xa5\xa4\x36'),
TestCase("%lld", "7552146003088329848", "%llu", "7552146003088329848", b'\xf0\xb1\xba\xdf\xdb\xb1\xce\xce\xd1\x01'),
TestCase("%lld", "4550116504720438569", "%llu", "4550116504720438569", b'\xd2\xd4\x87\xe8\xcf\xb6\xa1\xa5\x7e'),
TestCase("%lld", "757246289038783544", "%llu", "757246289038783544", b'\xf0\xd0\x9d\x9a\x9c\xdf\xa3\x82\x15'),
TestCase("%lld", "4684454901623556905", "%llu", "4684454901623556905", b'\xd2\xac\xe0\x99\xbd\xba\xc3\x82\x82\x01'),
TestCase("%lld", "2100956932097049429", "%llu", "2100956932097049429", b'\xaa\x8d\xd0\xa0\xd9\xcc\x8c\xa8\x3a'),
TestCase("%lld", "6234369280162760629", "%llu", "6234369280162760629", b'\xea\x9e\xac\xeb\x88\xf5\xf6\x84\xad\x01'),
TestCase("%lld", "1690133901535631706", "%llu", "1690133901535631706", b'\xb4\xe5\x82\xfe\x84\xf5\xc7\xf4\x2e'),
TestCase("%lld", "8944940508995398022", "%llu", "8944940508995398022", b'\x8c\xa6\xe1\xfa\x84\x80\xe8\xa2\xf8\x01'),
TestCase("%lld", "5911305799563392167", "%llu", "5911305799563392167", b'\xce\xd2\xf5\xda\xc4\xd3\x96\x89\xa4\x01'),
TestCase("%lld", "4077388965675931531", "%llu", "4077388965675931531", b'\x96\xde\xb0\xe3\xa9\xea\xe5\x95\x71'),
TestCase("%lld", "1245196532623960857", "%llu", "1245196532623960857", b'\xb2\xac\xcb\xa9\xc5\xe9\xe9\xc7\x22'),
TestCase("%lld", "8856210144434134086", "%llu", "8856210144434134086", b'\x8c\xf1\xa8\xb3\x88\x8d\xca\xe7\xf5\x01'),
TestCase("%lld", "8547254512181346310", "%llu", "8547254512181346310", b'\x8c\x80\xe4\xb6\xb1\xac\xf9\x9d\xed\x01'),
TestCase("%lld", "6269182192420305924", "%llu", "6269182192420305924", b'\x88\xf0\xd5\xb6\xa1\xff\xcd\x80\xae\x01'),
TestCase("%lld", "6831000756220180063", "%llu", "6831000756220180063", b'\xbe\xd9\xed\xee\xdb\xbf\xcb\xcc\xbd\x01'),
TestCase("%lld", "3168030316008523010", "%llu", "3168030316008523010", b'\x84\x94\xda\xf5\xb2\xb2\x8d\xf7\x57'),
TestCase("%lld", "2407920475746907080", "%llu", "2407920475746907080", b'\x90\xcf\xc5\xc4\xc7\xba\xd3\xea\x42'),
TestCase("%lld", "7828361129715530032", "%llu", "7828361129715530032", b'\xe0\xe4\xdb\xe2\x92\xbe\xf6\xa3\xd9\x01'),
TestCase("%lld", "5162541696057507903", "%llu", "5162541696057507903", b'\xfe\x80\xb4\xba\xbf\x94\x84\xa5\x8f\x01'),
TestCase("%lld", "4684430121285811332", "%llu", "4684430121285811332", b'\x88\xf2\x8b\xa6\x89\x98\xb8\x82\x82\x01'),
TestCase("%lld", "7069327273055818092", "%llu", "7069327273055818092", b'\xd8\xc5\xc8\xf7\xe5\xec\xa5\x9b\xc4\x01'),
TestCase("%lld", "1094908319066476988", "%llu", "1094908319066476988", b'\xf8\xc6\x9e\xb9\x95\xd4\xf2\xb1\x1e'),
TestCase("%lld", "8623611379126599086", "%llu", "8623611379126599086", b'\xdc\xf6\xdb\xdd\x80\xb7\x9c\xad\xef\x01'),
TestCase("%lld", "4188361875415362989", "%llu", "4188361875415362989", b'\xda\xb6\xdf\xee\xe9\xbb\x86\xa0\x74'),
TestCase("%lld", "8306128555371214226", "%llu", "8306128555371214226", b'\xa4\xd6\x89\x9a\xba\xfa\xa5\xc5\xe6\x01'),
TestCase("%lld", "6350883509347762576", "%llu", "6350883509347762576", b'\xa0\x86\xfa\x88\xe8\xb9\xef\xa2\xb0\x01'),
TestCase("%lld", "6330969482079692999", "%llu", "6330969482079692999", b'\x8e\xa3\x97\xf3\xee\xcc\x8f\xdc\xaf\x01'),
TestCase("%lld", "3843711385867305612", "%llu", "3843711385867305612", b'\x98\x8a\xf6\xdb\xff\xc8\xcd\xd7\x6a'),
TestCase("%lld", "7659651832434418091", "%llu", "7659651832434418091", b'\xd6\x86\xe3\xf6\xc9\xb0\xc6\xcc\xd4\x01'),
TestCase("%lld", "5535789636778214509", "%llu", "5535789636778214509", b'\xda\x91\xa2\xb7\x88\xd6\x89\xd3\x99\x01'),
TestCase("%lld", "5087759841087488516", "%llu", "5087759841087488516", b'\x88\x88\xa4\xe8\xd1\xa7\xad\x9b\x8d\x01'),
TestCase("%lld", "8891437578007474517", "%llu", "8891437578007474517", b'\xaa\xc5\x8f\xbb\xc9\xd7\xdd\xe4\xf6\x01'),
TestCase("%lld", "728151566226426022", "%llu", "728151566226426022", b'\xcc\xa2\x90\xf9\xba\xff\xf4\x9a\x14'),
TestCase("%lld", "2483479174720276235", "%llu", "2483479174720276235", b'\x96\x9c\xc2\x84\xd8\xc9\x8b\xf7\x44'),
TestCase("%lld", "6359340322607236594", "%llu", "6359340322607236594", b'\xe4\x97\x94\xed\x90\x95\xf5\xc0\xb0\x01'),
TestCase("%lld", "6416832625845083020", "%llu", "6416832625845083020", b'\x98\xee\x90\xea\xcf\xd1\x95\x8d\xb2\x01'),
TestCase("%lld", "5711184686518624115", "%llu", "5711184686518624115", b'\xe6\xfd\xbe\xe9\xd2\x8d\x9a\xc2\x9e\x01'),
TestCase("%lld", "3612059979445064775", "%llu", "3612059979445064775", b'\x8e\xd1\xd2\xe3\xbd\xda\xce\xa0\x64'),
TestCase("%lld", "8992370046494348158", "%llu", "8992370046494348158", b'\xfc\xcd\xc4\xe2\xbc\xba\xa8\xcb\xf9\x01'),
TestCase("%lld", "8599514281591661754", "%llu", "8599514281591661754", b'\xf4\x92\xdb\xb2\xa9\xab\xce\xd7\xee\x01'),
TestCase("%lld", "63057463895113152", "%llu", "63057463895113152", b'\x80\xf7\xbd\xfe\xbc\x9b\x83\xe0\x01'),
TestCase("%lld", "1367741239369008397", "%llu", "1367741239369008397", b'\x9a\x94\xf0\xd3\xa3\xda\x98\xfb\x25'),
TestCase("%lld", "22816942625156124", "%llu", "22816942625156124", b'\xb8\xb0\xc3\x80\xee\xf8\x87\x51'),
TestCase("%lld", "5473904087316166353", "%llu", "5473904087316166353", b'\xa2\xdb\xcf\xb0\xfe\xb0\x9b\xf7\x97\x01'),
TestCase("%lld", "2176574837538100650", "%llu", "2176574837538100650", b'\xd4\xd6\x98\xa8\x8c\xd2\xdf\xb4\x3c'),
TestCase("%lld", "1822527202856628083", "%llu", "1822527202856628083", b'\xe6\xbd\x8b\xfc\xb6\xb5\xf5\xca\x32'),
TestCase("%lld", "6704455477950302825", "%llu", "6704455477950302825", b'\xd2\xa9\xb2\xfa\x88\xaf\x81\x8b\xba\x01'),
TestCase("%lld", "3032341809633898873", "%llu", "3032341809633898873", b'\xf2\xc5\xd9\x8c\xea\xb3\x85\x95\x54'),
TestCase("%lld", "4392190674790178652", "%llu", "4392190674790178652", b'\xb8\xfd\xb6\xca\xbb\x89\x99\xf4\x79'),
TestCase("%lld", "6856757614633255152", "%llu", "6856757614633255152", b'\xe0\x83\xdc\xb2\x99\xae\x8c\xa8\xbe\x01'),
TestCase("%lld", "353529678637100035", "%llu", "353529678637100035", b'\x86\xb0\xc7\x8b\xd4\xd7\xfe\xe7\x09'),
TestCase("%lld", "3224702228554841730", "%llu", "3224702228554841730", b'\x84\xfa\xdf\xf6\xee\xe5\xb8\xc0\x59'),
TestCase("%lld", "8122609781749075974", "%llu", "8122609781749075974", b'\x8c\xc0\xa2\xa4\xf4\xa3\xa7\xb9\xe1\x01'),
TestCase("%lld", "3988658283410987938", "%llu", "3988658283410987938", b'\xc4\xee\x8c\x92\xee\xe4\xc7\xda\x6e'),
TestCase("%lld", "7588966234436262844", "%llu", "7588966234436262844", b'\xf8\xee\x8e\x80\xa1\xa5\xb6\xd1\xd2\x01'),
TestCase("%lld", "72920210115635164", "%llu", "72920210115635164", b'\xb8\x9f\x9d\xce\xee\xa2\x88\x83\x02'),
TestCase("%lld", "8168752409782378632", "%llu", "8168752409782378632", b'\x90\x82\x8f\xb3\xad\xc2\x9e\xdd\xe2\x01'),
TestCase("%lld", "4655403017017936000", "%llu", "4655403017017936000", b'\x80\xa2\x96\xba\x9d\x98\xa8\x9b\x81\x01'),
TestCase("%lld", "8183602528750449920", "%llu", "8183602528750449920", b'\x80\xd4\xc5\xd2\x85\xc9\xff\x91\xe3\x01'),
TestCase("%lld", "288952216557681443", "%llu", "288952216557681443", b'\xc6\xec\xdb\x8f\xd2\xa0\xc8\x82\x08'),
TestCase("%lld", "1676746537447019293", "%llu", "1676746537447019293", b'\xba\xcc\xaa\xee\xf1\x85\x80\xc5\x2e'),
TestCase("%lld", "3219359012813218523", "%llu", "3219359012813218523", b'\xb6\x8b\xf9\xb2\xe3\xfd\xba\xad\x59'),
TestCase("%lld", "9123809425872405130", "%llu", "9123809425872405130", b'\x94\x8a\xe2\xb7\xa6\x95\xa4\x9e\xfd\x01'),
TestCase("%lld", "7496923004744506260", "%llu", "7496923004744506260", b'\xa8\xee\x80\xe4\x93\xf0\xb5\x8a\xd0\x01'),
TestCase("%lld", "2810327810830374172", "%llu", "2810327810830374172", b'\xb8\xd4\x90\xaf\xa2\x90\xa5\x80\x4e'),
TestCase("%lld", "5886875793686089828", "%llu", "5886875793686089828", b'\xc8\xc1\x8a\xf8\x84\x96\xb1\xb2\xa3\x01'),
TestCase("%lld", "1043235540762466020", "%llu", "1043235540762466020", b'\xc8\xdb\xac\x83\xce\xcc\xa8\xfa\x1c'),
TestCase("%lld", "8352418169916257811", "%llu", "8352418169916257811", b'\xa6\xd8\x83\x96\xd2\x84\xe0\xe9\xe7\x01'),
TestCase("%lld", "674709631558538790", "%llu", "674709631558538790", b'\xcc\xd8\xa6\xb9\xb9\xb5\x86\xdd\x12'),
TestCase("%lld", "6425607598961991251", "%llu", "6425607598961991251", b'\xa6\xf9\xf0\xa2\xa4\x84\xac\xac\xb2\x01'),
TestCase("%lld", "6117996971473322038", "%llu", "6117996971473322038", b'\xec\x80\xaa\xd9\x97\xf5\xbe\xe7\xa9\x01'),
TestCase("%lld", "2394571431170796410", "%llu", "2394571431170796410", b'\xf4\xad\xdf\x83\xf3\x81\x9d\xbb\x42'),
TestCase("%lld", "9192320418779887179", "%llu", "9192320418779887179", b'\x96\xd9\x8f\xef\xf8\xad\xd7\x91\xff\x01'),
TestCase("%lld", "891164515808164858", "%llu", "891164515808164858", b'\xf4\xef\xed\x92\xfa\xd9\x86\xde\x18'),
TestCase("%lld", "4569690489566792107", "%llu", "4569690489566792107", b'\xd6\xa6\xe0\xc1\xbf\xd2\xe6\xea\x7e'),
TestCase("%lld", "4245075167591901055", "%llu", "4245075167591901055", b'\xfe\x9d\xad\x92\xf4\xd7\xc4\xe9\x75'),
TestCase("%lld", "9019812505721196330", "%llu", "9019812505721196330", b'\xd4\xbc\x9a\x82\xeb\xeb\xe7\xac\xfa\x01'),
TestCase("%lld", "979687222629424543", "%llu", "979687222629424543", b'\xbe\xf6\x86\xfd\xd3\x95\xc6\x98\x1b'),
TestCase("%lld", "4114720885129059820", "%llu", "4114720885129059820", b'\xd8\xf7\xfc\xbf\x84\xb6\xb6\x9a\x72'),
TestCase("%lld", "2602113737417537288", "%llu", "2602113737417537288", b'\x90\xdc\xfd\xfe\x8a\xaa\xc8\x9c\x48'),
TestCase("%lld", "4025468271985009702", "%llu", "4025468271985009702", b'\xcc\x90\xad\xe4\x98\x84\xab\xdd\x6f'),
TestCase("%lld", "3036291044299697402", "%llu", "3036291044299697402", b'\xf4\xb3\xf7\xa2\xc5\xa7\x89\xa3\x54'),
TestCase("%lld", "1070534622568918680", "%llu", "1070534622568918680", b'\xb0\xba\xd1\x9f\xa7\xe4\xa6\xdb\x1d'),
TestCase("%lld", "5631405388638357750", "%llu", "5631405388638357750", b'\xec\xa3\x94\x80\xaa\xd7\xe2\xa6\x9c\x01'),
TestCase("%lld", "53610470084017162", "%llu", "53610470084017162", b'\x94\xf0\xcb\x99\x88\x9c\xbb\xbe\x01'),
TestCase("%lld", "6477169593541844553", "%llu", "6477169593541844553", b'\x92\xf9\xae\xd0\xb0\xdb\xc3\xe3\xb3\x01'),
TestCase("%lld", "1775599305804553124", "%llu", "1775599305804553124", b'\xc8\xee\xc8\xde\xa7\x8a\x99\xa4\x31'),
TestCase("%lld", "720129488086281194", "%llu", "720129488086281194", b'\xd4\xaf\xd5\x9a\x87\xfd\xb4\xfe\x13'),
TestCase("%lld", "6711270492673007555", "%llu", "6711270492673007555", b'\x86\xff\xae\xb5\x91\xbd\x9c\xa3\xba\x01'),
TestCase("%lld", "7513165068981918756", "%llu", "7513165068981918756", b'\xc8\xf0\xd2\xb8\xdc\xf4\x8f\xc4\xd0\x01'),
TestCase("%lld", "2983712669290254370", "%llu", "2983712669290254370", b'\xc4\xc0\x86\xce\xa8\xb7\xa3\xe8\x52'),
TestCase("%lld", "3737216259576487553", "%llu", "3737216259576487553", b'\x82\xfa\xf6\x8d\xe6\x98\xa1\xdd\x67'),
TestCase("%lld", "2274224013798231728", "%llu", "2274224013798231728", b'\xe0\xba\xda\xa1\x9e\xac\xd5\x8f\x3f'),
TestCase("%lld", "3565198557459535882", "%llu", "3565198557459535882", b'\x94\xe0\xe2\xb1\xdc\xcc\x90\xfa\x62'),
TestCase("%lld", "3732880420468774142", "%llu", "3732880420468774142", b'\xfc\xd3\xea\xb0\xdf\xbd\xed\xcd\x67'),
TestCase("%lld", "5371965991102827603", "%llu", "5371965991102827603", b'\xa6\xb1\xce\xd2\xec\xa6\x87\x8d\x95\x01'),
TestCase("%lld", "484335498791767840", "%llu", "484335498791767840", b'\xc0\xbc\xc2\xd9\xbd\xa4\xda\xb8\x0d'),
TestCase("%lld", "5776656679787538668", "%llu", "5776656679787538668", b'\xd8\xa3\xfd\xc1\x9d\xa9\xe7\xaa\xa0\x01'),
TestCase("%lld", "7846457973737734692", "%llu", "7846457973737734692", b'\xc8\x88\xda\xda\x8d\xfd\x9b\xe4\xd9\x01'),
TestCase("%lld", "749331093609658474", "%llu", "749331093609658474", b'\xd4\xe1\x91\xdc\x9a\xaa\x94\xe6\x14'),
TestCase("%lld", "4154208822466872538", "%llu", "4154208822466872538", b'\xb4\x93\xf4\x9e\xc0\xba\xdb\xa6\x73'),
TestCase("%lld", "8161063962699005564", "%llu", "8161063962699005564", b'\xf8\xf9\xd3\xde\xea\x9b\xf6\xc1\xe2\x01'),
TestCase("%lld", "3729503431677340594", "%llu", "3729503431677340594", b'\xe4\xae\xd3\x9b\x90\xe7\xed\xc1\x67'),
TestCase("%lld", "3621720449882747425", "%llu", "3621720449882747425", b'\xc2\xc8\xbb\xb0\xef\xe3\xf7\xc2\x64'),
TestCase("%lld", "3654452981777753952", "%llu", "3654452981777753952", b'\xc0\x9d\xd7\xb3\xfe\xe7\x9c\xb7\x65'),
TestCase("%lld", "8747087227033699739", "%llu", "8747087227033699739", b'\xb6\x96\x9a\xab\xa5\xdf\xf2\xe3\xf2\x01'),
TestCase("%lld", "7841542346336811454", "%llu", "7841542346336811454", b'\xfc\xe6\xb5\xc9\xf7\xcd\xe0\xd2\xd9\x01'),
TestCase("%lld", "8253451662283365177", "%llu", "8253451662283365177", b'\xf2\xec\x8e\xd4\xdc\xa3\x93\x8a\xe5\x01'),
TestCase("%lld", "3367538680468566654", "%llu", "3367538680468566654", b'\xfc\xc9\xbb\x8b\xd0\xa5\xf3\xbb\x5d'),
TestCase("%lld", "134795648044988988", "%llu", "134795648044988988", b'\xf8\xe8\xeb\xef\xaf\xfb\xf1\xde\x03'),
TestCase("%lld", "2210978119973242473", "%llu", "2210978119973242473", b'\xd2\x99\xd4\xf2\xd8\xb8\xfc\xae\x3d'),
TestCase("%lld", "421750780720578633", "%llu", "421750780720578633", b'\x92\x81\xc0\xc9\xb7\x86\xae\xda\x0b'),
TestCase("%lld", "5885301061939406661", "%llu", "5885301061939406661", b'\x8a\x9d\x85\x92\xcb\x88\xe5\xac\xa3\x01'),
TestCase("%lld", "8457438023241447265", "%llu", "8457438023241447265", b'\xc2\xdd\x81\xd3\xd3\xc4\xed\xde\xea\x01'),
TestCase("%lld", "8625342049665019705", "%llu", "8625342049665019705", b'\xf2\xbc\xaf\x88\xa5\xb9\xaf\xb3\xef\x01'),
TestCase("%lld", "4522738759120336903", "%llu", "4522738759120336903", b'\x8e\xe0\x91\xd4\x8b\xbc\xff\xc3\x7d'),
TestCase("%lld", "2671059116919281788", "%llu", "2671059116919281788", b'\xf8\xe1\xd6\xe0\xad\x87\xc1\x91\x4a'),
TestCase("%lld", "3110596655769706088", "%llu", "3110596655769706088", b'\xd0\xf9\xde\xaa\xb0\xcb\x87\xab\x56'),
TestCase("%lld", "7187907223546304710", "%llu", "7187907223546304710", b'\x8c\xe3\x88\x9f\xac\xe2\xc9\xc0\xc7\x01'),
TestCase("%lld", "6450021345187045785", "%llu", "6450021345187045785", b'\xb2\x86\xfd\x98\xac\x8f\x8a\x83\xb3\x01'),
TestCase("%lld", "1678455339349899965", "%llu", "1678455339349899965", b'\xfa\xea\xf7\x94\xa0\x8f\x89\xcb\x2e'),
TestCase("%lld", "8586083292869710126", "%llu", "8586083292869710126", b'\xdc\xc4\xd2\xb6\xf1\xd0\xf2\xa7\xee\x01'),
TestCase("%lld", "7328869729981674031", "%llu", "7328869729981674031", b'\xde\xc8\xdd\xca\x8f\x8c\xb0\xb5\xcb\x01'),
TestCase("%lld", "88833738086841272", "%llu", "88833738086841272", b'\xf0\xee\xe3\xab\x8d\xf4\xcc\xbb\x02'),
TestCase("%lld", "3875204489276489361", "%llu", "3875204489276489361", b'\xa2\xfa\x97\xf5\xf0\xfc\xbe\xc7\x6b'),
TestCase("%lld", "349662797203771308", "%llu", "349662797203771308", b'\xd8\xbe\x80\xa8\xc4\x9d\xa0\xda\x09'),
TestCase("%lld", "7970924659150689441", "%llu", "7970924659150689441", b'\xc2\xd2\xa0\x81\xdd\xef\xb4\x9e\xdd\x01'),
TestCase("%lld", "163280929539230956", "%llu", "163280929539230956", b'\xd8\xb3\xc0\xbc\xfd\xc8\x8b\xc4\x04'),
TestCase("%lld", "1719947238548425297", "%llu", "1719947238548425297", b'\xa2\xa9\xbe\xa1\xd3\xb9\xbd\xde\x2f'),
TestCase("%lld", "4371241115470848126", "%llu", "4371241115470848126", b'\xfc\x81\xc7\xb3\xcf\xa8\xe2\xa9\x79'),
TestCase("%lld", "4845845044868885160", "%llu", "4845845044868885160", b'\xd0\xaa\xf9\xff\x9a\x99\xf3\xbf\x86\x01'),
TestCase("%lld", "428374782176628108", "%llu", "428374782176628108", b'\x98\xb6\xfc\xa5\x88\xa6\xf2\xf1\x0b'),
TestCase("%lld", "7356256820074242781", "%llu", "7356256820074242781", b'\xba\x8b\x8f\xd1\xc9\xa6\xd6\x96\xcc\x01'),
TestCase("%lld", "7023621621475593673", "%llu", "7023621621475593673", b'\x92\xb7\xf2\x8c\xdd\xa9\xf5\xf8\xc2\x01'),
TestCase("%lld", "844047554037800681", "%llu", "844047554037800681", b'\xd2\xfb\xae\xff\xe8\xb1\xd4\xb6\x17'),
TestCase("%lld", "817568236458138451", "%llu", "817568236458138451", b'\xa6\xed\xd6\x9b\xd7\xfe\xca\xd8\x16'),
TestCase("%lld", "8750594193206555908", "%llu", "8750594193206555908", b'\x88\xd4\xe1\xba\xcb\xc3\xad\xf0\xf2\x01'),
TestCase("%lld", "8310288564467194046", "%llu", "8310288564467194046", b'\xfc\xe2\xf6\xa0\xed\xda\x89\xd4\xe6\x01'),
TestCase("%lld", "6530303901192542500", "%llu", "6530303901192542500", b'\xc8\xe4\xee\x9e\x92\xb3\xa6\xa0\xb5\x01'),
TestCase("%lld", "7528511123548308292", "%llu", "7528511123548308292", b'\x88\x8d\xe4\xea\xd4\xbe\xd2\xfa\xd0\x01'),
TestCase("%lld", "9162331973142792201", "%llu", "9162331973142792201", b'\x92\xa0\x8a\xd6\xd5\x98\x92\xa7\xfe\x01'),
TestCase("%lld", "2011986664423345991", "%llu", "2011986664423345991", b'\x8e\xbd\xb6\x9c\xc3\xcd\x81\xec\x37'),
TestCase("%lld", "9019302408819509", "%llu", "9019302408819509", b'\xea\xcc\x98\xc3\xbf\xc0\x85\x20'),
TestCase("%lld", "789517241633323881", "%llu", "789517241633323881", b'\xd2\xed\xcd\xb9\xf1\xef\xf6\xf4\x15'),
TestCase("%lld", "5000802077860900174", "%llu", "5000802077860900174", b'\x9c\xb5\xf9\xae\xd2\xbf\xb5\xe6\x8a\x01'),
TestCase("%lld", "634081739389621380", "%llu", "634081739389621380", b'\x88\xd2\x8a\xae\xf0\xfe\xda\xcc\x11'),
TestCase("%lld", "112762393776366951", "%llu", "112762393776366951", b'\xce\x95\x81\x91\x97\xb3\xce\x90\x03'),
TestCase("%lld", "6054079168136366365", "%llu", "6054079168136366365", b'\xba\xa4\xe2\xad\xae\xbb\xb4\x84\xa8\x01'),
TestCase("%lld", "3980060469571494571", "%llu", "3980060469571494571", b'\xd6\x8a\x91\x96\x9d\xfa\x81\xbc\x6e'),
TestCase("%lld", "5966260566188732596", "%llu", "5966260566188732596", b'\xe8\xc2\xcd\xd1\xfa\x97\xb5\xcc\xa5\x01'),
TestCase("%lld", "7994806728603097981", "%llu", "7994806728603097981", b'\xfa\xed\xd2\xa4\x90\x97\xa1\xf3\xdd\x01'),
TestCase("%lld", "4215789446045917951", "%llu", "4215789446045917951", b'\xfe\x8b\xc3\xb6\xc7\x8a\xbf\x81\x75'),
TestCase("%lld", "3106694682520283096", "%llu", "3106694682520283096", b'\xb0\x9f\xbb\x93\xd2\x96\x99\x9d\x56'),
TestCase("%lld", "7417099544643803895", "%llu", "7417099544643803895", b'\xee\xeb\xa4\xe3\xa0\xaf\xea\xee\xcd\x01'),
TestCase("%lld", "2442715921212337368", "%llu", "2442715921212337368", b'\xb0\xb3\xeb\xb0\x86\xcc\xa2\xe6\x43'),
TestCase("%lld", "3969107660140201186", "%llu", "3969107660140201186", b'\xc4\x93\x82\xdf\xe7\x98\x8d\x95\x6e'),
TestCase("%lld", "2820313669595847223", "%llu", "2820313669595847223", b'\xee\xe8\x82\xf7\xdf\x95\xe2\xa3\x4e'),
TestCase("%lld", "1153942061124594568", "%llu", "1153942061124594568", b'\x90\xae\xb5\xcb\x9a\x8c\xd0\x83\x20'),
TestCase("%lld", "7255377737678567782", "%llu", "7255377737678567782", b'\xcc\xe5\xdd\xd9\x93\xe7\xa3\xb0\xc9\x01'),
TestCase("%lld", "8010794524226708564", "%llu", "8010794524226708564", b'\xa8\x91\xeb\x92\xa8\xcb\x87\xac\xde\x01'),
TestCase("%lld", "2397984212273136806", "%llu", "2397984212273136806", b'\xcc\x92\xc8\xd8\xf3\xfb\xac\xc7\x42'),
TestCase("%lld", "3911421735689494721", "%llu", "3911421735689494721", b'\x82\x83\x9d\xa8\x8a\xd6\x94\xc8\x6c'),
TestCase("%lld", "8110862279364352221", "%llu", "8110862279364352221", b'\xba\xe3\x84\xfa\xa2\x91\xc9\x8f\xe1\x01'),
TestCase("%lld", "8302240689147774718", "%llu", "8302240689147774718", b'\xfc\x9b\x94\xc7\xed\xfa\xbd\xb7\xe6\x01'),
TestCase("%lld", "8137682451091990657", "%llu", "8137682451091990657", b'\x82\xa2\xa5\x84\xde\xc4\xed\xee\xe1\x01'),
TestCase("%lld", "7692576112763082769", "%llu", "7692576112763082769", b'\xa2\xe0\xb0\x8e\xf6\xcd\xc2\xc1\xd5\x01'),
TestCase("%lld", "4332208573039164264", "%llu", "4332208573039164264", b'\xd0\xed\xb5\x8e\xd0\xaf\x8c\x9f\x78'),
TestCase("%lld", "1408790260442838317", "%llu", "1408790260442838317", b'\xda\xd4\xcd\xcb\xe3\xd1\x83\x8d\x27'),
TestCase("%lld", "674974620879983391", "%llu", "674974620879983391", b'\xbe\xcc\xa4\xdf\xed\xf5\xfe\xdd\x12'),
TestCase("%lld", "2717882686191243732", "%llu", "2717882686191243732", b'\xa8\xc7\xe8\xb9\xe6\xf9\xed\xb7\x4b'),
TestCase("%lld", "2252874181081070317", "%llu", "2252874181081070317", b'\xda\xeb\xe3\xef\xb4\xc8\xe8\xc3\x3e'),
TestCase("%lld", "561600661159813802", "%llu", "561600661159813802", b'\xd4\x8a\xf1\xa0\xed\xb4\x9a\xcb\x0f'),
TestCase("%lld", "1743861870362420461", "%llu", "1743861870362420461", b'\xda\x93\xe7\x84\xb7\xc8\xb8\xb3\x30'),
TestCase("%lld", "469546530241540223", "%llu", "469546530241540223", b'\xfe\xc1\x83\xc9\x9b\x85\x95\x84\x0d'),
TestCase("%lld", "2803811754125283747", "%llu", "2803811754125283747", b'\xc6\xc6\x9e\xdb\xec\xfb\x91\xe9\x4d'),
TestCase("%lld", "1450094191759522064", "%llu", "1450094191759522064", b'\xa0\xe4\xf7\xea\x80\xbf\xe2\x9f\x28'),
TestCase("%lld", "973928254324237827", "%llu", "973928254324237827", b'\x86\x98\xb3\xbb\xca\xa5\x8b\x84\x1b'),
TestCase("%lld", "5007711289774136962", "%llu", "5007711289774136962", b'\x84\xfa\x9a\xcb\xda\xb8\xfb\xfe\x8a\x01'),
TestCase("%lld", "5617796192393039749", "%llu", "5617796192393039749", b'\x8a\xbe\x88\xc2\xec\xf7\xb5\xf6\x9b\x01'),
TestCase("%lld", "7609052204185497138", "%llu", "7609052204185497138", b'\xe4\xb8\x89\xbe\xc9\xaa\xe4\x98\xd3\x01'),
TestCase("%lld", "4109234434773033977", "%llu", "4109234434773033977", b'\xf2\x8f\x99\xf7\xcb\xbc\xf7\x86\x72'),
TestCase("%lld", "6196547806636196643", "%llu", "6196547806636196643", b'\xc6\x8c\xb6\x84\xc8\xd9\xc7\xfe\xab\x01'),
TestCase("%lld", "1242378025984660164", "%llu", "1242378025984660164", b'\x88\xcb\x88\xb9\xee\x8e\xe8\xbd\x22'),
TestCase("%lld", "3684142195824821322", "%llu", "3684142195824821322", b'\x94\x91\xd4\xc2\xd8\xf3\xd9\xa0\x66'),
TestCase("%lld", "7118933327258815856", "%llu", "7118933327258815856", b'\xe0\xb5\x9c\xef\x96\x89\xc4\xcb\xc5\x01'),
TestCase("%lld", "230557021351043665", "%llu", "230557021351043665", b'\xa2\x89\xcf\xe1\xf5\x98\x8d\xb3\x06'),
TestCase("%lld", "8445293705764922090", "%llu", "8445293705764922090", b'\xd4\x8b\xaf\xbf\xab\xf8\xda\xb3\xea\x01'),
TestCase("%lld", "1574191283697066832", "%llu", "1574191283697066832", b'\xa0\x8d\xbd\x94\xba\xa8\xd3\xd8\x2b'),
TestCase("%lld", "6141978416086614643", "%llu", "6141978416086614643", b'\xe6\x89\xac\xcf\xfd\xb4\xd8\xbc\xaa\x01'),
TestCase("%lld", "2281449725566748391", "%llu", "2281449725566748391", b'\xce\x9b\x8c\x95\x82\x9c\xab\xa9\x3f'),
TestCase("%lld", "784722535322631703", "%llu", "784722535322631703", b'\xae\xf8\xb1\xd2\x9f\xbf\xf2\xe3\x15'),
TestCase("%lld", "5758531472775216899", "%llu", "5758531472775216899", b'\x86\xfc\xe3\xea\xa9\xf7\xb4\xea\x9f\x01'),
TestCase("%lld", "3230692938369337673", "%llu", "3230692938369337673", b'\x92\xa5\xf0\x9d\x89\x87\xdd\xd5\x59'),
TestCase("%lld", "6060043374493141457", "%llu", "6060043374493141457", b'\xa2\xa7\xfc\xc1\xee\xd5\xcc\x99\xa8\x01'),
TestCase("%lld", "2194452418321024659", "%llu", "2194452418321024659", b'\xa6\x9a\xac\xe8\xa0\xb6\xa1\xf4\x3c'),
TestCase("%lld", "1179720724324426892", "%llu", "1179720724324426892", b'\x98\x92\xb1\xb8\xf2\xef\x9a\xdf\x20'),
TestCase("%lld", "6869292628752205971", "%llu", "6869292628752205971", b'\xa6\xa2\xe0\xaf\x86\xd0\xd0\xd4\xbe\x01'),
TestCase("%lld", "66666931390606463", "%llu", "66666931390606463", b'\xfe\xb1\xeb\xbc\x91\xce\xec\xec\x01'),
# Random 32-bit ints
TestCase("%d", "548530896", "%u", "548530896", b'\xa0\xab\x8f\x8b\x04'),
TestCase("%d", "821325877", "%u", "821325877", b'\xea\xc0\xa3\x8f\x06'),
TestCase("%d", "511383431", "%u", "511383431", b'\x8e\xde\xd8\xe7\x03'),
TestCase("%d", "73179717", "%u", "73179717", b'\x8a\x89\xe5\x45'),
TestCase("%d", "644966342", "%u", "644966342", b'\x8c\x9f\x8b\xe7\x04'),
TestCase("%d", "1980405737", "%u", "1980405737", b'\xd2\xdf\xd4\xe0\x0e'),
TestCase("%d", "476646907", "%u", "476646907", b'\xf6\xb7\xc8\xc6\x03'),
TestCase("%d", "2032236920", "%u", "2032236920", b'\xf0\xe5\x8b\x92\x0f'),
TestCase("%d", "1293986078", "%u", "1293986078", b'\xbc\xa4\x85\xd2\x09'),
TestCase("%d", "301233235", "%u", "301233235", b'\xa6\xd1\xa3\x9f\x02'),
TestCase("%d", "558217992", "%u", "558217992", b'\x90\xec\xad\x94\x04'),
TestCase("%d", "2097556487", "%u", "2097556487", b'\x8e\xb0\xb1\xd0\x0f'),
TestCase("%d", "1914275808", "%u", "1914275808", b'\xc0\x9f\xcc\xa1\x0e'),
TestCase("%d", "817548252", "%u", "817548252", b'\xb8\xaf\xd6\x8b\x06'),
TestCase("%d", "409952181", "%u", "409952181", b'\xea\xfe\xfa\x86\x03'),
TestCase("%d", "1247456066", "%u", "1247456066", b'\x84\xad\xd5\xa5\x09'),
TestCase("%d", "1516178395", "%u", "1516178395", b'\xb6\xaf\xf8\xa5\x0b'),
TestCase("%d", "119460598", "%u", "119460598", b'\xec\xcb\xf6\x71'),
TestCase("%d", "1712502589", "%u", "1712502589", b'\xfa\xdc\x95\xe1\x0c'),
TestCase("%d", "1688223314", "%u", "1688223314", b'\xa4\xf9\x81\xca\x0c'),
TestCase("%d", "706807765", "%u", "706807765", b'\xaa\x9f\x88\xa2\x05'),
TestCase("%d", "1774808552", "%u", "1774808552", b'\xd0\xb7\xcb\x9c\x0d'),
TestCase("%d", "1789229650", "%u", "1789229650", b'\xa4\xe9\xab\xaa\x0d'),
TestCase("%d", "1849514292", "%u", "1849514292", b'\xe8\xe4\xea\xe3\x0d'),
TestCase("%d", "1655538874", "%u", "1655538874", b'\xf4\x92\xec\xaa\x0c'),
TestCase("%d", "34451703", "%u", "34451703", b'\xee\xc3\xed\x20'),
TestCase("%d", "1217027822", "%u", "1217027822", b'\xdc\xfb\xd2\x88\x09'),
TestCase("%d", "1722335750", "%u", "1722335750", b'\x8c\x88\xc6\xea\x0c'),
TestCase("%d", "1755007515", "%u", "1755007515", b'\xb6\xa8\xda\x89\x0d'),
TestCase("%d", "1016776167", "%u", "1016776167", b'\xce\x97\xd6\xc9\x07'),
TestCase("%d", "2053515555", "%u", "2053515555", b'\xc6\xa4\xb1\xa6\x0f'),
TestCase("%d", "652344632", "%u", "652344632", b'\xf0\xf4\x8f\xee\x04'),
TestCase("%d", "2075650855", "%u", "2075650855", b'\xce\xac\xbf\xbb\x0f'),
TestCase("%d", "1374899794", "%u", "1374899794", b'\xa4\xb9\x9a\x9f\x0a'),
TestCase("%d", "631591603", "%u", "631591603", b'\xe6\xca\xaa\xda\x04'),
TestCase("%d", "1017271797", "%u", "1017271797", b'\xea\xd7\x92\xca\x07'),
TestCase("%d", "659199737", "%u", "659199737", b'\xf2\xdb\xd4\xf4\x04'),
TestCase("%d", "1782422140", "%u", "1782422140", b'\xf8\xe9\xec\xa3\x0d'),
TestCase("%d", "1572071831", "%u", "1572071831", b'\xae\xa6\x9f\xdb\x0b'),
TestCase("%d", "2105608301", "%u", "2105608301", b'\xda\xa1\x88\xd8\x0f'),
TestCase("%d", "1534509283", "%u", "1534509283", b'\xc6\x83\xb6\xb7\x0b'),
TestCase("%d", "1360016822", "%u", "1360016822", b'\xec\xd6\x81\x91\x0a'),
TestCase("%d", "66588090", "%u", "66588090", b'\xf4\xb6\xc0\x3f'),
TestCase("%d", "2010287594", "%u", "2010287594", b'\xd4\xb7\x94\xfd\x0e'),
TestCase("%d", "1409055793", "%u", "1409055793", b'\xe2\xf0\xe3\xbf\x0a'),
TestCase("%d", "1312806256", "%u", "1312806256", b'\xe0\xd5\xfe\xe3\x09'),
TestCase("%d", "117699373", "%u", "117699373", b'\xda\xcc\x9f\x70'),
TestCase("%d", "1875416592", "%u", "1875416592", b'\xa0\xd8\xc4\xfc\x0d'),
TestCase("%d", "550403142", "%u", "550403142", b'\x8c\xf1\xf3\x8c\x04'),
TestCase("%d", "1556101213", "%u", "1556101213", b'\xba\xe1\x81\xcc\x0b'),
TestCase("%d", "1397393149", "%u", "1397393149", b'\xfa\x9b\xd4\xb4\x0a'),
TestCase("%d", "504462025", "%u", "504462025", b'\x92\xeb\x8b\xe1\x03'),
TestCase("%d", "1578855448", "%u", "1578855448", b'\xb0\xb0\xdb\xe1\x0b'),
TestCase("%d", "341299952", "%u", "341299952", b'\xe0\xcb\xbe\xc5\x02'),
TestCase("%d", "554765077", "%u", "554765077", b'\xaa\xac\x88\x91\x04'),
TestCase("%d", "1581023732", "%u", "1581023732", b'\xe8\x87\xe4\xe3\x0b'),
TestCase("%d", "1415869606", "%u", "1415869606", b'\xcc\xd2\xa3\xc6\x0a'),
TestCase("%d", "724653249", "%u", "724653249", b'\x82\xd3\x8a\xb3\x05'),
TestCase("%d", "88302425", "%u", "88302425", b'\xb2\x8d\x9b\x54'),
TestCase("%d", "1742669733", "%u", "1742669733", b'\xca\x9e\xf8\xfd\x0c'),
TestCase("%d", "878166891", "%u", "878166891", b'\xd6\x8d\xbe\xc5\x06'),
TestCase("%d", "1416428619", "%u", "1416428619", b'\x96\xf1\xe7\xc6\x0a'),
TestCase("%d", "1034414669", "%u", "1034414669", b'\x9a\xa9\xbf\xda\x07'),
TestCase("%d", "905412084", "%u", "905412084", b'\xe8\xf7\xbb\xdf\x06'),
TestCase("%d", "63837368", "%u", "63837368", b'\xf0\xd2\xf0\x3c'),
TestCase("%d", "645161396", "%u", "645161396", b'\xe8\x86\xa3\xe7\x04'),
TestCase("%d", "2107597739", "%u", "2107597739", b'\xd6\x8e\xfb\xd9\x0f'),
TestCase("%d", "76301137", "%u", "76301137", b'\xa2\x8d\xe2\x48'),
TestCase("%d", "459966688", "%u", "459966688", b'\xc0\xa3\xd4\xb6\x03'),
TestCase("%d", "1966018032", "%u", "1966018032", b'\xe0\xb7\xf8\xd2\x0e'),
TestCase("%d", "1781593154", "%u", "1781593154", b'\x84\xd1\x87\xa3\x0d'),
TestCase("%d", "558910911", "%u", "558910911", b'\xfe\xb6\x82\x95\x04'),
TestCase("%d", "1968681756", "%u", "1968681756", b'\xb8\xcc\xbd\xd5\x0e'),
TestCase("%d", "1898903331", "%u", "1898903331", b'\xc6\xdc\xf7\x92\x0e'),
TestCase("%d", "667424750", "%u", "667424750", b'\xdc\xdf\xc0\xfc\x04'),
TestCase("%d", "1831749058", "%u", "1831749058", b'\x84\x97\xf2\xd2\x0d'),
TestCase("%d", "1630416710", "%u", "1630416710", b'\x8c\xbd\xf1\x92\x0c'),
TestCase("%d", "1774702744", "%u", "1774702744", b'\xb0\xc2\xbe\x9c\x0d'),
TestCase("%d", "46739084", "%u", "46739084", b'\x98\xba\xc9\x2c'),
TestCase("%d", "709255105", "%u", "709255105", b'\x82\xff\xb2\xa4\x05'),
TestCase("%d", "1264949590", "%u", "1264949590", b'\xac\xe5\xac\xb6\x09'),
TestCase("%d", "2785021", "%u", "2785021", b'\xfa\xfb\xd3\x02'),
TestCase("%d", "1940076275", "%u", "1940076275", b'\xe6\xdb\x99\xba\x0e'),
TestCase("%d", "1436099990", "%u", "1436099990", b'\xac\x96\xc9\xd9\x0a'),
TestCase("%d", "622422778", "%u", "622422778", b'\xf4\xab\xcb\xd1\x04'),
TestCase("%d", "506192594", "%u", "506192594", b'\xa4\x8b\xdf\xe2\x03'),
TestCase("%d", "1329083686", "%u", "1329083686", b'\xcc\xd4\xc1\xf3\x09'),
TestCase("%d", "724686473", "%u", "724686473", b'\x92\xda\x8e\xb3\x05'),
TestCase("%d", "1693465014", "%u", "1693465014", b'\xec\xe6\x81\xcf\x0c'),
TestCase("%d", "986175143", "%u", "986175143", b'\xce\xda\xbe\xac\x07'),
TestCase("%d", "165118383", "%u", "165118383", b'\xde\x86\xbc\x9d\x01'),
TestCase("%d", "1364735728", "%u", "1364735728", b'\xe0\xdb\xc1\x95\x0a'),
TestCase("%d", "426265571", "%u", "426265571", b'\xc6\xaf\xc2\x96\x03'),
TestCase("%d", "1019467505", "%u", "1019467505", b'\xe2\xdb\x9e\xcc\x07'),
TestCase("%d", "353536599", "%u", "353536599", b'\xae\xa9\x94\xd1\x02'),
TestCase("%d", "1275925671", "%u", "1275925671", b'\xce\xd2\xe8\xc0\x09'),
TestCase("%d", "1250514267", "%u", "1250514267", b'\xb6\xd5\xca\xa8\x09'),
TestCase("%d", "1600951834", "%u", "1600951834", b'\xb4\xd8\xe4\xf6\x0b'),
TestCase("%d", "799391776", "%u", "799391776", b'\xc0\x80\xae\xfa\x05'),
TestCase("%d", "1812577120", "%u", "1812577120", b'\xc0\xed\xcd\xc0\x0d'),
# Random 16-bit ints
TestCase("%d", "12031", "%u", "12031", b'\xfe\xbb\x01'),
TestCase("%d", "17500", "%u", "17500", b'\xb8\x91\x02'),
TestCase("%d", "14710", "%u", "14710", b'\xec\xe5\x01'),
TestCase("%d", "8546", "%u", "8546", b'\xc4\x85\x01'),
TestCase("%d", "25208", "%u", "25208", b'\xf0\x89\x03'),
TestCase("%d", "29977", "%u", "29977", b'\xb2\xd4\x03'),
TestCase("%d", "31629", "%u", "31629", b'\x9a\xee\x03'),
TestCase("%d", "28612", "%u", "28612", b'\x88\xbf\x03'),
TestCase("%d", "4804", "%u", "4804", b'\x88\x4b'),
TestCase("%d", "7142", "%u", "7142", b'\xcc\x6f'),
TestCase("%d", "18567", "%u", "18567", b'\x8e\xa2\x02'),
TestCase("%d", "9376", "%u", "9376", b'\xc0\x92\x01'),
TestCase("%d", "19912", "%u", "19912", b'\x90\xb7\x02'),
TestCase("%d", "18", "%u", "18", b'\x24'),
TestCase("%d", "12097", "%u", "12097", b'\x82\xbd\x01'),
TestCase("%d", "4004", "%u", "4004", b'\xc8\x3e'),
TestCase("%d", "13241", "%u", "13241", b'\xf2\xce\x01'),
TestCase("%d", "17823", "%u", "17823", b'\xbe\x96\x02'),
TestCase("%d", "11129", "%u", "11129", b'\xf2\xad\x01'),
TestCase("%d", "16567", "%u", "16567", b'\xee\x82\x02'),
TestCase("%d", "9138", "%u", "9138", b'\xe4\x8e\x01'),
TestCase("%d", "31404", "%u", "31404", b'\xd8\xea\x03'),
TestCase("%d", "1072", "%u", "1072", b'\xe0\x10'),
TestCase("%d", "12870", "%u", "12870", b'\x8c\xc9\x01'),
TestCase("%d", "25499", "%u", "25499", b'\xb6\x8e\x03'),
TestCase("%d", "1640", "%u", "1640", b'\xd0\x19'),
TestCase("%d", "26764", "%u", "26764", b'\x98\xa2\x03'),
TestCase("%d", "2078", "%u", "2078", b'\xbc\x20'),
TestCase("%d", "10264", "%u", "10264", b'\xb0\xa0\x01'),
TestCase("%d", "15533", "%u", "15533", b'\xda\xf2\x01'),
TestCase("%d", "7701", "%u", "7701", b'\xaa\x78'),
TestCase("%d", "24302", "%u", "24302", b'\xdc\xfb\x02'),
TestCase("%d", "10568", "%u", "10568", b'\x90\xa5\x01'),
TestCase("%d", "2206", "%u", "2206", b'\xbc\x22'),
TestCase("%d", "16240", "%u", "16240", b'\xe0\xfd\x01'),
TestCase("%d", "16600", "%u", "16600", b'\xb0\x83\x02'),
TestCase("%d", "30984", "%u", "30984", b'\x90\xe4\x03'),
TestCase("%d", "18489", "%u", "18489", b'\xf2\xa0\x02'),
TestCase("%d", "8613", "%u", "8613", b'\xca\x86\x01'),
TestCase("%d", "26441", "%u", "26441", b'\x92\x9d\x03'),
TestCase("%d", "22831", "%u", "22831", b'\xde\xe4\x02'),
TestCase("%d", "2307", "%u", "2307", b'\x86\x24'),
TestCase("%d", "24179", "%u", "24179", b'\xe6\xf9\x02'),
TestCase("%d", "6400", "%u", "6400", b'\x80\x64'),
TestCase("%d", "4264", "%u", "4264", b'\xd0\x42'),
TestCase("%d", "20770", "%u", "20770", b'\xc4\xc4\x02'),
TestCase("%d", "24276", "%u", "24276", b'\xa8\xfb\x02'),
TestCase("%d", "27013", "%u", "27013", b'\x8a\xa6\x03'),
TestCase("%d", "30434", "%u", "30434", b'\xc4\xdb\x03'),
TestCase("%d", "8338", "%u", "8338", b'\xa4\x82\x01'),
TestCase("%d", "20544", "%u", "20544", b'\x80\xc1\x02'),
TestCase("%d", "22908", "%u", "22908", b'\xf8\xe5\x02'),
TestCase("%d", "7111", "%u", "7111", b'\x8e\x6f'),
TestCase("%d", "30015", "%u", "30015", b'\xfe\xd4\x03'),
TestCase("%d", "16241", "%u", "16241", b'\xe2\xfd\x01'),
TestCase("%d", "6262", "%u", "6262", b'\xec\x61'),
TestCase("%d", "30724", "%u", "30724", b'\x88\xe0\x03'),
TestCase("%d", "7761", "%u", "7761", b'\xa2\x79'),
TestCase("%d", "12306", "%u", "12306", b'\xa4\xc0\x01'),
TestCase("%d", "5472", "%u", "5472", b'\xc0\x55'),
TestCase("%d", "20833", "%u", "20833", b'\xc2\xc5\x02'),
TestCase("%d", "19726", "%u", "19726", b'\x9c\xb4\x02'),
TestCase("%d", "20971", "%u", "20971", b'\xd6\xc7\x02'),
TestCase("%d", "12697", "%u", "12697", b'\xb2\xc6\x01'),
TestCase("%d", "29872", "%u", "29872", b'\xe0\xd2\x03'),
TestCase("%d", "20930", "%u", "20930", b'\x84\xc7\x02'),
TestCase("%d", "11185", "%u", "11185", b'\xe2\xae\x01'),
TestCase("%d", "4894", "%u", "4894", b'\xbc\x4c'),
TestCase("%d", "21973", "%u", "21973", b'\xaa\xd7\x02'),
TestCase("%d", "32040", "%u", "32040", b'\xd0\xf4\x03'),
TestCase("%d", "26757", "%u", "26757", b'\x8a\xa2\x03'),
TestCase("%d", "18963", "%u", "18963", b'\xa6\xa8\x02'),
TestCase("%d", "338", "%u", "338", b'\xa4\x05'),
TestCase("%d", "18607", "%u", "18607", b'\xde\xa2\x02'),
TestCase("%d", "7633", "%u", "7633", b'\xa2\x77'),
TestCase("%d", "14357", "%u", "14357", b'\xaa\xe0\x01'),
TestCase("%d", "14672", "%u", "14672", b'\xa0\xe5\x01'),
TestCase("%d", "13025", "%u", "13025", b'\xc2\xcb\x01'),
TestCase("%d", "4413", "%u", "4413", b'\xfa\x44'),
TestCase("%d", "2946", "%u", "2946", b'\x84\x2e'),
TestCase("%d", "12641", "%u", "12641", b'\xc2\xc5\x01'),
TestCase("%d", "28130", "%u", "28130", b'\xc4\xb7\x03'),
TestCase("%d", "6892", "%u", "6892", b'\xd8\x6b'),
TestCase("%d", "27495", "%u", "27495", b'\xce\xad\x03'),
TestCase("%d", "11488", "%u", "11488", b'\xc0\xb3\x01'),
TestCase("%d", "23283", "%u", "23283", b'\xe6\xeb\x02'),
TestCase("%d", "29949", "%u", "29949", b'\xfa\xd3\x03'),
TestCase("%d", "5161", "%u", "5161", b'\xd2\x50'),
TestCase("%d", "10664", "%u", "10664", b'\xd0\xa6\x01'),
TestCase("%d", "22534", "%u", "22534", b'\x8c\xe0\x02'),
TestCase("%d", "6502", "%u", "6502", b'\xcc\x65'),
TestCase("%d", "28037", "%u", "28037", b'\x8a\xb6\x03'),
TestCase("%d", "305", "%u", "305", b'\xe2\x04'),
TestCase("%d", "32042", "%u", "32042", b'\xd4\xf4\x03'),
TestCase("%d", "8481", "%u", "8481", b'\xc2\x84\x01'),
TestCase("%d", "22068", "%u", "22068", b'\xe8\xd8\x02'),
TestCase("%d", "13788", "%u", "13788", b'\xb8\xd7\x01'),
TestCase("%d", "29904", "%u", "29904", b'\xa0\xd3\x03'),
TestCase("%d", "12689", "%u", "12689", b'\xa2\xc6\x01'),
TestCase("%d", "1205", "%u", "1205", b'\xea\x12'),
# All 8-bit numbers
TestCase("%d", "-128", "%u", "4294967168", b'\xff\x01'),
TestCase("%d", "-127", "%u", "4294967169", b'\xfd\x01'),
TestCase("%d", "-126", "%u", "4294967170", b'\xfb\x01'),
TestCase("%d", "-125", "%u", "4294967171", b'\xf9\x01'),
TestCase("%d", "-124", "%u", "4294967172", b'\xf7\x01'),
TestCase("%d", "-123", "%u", "4294967173", b'\xf5\x01'),
TestCase("%d", "-122", "%u", "4294967174", b'\xf3\x01'),
TestCase("%d", "-121", "%u", "4294967175", b'\xf1\x01'),
TestCase("%d", "-120", "%u", "4294967176", b'\xef\x01'),
TestCase("%d", "-119", "%u", "4294967177", b'\xed\x01'),
TestCase("%d", "-118", "%u", "4294967178", b'\xeb\x01'),
TestCase("%d", "-117", "%u", "4294967179", b'\xe9\x01'),
TestCase("%d", "-116", "%u", "4294967180", b'\xe7\x01'),
TestCase("%d", "-115", "%u", "4294967181", b'\xe5\x01'),
TestCase("%d", "-114", "%u", "4294967182", b'\xe3\x01'),
TestCase("%d", "-113", "%u", "4294967183", b'\xe1\x01'),
TestCase("%d", "-112", "%u", "4294967184", b'\xdf\x01'),
TestCase("%d", "-111", "%u", "4294967185", b'\xdd\x01'),
TestCase("%d", "-110", "%u", "4294967186", b'\xdb\x01'),
TestCase("%d", "-109", "%u", "4294967187", b'\xd9\x01'),
TestCase("%d", "-108", "%u", "4294967188", b'\xd7\x01'),
TestCase("%d", "-107", "%u", "4294967189", b'\xd5\x01'),
TestCase("%d", "-106", "%u", "4294967190", b'\xd3\x01'),
TestCase("%d", "-105", "%u", "4294967191", b'\xd1\x01'),
TestCase("%d", "-104", "%u", "4294967192", b'\xcf\x01'),
TestCase("%d", "-103", "%u", "4294967193", b'\xcd\x01'),
TestCase("%d", "-102", "%u", "4294967194", b'\xcb\x01'),
TestCase("%d", "-101", "%u", "4294967195", b'\xc9\x01'),
TestCase("%d", "-100", "%u", "4294967196", b'\xc7\x01'),
TestCase("%d", "-99", "%u", "4294967197", b'\xc5\x01'),
TestCase("%d", "-98", "%u", "4294967198", b'\xc3\x01'),
TestCase("%d", "-97", "%u", "4294967199", b'\xc1\x01'),
TestCase("%d", "-96", "%u", "4294967200", b'\xbf\x01'),
TestCase("%d", "-95", "%u", "4294967201", b'\xbd\x01'),
TestCase("%d", "-94", "%u", "4294967202", b'\xbb\x01'),
TestCase("%d", "-93", "%u", "4294967203", b'\xb9\x01'),
TestCase("%d", "-92", "%u", "4294967204", b'\xb7\x01'),
TestCase("%d", "-91", "%u", "4294967205", b'\xb5\x01'),
TestCase("%d", "-90", "%u", "4294967206", b'\xb3\x01'),
TestCase("%d", "-89", "%u", "4294967207", b'\xb1\x01'),
TestCase("%d", "-88", "%u", "4294967208", b'\xaf\x01'),
TestCase("%d", "-87", "%u", "4294967209", b'\xad\x01'),
TestCase("%d", "-86", "%u", "4294967210", b'\xab\x01'),
TestCase("%d", "-85", "%u", "4294967211", b'\xa9\x01'),
TestCase("%d", "-84", "%u", "4294967212", b'\xa7\x01'),
TestCase("%d", "-83", "%u", "4294967213", b'\xa5\x01'),
TestCase("%d", "-82", "%u", "4294967214", b'\xa3\x01'),
TestCase("%d", "-81", "%u", "4294967215", b'\xa1\x01'),
TestCase("%d", "-80", "%u", "4294967216", b'\x9f\x01'),
TestCase("%d", "-79", "%u", "4294967217", b'\x9d\x01'),
TestCase("%d", "-78", "%u", "4294967218", b'\x9b\x01'),
TestCase("%d", "-77", "%u", "4294967219", b'\x99\x01'),
TestCase("%d", "-76", "%u", "4294967220", b'\x97\x01'),
TestCase("%d", "-75", "%u", "4294967221", b'\x95\x01'),
TestCase("%d", "-74", "%u", "4294967222", b'\x93\x01'),
TestCase("%d", "-73", "%u", "4294967223", b'\x91\x01'),
TestCase("%d", "-72", "%u", "4294967224", b'\x8f\x01'),
TestCase("%d", "-71", "%u", "4294967225", b'\x8d\x01'),
TestCase("%d", "-70", "%u", "4294967226", b'\x8b\x01'),
TestCase("%d", "-69", "%u", "4294967227", b'\x89\x01'),
TestCase("%d", "-68", "%u", "4294967228", b'\x87\x01'),
TestCase("%d", "-67", "%u", "4294967229", b'\x85\x01'),
TestCase("%d", "-66", "%u", "4294967230", b'\x83\x01'),
TestCase("%d", "-65", "%u", "4294967231", b'\x81\x01'),
TestCase("%d", "-64", "%u", "4294967232", b'\x7f'),
TestCase("%d", "-63", "%u", "4294967233", b'\x7d'),
TestCase("%d", "-62", "%u", "4294967234", b'\x7b'),
TestCase("%d", "-61", "%u", "4294967235", b'\x79'),
TestCase("%d", "-60", "%u", "4294967236", b'\x77'),
TestCase("%d", "-59", "%u", "4294967237", b'\x75'),
TestCase("%d", "-58", "%u", "4294967238", b'\x73'),
TestCase("%d", "-57", "%u", "4294967239", b'\x71'),
TestCase("%d", "-56", "%u", "4294967240", b'\x6f'),
TestCase("%d", "-55", "%u", "4294967241", b'\x6d'),
TestCase("%d", "-54", "%u", "4294967242", b'\x6b'),
TestCase("%d", "-53", "%u", "4294967243", b'\x69'),
TestCase("%d", "-52", "%u", "4294967244", b'\x67'),
TestCase("%d", "-51", "%u", "4294967245", b'\x65'),
TestCase("%d", "-50", "%u", "4294967246", b'\x63'),
TestCase("%d", "-49", "%u", "4294967247", b'\x61'),
TestCase("%d", "-48", "%u", "4294967248", b'\x5f'),
TestCase("%d", "-47", "%u", "4294967249", b'\x5d'),
TestCase("%d", "-46", "%u", "4294967250", b'\x5b'),
TestCase("%d", "-45", "%u", "4294967251", b'\x59'),
TestCase("%d", "-44", "%u", "4294967252", b'\x57'),
TestCase("%d", "-43", "%u", "4294967253", b'\x55'),
TestCase("%d", "-42", "%u", "4294967254", b'\x53'),
TestCase("%d", "-41", "%u", "4294967255", b'\x51'),
TestCase("%d", "-40", "%u", "4294967256", b'\x4f'),
TestCase("%d", "-39", "%u", "4294967257", b'\x4d'),
TestCase("%d", "-38", "%u", "4294967258", b'\x4b'),
TestCase("%d", "-37", "%u", "4294967259", b'\x49'),
TestCase("%d", "-36", "%u", "4294967260", b'\x47'),
TestCase("%d", "-35", "%u", "4294967261", b'\x45'),
TestCase("%d", "-34", "%u", "4294967262", b'\x43'),
TestCase("%d", "-33", "%u", "4294967263", b'\x41'),
TestCase("%d", "-32", "%u", "4294967264", b'\x3f'),
TestCase("%d", "-31", "%u", "4294967265", b'\x3d'),
TestCase("%d", "-30", "%u", "4294967266", b'\x3b'),
TestCase("%d", "-29", "%u", "4294967267", b'\x39'),
TestCase("%d", "-28", "%u", "4294967268", b'\x37'),
TestCase("%d", "-27", "%u", "4294967269", b'\x35'),
TestCase("%d", "-26", "%u", "4294967270", b'\x33'),
TestCase("%d", "-25", "%u", "4294967271", b'\x31'),
TestCase("%d", "-24", "%u", "4294967272", b'\x2f'),
TestCase("%d", "-23", "%u", "4294967273", b'\x2d'),
TestCase("%d", "-22", "%u", "4294967274", b'\x2b'),
TestCase("%d", "-21", "%u", "4294967275", b'\x29'),
TestCase("%d", "-20", "%u", "4294967276", b'\x27'),
TestCase("%d", "-19", "%u", "4294967277", b'\x25'),
TestCase("%d", "-18", "%u", "4294967278", b'\x23'),
TestCase("%d", "-17", "%u", "4294967279", b'\x21'),
TestCase("%d", "-16", "%u", "4294967280", b'\x1f'),
TestCase("%d", "-15", "%u", "4294967281", b'\x1d'),
TestCase("%d", "-14", "%u", "4294967282", b'\x1b'),
TestCase("%d", "-13", "%u", "4294967283", b'\x19'),
TestCase("%d", "-12", "%u", "4294967284", b'\x17'),
TestCase("%d", "-11", "%u", "4294967285", b'\x15'),
TestCase("%d", "-10", "%u", "4294967286", b'\x13'),
TestCase("%d", "-9", "%u", "4294967287", b'\x11'),
TestCase("%d", "-8", "%u", "4294967288", b'\x0f'),
TestCase("%d", "-7", "%u", "4294967289", b'\x0d'),
TestCase("%d", "-6", "%u", "4294967290", b'\x0b'),
TestCase("%d", "-5", "%u", "4294967291", b'\x09'),
TestCase("%d", "-4", "%u", "4294967292", b'\x07'),
TestCase("%d", "-3", "%u", "4294967293", b'\x05'),
TestCase("%d", "-2", "%u", "4294967294", b'\x03'),
TestCase("%d", "-1", "%u", "4294967295", b'\x01'),
TestCase("%d", "0", "%u", "0", b'\x00'),
TestCase("%d", "1", "%u", "1", b'\x02'),
TestCase("%d", "2", "%u", "2", b'\x04'),
TestCase("%d", "3", "%u", "3", b'\x06'),
TestCase("%d", "4", "%u", "4", b'\x08'),
TestCase("%d", "5", "%u", "5", b'\x0a'),
TestCase("%d", "6", "%u", "6", b'\x0c'),
TestCase("%d", "7", "%u", "7", b'\x0e'),
TestCase("%d", "8", "%u", "8", b'\x10'),
TestCase("%d", "9", "%u", "9", b'\x12'),
TestCase("%d", "10", "%u", "10", b'\x14'),
TestCase("%d", "11", "%u", "11", b'\x16'),
TestCase("%d", "12", "%u", "12", b'\x18'),
TestCase("%d", "13", "%u", "13", b'\x1a'),
TestCase("%d", "14", "%u", "14", b'\x1c'),
TestCase("%d", "15", "%u", "15", b'\x1e'),
TestCase("%d", "16", "%u", "16", b'\x20'),
TestCase("%d", "17", "%u", "17", b'\x22'),
TestCase("%d", "18", "%u", "18", b'\x24'),
TestCase("%d", "19", "%u", "19", b'\x26'),
TestCase("%d", "20", "%u", "20", b'\x28'),
TestCase("%d", "21", "%u", "21", b'\x2a'),
TestCase("%d", "22", "%u", "22", b'\x2c'),
TestCase("%d", "23", "%u", "23", b'\x2e'),
TestCase("%d", "24", "%u", "24", b'\x30'),
TestCase("%d", "25", "%u", "25", b'\x32'),
TestCase("%d", "26", "%u", "26", b'\x34'),
TestCase("%d", "27", "%u", "27", b'\x36'),
TestCase("%d", "28", "%u", "28", b'\x38'),
TestCase("%d", "29", "%u", "29", b'\x3a'),
TestCase("%d", "30", "%u", "30", b'\x3c'),
TestCase("%d", "31", "%u", "31", b'\x3e'),
TestCase("%d", "32", "%u", "32", b'\x40'),
TestCase("%d", "33", "%u", "33", b'\x42'),
TestCase("%d", "34", "%u", "34", b'\x44'),
TestCase("%d", "35", "%u", "35", b'\x46'),
TestCase("%d", "36", "%u", "36", b'\x48'),
TestCase("%d", "37", "%u", "37", b'\x4a'),
TestCase("%d", "38", "%u", "38", b'\x4c'),
TestCase("%d", "39", "%u", "39", b'\x4e'),
TestCase("%d", "40", "%u", "40", b'\x50'),
TestCase("%d", "41", "%u", "41", b'\x52'),
TestCase("%d", "42", "%u", "42", b'\x54'),
TestCase("%d", "43", "%u", "43", b'\x56'),
TestCase("%d", "44", "%u", "44", b'\x58'),
TestCase("%d", "45", "%u", "45", b'\x5a'),
TestCase("%d", "46", "%u", "46", b'\x5c'),
TestCase("%d", "47", "%u", "47", b'\x5e'),
TestCase("%d", "48", "%u", "48", b'\x60'),
TestCase("%d", "49", "%u", "49", b'\x62'),
TestCase("%d", "50", "%u", "50", b'\x64'),
TestCase("%d", "51", "%u", "51", b'\x66'),
TestCase("%d", "52", "%u", "52", b'\x68'),
TestCase("%d", "53", "%u", "53", b'\x6a'),
TestCase("%d", "54", "%u", "54", b'\x6c'),
TestCase("%d", "55", "%u", "55", b'\x6e'),
TestCase("%d", "56", "%u", "56", b'\x70'),
TestCase("%d", "57", "%u", "57", b'\x72'),
TestCase("%d", "58", "%u", "58", b'\x74'),
TestCase("%d", "59", "%u", "59", b'\x76'),
TestCase("%d", "60", "%u", "60", b'\x78'),
TestCase("%d", "61", "%u", "61", b'\x7a'),
TestCase("%d", "62", "%u", "62", b'\x7c'),
TestCase("%d", "63", "%u", "63", b'\x7e'),
TestCase("%d", "64", "%u", "64", b'\x80\x01'),
TestCase("%d", "65", "%u", "65", b'\x82\x01'),
TestCase("%d", "66", "%u", "66", b'\x84\x01'),
TestCase("%d", "67", "%u", "67", b'\x86\x01'),
TestCase("%d", "68", "%u", "68", b'\x88\x01'),
TestCase("%d", "69", "%u", "69", b'\x8a\x01'),
TestCase("%d", "70", "%u", "70", b'\x8c\x01'),
TestCase("%d", "71", "%u", "71", b'\x8e\x01'),
TestCase("%d", "72", "%u", "72", b'\x90\x01'),
TestCase("%d", "73", "%u", "73", b'\x92\x01'),
TestCase("%d", "74", "%u", "74", b'\x94\x01'),
TestCase("%d", "75", "%u", "75", b'\x96\x01'),
TestCase("%d", "76", "%u", "76", b'\x98\x01'),
TestCase("%d", "77", "%u", "77", b'\x9a\x01'),
TestCase("%d", "78", "%u", "78", b'\x9c\x01'),
TestCase("%d", "79", "%u", "79", b'\x9e\x01'),
TestCase("%d", "80", "%u", "80", b'\xa0\x01'),
TestCase("%d", "81", "%u", "81", b'\xa2\x01'),
TestCase("%d", "82", "%u", "82", b'\xa4\x01'),
TestCase("%d", "83", "%u", "83", b'\xa6\x01'),
TestCase("%d", "84", "%u", "84", b'\xa8\x01'),
TestCase("%d", "85", "%u", "85", b'\xaa\x01'),
TestCase("%d", "86", "%u", "86", b'\xac\x01'),
TestCase("%d", "87", "%u", "87", b'\xae\x01'),
TestCase("%d", "88", "%u", "88", b'\xb0\x01'),
TestCase("%d", "89", "%u", "89", b'\xb2\x01'),
TestCase("%d", "90", "%u", "90", b'\xb4\x01'),
TestCase("%d", "91", "%u", "91", b'\xb6\x01'),
TestCase("%d", "92", "%u", "92", b'\xb8\x01'),
TestCase("%d", "93", "%u", "93", b'\xba\x01'),
TestCase("%d", "94", "%u", "94", b'\xbc\x01'),
TestCase("%d", "95", "%u", "95", b'\xbe\x01'),
TestCase("%d", "96", "%u", "96", b'\xc0\x01'),
TestCase("%d", "97", "%u", "97", b'\xc2\x01'),
TestCase("%d", "98", "%u", "98", b'\xc4\x01'),
TestCase("%d", "99", "%u", "99", b'\xc6\x01'),
TestCase("%d", "100", "%u", "100", b'\xc8\x01'),
TestCase("%d", "101", "%u", "101", b'\xca\x01'),
TestCase("%d", "102", "%u", "102", b'\xcc\x01'),
TestCase("%d", "103", "%u", "103", b'\xce\x01'),
TestCase("%d", "104", "%u", "104", b'\xd0\x01'),
TestCase("%d", "105", "%u", "105", b'\xd2\x01'),
TestCase("%d", "106", "%u", "106", b'\xd4\x01'),
TestCase("%d", "107", "%u", "107", b'\xd6\x01'),
TestCase("%d", "108", "%u", "108", b'\xd8\x01'),
TestCase("%d", "109", "%u", "109", b'\xda\x01'),
TestCase("%d", "110", "%u", "110", b'\xdc\x01'),
TestCase("%d", "111", "%u", "111", b'\xde\x01'),
TestCase("%d", "112", "%u", "112", b'\xe0\x01'),
TestCase("%d", "113", "%u", "113", b'\xe2\x01'),
TestCase("%d", "114", "%u", "114", b'\xe4\x01'),
TestCase("%d", "115", "%u", "115", b'\xe6\x01'),
TestCase("%d", "116", "%u", "116", b'\xe8\x01'),
TestCase("%d", "117", "%u", "117", b'\xea\x01'),
TestCase("%d", "118", "%u", "118", b'\xec\x01'),
TestCase("%d", "119", "%u", "119", b'\xee\x01'),
TestCase("%d", "120", "%u", "120", b'\xf0\x01'),
TestCase("%d", "121", "%u", "121", b'\xf2\x01'),
TestCase("%d", "122", "%u", "122", b'\xf4\x01'),
TestCase("%d", "123", "%u", "123", b'\xf6\x01'),
TestCase("%d", "124", "%u", "124", b'\xf8\x01'),
TestCase("%d", "125", "%u", "125", b'\xfa\x01'),
TestCase("%d", "126", "%u", "126", b'\xfc\x01'),
TestCase("%d", "127", "%u", "127", b'\xfe\x01'),
)
|
"""
Copyright (C) 2004-2010 by
Rong ZhengQin <rongzhengqin@honortech.cn>
Distributed with BSD license.
All rights reserved, see LICENSE for details.
"""
|
"""
Bonus task: load all the available coffee recipes from the folder 'recipes/'
File format:
first line: coffee name
next lines: resource=percentage
info and examples for handling files:
http://cs.curs.pub.ro/wiki/asc/asc:lab1:index#operatii_cu_fisiere
https://docs.python.org/3/library/io.html
https://docs.python.org/3/library/os.path.html
"""
RECIPES_FOLDER = "recipes"
ESPRESSO = "espresso"
AMERICANO = "americano"
CAPPUCCINO = "cappuccino"
def read_file(file):
file = open(file, 'r')
coffee_type = file.readline()
coffee_type = coffee_type[:-1]
water_percent = file.readline()
water_percent = water_percent[:-1]
coffee_percent = file.readline()
coffee_percent = coffee_percent[:-1]
milk_percent = file.readline()
milk_percent = milk_percent[:-1]
cappuccino_capacities = []
espresso_capacities = []
americano_capacities = []
if coffee_type == CAPPUCCINO:
cappuccino_capacities = [water_percent.split("=",1)[1], coffee_percent.split("=",1)[1], milk_percent.split("=",1)[1]]
elif coffee_type == ESPRESSO:
espresso_capacities = [water_percent.split("=",1)[1], coffee_percent.split("=",1)[1], milk_percent.split("=",1)[1]]
elif coffee_type == AMERICANO:
americano_capacities = [water_percent.split("=",1)[1], coffee_percent.split("=",1)[1], milk_percent.split("=",1)[1]]
return cappuccino_capacities, americano_capacities, espresso_capacities
|
# Escreva um programaque leia a velocidade de um carro. Se ele ultrapassar 80Km/h,
# moostre uma mensagem que ele foi multado. A multa vai custar R$7,00 por cada
# Km acima do limite.
velocidade = float(input('Qual a velocidade atual do veículo? '))
if velocidade > 80:
print('VOCÊ FOI MULTADO! Pois você excedeu o limite permitido de 80Km/h')
multa = (velocidade - 80) * 7
print('Você deve pagar uma multa por excedente no valor de R${:.2f}!'.format(multa))
else:
print('Tenha um Bom dia! Dirija com segurança!')
|
s = input()
t = input()
print()
|
def front_back(str):
if len(str) < 2:
return str
n = len(str)
first_char = str[0]
last_char = str[n-1]
middle_chars = str[1:(n-1)]
return last_char + middle_chars + first_char
|
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Jan 3 11:54:10 2022
@author: mariaolaru
"""
def get_next_trial_params(df_trials, max_amp, STIM_AMP_INTERVAL, STIM_FREQ_INTERVAL, init_stim_freq, entrain_trial_kernel):
#Place holder algorithm for now
t = df_trials['entrained'].count()-1
curr_max_amp = get_curr_max_amp(max_amp, init_stim_freq, df_trials['stim_freq'][t])
amp_curr = df_trials['stim_amp'][t]
freq_curr = df_trials['stim_freq'][t]
entrain_curr = df_trials['entrained'][t]
if t == 0:
amp_next = amp_curr - STIM_AMP_INTERVAL #begin traveling down in amplitude
freq_next = freq_curr
return [amp_next, freq_next, t+1]
amp_prev = df_trials['stim_amp'][t-1]
freq_prev = df_trials['stim_freq'][t-1]
entrain_prev = df_trials['entrained'][t-1]
travel_down = amp_curr < amp_prev
travel_up = amp_curr > amp_prev
travel_left = freq_curr < freq_prev
travel_right = freq_curr > freq_prev
travel_opts = [travel_down, travel_up, travel_left, travel_right]
if entrain_prev == False:
amp_next = amp_curr - STIM_AMP_INTERVAL
freq_next = freq_curr
elif entrain_prev == True:
if entrain_curr == False:
if travel_opts[0] == True:
amp_next = df_trials.loc[entrain_trial_kernel, 'stim_amp'] + STIM_AMP_INTERVAL
freq_next = freq_curr
elif travel_opts[1] == True:
amp_next = df_trials.loc[entrain_trial_kernel, 'stim_amp']
freq_next = df_trials.loc[entrain_trial_kernel, 'stim_freq'] - STIM_FREQ_INTERVAL
if(redundant_settings(df_trials, amp_next, freq_next)):
travel_opts[3] = True ##CONTINUE WORKING ON THIS TOMORROW
amp_next = df_trials.loc[entrain_trial_kernel, 'stim_amp'] - STIM_AMP_INTERVAL
freq_next = df_trials.loc[entrain_trial_kernel, 'stim_freq'] - STIM_FREQ_INTERVAL*2
curr_kernel = t+1
elif travel_opts[2] == True:
amp_next = df_trials.loc[entrain_trial_kernel, 'stim_amp']
freq_next = df_trials.loc[entrain_trial_kernel, 'stim_freq'] + STIM_FREQ_INTERVAL
elif travel_opts[3] == True:
amp_next = df_trials.loc[entrain_trial_kernel, 'stim_amp'] - STIM_AMP_INTERVAL
freq_next = df_trials.loc[entrain_trial_kernel, 'stim_freq'] - STIM_FREQ_INTERVAL*2
curr_kernel = t+1
elif entrain_curr == True:
if travel_opts[0] == True:
amp_next = df_trials.loc[entrain_trial_kernel, 'stim_amp'] - STIM_AMP_INTERVAL
freq_next = freq_curr
elif travel_opts[1] == True:
amp_next = df_trials.loc[entrain_trial_kernel, 'stim_amp'] + STIM_AMP_INTERVAL
freq_next = freq_curr
elif travel_opts[2] == True:
amp_next = df_trials.loc[entrain_trial_kernel, 'stim_amp']
freq_next = freq_curr - STIM_FREQ_INTERVAL
elif travel_opts[2] == True:
amp_next = df_trials.loc[entrain_trial_kernel, 'stim_amp']
freq_next = freq_curr + STIM_FREQ_INTERVAL
[amp_next, freq_next] = redundant_settings(df_trials, amp_next, freq_next)
return [amp_next, freq_next, entrain_trial_kernel]
def get_curr_max_amp(max_amp, init_stim_freq, curr_stim_freq):
FREQ_INTERVAL = 2.5
AMP_INTERVAL = 0.1
d_freq = abs(init_stim_freq - curr_stim_freq)
num_amp_steps = d_freq/FREQ_INTERVAL
curr_max_amp = max_amp - (num_amp_steps*AMP_INTERVAL)
return curr_max_amp
def redundant_settings(df_trials, amp_next, freq_next):
redund = False
amp_redund = False
freq_redund = False
if (df_trials['stim_amp'] == amp_next).any():
amp_redund = True
if (df_trials['stim_freq'] == freq_next).any():
freq_redund = True
if ((amp_redund == True) & (freq_redund == True)):
redund = True
return redund
|
'''
Mr. X's birthday is in next month. This time he is planning to invite N of his friends. He wants to distribute some chocolates to all of his friends after party. He went to a shop to buy a packet of chocolates.
At chocolate shop, each packet is having different number of chocolates. He wants to buy such a packet which contains number of chocolates, which can be distributed equally among all of his friends.
Help Mr. X to buy such a packet.
Input:
First line contains T, number of test cases.
Each test case contains two integers, N and M. where is N is number of friends and M is number number of chocolates in a packet.
Output:
In each test case output "Yes" if he can buy that packet and "No" if he can't buy that packet.
Constraints:
1<=T<=20
1<=N<=100
1<=M<=10^5
SAMPLE INPUT
2
5 14
3 21
SAMPLE OUTPUT
No
Yes
Explanation
Test Case 1:
There is no way such that he can distribute 14 chocolates among 5 friends equally.
Test Case 2:
There are 21 chocolates and 3 friends, so he can distribute chocolates eqally. Each friend will get 7 chocolates.
'''
t= int(input())
for i in range(t):
p,t = map(int,input().split())
print("Yes" if t % p == 0 else "No")
|
# print ("hello world")
# import sys
# print(sys.version)
# columns = [0,2,4,6,8,10,12,14,16,18,20,22,24,25,27,29,31,33,35,37,39,41,43,45,47,49,50,52,54,56,58,60,62,64,66,68,70,72,74,75,77,79,81,83,85,87,89,91,93,95,97,]
for x in range(0, 125):
print('P[c:{0}] (0,255,0), '.format(x%125), end='') # Green
print('P[c:{0}] (255,255,0), '.format((x+25)%125), end='') # Yellow
print('P[c:{0}] (255,255,255), '.format((x+50)%125), end='') # White
print('P[c:{0}] (127,0,255), '.format((x+75)%125), end='') # Purple
print('P[c:{0}] (0,0,255)'.format((x+100)%125), end='') # Blue
print(';')
|
class Morse:
DOT = '.'
DASH = '-'
characters = {
(DOT, DASH): 'A',
(DASH, DOT, DOT, DOT): 'B',
(DASH, DOT, DASH, DOT): 'C',
(DASH, DOT, DOT): 'D',
(DOT,): 'E',
(DOT, DOT, DASH, DOT): 'F',
(DASH, DASH, DOT): 'G',
(DOT, DOT, DOT, DOT): 'H',
(DOT, DOT): 'I',
(DOT, DASH, DASH, DASH): 'J',
(DASH, DOT, DASH): 'K',
(DOT, DASH, DOT, DOT): 'L',
(DASH, DASH): 'M',
(DASH, DOT): 'N',
(DASH, DASH, DASH): 'O',
(DOT, DASH, DASH, DOT): 'P',
(DASH, DASH, DOT, DASH): 'Q',
(DOT, DASH, DOT): 'R',
(DOT, DOT, DOT): 'S',
(DASH,): 'T',
(DOT, DOT, DASH): 'U',
(DOT, DOT, DOT, DASH): 'V',
(DOT, DASH, DASH): 'W',
(DASH, DOT, DOT, DASH): 'X',
(DASH, DOT, DASH, DASH): 'Y',
(DASH, DASH, DOT, DOT): 'Z',
(DASH, DASH, DASH, DASH, DASH): '0',
(DOT, DASH, DASH, DASH, DASH): '1',
(DOT, DOT, DASH, DASH, DASH): '2',
(DOT, DOT, DOT, DASH, DASH): '3',
(DOT, DOT, DOT, DOT, DASH): '4',
(DOT, DOT, DOT, DOT, DOT): '5',
(DASH, DOT, DOT, DOT, DOT): '6',
(DASH, DASH, DOT, DOT, DOT): '7',
(DASH, DASH, DASH, DOT, DOT): '8',
(DASH, DASH, DASH, DASH, DOT): '9'
}
def toTuple(morseString):
characterList = []
for character in morseString:
if character == '.':
characterList.append(Morse.DOT)
elif character == '-':
characterList.append(Morse.DASH)
else:
raise ValueError('Invalid Character in Morse')
return tuple(characterList)
def morseToWord(morseWord, delimiter=' ', uppercase=True):
newWord = ''
for word in morseWord.split(delimiter):
newWord += Morse.characters[Morse.toTuple(word)]
return newWord if uppercase else newWord.lower()
if __name__ == '__main__':
print(Morse().morseToWord('-.- - .- -. . -- --- .-. ... . ... --- .-.. ...- . .-.'))
|
n = 5 # limit or size
for x in range(1, n + 1):
print(" " + str(2 * x - 1), end="")
"""
OUTPUT:
1 3 5 7 9
"""
|
"""
@Author: huuuuusy
@GitHub: https://github.com/huuuuusy
系统: Ubuntu 18.04
IDE: VS Code 1.39
工具: python == 3.7.3
"""
"""
思路:
滑动窗口
结果:
执行用时 : 1320 ms, 在所有 Python3 提交中击败了38.54%的用户
内存消耗 : 17.4 MB, 在所有 Python3 提交中击败了5.79%的用户
"""
class Solution:
def findMaxAverage(self, nums, k):
res = _sum = sum(nums[0:k]) # 初始时的连续数的和
for i in range(k, len(nums)):
_sum += nums[i] - nums[i-k] # 滑动窗口
res = max(res, _sum) # 保留最大值
return res / k
if __name__ == "__main__":
nums = [1,12,-5,-6,50,3]
k = 4
answer = Solution().findMaxAverage(nums, k)
print(answer)
|
# ScalePairs.py
# Chromatic definitions of different scale types
# Guide:
# C:1, Db:2, D:3, Eb:4, E:5, F:6, Gb:7, G:8, Ab:9, A:10, Bb:11, B:12
scalePairs = []
# Copied from NodeBeat's "NodeBeat Classic"
scalePairs += [("KosBeat\nClassic", [1, 3, 6, 8, 10])]
scalePairs += [("Major", [1, 3, 5, 6, 8, 10, 12])]
scalePairs += [("Major\nPentatonic", [1, 3, 5, 8, 10])]
scalePairs += [("Minor\nPentatonic", [1, 4, 6, 8, 11])]
scalePairs += [("Natural\nMinor", [1, 3, 4, 6, 8, 9, 11])]
scalePairs += [("Harmonic\nMinor", [1, 3, 4, 6, 8, 10, 12])]
scalePairs += [("Melodic\nMinor", [1,3,4,6, 8, 8, 10, 12 ])]
scalePairs += [("Chromatic", [1,2,3,4,5,6,7,8,9,10,11,12])]
scalePairs += [("Whole\nTone", [1,3,5,7,9,11])]
scalePairs += [("Blues", [1, 4, 6, 7, 8, 11])]
scalePairs += [("Bebop", [1, 3, 5, 6, 8, 10, 11, 12])]
scalePairs += [("Algerian", [1, 3, 4, 7, 8, 9, 12])]
scalePairs += [("Spanish", [1, 2, 5, 6, 8, 9, 11])]
scalePairs += [("Arabic", [1, 2, 5, 6, 8, 9, 12])]
scalePairs += [("Hungarian", [1, 3, 4, 7, 8, 9, 12])]
scalePairs += [("Egyptian", [1, 3, 4, 7, 8, 9, 11])]
scalePairs += [("Inuit", [1, 3, 5, 8])]
scalePairs += [("Japanese", [1, 3, 4, 8, 9])]
|
# ==================================
# Author : fang
# Time : 2020/5/28 14:33
# Email : zhen.fang@qdreamer.com
# File : config.py
# Software : PyCharm
# ==================================
TOKEN_SIGN = "ihudongketang"
TOKEN_ALGORITHM = 'HS256'
TOKEN_EXP = 86400 # token超时时间(/s) 60 * 60 * 24(一天)
ORIGINAL_PW = "123456"
|
valores = []
impares = []
pares = []
while True:
valor = int(input('Digite um valor: '))
valores.append(valor)
if valor % 2 == 0 and valor != 0:
pares.append(valor)
else:
impares.append(valor)
continuar = input('Quer continuar [S/N] ')
str(continuar)
while continuar != 's' and continuar != 'n':
print('Não entendi. Tente novamente!')
continuar = input('Quer continuar [S/N] ')
if continuar == 'n':
break
print(f'\nTodos os valores informados: {valores}')
print(f'Todos os valores pares digitados: {pares}')
print(f'Todos os valores ímpares digitados: {impares}')
|
#
# PySNMP MIB module TIMETRA-SAS-FILTER-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/TIMETRA-SAS-FILTER-MIB
# Produced by pysmi-0.3.4 at Wed May 1 15:21:39 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, ValueSizeConstraint, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "SingleValueConstraint", "ConstraintsIntersection", "ValueSizeConstraint", "ConstraintsUnion")
InetAddressIPv6, InetAddressPrefixLength = mibBuilder.importSymbols("INET-ADDRESS-MIB", "InetAddressIPv6", "InetAddressPrefixLength")
ObjectGroup, NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "ObjectGroup", "NotificationGroup", "ModuleCompliance")
NotificationType, Opaque, MibIdentifier, Integer32, Unsigned32, ModuleIdentity, IpAddress, Counter32, iso, Gauge32, TimeTicks, MibScalar, MibTable, MibTableRow, MibTableColumn, Bits, Counter64, ObjectIdentity = mibBuilder.importSymbols("SNMPv2-SMI", "NotificationType", "Opaque", "MibIdentifier", "Integer32", "Unsigned32", "ModuleIdentity", "IpAddress", "Counter32", "iso", "Gauge32", "TimeTicks", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Bits", "Counter64", "ObjectIdentity")
MacAddress, RowStatus, DisplayString, TimeStamp, RowPointer, TruthValue, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "MacAddress", "RowStatus", "DisplayString", "TimeStamp", "RowPointer", "TruthValue", "TextualConvention")
tIPFilterEntry, tIPv6FilterEntry = mibBuilder.importSymbols("TIMETRA-FILTER-MIB", "tIPFilterEntry", "tIPv6FilterEntry")
tmnxSRNotifyPrefix, tmnxSRObjs, timetraSRMIBModules, tmnxSRConfs = mibBuilder.importSymbols("TIMETRA-GLOBAL-MIB", "tmnxSRNotifyPrefix", "tmnxSRObjs", "timetraSRMIBModules", "tmnxSRConfs")
timetraSASObjs, timetraSASNotifyPrefix, timetraSASModules, timetraSASConfs = mibBuilder.importSymbols("TIMETRA-SAS-GLOBAL-MIB", "timetraSASObjs", "timetraSASNotifyPrefix", "timetraSASModules", "timetraSASConfs")
TItemDescription, TDSCPFilterActionValue, TNamedItemOrEmpty, TmnxServId, ServiceAccessPoint, TFrameType, TNamedItem, TmnxAdminState, TTcpUdpPort, TIpOption, TmnxEncapVal, Dot1PPriority, SdpBindId, TDSCPNameOrEmpty, TTcpUdpPortOperator, TIpProtocol, TmnxPortID, IpAddressPrefixLength, TmnxOperState = mibBuilder.importSymbols("TIMETRA-TC-MIB", "TItemDescription", "TDSCPFilterActionValue", "TNamedItemOrEmpty", "TmnxServId", "ServiceAccessPoint", "TFrameType", "TNamedItem", "TmnxAdminState", "TTcpUdpPort", "TIpOption", "TmnxEncapVal", "Dot1PPriority", "SdpBindId", "TDSCPNameOrEmpty", "TTcpUdpPortOperator", "TIpProtocol", "TmnxPortID", "IpAddressPrefixLength", "TmnxOperState")
timetraSASFilterMIBModule = ModuleIdentity((1, 3, 6, 1, 4, 1, 6527, 6, 2, 1, 1, 16))
timetraSASFilterMIBModule.setRevisions(('1912-04-01 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: timetraSASFilterMIBModule.setRevisionsDescriptions(('Rev 1.0 01 Apr 2012 00:00 1.0 release of the TIMETRA-SAS-FILTER-MIB.',))
if mibBuilder.loadTexts: timetraSASFilterMIBModule.setLastUpdated('1204010000Z')
if mibBuilder.loadTexts: timetraSASFilterMIBModule.setOrganization('Alcatel')
if mibBuilder.loadTexts: timetraSASFilterMIBModule.setContactInfo('Alcatel 7x50 Support Web: http://www.alcatel.com/comps/pages/carrier_support.jhtml')
if mibBuilder.loadTexts: timetraSASFilterMIBModule.setDescription("This document is the SNMP MIB module to manage and provision Filter features on Alcatel 7x50 systems. Copyright 2003-2012 Alcatel-Lucent. All rights reserved. Reproduction of this document is authorized on the condition that the foregoing copyright notice is included. This SNMP MIB module (Specification) embodies Alcatel's proprietary intellectual property. Alcatel retains all title and ownership in the Specification, including any revisions. Alcatel grants all interested parties a non-exclusive license to use and distribute an unmodified copy of this Specification in connection with management of Alcatel products, and without fee, provided this copyright notice and license appear on all copies. This Specification is supplied 'as is', and Alcatel makes no warranty, either express or implied, as to the use, operation, condition, or performance of the Specification.")
tmnxSASFilterObjs = MibIdentifier((1, 3, 6, 1, 4, 1, 6527, 6, 2, 2, 2, 21))
tSASFilterObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 6527, 6, 2, 2, 2, 21, 1))
tIPFilterExtnTable = MibTable((1, 3, 6, 1, 4, 1, 6527, 6, 2, 2, 2, 21, 1, 1), )
if mibBuilder.loadTexts: tIPFilterExtnTable.setStatus('current')
if mibBuilder.loadTexts: tIPFilterExtnTable.setDescription('Contains a List of all ip filters configured on this system.')
tIPFilterExtnEntry = MibTableRow((1, 3, 6, 1, 4, 1, 6527, 6, 2, 2, 2, 21, 1, 1, 1), )
tIPFilterEntry.registerAugmentions(("TIMETRA-SAS-FILTER-MIB", "tIPFilterExtnEntry"))
tIPFilterExtnEntry.setIndexNames(*tIPFilterEntry.getIndexNames())
if mibBuilder.loadTexts: tIPFilterExtnEntry.setStatus('current')
if mibBuilder.loadTexts: tIPFilterExtnEntry.setDescription('Information about a particular IP Filter entry. Entries are created/deleted by user. Entries have a presumed StorageType of nonVolatile.')
tFilterUseIpv6Resource = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 6, 2, 2, 2, 21, 1, 1, 1, 1), TruthValue().clone('false')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: tFilterUseIpv6Resource.setStatus('current')
if mibBuilder.loadTexts: tFilterUseIpv6Resource.setDescription('tFilterUseIpv6Resource specifies if the ipv6 resources should be used.')
tIPv6FilterExtnTable = MibTable((1, 3, 6, 1, 4, 1, 6527, 6, 2, 2, 2, 21, 1, 2), )
if mibBuilder.loadTexts: tIPv6FilterExtnTable.setStatus('current')
if mibBuilder.loadTexts: tIPv6FilterExtnTable.setDescription('Contains a List of all IPv6 filters configured on this system.')
tIPv6FilterExtnEntry = MibTableRow((1, 3, 6, 1, 4, 1, 6527, 6, 2, 2, 2, 21, 1, 2, 1), )
tIPv6FilterEntry.registerAugmentions(("TIMETRA-SAS-FILTER-MIB", "tIPv6FilterExtnEntry"))
tIPv6FilterExtnEntry.setIndexNames(*tIPv6FilterEntry.getIndexNames())
if mibBuilder.loadTexts: tIPv6FilterExtnEntry.setStatus('current')
if mibBuilder.loadTexts: tIPv6FilterExtnEntry.setDescription('Information about a particular IPv6 Filter entry. Entries are created/deleted by user. Entries have a presumed StorageType of nonVolatile.')
tFilter64Bitsor128 = MibTableColumn((1, 3, 6, 1, 4, 1, 6527, 6, 2, 2, 2, 21, 1, 2, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("ipv6128", 1), ("ipv664", 2))).clone('ipv6128')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: tFilter64Bitsor128.setStatus('current')
if mibBuilder.loadTexts: tFilter64Bitsor128.setDescription('tFilter64Bitsor128 is used to create a 64 bit or 128 bit ipv6 filter.')
mibBuilder.exportSymbols("TIMETRA-SAS-FILTER-MIB", tIPFilterExtnEntry=tIPFilterExtnEntry, tIPv6FilterExtnTable=tIPv6FilterExtnTable, PYSNMP_MODULE_ID=timetraSASFilterMIBModule, timetraSASFilterMIBModule=timetraSASFilterMIBModule, tmnxSASFilterObjs=tmnxSASFilterObjs, tSASFilterObjects=tSASFilterObjects, tFilter64Bitsor128=tFilter64Bitsor128, tIPv6FilterExtnEntry=tIPv6FilterExtnEntry, tIPFilterExtnTable=tIPFilterExtnTable, tFilterUseIpv6Resource=tFilterUseIpv6Resource)
|
# Singleton (from guido)
class Singleton(object):
def __new__(cls, *args, **kwds):
it = cls.__dict__.get("__it__")
if it is not None:
return it
cls.__it__ = it = object.__new__(cls)
it.init(*args, **kwds)
return it
def init(self, *args, **kwds):
pass
|
"""
Complete game implementations/engines.
"""
|
""" Asylo-specific copts.
Flags specified here should not affect any ABI, but may influence warnings and
optimizations. They are used on top of any flags provided by the crosstool in
use and are intended to be only used within the Asylo project (not affecting
consumers of the Asylo project).
"""
# Customization of compiler-generated warning output.
_WARNING_FLAGS = [
"-Wall",
"-Wextra",
"-Wno-sign-compare",
"-Wno-unused-parameter",
]
ASYLO_DEFAULT_COPTS = _WARNING_FLAGS
|
class Node:
def __init__(self, type_, arity: int, value=None):
self.type = type_
self.arity = arity
self.value = value
self.children = []
def __repr__(self):
return "<Node {t} {v} {c}>".format(t=self.type, v=self.value, c=self.children)
def _pprint(self, level):
fill = " "
print(
"{indent} Node {t} {v}".format(
indent=fill * level, t=self.type, v=self.value
)
)
for child in self.children:
child._pprint(level + 1)
def pprint(self, level: int = 0):
self._pprint(level)
def add_child(self, child):
self.children.append(child)
def n_children(self) -> int:
return len(self.children)
def gen_stream(self):
yield self
for child in self.children:
yield from child.gen_stream()
def create_unary_node(type_, value=None):
return Node(type_, 1, value)
def create_binary_node(type_, value=None):
return Node(type_, 2, value)
|
"""Helper classes for defining translations between .stat file of different formats."""
class Function(object):
"""Define a column which is actually a function of other columns"""
def __init__(self, fn, *input_arg_names):
self.fn = fn
self.input_arg_names = input_arg_names
def __call__(self, raw_input_names, raw_input_values):
input_args = [raw_input_values[raw_input_names.index(name)] for name in self.input_arg_names]
return self.fn(*input_args)
def inputs(self):
return self.input_arg_names
class Rename(object):
"""Define a column by renaming an existing column"""
def __init__(self, name):
self.name = name
def __call__(self, raw_input_names, raw_input_values):
return raw_input_values[raw_input_names.index(self.name)]
def inputs(self):
return [self.name]
class Value(object):
"""Define a column by a fixed value"""
def __init__(self, value):
self.value = value
def __call__(self, raw_input_names, raw_input_values):
return self.value
def inputs(self):
return []
|
#!/usr/bin/python3
def readfile(filename):
'''
:param
filename:
input is a text file for input
:return:
Equations:
lines with potential equations on them
num_line:
number of equation lines
'''
# open file
with open(filename, mode='r') as f:
line_list = []
# read in lines
while True:
line = f.readline()
if len(line) == 0:
break
line_list.append(line)
outstring = "".join(list(filter(None, line_list)))
return outstring
def readstring(input_string):
'''
:param
filename:
input is a text file for input
:return:
Equations:
lines with potential equations on them
num_line:
number of equation lines
'''
num_line = 0
# read in lines
equations = []
line_list = input_string.split("\n")
for line in line_list:
num_line += 1
# go through each line in equations
# and append non-empty lines
equations.append(line)
equations = list(filter(None, equations))
return [equations, num_line]
if __name__ == "__main__":
print(readfile("1eqn"))
input_str = 'x4 = a + b+c+d+f+x3^2\na = 2\nb = 5\n' \
'c = 4\ne = 4+f\nf = b\ng = b\nd = c + e\n' \
'x1 = 20\nx2 = x1+3\nx3 = x2 -10\n'
print(readstring(input_str))
|
# Configuration file for ipython-notebook.
c = get_config()
# ------------------------------------------------------------------------------
# NotebookApp configuration
# ------------------------------------------------------------------------------
c.GitHubConfig.access_token = ''
c.JupyterApp.answer_yes = True
c.LabApp.user_settings_dir = '/data/user-settings'
c.LabApp.workspaces_dir = '/data/workspaces'
c.NotebookApp.allow_origin = '*'
c.NotebookApp.allow_password_change = False
c.NotebookApp.allow_remote_access = True
c.NotebookApp.allow_root = True
c.NotebookApp.base_url = '/'
c.NotebookApp.ip = '127.0.0.1'
c.NotebookApp.notebook_dir = '/config/notebooks'
c.NotebookApp.open_browser = False
c.NotebookApp.password = ''
c.NotebookApp.port = 28459
c.NotebookApp.token = ''
c.NotebookApp.tornado_settings = {'static_url_prefix': '/static/'}
c.NotebookApp.trust_xheaders = True
c.NotebookApp.tornado_settings = {
'headers': {
'Content-Security-Policy': "frame-ancestors *"
}
}
|
#
# PySNMP MIB module JUNIPER-WX-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/JUNIPER-WX-GLOBAL-REG
# Produced by pysmi-0.3.4 at Mon Apr 29 19:50:41 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
SingleValueConstraint, ValueRangeConstraint, ConstraintsUnion, ConstraintsIntersection, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ValueRangeConstraint", "ConstraintsUnion", "ConstraintsIntersection", "ValueSizeConstraint")
jnxWxCommonEventDescr, = mibBuilder.importSymbols("JUNIPER-WX-COMMON-MIB", "jnxWxCommonEventDescr")
jnxWxSpecificMib, jnxWxModules = mibBuilder.importSymbols("JUNIPER-WX-GLOBAL-REG", "jnxWxSpecificMib", "jnxWxModules")
TcQosIdentifier, TcAppName = mibBuilder.importSymbols("JUNIPER-WX-GLOBAL-TC", "TcQosIdentifier", "TcAppName")
ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup")
MibScalar, MibTable, MibTableRow, MibTableColumn, iso, ModuleIdentity, TimeTicks, MibIdentifier, ObjectIdentity, Gauge32, IpAddress, Counter32, Bits, Integer32, NotificationType, Counter64, Unsigned32 = mibBuilder.importSymbols("SNMPv2-SMI", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "iso", "ModuleIdentity", "TimeTicks", "MibIdentifier", "ObjectIdentity", "Gauge32", "IpAddress", "Counter32", "Bits", "Integer32", "NotificationType", "Counter64", "Unsigned32")
TextualConvention, TimeStamp, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "TimeStamp", "DisplayString")
jnxWxMibModule = ModuleIdentity((1, 3, 6, 1, 4, 1, 8239, 1, 1, 4))
jnxWxMibModule.setRevisions(('2004-05-24 00:00', '2003-06-23 00:00', '2002-03-28 00:00', '2002-03-27 00:00', '2001-12-19 12:00',))
if mibBuilder.loadTexts: jnxWxMibModule.setLastUpdated('200203280000Z')
if mibBuilder.loadTexts: jnxWxMibModule.setOrganization('Juniper Networks, Inc')
jnxWxMib = ObjectIdentity((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1))
if mibBuilder.loadTexts: jnxWxMib.setStatus('current')
jnxWxConfMib = ObjectIdentity((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 1))
if mibBuilder.loadTexts: jnxWxConfMib.setStatus('current')
jnxWxObjs = ObjectIdentity((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2))
if mibBuilder.loadTexts: jnxWxObjs.setStatus('current')
jnxWxEvents = ObjectIdentity((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 3))
if mibBuilder.loadTexts: jnxWxEvents.setStatus('current')
jnxWxStatsUpdateTime = MibScalar((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 1), TimeStamp()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxStatsUpdateTime.setStatus('current')
jnxWxStatsAsmCount = MibScalar((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxStatsAsmCount.setStatus('current')
jnxWxStatsVirtEndptCount = MibScalar((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 9), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxStatsVirtEndptCount.setStatus('current')
jnxWxStatsAppCount = MibScalar((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 3), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxStatsAppCount.setStatus('current')
jnxWxStatsAccelAppCount = MibScalar((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 8), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxStatsAccelAppCount.setStatus('current')
jnxWxStatsQosClassCount = MibScalar((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 11), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxStatsQosClassCount.setStatus('current')
jnxWxStatsQosEndptCount = MibScalar((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 12), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxStatsQosEndptCount.setStatus('current')
jnxWxStatsWpEndptCount = MibScalar((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 13), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxStatsWpEndptCount.setStatus('current')
jnxWxSysStats = ObjectIdentity((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 4))
if mibBuilder.loadTexts: jnxWxSysStats.setStatus('current')
jnxWxSysStatsBytesInAe = MibScalar((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 4, 1), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxSysStatsBytesInAe.setStatus('current')
jnxWxSysStatsBytesOutAe = MibScalar((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 4, 2), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxSysStatsBytesOutAe.setStatus('current')
jnxWxSysStatsPktsInAe = MibScalar((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 4, 3), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxSysStatsPktsInAe.setStatus('current')
jnxWxSysStatsPktsOutAe = MibScalar((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 4, 4), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxSysStatsPktsOutAe.setStatus('current')
jnxWxSysStatsBytesOutOob = MibScalar((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 4, 5), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxSysStatsBytesOutOob.setStatus('current')
jnxWxSysStatsBytesPtNoAe = MibScalar((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 4, 6), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxSysStatsBytesPtNoAe.setStatus('current')
jnxWxSysStatsPktsPtNoAe = MibScalar((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 4, 7), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxSysStatsPktsPtNoAe.setStatus('current')
jnxWxSysStatsBytesPtFilter = MibScalar((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 4, 8), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxSysStatsBytesPtFilter.setStatus('current')
jnxWxSysStatsPktsPtFilter = MibScalar((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 4, 9), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxSysStatsPktsPtFilter.setStatus('current')
jnxWxSysStatsBytesOfPt = MibScalar((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 4, 10), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxSysStatsBytesOfPt.setStatus('current')
jnxWxSysStatsPktsOfPt = MibScalar((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 4, 11), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxSysStatsPktsOfPt.setStatus('current')
jnxWxSysStatsBytesTpIn = MibScalar((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 4, 12), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxSysStatsBytesTpIn.setStatus('current')
jnxWxSysStatsPktsTpIn = MibScalar((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 4, 13), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxSysStatsPktsTpIn.setStatus('current')
jnxWxSysStatsBytesTpOut = MibScalar((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 4, 14), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxSysStatsBytesTpOut.setStatus('current')
jnxWxSysStatsPktsTpOut = MibScalar((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 4, 15), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxSysStatsPktsTpOut.setStatus('current')
jnxWxSysStatsBytesTpPt = MibScalar((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 4, 16), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxSysStatsBytesTpPt.setStatus('current')
jnxWxSysStatsPktsTpPt = MibScalar((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 4, 17), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxSysStatsPktsTpPt.setStatus('current')
jnxWxSysStatsPeakRdn = MibScalar((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 4, 18), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxSysStatsPeakRdn.setStatus('current')
jnxWxSysStatsThruputIn = MibScalar((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 4, 19), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxSysStatsThruputIn.setStatus('current')
jnxWxSysStatsThruputOut = MibScalar((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 4, 20), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxSysStatsThruputOut.setStatus('current')
jnxWxSysStatsBytesInRe = MibScalar((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 4, 21), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxSysStatsBytesInRe.setStatus('current')
jnxWxSysStatsBytesOutRe = MibScalar((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 4, 22), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxSysStatsBytesOutRe.setStatus('current')
jnxWxSysStatsPktsInRe = MibScalar((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 4, 23), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxSysStatsPktsInRe.setStatus('current')
jnxWxSysStatsPktsOutRe = MibScalar((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 4, 24), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxSysStatsPktsOutRe.setStatus('current')
jnxWxSysStatsPktSizeIn1 = MibScalar((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 4, 25), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxSysStatsPktSizeIn1.setStatus('current')
jnxWxSysStatsPktSizeIn2 = MibScalar((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 4, 26), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxSysStatsPktSizeIn2.setStatus('current')
jnxWxSysStatsPktSizeIn3 = MibScalar((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 4, 27), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxSysStatsPktSizeIn3.setStatus('current')
jnxWxSysStatsPktSizeIn4 = MibScalar((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 4, 28), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxSysStatsPktSizeIn4.setStatus('current')
jnxWxSysStatsPktSizeIn5 = MibScalar((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 4, 29), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxSysStatsPktSizeIn5.setStatus('current')
jnxWxSysStatsPktSizeIn6 = MibScalar((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 4, 30), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxSysStatsPktSizeIn6.setStatus('current')
jnxWxSysStatsPktSizeOut1 = MibScalar((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 4, 31), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxSysStatsPktSizeOut1.setStatus('current')
jnxWxSysStatsPktSizeOut2 = MibScalar((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 4, 32), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxSysStatsPktSizeOut2.setStatus('current')
jnxWxSysStatsPktSizeOut3 = MibScalar((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 4, 33), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxSysStatsPktSizeOut3.setStatus('current')
jnxWxSysStatsPktSizeOut4 = MibScalar((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 4, 34), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxSysStatsPktSizeOut4.setStatus('current')
jnxWxSysStatsPktSizeOut5 = MibScalar((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 4, 35), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxSysStatsPktSizeOut5.setStatus('current')
jnxWxSysStatsPktSizeOut6 = MibScalar((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 4, 36), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxSysStatsPktSizeOut6.setStatus('current')
jnxWxAsm = ObjectIdentity((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 5))
if mibBuilder.loadTexts: jnxWxAsm.setStatus('current')
jnxWxAsmTable = MibTable((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 5, 1), )
if mibBuilder.loadTexts: jnxWxAsmTable.setStatus('current')
jnxWxAsmEntry = MibTableRow((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 5, 1, 1), ).setIndexNames((0, "JUNIPER-WX-MIB", "jnxWxAsmIndex"))
if mibBuilder.loadTexts: jnxWxAsmEntry.setStatus('current')
jnxWxAsmIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 5, 1, 1, 1), Integer32())
if mibBuilder.loadTexts: jnxWxAsmIndex.setStatus('current')
jnxWxAsmIpAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 5, 1, 1, 2), IpAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxAsmIpAddress.setStatus('current')
jnxWxAsmStatsTable = MibTable((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 5, 2), )
if mibBuilder.loadTexts: jnxWxAsmStatsTable.setStatus('current')
jnxWxAsmStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 5, 2, 1), )
jnxWxAsmEntry.registerAugmentions(("JUNIPER-WX-MIB", "jnxWxAsmStatsEntry"))
jnxWxAsmStatsEntry.setIndexNames(*jnxWxAsmEntry.getIndexNames())
if mibBuilder.loadTexts: jnxWxAsmStatsEntry.setStatus('current')
jnxWxAsmStatsPktsIn = MibTableColumn((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 5, 2, 1, 1), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxAsmStatsPktsIn.setStatus('current')
jnxWxAsmStatsPktsOut = MibTableColumn((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 5, 2, 1, 2), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxAsmStatsPktsOut.setStatus('current')
jnxWxAsmStatsBytesIn = MibTableColumn((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 5, 2, 1, 3), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxAsmStatsBytesIn.setStatus('current')
jnxWxAsmStatsBytesOut = MibTableColumn((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 5, 2, 1, 4), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxAsmStatsBytesOut.setStatus('current')
jnxWxVirtEndptTable = MibTable((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 5, 3), )
if mibBuilder.loadTexts: jnxWxVirtEndptTable.setStatus('current')
jnxWxVirtEndptEntry = MibTableRow((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 5, 3, 1), ).setIndexNames((0, "JUNIPER-WX-MIB", "jnxWxVirtEndptIndex"))
if mibBuilder.loadTexts: jnxWxVirtEndptEntry.setStatus('current')
jnxWxVirtEndptIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 5, 3, 1, 1), Integer32())
if mibBuilder.loadTexts: jnxWxVirtEndptIndex.setStatus('current')
jnxWxVirtEndptName = MibTableColumn((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 5, 3, 1, 2), TcAppName()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxVirtEndptName.setStatus('current')
jnxWxVirtEndptSubnetCount = MibTableColumn((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 5, 3, 1, 3), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxVirtEndptSubnetCount.setStatus('current')
jnxWxApp = ObjectIdentity((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 6))
if mibBuilder.loadTexts: jnxWxApp.setStatus('current')
jnxWxAppTable = MibTable((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 6, 1), )
if mibBuilder.loadTexts: jnxWxAppTable.setStatus('current')
jnxWxAppEntry = MibTableRow((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 6, 1, 1), ).setIndexNames((0, "JUNIPER-WX-MIB", "jnxWxAppIndex"))
if mibBuilder.loadTexts: jnxWxAppEntry.setStatus('current')
jnxWxAppIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 6, 1, 1, 1), Integer32())
if mibBuilder.loadTexts: jnxWxAppIndex.setStatus('current')
jnxWxAppAppName = MibTableColumn((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 6, 1, 1, 2), TcAppName()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxAppAppName.setStatus('current')
jnxWxAppStatsTable = MibTable((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 6, 2), )
if mibBuilder.loadTexts: jnxWxAppStatsTable.setStatus('current')
jnxWxAppStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 6, 2, 1), ).setIndexNames((0, "JUNIPER-WX-MIB", "jnxWxAsmIndex"), (0, "JUNIPER-WX-MIB", "jnxWxAppIndex"))
if mibBuilder.loadTexts: jnxWxAppStatsEntry.setStatus('current')
jnxWxAppStatsBytesIn = MibTableColumn((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 6, 2, 1, 1), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxAppStatsBytesIn.setStatus('current')
jnxWxAppStatsBytesOut = MibTableColumn((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 6, 2, 1, 2), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxAppStatsBytesOut.setStatus('current')
jnxWxAppStatsBytesInPercent = MibTableColumn((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 6, 2, 1, 3), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxAppStatsBytesInPercent.setStatus('current')
jnxWxAppStatsAppName = MibTableColumn((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 6, 2, 1, 4), TcAppName()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxAppStatsAppName.setStatus('current')
jnxWxAppStatsAccelBytesIn = MibTableColumn((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 6, 2, 1, 5), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxAppStatsAccelBytesIn.setStatus('current')
jnxWxAppStatsActiveSessionTime = MibTableColumn((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 6, 2, 1, 6), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxAppStatsActiveSessionTime.setStatus('current')
jnxWxAppStatsEstBoostBytes = MibTableColumn((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 6, 2, 1, 7), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxAppStatsEstBoostBytes.setStatus('current')
jnxWxAppStatsBytesOutWxc = MibTableColumn((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 6, 2, 1, 8), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxAppStatsBytesOutWxc.setStatus('current')
jnxWxAppAggrStatsTable = MibTable((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 6, 3), )
if mibBuilder.loadTexts: jnxWxAppAggrStatsTable.setStatus('current')
jnxWxAppAggrStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 6, 3, 1), )
jnxWxAppEntry.registerAugmentions(("JUNIPER-WX-MIB", "jnxWxAppAggrStatsEntry"))
jnxWxAppAggrStatsEntry.setIndexNames(*jnxWxAppEntry.getIndexNames())
if mibBuilder.loadTexts: jnxWxAppAggrStatsEntry.setStatus('current')
jnxWxAppAggrStatsBytesInRe = MibTableColumn((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 6, 3, 1, 1), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxAppAggrStatsBytesInRe.setStatus('current')
jnxWxAppAggrStatsBytesOutRe = MibTableColumn((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 6, 3, 1, 2), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxAppAggrStatsBytesOutRe.setStatus('current')
jnxWxAppAggrStatsBytesInPercent = MibTableColumn((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 6, 3, 1, 3), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxAppAggrStatsBytesInPercent.setStatus('current')
jnxWxWanStatsTable = MibTable((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 6, 4), )
if mibBuilder.loadTexts: jnxWxWanStatsTable.setStatus('current')
jnxWxWanStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 6, 4, 1), ).setIndexNames((0, "JUNIPER-WX-MIB", "jnxWxAsmIndex"), (0, "JUNIPER-WX-MIB", "jnxWxAppIndex"))
if mibBuilder.loadTexts: jnxWxWanStatsEntry.setStatus('current')
jnxWxWanStatsBytesToWan = MibTableColumn((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 6, 4, 1, 1), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxWanStatsBytesToWan.setStatus('current')
jnxWxWanStatsBytesFromWan = MibTableColumn((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 6, 4, 1, 2), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxWanStatsBytesFromWan.setStatus('current')
jnxWxAccelAppNameTable = MibTable((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 6, 5), )
if mibBuilder.loadTexts: jnxWxAccelAppNameTable.setStatus('current')
jnxWxAccelAppNameEntry = MibTableRow((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 6, 5, 1), ).setIndexNames((0, "JUNIPER-WX-MIB", "jnxWxAccelAppIndex"))
if mibBuilder.loadTexts: jnxWxAccelAppNameEntry.setStatus('current')
jnxWxAccelAppIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 6, 5, 1, 1), Integer32())
if mibBuilder.loadTexts: jnxWxAccelAppIndex.setStatus('current')
jnxWxAccelAppName = MibTableColumn((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 6, 5, 1, 2), TcAppName()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxAccelAppName.setStatus('current')
jnxWxAccelAppStatsTable = MibTable((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 6, 6), )
if mibBuilder.loadTexts: jnxWxAccelAppStatsTable.setStatus('current')
jnxWxAccelAppStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 6, 6, 1), ).setIndexNames((0, "JUNIPER-WX-MIB", "jnxWxAsmIndex"), (0, "JUNIPER-WX-MIB", "jnxWxAccelAppIndex"))
if mibBuilder.loadTexts: jnxWxAccelAppStatsEntry.setStatus('current')
jnxWxAccelAppTimeWithAccel = MibTableColumn((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 6, 6, 1, 3), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxAccelAppTimeWithAccel.setStatus('current')
jnxWxAccelAppTimeWithoutAccel = MibTableColumn((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 6, 6, 1, 4), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxAccelAppTimeWithoutAccel.setStatus('current')
jnxWxBurstStats = ObjectIdentity((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 7))
if mibBuilder.loadTexts: jnxWxBurstStats.setStatus('current')
jnxWxBurstStatsStartTime = MibScalar((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 7, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxBurstStatsStartTime.setStatus('current')
jnxWxBurstStatsBpsIn = MibScalar((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 7, 2), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxBurstStatsBpsIn.setStatus('current')
jnxWxBurstStatsBpsOut = MibScalar((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 7, 3), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxBurstStatsBpsOut.setStatus('current')
jnxWxBurstStatsBpsPt = MibScalar((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 7, 4), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxBurstStatsBpsPt.setStatus('current')
jnxWxQos = ObjectIdentity((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 10))
if mibBuilder.loadTexts: jnxWxQos.setStatus('current')
jnxWxQosEndptTable = MibTable((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 10, 1), )
if mibBuilder.loadTexts: jnxWxQosEndptTable.setStatus('current')
jnxWxQosEndptEntry = MibTableRow((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 10, 1, 1), ).setIndexNames((0, "JUNIPER-WX-MIB", "jnxWxQosEndptIndex"))
if mibBuilder.loadTexts: jnxWxQosEndptEntry.setStatus('current')
jnxWxQosEndptIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 10, 1, 1, 1), Integer32())
if mibBuilder.loadTexts: jnxWxQosEndptIndex.setStatus('current')
jnxWxQosEndptIdentifier = MibTableColumn((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 10, 1, 1, 2), TcQosIdentifier()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxQosEndptIdentifier.setStatus('current')
jnxWxQosClassTable = MibTable((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 10, 2), )
if mibBuilder.loadTexts: jnxWxQosClassTable.setStatus('current')
jnxWxQosClassEntry = MibTableRow((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 10, 2, 1), ).setIndexNames((0, "JUNIPER-WX-MIB", "jnxWxQosClassIndex"))
if mibBuilder.loadTexts: jnxWxQosClassEntry.setStatus('current')
jnxWxQosClassIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 10, 2, 1, 1), Integer32())
if mibBuilder.loadTexts: jnxWxQosClassIndex.setStatus('current')
jnxWxQosClassName = MibTableColumn((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 10, 2, 1, 2), TcQosIdentifier()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxQosClassName.setStatus('current')
jnxWxQosStatsTable = MibTable((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 10, 3), )
if mibBuilder.loadTexts: jnxWxQosStatsTable.setStatus('current')
jnxWxQosStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 10, 3, 1), ).setIndexNames((0, "JUNIPER-WX-MIB", "jnxWxQosEndptIndex"), (0, "JUNIPER-WX-MIB", "jnxWxQosClassIndex"))
if mibBuilder.loadTexts: jnxWxQosStatsEntry.setStatus('current')
jnxWxQosStatsBytesIn = MibTableColumn((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 10, 3, 1, 3), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxQosStatsBytesIn.setStatus('current')
jnxWxQosStatsBytesOut = MibTableColumn((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 10, 3, 1, 4), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxQosStatsBytesOut.setStatus('current')
jnxWxQosStatsBytesDropped = MibTableColumn((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 10, 3, 1, 5), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxQosStatsBytesDropped.setStatus('current')
jnxWxQosStatsPktsIn = MibTableColumn((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 10, 3, 1, 6), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxQosStatsPktsIn.setStatus('current')
jnxWxQosStatsPktsOut = MibTableColumn((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 10, 3, 1, 7), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxQosStatsPktsOut.setStatus('current')
jnxWxQosStatsPktsDropped = MibTableColumn((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 10, 3, 1, 8), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxQosStatsPktsDropped.setStatus('current')
jnxWxWanPerf = ObjectIdentity((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 14))
if mibBuilder.loadTexts: jnxWxWanPerf.setStatus('current')
jnxWxWpEndptTable = MibTable((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 14, 1), )
if mibBuilder.loadTexts: jnxWxWpEndptTable.setStatus('current')
jnxWxWpEndptEntry = MibTableRow((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 14, 1, 1), ).setIndexNames((0, "JUNIPER-WX-MIB", "jnxWxWpEndptIndex"))
if mibBuilder.loadTexts: jnxWxWpEndptEntry.setStatus('current')
jnxWxWpEndptIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 14, 1, 1, 1), Integer32())
if mibBuilder.loadTexts: jnxWxWpEndptIndex.setStatus('current')
jnxWxWpEndptIp = MibTableColumn((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 14, 1, 1, 2), IpAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxWpEndptIp.setStatus('current')
jnxWxWpStatsTable = MibTable((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 14, 2), )
if mibBuilder.loadTexts: jnxWxWpStatsTable.setStatus('current')
jnxWxWpStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 14, 2, 1), ).setIndexNames((0, "JUNIPER-WX-MIB", "jnxWxWpEndptIndex"))
if mibBuilder.loadTexts: jnxWxWpStatsEntry.setStatus('current')
jnxWxWpStatsLatencyThresh = MibTableColumn((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 14, 2, 1, 3), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxWpStatsLatencyThresh.setStatus('current')
jnxWxWpStatsAvgLatency = MibTableColumn((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 14, 2, 1, 4), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxWpStatsAvgLatency.setStatus('current')
jnxWxWpStatsLatencyCount = MibTableColumn((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 14, 2, 1, 5), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxWpStatsLatencyCount.setStatus('current')
jnxWxWpStatsLatencyAboveThresh = MibTableColumn((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 14, 2, 1, 6), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxWpStatsLatencyAboveThresh.setStatus('current')
jnxWxWpStatsLatencyAboveThreshCount = MibTableColumn((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 14, 2, 1, 7), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxWpStatsLatencyAboveThreshCount.setStatus('current')
jnxWxWpStatsLossPercent = MibTableColumn((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 14, 2, 1, 8), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxWpStatsLossPercent.setStatus('current')
jnxWxWpStatsLossCount = MibTableColumn((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 14, 2, 1, 9), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxWpStatsLossCount.setStatus('current')
jnxWxWpStatsEventCount = MibTableColumn((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 14, 2, 1, 10), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxWpStatsEventCount.setStatus('current')
jnxWxWpStatsDiversionCount = MibTableColumn((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 14, 2, 1, 11), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxWpStatsDiversionCount.setStatus('current')
jnxWxWpStatsReturnCount = MibTableColumn((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 14, 2, 1, 12), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxWpStatsReturnCount.setStatus('current')
jnxWxWpStatsLastDown = MibTableColumn((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 14, 2, 1, 13), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxWpStatsLastDown.setStatus('current')
jnxWxWpStatsUnavailableCount = MibTableColumn((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 14, 2, 1, 14), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxWpStatsUnavailableCount.setStatus('current')
jnxWxWpStatsMinuteCount = MibTableColumn((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 2, 14, 2, 1, 15), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: jnxWxWpStatsMinuteCount.setStatus('current')
jnxWxEventObjs = ObjectIdentity((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 3, 1))
if mibBuilder.loadTexts: jnxWxEventObjs.setStatus('current')
jnxWxEventEvents = ObjectIdentity((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 3, 2))
if mibBuilder.loadTexts: jnxWxEventEvents.setStatus('current')
jnxWxEventEventsV2 = ObjectIdentity((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 3, 2, 0))
if mibBuilder.loadTexts: jnxWxEventEventsV2.setStatus('current')
jnxWxEventRipAuthFailure = NotificationType((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 3, 2, 0, 1)).setObjects(("JUNIPER-WX-COMMON-MIB", "jnxWxCommonEventDescr"))
if mibBuilder.loadTexts: jnxWxEventRipAuthFailure.setStatus('current')
jnxWxEventCompressionBufferOverflow = NotificationType((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 3, 2, 0, 2)).setObjects(("JUNIPER-WX-COMMON-MIB", "jnxWxCommonEventDescr"))
if mibBuilder.loadTexts: jnxWxEventCompressionBufferOverflow.setStatus('current')
jnxWxEventCompressionSessionClosed = NotificationType((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 3, 2, 0, 3)).setObjects(("JUNIPER-WX-COMMON-MIB", "jnxWxCommonEventDescr"))
if mibBuilder.loadTexts: jnxWxEventCompressionSessionClosed.setStatus('current')
jnxWxEventDecompressionSessionClosed = NotificationType((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 3, 2, 0, 4)).setObjects(("JUNIPER-WX-COMMON-MIB", "jnxWxCommonEventDescr"))
if mibBuilder.loadTexts: jnxWxEventDecompressionSessionClosed.setStatus('current')
jnxWxEventCompressionSessionOpened = NotificationType((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 3, 2, 0, 5)).setObjects(("JUNIPER-WX-COMMON-MIB", "jnxWxCommonEventDescr"))
if mibBuilder.loadTexts: jnxWxEventCompressionSessionOpened.setStatus('current')
jnxWxEventDecompressionSessionOpened = NotificationType((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 3, 2, 0, 6)).setObjects(("JUNIPER-WX-COMMON-MIB", "jnxWxCommonEventDescr"))
if mibBuilder.loadTexts: jnxWxEventDecompressionSessionOpened.setStatus('current')
jnxWxEventPrimaryRegServerUnreachable = NotificationType((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 3, 2, 0, 7)).setObjects(("JUNIPER-WX-COMMON-MIB", "jnxWxCommonEventDescr"))
if mibBuilder.loadTexts: jnxWxEventPrimaryRegServerUnreachable.setStatus('current')
jnxWxEventSecondaryRegServerUnreachable = NotificationType((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 3, 2, 0, 8)).setObjects(("JUNIPER-WX-COMMON-MIB", "jnxWxCommonEventDescr"))
if mibBuilder.loadTexts: jnxWxEventSecondaryRegServerUnreachable.setStatus('current')
jnxWxEventMultiNodeMasterUp = NotificationType((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 3, 2, 0, 9)).setObjects(("JUNIPER-WX-COMMON-MIB", "jnxWxCommonEventDescr"))
if mibBuilder.loadTexts: jnxWxEventMultiNodeMasterUp.setStatus('current')
jnxWxEventMultiNodeMasterDown = NotificationType((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 3, 2, 0, 10)).setObjects(("JUNIPER-WX-COMMON-MIB", "jnxWxCommonEventDescr"))
if mibBuilder.loadTexts: jnxWxEventMultiNodeMasterDown.setStatus('current')
jnxWxEventMultiNodeLastUp = NotificationType((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 3, 2, 0, 11)).setObjects(("JUNIPER-WX-COMMON-MIB", "jnxWxCommonEventDescr"))
if mibBuilder.loadTexts: jnxWxEventMultiNodeLastUp.setStatus('current')
jnxWxEventMultiNodeLastDown = NotificationType((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 3, 2, 0, 12)).setObjects(("JUNIPER-WX-COMMON-MIB", "jnxWxCommonEventDescr"))
if mibBuilder.loadTexts: jnxWxEventMultiNodeLastDown.setStatus('current')
jnxWxEventPrimaryDownBackupEngaged = NotificationType((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 3, 2, 0, 13)).setObjects(("JUNIPER-WX-COMMON-MIB", "jnxWxCommonEventDescr"))
if mibBuilder.loadTexts: jnxWxEventPrimaryDownBackupEngaged.setStatus('current')
jnxWxEventPrimaryDownBackupEngageFailed = NotificationType((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 3, 2, 0, 14)).setObjects(("JUNIPER-WX-COMMON-MIB", "jnxWxCommonEventDescr"))
if mibBuilder.loadTexts: jnxWxEventPrimaryDownBackupEngageFailed.setStatus('current')
jnxWxEventPrimaryUpBackupDisengaged = NotificationType((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 3, 2, 0, 15)).setObjects(("JUNIPER-WX-COMMON-MIB", "jnxWxCommonEventDescr"))
if mibBuilder.loadTexts: jnxWxEventPrimaryUpBackupDisengaged.setStatus('current')
jnxWxEventMultiPathStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 3, 2, 0, 16)).setObjects(("JUNIPER-WX-COMMON-MIB", "jnxWxCommonEventDescr"))
if mibBuilder.loadTexts: jnxWxEventMultiPathStatusChange.setStatus('current')
jnxWxEventDiskFailure = NotificationType((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 3, 2, 0, 17)).setObjects(("JUNIPER-WX-COMMON-MIB", "jnxWxCommonEventDescr"))
if mibBuilder.loadTexts: jnxWxEventDiskFailure.setStatus('current')
jnxWxEventWanPerfStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 3, 2, 0, 18)).setObjects(("JUNIPER-WX-COMMON-MIB", "jnxWxCommonEventDescr"))
if mibBuilder.loadTexts: jnxWxEventWanPerfStatusChange.setStatus('current')
jnxWxEventDCQAboveHiWatermark = NotificationType((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 3, 2, 0, 19)).setObjects(("JUNIPER-WX-COMMON-MIB", "jnxWxCommonEventDescr"))
if mibBuilder.loadTexts: jnxWxEventDCQAboveHiWatermark.setStatus('current')
jnxWxEventDCQBelowHiWatermark = NotificationType((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 3, 2, 0, 20)).setObjects(("JUNIPER-WX-COMMON-MIB", "jnxWxCommonEventDescr"))
if mibBuilder.loadTexts: jnxWxEventDCQBelowHiWatermark.setStatus('current')
jnxWxEventPerformanceThreshCrossed = NotificationType((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 3, 2, 0, 21)).setObjects(("JUNIPER-WX-COMMON-MIB", "jnxWxCommonEventDescr"))
if mibBuilder.loadTexts: jnxWxEventPerformanceThreshCrossed.setStatus('current')
jnxWxEventClientLinkDown = NotificationType((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 3, 2, 0, 22)).setObjects(("JUNIPER-WX-COMMON-MIB", "jnxWxCommonEventDescr"))
if mibBuilder.loadTexts: jnxWxEventClientLinkDown.setStatus('current')
jnxWxEventClientLinkUp = NotificationType((1, 3, 6, 1, 4, 1, 8239, 2, 2, 1, 3, 2, 0, 23)).setObjects(("JUNIPER-WX-COMMON-MIB", "jnxWxCommonEventDescr"))
if mibBuilder.loadTexts: jnxWxEventClientLinkUp.setStatus('current')
mibBuilder.exportSymbols("JUNIPER-WX-MIB", jnxWxAccelAppTimeWithoutAccel=jnxWxAccelAppTimeWithoutAccel, jnxWxAsmStatsBytesOut=jnxWxAsmStatsBytesOut, jnxWxSysStatsThruputOut=jnxWxSysStatsThruputOut, jnxWxSysStats=jnxWxSysStats, jnxWxWpStatsTable=jnxWxWpStatsTable, jnxWxSysStatsPktSizeIn3=jnxWxSysStatsPktSizeIn3, jnxWxSysStatsPktsPtFilter=jnxWxSysStatsPktsPtFilter, jnxWxApp=jnxWxApp, jnxWxAppStatsAppName=jnxWxAppStatsAppName, jnxWxWpEndptEntry=jnxWxWpEndptEntry, jnxWxQosStatsPktsIn=jnxWxQosStatsPktsIn, jnxWxQosStatsBytesIn=jnxWxQosStatsBytesIn, jnxWxStatsQosEndptCount=jnxWxStatsQosEndptCount, jnxWxSysStatsPktsOutAe=jnxWxSysStatsPktsOutAe, jnxWxQos=jnxWxQos, jnxWxStatsAsmCount=jnxWxStatsAsmCount, jnxWxSysStatsBytesOutRe=jnxWxSysStatsBytesOutRe, jnxWxAsmEntry=jnxWxAsmEntry, jnxWxBurstStatsBpsPt=jnxWxBurstStatsBpsPt, jnxWxAppAggrStatsBytesOutRe=jnxWxAppAggrStatsBytesOutRe, jnxWxAccelAppNameEntry=jnxWxAccelAppNameEntry, jnxWxSysStatsBytesPtNoAe=jnxWxSysStatsBytesPtNoAe, jnxWxWpStatsLatencyAboveThresh=jnxWxWpStatsLatencyAboveThresh, jnxWxWpStatsLossCount=jnxWxWpStatsLossCount, jnxWxSysStatsPktsTpPt=jnxWxSysStatsPktsTpPt, jnxWxEventCompressionSessionOpened=jnxWxEventCompressionSessionOpened, jnxWxSysStatsPktSizeIn1=jnxWxSysStatsPktSizeIn1, jnxWxBurstStatsStartTime=jnxWxBurstStatsStartTime, jnxWxVirtEndptEntry=jnxWxVirtEndptEntry, jnxWxQosEndptIdentifier=jnxWxQosEndptIdentifier, jnxWxEventMultiPathStatusChange=jnxWxEventMultiPathStatusChange, jnxWxSysStatsPktsOfPt=jnxWxSysStatsPktsOfPt, jnxWxSysStatsPktsTpIn=jnxWxSysStatsPktsTpIn, jnxWxWpStatsLatencyCount=jnxWxWpStatsLatencyCount, jnxWxQosEndptEntry=jnxWxQosEndptEntry, jnxWxAppStatsEntry=jnxWxAppStatsEntry, jnxWxSysStatsThruputIn=jnxWxSysStatsThruputIn, jnxWxWpStatsAvgLatency=jnxWxWpStatsAvgLatency, jnxWxAppEntry=jnxWxAppEntry, jnxWxWanStatsEntry=jnxWxWanStatsEntry, jnxWxVirtEndptSubnetCount=jnxWxVirtEndptSubnetCount, jnxWxAppAppName=jnxWxAppAppName, PYSNMP_MODULE_ID=jnxWxMibModule, jnxWxSysStatsPktSizeOut2=jnxWxSysStatsPktSizeOut2, jnxWxObjs=jnxWxObjs, jnxWxEventMultiNodeMasterUp=jnxWxEventMultiNodeMasterUp, jnxWxBurstStatsBpsOut=jnxWxBurstStatsBpsOut, jnxWxAsmIndex=jnxWxAsmIndex, jnxWxEvents=jnxWxEvents, jnxWxSysStatsPktSizeIn4=jnxWxSysStatsPktSizeIn4, jnxWxWpStatsLastDown=jnxWxWpStatsLastDown, jnxWxQosStatsBytesDropped=jnxWxQosStatsBytesDropped, jnxWxConfMib=jnxWxConfMib, jnxWxQosStatsTable=jnxWxQosStatsTable, jnxWxSysStatsBytesTpPt=jnxWxSysStatsBytesTpPt, jnxWxEventCompressionBufferOverflow=jnxWxEventCompressionBufferOverflow, jnxWxAsmStatsTable=jnxWxAsmStatsTable, jnxWxQosStatsPktsDropped=jnxWxQosStatsPktsDropped, jnxWxAsmStatsPktsIn=jnxWxAsmStatsPktsIn, jnxWxAppAggrStatsEntry=jnxWxAppAggrStatsEntry, jnxWxAppStatsTable=jnxWxAppStatsTable, jnxWxSysStatsBytesOutAe=jnxWxSysStatsBytesOutAe, jnxWxSysStatsPktsInRe=jnxWxSysStatsPktsInRe, jnxWxSysStatsBytesPtFilter=jnxWxSysStatsBytesPtFilter, jnxWxEventMultiNodeMasterDown=jnxWxEventMultiNodeMasterDown, jnxWxSysStatsBytesInAe=jnxWxSysStatsBytesInAe, jnxWxStatsQosClassCount=jnxWxStatsQosClassCount, jnxWxSysStatsPktSizeOut4=jnxWxSysStatsPktSizeOut4, jnxWxSysStatsPktSizeOut5=jnxWxSysStatsPktSizeOut5, jnxWxWpStatsLossPercent=jnxWxWpStatsLossPercent, jnxWxStatsVirtEndptCount=jnxWxStatsVirtEndptCount, jnxWxWpStatsLatencyThresh=jnxWxWpStatsLatencyThresh, jnxWxQosEndptTable=jnxWxQosEndptTable, jnxWxWpStatsLatencyAboveThreshCount=jnxWxWpStatsLatencyAboveThreshCount, jnxWxSysStatsPktsOutRe=jnxWxSysStatsPktsOutRe, jnxWxEventSecondaryRegServerUnreachable=jnxWxEventSecondaryRegServerUnreachable, jnxWxEventDiskFailure=jnxWxEventDiskFailure, jnxWxEventWanPerfStatusChange=jnxWxEventWanPerfStatusChange, jnxWxSysStatsPeakRdn=jnxWxSysStatsPeakRdn, jnxWxVirtEndptIndex=jnxWxVirtEndptIndex, jnxWxWpStatsEventCount=jnxWxWpStatsEventCount, jnxWxQosClassTable=jnxWxQosClassTable, jnxWxSysStatsPktSizeOut1=jnxWxSysStatsPktSizeOut1, jnxWxAccelAppNameTable=jnxWxAccelAppNameTable, jnxWxAccelAppName=jnxWxAccelAppName, jnxWxBurstStatsBpsIn=jnxWxBurstStatsBpsIn, jnxWxAccelAppTimeWithAccel=jnxWxAccelAppTimeWithAccel, jnxWxSysStatsBytesTpOut=jnxWxSysStatsBytesTpOut, jnxWxEventEventsV2=jnxWxEventEventsV2, jnxWxWpStatsEntry=jnxWxWpStatsEntry, jnxWxEventPrimaryUpBackupDisengaged=jnxWxEventPrimaryUpBackupDisengaged, jnxWxWanStatsBytesToWan=jnxWxWanStatsBytesToWan, jnxWxEventDCQAboveHiWatermark=jnxWxEventDCQAboveHiWatermark, jnxWxAppTable=jnxWxAppTable, jnxWxVirtEndptTable=jnxWxVirtEndptTable, jnxWxWpEndptTable=jnxWxWpEndptTable, jnxWxAppStatsEstBoostBytes=jnxWxAppStatsEstBoostBytes, jnxWxMibModule=jnxWxMibModule, jnxWxEventMultiNodeLastUp=jnxWxEventMultiNodeLastUp, jnxWxAccelAppStatsTable=jnxWxAccelAppStatsTable, jnxWxEventCompressionSessionClosed=jnxWxEventCompressionSessionClosed, jnxWxQosStatsBytesOut=jnxWxQosStatsBytesOut, jnxWxEventPrimaryDownBackupEngaged=jnxWxEventPrimaryDownBackupEngaged, jnxWxAsmIpAddress=jnxWxAsmIpAddress, jnxWxSysStatsBytesOutOob=jnxWxSysStatsBytesOutOob, jnxWxWanStatsTable=jnxWxWanStatsTable, jnxWxSysStatsPktSizeIn6=jnxWxSysStatsPktSizeIn6, jnxWxSysStatsBytesOfPt=jnxWxSysStatsBytesOfPt, jnxWxAppAggrStatsBytesInPercent=jnxWxAppAggrStatsBytesInPercent, jnxWxAccelAppStatsEntry=jnxWxAccelAppStatsEntry, jnxWxWpEndptIp=jnxWxWpEndptIp, jnxWxAppStatsBytesInPercent=jnxWxAppStatsBytesInPercent, jnxWxStatsAppCount=jnxWxStatsAppCount, jnxWxAsmStatsPktsOut=jnxWxAsmStatsPktsOut, jnxWxWanStatsBytesFromWan=jnxWxWanStatsBytesFromWan, jnxWxEventDecompressionSessionClosed=jnxWxEventDecompressionSessionClosed, jnxWxAsmTable=jnxWxAsmTable, jnxWxSysStatsPktSizeOut3=jnxWxSysStatsPktSizeOut3, jnxWxSysStatsBytesInRe=jnxWxSysStatsBytesInRe, jnxWxQosStatsPktsOut=jnxWxQosStatsPktsOut, jnxWxStatsUpdateTime=jnxWxStatsUpdateTime, jnxWxSysStatsPktsInAe=jnxWxSysStatsPktsInAe, jnxWxAppStatsBytesOut=jnxWxAppStatsBytesOut, jnxWxAppStatsBytesIn=jnxWxAppStatsBytesIn, jnxWxAppStatsAccelBytesIn=jnxWxAppStatsAccelBytesIn, jnxWxAsmStatsBytesIn=jnxWxAsmStatsBytesIn, jnxWxSysStatsBytesTpIn=jnxWxSysStatsBytesTpIn, jnxWxEventEvents=jnxWxEventEvents, jnxWxBurstStats=jnxWxBurstStats, jnxWxSysStatsPktSizeOut6=jnxWxSysStatsPktSizeOut6, jnxWxAppIndex=jnxWxAppIndex, jnxWxEventDCQBelowHiWatermark=jnxWxEventDCQBelowHiWatermark, jnxWxWpEndptIndex=jnxWxWpEndptIndex, jnxWxVirtEndptName=jnxWxVirtEndptName, jnxWxEventObjs=jnxWxEventObjs, jnxWxEventClientLinkDown=jnxWxEventClientLinkDown, jnxWxMib=jnxWxMib, jnxWxQosEndptIndex=jnxWxQosEndptIndex, jnxWxAccelAppIndex=jnxWxAccelAppIndex, jnxWxWpStatsReturnCount=jnxWxWpStatsReturnCount, jnxWxSysStatsPktsTpOut=jnxWxSysStatsPktsTpOut, jnxWxAppStatsBytesOutWxc=jnxWxAppStatsBytesOutWxc, jnxWxStatsAccelAppCount=jnxWxStatsAccelAppCount, jnxWxWpStatsMinuteCount=jnxWxWpStatsMinuteCount, jnxWxAsm=jnxWxAsm, jnxWxAppStatsActiveSessionTime=jnxWxAppStatsActiveSessionTime, jnxWxEventDecompressionSessionOpened=jnxWxEventDecompressionSessionOpened, jnxWxSysStatsPktSizeIn2=jnxWxSysStatsPktSizeIn2, jnxWxEventPrimaryRegServerUnreachable=jnxWxEventPrimaryRegServerUnreachable, jnxWxQosClassIndex=jnxWxQosClassIndex, jnxWxEventClientLinkUp=jnxWxEventClientLinkUp, jnxWxAppAggrStatsTable=jnxWxAppAggrStatsTable, jnxWxAppAggrStatsBytesInRe=jnxWxAppAggrStatsBytesInRe, jnxWxSysStatsPktsPtNoAe=jnxWxSysStatsPktsPtNoAe, jnxWxQosStatsEntry=jnxWxQosStatsEntry, jnxWxEventRipAuthFailure=jnxWxEventRipAuthFailure, jnxWxStatsWpEndptCount=jnxWxStatsWpEndptCount, jnxWxWpStatsDiversionCount=jnxWxWpStatsDiversionCount, jnxWxEventMultiNodeLastDown=jnxWxEventMultiNodeLastDown, jnxWxQosClassName=jnxWxQosClassName, jnxWxEventPrimaryDownBackupEngageFailed=jnxWxEventPrimaryDownBackupEngageFailed, jnxWxSysStatsPktSizeIn5=jnxWxSysStatsPktSizeIn5, jnxWxWpStatsUnavailableCount=jnxWxWpStatsUnavailableCount, jnxWxEventPerformanceThreshCrossed=jnxWxEventPerformanceThreshCrossed, jnxWxQosClassEntry=jnxWxQosClassEntry, jnxWxAsmStatsEntry=jnxWxAsmStatsEntry, jnxWxWanPerf=jnxWxWanPerf)
|
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# 一個Employee的類別, 用來作DTO (Data Transfer Object)使用
class Employee:
def __init__(self, id_='', first_name='', last_name='', dept_id='',
hire_date=None, termination_date=None, wage=0.0,
age=0, sex=False):
self.id_ = id_
self.first_name = first_name
self.last_name = last_name
self.dept_id = dept_id
self.hire_date = hire_date
self.termination_date = termination_date
self.wage = wage
self.age = age
self.sex = sex
|
float_types = ['x', 'y', 'alt', 'md']
valid_columns = {
'name': [
999.999
],
'field': [
'field',
'месторождение',
'мр',
'м/р',
],
'well': [
'well',
'скважина',
'скв',
'скв.',
'№ скв.',
'№ скв.',
'скв.',
],
'type': [
'type',
'тип',
'назначение',
'вид',
],
'location': [
'location',
'loc',
'область',
'местонахождение',
'расположение',
'район',
],
'owner': [
'owner',
'недропользователь',
'заказчик',
'компания',
],
'alt': [
'alt',
'altitude',
'альтитуда',
'альт.',
'альт',
],
'md': [
'md',
'depth',
'забой',
'глубина',
],
'x': [
'x',
'х',
],
'y': [
'y',
'у',
],
}
|
class Point:
def __init__(self, x, y):
self.x = x
self.y = y
def __str__(self):
return f'Точка: ({self.x}, {self.y})'
def __add__(self, other):
return Point(self.x + other.x, self.y + other.y)
def distance(self):
return (self.x ** 2 + self.y ** 2) ** 0.5
def point_dis(self, a, b):
return ((self.x - a) ** 2 + (self.y - b) ** 2) ** 0.5
p = Point(4, 1)
q = Point(8, -2)
print(p + q)
print(p.x, p.y)
print(p)
print(p.distance())
print(p.point_dis(3, 4))
|
# -*- coding: utf-8 -*-
"""
hon.structure.readme
~~~~~
The structure module for parsing the README.md file.
"""
def parse_readme(app, text):
pass
|
def f(n):
if n <=0:
return 1
res = 0
for i in range(n):
res += f(i) * f(n-i-1)
return res
|
#
# PySNMP MIB module TPLINK-CLUSTER-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/TPLINK-CLUSTER-MIB
# Produced by pysmi-0.3.4 at Wed May 1 15:24:19 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, ConstraintsIntersection, ConstraintsUnion, SingleValueConstraint, ValueRangeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "ConstraintsIntersection", "ConstraintsUnion", "SingleValueConstraint", "ValueRangeConstraint")
NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance")
ModuleIdentity, Unsigned32, Counter32, MibIdentifier, iso, ObjectIdentity, NotificationType, Gauge32, MibScalar, MibTable, MibTableRow, MibTableColumn, IpAddress, Counter64, Bits, Integer32, TimeTicks = mibBuilder.importSymbols("SNMPv2-SMI", "ModuleIdentity", "Unsigned32", "Counter32", "MibIdentifier", "iso", "ObjectIdentity", "NotificationType", "Gauge32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "IpAddress", "Counter64", "Bits", "Integer32", "TimeTicks")
TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString")
tplinkClusterMIBObjects, = mibBuilder.importSymbols("TPLINK-CLUSTERTREE-MIB", "tplinkClusterMIBObjects")
tplinkClusterMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 11863, 6, 33, 1, 1))
tplinkClusterMIB.setRevisions(('2009-08-27 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: tplinkClusterMIB.setRevisionsDescriptions(('Initial version of this MIB module.',))
if mibBuilder.loadTexts: tplinkClusterMIB.setLastUpdated('200908270000Z')
if mibBuilder.loadTexts: tplinkClusterMIB.setOrganization('TPLINK')
if mibBuilder.loadTexts: tplinkClusterMIB.setContactInfo('www.tplink.com.cn')
if mibBuilder.loadTexts: tplinkClusterMIB.setDescription('Cluster Management function enables a network administer to manage the scattered devices in the network via a management device. After a commander switch is configured, management and maintenance operations intended for the member devices in a cluster is implemented by the commander device. ')
ndpManage = MibIdentifier((1, 3, 6, 1, 4, 1, 11863, 6, 33, 1, 1, 1))
ntdpManage = MibIdentifier((1, 3, 6, 1, 4, 1, 11863, 6, 33, 1, 1, 2))
clusterManage = MibIdentifier((1, 3, 6, 1, 4, 1, 11863, 6, 33, 1, 1, 3))
mibBuilder.exportSymbols("TPLINK-CLUSTER-MIB", clusterManage=clusterManage, tplinkClusterMIB=tplinkClusterMIB, ndpManage=ndpManage, ntdpManage=ntdpManage, PYSNMP_MODULE_ID=tplinkClusterMIB)
|
v = int(input('Velocidade do carro ao passar no radar = '))
m = v-80
if v > 80:
print('O carro estava acima da velocidade permitida')
print('A multa irá custar R${}'.format(m*7))
|
x = 1 # int
print(type(x))
x = 1.1 # float
print(type(x))
x = 1 + 2j # complex number
print(type(x))
print(10 + 3)
print(10 - 3)
print(10 * 3)
print(10 / 3)
print(10 // 3)
print(10 % 3)
print(10 ** 3)
x = 10
x = x + 3
x += 3
print(x)
|
## Python Crash Course
# Exercise 3.10: Every Function:
# Think of something you could store in a list.
# For example, you could make a list of mountains, rivers, countries, cities, languages, or any- thing else you’d like.
# Write a program that creates a list containing these items and then uses each function introduced in this chapter at least once .
def main():
print("Skipping this exercise since this is redundant exercise to use previously used functions again.")
if __name__ == '__main__':
main()
|
S = input()
d = {}
c = 0
t = ''
for i in range(len(S)):
if S[i] != 'w':
if c > 0:
if t != '':
d.setdefault(c, [])
d[c].append(t)
t = ''
c = 0
t += S[i]
elif S[i] == 'w':
c += 1
if c > 0 and t != '':
d.setdefault(c, [])
d[c].append(t)
if d:
print(*d[max(d)], sep='\n')
else:
print('')
|
nome = ''
idade = 0
sexo = ''
soma_idade = 0
idade_mais_velho = 0
homem_mais_velho = ''
cont = 0
for i in range(4):
nome = input('Escreva o nome: ').strip()
idade = int(input('Escreva a idade: '))
sexo = input('Escreva o sexo M ou F: ').upper().strip()
soma_idade += idade
if sexo == 'F' and idade < 20:
cont += 1
elif sexo == 'M' and idade > idade_mais_velho:
homem_mais_velho = nome
print('A média de idade é {} anos.'.format(soma_idade / 4))
print('O homem mais velho é o {}.'.format(homem_mais_velho))
print('{} mulheres tem menos de 20 anos'.format(cont))
|
__title__ = 'mudrex'
__version__ = '0.1.2'
__summary__ = 'Send external webhook signals to Mudrex platform.'
__uri__ = 'https://github.com/surajiyer/mudrex'
__author__ = 'Suraj Iyer'
__email__ = 'me@surajiyer.com'
__license__ = 'MIT'
|
"""
Exercício 3
Faça um programa em Python que recebe um número inteiro e imprime seu dígito das dezenas. Observe o exemplo abaixo:
Exemplo 1:
Entrada de Dados:
Digite um número inteiro: 78615
Saída de Dados:
O dígito das dezenas é 1
Exemplo 2:
Entrada de Dados:
Digite um número inteiro: 2
Saída de Dados:
O dígito das dezenas é 0
Dica: O operador "//" faz uma divisão inteira jogando fora o resto, ou seja, aquilo que é menor que o divisor. O operador "%" devolve apenas o resto da divisão inteira jogando fora o resultado, ou seja, tudo que é maior ou igual ao divisor.
"""
def get_digito_dezenas(num: int) -> int:
'''
:param num:
:return:
>>> get_digito_dezenas(123)
2
>>> get_digito_dezenas(1246543)
4
>>> get_digito_dezenas(124654378897897)
9
'''
dv, md = divmod(num, 10)
dv, md = divmod(dv, 10)
return md
if __name__ == '__main__':
num = int(input('Digite um número inteiro: '))
print(f'O dígito das dezenas é {get_digito_dezenas(num)}')
|
num = int(input('Digite um número: '))
if num < 20:
print(f'{num} é menor que 20')
elif num > 20:
print(f'{num} é maior que 20')
else:
print(f'{num} é igual a 20')
|
c = 0
while c < 10:
print(c)
c = c + 1
print('FIM')
|
'''
@description 【Python知识补充】get和set方法 2019/10/05 14:48
'''
class Plane(object):
def __init__(self):
# TODO: 存活状态
self.alive = True
# TODO: 累计积分
self.score = 0
# TODO: 更改存活状态
def set_alive(self, value):
self.alive = value
if value == False:
self.die_action()
# TODO: 获取存活状态
def get_alive(self):
if not self.alive:
self.cancel_schedule()
return self.alive
# TODO: 设置累计积分
def set_score(self, value):
self.score = value
self._update_score_ranking(value)
# TODO: 更新积分排行榜
def _update_score_ranking(self, value):
print('更新积分排行榜:%d'%(value, ))
# TODO: 执行飞机死亡动画
def die_action(self):
print('执行飞机死亡动画!...')
# TODO: 取消事件调度
def cancel_schedule(self):
print('取消事件调度!...')
plane = Plane()
# TODO: 击中状态
hit = True
if hit:
plane.set_alive(False)
plane.set_score(150)
plane.get_alive()
|
class Request:
def __init__(self, start, end):
self.start = start
self.end = end
def __str__(self):
return f'Request:{self.start},{self.end}'
def Is_compatible(self, request):
return request.start > self.end or request.end < self.start
'''This Algorithm give 0(n2) running time'''
def interval_scheduling(array):
result = []
while array:
early_request = Request(0, float('inf'))
for request in array:
if early_request.end > request.end:
early_request = request
newarray = []
result.append(early_request)
for request in array:
if request.start > early_request.end:
newarray.append(request)
array = newarray
return result
'''This algorithm give 0(nlogn) running time with no extra space'''
def Interval_Scheduling(array):
array.sort(key=lambda r: r.end)
n = len(array)
i = 0
result = []
while i < n:
check = array[i]
result.append(array[i])
while i < n and not array[i].Is_compatible(check):
i += 1
return result
|
#
# PySNMP MIB module NSCRTV-ROOT (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/NSCRTV-ROOT
# Produced by pysmi-0.3.4 at Wed May 1 14:25:05 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueSizeConstraint, ValueRangeConstraint, ConstraintsUnion, ConstraintsIntersection, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "ValueRangeConstraint", "ConstraintsUnion", "ConstraintsIntersection", "SingleValueConstraint")
ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup")
Counter64, Counter32, IpAddress, iso, Gauge32, ObjectIdentity, Bits, Unsigned32, ModuleIdentity, MibIdentifier, TimeTicks, NotificationType, Integer32, MibScalar, MibTable, MibTableRow, MibTableColumn, enterprises = mibBuilder.importSymbols("SNMPv2-SMI", "Counter64", "Counter32", "IpAddress", "iso", "Gauge32", "ObjectIdentity", "Bits", "Unsigned32", "ModuleIdentity", "MibIdentifier", "TimeTicks", "NotificationType", "Integer32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "enterprises")
TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString")
nscrtvRoot = MibIdentifier((1, 3, 6, 1, 4, 1, 17409))
nscrtvHFCemsTree = MibIdentifier((1, 3, 6, 1, 4, 1, 17409, 1))
propertyIdent = MibIdentifier((1, 3, 6, 1, 4, 1, 17409, 1, 1))
alarmsIdent = MibIdentifier((1, 3, 6, 1, 4, 1, 17409, 1, 2))
commonIdent = MibIdentifier((1, 3, 6, 1, 4, 1, 17409, 1, 3))
oaIdent = MibIdentifier((1, 3, 6, 1, 4, 1, 17409, 1, 11))
analogPropertyTable = MibTable((1, 3, 6, 1, 4, 1, 17409, 1, 1, 1), )
if mibBuilder.loadTexts: analogPropertyTable.setStatus('mandatory')
if mibBuilder.loadTexts: analogPropertyTable.setDescription('Attribute Table simulation parameters')
analogPropertyEntry = MibTableRow((1, 3, 6, 1, 4, 1, 17409, 1, 1, 1, 1), ).setIndexNames((0, "NSCRTV-ROOT", "analogParameterOID"))
if mibBuilder.loadTexts: analogPropertyEntry.setStatus('mandatory')
if mibBuilder.loadTexts: analogPropertyEntry.setDescription("Attribute Table simulation parameters head. OID purpose as a table index,Its coding method is'length��OID'��OID former two members'1.3'According to '1'and'3'respectively coding,Instead of ordinary OID encoding (0x2B).")
analogParameterOID = MibTableColumn((1, 3, 6, 1, 4, 1, 17409, 1, 1, 1, 1, 1), ObjectIdentifier()).setMaxAccess("readonly")
if mibBuilder.loadTexts: analogParameterOID.setStatus('mandatory')
if mibBuilder.loadTexts: analogParameterOID.setDescription('index')
alarmEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 17409, 1, 1, 1, 1, 2), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 1)).setFixedLength(1)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: alarmEnable.setStatus('mandatory')
if mibBuilder.loadTexts: alarmEnable.setDescription("Alarm enable control byte, the corresponding position for the'1 'that allow alarm,'0' a ban warning Bit 0: Alarm enable low Bit 1: Alarm enable low Bit 2: Alarm enable high Bit 3: Alarm enable high Bit 4 ~ 7 reservations should be 0 This object should be stored in nonvolatile memory.")
analogAlarmState = MibTableColumn((1, 3, 6, 1, 4, 1, 17409, 1, 1, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("aasNominal", 1), ("aasHIHI", 2), ("aasHI", 3), ("aasLO", 4), ("aasLOLO", 5)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: analogAlarmState.setStatus('mandatory')
if mibBuilder.loadTexts: analogAlarmState.setDescription('The parameters of the current state of alarm.')
analogAlarmHIHI = MibTableColumn((1, 3, 6, 1, 4, 1, 17409, 1, 1, 1, 1, 4), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: analogAlarmHIHI.setStatus('mandatory')
if mibBuilder.loadTexts: analogAlarmHIHI.setDescription('Alarm HIHI high threshold value. This object should be stored in non-volatile memory.')
analogAlarmHI = MibTableColumn((1, 3, 6, 1, 4, 1, 17409, 1, 1, 1, 1, 5), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: analogAlarmHI.setStatus('mandatory')
if mibBuilder.loadTexts: analogAlarmHI.setDescription('HI high alarm threshold value. This object should be stored in non-volatile memory.')
analogAlarmLO = MibTableColumn((1, 3, 6, 1, 4, 1, 17409, 1, 1, 1, 1, 6), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: analogAlarmLO.setStatus('mandatory')
if mibBuilder.loadTexts: analogAlarmLO.setDescription('LO low alarm threshold value. This object should be stored in non-volatile memory.')
analogAlarmLOLO = MibTableColumn((1, 3, 6, 1, 4, 1, 17409, 1, 1, 1, 1, 7), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: analogAlarmLOLO.setStatus('mandatory')
if mibBuilder.loadTexts: analogAlarmLOLO.setDescription('Alarm LOLO very low threshold value. This object should be stored in non-volatile memory.')
analogAlarmDeadband = MibTableColumn((1, 3, 6, 1, 4, 1, 17409, 1, 1, 1, 1, 8), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: analogAlarmDeadband.setStatus('mandatory')
if mibBuilder.loadTexts: analogAlarmDeadband.setDescription('Dead-alarm threshold value. After the warning, parameter values should be restored to the alarm threshold and alarm threshold and the difference between the absolute value greater than the value of dead zone, the alarm can be removed. This object should be stored in nonvolatile memory.')
discretePropertyTable = MibTable((1, 3, 6, 1, 4, 1, 17409, 1, 1, 2), )
if mibBuilder.loadTexts: discretePropertyTable.setStatus('mandatory')
if mibBuilder.loadTexts: discretePropertyTable.setDescription('Discrete Attribute Table.')
discretePropertyEntry = MibTableRow((1, 3, 6, 1, 4, 1, 17409, 1, 1, 2, 1), ).setIndexNames((0, "NSCRTV-ROOT", "discreteParameterOID"), (0, "NSCRTV-ROOT", "discreteAlarmValue"))
if mibBuilder.loadTexts: discretePropertyEntry.setStatus('mandatory')
if mibBuilder.loadTexts: discretePropertyEntry.setDescription('Attribute Table discrete head. OID coding methods with simulation attribute table')
discreteParameterOID = MibTableColumn((1, 3, 6, 1, 4, 1, 17409, 1, 1, 2, 1, 1), ObjectIdentifier()).setMaxAccess("readonly")
if mibBuilder.loadTexts: discreteParameterOID.setStatus('mandatory')
if mibBuilder.loadTexts: discreteParameterOID.setDescription('Attribute Table discrete index 1: Parameters OID.')
discreteAlarmValue = MibTableColumn((1, 3, 6, 1, 4, 1, 17409, 1, 1, 2, 1, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: discreteAlarmValue.setStatus('mandatory')
if mibBuilder.loadTexts: discreteAlarmValue.setDescription('Attribute Table discrete index 2: parameter values. When the equipment value of this parameter values, and so will be dealt with a warning.')
discreteAlarmEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 17409, 1, 1, 2, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("disable", 1), ("enableMajor", 2), ("enableMinor", 3)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: discreteAlarmEnable.setStatus('mandatory')
if mibBuilder.loadTexts: discreteAlarmEnable.setDescription('When the alarm so that it can open the (2 or 3), this parameter allows for alarm processing. If the alarm so that it can shut down (1), alarm processing will be carried out. This object default values for the disable (1). This object should be stored in non-volatile memory.')
discreteAlarmState = MibTableColumn((1, 3, 6, 1, 4, 1, 17409, 1, 1, 2, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 6, 7))).clone(namedValues=NamedValues(("dasNominal", 1), ("dasDiscreteMajor", 6), ("dasDiscreteMinor", 7)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: discreteAlarmState.setStatus('mandatory')
if mibBuilder.loadTexts: discreteAlarmState.setDescription('The parameters of the current state of alarm.')
currentAlarmTable = MibTable((1, 3, 6, 1, 4, 1, 17409, 1, 1, 3), )
if mibBuilder.loadTexts: currentAlarmTable.setStatus('mandatory')
if mibBuilder.loadTexts: currentAlarmTable.setDescription('The current warning Table.')
currentAlarmEntry = MibTableRow((1, 3, 6, 1, 4, 1, 17409, 1, 1, 3, 1), ).setIndexNames((0, "NSCRTV-ROOT", "currentAlarmOID"))
if mibBuilder.loadTexts: currentAlarmEntry.setStatus('mandatory')
if mibBuilder.loadTexts: currentAlarmEntry.setDescription('The current warning Table Head. OID coding methods with simulation attribute table.')
currentAlarmOID = MibTableColumn((1, 3, 6, 1, 4, 1, 17409, 1, 1, 3, 1, 1), ObjectIdentifier()).setMaxAccess("readonly")
if mibBuilder.loadTexts: currentAlarmOID.setStatus('mandatory')
if mibBuilder.loadTexts: currentAlarmOID.setDescription('NE, currently in a state of alarm parameters OID Index, and attribute the alarm in the table corresponding parameters OID.')
currentAlarmState = MibTableColumn((1, 3, 6, 1, 4, 1, 17409, 1, 1, 3, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("caasHIHI", 2), ("caasHI", 3), ("caasLO", 4), ("caasLOLO", 5), ("caasDiscreteMajor", 6), ("caasDiscreteMinor", 7)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: currentAlarmState.setStatus('mandatory')
if mibBuilder.loadTexts: currentAlarmState.setDescription('Warning parameters of the current state of alarm.')
currentAlarmValue = MibTableColumn((1, 3, 6, 1, 4, 1, 17409, 1, 1, 3, 1, 3), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: currentAlarmValue.setStatus('mandatory')
if mibBuilder.loadTexts: currentAlarmValue.setDescription("Alarm parameter's value.")
alarmLogNumberOfEntries = MibScalar((1, 3, 6, 1, 4, 1, 17409, 1, 2, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: alarmLogNumberOfEntries.setStatus('mandatory')
if mibBuilder.loadTexts: alarmLogNumberOfEntries.setDescription('Alarm record number of records in the table.')
alarmLogLastIndex = MibScalar((1, 3, 6, 1, 4, 1, 17409, 1, 2, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: alarmLogLastIndex.setStatus('mandatory')
if mibBuilder.loadTexts: alarmLogLastIndex.setDescription('Recently a warning the index of the records.')
alarmLogTable = MibTable((1, 3, 6, 1, 4, 1, 17409, 1, 2, 3), )
if mibBuilder.loadTexts: alarmLogTable.setStatus('mandatory')
if mibBuilder.loadTexts: alarmLogTable.setDescription('Alarm record form, at least support 16 record. Each table in the registration of a new record, the management agent (transponder) managers should send traps news.')
alarmLogEntry = MibTableRow((1, 3, 6, 1, 4, 1, 17409, 1, 2, 3, 1), ).setIndexNames((0, "NSCRTV-ROOT", "alarmLogIndex"))
if mibBuilder.loadTexts: alarmLogEntry.setStatus('mandatory')
if mibBuilder.loadTexts: alarmLogEntry.setDescription('Alarm Sheet Head.')
alarmLogIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 17409, 1, 2, 3, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 32767))).setMaxAccess("readonly")
if mibBuilder.loadTexts: alarmLogIndex.setStatus('mandatory')
if mibBuilder.loadTexts: alarmLogIndex.setDescription('The only logo Alarm Index recorded a record in the table, the index value increased from 1 start of each new record, plus 1 until 32,767, a record index of the re-starts at 1. Acting under the management of storage capacity can be the first choice to delete those records, the specific details in this not to achieve provisions.')
alarmLogInformation = MibTableColumn((1, 3, 6, 1, 4, 1, 17409, 1, 2, 3, 1, 2), OctetString().subtype(subtypeSpec=ValueSizeConstraint(17, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: alarmLogInformation.setStatus('mandatory')
if mibBuilder.loadTexts: alarmLogInformation.setDescription('Alarm record information, multi-byte strings, defined as follows: Byte 1 ~ 4: Alarm in time (POSIX format, the previous maximum byte) Byte 5: Alarm types (enumeration, definitions see behind) Byte 6: Alarm value after commonNeStatus Byte 7 ~ m: Alarm parameters object identifier (Basic Encoding Rules (ASN.1)) Byte n ~ z: Alarm parameter values (Basic Encoding Rules (ASN.1)) Alarm enumerated types: 1 NOMINAL 2 HIHI 3 HI 4 LO 5 LOLO 6 Discrete Major 7 Discrete Minor ')
alarmText = MibScalar((1, 3, 6, 1, 4, 1, 17409, 1, 2, 4), DisplayString())
if mibBuilder.loadTexts: alarmText.setStatus('optional')
if mibBuilder.loadTexts: alarmText.setDescription('This trap targets for the needs of information contained in a text field transponder information is achievable. The field contains the text of the object depends on the definition of alarm parameters, it is uncertain, This object can not access provisions.')
hfcAlarmEvent = NotificationType((1, 3, 6, 1, 4, 1, 17409, 1) + (0,1)).setObjects(("NSCRTV-ROOT", "commonPhysAddress"), ("NSCRTV-ROOT", "commonNELogicalID"), ("NSCRTV-ROOT", "alarmLogInformation"), ("NSCRTV-ROOT", "alarmText"))
if mibBuilder.loadTexts: hfcAlarmEvent.setDescription('When detected in the event of alarm information sent this trap, whether bundled alarmText variable parameter under warning object to determine. Some of the parameters only need to bind the alarm first three variables.')
commonAdminGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 17409, 1, 3, 1))
commonAdminUseRf = MibIdentifier((1, 3, 6, 1, 4, 1, 17409, 1, 3, 2))
commonAdminUseEthernet = MibIdentifier((1, 3, 6, 1, 4, 1, 17409, 1, 3, 3))
commonMACGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 17409, 1, 3, 2, 1))
commonRfGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 17409, 1, 3, 2, 2))
commonMacAddress = MibIdentifier((1, 3, 6, 1, 4, 1, 17409, 1, 3, 2, 1, 1))
commonBackoffParams = MibIdentifier((1, 3, 6, 1, 4, 1, 17409, 1, 3, 2, 1, 2))
commonMacStats = MibIdentifier((1, 3, 6, 1, 4, 1, 17409, 1, 3, 2, 1, 3))
commonAgentGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 17409, 1, 3, 3, 1))
commonDeviceGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 17409, 1, 3, 3, 2))
commonNELogicalID = MibScalar((1, 3, 6, 1, 4, 1, 17409, 1, 3, 1, 1), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 40))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: commonNELogicalID.setStatus('mandatory')
if mibBuilder.loadTexts: commonNELogicalID.setDescription('The logic of the designated NE identifier (LogicID), the values and attributes of other unrelated NE. This target value should be stored in non-volatile memory.')
commonNEVendor = MibScalar((1, 3, 6, 1, 4, 1, 17409, 1, 3, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: commonNEVendor.setStatus('mandatory')
if mibBuilder.loadTexts: commonNEVendor.setDescription('NE equipment manufacturers.')
commonNEModelNumber = MibScalar((1, 3, 6, 1, 4, 1, 17409, 1, 3, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: commonNEModelNumber.setStatus('mandatory')
if mibBuilder.loadTexts: commonNEModelNumber.setDescription('NE equipment models.')
commonNESerialNumber = MibScalar((1, 3, 6, 1, 4, 1, 17409, 1, 3, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: commonNESerialNumber.setStatus('mandatory')
if mibBuilder.loadTexts: commonNESerialNumber.setDescription('NE equipment serial numbers.')
commonNEVendorInfo = MibScalar((1, 3, 6, 1, 4, 1, 17409, 1, 3, 1, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: commonNEVendorInfo.setStatus('optional')
if mibBuilder.loadTexts: commonNEVendorInfo.setDescription('NE equipment suppliers other special designated information.')
commonNEStatus = MibScalar((1, 3, 6, 1, 4, 1, 17409, 1, 3, 1, 6), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 1)).setFixedLength(1)).setMaxAccess("readonly")
if mibBuilder.loadTexts: commonNEStatus.setStatus('mandatory')
if mibBuilder.loadTexts: commonNEStatus.setDescription('With 7.5.4 STATRESP PDU parameters in the corresponding Status Bit 0: CHNLRQST Bit 1: CNTNRM Bit 2: CNTCUR Bit 3: MAJOR ALARMS Bit 4: MINOR ALARMS Bit 5: RSVD1 Bit 6: RSVD2 Bit 7: RSVD3')
commonReset = MibScalar((1, 3, 6, 1, 4, 1, 17409, 1, 3, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1))).clone(namedValues=NamedValues(("reset", 1)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: commonReset.setStatus('mandatory')
if mibBuilder.loadTexts: commonReset.setDescription("Write'1 'will be reset NE equipment, the value will be included in other non-functional. Reading this object return value'1 ', had no effect on equipment.")
commonAlarmDetectionControl = MibScalar((1, 3, 6, 1, 4, 1, 17409, 1, 3, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("detectionDisabled", 1), ("detectionEnabled", 2), ("detectionEnabledAndRegenerate", 3)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: commonAlarmDetectionControl.setStatus('mandatory')
if mibBuilder.loadTexts: commonAlarmDetectionControl.setDescription('This object used to control the Alarm Detection NE.')
commonNetworkAddress = MibScalar((1, 3, 6, 1, 4, 1, 17409, 1, 3, 1, 9), IpAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: commonNetworkAddress.setStatus('mandatory')
if mibBuilder.loadTexts: commonNetworkAddress.setDescription('NE network IP address, NE produce Trap should include this address. This value should be stored in nonvolatile memory. This value can be registered through the MAC order or through local vendors to set up Interface.')
commonCheckCode = MibScalar((1, 3, 6, 1, 4, 1, 17409, 1, 3, 1, 10), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: commonCheckCode.setStatus('mandatory')
if mibBuilder.loadTexts: commonCheckCode.setDescription('This target for the detection transponder code configuration of the report. The calculation includes detection code transponder (including management equipment) and the physical configuration parameters stored in non-volatile memory of all the parameters. The detection algorithm calculated by the vendor code provisions. The object should be kept in the value of non-volatile memory, the response thinks highly activated, will be recalculated and re-testing code and the value prior to the commencement of comparison to determine whether or should haveһ��hfcColdStart hfcWarmStart traps. When write this object (SetRequest), the detection code will be recalculated and fill the SetRequest in response to the GetResponse. At this time, will not produce or hfcWarmStart traps hfcColdStart.')
commonTrapCommunityString = MibScalar((1, 3, 6, 1, 4, 1, 17409, 1, 3, 1, 11), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 64))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: commonTrapCommunityString.setStatus('mandatory')
if mibBuilder.loadTexts: commonTrapCommunityString.setDescription("Definition of Community Trap string. The default value is' public '. The value of this object should be stored in non-volatile memory.")
commonTamperStatus = MibScalar((1, 3, 6, 1, 4, 1, 17409, 1, 3, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("intact", 1), ("compromised", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: commonTamperStatus.setStatus('optional')
if mibBuilder.loadTexts: commonTamperStatus.setDescription('The safety report NE switching equipment (such as whether to open up the lid) state that this object is called discrete attributes of a corresponding entry in the table. Intact that normal, expressed alarm compromised.')
commonInternalTemperature = MibScalar((1, 3, 6, 1, 4, 1, 17409, 1, 3, 1, 13), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-128, 127))).setMaxAccess("readonly")
if mibBuilder.loadTexts: commonInternalTemperature.setStatus('optional')
if mibBuilder.loadTexts: commonInternalTemperature.setDescription('NE equipment Room (machine) temperature, units degrees Celsius. This request object attribute in a corresponding entry in the table.')
commonTime = MibScalar((1, 3, 6, 1, 4, 1, 17409, 1, 3, 1, 14), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: commonTime.setStatus('optional')
if mibBuilder.loadTexts: commonTime.setDescription('NE of the POSIX said that the current time (since at 0:00 on January 1, 1970 since the seconds).')
commonVarBindings = MibScalar((1, 3, 6, 1, 4, 1, 17409, 1, 3, 1, 15), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: commonVarBindings.setStatus('mandatory')
if mibBuilder.loadTexts: commonVarBindings.setDescription('This object can be said to receive SNMP information NE variables bundled the largest number of tables. Value: 0 indicated no restrictions on the maximum number bundled.')
commonResetCause = MibScalar((1, 3, 6, 1, 4, 1, 17409, 1, 3, 1, 16), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("other", 1), ("powerup", 2), ("command", 3), ("watchdog", 4), ("craft", 5)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: commonResetCause.setStatus('mandatory')
if mibBuilder.loadTexts: commonResetCause.setDescription('NE said the reasons for the recent reduction.')
commonCraftStatus = MibScalar((1, 3, 6, 1, 4, 1, 17409, 1, 3, 1, 17), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("disconnected", 1), ("connected", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: commonCraftStatus.setStatus('mandatory')
if mibBuilder.loadTexts: commonCraftStatus.setDescription('NE local object that this interface (such as RS232 or RS485 interface) state. NE does not necessarily have to support the local interface. NE local interface without affecting the state of its MAC interface functions; If we do not support the local interface, and its value is disconnected.')
commonDeviceOID = MibScalar((1, 3, 6, 1, 4, 1, 17409, 1, 3, 1, 18), ObjectIdentifier()).setMaxAccess("readonly")
if mibBuilder.loadTexts: commonDeviceOID.setStatus('optional')
if mibBuilder.loadTexts: commonDeviceOID.setDescription('This OID object as a pointer, the equipment was used at MIB (such as Node, two-way amplifier, etc).')
commonDeviceId = MibScalar((1, 3, 6, 1, 4, 1, 17409, 1, 3, 1, 19), OctetString().subtype(subtypeSpec=ValueSizeConstraint(32, 32)).setFixedLength(32)).setMaxAccess("readonly")
if mibBuilder.loadTexts: commonDeviceId.setStatus('optional')
if mibBuilder.loadTexts: commonDeviceId.setDescription('The contents of this object by the designated by the equipment vendors, manufacturers and products it contains special ASCII text messages.')
commondownload = MibScalar((1, 3, 6, 1, 4, 1, 17409, 1, 3, 1, 20), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1))).clone(namedValues=NamedValues(("reset", 1)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: commondownload.setStatus('mandatory')
if mibBuilder.loadTexts: commondownload.setDescription('')
commonPhysAddress = MibScalar((1, 3, 6, 1, 4, 1, 17409, 1, 3, 2, 1, 1, 1), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: commonPhysAddress.setStatus('mandatory')
if mibBuilder.loadTexts: commonPhysAddress.setDescription('NE MAC (physical) address.')
commonMaxMulticastAddresses = MibScalar((1, 3, 6, 1, 4, 1, 17409, 1, 3, 2, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(4, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: commonMaxMulticastAddresses.setStatus('mandatory')
if mibBuilder.loadTexts: commonMaxMulticastAddresses.setDescription('NE equipment to support the greatest number of multicast addresses.')
commonMulticastAddressTable = MibTable((1, 3, 6, 1, 4, 1, 17409, 1, 3, 2, 1, 1, 3), )
if mibBuilder.loadTexts: commonMulticastAddressTable.setStatus('mandatory')
if mibBuilder.loadTexts: commonMulticastAddressTable.setDescription('Multicast addresses Table, the value of this object should be stored in nonvolatile memory.')
commonMulticastAddressEntry = MibTableRow((1, 3, 6, 1, 4, 1, 17409, 1, 3, 2, 1, 1, 3, 1), ).setIndexNames((0, "NSCRTV-ROOT", "commonMulticastAddressIndex"))
if mibBuilder.loadTexts: commonMulticastAddressEntry.setStatus('mandatory')
if mibBuilder.loadTexts: commonMulticastAddressEntry.setDescription('Multicast addresses Table Head.')
commonMulticastAddressIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 17409, 1, 3, 2, 1, 1, 3, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: commonMulticastAddressIndex.setStatus('mandatory')
if mibBuilder.loadTexts: commonMulticastAddressIndex.setDescription('Multicast addresses Index.')
commonMulticastAddressNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 17409, 1, 3, 2, 1, 1, 3, 1, 2), OctetString().subtype(subtypeSpec=ValueSizeConstraint(6, 6)).setFixedLength(6)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: commonMulticastAddressNumber.setStatus('mandatory')
if mibBuilder.loadTexts: commonMulticastAddressNumber.setDescription('Multicast addresses,I/Gbit')
commonBackoffPeriod = MibScalar((1, 3, 6, 1, 4, 1, 17409, 1, 3, 2, 1, 2, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 16383))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: commonBackoffPeriod.setStatus('mandatory')
if mibBuilder.loadTexts: commonBackoffPeriod.setDescription('Backoff algorithm benchmark time (ms), initialize the default value of 6 ms. The value of this object should be stored in non-volatile memory.')
commonACKTimeoutWindow = MibScalar((1, 3, 6, 1, 4, 1, 17409, 1, 3, 2, 1, 2, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: commonACKTimeoutWindow.setStatus('mandatory')
if mibBuilder.loadTexts: commonACKTimeoutWindow.setDescription('NE awaiting HE overtime to send ACK response time (ms), initialize the default value is 19 ms. The value of this object should be stored in non-volatile memory.')
commonMaximumMACLayerRetries = MibScalar((1, 3, 6, 1, 4, 1, 17409, 1, 3, 2, 1, 2, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: commonMaximumMACLayerRetries.setStatus('mandatory')
if mibBuilder.loadTexts: commonMaximumMACLayerRetries.setDescription('NE data packets sent the greatest number of re-examination. Initialize the default value is 16. The value of this object should be stored in non-volatile memory.')
commonMaxPayloadSize = MibScalar((1, 3, 6, 1, 4, 1, 17409, 1, 3, 2, 1, 2, 4), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: commonMaxPayloadSize.setStatus('mandatory')
if mibBuilder.loadTexts: commonMaxPayloadSize.setDescription('From top to bottom line channel packet supported by the largest payload (payload) the length of.')
commonBackoffMinimumExponent = MibScalar((1, 3, 6, 1, 4, 1, 17409, 1, 3, 2, 1, 2, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 15))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: commonBackoffMinimumExponent.setStatus('mandatory')
if mibBuilder.loadTexts: commonBackoffMinimumExponent.setDescription('The standards body of the MAC layer specification definition of the smallest backoff algorithm index value, default values for 6. This value may not exceed commonBackoffMaximumValue value. The value of this object should be stored in non-volatile memory.')
commonBackoffMaximumExponent = MibScalar((1, 3, 6, 1, 4, 1, 17409, 1, 3, 2, 1, 2, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 15))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: commonBackoffMaximumExponent.setStatus('mandatory')
if mibBuilder.loadTexts: commonBackoffMaximumExponent.setDescription('The body of the MAC layer standard definition of backoff algorithm for standardizing the largest index value, the default value is 15. This value shall be not less than commonBackoffMinimum value. The value of this object should be stored in non-volatile memory.')
commonForwardPathLOSEvents = MibScalar((1, 3, 6, 1, 4, 1, 17409, 1, 3, 2, 1, 3, 1), Counter32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: commonForwardPathLOSEvents.setStatus('optional')
if mibBuilder.loadTexts: commonForwardPathLOSEvents.setDescription('LOS downlink channel in the number of reset to 0.')
commonForwardPathFramingErrors = MibScalar((1, 3, 6, 1, 4, 1, 17409, 1, 3, 2, 1, 3, 2), Counter32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: commonForwardPathFramingErrors.setStatus('optional')
if mibBuilder.loadTexts: commonForwardPathFramingErrors.setDescription('Downlink Channel frames wrong number reset to 0.')
commonForwardPathCRCErrors = MibScalar((1, 3, 6, 1, 4, 1, 17409, 1, 3, 2, 1, 3, 3), Counter32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: commonForwardPathCRCErrors.setStatus('optional')
if mibBuilder.loadTexts: commonForwardPathCRCErrors.setDescription('CRC errors down the number of reset to 0.')
commonInvalidMacCmds = MibScalar((1, 3, 6, 1, 4, 1, 17409, 1, 3, 2, 1, 3, 4), Counter32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: commonInvalidMacCmds.setStatus('optional')
if mibBuilder.loadTexts: commonInvalidMacCmds.setDescription('Invalid MAC layer order wrong number reset to 0.')
commonBackwardPathCollisionTimes = MibScalar((1, 3, 6, 1, 4, 1, 17409, 1, 3, 2, 1, 3, 5), Counter32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: commonBackwardPathCollisionTimes.setStatus('optional')
if mibBuilder.loadTexts: commonBackwardPathCollisionTimes.setDescription('Uplink Packet collision frequency, reset to 0.')
commonReturnPathFrequency = MibScalar((1, 3, 6, 1, 4, 1, 17409, 1, 3, 2, 2, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 1000000000))).setMaxAccess("readonly")
if mibBuilder.loadTexts: commonReturnPathFrequency.setStatus('mandatory')
if mibBuilder.loadTexts: commonReturnPathFrequency.setDescription('Channel uplink frequency units Hz. The value of this object should be stored in non-volatile memory.')
commonForwardPathFrequency = MibScalar((1, 3, 6, 1, 4, 1, 17409, 1, 3, 2, 2, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 1000000000))).setMaxAccess("readonly")
if mibBuilder.loadTexts: commonForwardPathFrequency.setStatus('mandatory')
if mibBuilder.loadTexts: commonForwardPathFrequency.setDescription('Downlink frequency channel, flat Hz. The value of this object should be stored in non-volatile memory.')
commonProvisionedReturnPowerLevel = MibScalar((1, 3, 6, 1, 4, 1, 17409, 1, 3, 2, 2, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 127))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: commonProvisionedReturnPowerLevel.setStatus('mandatory')
if mibBuilder.loadTexts: commonProvisionedReturnPowerLevel.setDescription('Upstream channel power levels and units for dBuV. When the internal use of this value will be rounded to the nearest support value. Reading return to this subject when the actual value rather than rounding value. The value of this object should be stored in non-volatile memory.')
commonForwardPathReceiveLevel = MibScalar((1, 3, 6, 1, 4, 1, 17409, 1, 3, 2, 2, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 127))).setMaxAccess("readonly")
if mibBuilder.loadTexts: commonForwardPathReceiveLevel.setStatus('optional')
if mibBuilder.loadTexts: commonForwardPathReceiveLevel.setDescription('Downlink Channel receive power levels, units dBuV.')
commonMaxReturnPower = MibScalar((1, 3, 6, 1, 4, 1, 17409, 1, 3, 2, 2, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 127))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: commonMaxReturnPower.setStatus('mandatory')
if mibBuilder.loadTexts: commonMaxReturnPower.setDescription('The largest upstream channel power levels and units for dBuV. The value of this object should be stored in non-volatile memory.')
commonAgentBootWay = MibScalar((1, 3, 6, 1, 4, 1, 17409, 1, 3, 3, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("bootDefault", 1), ("bootBOOTP", 2), ("bootTFTP", 3)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: commonAgentBootWay.setStatus('mandatory')
if mibBuilder.loadTexts: commonAgentBootWay.setDescription('Starting Method Acting')
commonAgentReset = MibScalar((1, 3, 6, 1, 4, 1, 17409, 1, 3, 3, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1))).clone(namedValues=NamedValues(("reset", 1)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: commonAgentReset.setStatus('mandatory')
if mibBuilder.loadTexts: commonAgentReset.setDescription("Acting Restart, write'1 'will enable agents to restart, the value will be included in other non-functional. Reading this object return value'1 ', the agent had no effect on.")
commonAgentMaxTraps = MibScalar((1, 3, 6, 1, 4, 1, 17409, 1, 3, 3, 1, 3), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: commonAgentMaxTraps.setStatus('mandatory')
if mibBuilder.loadTexts: commonAgentMaxTraps.setDescription('Acting detected alarm when sent to the management of the largest number of TRAP, 0 that manufacturers use the default default values.')
commonAgentTrapMinInterval = MibScalar((1, 3, 6, 1, 4, 1, 17409, 1, 3, 3, 1, 4), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: commonAgentTrapMinInterval.setStatus('mandatory')
if mibBuilder.loadTexts: commonAgentTrapMinInterval.setDescription('Acting TRAP send the minimum spacing units for s.')
commonAgentTrapMaxInterval = MibScalar((1, 3, 6, 1, 4, 1, 17409, 1, 3, 3, 1, 5), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: commonAgentTrapMaxInterval.setStatus('mandatory')
if mibBuilder.loadTexts: commonAgentTrapMaxInterval.setDescription('Acting TRAP send the largest spacing units for s.')
commonTrapAck = MibScalar((1, 3, 6, 1, 4, 1, 17409, 1, 3, 3, 1, 6), OctetString().subtype(subtypeSpec=ValueSizeConstraint(17, 255))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: commonTrapAck.setStatus('optional')
if mibBuilder.loadTexts: commonTrapAck.setDescription('The variables used to notify Snmp agents, it issued the warning Trap has received information management console, do not have to re-hair. The content of the variables in alarmLogInformation MIB and the same warning. Agents received after the adoption of alarmLogInformation management can clearly know the host response is a warning which Trap information, thereby stop the alarm information re the Trap.')
commonAgentTrapTable = MibTable((1, 3, 6, 1, 4, 1, 17409, 1, 3, 3, 1, 7), )
if mibBuilder.loadTexts: commonAgentTrapTable.setStatus('mandatory')
if mibBuilder.loadTexts: commonAgentTrapTable.setDescription('Acting Information Table TRAP.')
commonAgentTrapEntry = MibTableRow((1, 3, 6, 1, 4, 1, 17409, 1, 3, 3, 1, 7, 1), ).setIndexNames((0, "NSCRTV-ROOT", "commonAgentTrapIndex"))
if mibBuilder.loadTexts: commonAgentTrapEntry.setStatus('mandatory')
if mibBuilder.loadTexts: commonAgentTrapEntry.setDescription('Acting Head TRAP Information Table.')
commonAgentTrapIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 17409, 1, 3, 3, 1, 7, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: commonAgentTrapIndex.setStatus('mandatory')
if mibBuilder.loadTexts: commonAgentTrapIndex.setDescription('TRAP Table Index.')
commonAgentTrapIP = MibTableColumn((1, 3, 6, 1, 4, 1, 17409, 1, 3, 3, 1, 7, 1, 2), IpAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: commonAgentTrapIP.setStatus('mandatory')
if mibBuilder.loadTexts: commonAgentTrapIP.setDescription("When the purpose of the TRAP host's IP address.")
commonAgentTrapCommunity = MibTableColumn((1, 3, 6, 1, 4, 1, 17409, 1, 3, 3, 1, 7, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 64))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: commonAgentTrapCommunity.setStatus('mandatory')
if mibBuilder.loadTexts: commonAgentTrapCommunity.setDescription('Send the Community string TRAP.')
commonAgentTrapStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 17409, 1, 3, 3, 1, 7, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("commonAgentTrapEnable", 1), ("commonAgentTrapDisable", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: commonAgentTrapStatus.setStatus('mandatory')
if mibBuilder.loadTexts: commonAgentTrapStatus.setDescription('It said the opening of the TRAP.')
commonDeviceNum = MibScalar((1, 3, 6, 1, 4, 1, 17409, 1, 3, 3, 2, 1), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: commonDeviceNum.setStatus('mandatory')
if mibBuilder.loadTexts: commonDeviceNum.setDescription('The agent said that the current management is the number of devices.')
commonDeviceInfoTable = MibTable((1, 3, 6, 1, 4, 1, 17409, 1, 3, 3, 2, 2), )
if mibBuilder.loadTexts: commonDeviceInfoTable.setStatus('mandatory')
if mibBuilder.loadTexts: commonDeviceInfoTable.setDescription('Acting is currently public information management equipment List.')
commonDeviceInfoEntry = MibTableRow((1, 3, 6, 1, 4, 1, 17409, 1, 3, 3, 2, 2, 1), ).setIndexNames((0, "NSCRTV-ROOT", "commonDeviceSlot"))
if mibBuilder.loadTexts: commonDeviceInfoEntry.setStatus('mandatory')
if mibBuilder.loadTexts: commonDeviceInfoEntry.setDescription('Acting is currently public information management equipment list Table Head.')
commonDeviceSlot = MibTableColumn((1, 3, 6, 1, 4, 1, 17409, 1, 3, 3, 2, 2, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: commonDeviceSlot.setStatus('mandatory')
if mibBuilder.loadTexts: commonDeviceSlot.setDescription('Acting is currently under the management of the equipment list of public information table Index.')
commonDevicesID = MibTableColumn((1, 3, 6, 1, 4, 1, 17409, 1, 3, 3, 2, 2, 1, 2), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 40))).setMaxAccess("readonly")
if mibBuilder.loadTexts: commonDevicesID.setStatus('mandatory')
if mibBuilder.loadTexts: commonDevicesID.setDescription('Designated equipment manufacturers logo.')
commonDeviceVendor = MibTableColumn((1, 3, 6, 1, 4, 1, 17409, 1, 3, 3, 2, 2, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: commonDeviceVendor.setStatus('mandatory')
if mibBuilder.loadTexts: commonDeviceVendor.setDescription('Equipment manufacturers.')
commonDeviceModelNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 17409, 1, 3, 3, 2, 2, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: commonDeviceModelNumber.setStatus('mandatory')
if mibBuilder.loadTexts: commonDeviceModelNumber.setDescription('Equipment Model.')
commonDeviceSerialNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 17409, 1, 3, 3, 2, 2, 1, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: commonDeviceSerialNumber.setStatus('mandatory')
if mibBuilder.loadTexts: commonDeviceSerialNumber.setDescription('The string of equipment.')
commonDeviceVendorInfo = MibTableColumn((1, 3, 6, 1, 4, 1, 17409, 1, 3, 3, 2, 2, 1, 6), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: commonDeviceVendorInfo.setStatus('optional')
if mibBuilder.loadTexts: commonDeviceVendorInfo.setDescription('Equipment suppliers of other special designated information.')
commonDeviceStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 17409, 1, 3, 3, 2, 2, 1, 7), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 1)).setFixedLength(1)).setMaxAccess("readonly")
if mibBuilder.loadTexts: commonDeviceStatus.setStatus('mandatory')
if mibBuilder.loadTexts: commonDeviceStatus.setDescription('The state equipment Bit 0: RSVD0 Bit 1: RSVD1 Bit 2: RSVD2 Bit 3: MAJOR ALARMS Bit 4: MINOR ALARMS Bit 5: RSVD5 Bit 6: RSVD6 Bit 7: RSVD7')
commonDeviceReset = MibTableColumn((1, 3, 6, 1, 4, 1, 17409, 1, 3, 3, 2, 2, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1))).clone(namedValues=NamedValues(("reset", 1)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: commonDeviceReset.setStatus('mandatory')
if mibBuilder.loadTexts: commonDeviceReset.setDescription("Write'1 'will be reset equipment, other values will be written into the non-functional. Reading this object return value'1 ', had no effect on equipment.")
commonDeviceAlarmDetectionControl = MibTableColumn((1, 3, 6, 1, 4, 1, 17409, 1, 3, 3, 2, 2, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("detectionDisabled", 1), ("detectionEnabled", 2), ("detectionEnabledAndRegenerate", 3)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: commonDeviceAlarmDetectionControl.setStatus('mandatory')
if mibBuilder.loadTexts: commonDeviceAlarmDetectionControl.setDescription('This object used to control equipment Alarm Detection.')
commonDeviceMACAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 17409, 1, 3, 3, 2, 2, 1, 10), IpAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: commonDeviceMACAddress.setStatus('mandatory')
if mibBuilder.loadTexts: commonDeviceMACAddress.setDescription('Equipment MAC address.')
commonDeviceTamperStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 17409, 1, 3, 3, 2, 2, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("intact", 1), ("compromised", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: commonDeviceTamperStatus.setStatus('optional')
if mibBuilder.loadTexts: commonDeviceTamperStatus.setDescription('Report of the safety switch equipment (such as whether to open up the lid) state that this object is called discrete attributes of a corresponding entry in the table. Intact that normal, expressed alarm compromised.')
commonDeviceInternalTemperature = MibTableColumn((1, 3, 6, 1, 4, 1, 17409, 1, 3, 3, 2, 2, 1, 12), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-128, 127))).setMaxAccess("readonly")
if mibBuilder.loadTexts: commonDeviceInternalTemperature.setStatus('optional')
if mibBuilder.loadTexts: commonDeviceInternalTemperature.setDescription('Equipment Room (machine) temperature, units degrees Celsius. This request object attribute in a corresponding entry in the table.')
commonDeviceResetCause = MibTableColumn((1, 3, 6, 1, 4, 1, 17409, 1, 3, 3, 2, 2, 1, 13), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("other", 1), ("powerup", 2), ("command", 3), ("watchdog", 4), ("craft", 5)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: commonDeviceResetCause.setStatus('mandatory')
if mibBuilder.loadTexts: commonDeviceResetCause.setDescription('Equipment that the reasons for the recent reduction.')
commonDeviceCraftStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 17409, 1, 3, 3, 2, 2, 1, 14), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("disconnected", 1), ("connected", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: commonDeviceCraftStatus.setStatus('mandatory')
if mibBuilder.loadTexts: commonDeviceCraftStatus.setDescription('This object interface that local equipment (such as RS232 or RS485 interface) state.')
commonDevicesOID = MibTableColumn((1, 3, 6, 1, 4, 1, 17409, 1, 3, 3, 2, 2, 1, 15), ObjectIdentifier()).setMaxAccess("readonly")
if mibBuilder.loadTexts: commonDevicesOID.setStatus('mandatory')
if mibBuilder.loadTexts: commonDevicesOID.setDescription('Goals identifier string, point to a concrete realization of the equipment.')
commonDeviceAcct = MibTableColumn((1, 3, 6, 1, 4, 1, 17409, 1, 3, 3, 2, 2, 1, 16), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: commonDeviceAcct.setStatus('optional')
if mibBuilder.loadTexts: commonDeviceAcct.setDescription('Equipment that the accumulated work time, units of s.')
commonDeviceName = MibTableColumn((1, 3, 6, 1, 4, 1, 17409, 1, 3, 3, 2, 2, 1, 17), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: commonDeviceName.setStatus('mandatory')
if mibBuilder.loadTexts: commonDeviceName.setDescription('Equipment Name.')
commonDeviceMFD = MibTableColumn((1, 3, 6, 1, 4, 1, 17409, 1, 3, 3, 2, 2, 1, 18), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(10, 10)).setFixedLength(10)).setMaxAccess("readonly")
if mibBuilder.loadTexts: commonDeviceMFD.setStatus('mandatory')
if mibBuilder.loadTexts: commonDeviceMFD.setDescription('Date of production equipment.')
commonDeviceFW = MibTableColumn((1, 3, 6, 1, 4, 1, 17409, 1, 3, 3, 2, 2, 1, 19), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly")
if mibBuilder.loadTexts: commonDeviceFW.setStatus('mandatory')
if mibBuilder.loadTexts: commonDeviceFW.setDescription('Firmware information equipment.')
hfcColdStart = NotificationType((1, 3, 6, 1, 4, 1, 17409, 1) + (0,0)).setObjects(("NSCRTV-ROOT", "commonPhysAddress"), ("NSCRTV-ROOT", "commonNELogicalID"))
if mibBuilder.loadTexts: hfcColdStart.setDescription('HfcColdStart traps that are sent to re-initialization protocol entities, and entities agent configuration or agreement may have changed. This trap only after the success of transponder sent registration.')
hfcWarmStart = NotificationType((1, 3, 6, 1, 4, 1, 17409, 1) + (0,2)).setObjects(("NSCRTV-ROOT", "commonPhysAddress"), ("NSCRTV-ROOT", "commonNELogicalID"))
if mibBuilder.loadTexts: hfcWarmStart.setDescription('HfcWarmStart traps that are sent to re-initialization protocol entities, and entities agent configuration or agreement has not changed. This trap only after the completion of transponder sent registration.')
oaVendorOID = MibScalar((1, 3, 6, 1, 4, 1, 17409, 1, 11, 1), ObjectIdentifier()).setMaxAccess("readonly")
if mibBuilder.loadTexts: oaVendorOID.setStatus('optional')
if mibBuilder.loadTexts: oaVendorOID.setDescription('This object provides manufacturers of optical amplifier MIB expansion. Without the expansion, this should be targeting at the optical amplifier nodes oaIdent.')
oaOutputOpticalPower = MibScalar((1, 3, 6, 1, 4, 1, 17409, 1, 11, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: oaOutputOpticalPower.setStatus('mandatory')
if mibBuilder.loadTexts: oaOutputOpticalPower.setDescription('The output optical power units to 0.1 dBm, the object attributes required to register an entry MIB.')
oaInputOpticalPower = MibScalar((1, 3, 6, 1, 4, 1, 17409, 1, 11, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-128, 127))).setMaxAccess("readonly")
if mibBuilder.loadTexts: oaInputOpticalPower.setStatus('mandatory')
if mibBuilder.loadTexts: oaInputOpticalPower.setDescription('Input optical power units to 0.1 dBm, the object attributes required to register an entry MIB.')
oaPumpTable = MibTable((1, 3, 6, 1, 4, 1, 17409, 1, 11, 4), )
if mibBuilder.loadTexts: oaPumpTable.setStatus('mandatory')
if mibBuilder.loadTexts: oaPumpTable.setDescription('EDFA laser pump Information Table.')
oaPumpEntry = MibTableRow((1, 3, 6, 1, 4, 1, 17409, 1, 11, 4, 1), ).setIndexNames((0, "NSCRTV-ROOT", "oaPumpIndex"))
if mibBuilder.loadTexts: oaPumpEntry.setStatus('mandatory')
if mibBuilder.loadTexts: oaPumpEntry.setDescription('Each laser-pumped optical amplifier Information Table Head.')
oaPumpIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 17409, 1, 11, 4, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: oaPumpIndex.setStatus('mandatory')
if mibBuilder.loadTexts: oaPumpIndex.setDescription('Laser-pumped optical amplifier index value.')
oaPumpBIAS = MibTableColumn((1, 3, 6, 1, 4, 1, 17409, 1, 11, 4, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: oaPumpBIAS.setStatus('mandatory')
if mibBuilder.loadTexts: oaPumpBIAS.setDescription('The pump laser bias current, flat mA, this attribute MIB objects require an entry in the register.')
oaPumpTEC = MibTableColumn((1, 3, 6, 1, 4, 1, 17409, 1, 11, 4, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-32768, 32767))).setMaxAccess("readonly")
if mibBuilder.loadTexts: oaPumpTEC.setStatus('optional')
if mibBuilder.loadTexts: oaPumpTEC.setDescription('Current laser pump refrigeration unit is 0.01 A, this attribute MIB objects require an entry in the register.')
oaPumpTemp = MibTableColumn((1, 3, 6, 1, 4, 1, 17409, 1, 11, 4, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 32768))).setMaxAccess("readonly")
if mibBuilder.loadTexts: oaPumpTemp.setStatus('mandatory')
if mibBuilder.loadTexts: oaPumpTemp.setDescription('Laser pump temperature, units of 0.10 C, this attribute MIB objects require an entry in the register.')
oaNumberDCPowerSupply = MibScalar((1, 3, 6, 1, 4, 1, 17409, 1, 11, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 16))).setMaxAccess("readonly")
if mibBuilder.loadTexts: oaNumberDCPowerSupply.setStatus('mandatory')
if mibBuilder.loadTexts: oaNumberDCPowerSupply.setDescription('The number of internal DC power supply, 0 expressed transponder does not support this function.')
oaDCPowerSupplyMode = MibScalar((1, 3, 6, 1, 4, 1, 17409, 1, 11, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("loadsharing", 1), ("switchedRedundant", 2), ("aloneSupply", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: oaDCPowerSupplyMode.setStatus('optional')
if mibBuilder.loadTexts: oaDCPowerSupplyMode.setDescription('Power supply mode: load sharing, standby switching or an independent power supply.')
oaDCPowerTable = MibTable((1, 3, 6, 1, 4, 1, 17409, 1, 11, 7), )
if mibBuilder.loadTexts: oaDCPowerTable.setStatus('mandatory')
if mibBuilder.loadTexts: oaDCPowerTable.setDescription('DC Power Information Table.')
oaDCPowerEntry = MibTableRow((1, 3, 6, 1, 4, 1, 17409, 1, 11, 7, 1), ).setIndexNames((0, "NSCRTV-ROOT", "oaDCPowerIndex"))
if mibBuilder.loadTexts: oaDCPowerEntry.setStatus('mandatory')
if mibBuilder.loadTexts: oaDCPowerEntry.setDescription('DC Power Information Table Head.')
oaDCPowerIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 17409, 1, 11, 7, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: oaDCPowerIndex.setStatus('mandatory')
if mibBuilder.loadTexts: oaDCPowerIndex.setDescription('DC Power Index.')
oaDCPowerVoltage = MibTableColumn((1, 3, 6, 1, 4, 1, 17409, 1, 11, 7, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-32768, 32767))).setMaxAccess("readonly")
if mibBuilder.loadTexts: oaDCPowerVoltage.setStatus('mandatory')
if mibBuilder.loadTexts: oaDCPowerVoltage.setDescription('Supply voltage, the unit is 0.1 V. This attribute MIB objects require an entry in the register.')
oaDCPowerCurrent = MibTableColumn((1, 3, 6, 1, 4, 1, 17409, 1, 11, 7, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: oaDCPowerCurrent.setStatus('mandatory')
if mibBuilder.loadTexts: oaDCPowerCurrent.setDescription('Electricity power supply unit is 0.01 A. This attribute MIB objects require an entry in the register.')
oaDCPowerName = MibTableColumn((1, 3, 6, 1, 4, 1, 17409, 1, 11, 7, 1, 4), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: oaDCPowerName.setStatus('mandatory')
if mibBuilder.loadTexts: oaDCPowerName.setDescription('Indicate the name of the power supply, for example: 24 V DC power supply. This field value by the user, should at least be marked with a number of power supply voltage and distinguish between each other. When the object of this table have a warning, that this object should be put into the name of alarmText hfcAlarmEvent traps in the target.')
oaOutputOpticalPowerSet = MibScalar((1, 3, 6, 1, 4, 1, 17409, 1, 11, 11), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: oaOutputOpticalPowerSet.setStatus('mandatory')
if mibBuilder.loadTexts: oaOutputOpticalPowerSet.setDescription('The output optical power control ,units to 0.1 dBm')
oaGainSet = MibScalar((1, 3, 6, 1, 4, 1, 17409, 1, 11, 12), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: oaGainSet.setStatus('mandatory')
if mibBuilder.loadTexts: oaGainSet.setDescription('units to 0.1 dB')
powerSupplyStatusA = MibScalar((1, 3, 6, 1, 4, 1, 17409, 1, 11, 32), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))).clone(namedValues=NamedValues(("undefined", 0), ("nominal", 1), ("failure", 2), ("notInstalled", 3)))).setUnits('no units').setMaxAccess("readonly")
if mibBuilder.loadTexts: powerSupplyStatusA.setStatus('current')
if mibBuilder.loadTexts: powerSupplyStatusA.setDescription('Returns the operating status of power supply A.')
powerSupplyStatusB = MibScalar((1, 3, 6, 1, 4, 1, 17409, 1, 11, 33), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))).clone(namedValues=NamedValues(("undefined", 0), ("nominal", 1), ("failure", 2), ("notInstalled", 3)))).setUnits('no units').setMaxAccess("readonly")
if mibBuilder.loadTexts: powerSupplyStatusB.setStatus('current')
if mibBuilder.loadTexts: powerSupplyStatusB.setDescription('Returns the operating status of power supply B.')
mibBuilder.exportSymbols("NSCRTV-ROOT", commonRfGroup=commonRfGroup, oaPumpTable=oaPumpTable, oaDCPowerSupplyMode=oaDCPowerSupplyMode, hfcWarmStart=hfcWarmStart, commonAgentMaxTraps=commonAgentMaxTraps, commonReturnPathFrequency=commonReturnPathFrequency, commonAgentTrapIndex=commonAgentTrapIndex, commonDeviceInfoTable=commonDeviceInfoTable, commonAgentTrapStatus=commonAgentTrapStatus, oaDCPowerTable=oaDCPowerTable, discreteAlarmEnable=discreteAlarmEnable, commonBackwardPathCollisionTimes=commonBackwardPathCollisionTimes, commonNELogicalID=commonNELogicalID, commonForwardPathFramingErrors=commonForwardPathFramingErrors, alarmLogNumberOfEntries=alarmLogNumberOfEntries, oaInputOpticalPower=oaInputOpticalPower, analogPropertyEntry=analogPropertyEntry, oaPumpIndex=oaPumpIndex, commonDeviceMACAddress=commonDeviceMACAddress, commonForwardPathLOSEvents=commonForwardPathLOSEvents, commonDeviceInternalTemperature=commonDeviceInternalTemperature, oaPumpTemp=oaPumpTemp, commonACKTimeoutWindow=commonACKTimeoutWindow, commonAgentTrapEntry=commonAgentTrapEntry, currentAlarmOID=currentAlarmOID, commonDeviceCraftStatus=commonDeviceCraftStatus, commonDeviceName=commonDeviceName, commonIdent=commonIdent, commonResetCause=commonResetCause, analogPropertyTable=analogPropertyTable, commonMulticastAddressEntry=commonMulticastAddressEntry, commonDevicesOID=commonDevicesOID, oaDCPowerEntry=oaDCPowerEntry, commonDeviceStatus=commonDeviceStatus, currentAlarmValue=currentAlarmValue, commonAgentTrapMinInterval=commonAgentTrapMinInterval, nscrtvHFCemsTree=nscrtvHFCemsTree, alarmLogTable=alarmLogTable, hfcColdStart=hfcColdStart, commonNEVendorInfo=commonNEVendorInfo, oaOutputOpticalPowerSet=oaOutputOpticalPowerSet, oaOutputOpticalPower=oaOutputOpticalPower, commonDeviceAcct=commonDeviceAcct, commonMulticastAddressNumber=commonMulticastAddressNumber, commonAgentGroup=commonAgentGroup, currentAlarmTable=currentAlarmTable, oaDCPowerCurrent=oaDCPowerCurrent, commonDeviceInfoEntry=commonDeviceInfoEntry, discreteAlarmValue=discreteAlarmValue, commonVarBindings=commonVarBindings, commonMacStats=commonMacStats, discreteParameterOID=discreteParameterOID, commonForwardPathFrequency=commonForwardPathFrequency, commonDeviceSerialNumber=commonDeviceSerialNumber, commonAgentReset=commonAgentReset, commonAgentTrapMaxInterval=commonAgentTrapMaxInterval, commonDeviceGroup=commonDeviceGroup, propertyIdent=propertyIdent, nscrtvRoot=nscrtvRoot, commonMACGroup=commonMACGroup, commonDeviceMFD=commonDeviceMFD, commonNetworkAddress=commonNetworkAddress, oaPumpTEC=oaPumpTEC, commonMaxPayloadSize=commonMaxPayloadSize, powerSupplyStatusB=powerSupplyStatusB, hfcAlarmEvent=hfcAlarmEvent, powerSupplyStatusA=powerSupplyStatusA, discreteAlarmState=discreteAlarmState, commonBackoffMaximumExponent=commonBackoffMaximumExponent, analogAlarmState=analogAlarmState, analogAlarmHIHI=analogAlarmHIHI, currentAlarmEntry=currentAlarmEntry, alarmLogEntry=alarmLogEntry, commonBackoffParams=commonBackoffParams, oaPumpEntry=oaPumpEntry, commonDeviceModelNumber=commonDeviceModelNumber, commonForwardPathReceiveLevel=commonForwardPathReceiveLevel, commonDeviceSlot=commonDeviceSlot, analogAlarmLO=analogAlarmLO, oaGainSet=oaGainSet, commonTime=commonTime, alarmsIdent=alarmsIdent, commonNEModelNumber=commonNEModelNumber, commonMaximumMACLayerRetries=commonMaximumMACLayerRetries, commonAgentTrapIP=commonAgentTrapIP, commonBackoffPeriod=commonBackoffPeriod, commonPhysAddress=commonPhysAddress, commonMaxMulticastAddresses=commonMaxMulticastAddresses, commonDeviceAlarmDetectionControl=commonDeviceAlarmDetectionControl, commonDeviceVendorInfo=commonDeviceVendorInfo, commonAdminUseRf=commonAdminUseRf, commonAdminGroup=commonAdminGroup, alarmEnable=alarmEnable, commonCheckCode=commonCheckCode, commonNEVendor=commonNEVendor, commonMaxReturnPower=commonMaxReturnPower, commonAgentTrapCommunity=commonAgentTrapCommunity, oaDCPowerIndex=oaDCPowerIndex, commonDeviceId=commonDeviceId, oaVendorOID=oaVendorOID, alarmLogLastIndex=alarmLogLastIndex, commonTrapCommunityString=commonTrapCommunityString, commonReset=commonReset, commonMacAddress=commonMacAddress, discretePropertyTable=discretePropertyTable, analogAlarmHI=analogAlarmHI, commonForwardPathCRCErrors=commonForwardPathCRCErrors, commonNEStatus=commonNEStatus, oaIdent=oaIdent, commonDeviceOID=commonDeviceOID, commonInvalidMacCmds=commonInvalidMacCmds, oaPumpBIAS=oaPumpBIAS, commonTrapAck=commonTrapAck, commonDeviceVendor=commonDeviceVendor, commonDeviceResetCause=commonDeviceResetCause, commonDeviceFW=commonDeviceFW, alarmText=alarmText, commonAdminUseEthernet=commonAdminUseEthernet, oaDCPowerVoltage=oaDCPowerVoltage, oaDCPowerName=oaDCPowerName, commonDeviceTamperStatus=commonDeviceTamperStatus, commondownload=commondownload, commonDeviceNum=commonDeviceNum, oaNumberDCPowerSupply=oaNumberDCPowerSupply, alarmLogInformation=alarmLogInformation, commonAlarmDetectionControl=commonAlarmDetectionControl, analogParameterOID=analogParameterOID, commonAgentBootWay=commonAgentBootWay, commonInternalTemperature=commonInternalTemperature, commonTamperStatus=commonTamperStatus, commonMulticastAddressIndex=commonMulticastAddressIndex, alarmLogIndex=alarmLogIndex, commonNESerialNumber=commonNESerialNumber, commonProvisionedReturnPowerLevel=commonProvisionedReturnPowerLevel, analogAlarmDeadband=analogAlarmDeadband, currentAlarmState=currentAlarmState, discretePropertyEntry=discretePropertyEntry, commonDeviceReset=commonDeviceReset, commonBackoffMinimumExponent=commonBackoffMinimumExponent, commonMulticastAddressTable=commonMulticastAddressTable, analogAlarmLOLO=analogAlarmLOLO, commonAgentTrapTable=commonAgentTrapTable, commonDevicesID=commonDevicesID, commonCraftStatus=commonCraftStatus)
|
S = input()
S = S.replace('BC', 'D')
cnt_a = 0
ans = 0
for i in range(len(S)):
if S[i] == 'A':
cnt_a += 1
elif S[i] == 'D':
ans += cnt_a
else:
cnt_a = 0
print(ans)
|
#zip
my_list = [1,2,3]
your_list = [100,200,300]
their_list = [1000,2000,3000]
print(list(zip(my_list, your_list, their_list))[0][2])
print(list(zip(my_list, your_list, their_list)))
|
# https://leetcode.com/problems/minimum-falling-path-sum-ii/
# Given a square grid of integers arr, a falling path with non-zero shifts is a
# choice of exactly one element from each row of arr, such that no two elements
# chosen in adjacent rows are in the same column.
# Return the minimum sum of a falling path with non-zero shifts.
################################################################################
# dp[m][n] = minimum sum for reaching (m,n)
# find two minimums from the previous row
class Solution:
def minFallingPathSum(self, arr: List[List[int]]) -> int:
n = len(arr)
if n == 1:
return arr[0][0]
dp = [[0 for _ in range(n)] for _ in range(n)]
# initialize first row
for j in range(n):
dp[0][j] = arr[0][j]
# loop over each row
for i in range(1, n):
min_1st, min_2nd = heapq.nsmallest(2, dp[i-1])
for j in range(n):
if dp[i-1][j] == min_1st:
dp[i][j] = arr[i][j] + min_2nd
else:
dp[i][j] = arr[i][j] + min_1st
return min(dp[-1])
|
"""
83. 删除排序链表中的重复元素
https://leetcode-cn.com/problems/remove-duplicates-from-sorted-list/
"""
class ListNode:
def __init__(self, val=0, next=None):
self.val = val
self.next = next
def deleteDuplicates(head: ListNode):
if head == None: return None
# slow为慢指针,fast为快指针
slow = head
fast = head.next
while (fast != None):
if fast.val != slow.val:
slow.next = fast
slow = slow.next
fast = fast.next
# 断开与后面重复元素的连接
slow.next = None
return head
|
# Configuration
# [Yoshikawa Taichi]
# version 1.3 (Jan. 28, 2020)
class Configuration():
'''
Configuration
'''
def __init__(self):
# ----- k-means components -----
## cluster numbers
self.centers = 3
## upper limit of iterations
self.upper_limit_iter = 1000
# ----- k-means options -----
self.similarity_index = 'euclidean-distance'
# ----- Dataset Configuration -----
self.dataset_url = 'https://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data'
self.dataset_index = {
'dec' : [0,1],
'obj' : 4
}
self.dataset_dec = ['Sepal Length', 'Sepal Width']
self.dataset_one_hot_vector = {
'Iris-setosa' : 1,
'Iris-versicolor' : 2,
'Iris-virginica' : 3
}
# ----- I/O Configuration -----
self.path_out = '.'
|
"""
Initialize a Metadata object once and access the respective metadata as public variables. Following are the variable names:
owner table = owner_metadata
auto_sale table = auto_sale_metadata
restriction table = restriction_metadata
driving_condition table = driving_condition_metadata
ticket table = ticket_metadata
ticket_type table = ticket_type_metadata
vehicle table = vehicle_metadata
vehicle_type table = vehicle_type_metadata
drive_licence table = drive_licence_metadata
people table = people_metadata
"""
class Metadata:
def __init__(self,cursor):
self.cursor=cursor
self.meta_owner()
self.meta_autosale()
self.meta_restriction()
self.meta_ticket()
self.meta_vehicle()
self.meta_driving_condition()
self.meta_ticket_type()
self.meta_vehicle_type()
self.meta_drive_licence()
self.meta_people()
def meta_owner(self):
self.cursor.execute("select * from owner")
self.owner_metadata=self.cursor.description
def meta_autosale(self):
self.cursor.execute("select * from auto_sale")
self.auto_sale_metadata=self.cursor.description
def meta_restriction(self):
self.cursor.execute("select * from restriction")
self.restriction_metadata=self.cursor.description
def meta_driving_condition(self):
self.cursor.execute("select * from driving_condition")
self.driving_condition_metadata=self.cursor.description
def meta_ticket(self):
self.cursor.execute("select * from ticket")
self.ticket_metadata=self.cursor.description
def meta_ticket_type(self):
self.cursor.execute("select * from ticket_type")
self.ticket_type_metadata=self.cursor.description
def meta_vehicle(self):
self.cursor.execute("select * from vehicle")
self.vehicle_metadata=self.cursor.description
def meta_vehicle_type(self):
self.cursor.execute("select * from vehicle_type")
self.vehicle_type_metadata=self.cursor.description
def meta_drive_licence(self):
self.cursor.execute("select * from drive_licence")
self.drive_licence_metadata=self.cursor.description
def meta_people(self):
self.cursor.execute("select * from people")
self.people_metadata=self.cursor.description
|
################### PEAK FINDING ###################
# 1D peak finding COMPLEXITY --> O(theta)(log n)
def peak_1D(l):
if len(l) == 1: # if a singleton list then simply returns the element
return l[0]
elif not len(l): # if a null list then returns None
return None
else:
mid = len(l) // 2 # takes a mid index in the list
if l[mid - 1] > l[mid]: # checks if the preceding is larger then the mid
return peak_1D(l[: mid]) # if yes then returns a recursion
elif l[mid + 1] > l[mid]: # similar for the next element after mid -->if 'if' fails
return peak_1D(l[mid + 1:])
else: # this means the l[mid - 1] < l[mid] > l[mid + 1]
return l[mid] # so l[mid] is the peak
# print(peak_1D([1,2,4,7,8,9,6,5,8,7,4,2,3,6]))
# 2D peak finding COMPLEXITY --> O(theta)(n log n)
def peak_2D(l):
#[1,2,5,4]
#[7,8,9,6] # e.g
#[4,8,3,1]
#[9,5,4,7]
if len(l) == 1:
if len(l[0]) == 1:
return l[0][0]
# similar in 1D, just a nested if
else:
return None
elif not len(l):
return None
else:
mid = len(l) // 2 # takes an arbitrary mid row
# print(max(l[mid]))
global_row_max = max(l[mid]) # finds the global maximum in the 'mid' row
column_no = l[mid].index(global_row_max) # finds the column number of the
# print(column_no) # global max in 'mid' row
if l[mid - 1][column_no] > l[mid][column_no]: # similar to 1D compares rows
return peak_2D(l[: mid + 1]) # in a selected column
elif l[mid + 1][column_no] > l[mid][column_no]:
return peak_2D(l[mid + 1:])
else: # if up_element < the_max in mid row > lower_element
return l[mid][column_no] # then it is the 2D peak
# print(peak_2D(
#
# [[1,2,5,4],
# [7,2,1,6],
# [4,1,3,1],
# [1,5,4,2]]
#
# ))
|
# problem : https://leetcode.com/problems/binary-tree-postorder-traversal/
# time complexity : O(N)
# data structure : stack
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution:
def postorderTraversal(self, root: TreeNode) -> List[int]:
ans = []
s = [(root, 0)]
while len(s) > 0:
node, appearCnt = s.pop()
if node is None:
continue
if appearCnt == 0:
s.append((node, 1))
s.append((node.right, 0))
s.append((node.left, 0))
else:
ans.append(node.val)
return ans
|
"""
抽象工厂方法--对象创建型模式
1. 目标
定义一个用于创建对象的接口, 让子类决定实例化哪一个类, 使一个类的实例化延迟到子类。
"""
class CakeFactory(object):
def make_cake(self):
print('make a cake')
class CreamCakeFactory(CakeFactory):
def make_cake(self):
print('make a cream cake')
return CreamCake()
class FruitCakeFactory(CakeFactory):
def make_cake(self):
print('make a fruit cake')
return FruitCake()
class Cake(object):
def __repr__(self):
return 'This is a cake'
class CreamCake(Cake):
def __repr__(self):
return 'This is a cream cake'
class FruitCake(Cake):
def __repr__(self):
return 'This is a fruit cake'
if __name__ == '__main__':
cream_cake_factory = CreamCakeFactory()
cream_cake = cream_cake_factory.make_cake()
print(cream_cake)
fruit_cake_factory = FruitCakeFactory()
fruit_cake = fruit_cake_factory.make_cake()
print(fruit_cake)
|
#
# PySNMP MIB module GARP-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/GARP-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 19:04:38 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueRangeConstraint, SingleValueConstraint, ValueSizeConstraint, ConstraintsIntersection, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "SingleValueConstraint", "ValueSizeConstraint", "ConstraintsIntersection", "ConstraintsUnion")
NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance")
Bits, MibScalar, MibTable, MibTableRow, MibTableColumn, TimeTicks, iso, ModuleIdentity, ObjectIdentity, Unsigned32, IpAddress, enterprises, Counter32, MibIdentifier, Integer32, Counter64, NotificationType, Gauge32 = mibBuilder.importSymbols("SNMPv2-SMI", "Bits", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "TimeTicks", "iso", "ModuleIdentity", "ObjectIdentity", "Unsigned32", "IpAddress", "enterprises", "Counter32", "MibIdentifier", "Integer32", "Counter64", "NotificationType", "Gauge32")
PhysAddress, TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "PhysAddress", "TextualConvention", "DisplayString")
cabletron = MibIdentifier((1, 3, 6, 1, 4, 1, 52))
mibs = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4))
ctronExp = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 2))
ctVLANMib = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 2, 12))
ctVLANMgr = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 2, 12, 1))
ctGarp = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 2, 12, 1, 3))
ctGarpTables = MibIdentifier((1, 3, 6, 1, 4, 1, 52, 4, 2, 12, 1, 3, 2))
garpApplicationTable = MibTable((1, 3, 6, 1, 4, 1, 52, 4, 2, 12, 1, 3, 2, 1), )
if mibBuilder.loadTexts: garpApplicationTable.setStatus('mandatory')
garpApplicationEntry = MibTableRow((1, 3, 6, 1, 4, 1, 52, 4, 2, 12, 1, 3, 2, 1, 1), ).setIndexNames((0, "GARP-MIB", "garpApplicationAppType"))
if mibBuilder.loadTexts: garpApplicationEntry.setStatus('mandatory')
garpApplicationAppType = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 12, 1, 3, 2, 1, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: garpApplicationAppType.setStatus('mandatory')
garpApplicationName = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 12, 1, 3, 2, 1, 1, 2), PhysAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: garpApplicationName.setStatus('mandatory')
garpApplicationFailedRegistrations = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 12, 1, 3, 2, 1, 1, 3), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: garpApplicationFailedRegistrations.setStatus('mandatory')
garpApplicationOperationStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 12, 1, 3, 2, 1, 1, 4), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: garpApplicationOperationStatus.setStatus('mandatory')
garpPortOperationTable = MibTable((1, 3, 6, 1, 4, 1, 52, 4, 2, 12, 1, 3, 2, 2), )
if mibBuilder.loadTexts: garpPortOperationTable.setStatus('mandatory')
garpPortOperationEntry = MibTableRow((1, 3, 6, 1, 4, 1, 52, 4, 2, 12, 1, 3, 2, 2, 1), ).setIndexNames((0, "GARP-MIB", "garpPortOperationAppType"), (0, "GARP-MIB", "garpPortOperationPort"))
if mibBuilder.loadTexts: garpPortOperationEntry.setStatus('mandatory')
garpPortOperationAppType = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 12, 1, 3, 2, 2, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: garpPortOperationAppType.setStatus('mandatory')
garpPortOperationPort = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 12, 1, 3, 2, 2, 1, 2), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: garpPortOperationPort.setStatus('mandatory')
garpPortOperationStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 12, 1, 3, 2, 2, 1, 3), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: garpPortOperationStatus.setStatus('mandatory')
garpTimerTable = MibTable((1, 3, 6, 1, 4, 1, 52, 4, 2, 12, 1, 3, 2, 3), )
if mibBuilder.loadTexts: garpTimerTable.setStatus('mandatory')
garpTimerEntry = MibTableRow((1, 3, 6, 1, 4, 1, 52, 4, 2, 12, 1, 3, 2, 3, 1), ).setIndexNames((0, "GARP-MIB", "garpTimerAttributeAppType"), (0, "GARP-MIB", "garpTimerAttributePort"))
if mibBuilder.loadTexts: garpTimerEntry.setStatus('mandatory')
garpTimerAttributeAppType = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 12, 1, 3, 2, 3, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: garpTimerAttributeAppType.setStatus('mandatory')
garpTimerAttributePort = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 12, 1, 3, 2, 3, 1, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: garpTimerAttributePort.setStatus('mandatory')
garpTimerAttributeJoin = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 12, 1, 3, 2, 3, 1, 3), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: garpTimerAttributeJoin.setStatus('mandatory')
garpTimerAttributeLeave = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 12, 1, 3, 2, 3, 1, 4), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: garpTimerAttributeLeave.setStatus('mandatory')
garpTimerAttributeLeaveAll = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 12, 1, 3, 2, 3, 1, 5), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: garpTimerAttributeLeaveAll.setStatus('mandatory')
garpAttributeTable = MibTable((1, 3, 6, 1, 4, 1, 52, 4, 2, 12, 1, 3, 2, 4), )
if mibBuilder.loadTexts: garpAttributeTable.setStatus('mandatory')
garpAttributeEntry = MibTableRow((1, 3, 6, 1, 4, 1, 52, 4, 2, 12, 1, 3, 2, 4, 1), ).setIndexNames((0, "GARP-MIB", "garpAttributeAppType"), (0, "GARP-MIB", "garpAttributePort"), (0, "GARP-MIB", "garpAttributeValue"), (0, "GARP-MIB", "garpAttributeGIPContextID"))
if mibBuilder.loadTexts: garpAttributeEntry.setStatus('mandatory')
garpAttributeAppType = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 12, 1, 3, 2, 4, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: garpAttributeAppType.setStatus('mandatory')
garpAttributePort = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 12, 1, 3, 2, 4, 1, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: garpAttributePort.setStatus('mandatory')
garpAttributeValue = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 12, 1, 3, 2, 4, 1, 3), OctetString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: garpAttributeValue.setStatus('mandatory')
garpAttributeGIPContextID = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 12, 1, 3, 2, 4, 1, 4), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: garpAttributeGIPContextID.setStatus('mandatory')
garpAttributeType = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 12, 1, 3, 2, 4, 1, 5), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: garpAttributeType.setStatus('mandatory')
garpAttributeProtoAdminCtrl = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 12, 1, 3, 2, 4, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("normal-Participan", 0), ("non-Participan", 1)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: garpAttributeProtoAdminCtrl.setStatus('mandatory')
garpAttributeRegisControl = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 12, 1, 3, 2, 4, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("garpRegistrarNormal", 0), ("garpRegistrarFixed", 1), ("garpRegistrarForbidden", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: garpAttributeRegisControl.setStatus('mandatory')
garpAttributeStateValue = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 12, 1, 3, 2, 4, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23))).clone(namedValues=NamedValues(("va-mt", 0), ("va-lv", 1), ("vp-mt", 2), ("vp-lv", 3), ("vo-mt", 4), ("vo-lv", 5), ("va-in", 6), ("vp-in", 7), ("vo-in", 8), ("aa-mt", 9), ("aa-lv", 10), ("aa-in", 11), ("ap-in", 12), ("ao-in", 13), ("qa-mt", 14), ("qa-lv", 15), ("qa-in", 16), ("qp-in", 17), ("qo-in", 18), ("la-mt", 19), ("la-lv", 20), ("lo-mt", 21), ("lo-lv", 22), ("la-in", 23)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: garpAttributeStateValue.setStatus('mandatory')
garpAttributeOrigOfLastPDU = MibTableColumn((1, 3, 6, 1, 4, 1, 52, 4, 2, 12, 1, 3, 2, 4, 1, 9), PhysAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: garpAttributeOrigOfLastPDU.setStatus('optional')
mibBuilder.exportSymbols("GARP-MIB", garpApplicationAppType=garpApplicationAppType, garpAttributeTable=garpAttributeTable, garpTimerTable=garpTimerTable, ctVLANMgr=ctVLANMgr, cabletron=cabletron, garpTimerEntry=garpTimerEntry, garpPortOperationTable=garpPortOperationTable, garpAttributeGIPContextID=garpAttributeGIPContextID, garpAttributeRegisControl=garpAttributeRegisControl, garpAttributeValue=garpAttributeValue, mibs=mibs, garpApplicationTable=garpApplicationTable, garpTimerAttributeJoin=garpTimerAttributeJoin, garpAttributeEntry=garpAttributeEntry, garpAttributeAppType=garpAttributeAppType, garpPortOperationAppType=garpPortOperationAppType, ctronExp=ctronExp, garpPortOperationEntry=garpPortOperationEntry, garpAttributeProtoAdminCtrl=garpAttributeProtoAdminCtrl, garpApplicationFailedRegistrations=garpApplicationFailedRegistrations, ctGarpTables=ctGarpTables, garpTimerAttributeLeaveAll=garpTimerAttributeLeaveAll, garpPortOperationStatus=garpPortOperationStatus, garpAttributePort=garpAttributePort, garpApplicationName=garpApplicationName, garpAttributeType=garpAttributeType, garpApplicationEntry=garpApplicationEntry, garpTimerAttributeLeave=garpTimerAttributeLeave, garpPortOperationPort=garpPortOperationPort, ctVLANMib=ctVLANMib, garpAttributeOrigOfLastPDU=garpAttributeOrigOfLastPDU, garpTimerAttributeAppType=garpTimerAttributeAppType, garpAttributeStateValue=garpAttributeStateValue, ctGarp=ctGarp, garpTimerAttributePort=garpTimerAttributePort, garpApplicationOperationStatus=garpApplicationOperationStatus)
|
# Construct arrays of data: dems, reps
dems = np.array([True] * 153 + [False] * 91)
reps = np.array([True] * 136 + [False] * 35)
def frac_yea_dems(dems, reps):
"""Compute fraction of Democrat yea votes."""
frac = np.sum(dems) / len(dems)
return frac
# Acquire permutation samples: perm_replicates
perm_replicates = draw_perm_reps(dems, reps, frac_yea_dems, size=10000)
# Compute and print p-value: p
p = np.sum(perm_replicates <= 153/244) / len(perm_replicates)
print('p-value =', p)
|
class IIDError:
INTERNAL_ERROR = 'internal-error'
UNKNOWN_ERROR = 'unknown-error'
ERROR_CODES = {
400: 'invalid-argument',
401: 'authentication-error',
403: 'authentication-error',
500: INTERNAL_ERROR,
503: 'server-unavailable'
}
|
a, b, n = (int(i) for i in raw_input().split())
if n == 1: print(a)
elif n == 2: print(b)
else:
for x in range(2, n):
tn = a + b*b
a = b
b = tn
print(tn)
|
# Copyright BigchainDB GmbH and BigchainDB contributors
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
# Code is Apache-2.0 and docs are CC-BY-4.0
class BigchainDBError(Exception):
"""Base class for BigchainDB exceptions."""
class CriticalDoubleSpend(BigchainDBError):
"""Data integrity error that requires attention"""
|
# Name : Exercise7-2.py
# Author : Ryan Carr
# Date : 02/03/19
# Purpose : Open a file, calculate average spam confidence
# Display result to user
# Text files are stored in the data folder one level up
filename = input('Enter a filename: ')
if filename == 'mbox-short.txt':
filename = '../data/mbox-short.txt'
elif filename == 'mbox.txt':
filename = '../data/mbox.txt'
fh = open(filename, 'r')
count = 0
total = 0.0
for line in fh:
if not line.startswith('X-DSPAM-Confidence:'): continue
position = line.find(':')
number = float(line[position + 1:])
total += number
count += 1
average = total / count
print('Average spam confidence:', average)
fh.close()
|
sexo = str(input('Informe seu sexo [M/F]: ')).upper().strip()[0]
while sexo not in 'MmFf':
sexo = str(input('Informação incorreta, digite novamente [M/F]: ')).upper().strip()[0]
print(f'Obrigado! Seu sexo foi computado como {sexo}!')
|
#
# PySNMP MIB module CISCO-BITS-CLOCK-CAPABILITY (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-BITS-CLOCK-CAPABILITY
# Produced by pysmi-0.3.4 at Mon Apr 29 17:34:01 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
Integer, ObjectIdentifier, OctetString = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
SingleValueConstraint, ConstraintsUnion, ValueRangeConstraint, ConstraintsIntersection, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ConstraintsUnion", "ValueRangeConstraint", "ConstraintsIntersection", "ValueSizeConstraint")
ciscoAgentCapability, = mibBuilder.importSymbols("CISCO-SMI", "ciscoAgentCapability")
NotificationGroup, AgentCapabilities, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "AgentCapabilities", "ModuleCompliance")
MibScalar, MibTable, MibTableRow, MibTableColumn, Integer32, Gauge32, NotificationType, Bits, ObjectIdentity, ModuleIdentity, MibIdentifier, Unsigned32, TimeTicks, Counter64, IpAddress, iso, Counter32 = mibBuilder.importSymbols("SNMPv2-SMI", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Integer32", "Gauge32", "NotificationType", "Bits", "ObjectIdentity", "ModuleIdentity", "MibIdentifier", "Unsigned32", "TimeTicks", "Counter64", "IpAddress", "iso", "Counter32")
TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString")
ciscoBitsClockCapability = ModuleIdentity((1, 3, 6, 1, 4, 1, 9, 7, 433))
ciscoBitsClockCapability.setRevisions(('2005-03-08 00:00',))
if mibBuilder.loadTexts: ciscoBitsClockCapability.setLastUpdated('200503080000Z')
if mibBuilder.loadTexts: ciscoBitsClockCapability.setOrganization('Cisco Systems, Inc.')
ciscoBitsClockV12R025000SW1 = AgentCapabilities((1, 3, 6, 1, 4, 1, 9, 7, 433, 1))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ciscoBitsClockV12R025000SW1 = ciscoBitsClockV12R025000SW1.setProductRelease('Cisco IOS 12.2(25)SW1')
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ciscoBitsClockV12R025000SW1 = ciscoBitsClockV12R025000SW1.setStatus('current')
mibBuilder.exportSymbols("CISCO-BITS-CLOCK-CAPABILITY", ciscoBitsClockCapability=ciscoBitsClockCapability, ciscoBitsClockV12R025000SW1=ciscoBitsClockV12R025000SW1, PYSNMP_MODULE_ID=ciscoBitsClockCapability)
|
def allASDTIRpairs():
"""
Iterate through all possible ASD TIR pairs and find the ones with the highest average binding energies with host
TIRs
We wish to find the ASDs that do not bind well with the host translation initiation regions to assure orthogonality
of the ribosomes, so here we choose the ASDs that have the highest binding energies (i.e. don't bind well with host
TIRs)
:return: Prints the list of the top ten ASD candidates.
"""
currentlib = orthoribalgorithm()
TIRdict = getallTIRs()
dictofvals = {}
print("Number of TIRs: " + str(len(TIRdict)))
listofaverages = []
for i in range(0, round(len(currentlib) / 2)): # iterate through all ASDs
listofvals = []
ASDname = str('ASD' + str(i + 1))
for j in range(0, len(TIRdict)): # for each ASD, iterate through all TIRs in the genome
TIRname = str('TIR' + str(j + 1))
val = float(ASDTIRbinding(currentlib[ASDname], TIRdict[TIRname]))
listofvals.append(val)
average = sum(listofvals) / len(listofvals)
dictofvals[average] = ASDname # calculate the average binding energy between the ASD
# and all TIRs; here we store the key as the average so that the we can call the names of the highest ASDs after
# the list is sorted
listofaverages.append(average)
listofaverages.sort(reverse=True)
print('Here are the 10 top candidates with highest ASD-host binding values:')
for i in range(0, 10):
print(dictofvals[listofaverages[i]])
|
# https://www.acmicpc.net/problem/16167
class Node:
def __init__(self, node, cost):
self.node = node
self.cost = cost
def __lt__(self, other):
return self.cost < other.cost
def bfs():
queue = __import__('collections').deque()
queue.append(1)
cnt = 1
while queue:
size = len(queue)
cnt += 1
for _ in range(size):
cur = queue.popleft()
for nxt in graph[cur]:
if res[nxt.node] == res[cur] + nxt.cost:
queue.append(nxt.node)
if nxt.node == N:
return cnt
def dijkstra():
pq = __import__('queue').PriorityQueue()
pq.put(Node(1, 0))
res = [inf for _ in range(N + 1)]
res[1] = 0
while not pq.empty():
cur = pq.get()
for nxt in graph[cur.nxt]:
if res[nxt.node] > res[cur.nxt] + nxt.cost:
res[nxt.node] = res[cur.nxt] + nxt.cost
pq.put(Node(nxt.node, res[nxt.node]))
return res
if __name__ == '__main__':
input = __import__('sys').stdin.readline
N, R = map(int,input().split())
graph = [[] for _ in range(N + 1)]
inf = float('inf')
for _ in range(R):
a, b, c, d, e = map(int,input().split())
if e > 10:
graph[a].append(Node(b, c + (e - 10) * d))
else:
graph[a].append(Node(b, c))
res = dijkstra()
if res[N] == inf:
print("It is not a great way.")
else:
print(res[N], bfs())
|
LEVEL_MAP = [
' ',
' ',
' XX ',
' XX XXX XX XX ',
' XX P XX ',
' XXXX XX XX ',
' XXXX XX ',
' XX X XXXX XX XX XX ',
' X XXXX XX XXX XXX ',
' XXXX XXXXXX XX XXXX XXXX XXXXX',
'XXXXXXXXX XXXXXX XX XXXX XXX XXXXX']
LEVEL_MAP2 = [
' ',
' ',
' ',
' XXXXX ',
' X XXXXXXXXX ',
' X ',
' XXXXXXXX ',
' XXXXXX ',
' XXXX ',
' XXXXXX ',
' XXX ',
' XXX XXXXXXX ']
# Game initialization settings
TITLE = "Pygame Platformer"
TILE_SIZE = 64 # Pixel width and height of each tile
SCREEN_WIDTH = 1280 # Pixel width of the game window
SCREEN_HEIGHT = 720 # Pixel height of the game window
FPS = 60 # Frames per second
EST_DELTA_TIME = 1 / FPS # Estimated delta time
# Player settings
MAX_PLAYER_SPEED = 8 # Maximum speed of the player in pixels per frame
SMOOTH_TIME = 0.1 # Time in seconds to smooth player movement
COLLISION_TOLERANCE = TILE_SIZE / 4 # Tolerance for collisions in pixels
# Jumping
COYOTE_TIME = 5 * (1 / FPS) # Frames of coyote time * time duration of 1 frame
JUMP_BUFFER_TIME = 5 * (1 / FPS) # Frames of jump input buffer * time duration of 1 frame
MAX_JUMPS = 2 # Number of jumps the player has until grounded
MAX_JUMP_HEIGHT = 2 * TILE_SIZE # Pixel height of the player's jump
TIME_TO_JUMP_APEX = 0.35 * FPS # Number of frames it takes to reach the apex of the jump
FALL_GRAVITY_MULTIPLIER = 1.8 # Multiplier for gravity when falling
# Colors
BG_COLOR = '#1e1e1e' # Background color
PLAYER_COLOR = '#007acc' # Player color
TILE_COLOR = '#858585' # Tile color
# Camera
CAMERA_BORDERS = {
'left': SCREEN_WIDTH / 3, # Pixel width of the left border
'right': SCREEN_WIDTH / 3, # Pixel width of the right border
'top': 100, # Pixel height of the top border
'bottom': 150, # Pixel height of the bottom border
}
|
{
'targets': [
{
'target_name': 'example1',
'sources': ['manifest.c'],
'libraries': [
'../../target/release/libnapi_example1.a',
],
'include_dirs': [
'../napi/include'
]
}
]
}
|
# Crie um programa que receba do usuário 5 números inteiros e os exiba na tela na ordem contrária a que foi inserido. A leitura dos números deve ser feita em uma função e a exibição dos valores em ordem contrária deve ocorrer em outra função.
def inteiro(n):
l = []
for i in n:
l.append(int(i))
print(l)
def inteiro_inverso(n):
l = []
for i in n:
l.append(int(i))
print(l[::-1])
num = input('Insira 5 números inteiros, separados por vírgula: ').split(',')
inteiros = []
inteiro(num)
inteiro_inverso(num)
|
#!/usr/bin/python3
Rectangle = __import__('1-rectangle').Rectangle
my_rectangle = Rectangle(4)
print("{} - {}".format(my_rectangle.width, my_rectangle.height))
|
# Problem 1 - Paying Debt off in a Year
def calculateBalance(balance, annualInterestRate, monthlyPaymentRate):
'''
Input:
balance: integer or float - the outstanding balance on the credit card
annualInterestRate: float - annual interest rate as a decimal
monthlyPaymentRate: float - minimum monthly payment rate as a decimal
returns: calculate the credit card balance after one year if a person only pays the minimum monthly payment required by the credit card company each month.
'''
i = 0
totalMonths = 12
monthlyInterestRate = annualInterestRate / totalMonths
while i < totalMonths:
i += 1
minMonthlyPayment = monthlyPaymentRate * balance
balance = (balance - minMonthlyPayment) * (1 + monthlyInterestRate)
print('Month ' + str(i) + ' Remaining balance: ' + str(round(balance, 2)))
print('Remaining balance: ' + str(round(balance, 2)))
# calculateBalance(42, 0.2, 0.04)
# Problem 2 - Paying Debt Off in a Year
balance = 3926
annualInterestRate = 0.2
totalMonths = 12
initialBalance = balance
monthlyPaymentRate = 0
monthlyInterestRate = annualInterestRate / totalMonths
while balance > 0:
for i in range(totalMonths):
balance = balance - monthlyPaymentRate + ((balance - monthlyPaymentRate) * monthlyInterestRate)
if balance > 0:
monthlyPaymentRate += 10
balance = initialBalance
elif balance <= 0:
break
# print('Lowest Payment: ', str(monthlyPaymentRate))
# Problem 3 - Using Bisection Search to Make the Program Faster
def calcfixedamort(balance, annualinterestrate):
'''
balance: integer or float that represents the outstanding balance on the credit card
annualinterestrate: float number that represents the annual interest rate as a decimal
returns: float - find the smallest fixed monthly payment
'''
totalmonths = 12
initialbalance = balance
monthlypayment = 0
monthlyinterestrate = annualinterestrate / totalmonths
epsilon = 0.01
lowerbound = initialbalance / totalmonths
upperbound = (initialbalance * (1 + monthlyinterestrate) ** totalmonths) / totalmonths
while abs(balance) >= epsilon:
balance = initialbalance
monthlypayment = (upperbound + lowerbound) / 2
for i in range(totalmonths):
balance = balance - monthlypayment + ((balance - monthlypayment) * monthlyinterestrate)
if balance < epsilon:
upperbound = monthlypayment
elif balance > epsilon:
lowerbound = monthlypayment
else:
break
print('lowest payment: ' + str(round(monthlypayment, 2)))
def recursiveCalcfixedamort(balance, annualinterestrate):
'''
balance: integer or float that represents the outstanding balance on the credit card
annualinterestrate: float number that represents the annual interest rate as a decimal
returns: float - find the smallest fixed monthly payment
'''
totalmonths = 12
initialbalance = balance
monthlypayment = 0
monthlyinterestrate = annualinterestrate / totalmonths
epsilon = 0.01
lowerbound = initialbalance / totalmonths
upperbound = (initialbalance * (1 + monthlyinterestrate) ** totalmonths) / totalmonths
# Base case
if abs(balance) >= epsilon:
return monthlypayment
else:
balance = initialbalance
monthlypayment = (upperbound + lowerbound) / 2
for i in range(totalmonths):
balance = balance - monthlypayment + ((balance - monthlypayment) * monthlyinterestrate)
if balance < epsilon:
upperbound = monthlypayment
elif balance > epsilon:
lowerbound = monthlypayment
while abs(balance) >= epsilon:
if balance < epsilon:
upperbound = monthlypayment
elif balance > epsilon:
lowerbound = monthlypayment
else:
break
print('lowest payment: ' + str(round(monthlypayment, 2)))
calcFixedAmort(320000, 0.2)
calcFixedAmort(999999, 0.18)
|
# ControlRequest
RESPONSE_sendControlRequestTrue = (
'CMD M601 Received.\r\nControl Success V2.1.\r\nok\r\n'
)
RESPONSE_sendControlRequestFalse = (
'CMD M601 Received.\r\nControl failed.\r\nok\r\n'
)
# ControlRelease
RESPONSE_sendControlRelease = (
'CMD 602 Received.\r\nok\r\n'
)
# InfoRequest
RESPONSE_sendInfoRequest = (
'CMD M115 Received.\r\n'
'Machine Type: Flashforge Adventurer 4\r\n'
'Machine Name: Adventurer4\r\n'
'Firmware: v2.0.9\r\n'
'SN: SNADVA9501174\r\n'
'X: 220 Y: 200 Z: 250\r\n'
'Tool Count: 1\r\n'
'Mac Address:88:A9:A7:93:86:F8\n \r\n'
'ok\r\n'
)
# ProgressRequest
RESPONSE_sendProgressRequest = (
'CMD M27 Received.\r\nSD printing byte 0/100\r\nok\r\n'
)
RESPONSE_sendProgressRequest2 = (
'CMD M27 Received.\r\nSD printing byte 11/100\r\nLayer: 44/419\r\nok\r\n'
)
# TempRequest
RESPONSE_sendTempRequest = (
'CMD M105 Received.\r\nT0:22/0 B:14/0\r\nok\r\n'
)
# PositionRequest
RESPONSE_sendPositionRequest = (
'CMD M114 Received.\r\n'
'X:19.3861 Y:54.3 Z:194.44 A:0 B:0\r\n'
'ok\r\n'
)
# StatusRequest
RESPONSE_sendStatusRequest = (
'CMD M119 Received.\r\n'
'Endstop: X-max:0 Y-max:0 Z-max:0\r\n'
'MachineStatus: READY\r\n'
'MoveMode: READY\r\n'
'Status: S:1 L:0 J:0 F:0\r\n'
'LED: 0\r\n'
'CurrentFile: \r\n'
'ok\r\n'
)
RESPONSE_sendStatusRequest2 = (
'CMD M119 Received.\r\n'
'Endstop: X-max:0 Y-max:0 Z-max:0\r\n'
'MachineStatus: BUILDING_FROM_SD\r\n'
'MoveMode: MOVING\r\n'
'Status: S:1 L:0 J:0 F:0\r\n'
'LED: 1\r\n'
'CurrentFile: RussianDollMazeModels.gx\r\n'
'ok\r\n'
)
# SetTemperature
RESPONSE_sendSetTemperature = (
'CMD 104 Received.\r\nok\r\n'
)
# SetLedState
RESPONSE_sendsetLedState = (
'CMD 146 Received.\r\nok\r\n'
)
# GetFileNamesRequest
RESPONSE_sendGetFileNames = (
'CMD 661 Received.\r\nok\r\n'
)
# SendPauseRequest
RESPONSE_sendPauseRequest = (
'CMD M25 Received.\r\nok\r\n'
)
# SendContinueRequest
RESPONSE_sendContinueRequest = (
'CMD M24 Received.\r\nok\r\n'
)
# SendContinueRequest
RESPONSE_sendPrintRequest = (
'CMD M23 Received.\r\n'
'File opened: My Box.gx Size: 1613086\r\n'
'File selected\r\nok\r\n'
)
# SendContinueRequest
RESPONSE_sendAbortRequest = (
'CMD M26 Received.\r\n'
)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.