content stringlengths 7 1.05M | fixed_cases stringlengths 1 1.28M |
|---|---|
def game_to_genre(game_name):
genres_dict = {}
with open('genres_dict.txt', 'r') as file:
file.seek(0)
for line in file:
stripped_line = line.strip()
key, *value = stripped_line.split(', ')
genres_dict[key] = value
game_genre = None
lowered_game_name = game_name.strip().lower()
for key, value in genres_dict.items():
if lowered_game_name in value:
game_genre = key
return game_genre
if game_genre is None:
print('\nThe game is not found. Where would you like to add it?\n'
'- MOBA\n'
'- FPS\n'
'- MMORPG\n'
'- STRATEGY\n')
new_game_input = input().upper()
genres_dict[new_game_input].append(lowered_game_name)
with open('genres_dict.txt', 'w') as file:
file.seek(0)
for key, value in genres_dict.items():
file.write('{}'.format(key))
for i in value:
file.write(', {}'.format(i))
file.write('\n')
return 'Completed!'
name = input()
print(game_to_genre(name))
| def game_to_genre(game_name):
genres_dict = {}
with open('genres_dict.txt', 'r') as file:
file.seek(0)
for line in file:
stripped_line = line.strip()
(key, *value) = stripped_line.split(', ')
genres_dict[key] = value
game_genre = None
lowered_game_name = game_name.strip().lower()
for (key, value) in genres_dict.items():
if lowered_game_name in value:
game_genre = key
return game_genre
if game_genre is None:
print('\nThe game is not found. Where would you like to add it?\n- MOBA\n- FPS\n- MMORPG\n- STRATEGY\n')
new_game_input = input().upper()
genres_dict[new_game_input].append(lowered_game_name)
with open('genres_dict.txt', 'w') as file:
file.seek(0)
for (key, value) in genres_dict.items():
file.write('{}'.format(key))
for i in value:
file.write(', {}'.format(i))
file.write('\n')
return 'Completed!'
name = input()
print(game_to_genre(name)) |
"""
Given head, the head of a linked list, determine if the linked list has a cycle in it.
There is a cycle in a linked list if there is some node in the list that can be reached again by continuously following the next pointer.
Internally, pos is used to denote the index of the node that tail's next pointer is connected to. Note that pos is not passed as a parameter.
Return true if there is a cycle in the linked list. Otherwise, return false.
Input: head = [3,2,0,-4], pos = 1
Output: true
Explanation: There is a cycle in the linked list, where the tail connects to the 1st node (0-indexed).
Input: head = [1], pos = -1
Output: false
Explanation: There is no cycle in the linked list.
ref: https://leetcode.com/problems/linked-list-cycle/
"""
class ListNode:
def __init__(self, x):
self.val = x
self.next = None
class Solution:
def hasCycle(self, head: ListNode) -> bool:
turtle= head
hare= head
while(turtle and hare and hare.next):
turtle= turtle.next
hare= hare.next.next
if (turtle==hare):
return True
return False
ll_1= ListNode(3)
ll_2= ListNode(2)
ll_3= ListNode(0)
ll_4= ListNode(-4)
ll_1.next= ll_2
ll_2.next= ll_3
ll_3.next= ll_4
ll_4.next= ll_1
sol= Solution()
print(sol.hasCycle(ll_1)) | """
Given head, the head of a linked list, determine if the linked list has a cycle in it.
There is a cycle in a linked list if there is some node in the list that can be reached again by continuously following the next pointer.
Internally, pos is used to denote the index of the node that tail's next pointer is connected to. Note that pos is not passed as a parameter.
Return true if there is a cycle in the linked list. Otherwise, return false.
Input: head = [3,2,0,-4], pos = 1
Output: true
Explanation: There is a cycle in the linked list, where the tail connects to the 1st node (0-indexed).
Input: head = [1], pos = -1
Output: false
Explanation: There is no cycle in the linked list.
ref: https://leetcode.com/problems/linked-list-cycle/
"""
class Listnode:
def __init__(self, x):
self.val = x
self.next = None
class Solution:
def has_cycle(self, head: ListNode) -> bool:
turtle = head
hare = head
while turtle and hare and hare.next:
turtle = turtle.next
hare = hare.next.next
if turtle == hare:
return True
return False
ll_1 = list_node(3)
ll_2 = list_node(2)
ll_3 = list_node(0)
ll_4 = list_node(-4)
ll_1.next = ll_2
ll_2.next = ll_3
ll_3.next = ll_4
ll_4.next = ll_1
sol = solution()
print(sol.hasCycle(ll_1)) |
# -*-coding:utf-8 -*-
"""
Created on 2013-4-25
@author: Danny<manyunkai@hotmail.com>
DannyWork Project
"""
def required(wrapping_functions,patterns_rslt):
"""
Used to require 1..n decorators in any view returned by a url tree
Usage:
urlpatterns = required(func,patterns(...))
urlpatterns = required((func,func,func),patterns(...))
Note:
Use functools.partial to pass keyword params to the required
decorators. If you need to pass args you will have to write a
wrapper function.
Example:
from functools import partial
urlpatterns = required(
partial(login_required,login_url='/accounts/login/'),
patterns(...)
)
"""
if not hasattr(wrapping_functions,'__iter__'):
wrapping_functions = (wrapping_functions,)
return [
_wrap_instance__resolve(wrapping_functions,instance)
for instance in patterns_rslt
]
def _wrap_instance__resolve(wrapping_functions,instance):
if not hasattr(instance,'resolve'): return instance
resolve = getattr(instance,'resolve')
def _wrap_func_in_returned_resolver_match(*args,**kwargs):
rslt = resolve(*args,**kwargs)
if not hasattr(rslt,'func'):return rslt
f = getattr(rslt,'func')
for _f in reversed(wrapping_functions):
# @decorate the function from inner to outter
f = _f(f)
setattr(rslt, 'func', f)
return rslt
setattr(instance, 'resolve', _wrap_func_in_returned_resolver_match)
return instance
| """
Created on 2013-4-25
@author: Danny<manyunkai@hotmail.com>
DannyWork Project
"""
def required(wrapping_functions, patterns_rslt):
"""
Used to require 1..n decorators in any view returned by a url tree
Usage:
urlpatterns = required(func,patterns(...))
urlpatterns = required((func,func,func),patterns(...))
Note:
Use functools.partial to pass keyword params to the required
decorators. If you need to pass args you will have to write a
wrapper function.
Example:
from functools import partial
urlpatterns = required(
partial(login_required,login_url='/accounts/login/'),
patterns(...)
)
"""
if not hasattr(wrapping_functions, '__iter__'):
wrapping_functions = (wrapping_functions,)
return [_wrap_instance__resolve(wrapping_functions, instance) for instance in patterns_rslt]
def _wrap_instance__resolve(wrapping_functions, instance):
if not hasattr(instance, 'resolve'):
return instance
resolve = getattr(instance, 'resolve')
def _wrap_func_in_returned_resolver_match(*args, **kwargs):
rslt = resolve(*args, **kwargs)
if not hasattr(rslt, 'func'):
return rslt
f = getattr(rslt, 'func')
for _f in reversed(wrapping_functions):
f = _f(f)
setattr(rslt, 'func', f)
return rslt
setattr(instance, 'resolve', _wrap_func_in_returned_resolver_match)
return instance |
"""
List of Fanfou method names that require the use of POST.
"""
POST_ACTIONS = [
# Status Methods
'update',
# Direct-messages Methods
'new',
# Account Methods
'update_notify_num', 'update_profile', 'update_profile_image',
# Blocks Methods, Friendships Methods, Favorites Methods,
# Saved-searches Methods
'create',
# Statuses Methods, Blocks Methods, Direct-messages Methods,
# Friendships Methods, Favorites Methods, Saved-searches Methods
'destroy',
# Friendships Methods
'accept', 'deny',
# Users Methods
'cancel_recommendation',
# Photo Methods
'upload',
# OAuth Methods
'token', 'access_token',
'request_token', 'invalidate_token',
]
| """
List of Fanfou method names that require the use of POST.
"""
post_actions = ['update', 'new', 'update_notify_num', 'update_profile', 'update_profile_image', 'create', 'destroy', 'accept', 'deny', 'cancel_recommendation', 'upload', 'token', 'access_token', 'request_token', 'invalidate_token'] |
# Copyright (C) 2021 Clinton Garwood
# MIT Open Source Initiative Approved License
# hw_assignment_4_clinton.py
# CIS-135 Python
# Homework Assignment #4 - A Phone Sales Application
# Code Summary:
# A program that computes total charges for phones sold
# and displays the initial charge, the tax and the total
# charge for that phone. The program allows a user to
# enter multiple phone sales and at the end displays a
# total value of the phones, total sales tax collected,
# and total sales for that session.
# Resources of Students
# Syntax Help - Resources:
# https://www.w3schools.com/python/python_functions.asp
# https://www.w3schools.com/python/python_ref_functions.asp
# https://www.w3schools.com/python/ref_func_format.asp
# Python Reference - The Docs
# https://docs.python.org/3/library/functions.html
# https://docs.python.org/3/library/index.html
# https://docs.python.org/3/reference/index.html#reference-index
# https://docs.python.org/3/reference/compound_stmts.html#function-definitions
def sales_data_report(total_phones_price, total_sales_tax_collected, total_sales):
# Variable Declaration Area
price_of_phone = 0.00 # (float)
sales_tax = 0.00 # (float)
tax_rate = 0.07 # (float)
this_sale = 0.00 # (float)
# Prompt the user for the price of a phone
price_of_phone = float(input("\n\tPlease enter in the price of the phone: "))
# Compute sale tax: price_of_phone x tax_rate (.07)
sales_tax = price_of_phone * tax_rate
# Compute Total Sale price_of_phone + sales_tax
this_sale = price_of_phone + sales_tax
# Individual Phone Data Display: Use the format() string function
# For currency data, display a $ and two numbers following the decimal place
print("\n\tPhone Sale Summary")
print("\t\tPhone List Price: ${:>10,.2f}".format(price_of_phone))
print("\t\tSales Tax Collected: ${:>10,.2f}".format(sales_tax))
print("\t\tTotal Sale Price: ${:>10,.2f}\n".format(this_sale))
# Update and return grand_total variables
total_phones_price += price_of_phone
total_sales_tax_collected += sales_tax
total_sales += this_sale
return total_phones_price, total_sales_tax_collected, total_sales
def main():
# Welcome the user
print("\nWelcome to the Phone Sales Application")
print("\n\tThis applicaton takes in individual phone sales data")
print("\tand prints out the grand totals for the day's sales.")
# Variable Declaration Area
total_phones_sold = 0 # (integer)
total_phones_price = 0.00 # (float)
total_sales_tax_collected = 0.00 # (float)
total_sales = 0.00 # (float)
get_phones = 1
# Loop until there is no data
print("\n\tData Collection Module:")
while(get_phones == 1):
# Ask user if there is phone data to enter
get_phones = int(input("\tTo add a phone enter 1; or enter 2 to exit: "))
if (get_phones == 1):
# Call sales_loop function and catch total data on function return
total_phones_price, total_sales_tax_collected, total_sales = sales_data_report(total_phones_price,total_sales_tax_collected,total_sales)
# update total phones sold
total_phones_sold += 1
else:
print("\tEnd of Data Collection")
# Final Display: Use the format() string function
# For currency data, display a $ and two numbers following the decimal place
print("\n\tGrand Total Sales Summary:")
print("\t\tTotal Phones Sold: {:>10}".format(total_phones_sold))
print("\t\tTotal Phone Prices: ${:>10,.2f}".format(total_phones_price))
print("\t\tTotal Sales Tax: ${:>10,.2f}".format(total_sales_tax_collected))
print("\t\tSales Grand Total: ${:>10,.2f}".format(total_sales))
# Thank the user
print("\nThank you for using the Phone Sales Data App")
return
main()
| def sales_data_report(total_phones_price, total_sales_tax_collected, total_sales):
price_of_phone = 0.0
sales_tax = 0.0
tax_rate = 0.07
this_sale = 0.0
price_of_phone = float(input('\n\tPlease enter in the price of the phone: '))
sales_tax = price_of_phone * tax_rate
this_sale = price_of_phone + sales_tax
print('\n\tPhone Sale Summary')
print('\t\tPhone List Price: ${:>10,.2f}'.format(price_of_phone))
print('\t\tSales Tax Collected: ${:>10,.2f}'.format(sales_tax))
print('\t\tTotal Sale Price: ${:>10,.2f}\n'.format(this_sale))
total_phones_price += price_of_phone
total_sales_tax_collected += sales_tax
total_sales += this_sale
return (total_phones_price, total_sales_tax_collected, total_sales)
def main():
print('\nWelcome to the Phone Sales Application')
print('\n\tThis applicaton takes in individual phone sales data')
print("\tand prints out the grand totals for the day's sales.")
total_phones_sold = 0
total_phones_price = 0.0
total_sales_tax_collected = 0.0
total_sales = 0.0
get_phones = 1
print('\n\tData Collection Module:')
while get_phones == 1:
get_phones = int(input('\tTo add a phone enter 1; or enter 2 to exit: '))
if get_phones == 1:
(total_phones_price, total_sales_tax_collected, total_sales) = sales_data_report(total_phones_price, total_sales_tax_collected, total_sales)
total_phones_sold += 1
else:
print('\tEnd of Data Collection')
print('\n\tGrand Total Sales Summary:')
print('\t\tTotal Phones Sold: {:>10}'.format(total_phones_sold))
print('\t\tTotal Phone Prices: ${:>10,.2f}'.format(total_phones_price))
print('\t\tTotal Sales Tax: ${:>10,.2f}'.format(total_sales_tax_collected))
print('\t\tSales Grand Total: ${:>10,.2f}'.format(total_sales))
print('\nThank you for using the Phone Sales Data App')
return
main() |
'''
Positioning and styling legends
Properties of the legend can be changed by using the legend member attribute of a Bokeh figure after the glyphs have been plotted.
In this exercise, you'll adjust the background color and legend location of the female literacy vs fertility plot from the previous exercise.
The figure object p has been created for you along with the circle glyphs.
INSTRUCTIONS
100XP
Use p.legend.location to adjust the legend location to be on the 'bottom_left'.
Use p.legend.background_fill_color to set the background color of the legend to 'lightgray'.
'''
# Assign the legend to the bottom left: p.legend.location
p.legend.location='bottom_left'
# Fill the legend background with the color 'lightgray': p.legend.background_fill_color
p.legend.background_fill_color='lightgray'
# Specify the name of the output_file and show the result
output_file('fert_lit_groups.html')
show(p)
| """
Positioning and styling legends
Properties of the legend can be changed by using the legend member attribute of a Bokeh figure after the glyphs have been plotted.
In this exercise, you'll adjust the background color and legend location of the female literacy vs fertility plot from the previous exercise.
The figure object p has been created for you along with the circle glyphs.
INSTRUCTIONS
100XP
Use p.legend.location to adjust the legend location to be on the 'bottom_left'.
Use p.legend.background_fill_color to set the background color of the legend to 'lightgray'.
"""
p.legend.location = 'bottom_left'
p.legend.background_fill_color = 'lightgray'
output_file('fert_lit_groups.html')
show(p) |
class AssignWorkers:
def __init__(self, testcase, num_workers):
"""AssignWorkers helps to split the dataframe to a designated number of wokers"""
self.testcase = testcase
self.num_workers = self._validate_workers(num_workers)
def _validate_workers(self, num_workers):
"""return the appropriate amount of workers"""
assert type(num_workers) is int, f"num_workers: {num_workers} is not an integer"
assert num_workers > 0, f"num_workers: {num_workers} cannot be empty or 0"
m = len(self.testcase)
return num_workers if num_workers < m else m
def assign_workers(self):
"""
Assign workers to the tasks
return:
-----
An assigned workers dictionary: {worker_i: task list}
"""
workers = {}
### create worker's task ###
# calculate number of task per worker
num_task = round(len(self.testcase) / self.num_workers)
cur = 0
for i in range(1, self.num_workers + 1):
if i == self.num_workers:
workers['worker_' + str(i)] = self.testcase[cur::]
else:
workers['worker_' + str(i)] = self.testcase[cur : cur + num_task]
cur += num_task
print(f">> worker_{i} gets a job...")
return workers
| class Assignworkers:
def __init__(self, testcase, num_workers):
"""AssignWorkers helps to split the dataframe to a designated number of wokers"""
self.testcase = testcase
self.num_workers = self._validate_workers(num_workers)
def _validate_workers(self, num_workers):
"""return the appropriate amount of workers"""
assert type(num_workers) is int, f'num_workers: {num_workers} is not an integer'
assert num_workers > 0, f'num_workers: {num_workers} cannot be empty or 0'
m = len(self.testcase)
return num_workers if num_workers < m else m
def assign_workers(self):
"""
Assign workers to the tasks
return:
-----
An assigned workers dictionary: {worker_i: task list}
"""
workers = {}
num_task = round(len(self.testcase) / self.num_workers)
cur = 0
for i in range(1, self.num_workers + 1):
if i == self.num_workers:
workers['worker_' + str(i)] = self.testcase[cur:]
else:
workers['worker_' + str(i)] = self.testcase[cur:cur + num_task]
cur += num_task
print(f'>> worker_{i} gets a job...')
return workers |
alphabet = "".join([chr(65 + r) for r in range(26)] * 2)
stringToEncrypt = input("please enter a message to encrypt")
stringToEncrypt = stringToEncrypt.upper()
shiftAmount = int(input("please enter a whole number from -25-25 to be your key"))
encryptedString = ""
for currentCharacter in stringToEncrypt:
position = alphabet.find(currentCharacter)
newPosition = position + shiftAmount
if currentCharacter in alphabet:
encryptedString = encryptedString + alphabet[newPosition]
else:
encryptedString = encryptedString + currentCharacter
print("your encrypted message is", encryptedString) | alphabet = ''.join([chr(65 + r) for r in range(26)] * 2)
string_to_encrypt = input('please enter a message to encrypt')
string_to_encrypt = stringToEncrypt.upper()
shift_amount = int(input('please enter a whole number from -25-25 to be your key'))
encrypted_string = ''
for current_character in stringToEncrypt:
position = alphabet.find(currentCharacter)
new_position = position + shiftAmount
if currentCharacter in alphabet:
encrypted_string = encryptedString + alphabet[newPosition]
else:
encrypted_string = encryptedString + currentCharacter
print('your encrypted message is', encryptedString) |
fruit = input()
size_set = input()
ordered_sets = int(input())
price = 0.0
if size_set == "small":
price = 2.0
if fruit == "Watermelon":
price *= 56
elif fruit == "Mango":
price *= 36.66
elif fruit == "Pineapple":
price *= 42.10
elif fruit == "Raspberry":
price *= 20
if size_set == "big":
price = 5.0
if fruit == "Watermelon":
price *= 28.70
elif fruit == "Mango":
price *= 19.60
elif fruit == "Pineapple":
price *= 24.80
elif fruit == "Raspberry":
price *= 15.20
price *= ordered_sets
if 400 <= price <= 1000:
price *= 0.85
print(f"{price:.2f} lv.")
elif price > 1000:
price *= 0.5
print(f"{price:.2f} lv.")
else:
print(f"{price:.2f} lv.")
| fruit = input()
size_set = input()
ordered_sets = int(input())
price = 0.0
if size_set == 'small':
price = 2.0
if fruit == 'Watermelon':
price *= 56
elif fruit == 'Mango':
price *= 36.66
elif fruit == 'Pineapple':
price *= 42.1
elif fruit == 'Raspberry':
price *= 20
if size_set == 'big':
price = 5.0
if fruit == 'Watermelon':
price *= 28.7
elif fruit == 'Mango':
price *= 19.6
elif fruit == 'Pineapple':
price *= 24.8
elif fruit == 'Raspberry':
price *= 15.2
price *= ordered_sets
if 400 <= price <= 1000:
price *= 0.85
print(f'{price:.2f} lv.')
elif price > 1000:
price *= 0.5
print(f'{price:.2f} lv.')
else:
print(f'{price:.2f} lv.') |
class Solution:
def largeGroupPositions(self, s: str) -> List[List[int]]:
indexes = []; start, end, n = 0, 0, len(s)
while start < n:
while end < n and s[start] == s[end]:
end += 1
if end-start > 2: indexes.append([start,end-1])
start = end
return indexes | class Solution:
def large_group_positions(self, s: str) -> List[List[int]]:
indexes = []
(start, end, n) = (0, 0, len(s))
while start < n:
while end < n and s[start] == s[end]:
end += 1
if end - start > 2:
indexes.append([start, end - 1])
start = end
return indexes |
class Class(object):
def __enter__(self):
print('__enter__')
return self
def __exit__(self, exc_type, exc_val, exc_tb):
print('__exit__')
with Class() as c:
print(c)
#raise Exception
| class Class(object):
def __enter__(self):
print('__enter__')
return self
def __exit__(self, exc_type, exc_val, exc_tb):
print('__exit__')
with class() as c:
print(c) |
# coding=utf-8
"""Sudoku Backtracking Algorithm solution Python implementation."""
N = 9 # Sudoku size
def used_in_row(grid, row, num):
return num in grid[row]
def used_in_col(grid, col, num):
for r in range(N):
if grid[r][col] == num:
return True
return False
def used_in_box(grid, bsr, bsc, num):
for r in range(3):
for c in range(3):
if grid[r + bsr][c + bsc] == num:
return True
return False
def is_safe(grid, row, col, num):
return (not used_in_row(grid, row, num)) and (not used_in_col(grid, col, num)) and\
(not used_in_box(grid, row - row % 3, col - col % 3, num)) and (not grid[row][col])
def find_unassigned_location(grid):
for i in range(N):
for j in range(N):
if not grid[i][j]:
return i, j
return False
def solve_sudoku(grid):
r_c = find_unassigned_location(grid)
if not r_c:
return True
else:
row, col = r_c[0], r_c[1]
for num in range(1, 10):
if is_safe(grid, row, col, num):
grid[row][col] = num
if solve_sudoku(grid):
return True
else:
grid[row][col] = False
return False
if __name__ == "__main__":
grid = [[3, 0, 6, 5, 0, 8, 4, 0, 0],
[5, 2, 0, 0, 0, 0, 0, 0, 0],
[0, 8, 7, 0, 0, 0, 0, 3, 1],
[0, 0, 3, 0, 1, 0, 0, 8, 0],
[9, 0, 0, 8, 6, 3, 0, 0, 5],
[0, 5, 0, 0, 9, 0, 6, 0, 0],
[1, 3, 0, 0, 0, 0, 2, 5, 0],
[0, 0, 0, 0, 0, 0, 0, 7, 4],
[0, 0, 5, 2, 0, 6, 3, 0, 0]]
if solve_sudoku(grid):
for r in grid:
print(r)
else:
print("No solution exists.")
| """Sudoku Backtracking Algorithm solution Python implementation."""
n = 9
def used_in_row(grid, row, num):
return num in grid[row]
def used_in_col(grid, col, num):
for r in range(N):
if grid[r][col] == num:
return True
return False
def used_in_box(grid, bsr, bsc, num):
for r in range(3):
for c in range(3):
if grid[r + bsr][c + bsc] == num:
return True
return False
def is_safe(grid, row, col, num):
return not used_in_row(grid, row, num) and (not used_in_col(grid, col, num)) and (not used_in_box(grid, row - row % 3, col - col % 3, num)) and (not grid[row][col])
def find_unassigned_location(grid):
for i in range(N):
for j in range(N):
if not grid[i][j]:
return (i, j)
return False
def solve_sudoku(grid):
r_c = find_unassigned_location(grid)
if not r_c:
return True
else:
(row, col) = (r_c[0], r_c[1])
for num in range(1, 10):
if is_safe(grid, row, col, num):
grid[row][col] = num
if solve_sudoku(grid):
return True
else:
grid[row][col] = False
return False
if __name__ == '__main__':
grid = [[3, 0, 6, 5, 0, 8, 4, 0, 0], [5, 2, 0, 0, 0, 0, 0, 0, 0], [0, 8, 7, 0, 0, 0, 0, 3, 1], [0, 0, 3, 0, 1, 0, 0, 8, 0], [9, 0, 0, 8, 6, 3, 0, 0, 5], [0, 5, 0, 0, 9, 0, 6, 0, 0], [1, 3, 0, 0, 0, 0, 2, 5, 0], [0, 0, 0, 0, 0, 0, 0, 7, 4], [0, 0, 5, 2, 0, 6, 3, 0, 0]]
if solve_sudoku(grid):
for r in grid:
print(r)
else:
print('No solution exists.') |
new_pod_repository(
name = "FBSDKCoreKit",
url = "https://github.com/facebook/facebook-ios-sdk/archive/v7.1.1.zip",
podspec_url = "Vendor/Podspecs/FBSDKCoreKit.podspec.json",
generate_header_map = 1
)
new_pod_repository(
name = "FBSDKLoginKit",
url = "https://github.com/facebook/facebook-ios-sdk/archive/v7.1.1.zip",
podspec_url = "Vendor/Podspecs/FBSDKLoginKit.podspec.json",
generate_header_map = 1
)
new_pod_repository(
name = "FBSDKShareKit",
url = "https://github.com/facebook/facebook-ios-sdk/archive/v7.1.1.zip",
podspec_url = "Vendor/Podspecs/FBSDKShareKit.podspec.json",
generate_header_map = 1
)
| new_pod_repository(name='FBSDKCoreKit', url='https://github.com/facebook/facebook-ios-sdk/archive/v7.1.1.zip', podspec_url='Vendor/Podspecs/FBSDKCoreKit.podspec.json', generate_header_map=1)
new_pod_repository(name='FBSDKLoginKit', url='https://github.com/facebook/facebook-ios-sdk/archive/v7.1.1.zip', podspec_url='Vendor/Podspecs/FBSDKLoginKit.podspec.json', generate_header_map=1)
new_pod_repository(name='FBSDKShareKit', url='https://github.com/facebook/facebook-ios-sdk/archive/v7.1.1.zip', podspec_url='Vendor/Podspecs/FBSDKShareKit.podspec.json', generate_header_map=1) |
class InvalidProgramException(SystemException, ISerializable, _Exception):
"""
The exception that is thrown when a program contains invalid Microsoft intermediate language (MSIL) or metadata. Generally this indicates a bug in the compiler that generated the program.
InvalidProgramException()
InvalidProgramException(message: str)
InvalidProgramException(message: str,inner: Exception)
"""
def add_SerializeObjectState(self, *args):
""" add_SerializeObjectState(self: Exception,value: EventHandler[SafeSerializationEventArgs]) """
pass
def remove_SerializeObjectState(self, *args):
""" remove_SerializeObjectState(self: Exception,value: EventHandler[SafeSerializationEventArgs]) """
pass
def __init__(self, *args):
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod
def __new__(self, message=None, inner=None):
"""
__new__(cls: type)
__new__(cls: type,message: str)
__new__(cls: type,message: str,inner: Exception)
"""
pass
def __reduce_ex__(self, *args):
pass
def __str__(self, *args):
pass
| class Invalidprogramexception(SystemException, ISerializable, _Exception):
"""
The exception that is thrown when a program contains invalid Microsoft intermediate language (MSIL) or metadata. Generally this indicates a bug in the compiler that generated the program.
InvalidProgramException()
InvalidProgramException(message: str)
InvalidProgramException(message: str,inner: Exception)
"""
def add__serialize_object_state(self, *args):
""" add_SerializeObjectState(self: Exception,value: EventHandler[SafeSerializationEventArgs]) """
pass
def remove__serialize_object_state(self, *args):
""" remove_SerializeObjectState(self: Exception,value: EventHandler[SafeSerializationEventArgs]) """
pass
def __init__(self, *args):
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod
def __new__(self, message=None, inner=None):
"""
__new__(cls: type)
__new__(cls: type,message: str)
__new__(cls: type,message: str,inner: Exception)
"""
pass
def __reduce_ex__(self, *args):
pass
def __str__(self, *args):
pass |
"""
Gitter
- Schaffst du es mit einem zweiten Loop ein Gittermuster
herzustellen?
"""
newPage(300, 300)
for i in range(0, width(), 10):
stroke(0)
line((i,0),(i, width()))
for i in range(0, width(), 10):
stroke(0)
line((0,i),(width(),i))
| """
Gitter
- Schaffst du es mit einem zweiten Loop ein Gittermuster
herzustellen?
"""
new_page(300, 300)
for i in range(0, width(), 10):
stroke(0)
line((i, 0), (i, width()))
for i in range(0, width(), 10):
stroke(0)
line((0, i), (width(), i)) |
class Simplest():
pass
print(type(Simplest))
simp = Simplest()
print(type(simp))
print(type(simp) == Simplest)
| class Simplest:
pass
print(type(Simplest))
simp = simplest()
print(type(simp))
print(type(simp) == Simplest) |
print(''.join(['-' for x in range(70)]))
# Functions are objects
def my_func(x):
print("Functions are objects:", x, my_func.foo)
my_func.foo = 'foo'
print(dir(my_func))
print(''.join(['-' for x in range(70)]))
# Named and anonymous functions
my_lambda = lambda x: print("Lambda:", x, my_lambda.bar)
my_lambda.bar = 'bar'
my_lambda(42)
print(''.join(['-' for x in range(70)]))
# Functions inside functions
def f():
def g():
print("Hi, it's me 'g'")
print("Thanks for calling me")
print("This is the function 'f'")
print("I am calling 'g' now:")
g()
f()
print(''.join(['-' for x in range(70)]))
# Function as parameter
def g():
print("Hi, it's me 'g'")
print("Thanks for calling me")
def f(func):
print("Hi, it's me 'f'")
print("I will call 'func' now")
func()
f(g)
print(''.join(['-' for x in range(70)]))
# Returning a function
def f(x):
def g(y):
return y + x + 3
return g
nf1 = f(1)
print(nf1(1))
print(f(3)(1)) | print(''.join(['-' for x in range(70)]))
def my_func(x):
print('Functions are objects:', x, my_func.foo)
my_func.foo = 'foo'
print(dir(my_func))
print(''.join(['-' for x in range(70)]))
my_lambda = lambda x: print('Lambda:', x, my_lambda.bar)
my_lambda.bar = 'bar'
my_lambda(42)
print(''.join(['-' for x in range(70)]))
def f():
def g():
print("Hi, it's me 'g'")
print('Thanks for calling me')
print("This is the function 'f'")
print("I am calling 'g' now:")
g()
f()
print(''.join(['-' for x in range(70)]))
def g():
print("Hi, it's me 'g'")
print('Thanks for calling me')
def f(func):
print("Hi, it's me 'f'")
print("I will call 'func' now")
func()
f(g)
print(''.join(['-' for x in range(70)]))
def f(x):
def g(y):
return y + x + 3
return g
nf1 = f(1)
print(nf1(1))
print(f(3)(1)) |
END_MARKER = ("end", None)
NEWLINE_1 = ("newline", 1)
def number_of_lines(parsed_text):
lines = 1
for (token, value) in parsed_text:
if token == "newline":
lines += value
return lines
def normalize_tokens(tokens):
result = []
for token in tokens:
key, value = token
if key == "text" and not value:
continue # Remove empty texts
if key == "newline" and result and result[-1][0] == "newline":
result[-1] = ("newline", result[-1][1] + value)
continue
if key == "end" and result[-1][0] == "newline":
last = result[-1]
result[-1] = token
result.append(last)
continue
result.append(token)
if result and result[-1][0] == "newline":
result.pop()
return result
def add_line_numbers(tokens):
lines_len = len(str(number_of_lines(tokens)))
begin = ("begin", "code_lineno")
result = [begin, ("text", "1".zfill(lines_len) + " "), END_MARKER]
line = 1
for token in tokens:
if token[0] != "newline":
result.append(token)
continue
for i in range(token[1]):
line += 1
result.append(NEWLINE_1)
result.append(begin)
result.append(("text", str(line).zfill(lines_len) + " "))
result.append(END_MARKER)
return result
def parse_text(text, escape_char="~", begin_char="{", end_char="}"):
result = []
start = 0
i = 0
counter = 0
while i < len(text):
c = text[i]
if c == escape_char:
result.append(("text", text[start:i]))
i += 1
start = i
while i < len(text) and text[i] != begin_char:
i += 1
result.append(("begin", text[start:i]))
i += 1
start = i
counter += 1
elif c == end_char and counter >= 1:
result.append(("text", text[start:i]))
result.append(END_MARKER)
i += 1
start = i
counter -= 1
else:
i += 1
if i != start:
result.append(("text", text[start:i]))
final_result = []
for r in result:
if r[0] != "text":
final_result.append(r)
continue
lines = r[1].split("\n")
final_result.append(("text", lines[0]))
for line in lines[1:]:
final_result.append(NEWLINE_1)
final_result.append(("text", line))
if counter > 0:
raise Exception("Invalid format, unclosed command")
return normalize_tokens(final_result)
def _open_blocks(tokens):
blocks = []
for token in tokens:
if token[0] == "begin":
blocks.append(token)
elif token[0] == "end":
blocks.pop()
return blocks
def _open_blocks_count(tokens):
count = 0
for token in tokens:
if token[0] == "begin":
count += 1
elif token[0] == "end":
count -= 1
return count
def _get_block_end_index(tokens, index):
assert tokens[index][0] == "begin"
index += 1
count = 0
while index < len(tokens):
name, value = tokens[index]
if name == "begin":
count += 1
elif name == "end":
count -= 1
if count < 0:
return index
index += 1
def extract_line(tokens, index):
b = index
while b >= 0 and tokens[b][0] != "newline":
b -= 1
b += 1
e = index
while e < len(tokens) and tokens[e][0] != "newline":
e += 1
open_blocks = _open_blocks(tokens[:b])
result = open_blocks + tokens[b:e]
result += [END_MARKER] * _open_blocks_count(result)
return result, index - b + len(open_blocks)
def tokens_to_text_without_style(tokens):
result = []
for name, value in tokens:
if name == "text":
result.append(value)
elif name == "newline":
result.append("\n" * value)
return "".join(result)
def tokens_merge(tokens1, tokens2):
tokens = _tokens_merge_helper(tokens1, tokens2)
result = []
opened = []
for token in tokens:
if token[0] != "_block":
result.append(token)
continue
_, index, t = token
if t[0] == "begin":
opened.append(token)
result.append(t)
continue
assert t[0] == "end"
reopen = []
pos = -1
for _, i2, t2 in reversed(opened):
result.append(END_MARKER)
if i2 != index:
pos -= 1
reopen.append(t2)
else:
break
del opened[pos]
result.extend(reopen)
assert not opened
return normalize_tokens(result)
def _tokens_merge_helper(tokens1, tokens2):
result = []
tokens = (tokens1, tokens2)
last = [None, None]
indices = [0, 0]
stacks = ([], [])
def read(i):
index = indices[i]
if index >= len(tokens[i]):
last[i] = ("<END>", None)
else:
last[i] = tokens[i][index]
indices[i] += 1
return last[i]
def new_block(i):
result.append(("_block", i, last[i]))
read(i)
read(0)
read(1)
while True:
((n1, v1), (n2, v2)) = last
if n1 == "end" and (n2 != "end" or stacks[0] > stacks[1]):
stacks[0].pop()
new_block(0)
continue
if n2 == "end":
stacks[1].pop()
new_block(1)
continue
if n1 == "begin":
i1 = indices[0] - 1
if n2 == "begin":
# Find which block is shorter
i2 = indices[1] - 1
t1 = tokens_to_text_without_style(
tokens[0][i1 : _get_block_end_index(tokens[0], i1)]
)
t2 = tokens_to_text_without_style(
tokens[1][i2 : _get_block_end_index(tokens[1], i2)]
)
if len(t1) > len(t2):
stacks[0].append(i1)
new_block(0)
continue
else:
stacks[0].append(i1)
new_block(0)
continue
if n2 == "begin":
stacks[1].append(indices[0] - 1)
new_block(1)
continue
if n1 == "<END>" or n2 == "<END>":
assert n1 == "<END>" and n2 == "<END>"
break
if n1 == "newline" or n2 == "newline":
assert n1 == "newline" and n2 == "newline"
if v1 == v2:
result.append(last[0])
read(0)
read(1)
elif v1 < v2:
result.append(last[0])
last[1] = ("newline", v2 - v1)
read(0)
else:
result.append(last[1])
last[0] = ("newline", v1 - v2)
read(1)
continue
assert n1 == "text" and n2 == "text"
if len(v1) == len(v2):
result.append(last[0])
read(0)
read(1)
continue
if len(v1) < len(v2):
result.append(last[0])
read(0)
last[1] = ("text", v2[len(v1) :])
else:
result.append(last[1])
read(1)
last[0] = ("text", v1[len(v2) :])
return result
def trim_indent(text: str) -> str:
"""Find the smallest common indent from the left in the text and remove it from the text."""
lines = text.splitlines(keepends=False)
min_indent = min(len(line) - len(line.lstrip()) for line in lines if line.strip())
return "\n".join(line[min_indent:] for line in lines)
| end_marker = ('end', None)
newline_1 = ('newline', 1)
def number_of_lines(parsed_text):
lines = 1
for (token, value) in parsed_text:
if token == 'newline':
lines += value
return lines
def normalize_tokens(tokens):
result = []
for token in tokens:
(key, value) = token
if key == 'text' and (not value):
continue
if key == 'newline' and result and (result[-1][0] == 'newline'):
result[-1] = ('newline', result[-1][1] + value)
continue
if key == 'end' and result[-1][0] == 'newline':
last = result[-1]
result[-1] = token
result.append(last)
continue
result.append(token)
if result and result[-1][0] == 'newline':
result.pop()
return result
def add_line_numbers(tokens):
lines_len = len(str(number_of_lines(tokens)))
begin = ('begin', 'code_lineno')
result = [begin, ('text', '1'.zfill(lines_len) + ' '), END_MARKER]
line = 1
for token in tokens:
if token[0] != 'newline':
result.append(token)
continue
for i in range(token[1]):
line += 1
result.append(NEWLINE_1)
result.append(begin)
result.append(('text', str(line).zfill(lines_len) + ' '))
result.append(END_MARKER)
return result
def parse_text(text, escape_char='~', begin_char='{', end_char='}'):
result = []
start = 0
i = 0
counter = 0
while i < len(text):
c = text[i]
if c == escape_char:
result.append(('text', text[start:i]))
i += 1
start = i
while i < len(text) and text[i] != begin_char:
i += 1
result.append(('begin', text[start:i]))
i += 1
start = i
counter += 1
elif c == end_char and counter >= 1:
result.append(('text', text[start:i]))
result.append(END_MARKER)
i += 1
start = i
counter -= 1
else:
i += 1
if i != start:
result.append(('text', text[start:i]))
final_result = []
for r in result:
if r[0] != 'text':
final_result.append(r)
continue
lines = r[1].split('\n')
final_result.append(('text', lines[0]))
for line in lines[1:]:
final_result.append(NEWLINE_1)
final_result.append(('text', line))
if counter > 0:
raise exception('Invalid format, unclosed command')
return normalize_tokens(final_result)
def _open_blocks(tokens):
blocks = []
for token in tokens:
if token[0] == 'begin':
blocks.append(token)
elif token[0] == 'end':
blocks.pop()
return blocks
def _open_blocks_count(tokens):
count = 0
for token in tokens:
if token[0] == 'begin':
count += 1
elif token[0] == 'end':
count -= 1
return count
def _get_block_end_index(tokens, index):
assert tokens[index][0] == 'begin'
index += 1
count = 0
while index < len(tokens):
(name, value) = tokens[index]
if name == 'begin':
count += 1
elif name == 'end':
count -= 1
if count < 0:
return index
index += 1
def extract_line(tokens, index):
b = index
while b >= 0 and tokens[b][0] != 'newline':
b -= 1
b += 1
e = index
while e < len(tokens) and tokens[e][0] != 'newline':
e += 1
open_blocks = _open_blocks(tokens[:b])
result = open_blocks + tokens[b:e]
result += [END_MARKER] * _open_blocks_count(result)
return (result, index - b + len(open_blocks))
def tokens_to_text_without_style(tokens):
result = []
for (name, value) in tokens:
if name == 'text':
result.append(value)
elif name == 'newline':
result.append('\n' * value)
return ''.join(result)
def tokens_merge(tokens1, tokens2):
tokens = _tokens_merge_helper(tokens1, tokens2)
result = []
opened = []
for token in tokens:
if token[0] != '_block':
result.append(token)
continue
(_, index, t) = token
if t[0] == 'begin':
opened.append(token)
result.append(t)
continue
assert t[0] == 'end'
reopen = []
pos = -1
for (_, i2, t2) in reversed(opened):
result.append(END_MARKER)
if i2 != index:
pos -= 1
reopen.append(t2)
else:
break
del opened[pos]
result.extend(reopen)
assert not opened
return normalize_tokens(result)
def _tokens_merge_helper(tokens1, tokens2):
result = []
tokens = (tokens1, tokens2)
last = [None, None]
indices = [0, 0]
stacks = ([], [])
def read(i):
index = indices[i]
if index >= len(tokens[i]):
last[i] = ('<END>', None)
else:
last[i] = tokens[i][index]
indices[i] += 1
return last[i]
def new_block(i):
result.append(('_block', i, last[i]))
read(i)
read(0)
read(1)
while True:
((n1, v1), (n2, v2)) = last
if n1 == 'end' and (n2 != 'end' or stacks[0] > stacks[1]):
stacks[0].pop()
new_block(0)
continue
if n2 == 'end':
stacks[1].pop()
new_block(1)
continue
if n1 == 'begin':
i1 = indices[0] - 1
if n2 == 'begin':
i2 = indices[1] - 1
t1 = tokens_to_text_without_style(tokens[0][i1:_get_block_end_index(tokens[0], i1)])
t2 = tokens_to_text_without_style(tokens[1][i2:_get_block_end_index(tokens[1], i2)])
if len(t1) > len(t2):
stacks[0].append(i1)
new_block(0)
continue
else:
stacks[0].append(i1)
new_block(0)
continue
if n2 == 'begin':
stacks[1].append(indices[0] - 1)
new_block(1)
continue
if n1 == '<END>' or n2 == '<END>':
assert n1 == '<END>' and n2 == '<END>'
break
if n1 == 'newline' or n2 == 'newline':
assert n1 == 'newline' and n2 == 'newline'
if v1 == v2:
result.append(last[0])
read(0)
read(1)
elif v1 < v2:
result.append(last[0])
last[1] = ('newline', v2 - v1)
read(0)
else:
result.append(last[1])
last[0] = ('newline', v1 - v2)
read(1)
continue
assert n1 == 'text' and n2 == 'text'
if len(v1) == len(v2):
result.append(last[0])
read(0)
read(1)
continue
if len(v1) < len(v2):
result.append(last[0])
read(0)
last[1] = ('text', v2[len(v1):])
else:
result.append(last[1])
read(1)
last[0] = ('text', v1[len(v2):])
return result
def trim_indent(text: str) -> str:
"""Find the smallest common indent from the left in the text and remove it from the text."""
lines = text.splitlines(keepends=False)
min_indent = min((len(line) - len(line.lstrip()) for line in lines if line.strip()))
return '\n'.join((line[min_indent:] for line in lines)) |
QUERY_ISSUE_RESPONSE = {
"expand": "names,schema",
"issues": [
{
"expand": "operations,versionedRepresentations,editmeta,changelog,renderedFields",
"fields": {
"aggregateprogress": {
"progress": 0,
"total": 0
},
"aggregatetimeestimate": None,
"aggregatetimeoriginalestimate": None,
"aggregatetimespent": None,
"assignee": None,
"components": [],
"created": "2019-05-04T00:44:31.743+0300",
"creator": {
"accountId": "557058:fb80ffc0-b374-4260-99a0-ea0c140a4e76",
"accountType": "atlassian",
"active": True,
"avatarUrls": {
"16x16": "",
"24x24": "",
"32x32": "",
"48x48": ""
},
"displayName": "jon doe",
"emailAddress": "email",
"self": "https://demistodev.atlassian.net/rest/api/2/user?accountId=id",
"timeZone": "Asia"
},
"customfield_10000": "{}",
"customfield_10001": "John Doe",
"customfield_10002": None,
"customfield_10003": None,
"customfield_10004": None,
"customfield_10005": None,
"customfield_10006": None,
"customfield_10007": None,
"customfield_10008": None,
"customfield_10009": None,
"customfield_10013": None,
"customfield_10014": None,
"customfield_10015": {
"hasEpicLinkFieldDependency": False,
"nonEditableReason": {
"message": "The Parent Link is only available to Jira Premium users.",
"reason": "PLUGIN_LICENSE_ERROR"
},
"showField": False
},
"customfield_10016": None,
"customfield_10017": "10000_*:*_1_*:*_1023607418_*|*_10001_*:*_1_*:*_0",
"customfield_10018": None,
"customfield_10019": "0|i006cf:",
"customfield_10022": None,
"customfield_10023": [],
"customfield_10024": None,
"customfield_10025": None,
"customfield_10027": None,
"customfield_10029": None,
"customfield_10031": None,
"customfield_10032": None,
"customfield_10033": None,
"customfield_10034": None,
"customfield_10035": None,
"customfield_10036": None,
"customfield_10037": None,
"customfield_10038": None,
"customfield_10039": None,
"customfield_10040": None,
"customfield_10041": None,
"customfield_10042": None,
"customfield_10043": None,
"description": "hello",
"duedate": None,
"environment": None,
"fixVersions": [],
"issuelinks": [],
"issuetype": {
"avatarId": 10318,
"description": "A task that needs to be done.",
"iconUrl": "a",
"id": "10001",
"name": "Task",
"self": "https://localhost/rest/api/2/issuetype/10001",
"subtask": False
},
"labels": [],
"lastViewed": None,
"priority": {
"iconUrl": "https://localhost/images/icons/priorities/high.svg",
"id": "2",
"name": "High",
"self": "https://localhost/rest/api/2/priority/2"
},
"progress": {
"progress": 0,
"total": 0
},
"project": {
"avatarUrls": {
"16x16": "",
"24x24": "",
"32x32": "",
"48x48": ""
},
"id": "10005",
"key": "VIK",
"name": "VikTest",
"projectTypeKey": "software",
"self": "https://localhost/rest/api/2/project/10005",
"simplified": False
},
"reporter": {
"accountId": "557058:fb80ffc0-b374-4260-99a0-ea0c140a4e76",
"accountType": "atlassian",
"active": True,
"avatarUrls": {
"16x16": "",
"24x24": "",
"32x32": "",
"48x48": ""
},
"displayName": "displayName",
"emailAddress": "email",
"self": "https://localhost/rest/api/2/user?accountId=id",
"timeZone": "Asia/Jerusalem"
},
"resolution": {
"description": "Work has been completed on this issue.",
"id": "10000",
"name": "Done",
"self": "https://localhost/rest/api/2/resolution/10000"
},
"resolutiondate": "2019-05-15T21:04:39.147+0300",
"security": None,
"status": {
"description": "",
"iconUrl": "https://localhost/images/icons/status_generic.gif",
"id": "10000",
"name": "To Do",
"self": "https://localhost/rest/api/2/status/10000",
"statusCategory": {
"colorName": "blue-gray",
"id": 2,
"key": "new",
"name": "To Do",
"self": "https://localhost/rest/api/2/statuscategory/2"
}
},
"statuscategorychangedate": "2019-05-15T21:24:07.222+0300",
"subtasks": [],
"summary": "JiraTestMohitM",
"timeestimate": None,
"timeoriginalestimate": None,
"timespent": None,
"updated": "2019-05-15T21:24:07.222+0300",
"versions": [],
"votes": {
"hasVoted": False,
"self": "https://localhost/rest/api/2/issue/VIK-3/votes",
"votes": 0
},
"watches": {
"isWatching": True,
"self": "https://localhost/rest/api/2/issue/VIK-3/watchers",
"watchCount": 1
},
"workratio": -1
},
"id": "12652",
"key": "VIK-3",
"self": "https://localhost/rest/api/latest/issue/12652"
}
],
"maxResults": 1,
"startAt": 0,
"total": 1115
}
GET_ISSUE_RESPONSE = {
'expand': 'renderedFields,names,schema,operations,editmeta,changelog,versionedRepresentations,customfield_10022.requestTypePractice',
'id': '19141', 'key': 'VIK-238',
'fields': {
'statuscategorychangedate': '2021-04-04T12:25:48.335+0300',
'issuetype': {'id': '10001',
'description': 'A task that needs to be done.',
'name': 'Task', 'subtask': False, 'avatarId': 10318, 'hierarchyLevel': 0},
'timespent': None,
'project': {'id': '10005',
'key': 'VIK', 'name': 'VikTest', 'projectTypeKey': 'software', 'simplified': False,
'avatarUrls': {
'48x48': ''}},
'customfield_10031': None, 'customfield_10032': None, 'fixVersions': [],
'customfield_10033': None,
'customfield_10034': None, 'aggregatetimespent': None, 'resolution': None,
'customfield_10035': None,
'customfield_10036': None, 'customfield_10037': None, 'customfield_10027': None,
'customfield_10029': None, 'resolutiondate': None, 'workratio': -1, 'lastViewed': None,
'issuerestriction': {'issuerestrictions': {}, 'shouldDisplay': False},
'watches': {'self': '',
'watchCount': 1, 'isWatching': True},
'created': '2021-04-04T12:25:48.114+0300',
'customfield_10022': None,
'priority': {'self': '',
'iconUrl': '',
'name': 'Medium', 'id': '3'}, 'customfield_10023': [],
'customfield_10024': None, 'customfield_10025': None, 'labels': [],
'customfield_10016': None,
'customfield_10017': None, 'customfield_10018': None, 'customfield_10019': '0|i00g5j:',
'aggregatetimeoriginalestimate': None, 'timeestimate': None, 'versions': [],
'issuelinks': [],
'assignee': None, 'updated': '2021-04-04T12:49:43.546+0300',
'status': {'self': '',
'description': '',
'iconUrl': '',
'name': 'To Do', 'id': '10000',
'statusCategory': {
'self': '',
'id': 2, 'key': 'new', 'colorName': 'blue-gray', 'name': 'To Do'}},
'components': [], 'timeoriginalestimate': None,
'description': 'changeing again again\n\nagain gain',
'customfield_10013': None, 'customfield_10014': None,
'customfield_10015': {'hasEpicLinkFieldDependency': False, 'showField': False,
'nonEditableReason': {'reason': 'PLUGIN_LICENSE_ERROR',
'message': 'The Parent Link is only available to Jira Premium users.'}},
'timetracking': {}, 'customfield_10005': None, 'customfield_10006': None,
'security': None,
'customfield_10007': None, 'customfield_10008': None, 'customfield_10009': None,
'attachment': [
{'self': '',
'content': 'https://someurl.com',
'id': '15451',
'filename': 'entry_artifact_5@317.json', 'author': {
'accountId': 'accountid',
'emailAddress': 'email',
'avatarUrls': {
'48x48': ''},
'displayName': 'displayName', 'active': True, 'timeZone': 'Asia/Jerusalem',
'accountType': 'atlassian'},
'created': '2021-04-04T12:49:42.881+0300', 'size': 8225,
'mimeType': 'application/json',
}],
'aggregatetimeestimate': None, 'summary': 'test master1',
'creator': {
'accountId': 'accountid',
'accountType': 'atlassian',
'active': True,
'avatarUrls': {
'16x16': '',
'24x24': '',
'32x32': '',
'48x48': ''
},
'displayName': 'jon doe',
'emailAddress': 'email',
'self': 'https://localhost/rest/api/2/user?accountId=id',
'timeZone': 'Asia'
}
}
}
FIELDS_RESPONSE = [
{'id': 'customfield_10001', 'key': 'customfield_10001', 'name': 'Owner', 'untranslatedName': 'Owner',
'custom': True, 'orderable': True, 'navigable': True, 'searchable': True,
'clauseNames': ['cf[10001]', 'Owner', 'Owner[User Picker (single user)]'],
'schema': {'type': 'user', 'custom': 'com.atlassian.jira.plugin.system.customfieldtypes:userpicker',
'customId': 10001}},
{'id': 'resolution', 'key': 'resolution', 'name': 'Resolution', 'custom': False, 'orderable': True,
'navigable': True, 'searchable': True, 'clauseNames': ['resolution'],
'schema': {'type': 'resolution', 'system': 'resolution'}},
{'id': 'resolutiondate', 'key': 'resolutiondate', 'name': 'Resolved', 'custom': False, 'orderable': False,
'navigable': True, 'searchable': True, 'clauseNames': ['resolutiondate', 'resolved'],
'schema': {'type': 'datetime', 'system': 'resolutiondate'}}
]
EXPECTED_RESP = {
'customfield_10001': 'Owner',
'resolution': 'Resolution',
'resolutiondate': 'Resolved'
}
ATTACHMENT = {
"self": "https://localhost/rest/api/2/attachment/16188",
"id": "16188",
"filename": "test",
"author": {
"self": "https://localhost/rest/api/2/user?accountId=557058%3Afb80ffc0-b374-4260-99a0"
"-ea0c140a4e76",
"accountId": "account id",
"emailAddress": "mail",
"avatarUrls": {},
"displayName": "name",
"active": True,
"timeZone": "Asia/Jerusalem",
"accountType": "atlassian"
},
"created": "2021-11-17T12:40:06.700+0200",
"size": 4,
"mimeType": "binary/octet-stream",
"content": "https://localhost/rest/api/2/attachment/content/16188"
}
| query_issue_response = {'expand': 'names,schema', 'issues': [{'expand': 'operations,versionedRepresentations,editmeta,changelog,renderedFields', 'fields': {'aggregateprogress': {'progress': 0, 'total': 0}, 'aggregatetimeestimate': None, 'aggregatetimeoriginalestimate': None, 'aggregatetimespent': None, 'assignee': None, 'components': [], 'created': '2019-05-04T00:44:31.743+0300', 'creator': {'accountId': '557058:fb80ffc0-b374-4260-99a0-ea0c140a4e76', 'accountType': 'atlassian', 'active': True, 'avatarUrls': {'16x16': '', '24x24': '', '32x32': '', '48x48': ''}, 'displayName': 'jon doe', 'emailAddress': 'email', 'self': 'https://demistodev.atlassian.net/rest/api/2/user?accountId=id', 'timeZone': 'Asia'}, 'customfield_10000': '{}', 'customfield_10001': 'John Doe', 'customfield_10002': None, 'customfield_10003': None, 'customfield_10004': None, 'customfield_10005': None, 'customfield_10006': None, 'customfield_10007': None, 'customfield_10008': None, 'customfield_10009': None, 'customfield_10013': None, 'customfield_10014': None, 'customfield_10015': {'hasEpicLinkFieldDependency': False, 'nonEditableReason': {'message': 'The Parent Link is only available to Jira Premium users.', 'reason': 'PLUGIN_LICENSE_ERROR'}, 'showField': False}, 'customfield_10016': None, 'customfield_10017': '10000_*:*_1_*:*_1023607418_*|*_10001_*:*_1_*:*_0', 'customfield_10018': None, 'customfield_10019': '0|i006cf:', 'customfield_10022': None, 'customfield_10023': [], 'customfield_10024': None, 'customfield_10025': None, 'customfield_10027': None, 'customfield_10029': None, 'customfield_10031': None, 'customfield_10032': None, 'customfield_10033': None, 'customfield_10034': None, 'customfield_10035': None, 'customfield_10036': None, 'customfield_10037': None, 'customfield_10038': None, 'customfield_10039': None, 'customfield_10040': None, 'customfield_10041': None, 'customfield_10042': None, 'customfield_10043': None, 'description': 'hello', 'duedate': None, 'environment': None, 'fixVersions': [], 'issuelinks': [], 'issuetype': {'avatarId': 10318, 'description': 'A task that needs to be done.', 'iconUrl': 'a', 'id': '10001', 'name': 'Task', 'self': 'https://localhost/rest/api/2/issuetype/10001', 'subtask': False}, 'labels': [], 'lastViewed': None, 'priority': {'iconUrl': 'https://localhost/images/icons/priorities/high.svg', 'id': '2', 'name': 'High', 'self': 'https://localhost/rest/api/2/priority/2'}, 'progress': {'progress': 0, 'total': 0}, 'project': {'avatarUrls': {'16x16': '', '24x24': '', '32x32': '', '48x48': ''}, 'id': '10005', 'key': 'VIK', 'name': 'VikTest', 'projectTypeKey': 'software', 'self': 'https://localhost/rest/api/2/project/10005', 'simplified': False}, 'reporter': {'accountId': '557058:fb80ffc0-b374-4260-99a0-ea0c140a4e76', 'accountType': 'atlassian', 'active': True, 'avatarUrls': {'16x16': '', '24x24': '', '32x32': '', '48x48': ''}, 'displayName': 'displayName', 'emailAddress': 'email', 'self': 'https://localhost/rest/api/2/user?accountId=id', 'timeZone': 'Asia/Jerusalem'}, 'resolution': {'description': 'Work has been completed on this issue.', 'id': '10000', 'name': 'Done', 'self': 'https://localhost/rest/api/2/resolution/10000'}, 'resolutiondate': '2019-05-15T21:04:39.147+0300', 'security': None, 'status': {'description': '', 'iconUrl': 'https://localhost/images/icons/status_generic.gif', 'id': '10000', 'name': 'To Do', 'self': 'https://localhost/rest/api/2/status/10000', 'statusCategory': {'colorName': 'blue-gray', 'id': 2, 'key': 'new', 'name': 'To Do', 'self': 'https://localhost/rest/api/2/statuscategory/2'}}, 'statuscategorychangedate': '2019-05-15T21:24:07.222+0300', 'subtasks': [], 'summary': 'JiraTestMohitM', 'timeestimate': None, 'timeoriginalestimate': None, 'timespent': None, 'updated': '2019-05-15T21:24:07.222+0300', 'versions': [], 'votes': {'hasVoted': False, 'self': 'https://localhost/rest/api/2/issue/VIK-3/votes', 'votes': 0}, 'watches': {'isWatching': True, 'self': 'https://localhost/rest/api/2/issue/VIK-3/watchers', 'watchCount': 1}, 'workratio': -1}, 'id': '12652', 'key': 'VIK-3', 'self': 'https://localhost/rest/api/latest/issue/12652'}], 'maxResults': 1, 'startAt': 0, 'total': 1115}
get_issue_response = {'expand': 'renderedFields,names,schema,operations,editmeta,changelog,versionedRepresentations,customfield_10022.requestTypePractice', 'id': '19141', 'key': 'VIK-238', 'fields': {'statuscategorychangedate': '2021-04-04T12:25:48.335+0300', 'issuetype': {'id': '10001', 'description': 'A task that needs to be done.', 'name': 'Task', 'subtask': False, 'avatarId': 10318, 'hierarchyLevel': 0}, 'timespent': None, 'project': {'id': '10005', 'key': 'VIK', 'name': 'VikTest', 'projectTypeKey': 'software', 'simplified': False, 'avatarUrls': {'48x48': ''}}, 'customfield_10031': None, 'customfield_10032': None, 'fixVersions': [], 'customfield_10033': None, 'customfield_10034': None, 'aggregatetimespent': None, 'resolution': None, 'customfield_10035': None, 'customfield_10036': None, 'customfield_10037': None, 'customfield_10027': None, 'customfield_10029': None, 'resolutiondate': None, 'workratio': -1, 'lastViewed': None, 'issuerestriction': {'issuerestrictions': {}, 'shouldDisplay': False}, 'watches': {'self': '', 'watchCount': 1, 'isWatching': True}, 'created': '2021-04-04T12:25:48.114+0300', 'customfield_10022': None, 'priority': {'self': '', 'iconUrl': '', 'name': 'Medium', 'id': '3'}, 'customfield_10023': [], 'customfield_10024': None, 'customfield_10025': None, 'labels': [], 'customfield_10016': None, 'customfield_10017': None, 'customfield_10018': None, 'customfield_10019': '0|i00g5j:', 'aggregatetimeoriginalestimate': None, 'timeestimate': None, 'versions': [], 'issuelinks': [], 'assignee': None, 'updated': '2021-04-04T12:49:43.546+0300', 'status': {'self': '', 'description': '', 'iconUrl': '', 'name': 'To Do', 'id': '10000', 'statusCategory': {'self': '', 'id': 2, 'key': 'new', 'colorName': 'blue-gray', 'name': 'To Do'}}, 'components': [], 'timeoriginalestimate': None, 'description': 'changeing again again\n\nagain gain', 'customfield_10013': None, 'customfield_10014': None, 'customfield_10015': {'hasEpicLinkFieldDependency': False, 'showField': False, 'nonEditableReason': {'reason': 'PLUGIN_LICENSE_ERROR', 'message': 'The Parent Link is only available to Jira Premium users.'}}, 'timetracking': {}, 'customfield_10005': None, 'customfield_10006': None, 'security': None, 'customfield_10007': None, 'customfield_10008': None, 'customfield_10009': None, 'attachment': [{'self': '', 'content': 'https://someurl.com', 'id': '15451', 'filename': 'entry_artifact_5@317.json', 'author': {'accountId': 'accountid', 'emailAddress': 'email', 'avatarUrls': {'48x48': ''}, 'displayName': 'displayName', 'active': True, 'timeZone': 'Asia/Jerusalem', 'accountType': 'atlassian'}, 'created': '2021-04-04T12:49:42.881+0300', 'size': 8225, 'mimeType': 'application/json'}], 'aggregatetimeestimate': None, 'summary': 'test master1', 'creator': {'accountId': 'accountid', 'accountType': 'atlassian', 'active': True, 'avatarUrls': {'16x16': '', '24x24': '', '32x32': '', '48x48': ''}, 'displayName': 'jon doe', 'emailAddress': 'email', 'self': 'https://localhost/rest/api/2/user?accountId=id', 'timeZone': 'Asia'}}}
fields_response = [{'id': 'customfield_10001', 'key': 'customfield_10001', 'name': 'Owner', 'untranslatedName': 'Owner', 'custom': True, 'orderable': True, 'navigable': True, 'searchable': True, 'clauseNames': ['cf[10001]', 'Owner', 'Owner[User Picker (single user)]'], 'schema': {'type': 'user', 'custom': 'com.atlassian.jira.plugin.system.customfieldtypes:userpicker', 'customId': 10001}}, {'id': 'resolution', 'key': 'resolution', 'name': 'Resolution', 'custom': False, 'orderable': True, 'navigable': True, 'searchable': True, 'clauseNames': ['resolution'], 'schema': {'type': 'resolution', 'system': 'resolution'}}, {'id': 'resolutiondate', 'key': 'resolutiondate', 'name': 'Resolved', 'custom': False, 'orderable': False, 'navigable': True, 'searchable': True, 'clauseNames': ['resolutiondate', 'resolved'], 'schema': {'type': 'datetime', 'system': 'resolutiondate'}}]
expected_resp = {'customfield_10001': 'Owner', 'resolution': 'Resolution', 'resolutiondate': 'Resolved'}
attachment = {'self': 'https://localhost/rest/api/2/attachment/16188', 'id': '16188', 'filename': 'test', 'author': {'self': 'https://localhost/rest/api/2/user?accountId=557058%3Afb80ffc0-b374-4260-99a0-ea0c140a4e76', 'accountId': 'account id', 'emailAddress': 'mail', 'avatarUrls': {}, 'displayName': 'name', 'active': True, 'timeZone': 'Asia/Jerusalem', 'accountType': 'atlassian'}, 'created': '2021-11-17T12:40:06.700+0200', 'size': 4, 'mimeType': 'binary/octet-stream', 'content': 'https://localhost/rest/api/2/attachment/content/16188'} |
# Author: Gaurav Pande
# [520. Detect Capital](https://leetcode.com/problems/detect-capital/description/)
class Solution:
def detectCapitalUse(self, word):
"""
:type word: str
:rtype: bool
"""
i = 0
list_res = []
while i < len(word):
if word[i].islower():
list_res.append(False)
else:
list_res.append(True)
i = i + 1
if (all(val == True
for val in list_res) == True):
return True
elif list_res[0] == True and all(val == False
for val in list_res[1:]):
return True
elif all(val == False
for val in list_res) == True:
return True
else:
return False
| class Solution:
def detect_capital_use(self, word):
"""
:type word: str
:rtype: bool
"""
i = 0
list_res = []
while i < len(word):
if word[i].islower():
list_res.append(False)
else:
list_res.append(True)
i = i + 1
if all((val == True for val in list_res)) == True:
return True
elif list_res[0] == True and all((val == False for val in list_res[1:])):
return True
elif all((val == False for val in list_res)) == True:
return True
else:
return False |
cod1, n1, v1 = input().split(' ')
cod1 = int(cod1)
n1 = int(n1)
v1 = float(v1)
cod2, n2, v2 = input().split(' ')
cod2 = int(cod2)
n2 = int(n2)
v2 = float(v2)
tot = n1 * v1 + n2 * v2
print(f'VALOR A PAGAR: R$ {tot:.2f}')
| (cod1, n1, v1) = input().split(' ')
cod1 = int(cod1)
n1 = int(n1)
v1 = float(v1)
(cod2, n2, v2) = input().split(' ')
cod2 = int(cod2)
n2 = int(n2)
v2 = float(v2)
tot = n1 * v1 + n2 * v2
print(f'VALOR A PAGAR: R$ {tot:.2f}') |
# Dictionary
phonebook = {}
print(phonebook)
phonebook = {
'Andy': '9957558',
'John': '64746484',
'Jenny': '22282'
}
print(phonebook['Andy'])
print(phonebook['John'])
print(phonebook['Jenny'])
print(dir(phonebook))
for phone in phonebook.values():
print(phone)
for phone in phonebook.keys():
print(phone)
for key, value in phonebook.items():
print(key , value)
print(phonebook)
phonebook['Mike'] = '9957558'
print(phonebook)
phonebook['Mike'] = '78474449'
print(phonebook)
print(phonebook.get('Andy'))
phonebook.update(Andy='353536735', Terry = '64547437')
print(phonebook)
update_dict = {
'Juan': 4353536,
'Kerry': 884747
}
phonebook.update(update_dict)
print(phonebook)
del phonebook['Juan']
print(phonebook)
| phonebook = {}
print(phonebook)
phonebook = {'Andy': '9957558', 'John': '64746484', 'Jenny': '22282'}
print(phonebook['Andy'])
print(phonebook['John'])
print(phonebook['Jenny'])
print(dir(phonebook))
for phone in phonebook.values():
print(phone)
for phone in phonebook.keys():
print(phone)
for (key, value) in phonebook.items():
print(key, value)
print(phonebook)
phonebook['Mike'] = '9957558'
print(phonebook)
phonebook['Mike'] = '78474449'
print(phonebook)
print(phonebook.get('Andy'))
phonebook.update(Andy='353536735', Terry='64547437')
print(phonebook)
update_dict = {'Juan': 4353536, 'Kerry': 884747}
phonebook.update(update_dict)
print(phonebook)
del phonebook['Juan']
print(phonebook) |
def test_bearychat_badge_should_be_svg(test_client):
resp = test_client.get('/badge/bearychat.svg')
assert resp.status_code == 200
assert resp.content_type == 'image/svg+xml'
def test_bearychat_badge_should_contain_bearychat(test_client):
resp = test_client.get('/badge/bearychat.svg')
assert 'BearyChat' in resp.data.decode('u8')
| def test_bearychat_badge_should_be_svg(test_client):
resp = test_client.get('/badge/bearychat.svg')
assert resp.status_code == 200
assert resp.content_type == 'image/svg+xml'
def test_bearychat_badge_should_contain_bearychat(test_client):
resp = test_client.get('/badge/bearychat.svg')
assert 'BearyChat' in resp.data.decode('u8') |
def get_first_matching_attr(obj, *attrs, default=None):
for attr in attrs:
if hasattr(obj, attr):
return getattr(obj, attr)
return default
| def get_first_matching_attr(obj, *attrs, default=None):
for attr in attrs:
if hasattr(obj, attr):
return getattr(obj, attr)
return default |
#
# PySNMP MIB module OG-SMI-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/OG-SMI-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 20:23: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)
#
ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
SingleValueConstraint, ConstraintsUnion, ConstraintsIntersection, ValueSizeConstraint, ValueRangeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ConstraintsUnion", "ConstraintsIntersection", "ValueSizeConstraint", "ValueRangeConstraint")
ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup")
IpAddress, ObjectIdentity, TimeTicks, MibScalar, MibTable, MibTableRow, MibTableColumn, MibIdentifier, ModuleIdentity, iso, Unsigned32, Counter64, Gauge32, NotificationType, Counter32, Integer32, Bits, enterprises = mibBuilder.importSymbols("SNMPv2-SMI", "IpAddress", "ObjectIdentity", "TimeTicks", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "MibIdentifier", "ModuleIdentity", "iso", "Unsigned32", "Counter64", "Gauge32", "NotificationType", "Counter32", "Integer32", "Bits", "enterprises")
TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString")
opengear = ModuleIdentity((1, 3, 6, 1, 4, 1, 25049))
opengear.setRevisions(('2013-11-15 00:00', '2013-08-11 00:00', '2010-03-22 11:27', '2005-02-24 01:00',))
if mibBuilder.loadTexts: opengear.setLastUpdated('201311150000Z')
if mibBuilder.loadTexts: opengear.setOrganization('Opengear Inc.')
ogProducts = ObjectIdentity((1, 3, 6, 1, 4, 1, 25049, 1))
if mibBuilder.loadTexts: ogProducts.setStatus('current')
ogLegacyMgmt = ObjectIdentity((1, 3, 6, 1, 4, 1, 25049, 2))
if mibBuilder.loadTexts: ogLegacyMgmt.setStatus('current')
ogExperimental = ObjectIdentity((1, 3, 6, 1, 4, 1, 25049, 3))
if mibBuilder.loadTexts: ogExperimental.setStatus('current')
ogInternal = ObjectIdentity((1, 3, 6, 1, 4, 1, 25049, 4))
if mibBuilder.loadTexts: ogInternal.setStatus('current')
ogReserved1 = ObjectIdentity((1, 3, 6, 1, 4, 1, 25049, 5))
if mibBuilder.loadTexts: ogReserved1.setStatus('current')
ogReserved2 = ObjectIdentity((1, 3, 6, 1, 4, 1, 25049, 6))
if mibBuilder.loadTexts: ogReserved2.setStatus('current')
otherEnterprises = ObjectIdentity((1, 3, 6, 1, 4, 1, 25049, 7))
if mibBuilder.loadTexts: otherEnterprises.setStatus('current')
ogAgentCapability = ObjectIdentity((1, 3, 6, 1, 4, 1, 25049, 8))
if mibBuilder.loadTexts: ogAgentCapability.setStatus('current')
ogConfig = ObjectIdentity((1, 3, 6, 1, 4, 1, 25049, 9))
if mibBuilder.loadTexts: ogConfig.setStatus('current')
ogMgmt = ObjectIdentity((1, 3, 6, 1, 4, 1, 25049, 10))
if mibBuilder.loadTexts: ogMgmt.setStatus('current')
ogModules = ObjectIdentity((1, 3, 6, 1, 4, 1, 25049, 11))
if mibBuilder.loadTexts: ogModules.setStatus('current')
mibBuilder.exportSymbols("OG-SMI-MIB", ogReserved2=ogReserved2, ogLegacyMgmt=ogLegacyMgmt, ogReserved1=ogReserved1, ogModules=ogModules, opengear=opengear, otherEnterprises=otherEnterprises, ogExperimental=ogExperimental, PYSNMP_MODULE_ID=opengear, ogProducts=ogProducts, ogMgmt=ogMgmt, ogInternal=ogInternal, ogConfig=ogConfig, ogAgentCapability=ogAgentCapability)
| (object_identifier, integer, octet_string) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'Integer', 'OctetString')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(single_value_constraint, constraints_union, constraints_intersection, value_size_constraint, value_range_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'SingleValueConstraint', 'ConstraintsUnion', 'ConstraintsIntersection', 'ValueSizeConstraint', 'ValueRangeConstraint')
(module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup')
(ip_address, object_identity, time_ticks, mib_scalar, mib_table, mib_table_row, mib_table_column, mib_identifier, module_identity, iso, unsigned32, counter64, gauge32, notification_type, counter32, integer32, bits, enterprises) = mibBuilder.importSymbols('SNMPv2-SMI', 'IpAddress', 'ObjectIdentity', 'TimeTicks', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'MibIdentifier', 'ModuleIdentity', 'iso', 'Unsigned32', 'Counter64', 'Gauge32', 'NotificationType', 'Counter32', 'Integer32', 'Bits', 'enterprises')
(textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString')
opengear = module_identity((1, 3, 6, 1, 4, 1, 25049))
opengear.setRevisions(('2013-11-15 00:00', '2013-08-11 00:00', '2010-03-22 11:27', '2005-02-24 01:00'))
if mibBuilder.loadTexts:
opengear.setLastUpdated('201311150000Z')
if mibBuilder.loadTexts:
opengear.setOrganization('Opengear Inc.')
og_products = object_identity((1, 3, 6, 1, 4, 1, 25049, 1))
if mibBuilder.loadTexts:
ogProducts.setStatus('current')
og_legacy_mgmt = object_identity((1, 3, 6, 1, 4, 1, 25049, 2))
if mibBuilder.loadTexts:
ogLegacyMgmt.setStatus('current')
og_experimental = object_identity((1, 3, 6, 1, 4, 1, 25049, 3))
if mibBuilder.loadTexts:
ogExperimental.setStatus('current')
og_internal = object_identity((1, 3, 6, 1, 4, 1, 25049, 4))
if mibBuilder.loadTexts:
ogInternal.setStatus('current')
og_reserved1 = object_identity((1, 3, 6, 1, 4, 1, 25049, 5))
if mibBuilder.loadTexts:
ogReserved1.setStatus('current')
og_reserved2 = object_identity((1, 3, 6, 1, 4, 1, 25049, 6))
if mibBuilder.loadTexts:
ogReserved2.setStatus('current')
other_enterprises = object_identity((1, 3, 6, 1, 4, 1, 25049, 7))
if mibBuilder.loadTexts:
otherEnterprises.setStatus('current')
og_agent_capability = object_identity((1, 3, 6, 1, 4, 1, 25049, 8))
if mibBuilder.loadTexts:
ogAgentCapability.setStatus('current')
og_config = object_identity((1, 3, 6, 1, 4, 1, 25049, 9))
if mibBuilder.loadTexts:
ogConfig.setStatus('current')
og_mgmt = object_identity((1, 3, 6, 1, 4, 1, 25049, 10))
if mibBuilder.loadTexts:
ogMgmt.setStatus('current')
og_modules = object_identity((1, 3, 6, 1, 4, 1, 25049, 11))
if mibBuilder.loadTexts:
ogModules.setStatus('current')
mibBuilder.exportSymbols('OG-SMI-MIB', ogReserved2=ogReserved2, ogLegacyMgmt=ogLegacyMgmt, ogReserved1=ogReserved1, ogModules=ogModules, opengear=opengear, otherEnterprises=otherEnterprises, ogExperimental=ogExperimental, PYSNMP_MODULE_ID=opengear, ogProducts=ogProducts, ogMgmt=ogMgmt, ogInternal=ogInternal, ogConfig=ogConfig, ogAgentCapability=ogAgentCapability) |
layer_adr_pt = QgsMapLayerRegistry.instance().mapLayersByName('adresse_pt_1')[0]
layer_adr_line = QgsMapLayerRegistry.instance().mapLayersByName('troncon_fusion')[0]
ids = []
for point in layer_adr_pt.getFeatures():
geom = point.geometry()
for rue in layer_adr_line.getFeatures():
geom_rue = rue.geometry().buffer(1,5)
if geom.intersects(geom_rue):
ids.append(point.id())
layer_adr_pt.setSelectedFeatures(ids)
| layer_adr_pt = QgsMapLayerRegistry.instance().mapLayersByName('adresse_pt_1')[0]
layer_adr_line = QgsMapLayerRegistry.instance().mapLayersByName('troncon_fusion')[0]
ids = []
for point in layer_adr_pt.getFeatures():
geom = point.geometry()
for rue in layer_adr_line.getFeatures():
geom_rue = rue.geometry().buffer(1, 5)
if geom.intersects(geom_rue):
ids.append(point.id())
layer_adr_pt.setSelectedFeatures(ids) |
# parsetab.py
# This file is automatically generated. Do not edit.
# pylint: disable=W,C,R
_tabversion = '3.10'
_lr_method = 'LALR'
_lr_signature = 'leftPAR_ABREPAR_CIERRArightIGUALleftORleftANDleftNO_IGUALnonassocMAYORMENORMAYOR_IGUALMENOR_IGUALleftMASMENOSleftASTERISCODIVISIONMODULOleftPOTENCIArightNOTleftLLAVE_ABRELLAVE_CIERRAADD ALL ALTER AND AS ASC ASTERISCO AVG BETWEEN BIGINT BOOLEAN BY CADENA CASE CASTEO CHAR CHARACTER CHECK COLUMN COMA CONSTRAINT CORCHE_ABRE CORCHE_CIERRA COUNT CREATE CURRENT_USER DATABASE DATABASES DATE DAY DECIMAL DECIMAL_NUM DEFAULT DELETE DESC DIFERENTE DISTINCT DIVISION DOUBLE DROP ELSE END ENTERO ENUM EXISTS FALSE FIELDS FIRST FOREIGN FROM FULL GREATEST GROUP HAVING HOUR ID IF IGUAL ILIKE IN INHERITS INNER INSERT INTEGER INTERSECT INTERVAL INTO IS ISNULL JOIN KEY LAST LEAST LEFT LIKE LIMIT LLAVE_ABRE LLAVE_CIERRA MAS MAYOR MAYOR_IGUAL MENOR MENOR_IGUAL MENOS MINUTE MODE MODULO MONEY MONTH NOT NOTNULL NO_IGUAL NULL NULLS NUMERIC OFFSET OR ORDER OUTER OWNER PAR_ABRE PAR_CIERRA POTENCIA PRECISION PRIMARY PUNTO PUNTOCOMA REAL REFERENCE REFERENCES RENAME REPLACE RIGHT SECOND SELECT SESSION_USER SET SHOW SIMILAR SMALLINT SUBSTRING SUM SYMMETRIC TABLE TEXT THEN TIME TIMESTAMP TO TRUE TYPE UNION UNIQUE UNKNOWN UPDATE USE VALUES VARCHAR VARYING WHEN WHERE WITH WITHOUT YEAR ZONEinit : instruccionesinstrucciones : instrucciones instruccioninstrucciones : instruccion instruccion : crear_statement PUNTOCOMA\n | alter_statement PUNTOCOMA\n | drop_statement PUNTOCOMA\n | seleccionar PUNTOCOMAinstruccion : SHOW DATABASES PUNTOCOMA\n | INSERT INTO ID VALUES PAR_ABRE list_val PAR_CIERRA PUNTOCOMA\n | UPDATE ID SET ID IGUAL op_val where PUNTOCOMA\n | DELETE FROM ID WHERE ID IGUAL op_val PUNTOCOMA\n | USE DATABASE ID PUNTOCOMAcrear_statement : CREATE TABLE ID PAR_ABRE contenido_tabla PAR_CIERRA inherits_statementcrear_statement : CREATE or_replace DATABASE if_not_exists ID owner_ mode_or_replace : OR REPLACE\n | if_not_exists : IF NOT EXISTS\n | owner_ : OWNER IGUAL ID\n | mode_ : MODE IGUAL ENTERO\n | alter_statement : ALTER DATABASE ID rename_owneralter_statement : ALTER TABLE ID alter_oprename_owner : RENAME TO ID\n | OWNER TO LLAVE_ABRE ow_op LLAVE_CIERRAow_op : ID\n | CURRENT_USER\n | SESSION_USERdrop_statement : DROP DATABASE if_exists IDdrop_statement : DROP TABLE IDif_exists : IF EXISTS\n | contenido_tabla : contenido_tabla COMA manejo_tablacontenido_tabla : manejo_tablamanejo_tabla : declaracion_columna\n | condition_columndeclaracion_columna : ID type_column condition_column_rowdeclaracion_columna : ID type_columntype_column : SMALLINT\n | INTEGER\n\t | BIGINT\n\t | DECIMAL\n\t | NUMERIC\n\t | REAL\n\t | DOUBLE PRECISION\n\t | MONEY\n\t | VARCHAR PAR_ABRE ENTERO PAR_CIERRA\n | CHAR PAR_ABRE ENTERO PAR_CIERRA\n | CHARACTER PAR_ABRE ENTERO PAR_CIERRA\n | CHARACTER VARYING PAR_ABRE ENTERO PAR_CIERRA\n \t | TEXT\n\t | DATE\n | TIMESTAMP\n | TIMEcondition_column_row : condition_column_row condition_columncondition_column_row : condition_columncondition_column : constraint UNIQUE op_unique\n | constraint CHECK PAR_ABRE expression PAR_CIERRA\n | key_tablecondition_column : DEFAULT op_val\n | NULL\n | NOT NULL\n\t | REFERENCE ID\n\t\t | CONSTRAINT ID key_table\n \t\t | constraint : CONSTRAINT ID\n | op_unique : PAR_ABRE list_id PAR_CIERRA\n | constraint CHECK PAR_ABRE expression PAR_CIERRA\n | list_id : list_id COMA aliaslist_id : aliasalias : IDkey_table : PRIMARY KEY list_key\n\t | FOREIGN KEY PAR_ABRE list_id PAR_CIERRA REFERENCES ID PAR_ABRE list_id PAR_CIERRAlist_key : PAR_ABRE list_id PAR_CIERRA\n\t | alter_op : ADD op_add\n\t | ALTER COLUMN ID alter_col_op\n\t | DROP alter_drop IDalter_drop : CONSTRAINT\n\t | COLUMN op_add : CHECK PAR_ABRE ID DIFERENTE CADENA PAR_CIERRA\n | CONSTRAINT ID UNIQUE PAR_ABRE ID PAR_CIERRA\n | key_table REFERENCES PAR_ABRE list_id PAR_CIERRAalter_col_op : SET NOT NULL\n | TYPE type_columninherits_statement : INHERITS PAR_ABRE ID PAR_CIERRA\n | list_val : list_val COMA op_vallist_val : op_valop_val : ID\n | CADENA\n | DECIMAL\n | ENTEROwhere : WHERE ID IGUAL op_val\n | seleccionar : SELECT distinto select_list FROM table_expression list_fin_selectseleccionar : SELECT GREATEST expressiones\n | SELECT LEAST expressioneslist_fin_select : list_fin_select fin_selectlist_fin_select : fin_selectfin_select : group_by \n\t | donde\n\t | order_by\n\t | group_having\n\t | limite\n \t| expressiones : PAR_ABRE list_expression PAR_CIERRAexpressiones : list_expressiondistinto : DISTINCT\n\t | select_list : ASTERISCO\n\t | expressiones table_expression : expressionesdonde : WHERE expressionesgroup_by : GROUP BY expressiones order_by : ORDER BY expressiones asc_desc nulls_f_lgroup_having : HAVING expressiones asc_desc : ASC\n\t | DESCnulls_f_l : NULLS LAST\n\t | NULLS FIRST\n\t | limite : LIMIT ENTERO\n\t | LIMIT ALL\n\t | OFFSET ENTEROlist_expression : list_expression COMA expressionlist_expression : expressionexpression : expression MAYOR expression\n | expression MENOR expression\n | expression MAYOR_IGUAL expression\n | expression MENOR_IGUAL expression\n | expression AND expression\n | expression OR expression\n | NOT expression\n | expression IGUAL expression\n | expression NO_IGUAL expression\n | expression DIFERENTE expression\n | PAR_ABRE expression PAR_CIERRA\n | expression BETWEEN expression AND expression\n | expression NOT BETWEEN expression AND expression \n | expression BETWEEN SYMMETRIC expression AND expression\n | expression NOT BETWEEN SYMMETRIC expression AND expression\n | expression IS DISTINCT FROM expression\n | expression IS NOT DISTINCT FROM expression\n | ID PUNTO ID\n | expression IS NULL\n | expression IS NOT NULL\n | expression ISNULL\n | expression NOTNULL\n | expression IS TRUE\n | expression IS NOT TRUE\n | expression IS FALSE\n | expression IS NOT FALSE\n | expression IS UNKNOWN\n | expression IS NOT UNKNOWN\n | SUBSTRING PAR_ABRE expression COMA expression COMA expression PAR_CIERRA\n | SUM PAR_ABRE expression PAR_CIERRA\n | COUNT PAR_ABRE expression PAR_CIERRA\n | AVG PAR_ABRE expression PAR_CIERRA\n | seleccionarexpression : ID\n | ASTERISCOexpression : ENTEROexpression : DECIMAL_NUMexpression : CADENA'
_lr_action_items = {'SHOW':([0,2,3,17,18,19,20,21,38,73,292,294,296,],[8,8,-3,-2,-4,-5,-6,-7,-8,-12,-9,-10,-11,]),'INSERT':([0,2,3,17,18,19,20,21,38,73,292,294,296,],[9,9,-3,-2,-4,-5,-6,-7,-8,-12,-9,-10,-11,]),'UPDATE':([0,2,3,17,18,19,20,21,38,73,292,294,296,],[10,10,-3,-2,-4,-5,-6,-7,-8,-12,-9,-10,-11,]),'DELETE':([0,2,3,17,18,19,20,21,38,73,292,294,296,],[11,11,-3,-2,-4,-5,-6,-7,-8,-12,-9,-10,-11,]),'USE':([0,2,3,17,18,19,20,21,38,73,292,294,296,],[12,12,-3,-2,-4,-5,-6,-7,-8,-12,-9,-10,-11,]),'CREATE':([0,2,3,17,18,19,20,21,38,73,292,294,296,],[13,13,-3,-2,-4,-5,-6,-7,-8,-12,-9,-10,-11,]),'ALTER':([0,2,3,17,18,19,20,21,38,47,73,292,294,296,],[14,14,-3,-2,-4,-5,-6,-7,-8,80,-12,-9,-10,-11,]),'DROP':([0,2,3,17,18,19,20,21,38,47,73,292,294,296,],[15,15,-3,-2,-4,-5,-6,-7,-8,83,-12,-9,-10,-11,]),'SELECT':([0,2,3,16,17,18,19,20,21,34,35,36,37,38,54,57,73,86,87,90,91,92,93,94,95,96,97,98,99,100,107,108,109,110,156,157,221,223,226,229,230,236,259,278,280,286,287,290,292,294,296,323,325,332,],[16,16,-3,-113,-2,-4,-5,-6,-7,16,16,16,-112,-8,16,16,-12,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,-9,-10,-11,16,16,16,]),'$end':([1,2,3,17,18,19,20,21,38,73,292,294,296,],[0,-1,-3,-2,-4,-5,-6,-7,-8,-12,-9,-10,-11,]),'PUNTOCOMA':([4,5,6,7,22,42,50,55,56,58,63,64,65,66,67,68,69,77,81,84,103,104,105,128,133,140,141,143,144,145,146,147,148,149,150,151,152,153,154,160,161,162,163,164,169,172,173,174,175,178,179,180,181,182,183,185,189,190,191,192,193,203,206,212,213,214,215,216,217,218,219,232,233,234,235,237,238,239,240,242,244,247,252,264,271,277,279,281,282,283,284,285,289,312,313,315,319,321,322,324,327,328,329,338,339,342,343,344,345,346,348,349,350,354,355,356,358,361,362,],[18,19,20,21,38,73,-31,-111,-130,-164,-163,-166,-167,-168,-100,-165,-101,-23,-24,-30,-151,-152,-137,-20,-79,-109,-116,-110,-141,-129,-131,-132,-133,-134,-135,-136,-138,-139,-140,-149,-153,-155,-157,-148,-93,-94,-95,-96,-98,-40,-41,-42,-43,-44,-45,-47,-52,-53,-54,-55,-90,-22,-25,-81,-99,-103,-104,-105,-106,-107,-108,-150,-154,-156,-158,-160,-161,-162,292,294,296,-46,-13,-14,-80,-102,-117,-120,-126,-127,-128,-142,-146,-19,-26,-88,-118,-144,-143,-147,-48,-49,-50,-21,-87,-86,-125,-121,-122,-145,-97,-51,-89,-84,-85,-119,-159,-123,-124,]),'DATABASES':([8,],[22,]),'INTO':([9,],[23,]),'ID':([10,16,23,25,26,27,30,31,32,33,34,35,36,37,40,44,48,54,57,72,74,75,85,86,87,90,91,92,93,94,95,96,97,98,99,100,106,107,108,109,110,111,112,121,124,125,130,132,135,137,138,139,156,157,176,194,205,207,209,221,223,226,229,230,236,241,243,257,258,259,262,263,266,276,278,280,286,287,290,302,317,323,325,326,332,334,353,363,],[24,-113,39,41,42,43,46,47,-33,50,58,58,58,-112,71,-18,84,58,58,113,114,128,-32,58,58,58,58,58,58,58,58,58,58,58,58,58,164,58,58,58,58,169,169,169,199,200,206,208,210,212,-82,-83,58,58,169,114,-17,268,274,58,58,58,58,58,58,169,295,306,307,58,306,306,312,306,58,58,58,58,58,331,341,58,58,169,58,306,360,306,]),'FROM':([11,51,52,53,55,56,58,63,64,65,66,67,68,69,103,104,105,140,141,143,144,145,146,147,148,149,150,151,152,153,154,158,160,161,162,163,164,213,214,215,216,217,218,219,231,232,233,234,235,237,238,239,277,279,281,282,283,284,285,289,319,321,322,324,343,344,345,346,356,358,361,362,],[25,86,-114,-115,-111,-130,-164,-163,-166,-167,-168,-100,-165,-101,-151,-152,-137,-109,-116,-110,-141,-129,-131,-132,-133,-134,-135,-136,-138,-139,-140,230,-149,-153,-155,-157,-148,-99,-103,-104,-105,-106,-107,-108,290,-150,-154,-156,-158,-160,-161,-162,-102,-117,-120,-126,-127,-128,-142,-146,-118,-144,-143,-147,-125,-121,-122,-145,-119,-159,-123,-124,]),'DATABASE':([12,13,14,15,28,45,],[26,-16,30,32,44,-15,]),'TABLE':([13,14,15,],[27,31,33,]),'OR':([13,52,55,56,58,63,64,65,66,67,68,69,89,103,104,105,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,160,161,162,163,164,165,166,167,168,213,214,215,216,217,218,219,227,228,232,233,234,235,237,238,239,277,279,281,282,283,284,285,288,289,291,308,319,321,322,324,343,344,345,346,347,351,356,358,361,362,],[29,-165,-111,96,-164,-163,-166,-167,-168,-100,-165,-101,96,-151,-152,-137,-109,-116,96,-110,-141,96,-131,-132,-133,-134,-135,-136,96,-139,96,96,-149,-153,-155,-157,-148,96,96,96,96,-99,-103,-104,-105,-106,-107,-108,96,96,-150,-154,-156,-158,-160,-161,-162,-102,-117,-120,-126,-127,-128,-135,96,96,96,96,-118,-135,-135,96,-125,-121,-122,-135,96,96,-119,-159,-123,-124,]),'GREATEST':([16,],[35,]),'LEAST':([16,],[36,]),'DISTINCT':([16,102,159,],[37,158,231,]),'ASTERISCO':([16,34,35,36,37,54,57,86,87,90,91,92,93,94,95,96,97,98,99,100,107,108,109,110,156,157,221,223,226,229,230,236,259,278,280,286,287,290,323,325,332,],[-113,52,68,68,-112,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,]),'PAR_ABRE':([16,34,35,36,37,43,54,57,59,60,61,62,70,86,87,90,91,92,93,94,95,96,97,98,99,100,107,108,109,110,134,156,157,186,187,188,195,196,201,202,211,221,223,226,229,230,236,251,253,259,275,278,280,286,287,290,303,323,325,332,360,],[-113,54,54,54,-112,74,87,87,107,108,109,110,111,54,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,87,209,87,87,248,249,250,257,259,262,263,276,54,54,87,87,87,87,301,302,87,317,54,54,87,87,87,332,87,87,87,363,]),'NOT':([16,34,35,36,37,52,54,55,56,57,58,63,64,65,66,67,68,69,74,76,86,87,89,90,91,92,93,94,95,96,97,98,99,100,102,103,104,105,107,108,109,110,120,122,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,160,161,162,163,164,165,166,167,168,169,172,173,174,177,178,179,180,181,182,183,185,189,190,191,192,194,195,197,198,199,201,213,214,215,216,217,218,219,221,223,226,227,228,229,230,232,233,234,235,236,237,238,239,245,246,247,256,259,260,261,272,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,297,308,319,321,322,323,324,325,327,328,329,332,333,335,336,343,344,345,346,347,349,351,356,358,359,361,362,365,],[-113,57,57,57,-112,-165,57,-111,101,57,-164,-163,-166,-167,-168,-100,-165,-101,123,129,57,57,101,57,57,57,57,57,57,57,57,57,57,57,159,-151,-152,101,57,57,57,57,-60,-62,-109,-116,101,-110,-141,101,101,101,101,101,101,101,101,101,101,101,57,57,-149,-153,-155,-157,-148,101,101,101,101,-93,-94,-95,-96,123,-40,-41,-42,-43,-44,-45,-47,-52,-53,-54,-55,123,-71,-61,-63,-64,-78,-99,-103,-104,-105,-106,-107,-108,57,57,57,101,101,57,57,-150,-154,-156,-158,57,-160,-161,-162,123,-57,-46,-58,57,-65,-75,314,-102,57,-117,57,-120,-126,-127,-128,101,57,57,101,101,57,101,-56,101,-118,101,101,57,101,57,-48,-49,-50,57,-69,-59,-77,-125,-121,-122,101,101,-51,101,-119,-159,-70,-123,-124,-76,]),'SUBSTRING':([16,34,35,36,37,54,57,86,87,90,91,92,93,94,95,96,97,98,99,100,107,108,109,110,156,157,221,223,226,229,230,236,259,278,280,286,287,290,323,325,332,],[-113,59,59,59,-112,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,]),'SUM':([16,34,35,36,37,54,57,86,87,90,91,92,93,94,95,96,97,98,99,100,107,108,109,110,156,157,221,223,226,229,230,236,259,278,280,286,287,290,323,325,332,],[-113,60,60,60,-112,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,]),'COUNT':([16,34,35,36,37,54,57,86,87,90,91,92,93,94,95,96,97,98,99,100,107,108,109,110,156,157,221,223,226,229,230,236,259,278,280,286,287,290,323,325,332,],[-113,61,61,61,-112,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,]),'AVG':([16,34,35,36,37,54,57,86,87,90,91,92,93,94,95,96,97,98,99,100,107,108,109,110,156,157,221,223,226,229,230,236,259,278,280,286,287,290,323,325,332,],[-113,62,62,62,-112,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,62,]),'ENTERO':([16,34,35,36,37,54,57,86,87,90,91,92,93,94,95,96,97,98,99,100,107,108,109,110,111,112,121,156,157,176,221,223,224,225,226,229,230,236,241,248,249,250,259,278,280,286,287,290,301,311,323,325,326,332,],[-113,64,64,64,-112,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,174,174,174,64,64,174,64,64,282,284,64,64,64,64,174,298,299,300,64,64,64,64,64,64,330,338,64,64,174,64,]),'DECIMAL_NUM':([16,34,35,36,37,54,57,86,87,90,91,92,93,94,95,96,97,98,99,100,107,108,109,110,156,157,221,223,226,229,230,236,259,278,280,286,287,290,323,325,332,],[-113,65,65,65,-112,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,]),'CADENA':([16,34,35,36,37,54,57,86,87,90,91,92,93,94,95,96,97,98,99,100,107,108,109,110,111,112,121,156,157,176,221,223,226,229,230,236,241,259,278,280,286,287,290,316,323,325,326,332,],[-113,66,66,66,-112,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,172,172,172,66,66,172,66,66,66,66,66,66,172,66,66,66,66,66,66,340,66,66,172,66,]),'SET':([24,208,],[40,272,]),'REPLACE':([29,],[45,]),'IF':([32,44,],[49,76,]),'VALUES':([39,],[70,]),'WHERE':([41,55,56,58,63,64,65,66,67,68,69,103,104,105,140,141,143,144,145,146,147,148,149,150,151,152,153,154,160,161,162,163,164,169,172,173,174,175,213,214,215,216,217,218,219,232,233,234,235,237,238,239,277,279,281,282,283,284,285,289,319,321,322,324,343,344,345,346,356,358,361,362,],[72,-111,-130,-164,-163,-166,-167,-168,-100,-165,-101,-151,-152,-137,221,-116,-110,-141,-129,-131,-132,-133,-134,-135,-136,-138,-139,-140,-149,-153,-155,-157,-148,-93,-94,-95,-96,243,221,-103,-104,-105,-106,-107,-108,-150,-154,-156,-158,-160,-161,-162,-102,-117,-120,-126,-127,-128,-142,-146,-118,-144,-143,-147,-125,-121,-122,-145,-119,-159,-123,-124,]),'RENAME':([46,],[78,]),'OWNER':([46,128,],[79,204,]),'ADD':([47,],[82,]),'EXISTS':([49,129,],[85,205,]),'MAYOR':([52,55,56,58,63,64,65,66,67,68,69,89,103,104,105,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,160,161,162,163,164,165,166,167,168,213,214,215,216,217,218,219,227,228,232,233,234,235,237,238,239,277,279,281,282,283,284,285,288,289,291,308,319,321,322,324,343,344,345,346,347,351,356,358,361,362,],[-165,-111,91,-164,-163,-166,-167,-168,-100,-165,-101,91,-151,-152,-137,-109,-116,91,-110,-141,91,None,None,None,None,91,91,91,91,91,91,-149,-153,-155,-157,-148,91,91,91,91,-99,-103,-104,-105,-106,-107,-108,91,91,-150,-154,-156,-158,-160,-161,-162,-102,-117,-120,-126,-127,-128,91,91,91,91,91,-118,91,91,91,-125,-121,-122,91,91,91,-119,-159,-123,-124,]),'MENOR':([52,55,56,58,63,64,65,66,67,68,69,89,103,104,105,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,160,161,162,163,164,165,166,167,168,213,214,215,216,217,218,219,227,228,232,233,234,235,237,238,239,277,279,281,282,283,284,285,288,289,291,308,319,321,322,324,343,344,345,346,347,351,356,358,361,362,],[-165,-111,92,-164,-163,-166,-167,-168,-100,-165,-101,92,-151,-152,-137,-109,-116,92,-110,-141,92,None,None,None,None,92,92,92,92,92,92,-149,-153,-155,-157,-148,92,92,92,92,-99,-103,-104,-105,-106,-107,-108,92,92,-150,-154,-156,-158,-160,-161,-162,-102,-117,-120,-126,-127,-128,92,92,92,92,92,-118,92,92,92,-125,-121,-122,92,92,92,-119,-159,-123,-124,]),'MAYOR_IGUAL':([52,55,56,58,63,64,65,66,67,68,69,89,103,104,105,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,160,161,162,163,164,165,166,167,168,213,214,215,216,217,218,219,227,228,232,233,234,235,237,238,239,277,279,281,282,283,284,285,288,289,291,308,319,321,322,324,343,344,345,346,347,351,356,358,361,362,],[-165,-111,93,-164,-163,-166,-167,-168,-100,-165,-101,93,-151,-152,-137,-109,-116,93,-110,-141,93,None,None,None,None,93,93,93,93,93,93,-149,-153,-155,-157,-148,93,93,93,93,-99,-103,-104,-105,-106,-107,-108,93,93,-150,-154,-156,-158,-160,-161,-162,-102,-117,-120,-126,-127,-128,93,93,93,93,93,-118,93,93,93,-125,-121,-122,93,93,93,-119,-159,-123,-124,]),'MENOR_IGUAL':([52,55,56,58,63,64,65,66,67,68,69,89,103,104,105,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,160,161,162,163,164,165,166,167,168,213,214,215,216,217,218,219,227,228,232,233,234,235,237,238,239,277,279,281,282,283,284,285,288,289,291,308,319,321,322,324,343,344,345,346,347,351,356,358,361,362,],[-165,-111,94,-164,-163,-166,-167,-168,-100,-165,-101,94,-151,-152,-137,-109,-116,94,-110,-141,94,None,None,None,None,94,94,94,94,94,94,-149,-153,-155,-157,-148,94,94,94,94,-99,-103,-104,-105,-106,-107,-108,94,94,-150,-154,-156,-158,-160,-161,-162,-102,-117,-120,-126,-127,-128,94,94,94,94,94,-118,94,94,94,-125,-121,-122,94,94,94,-119,-159,-123,-124,]),'AND':([52,55,56,58,63,64,65,66,67,68,69,89,103,104,105,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,160,161,162,163,164,165,166,167,168,213,214,215,216,217,218,219,227,228,232,233,234,235,237,238,239,277,279,281,282,283,284,285,288,289,291,308,319,321,322,324,343,344,345,346,347,351,356,358,361,362,],[-165,-111,95,-164,-163,-166,-167,-168,-100,-165,-101,95,-151,-152,-137,-109,-116,95,-110,-141,95,-131,-132,-133,-134,-135,95,95,-139,95,226,-149,-153,-155,-157,-148,95,95,95,95,-99,-103,-104,-105,-106,-107,-108,286,287,-150,-154,-156,-158,-160,-161,-162,-102,-117,-120,-126,-127,-128,-135,323,95,95,95,-118,-135,-135,95,-125,-121,-122,-135,95,95,-119,-159,-123,-124,]),'IGUAL':([52,55,56,58,63,64,65,66,67,68,69,71,89,103,104,105,113,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,160,161,162,163,164,165,166,167,168,204,213,214,215,216,217,218,219,227,228,232,233,234,235,237,238,239,265,277,279,281,282,283,284,285,288,289,291,295,308,319,321,322,324,343,344,345,346,347,351,356,358,361,362,],[-165,-111,97,-164,-163,-166,-167,-168,-100,-165,-101,112,97,-151,-152,-137,176,-109,-116,97,-110,-141,97,-131,-132,-133,-134,-135,-136,97,-139,97,97,-149,-153,-155,-157,-148,97,97,97,97,266,-99,-103,-104,-105,-106,-107,-108,97,97,-150,-154,-156,-158,-160,-161,-162,311,-102,-117,-120,-126,-127,-128,-135,97,97,97,326,97,-118,-135,-135,97,-125,-121,-122,-135,97,97,-119,-159,-123,-124,]),'NO_IGUAL':([52,55,56,58,63,64,65,66,67,68,69,89,103,104,105,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,160,161,162,163,164,165,166,167,168,213,214,215,216,217,218,219,227,228,232,233,234,235,237,238,239,277,279,281,282,283,284,285,288,289,291,308,319,321,322,324,343,344,345,346,347,351,356,358,361,362,],[-165,-111,98,-164,-163,-166,-167,-168,-100,-165,-101,98,-151,-152,-137,-109,-116,98,-110,-141,98,-131,-132,-133,-134,98,98,98,-139,98,98,-149,-153,-155,-157,-148,98,98,98,98,-99,-103,-104,-105,-106,-107,-108,98,98,-150,-154,-156,-158,-160,-161,-162,-102,-117,-120,-126,-127,-128,98,98,98,98,98,-118,98,98,98,-125,-121,-122,98,98,98,-119,-159,-123,-124,]),'DIFERENTE':([52,55,56,58,63,64,65,66,67,68,69,89,103,104,105,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,160,161,162,163,164,165,166,167,168,213,214,215,216,217,218,219,227,228,232,233,234,235,237,238,239,274,277,279,281,282,283,284,285,288,289,291,308,319,321,322,324,343,344,345,346,347,351,356,358,361,362,],[-165,-111,99,-164,-163,-166,-167,-168,-100,-165,-101,99,-151,-152,-137,-109,-116,99,-110,-141,99,-131,-132,-133,-134,-135,-136,-138,-139,99,99,-149,-153,-155,-157,-148,99,99,99,99,-99,-103,-104,-105,-106,-107,-108,99,99,-150,-154,-156,-158,-160,-161,-162,316,-102,-117,-120,-126,-127,-128,-135,99,99,99,99,-118,-135,-135,99,-125,-121,-122,-135,99,99,-119,-159,-123,-124,]),'BETWEEN':([52,55,56,58,63,64,65,66,67,68,69,89,101,103,104,105,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,160,161,162,163,164,165,166,167,168,213,214,215,216,217,218,219,227,228,232,233,234,235,237,238,239,277,279,281,282,283,284,285,288,289,291,308,319,321,322,324,343,344,345,346,347,351,356,358,361,362,],[-165,-111,100,-164,-163,-166,-167,-168,-100,-165,-101,100,157,-151,-152,-137,-109,-116,100,-110,-141,100,-131,-132,-133,-134,-135,-136,-138,-139,100,100,-149,-153,-155,-157,-148,100,100,100,100,-99,-103,-104,-105,-106,-107,-108,100,100,-150,-154,-156,-158,-160,-161,-162,-102,-117,-120,-126,-127,-128,-135,100,100,100,100,-118,-135,-135,100,-125,-121,-122,-135,100,100,-119,-159,-123,-124,]),'IS':([52,55,56,58,63,64,65,66,67,68,69,89,103,104,105,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,160,161,162,163,164,165,166,167,168,213,214,215,216,217,218,219,227,228,232,233,234,235,237,238,239,277,279,281,282,283,284,285,288,289,291,308,319,321,322,324,343,344,345,346,347,351,356,358,361,362,],[-165,-111,102,-164,-163,-166,-167,-168,-100,-165,-101,102,-151,-152,-137,-109,-116,102,-110,-141,102,-131,-132,-133,-134,-135,-136,-138,-139,102,102,-149,-153,-155,-157,-148,102,102,102,102,-99,-103,-104,-105,-106,-107,-108,102,102,-150,-154,-156,-158,-160,-161,-162,-102,-117,-120,-126,-127,-128,-135,102,102,102,102,-118,-135,-135,102,-125,-121,-122,-135,102,102,-119,-159,-123,-124,]),'ISNULL':([52,55,56,58,63,64,65,66,67,68,69,89,103,104,105,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,160,161,162,163,164,165,166,167,168,213,214,215,216,217,218,219,227,228,232,233,234,235,237,238,239,277,279,281,282,283,284,285,288,289,291,308,319,321,322,324,343,344,345,346,347,351,356,358,361,362,],[-165,-111,103,-164,-163,-166,-167,-168,-100,-165,-101,103,-151,-152,-137,-109,-116,103,-110,-141,103,-131,-132,-133,-134,-135,-136,-138,-139,103,103,-149,-153,-155,-157,-148,103,103,103,103,-99,-103,-104,-105,-106,-107,-108,103,103,-150,-154,-156,-158,-160,-161,-162,-102,-117,-120,-126,-127,-128,-135,103,103,103,103,-118,-135,-135,103,-125,-121,-122,-135,103,103,-119,-159,-123,-124,]),'NOTNULL':([52,55,56,58,63,64,65,66,67,68,69,89,103,104,105,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,160,161,162,163,164,165,166,167,168,213,214,215,216,217,218,219,227,228,232,233,234,235,237,238,239,277,279,281,282,283,284,285,288,289,291,308,319,321,322,324,343,344,345,346,347,351,356,358,361,362,],[-165,-111,104,-164,-163,-166,-167,-168,-100,-165,-101,104,-151,-152,-137,-109,-116,104,-110,-141,104,-131,-132,-133,-134,-135,-136,-138,-139,104,104,-149,-153,-155,-157,-148,104,104,104,104,-99,-103,-104,-105,-106,-107,-108,104,104,-150,-154,-156,-158,-160,-161,-162,-102,-117,-120,-126,-127,-128,-135,104,104,104,104,-118,-135,-135,104,-125,-121,-122,-135,104,104,-119,-159,-123,-124,]),'COMA':([52,55,56,58,63,64,65,66,67,68,69,74,88,89,103,104,105,115,116,117,118,120,122,140,141,143,144,145,146,147,148,149,150,151,152,153,154,160,161,162,163,164,165,169,170,171,172,173,174,177,178,179,180,181,182,183,185,189,190,191,192,194,195,197,198,199,201,213,214,215,216,217,218,219,232,233,234,235,237,238,239,245,246,247,254,256,260,261,277,279,281,282,283,284,285,289,291,293,297,304,305,306,309,310,318,319,321,322,324,327,328,329,333,335,336,343,344,345,346,349,352,356,358,359,361,362,364,365,],[-165,90,-130,-164,-163,-166,-167,-168,-100,-165,-101,-66,90,-130,-151,-152,-137,194,-35,-36,-37,-60,-62,-109,-116,-110,-141,-129,-131,-132,-133,-134,-135,-136,-138,-139,-140,-149,-153,-155,-157,-148,236,-93,241,-92,-94,-95,-96,-39,-40,-41,-42,-43,-44,-45,-47,-52,-53,-54,-55,-66,-71,-61,-63,-64,-78,-99,-103,-104,-105,-106,-107,-108,-150,-154,-156,-158,-160,-161,-162,-38,-57,-46,-34,-58,-65,-75,-102,-117,-120,-126,-127,-128,-142,-146,325,-91,-56,334,-73,-74,334,334,334,-118,-144,-143,-147,-48,-49,-50,-69,-59,-77,-125,-121,-122,-145,-51,-72,-119,-159,-70,-123,-124,334,-76,]),'PAR_CIERRA':([55,56,58,63,64,65,66,67,68,69,74,88,89,103,104,105,115,116,117,118,120,122,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,160,161,162,163,164,166,167,168,169,170,171,172,173,174,177,178,179,180,181,182,183,185,189,190,191,192,194,195,197,198,199,201,213,214,215,216,217,218,219,232,233,234,235,237,238,239,245,246,247,254,256,260,261,277,279,281,282,283,284,285,289,293,297,298,299,300,304,305,306,308,309,310,318,319,321,322,324,327,328,329,330,331,333,335,336,340,341,343,344,345,346,347,349,351,352,356,358,359,361,362,364,365,],[-111,-130,-164,-163,-166,-167,-168,-100,-165,-101,-66,143,144,-151,-152,-137,193,-35,-36,-37,-60,-62,-109,-116,144,-110,-141,-129,-131,-132,-133,-134,-135,-136,-138,-139,-140,-149,-153,-155,-157,-148,237,238,239,-93,240,-92,-94,-95,-96,-39,-40,-41,-42,-43,-44,-45,-47,-52,-53,-54,-55,-66,-71,-61,-63,-64,-78,-99,-103,-104,-105,-106,-107,-108,-150,-154,-156,-158,-160,-161,-162,-38,-57,-46,-34,-58,-65,-75,-102,-117,-120,-126,-127,-128,-142,-146,-91,-56,327,328,329,333,-73,-74,335,336,337,342,-118,-144,-143,-147,-48,-49,-50,349,350,-69,-59,-77,354,355,-125,-121,-122,-145,358,-51,359,-72,-119,-159,-70,-123,-124,365,-76,]),'GROUP':([55,56,58,63,64,65,66,67,68,69,103,104,105,140,141,143,144,145,146,147,148,149,150,151,152,153,154,160,161,162,163,164,213,214,215,216,217,218,219,232,233,234,235,237,238,239,277,279,281,282,283,284,285,289,319,321,322,324,343,344,345,346,356,358,361,362,],[-111,-130,-164,-163,-166,-167,-168,-100,-165,-101,-151,-152,-137,220,-116,-110,-141,-129,-131,-132,-133,-134,-135,-136,-138,-139,-140,-149,-153,-155,-157,-148,220,-103,-104,-105,-106,-107,-108,-150,-154,-156,-158,-160,-161,-162,-102,-117,-120,-126,-127,-128,-142,-146,-118,-144,-143,-147,-125,-121,-122,-145,-119,-159,-123,-124,]),'ORDER':([55,56,58,63,64,65,66,67,68,69,103,104,105,140,141,143,144,145,146,147,148,149,150,151,152,153,154,160,161,162,163,164,213,214,215,216,217,218,219,232,233,234,235,237,238,239,277,279,281,282,283,284,285,289,319,321,322,324,343,344,345,346,356,358,361,362,],[-111,-130,-164,-163,-166,-167,-168,-100,-165,-101,-151,-152,-137,222,-116,-110,-141,-129,-131,-132,-133,-134,-135,-136,-138,-139,-140,-149,-153,-155,-157,-148,222,-103,-104,-105,-106,-107,-108,-150,-154,-156,-158,-160,-161,-162,-102,-117,-120,-126,-127,-128,-142,-146,-118,-144,-143,-147,-125,-121,-122,-145,-119,-159,-123,-124,]),'HAVING':([55,56,58,63,64,65,66,67,68,69,103,104,105,140,141,143,144,145,146,147,148,149,150,151,152,153,154,160,161,162,163,164,213,214,215,216,217,218,219,232,233,234,235,237,238,239,277,279,281,282,283,284,285,289,319,321,322,324,343,344,345,346,356,358,361,362,],[-111,-130,-164,-163,-166,-167,-168,-100,-165,-101,-151,-152,-137,223,-116,-110,-141,-129,-131,-132,-133,-134,-135,-136,-138,-139,-140,-149,-153,-155,-157,-148,223,-103,-104,-105,-106,-107,-108,-150,-154,-156,-158,-160,-161,-162,-102,-117,-120,-126,-127,-128,-142,-146,-118,-144,-143,-147,-125,-121,-122,-145,-119,-159,-123,-124,]),'LIMIT':([55,56,58,63,64,65,66,67,68,69,103,104,105,140,141,143,144,145,146,147,148,149,150,151,152,153,154,160,161,162,163,164,213,214,215,216,217,218,219,232,233,234,235,237,238,239,277,279,281,282,283,284,285,289,319,321,322,324,343,344,345,346,356,358,361,362,],[-111,-130,-164,-163,-166,-167,-168,-100,-165,-101,-151,-152,-137,224,-116,-110,-141,-129,-131,-132,-133,-134,-135,-136,-138,-139,-140,-149,-153,-155,-157,-148,224,-103,-104,-105,-106,-107,-108,-150,-154,-156,-158,-160,-161,-162,-102,-117,-120,-126,-127,-128,-142,-146,-118,-144,-143,-147,-125,-121,-122,-145,-119,-159,-123,-124,]),'OFFSET':([55,56,58,63,64,65,66,67,68,69,103,104,105,140,141,143,144,145,146,147,148,149,150,151,152,153,154,160,161,162,163,164,213,214,215,216,217,218,219,232,233,234,235,237,238,239,277,279,281,282,283,284,285,289,319,321,322,324,343,344,345,346,356,358,361,362,],[-111,-130,-164,-163,-166,-167,-168,-100,-165,-101,-151,-152,-137,225,-116,-110,-141,-129,-131,-132,-133,-134,-135,-136,-138,-139,-140,-149,-153,-155,-157,-148,225,-103,-104,-105,-106,-107,-108,-150,-154,-156,-158,-160,-161,-162,-102,-117,-120,-126,-127,-128,-142,-146,-118,-144,-143,-147,-125,-121,-122,-145,-119,-159,-123,-124,]),'ASC':([55,56,58,63,64,65,66,67,68,69,103,104,105,140,141,143,144,145,146,147,148,149,150,151,152,153,154,160,161,162,163,164,213,214,215,216,217,218,219,232,233,234,235,237,238,239,277,279,281,282,283,284,285,289,319,320,321,322,324,343,344,345,346,356,358,361,362,],[-111,-130,-164,-163,-166,-167,-168,-100,-165,-101,-151,-152,-137,-109,-116,-110,-141,-129,-131,-132,-133,-134,-135,-136,-138,-139,-140,-149,-153,-155,-157,-148,-99,-103,-104,-105,-106,-107,-108,-150,-154,-156,-158,-160,-161,-162,-102,-117,-120,-126,-127,-128,-142,-146,-118,344,-144,-143,-147,-125,-121,-122,-145,-119,-159,-123,-124,]),'DESC':([55,56,58,63,64,65,66,67,68,69,103,104,105,140,141,143,144,145,146,147,148,149,150,151,152,153,154,160,161,162,163,164,213,214,215,216,217,218,219,232,233,234,235,237,238,239,277,279,281,282,283,284,285,289,319,320,321,322,324,343,344,345,346,356,358,361,362,],[-111,-130,-164,-163,-166,-167,-168,-100,-165,-101,-151,-152,-137,-109,-116,-110,-141,-129,-131,-132,-133,-134,-135,-136,-138,-139,-140,-149,-153,-155,-157,-148,-99,-103,-104,-105,-106,-107,-108,-150,-154,-156,-158,-160,-161,-162,-102,-117,-120,-126,-127,-128,-142,-146,-118,345,-144,-143,-147,-125,-121,-122,-145,-119,-159,-123,-124,]),'PUNTO':([58,],[106,]),'DEFAULT':([74,120,122,169,172,173,174,177,178,179,180,181,182,183,185,189,190,191,192,194,195,197,198,199,201,245,246,247,256,260,261,297,327,328,329,333,335,336,349,359,365,],[121,-60,-62,-93,-94,-95,-96,121,-40,-41,-42,-43,-44,-45,-47,-52,-53,-54,-55,121,-71,-61,-63,-64,-78,121,-57,-46,-58,-65,-75,-56,-48,-49,-50,-69,-59,-77,-51,-70,-76,]),'NULL':([74,102,120,122,123,159,169,172,173,174,177,178,179,180,181,182,183,185,189,190,191,192,194,195,197,198,199,201,245,246,247,256,260,261,297,314,327,328,329,333,335,336,349,359,365,],[122,160,-60,-62,198,232,-93,-94,-95,-96,122,-40,-41,-42,-43,-44,-45,-47,-52,-53,-54,-55,122,-71,-61,-63,-64,-78,122,-57,-46,-58,-65,-75,-56,339,-48,-49,-50,-69,-59,-77,-51,-70,-76,]),'REFERENCE':([74,120,122,169,172,173,174,177,178,179,180,181,182,183,185,189,190,191,192,194,195,197,198,199,201,245,246,247,256,260,261,297,327,328,329,333,335,336,349,359,365,],[124,-60,-62,-93,-94,-95,-96,124,-40,-41,-42,-43,-44,-45,-47,-52,-53,-54,-55,124,-71,-61,-63,-64,-78,124,-57,-46,-58,-65,-75,-56,-48,-49,-50,-69,-59,-77,-51,-70,-76,]),'CONSTRAINT':([74,82,83,120,122,169,172,173,174,177,178,179,180,181,182,183,185,189,190,191,192,194,195,197,198,199,201,245,246,247,256,260,261,297,327,328,329,333,335,336,349,359,365,],[125,135,138,-60,-62,-93,-94,-95,-96,125,-40,-41,-42,-43,-44,-45,-47,-52,-53,-54,-55,125,258,-61,-63,-64,-78,125,-57,-46,-58,-65,-75,-56,-48,-49,-50,-69,-59,-77,-51,-70,-76,]),'UNIQUE':([74,119,120,122,169,172,173,174,177,178,179,180,181,182,183,185,189,190,191,192,194,195,197,198,199,200,201,210,245,246,247,256,260,261,297,327,328,329,333,335,336,349,359,365,],[-68,195,-60,-62,-93,-94,-95,-96,-66,-40,-41,-42,-43,-44,-45,-47,-52,-53,-54,-55,-68,-71,-61,-63,-64,-67,-78,275,-66,-57,-46,-58,-65,-75,-56,-48,-49,-50,-69,-59,-77,-51,-70,-76,]),'CHECK':([74,82,119,120,122,169,172,173,174,177,178,179,180,181,182,183,185,189,190,191,192,194,195,197,198,199,200,201,245,246,247,255,256,260,261,297,307,327,328,329,333,335,336,349,359,365,],[-68,134,196,-60,-62,-93,-94,-95,-96,-66,-40,-41,-42,-43,-44,-45,-47,-52,-53,-54,-55,-68,-68,-61,-63,-64,-67,-78,-66,-57,-46,303,-58,-65,-75,-56,-67,-48,-49,-50,-69,-59,-77,-51,-70,-76,]),'PRIMARY':([74,82,120,122,169,172,173,174,177,178,179,180,181,182,183,185,189,190,191,192,194,195,197,198,199,200,201,245,246,247,256,260,261,297,327,328,329,333,335,336,349,359,365,],[126,126,-60,-62,-93,-94,-95,-96,126,-40,-41,-42,-43,-44,-45,-47,-52,-53,-54,-55,126,-71,-61,-63,-64,126,-78,126,-57,-46,-58,-65,-75,-56,-48,-49,-50,-69,-59,-77,-51,-70,-76,]),'FOREIGN':([74,82,120,122,169,172,173,174,177,178,179,180,181,182,183,185,189,190,191,192,194,195,197,198,199,200,201,245,246,247,256,260,261,297,327,328,329,333,335,336,349,359,365,],[127,127,-60,-62,-93,-94,-95,-96,127,-40,-41,-42,-43,-44,-45,-47,-52,-53,-54,-55,127,-71,-61,-63,-64,127,-78,127,-57,-46,-58,-65,-75,-56,-48,-49,-50,-69,-59,-77,-51,-70,-76,]),'TO':([78,79,],[130,131,]),'COLUMN':([80,83,],[132,139,]),'SYMMETRIC':([100,157,],[156,229,]),'TRUE':([102,159,],[161,233,]),'FALSE':([102,159,],[162,234,]),'UNKNOWN':([102,159,],[163,235,]),'DECIMAL':([111,112,114,121,176,241,273,326,],[173,173,181,173,173,173,181,173,]),'SMALLINT':([114,273,],[178,178,]),'INTEGER':([114,273,],[179,179,]),'BIGINT':([114,273,],[180,180,]),'NUMERIC':([114,273,],[182,182,]),'REAL':([114,273,],[183,183,]),'DOUBLE':([114,273,],[184,184,]),'MONEY':([114,273,],[185,185,]),'VARCHAR':([114,273,],[186,186,]),'CHAR':([114,273,],[187,187,]),'CHARACTER':([114,273,],[188,188,]),'TEXT':([114,273,],[189,189,]),'DATE':([114,273,],[190,190,]),'TIMESTAMP':([114,273,],[191,191,]),'TIME':([114,273,],[192,192,]),'KEY':([126,127,],[201,202,]),'MODE':([128,203,312,],[-20,265,-19,]),'LLAVE_ABRE':([131,],[207,]),'REFERENCES':([136,201,261,336,337,365,],[211,-78,-75,-77,353,-76,]),'PRECISION':([184,],[247,]),'VARYING':([188,],[251,]),'INHERITS':([193,],[253,]),'CURRENT_USER':([207,],[269,]),'SESSION_USER':([207,],[270,]),'TYPE':([208,],[273,]),'BY':([220,222,],[278,280,]),'ALL':([224,],[283,]),'LLAVE_CIERRA':([267,268,269,270,],[313,-27,-28,-29,]),'NULLS':([343,344,345,],[357,-121,-122,]),'LAST':([357,],[361,]),'FIRST':([357,],[362,]),}
_lr_action = {}
for _k, _v in _lr_action_items.items():
for _x,_y in zip(_v[0],_v[1]):
if not _x in _lr_action: _lr_action[_x] = {}
_lr_action[_x][_k] = _y
del _lr_action_items
_lr_goto_items = {'init':([0,],[1,]),'instrucciones':([0,],[2,]),'instruccion':([0,2,],[3,17,]),'crear_statement':([0,2,],[4,4,]),'alter_statement':([0,2,],[5,5,]),'drop_statement':([0,2,],[6,6,]),'seleccionar':([0,2,34,35,36,54,57,86,87,90,91,92,93,94,95,96,97,98,99,100,107,108,109,110,156,157,221,223,226,229,230,236,259,278,280,286,287,290,323,325,332,],[7,7,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,63,]),'or_replace':([13,],[28,]),'distinto':([16,],[34,]),'if_exists':([32,],[48,]),'select_list':([34,],[51,]),'expressiones':([34,35,36,86,221,223,278,280,],[53,67,69,141,279,281,319,320,]),'list_expression':([34,35,36,54,86,221,223,278,280,],[55,55,55,88,55,55,55,55,55,]),'expression':([34,35,36,54,57,86,87,90,91,92,93,94,95,96,97,98,99,100,107,108,109,110,156,157,221,223,226,229,230,236,259,278,280,286,287,290,323,325,332,],[56,56,56,89,105,56,142,145,146,147,148,149,150,151,152,153,154,155,165,166,167,168,227,228,56,56,285,288,289,291,308,56,56,321,322,324,346,347,351,]),'if_not_exists':([44,],[75,]),'rename_owner':([46,],[77,]),'alter_op':([47,],[81,]),'contenido_tabla':([74,],[115,]),'manejo_tabla':([74,194,],[116,254,]),'declaracion_columna':([74,194,],[117,117,]),'condition_column':([74,177,194,245,],[118,246,118,297,]),'constraint':([74,177,194,195,245,],[119,119,119,255,119,]),'key_table':([74,82,177,194,200,245,],[120,136,120,120,260,120,]),'op_add':([82,],[133,]),'alter_drop':([83,],[137,]),'table_expression':([86,],[140,]),'list_val':([111,],[170,]),'op_val':([111,112,121,176,241,326,],[171,175,197,244,293,348,]),'type_column':([114,273,],[177,315,]),'owner_':([128,],[203,]),'list_fin_select':([140,],[213,]),'fin_select':([140,213,],[214,277,]),'group_by':([140,213,],[215,215,]),'donde':([140,213,],[216,216,]),'order_by':([140,213,],[217,217,]),'group_having':([140,213,],[218,218,]),'limite':([140,213,],[219,219,]),'where':([175,],[242,]),'condition_column_row':([177,],[245,]),'inherits_statement':([193,],[252,]),'op_unique':([195,],[256,]),'list_key':([201,],[261,]),'mode_':([203,],[264,]),'ow_op':([207,],[267,]),'alter_col_op':([208,],[271,]),'list_id':([257,262,263,276,363,],[304,309,310,318,364,]),'alias':([257,262,263,276,334,363,],[305,305,305,305,352,305,]),'asc_desc':([320,],[343,]),'nulls_f_l':([343,],[356,]),}
_lr_goto = {}
for _k, _v in _lr_goto_items.items():
for _x, _y in zip(_v[0], _v[1]):
if not _x in _lr_goto: _lr_goto[_x] = {}
_lr_goto[_x][_k] = _y
del _lr_goto_items
_lr_productions = [
("S' -> init","S'",1,None,None,None),
('init -> instrucciones','init',1,'p_init','sql_grammar.py',295),
('instrucciones -> instrucciones instruccion','instrucciones',2,'p_instrucciones_lista','sql_grammar.py',299),
('instrucciones -> instruccion','instrucciones',1,'p_instrucciones_instruccion','sql_grammar.py',304),
('instruccion -> crear_statement PUNTOCOMA','instruccion',2,'p_instruccion','sql_grammar.py',308),
('instruccion -> alter_statement PUNTOCOMA','instruccion',2,'p_instruccion','sql_grammar.py',309),
('instruccion -> drop_statement PUNTOCOMA','instruccion',2,'p_instruccion','sql_grammar.py',310),
('instruccion -> seleccionar PUNTOCOMA','instruccion',2,'p_instruccion','sql_grammar.py',311),
('instruccion -> SHOW DATABASES PUNTOCOMA','instruccion',3,'p_aux_instruccion','sql_grammar.py',315),
('instruccion -> INSERT INTO ID VALUES PAR_ABRE list_val PAR_CIERRA PUNTOCOMA','instruccion',8,'p_aux_instruccion','sql_grammar.py',316),
('instruccion -> UPDATE ID SET ID IGUAL op_val where PUNTOCOMA','instruccion',8,'p_aux_instruccion','sql_grammar.py',317),
('instruccion -> DELETE FROM ID WHERE ID IGUAL op_val PUNTOCOMA','instruccion',8,'p_aux_instruccion','sql_grammar.py',318),
('instruccion -> USE DATABASE ID PUNTOCOMA','instruccion',4,'p_aux_instruccion','sql_grammar.py',319),
('crear_statement -> CREATE TABLE ID PAR_ABRE contenido_tabla PAR_CIERRA inherits_statement','crear_statement',7,'p_crear_statement_tbl','sql_grammar.py',338),
('crear_statement -> CREATE or_replace DATABASE if_not_exists ID owner_ mode_','crear_statement',7,'p_crear_statement_db','sql_grammar.py',344),
('or_replace -> OR REPLACE','or_replace',2,'p_or_replace_db','sql_grammar.py',350),
('or_replace -> <empty>','or_replace',0,'p_or_replace_db','sql_grammar.py',351),
('if_not_exists -> IF NOT EXISTS','if_not_exists',3,'p_if_not_exists_db','sql_grammar.py',359),
('if_not_exists -> <empty>','if_not_exists',0,'p_if_not_exists_db','sql_grammar.py',360),
('owner_ -> OWNER IGUAL ID','owner_',3,'p_owner_db','sql_grammar.py',368),
('owner_ -> <empty>','owner_',0,'p_owner_db','sql_grammar.py',369),
('mode_ -> MODE IGUAL ENTERO','mode_',3,'p_mode_db','sql_grammar.py',379),
('mode_ -> <empty>','mode_',0,'p_mode_db','sql_grammar.py',380),
('alter_statement -> ALTER DATABASE ID rename_owner','alter_statement',4,'p_alter_db','sql_grammar.py',390),
('alter_statement -> ALTER TABLE ID alter_op','alter_statement',4,'p_alter_tbl','sql_grammar.py',396),
('rename_owner -> RENAME TO ID','rename_owner',3,'p_rename_owner_db','sql_grammar.py',403),
('rename_owner -> OWNER TO LLAVE_ABRE ow_op LLAVE_CIERRA','rename_owner',5,'p_rename_owner_db','sql_grammar.py',404),
('ow_op -> ID','ow_op',1,'p_ow_op_db','sql_grammar.py',414),
('ow_op -> CURRENT_USER','ow_op',1,'p_ow_op_db','sql_grammar.py',415),
('ow_op -> SESSION_USER','ow_op',1,'p_ow_op_db','sql_grammar.py',416),
('drop_statement -> DROP DATABASE if_exists ID','drop_statement',4,'p_drop_db','sql_grammar.py',420),
('drop_statement -> DROP TABLE ID','drop_statement',3,'p_drop_tbl','sql_grammar.py',430),
('if_exists -> IF EXISTS','if_exists',2,'p_if_exists_db','sql_grammar.py',436),
('if_exists -> <empty>','if_exists',0,'p_if_exists_db','sql_grammar.py',437),
('contenido_tabla -> contenido_tabla COMA manejo_tabla','contenido_tabla',3,'p_contenido_tabla','sql_grammar.py',444),
('contenido_tabla -> manejo_tabla','contenido_tabla',1,'p_aux_contenido_table','sql_grammar.py',449),
('manejo_tabla -> declaracion_columna','manejo_tabla',1,'p_manejo_tabla','sql_grammar.py',453),
('manejo_tabla -> condition_column','manejo_tabla',1,'p_manejo_tabla','sql_grammar.py',454),
('declaracion_columna -> ID type_column condition_column_row','declaracion_columna',3,'p_aux_declaracion_columna','sql_grammar.py',458),
('declaracion_columna -> ID type_column','declaracion_columna',2,'p_declaracion_columna','sql_grammar.py',464),
('type_column -> SMALLINT','type_column',1,'p_type_column','sql_grammar.py',470),
('type_column -> INTEGER','type_column',1,'p_type_column','sql_grammar.py',471),
('type_column -> BIGINT','type_column',1,'p_type_column','sql_grammar.py',472),
('type_column -> DECIMAL','type_column',1,'p_type_column','sql_grammar.py',473),
('type_column -> NUMERIC','type_column',1,'p_type_column','sql_grammar.py',474),
('type_column -> REAL','type_column',1,'p_type_column','sql_grammar.py',475),
('type_column -> DOUBLE PRECISION','type_column',2,'p_type_column','sql_grammar.py',476),
('type_column -> MONEY','type_column',1,'p_type_column','sql_grammar.py',477),
('type_column -> VARCHAR PAR_ABRE ENTERO PAR_CIERRA','type_column',4,'p_type_column','sql_grammar.py',478),
('type_column -> CHAR PAR_ABRE ENTERO PAR_CIERRA','type_column',4,'p_type_column','sql_grammar.py',479),
('type_column -> CHARACTER PAR_ABRE ENTERO PAR_CIERRA','type_column',4,'p_type_column','sql_grammar.py',480),
('type_column -> CHARACTER VARYING PAR_ABRE ENTERO PAR_CIERRA','type_column',5,'p_type_column','sql_grammar.py',481),
('type_column -> TEXT','type_column',1,'p_type_column','sql_grammar.py',482),
('type_column -> DATE','type_column',1,'p_type_column','sql_grammar.py',483),
('type_column -> TIMESTAMP','type_column',1,'p_type_column','sql_grammar.py',484),
('type_column -> TIME','type_column',1,'p_type_column','sql_grammar.py',485),
('condition_column_row -> condition_column_row condition_column','condition_column_row',2,'p_condition_column_row','sql_grammar.py',519),
('condition_column_row -> condition_column','condition_column_row',1,'p_aux_condition_column_row','sql_grammar.py',524),
('condition_column -> constraint UNIQUE op_unique','condition_column',3,'p_condition_column','sql_grammar.py',528),
('condition_column -> constraint CHECK PAR_ABRE expression PAR_CIERRA','condition_column',5,'p_condition_column','sql_grammar.py',529),
('condition_column -> key_table','condition_column',1,'p_condition_column','sql_grammar.py',530),
('condition_column -> DEFAULT op_val','condition_column',2,'p_aux_condition_column','sql_grammar.py',546),
('condition_column -> NULL','condition_column',1,'p_aux_condition_column','sql_grammar.py',547),
('condition_column -> NOT NULL','condition_column',2,'p_aux_condition_column','sql_grammar.py',548),
('condition_column -> REFERENCE ID','condition_column',2,'p_aux_condition_column','sql_grammar.py',549),
('condition_column -> CONSTRAINT ID key_table','condition_column',3,'p_aux_condition_column','sql_grammar.py',550),
('condition_column -> <empty>','condition_column',0,'p_aux_condition_column','sql_grammar.py',551),
('constraint -> CONSTRAINT ID','constraint',2,'p_constraint','sql_grammar.py',575),
('constraint -> <empty>','constraint',0,'p_constraint','sql_grammar.py',576),
('op_unique -> PAR_ABRE list_id PAR_CIERRA','op_unique',3,'p_op_unique','sql_grammar.py',588),
('op_unique -> constraint CHECK PAR_ABRE expression PAR_CIERRA','op_unique',5,'p_op_unique','sql_grammar.py',589),
('op_unique -> <empty>','op_unique',0,'p_op_unique','sql_grammar.py',590),
('list_id -> list_id COMA alias','list_id',3,'p_list_id','sql_grammar.py',604),
('list_id -> alias','list_id',1,'p_aux_list_id','sql_grammar.py',609),
('alias -> ID','alias',1,'p_alias','sql_grammar.py',613),
('key_table -> PRIMARY KEY list_key','key_table',3,'p_key_table','sql_grammar.py',619),
('key_table -> FOREIGN KEY PAR_ABRE list_id PAR_CIERRA REFERENCES ID PAR_ABRE list_id PAR_CIERRA','key_table',10,'p_key_table','sql_grammar.py',620),
('list_key -> PAR_ABRE list_id PAR_CIERRA','list_key',3,'p_list_key','sql_grammar.py',633),
('list_key -> <empty>','list_key',0,'p_list_key','sql_grammar.py',634),
('alter_op -> ADD op_add','alter_op',2,'p_alter_op','sql_grammar.py',641),
('alter_op -> ALTER COLUMN ID alter_col_op','alter_op',4,'p_alter_op','sql_grammar.py',642),
('alter_op -> DROP alter_drop ID','alter_op',3,'p_alter_op','sql_grammar.py',643),
('alter_drop -> CONSTRAINT','alter_drop',1,'p_aux_alter_op','sql_grammar.py',660),
('alter_drop -> COLUMN','alter_drop',1,'p_aux_alter_op','sql_grammar.py',661),
('op_add -> CHECK PAR_ABRE ID DIFERENTE CADENA PAR_CIERRA','op_add',6,'p_op_add','sql_grammar.py',666),
('op_add -> CONSTRAINT ID UNIQUE PAR_ABRE ID PAR_CIERRA','op_add',6,'p_op_add','sql_grammar.py',667),
('op_add -> key_table REFERENCES PAR_ABRE list_id PAR_CIERRA','op_add',5,'p_op_add','sql_grammar.py',668),
('alter_col_op -> SET NOT NULL','alter_col_op',3,'p_alter_col_op','sql_grammar.py',685),
('alter_col_op -> TYPE type_column','alter_col_op',2,'p_alter_col_op','sql_grammar.py',686),
('inherits_statement -> INHERITS PAR_ABRE ID PAR_CIERRA','inherits_statement',4,'p_inherits_tbl','sql_grammar.py',699),
('inherits_statement -> <empty>','inherits_statement',0,'p_inherits_tbl','sql_grammar.py',700),
('list_val -> list_val COMA op_val','list_val',3,'p_list_val','sql_grammar.py',709),
('list_val -> op_val','list_val',1,'p_aux_list_val','sql_grammar.py',714),
('op_val -> ID','op_val',1,'p_op_val','sql_grammar.py',718),
('op_val -> CADENA','op_val',1,'p_op_val','sql_grammar.py',719),
('op_val -> DECIMAL','op_val',1,'p_op_val','sql_grammar.py',720),
('op_val -> ENTERO','op_val',1,'p_op_val','sql_grammar.py',721),
('where -> WHERE ID IGUAL op_val','where',4,'p_where','sql_grammar.py',725),
('where -> <empty>','where',0,'p_where','sql_grammar.py',726),
('seleccionar -> SELECT distinto select_list FROM table_expression list_fin_select','seleccionar',6,'p_seleccionar','sql_grammar.py',736),
('seleccionar -> SELECT GREATEST expressiones','seleccionar',3,'p_aux_seleccionar','sql_grammar.py',746),
('seleccionar -> SELECT LEAST expressiones','seleccionar',3,'p_aux_seleccionar','sql_grammar.py',747),
('list_fin_select -> list_fin_select fin_select','list_fin_select',2,'p_list_fin_select','sql_grammar.py',753),
('list_fin_select -> fin_select','list_fin_select',1,'p_aux_list_fin_select','sql_grammar.py',758),
('fin_select -> group_by','fin_select',1,'p_fin_select','sql_grammar.py',762),
('fin_select -> donde','fin_select',1,'p_fin_select','sql_grammar.py',763),
('fin_select -> order_by','fin_select',1,'p_fin_select','sql_grammar.py',764),
('fin_select -> group_having','fin_select',1,'p_fin_select','sql_grammar.py',765),
('fin_select -> limite','fin_select',1,'p_fin_select','sql_grammar.py',766),
('fin_select -> <empty>','fin_select',0,'p_fin_select','sql_grammar.py',767),
('expressiones -> PAR_ABRE list_expression PAR_CIERRA','expressiones',3,'p_expressiones','sql_grammar.py',774),
('expressiones -> list_expression','expressiones',1,'p_aux_expressiones','sql_grammar.py',778),
('distinto -> DISTINCT','distinto',1,'p_distinto','sql_grammar.py',782),
('distinto -> <empty>','distinto',0,'p_distinto','sql_grammar.py',783),
('select_list -> ASTERISCO','select_list',1,'p_select_list','sql_grammar.py',790),
('select_list -> expressiones','select_list',1,'p_select_list','sql_grammar.py',791),
('table_expression -> expressiones','table_expression',1,'p_table_expression','sql_grammar.py',795),
('donde -> WHERE expressiones','donde',2,'p_donde','sql_grammar.py',799),
('group_by -> GROUP BY expressiones','group_by',3,'p_group_by','sql_grammar.py',808),
('order_by -> ORDER BY expressiones asc_desc nulls_f_l','order_by',5,'p_order_by','sql_grammar.py',817),
('group_having -> HAVING expressiones','group_having',2,'p_group_having','sql_grammar.py',826),
('asc_desc -> ASC','asc_desc',1,'p_asc_desc','sql_grammar.py',835),
('asc_desc -> DESC','asc_desc',1,'p_asc_desc','sql_grammar.py',836),
('nulls_f_l -> NULLS LAST','nulls_f_l',2,'p_nulls_f_l','sql_grammar.py',840),
('nulls_f_l -> NULLS FIRST','nulls_f_l',2,'p_nulls_f_l','sql_grammar.py',841),
('nulls_f_l -> <empty>','nulls_f_l',0,'p_nulls_f_l','sql_grammar.py',842),
('limite -> LIMIT ENTERO','limite',2,'p_limite','sql_grammar.py',849),
('limite -> LIMIT ALL','limite',2,'p_limite','sql_grammar.py',850),
('limite -> OFFSET ENTERO','limite',2,'p_limite','sql_grammar.py',851),
('list_expression -> list_expression COMA expression','list_expression',3,'p_list_expression','sql_grammar.py',860),
('list_expression -> expression','list_expression',1,'p_aux_list_expression','sql_grammar.py',865),
('expression -> expression MAYOR expression','expression',3,'p_expression','sql_grammar.py',869),
('expression -> expression MENOR expression','expression',3,'p_expression','sql_grammar.py',870),
('expression -> expression MAYOR_IGUAL expression','expression',3,'p_expression','sql_grammar.py',871),
('expression -> expression MENOR_IGUAL expression','expression',3,'p_expression','sql_grammar.py',872),
('expression -> expression AND expression','expression',3,'p_expression','sql_grammar.py',873),
('expression -> expression OR expression','expression',3,'p_expression','sql_grammar.py',874),
('expression -> NOT expression','expression',2,'p_expression','sql_grammar.py',875),
('expression -> expression IGUAL expression','expression',3,'p_expression','sql_grammar.py',876),
('expression -> expression NO_IGUAL expression','expression',3,'p_expression','sql_grammar.py',877),
('expression -> expression DIFERENTE expression','expression',3,'p_expression','sql_grammar.py',878),
('expression -> PAR_ABRE expression PAR_CIERRA','expression',3,'p_expression','sql_grammar.py',879),
('expression -> expression BETWEEN expression AND expression','expression',5,'p_expression','sql_grammar.py',880),
('expression -> expression NOT BETWEEN expression AND expression','expression',6,'p_expression','sql_grammar.py',881),
('expression -> expression BETWEEN SYMMETRIC expression AND expression','expression',6,'p_expression','sql_grammar.py',882),
('expression -> expression NOT BETWEEN SYMMETRIC expression AND expression','expression',7,'p_expression','sql_grammar.py',883),
('expression -> expression IS DISTINCT FROM expression','expression',5,'p_expression','sql_grammar.py',884),
('expression -> expression IS NOT DISTINCT FROM expression','expression',6,'p_expression','sql_grammar.py',885),
('expression -> ID PUNTO ID','expression',3,'p_expression','sql_grammar.py',886),
('expression -> expression IS NULL','expression',3,'p_expression','sql_grammar.py',887),
('expression -> expression IS NOT NULL','expression',4,'p_expression','sql_grammar.py',888),
('expression -> expression ISNULL','expression',2,'p_expression','sql_grammar.py',889),
('expression -> expression NOTNULL','expression',2,'p_expression','sql_grammar.py',890),
('expression -> expression IS TRUE','expression',3,'p_expression','sql_grammar.py',891),
('expression -> expression IS NOT TRUE','expression',4,'p_expression','sql_grammar.py',892),
('expression -> expression IS FALSE','expression',3,'p_expression','sql_grammar.py',893),
('expression -> expression IS NOT FALSE','expression',4,'p_expression','sql_grammar.py',894),
('expression -> expression IS UNKNOWN','expression',3,'p_expression','sql_grammar.py',895),
('expression -> expression IS NOT UNKNOWN','expression',4,'p_expression','sql_grammar.py',896),
('expression -> SUBSTRING PAR_ABRE expression COMA expression COMA expression PAR_CIERRA','expression',8,'p_expression','sql_grammar.py',897),
('expression -> SUM PAR_ABRE expression PAR_CIERRA','expression',4,'p_expression','sql_grammar.py',898),
('expression -> COUNT PAR_ABRE expression PAR_CIERRA','expression',4,'p_expression','sql_grammar.py',899),
('expression -> AVG PAR_ABRE expression PAR_CIERRA','expression',4,'p_expression','sql_grammar.py',900),
('expression -> seleccionar','expression',1,'p_expression','sql_grammar.py',901),
('expression -> ID','expression',1,'p_solouno_expression','sql_grammar.py',905),
('expression -> ASTERISCO','expression',1,'p_solouno_expression','sql_grammar.py',906),
('expression -> ENTERO','expression',1,'p_expression_entero','sql_grammar.py',916),
('expression -> DECIMAL_NUM','expression',1,'p_expression_decimal','sql_grammar.py',934),
('expression -> CADENA','expression',1,'p_expression_cadena','sql_grammar.py',961),
]
| _tabversion = '3.10'
_lr_method = 'LALR'
_lr_signature = 'leftPAR_ABREPAR_CIERRArightIGUALleftORleftANDleftNO_IGUALnonassocMAYORMENORMAYOR_IGUALMENOR_IGUALleftMASMENOSleftASTERISCODIVISIONMODULOleftPOTENCIArightNOTleftLLAVE_ABRELLAVE_CIERRAADD ALL ALTER AND AS ASC ASTERISCO AVG BETWEEN BIGINT BOOLEAN BY CADENA CASE CASTEO CHAR CHARACTER CHECK COLUMN COMA CONSTRAINT CORCHE_ABRE CORCHE_CIERRA COUNT CREATE CURRENT_USER DATABASE DATABASES DATE DAY DECIMAL DECIMAL_NUM DEFAULT DELETE DESC DIFERENTE DISTINCT DIVISION DOUBLE DROP ELSE END ENTERO ENUM EXISTS FALSE FIELDS FIRST FOREIGN FROM FULL GREATEST GROUP HAVING HOUR ID IF IGUAL ILIKE IN INHERITS INNER INSERT INTEGER INTERSECT INTERVAL INTO IS ISNULL JOIN KEY LAST LEAST LEFT LIKE LIMIT LLAVE_ABRE LLAVE_CIERRA MAS MAYOR MAYOR_IGUAL MENOR MENOR_IGUAL MENOS MINUTE MODE MODULO MONEY MONTH NOT NOTNULL NO_IGUAL NULL NULLS NUMERIC OFFSET OR ORDER OUTER OWNER PAR_ABRE PAR_CIERRA POTENCIA PRECISION PRIMARY PUNTO PUNTOCOMA REAL REFERENCE REFERENCES RENAME REPLACE RIGHT SECOND SELECT SESSION_USER SET SHOW SIMILAR SMALLINT SUBSTRING SUM SYMMETRIC TABLE TEXT THEN TIME TIMESTAMP TO TRUE TYPE UNION UNIQUE UNKNOWN UPDATE USE VALUES VARCHAR VARYING WHEN WHERE WITH WITHOUT YEAR ZONEinit : instruccionesinstrucciones : instrucciones instruccioninstrucciones : instruccion instruccion : crear_statement PUNTOCOMA\n | alter_statement PUNTOCOMA\n | drop_statement PUNTOCOMA\n | seleccionar PUNTOCOMAinstruccion : SHOW DATABASES PUNTOCOMA\n | INSERT INTO ID VALUES PAR_ABRE list_val PAR_CIERRA PUNTOCOMA\n | UPDATE ID SET ID IGUAL op_val where PUNTOCOMA\n | DELETE FROM ID WHERE ID IGUAL op_val PUNTOCOMA\n | USE DATABASE ID PUNTOCOMAcrear_statement : CREATE TABLE ID PAR_ABRE contenido_tabla PAR_CIERRA inherits_statementcrear_statement : CREATE or_replace DATABASE if_not_exists ID owner_ mode_or_replace : OR REPLACE\n | if_not_exists : IF NOT EXISTS\n | owner_ : OWNER IGUAL ID\n | mode_ : MODE IGUAL ENTERO\n | alter_statement : ALTER DATABASE ID rename_owneralter_statement : ALTER TABLE ID alter_oprename_owner : RENAME TO ID\n | OWNER TO LLAVE_ABRE ow_op LLAVE_CIERRAow_op : ID\n | CURRENT_USER\n | SESSION_USERdrop_statement : DROP DATABASE if_exists IDdrop_statement : DROP TABLE IDif_exists : IF EXISTS\n | contenido_tabla : contenido_tabla COMA manejo_tablacontenido_tabla : manejo_tablamanejo_tabla : declaracion_columna\n | condition_columndeclaracion_columna : ID type_column condition_column_rowdeclaracion_columna : ID type_columntype_column : SMALLINT\n | INTEGER\n\t | BIGINT\n\t | DECIMAL\n\t | NUMERIC\n\t | REAL\n\t | DOUBLE PRECISION\n\t | MONEY\n\t | VARCHAR PAR_ABRE ENTERO PAR_CIERRA\n | CHAR PAR_ABRE ENTERO PAR_CIERRA\n | CHARACTER PAR_ABRE ENTERO PAR_CIERRA\n | CHARACTER VARYING PAR_ABRE ENTERO PAR_CIERRA\n \t | TEXT\n\t | DATE\n | TIMESTAMP\n | TIMEcondition_column_row : condition_column_row condition_columncondition_column_row : condition_columncondition_column : constraint UNIQUE op_unique\n | constraint CHECK PAR_ABRE expression PAR_CIERRA\n | key_tablecondition_column : DEFAULT op_val\n | NULL\n | NOT NULL\n\t | REFERENCE ID\n\t\t | CONSTRAINT ID key_table\n \t\t | constraint : CONSTRAINT ID\n | op_unique : PAR_ABRE list_id PAR_CIERRA\n | constraint CHECK PAR_ABRE expression PAR_CIERRA\n | list_id : list_id COMA aliaslist_id : aliasalias : IDkey_table : PRIMARY KEY list_key\n\t | FOREIGN KEY PAR_ABRE list_id PAR_CIERRA REFERENCES ID PAR_ABRE list_id PAR_CIERRAlist_key : PAR_ABRE list_id PAR_CIERRA\n\t | alter_op : ADD op_add\n\t | ALTER COLUMN ID alter_col_op\n\t | DROP alter_drop IDalter_drop : CONSTRAINT\n\t | COLUMN op_add : CHECK PAR_ABRE ID DIFERENTE CADENA PAR_CIERRA\n | CONSTRAINT ID UNIQUE PAR_ABRE ID PAR_CIERRA\n | key_table REFERENCES PAR_ABRE list_id PAR_CIERRAalter_col_op : SET NOT NULL\n | TYPE type_columninherits_statement : INHERITS PAR_ABRE ID PAR_CIERRA\n | list_val : list_val COMA op_vallist_val : op_valop_val : ID\n | CADENA\n | DECIMAL\n | ENTEROwhere : WHERE ID IGUAL op_val\n | seleccionar : SELECT distinto select_list FROM table_expression list_fin_selectseleccionar : SELECT GREATEST expressiones\n | SELECT LEAST expressioneslist_fin_select : list_fin_select fin_selectlist_fin_select : fin_selectfin_select : group_by \n\t | donde\n\t | order_by\n\t | group_having\n\t | limite\n \t| expressiones : PAR_ABRE list_expression PAR_CIERRAexpressiones : list_expressiondistinto : DISTINCT\n\t | select_list : ASTERISCO\n\t | expressiones table_expression : expressionesdonde : WHERE expressionesgroup_by : GROUP BY expressiones order_by : ORDER BY expressiones asc_desc nulls_f_lgroup_having : HAVING expressiones asc_desc : ASC\n\t | DESCnulls_f_l : NULLS LAST\n\t | NULLS FIRST\n\t | limite : LIMIT ENTERO\n\t | LIMIT ALL\n\t | OFFSET ENTEROlist_expression : list_expression COMA expressionlist_expression : expressionexpression : expression MAYOR expression\n | expression MENOR expression\n | expression MAYOR_IGUAL expression\n | expression MENOR_IGUAL expression\n | expression AND expression\n | expression OR expression\n | NOT expression\n | expression IGUAL expression\n | expression NO_IGUAL expression\n | expression DIFERENTE expression\n | PAR_ABRE expression PAR_CIERRA\n | expression BETWEEN expression AND expression\n | expression NOT BETWEEN expression AND expression \n | expression BETWEEN SYMMETRIC expression AND expression\n | expression NOT BETWEEN SYMMETRIC expression AND expression\n | expression IS DISTINCT FROM expression\n | expression IS NOT DISTINCT FROM expression\n | ID PUNTO ID\n | expression IS NULL\n | expression IS NOT NULL\n | expression ISNULL\n | expression NOTNULL\n | expression IS TRUE\n | expression IS NOT TRUE\n | expression IS FALSE\n | expression IS NOT FALSE\n | expression IS UNKNOWN\n | expression IS NOT UNKNOWN\n | SUBSTRING PAR_ABRE expression COMA expression COMA expression PAR_CIERRA\n | SUM PAR_ABRE expression PAR_CIERRA\n | COUNT PAR_ABRE expression PAR_CIERRA\n | AVG PAR_ABRE expression PAR_CIERRA\n | seleccionarexpression : ID\n | ASTERISCOexpression : ENTEROexpression : DECIMAL_NUMexpression : CADENA'
_lr_action_items = {'SHOW': ([0, 2, 3, 17, 18, 19, 20, 21, 38, 73, 292, 294, 296], [8, 8, -3, -2, -4, -5, -6, -7, -8, -12, -9, -10, -11]), 'INSERT': ([0, 2, 3, 17, 18, 19, 20, 21, 38, 73, 292, 294, 296], [9, 9, -3, -2, -4, -5, -6, -7, -8, -12, -9, -10, -11]), 'UPDATE': ([0, 2, 3, 17, 18, 19, 20, 21, 38, 73, 292, 294, 296], [10, 10, -3, -2, -4, -5, -6, -7, -8, -12, -9, -10, -11]), 'DELETE': ([0, 2, 3, 17, 18, 19, 20, 21, 38, 73, 292, 294, 296], [11, 11, -3, -2, -4, -5, -6, -7, -8, -12, -9, -10, -11]), 'USE': ([0, 2, 3, 17, 18, 19, 20, 21, 38, 73, 292, 294, 296], [12, 12, -3, -2, -4, -5, -6, -7, -8, -12, -9, -10, -11]), 'CREATE': ([0, 2, 3, 17, 18, 19, 20, 21, 38, 73, 292, 294, 296], [13, 13, -3, -2, -4, -5, -6, -7, -8, -12, -9, -10, -11]), 'ALTER': ([0, 2, 3, 17, 18, 19, 20, 21, 38, 47, 73, 292, 294, 296], [14, 14, -3, -2, -4, -5, -6, -7, -8, 80, -12, -9, -10, -11]), 'DROP': ([0, 2, 3, 17, 18, 19, 20, 21, 38, 47, 73, 292, 294, 296], [15, 15, -3, -2, -4, -5, -6, -7, -8, 83, -12, -9, -10, -11]), 'SELECT': ([0, 2, 3, 16, 17, 18, 19, 20, 21, 34, 35, 36, 37, 38, 54, 57, 73, 86, 87, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 107, 108, 109, 110, 156, 157, 221, 223, 226, 229, 230, 236, 259, 278, 280, 286, 287, 290, 292, 294, 296, 323, 325, 332], [16, 16, -3, -113, -2, -4, -5, -6, -7, 16, 16, 16, -112, -8, 16, 16, -12, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, -9, -10, -11, 16, 16, 16]), '$end': ([1, 2, 3, 17, 18, 19, 20, 21, 38, 73, 292, 294, 296], [0, -1, -3, -2, -4, -5, -6, -7, -8, -12, -9, -10, -11]), 'PUNTOCOMA': ([4, 5, 6, 7, 22, 42, 50, 55, 56, 58, 63, 64, 65, 66, 67, 68, 69, 77, 81, 84, 103, 104, 105, 128, 133, 140, 141, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 160, 161, 162, 163, 164, 169, 172, 173, 174, 175, 178, 179, 180, 181, 182, 183, 185, 189, 190, 191, 192, 193, 203, 206, 212, 213, 214, 215, 216, 217, 218, 219, 232, 233, 234, 235, 237, 238, 239, 240, 242, 244, 247, 252, 264, 271, 277, 279, 281, 282, 283, 284, 285, 289, 312, 313, 315, 319, 321, 322, 324, 327, 328, 329, 338, 339, 342, 343, 344, 345, 346, 348, 349, 350, 354, 355, 356, 358, 361, 362], [18, 19, 20, 21, 38, 73, -31, -111, -130, -164, -163, -166, -167, -168, -100, -165, -101, -23, -24, -30, -151, -152, -137, -20, -79, -109, -116, -110, -141, -129, -131, -132, -133, -134, -135, -136, -138, -139, -140, -149, -153, -155, -157, -148, -93, -94, -95, -96, -98, -40, -41, -42, -43, -44, -45, -47, -52, -53, -54, -55, -90, -22, -25, -81, -99, -103, -104, -105, -106, -107, -108, -150, -154, -156, -158, -160, -161, -162, 292, 294, 296, -46, -13, -14, -80, -102, -117, -120, -126, -127, -128, -142, -146, -19, -26, -88, -118, -144, -143, -147, -48, -49, -50, -21, -87, -86, -125, -121, -122, -145, -97, -51, -89, -84, -85, -119, -159, -123, -124]), 'DATABASES': ([8], [22]), 'INTO': ([9], [23]), 'ID': ([10, 16, 23, 25, 26, 27, 30, 31, 32, 33, 34, 35, 36, 37, 40, 44, 48, 54, 57, 72, 74, 75, 85, 86, 87, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 106, 107, 108, 109, 110, 111, 112, 121, 124, 125, 130, 132, 135, 137, 138, 139, 156, 157, 176, 194, 205, 207, 209, 221, 223, 226, 229, 230, 236, 241, 243, 257, 258, 259, 262, 263, 266, 276, 278, 280, 286, 287, 290, 302, 317, 323, 325, 326, 332, 334, 353, 363], [24, -113, 39, 41, 42, 43, 46, 47, -33, 50, 58, 58, 58, -112, 71, -18, 84, 58, 58, 113, 114, 128, -32, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 164, 58, 58, 58, 58, 169, 169, 169, 199, 200, 206, 208, 210, 212, -82, -83, 58, 58, 169, 114, -17, 268, 274, 58, 58, 58, 58, 58, 58, 169, 295, 306, 307, 58, 306, 306, 312, 306, 58, 58, 58, 58, 58, 331, 341, 58, 58, 169, 58, 306, 360, 306]), 'FROM': ([11, 51, 52, 53, 55, 56, 58, 63, 64, 65, 66, 67, 68, 69, 103, 104, 105, 140, 141, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 158, 160, 161, 162, 163, 164, 213, 214, 215, 216, 217, 218, 219, 231, 232, 233, 234, 235, 237, 238, 239, 277, 279, 281, 282, 283, 284, 285, 289, 319, 321, 322, 324, 343, 344, 345, 346, 356, 358, 361, 362], [25, 86, -114, -115, -111, -130, -164, -163, -166, -167, -168, -100, -165, -101, -151, -152, -137, -109, -116, -110, -141, -129, -131, -132, -133, -134, -135, -136, -138, -139, -140, 230, -149, -153, -155, -157, -148, -99, -103, -104, -105, -106, -107, -108, 290, -150, -154, -156, -158, -160, -161, -162, -102, -117, -120, -126, -127, -128, -142, -146, -118, -144, -143, -147, -125, -121, -122, -145, -119, -159, -123, -124]), 'DATABASE': ([12, 13, 14, 15, 28, 45], [26, -16, 30, 32, 44, -15]), 'TABLE': ([13, 14, 15], [27, 31, 33]), 'OR': ([13, 52, 55, 56, 58, 63, 64, 65, 66, 67, 68, 69, 89, 103, 104, 105, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 160, 161, 162, 163, 164, 165, 166, 167, 168, 213, 214, 215, 216, 217, 218, 219, 227, 228, 232, 233, 234, 235, 237, 238, 239, 277, 279, 281, 282, 283, 284, 285, 288, 289, 291, 308, 319, 321, 322, 324, 343, 344, 345, 346, 347, 351, 356, 358, 361, 362], [29, -165, -111, 96, -164, -163, -166, -167, -168, -100, -165, -101, 96, -151, -152, -137, -109, -116, 96, -110, -141, 96, -131, -132, -133, -134, -135, -136, 96, -139, 96, 96, -149, -153, -155, -157, -148, 96, 96, 96, 96, -99, -103, -104, -105, -106, -107, -108, 96, 96, -150, -154, -156, -158, -160, -161, -162, -102, -117, -120, -126, -127, -128, -135, 96, 96, 96, 96, -118, -135, -135, 96, -125, -121, -122, -135, 96, 96, -119, -159, -123, -124]), 'GREATEST': ([16], [35]), 'LEAST': ([16], [36]), 'DISTINCT': ([16, 102, 159], [37, 158, 231]), 'ASTERISCO': ([16, 34, 35, 36, 37, 54, 57, 86, 87, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 107, 108, 109, 110, 156, 157, 221, 223, 226, 229, 230, 236, 259, 278, 280, 286, 287, 290, 323, 325, 332], [-113, 52, 68, 68, -112, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68]), 'PAR_ABRE': ([16, 34, 35, 36, 37, 43, 54, 57, 59, 60, 61, 62, 70, 86, 87, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 107, 108, 109, 110, 134, 156, 157, 186, 187, 188, 195, 196, 201, 202, 211, 221, 223, 226, 229, 230, 236, 251, 253, 259, 275, 278, 280, 286, 287, 290, 303, 323, 325, 332, 360], [-113, 54, 54, 54, -112, 74, 87, 87, 107, 108, 109, 110, 111, 54, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 209, 87, 87, 248, 249, 250, 257, 259, 262, 263, 276, 54, 54, 87, 87, 87, 87, 301, 302, 87, 317, 54, 54, 87, 87, 87, 332, 87, 87, 87, 363]), 'NOT': ([16, 34, 35, 36, 37, 52, 54, 55, 56, 57, 58, 63, 64, 65, 66, 67, 68, 69, 74, 76, 86, 87, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 102, 103, 104, 105, 107, 108, 109, 110, 120, 122, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 172, 173, 174, 177, 178, 179, 180, 181, 182, 183, 185, 189, 190, 191, 192, 194, 195, 197, 198, 199, 201, 213, 214, 215, 216, 217, 218, 219, 221, 223, 226, 227, 228, 229, 230, 232, 233, 234, 235, 236, 237, 238, 239, 245, 246, 247, 256, 259, 260, 261, 272, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 297, 308, 319, 321, 322, 323, 324, 325, 327, 328, 329, 332, 333, 335, 336, 343, 344, 345, 346, 347, 349, 351, 356, 358, 359, 361, 362, 365], [-113, 57, 57, 57, -112, -165, 57, -111, 101, 57, -164, -163, -166, -167, -168, -100, -165, -101, 123, 129, 57, 57, 101, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 159, -151, -152, 101, 57, 57, 57, 57, -60, -62, -109, -116, 101, -110, -141, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 57, 57, -149, -153, -155, -157, -148, 101, 101, 101, 101, -93, -94, -95, -96, 123, -40, -41, -42, -43, -44, -45, -47, -52, -53, -54, -55, 123, -71, -61, -63, -64, -78, -99, -103, -104, -105, -106, -107, -108, 57, 57, 57, 101, 101, 57, 57, -150, -154, -156, -158, 57, -160, -161, -162, 123, -57, -46, -58, 57, -65, -75, 314, -102, 57, -117, 57, -120, -126, -127, -128, 101, 57, 57, 101, 101, 57, 101, -56, 101, -118, 101, 101, 57, 101, 57, -48, -49, -50, 57, -69, -59, -77, -125, -121, -122, 101, 101, -51, 101, -119, -159, -70, -123, -124, -76]), 'SUBSTRING': ([16, 34, 35, 36, 37, 54, 57, 86, 87, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 107, 108, 109, 110, 156, 157, 221, 223, 226, 229, 230, 236, 259, 278, 280, 286, 287, 290, 323, 325, 332], [-113, 59, 59, 59, -112, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59]), 'SUM': ([16, 34, 35, 36, 37, 54, 57, 86, 87, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 107, 108, 109, 110, 156, 157, 221, 223, 226, 229, 230, 236, 259, 278, 280, 286, 287, 290, 323, 325, 332], [-113, 60, 60, 60, -112, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60]), 'COUNT': ([16, 34, 35, 36, 37, 54, 57, 86, 87, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 107, 108, 109, 110, 156, 157, 221, 223, 226, 229, 230, 236, 259, 278, 280, 286, 287, 290, 323, 325, 332], [-113, 61, 61, 61, -112, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61]), 'AVG': ([16, 34, 35, 36, 37, 54, 57, 86, 87, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 107, 108, 109, 110, 156, 157, 221, 223, 226, 229, 230, 236, 259, 278, 280, 286, 287, 290, 323, 325, 332], [-113, 62, 62, 62, -112, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62]), 'ENTERO': ([16, 34, 35, 36, 37, 54, 57, 86, 87, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 107, 108, 109, 110, 111, 112, 121, 156, 157, 176, 221, 223, 224, 225, 226, 229, 230, 236, 241, 248, 249, 250, 259, 278, 280, 286, 287, 290, 301, 311, 323, 325, 326, 332], [-113, 64, 64, 64, -112, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 174, 174, 174, 64, 64, 174, 64, 64, 282, 284, 64, 64, 64, 64, 174, 298, 299, 300, 64, 64, 64, 64, 64, 64, 330, 338, 64, 64, 174, 64]), 'DECIMAL_NUM': ([16, 34, 35, 36, 37, 54, 57, 86, 87, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 107, 108, 109, 110, 156, 157, 221, 223, 226, 229, 230, 236, 259, 278, 280, 286, 287, 290, 323, 325, 332], [-113, 65, 65, 65, -112, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65]), 'CADENA': ([16, 34, 35, 36, 37, 54, 57, 86, 87, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 107, 108, 109, 110, 111, 112, 121, 156, 157, 176, 221, 223, 226, 229, 230, 236, 241, 259, 278, 280, 286, 287, 290, 316, 323, 325, 326, 332], [-113, 66, 66, 66, -112, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 172, 172, 172, 66, 66, 172, 66, 66, 66, 66, 66, 66, 172, 66, 66, 66, 66, 66, 66, 340, 66, 66, 172, 66]), 'SET': ([24, 208], [40, 272]), 'REPLACE': ([29], [45]), 'IF': ([32, 44], [49, 76]), 'VALUES': ([39], [70]), 'WHERE': ([41, 55, 56, 58, 63, 64, 65, 66, 67, 68, 69, 103, 104, 105, 140, 141, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 160, 161, 162, 163, 164, 169, 172, 173, 174, 175, 213, 214, 215, 216, 217, 218, 219, 232, 233, 234, 235, 237, 238, 239, 277, 279, 281, 282, 283, 284, 285, 289, 319, 321, 322, 324, 343, 344, 345, 346, 356, 358, 361, 362], [72, -111, -130, -164, -163, -166, -167, -168, -100, -165, -101, -151, -152, -137, 221, -116, -110, -141, -129, -131, -132, -133, -134, -135, -136, -138, -139, -140, -149, -153, -155, -157, -148, -93, -94, -95, -96, 243, 221, -103, -104, -105, -106, -107, -108, -150, -154, -156, -158, -160, -161, -162, -102, -117, -120, -126, -127, -128, -142, -146, -118, -144, -143, -147, -125, -121, -122, -145, -119, -159, -123, -124]), 'RENAME': ([46], [78]), 'OWNER': ([46, 128], [79, 204]), 'ADD': ([47], [82]), 'EXISTS': ([49, 129], [85, 205]), 'MAYOR': ([52, 55, 56, 58, 63, 64, 65, 66, 67, 68, 69, 89, 103, 104, 105, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 160, 161, 162, 163, 164, 165, 166, 167, 168, 213, 214, 215, 216, 217, 218, 219, 227, 228, 232, 233, 234, 235, 237, 238, 239, 277, 279, 281, 282, 283, 284, 285, 288, 289, 291, 308, 319, 321, 322, 324, 343, 344, 345, 346, 347, 351, 356, 358, 361, 362], [-165, -111, 91, -164, -163, -166, -167, -168, -100, -165, -101, 91, -151, -152, -137, -109, -116, 91, -110, -141, 91, None, None, None, None, 91, 91, 91, 91, 91, 91, -149, -153, -155, -157, -148, 91, 91, 91, 91, -99, -103, -104, -105, -106, -107, -108, 91, 91, -150, -154, -156, -158, -160, -161, -162, -102, -117, -120, -126, -127, -128, 91, 91, 91, 91, 91, -118, 91, 91, 91, -125, -121, -122, 91, 91, 91, -119, -159, -123, -124]), 'MENOR': ([52, 55, 56, 58, 63, 64, 65, 66, 67, 68, 69, 89, 103, 104, 105, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 160, 161, 162, 163, 164, 165, 166, 167, 168, 213, 214, 215, 216, 217, 218, 219, 227, 228, 232, 233, 234, 235, 237, 238, 239, 277, 279, 281, 282, 283, 284, 285, 288, 289, 291, 308, 319, 321, 322, 324, 343, 344, 345, 346, 347, 351, 356, 358, 361, 362], [-165, -111, 92, -164, -163, -166, -167, -168, -100, -165, -101, 92, -151, -152, -137, -109, -116, 92, -110, -141, 92, None, None, None, None, 92, 92, 92, 92, 92, 92, -149, -153, -155, -157, -148, 92, 92, 92, 92, -99, -103, -104, -105, -106, -107, -108, 92, 92, -150, -154, -156, -158, -160, -161, -162, -102, -117, -120, -126, -127, -128, 92, 92, 92, 92, 92, -118, 92, 92, 92, -125, -121, -122, 92, 92, 92, -119, -159, -123, -124]), 'MAYOR_IGUAL': ([52, 55, 56, 58, 63, 64, 65, 66, 67, 68, 69, 89, 103, 104, 105, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 160, 161, 162, 163, 164, 165, 166, 167, 168, 213, 214, 215, 216, 217, 218, 219, 227, 228, 232, 233, 234, 235, 237, 238, 239, 277, 279, 281, 282, 283, 284, 285, 288, 289, 291, 308, 319, 321, 322, 324, 343, 344, 345, 346, 347, 351, 356, 358, 361, 362], [-165, -111, 93, -164, -163, -166, -167, -168, -100, -165, -101, 93, -151, -152, -137, -109, -116, 93, -110, -141, 93, None, None, None, None, 93, 93, 93, 93, 93, 93, -149, -153, -155, -157, -148, 93, 93, 93, 93, -99, -103, -104, -105, -106, -107, -108, 93, 93, -150, -154, -156, -158, -160, -161, -162, -102, -117, -120, -126, -127, -128, 93, 93, 93, 93, 93, -118, 93, 93, 93, -125, -121, -122, 93, 93, 93, -119, -159, -123, -124]), 'MENOR_IGUAL': ([52, 55, 56, 58, 63, 64, 65, 66, 67, 68, 69, 89, 103, 104, 105, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 160, 161, 162, 163, 164, 165, 166, 167, 168, 213, 214, 215, 216, 217, 218, 219, 227, 228, 232, 233, 234, 235, 237, 238, 239, 277, 279, 281, 282, 283, 284, 285, 288, 289, 291, 308, 319, 321, 322, 324, 343, 344, 345, 346, 347, 351, 356, 358, 361, 362], [-165, -111, 94, -164, -163, -166, -167, -168, -100, -165, -101, 94, -151, -152, -137, -109, -116, 94, -110, -141, 94, None, None, None, None, 94, 94, 94, 94, 94, 94, -149, -153, -155, -157, -148, 94, 94, 94, 94, -99, -103, -104, -105, -106, -107, -108, 94, 94, -150, -154, -156, -158, -160, -161, -162, -102, -117, -120, -126, -127, -128, 94, 94, 94, 94, 94, -118, 94, 94, 94, -125, -121, -122, 94, 94, 94, -119, -159, -123, -124]), 'AND': ([52, 55, 56, 58, 63, 64, 65, 66, 67, 68, 69, 89, 103, 104, 105, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 160, 161, 162, 163, 164, 165, 166, 167, 168, 213, 214, 215, 216, 217, 218, 219, 227, 228, 232, 233, 234, 235, 237, 238, 239, 277, 279, 281, 282, 283, 284, 285, 288, 289, 291, 308, 319, 321, 322, 324, 343, 344, 345, 346, 347, 351, 356, 358, 361, 362], [-165, -111, 95, -164, -163, -166, -167, -168, -100, -165, -101, 95, -151, -152, -137, -109, -116, 95, -110, -141, 95, -131, -132, -133, -134, -135, 95, 95, -139, 95, 226, -149, -153, -155, -157, -148, 95, 95, 95, 95, -99, -103, -104, -105, -106, -107, -108, 286, 287, -150, -154, -156, -158, -160, -161, -162, -102, -117, -120, -126, -127, -128, -135, 323, 95, 95, 95, -118, -135, -135, 95, -125, -121, -122, -135, 95, 95, -119, -159, -123, -124]), 'IGUAL': ([52, 55, 56, 58, 63, 64, 65, 66, 67, 68, 69, 71, 89, 103, 104, 105, 113, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 160, 161, 162, 163, 164, 165, 166, 167, 168, 204, 213, 214, 215, 216, 217, 218, 219, 227, 228, 232, 233, 234, 235, 237, 238, 239, 265, 277, 279, 281, 282, 283, 284, 285, 288, 289, 291, 295, 308, 319, 321, 322, 324, 343, 344, 345, 346, 347, 351, 356, 358, 361, 362], [-165, -111, 97, -164, -163, -166, -167, -168, -100, -165, -101, 112, 97, -151, -152, -137, 176, -109, -116, 97, -110, -141, 97, -131, -132, -133, -134, -135, -136, 97, -139, 97, 97, -149, -153, -155, -157, -148, 97, 97, 97, 97, 266, -99, -103, -104, -105, -106, -107, -108, 97, 97, -150, -154, -156, -158, -160, -161, -162, 311, -102, -117, -120, -126, -127, -128, -135, 97, 97, 97, 326, 97, -118, -135, -135, 97, -125, -121, -122, -135, 97, 97, -119, -159, -123, -124]), 'NO_IGUAL': ([52, 55, 56, 58, 63, 64, 65, 66, 67, 68, 69, 89, 103, 104, 105, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 160, 161, 162, 163, 164, 165, 166, 167, 168, 213, 214, 215, 216, 217, 218, 219, 227, 228, 232, 233, 234, 235, 237, 238, 239, 277, 279, 281, 282, 283, 284, 285, 288, 289, 291, 308, 319, 321, 322, 324, 343, 344, 345, 346, 347, 351, 356, 358, 361, 362], [-165, -111, 98, -164, -163, -166, -167, -168, -100, -165, -101, 98, -151, -152, -137, -109, -116, 98, -110, -141, 98, -131, -132, -133, -134, 98, 98, 98, -139, 98, 98, -149, -153, -155, -157, -148, 98, 98, 98, 98, -99, -103, -104, -105, -106, -107, -108, 98, 98, -150, -154, -156, -158, -160, -161, -162, -102, -117, -120, -126, -127, -128, 98, 98, 98, 98, 98, -118, 98, 98, 98, -125, -121, -122, 98, 98, 98, -119, -159, -123, -124]), 'DIFERENTE': ([52, 55, 56, 58, 63, 64, 65, 66, 67, 68, 69, 89, 103, 104, 105, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 160, 161, 162, 163, 164, 165, 166, 167, 168, 213, 214, 215, 216, 217, 218, 219, 227, 228, 232, 233, 234, 235, 237, 238, 239, 274, 277, 279, 281, 282, 283, 284, 285, 288, 289, 291, 308, 319, 321, 322, 324, 343, 344, 345, 346, 347, 351, 356, 358, 361, 362], [-165, -111, 99, -164, -163, -166, -167, -168, -100, -165, -101, 99, -151, -152, -137, -109, -116, 99, -110, -141, 99, -131, -132, -133, -134, -135, -136, -138, -139, 99, 99, -149, -153, -155, -157, -148, 99, 99, 99, 99, -99, -103, -104, -105, -106, -107, -108, 99, 99, -150, -154, -156, -158, -160, -161, -162, 316, -102, -117, -120, -126, -127, -128, -135, 99, 99, 99, 99, -118, -135, -135, 99, -125, -121, -122, -135, 99, 99, -119, -159, -123, -124]), 'BETWEEN': ([52, 55, 56, 58, 63, 64, 65, 66, 67, 68, 69, 89, 101, 103, 104, 105, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 160, 161, 162, 163, 164, 165, 166, 167, 168, 213, 214, 215, 216, 217, 218, 219, 227, 228, 232, 233, 234, 235, 237, 238, 239, 277, 279, 281, 282, 283, 284, 285, 288, 289, 291, 308, 319, 321, 322, 324, 343, 344, 345, 346, 347, 351, 356, 358, 361, 362], [-165, -111, 100, -164, -163, -166, -167, -168, -100, -165, -101, 100, 157, -151, -152, -137, -109, -116, 100, -110, -141, 100, -131, -132, -133, -134, -135, -136, -138, -139, 100, 100, -149, -153, -155, -157, -148, 100, 100, 100, 100, -99, -103, -104, -105, -106, -107, -108, 100, 100, -150, -154, -156, -158, -160, -161, -162, -102, -117, -120, -126, -127, -128, -135, 100, 100, 100, 100, -118, -135, -135, 100, -125, -121, -122, -135, 100, 100, -119, -159, -123, -124]), 'IS': ([52, 55, 56, 58, 63, 64, 65, 66, 67, 68, 69, 89, 103, 104, 105, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 160, 161, 162, 163, 164, 165, 166, 167, 168, 213, 214, 215, 216, 217, 218, 219, 227, 228, 232, 233, 234, 235, 237, 238, 239, 277, 279, 281, 282, 283, 284, 285, 288, 289, 291, 308, 319, 321, 322, 324, 343, 344, 345, 346, 347, 351, 356, 358, 361, 362], [-165, -111, 102, -164, -163, -166, -167, -168, -100, -165, -101, 102, -151, -152, -137, -109, -116, 102, -110, -141, 102, -131, -132, -133, -134, -135, -136, -138, -139, 102, 102, -149, -153, -155, -157, -148, 102, 102, 102, 102, -99, -103, -104, -105, -106, -107, -108, 102, 102, -150, -154, -156, -158, -160, -161, -162, -102, -117, -120, -126, -127, -128, -135, 102, 102, 102, 102, -118, -135, -135, 102, -125, -121, -122, -135, 102, 102, -119, -159, -123, -124]), 'ISNULL': ([52, 55, 56, 58, 63, 64, 65, 66, 67, 68, 69, 89, 103, 104, 105, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 160, 161, 162, 163, 164, 165, 166, 167, 168, 213, 214, 215, 216, 217, 218, 219, 227, 228, 232, 233, 234, 235, 237, 238, 239, 277, 279, 281, 282, 283, 284, 285, 288, 289, 291, 308, 319, 321, 322, 324, 343, 344, 345, 346, 347, 351, 356, 358, 361, 362], [-165, -111, 103, -164, -163, -166, -167, -168, -100, -165, -101, 103, -151, -152, -137, -109, -116, 103, -110, -141, 103, -131, -132, -133, -134, -135, -136, -138, -139, 103, 103, -149, -153, -155, -157, -148, 103, 103, 103, 103, -99, -103, -104, -105, -106, -107, -108, 103, 103, -150, -154, -156, -158, -160, -161, -162, -102, -117, -120, -126, -127, -128, -135, 103, 103, 103, 103, -118, -135, -135, 103, -125, -121, -122, -135, 103, 103, -119, -159, -123, -124]), 'NOTNULL': ([52, 55, 56, 58, 63, 64, 65, 66, 67, 68, 69, 89, 103, 104, 105, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 160, 161, 162, 163, 164, 165, 166, 167, 168, 213, 214, 215, 216, 217, 218, 219, 227, 228, 232, 233, 234, 235, 237, 238, 239, 277, 279, 281, 282, 283, 284, 285, 288, 289, 291, 308, 319, 321, 322, 324, 343, 344, 345, 346, 347, 351, 356, 358, 361, 362], [-165, -111, 104, -164, -163, -166, -167, -168, -100, -165, -101, 104, -151, -152, -137, -109, -116, 104, -110, -141, 104, -131, -132, -133, -134, -135, -136, -138, -139, 104, 104, -149, -153, -155, -157, -148, 104, 104, 104, 104, -99, -103, -104, -105, -106, -107, -108, 104, 104, -150, -154, -156, -158, -160, -161, -162, -102, -117, -120, -126, -127, -128, -135, 104, 104, 104, 104, -118, -135, -135, 104, -125, -121, -122, -135, 104, 104, -119, -159, -123, -124]), 'COMA': ([52, 55, 56, 58, 63, 64, 65, 66, 67, 68, 69, 74, 88, 89, 103, 104, 105, 115, 116, 117, 118, 120, 122, 140, 141, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 160, 161, 162, 163, 164, 165, 169, 170, 171, 172, 173, 174, 177, 178, 179, 180, 181, 182, 183, 185, 189, 190, 191, 192, 194, 195, 197, 198, 199, 201, 213, 214, 215, 216, 217, 218, 219, 232, 233, 234, 235, 237, 238, 239, 245, 246, 247, 254, 256, 260, 261, 277, 279, 281, 282, 283, 284, 285, 289, 291, 293, 297, 304, 305, 306, 309, 310, 318, 319, 321, 322, 324, 327, 328, 329, 333, 335, 336, 343, 344, 345, 346, 349, 352, 356, 358, 359, 361, 362, 364, 365], [-165, 90, -130, -164, -163, -166, -167, -168, -100, -165, -101, -66, 90, -130, -151, -152, -137, 194, -35, -36, -37, -60, -62, -109, -116, -110, -141, -129, -131, -132, -133, -134, -135, -136, -138, -139, -140, -149, -153, -155, -157, -148, 236, -93, 241, -92, -94, -95, -96, -39, -40, -41, -42, -43, -44, -45, -47, -52, -53, -54, -55, -66, -71, -61, -63, -64, -78, -99, -103, -104, -105, -106, -107, -108, -150, -154, -156, -158, -160, -161, -162, -38, -57, -46, -34, -58, -65, -75, -102, -117, -120, -126, -127, -128, -142, -146, 325, -91, -56, 334, -73, -74, 334, 334, 334, -118, -144, -143, -147, -48, -49, -50, -69, -59, -77, -125, -121, -122, -145, -51, -72, -119, -159, -70, -123, -124, 334, -76]), 'PAR_CIERRA': ([55, 56, 58, 63, 64, 65, 66, 67, 68, 69, 74, 88, 89, 103, 104, 105, 115, 116, 117, 118, 120, 122, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 160, 161, 162, 163, 164, 166, 167, 168, 169, 170, 171, 172, 173, 174, 177, 178, 179, 180, 181, 182, 183, 185, 189, 190, 191, 192, 194, 195, 197, 198, 199, 201, 213, 214, 215, 216, 217, 218, 219, 232, 233, 234, 235, 237, 238, 239, 245, 246, 247, 254, 256, 260, 261, 277, 279, 281, 282, 283, 284, 285, 289, 293, 297, 298, 299, 300, 304, 305, 306, 308, 309, 310, 318, 319, 321, 322, 324, 327, 328, 329, 330, 331, 333, 335, 336, 340, 341, 343, 344, 345, 346, 347, 349, 351, 352, 356, 358, 359, 361, 362, 364, 365], [-111, -130, -164, -163, -166, -167, -168, -100, -165, -101, -66, 143, 144, -151, -152, -137, 193, -35, -36, -37, -60, -62, -109, -116, 144, -110, -141, -129, -131, -132, -133, -134, -135, -136, -138, -139, -140, -149, -153, -155, -157, -148, 237, 238, 239, -93, 240, -92, -94, -95, -96, -39, -40, -41, -42, -43, -44, -45, -47, -52, -53, -54, -55, -66, -71, -61, -63, -64, -78, -99, -103, -104, -105, -106, -107, -108, -150, -154, -156, -158, -160, -161, -162, -38, -57, -46, -34, -58, -65, -75, -102, -117, -120, -126, -127, -128, -142, -146, -91, -56, 327, 328, 329, 333, -73, -74, 335, 336, 337, 342, -118, -144, -143, -147, -48, -49, -50, 349, 350, -69, -59, -77, 354, 355, -125, -121, -122, -145, 358, -51, 359, -72, -119, -159, -70, -123, -124, 365, -76]), 'GROUP': ([55, 56, 58, 63, 64, 65, 66, 67, 68, 69, 103, 104, 105, 140, 141, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 160, 161, 162, 163, 164, 213, 214, 215, 216, 217, 218, 219, 232, 233, 234, 235, 237, 238, 239, 277, 279, 281, 282, 283, 284, 285, 289, 319, 321, 322, 324, 343, 344, 345, 346, 356, 358, 361, 362], [-111, -130, -164, -163, -166, -167, -168, -100, -165, -101, -151, -152, -137, 220, -116, -110, -141, -129, -131, -132, -133, -134, -135, -136, -138, -139, -140, -149, -153, -155, -157, -148, 220, -103, -104, -105, -106, -107, -108, -150, -154, -156, -158, -160, -161, -162, -102, -117, -120, -126, -127, -128, -142, -146, -118, -144, -143, -147, -125, -121, -122, -145, -119, -159, -123, -124]), 'ORDER': ([55, 56, 58, 63, 64, 65, 66, 67, 68, 69, 103, 104, 105, 140, 141, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 160, 161, 162, 163, 164, 213, 214, 215, 216, 217, 218, 219, 232, 233, 234, 235, 237, 238, 239, 277, 279, 281, 282, 283, 284, 285, 289, 319, 321, 322, 324, 343, 344, 345, 346, 356, 358, 361, 362], [-111, -130, -164, -163, -166, -167, -168, -100, -165, -101, -151, -152, -137, 222, -116, -110, -141, -129, -131, -132, -133, -134, -135, -136, -138, -139, -140, -149, -153, -155, -157, -148, 222, -103, -104, -105, -106, -107, -108, -150, -154, -156, -158, -160, -161, -162, -102, -117, -120, -126, -127, -128, -142, -146, -118, -144, -143, -147, -125, -121, -122, -145, -119, -159, -123, -124]), 'HAVING': ([55, 56, 58, 63, 64, 65, 66, 67, 68, 69, 103, 104, 105, 140, 141, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 160, 161, 162, 163, 164, 213, 214, 215, 216, 217, 218, 219, 232, 233, 234, 235, 237, 238, 239, 277, 279, 281, 282, 283, 284, 285, 289, 319, 321, 322, 324, 343, 344, 345, 346, 356, 358, 361, 362], [-111, -130, -164, -163, -166, -167, -168, -100, -165, -101, -151, -152, -137, 223, -116, -110, -141, -129, -131, -132, -133, -134, -135, -136, -138, -139, -140, -149, -153, -155, -157, -148, 223, -103, -104, -105, -106, -107, -108, -150, -154, -156, -158, -160, -161, -162, -102, -117, -120, -126, -127, -128, -142, -146, -118, -144, -143, -147, -125, -121, -122, -145, -119, -159, -123, -124]), 'LIMIT': ([55, 56, 58, 63, 64, 65, 66, 67, 68, 69, 103, 104, 105, 140, 141, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 160, 161, 162, 163, 164, 213, 214, 215, 216, 217, 218, 219, 232, 233, 234, 235, 237, 238, 239, 277, 279, 281, 282, 283, 284, 285, 289, 319, 321, 322, 324, 343, 344, 345, 346, 356, 358, 361, 362], [-111, -130, -164, -163, -166, -167, -168, -100, -165, -101, -151, -152, -137, 224, -116, -110, -141, -129, -131, -132, -133, -134, -135, -136, -138, -139, -140, -149, -153, -155, -157, -148, 224, -103, -104, -105, -106, -107, -108, -150, -154, -156, -158, -160, -161, -162, -102, -117, -120, -126, -127, -128, -142, -146, -118, -144, -143, -147, -125, -121, -122, -145, -119, -159, -123, -124]), 'OFFSET': ([55, 56, 58, 63, 64, 65, 66, 67, 68, 69, 103, 104, 105, 140, 141, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 160, 161, 162, 163, 164, 213, 214, 215, 216, 217, 218, 219, 232, 233, 234, 235, 237, 238, 239, 277, 279, 281, 282, 283, 284, 285, 289, 319, 321, 322, 324, 343, 344, 345, 346, 356, 358, 361, 362], [-111, -130, -164, -163, -166, -167, -168, -100, -165, -101, -151, -152, -137, 225, -116, -110, -141, -129, -131, -132, -133, -134, -135, -136, -138, -139, -140, -149, -153, -155, -157, -148, 225, -103, -104, -105, -106, -107, -108, -150, -154, -156, -158, -160, -161, -162, -102, -117, -120, -126, -127, -128, -142, -146, -118, -144, -143, -147, -125, -121, -122, -145, -119, -159, -123, -124]), 'ASC': ([55, 56, 58, 63, 64, 65, 66, 67, 68, 69, 103, 104, 105, 140, 141, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 160, 161, 162, 163, 164, 213, 214, 215, 216, 217, 218, 219, 232, 233, 234, 235, 237, 238, 239, 277, 279, 281, 282, 283, 284, 285, 289, 319, 320, 321, 322, 324, 343, 344, 345, 346, 356, 358, 361, 362], [-111, -130, -164, -163, -166, -167, -168, -100, -165, -101, -151, -152, -137, -109, -116, -110, -141, -129, -131, -132, -133, -134, -135, -136, -138, -139, -140, -149, -153, -155, -157, -148, -99, -103, -104, -105, -106, -107, -108, -150, -154, -156, -158, -160, -161, -162, -102, -117, -120, -126, -127, -128, -142, -146, -118, 344, -144, -143, -147, -125, -121, -122, -145, -119, -159, -123, -124]), 'DESC': ([55, 56, 58, 63, 64, 65, 66, 67, 68, 69, 103, 104, 105, 140, 141, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 160, 161, 162, 163, 164, 213, 214, 215, 216, 217, 218, 219, 232, 233, 234, 235, 237, 238, 239, 277, 279, 281, 282, 283, 284, 285, 289, 319, 320, 321, 322, 324, 343, 344, 345, 346, 356, 358, 361, 362], [-111, -130, -164, -163, -166, -167, -168, -100, -165, -101, -151, -152, -137, -109, -116, -110, -141, -129, -131, -132, -133, -134, -135, -136, -138, -139, -140, -149, -153, -155, -157, -148, -99, -103, -104, -105, -106, -107, -108, -150, -154, -156, -158, -160, -161, -162, -102, -117, -120, -126, -127, -128, -142, -146, -118, 345, -144, -143, -147, -125, -121, -122, -145, -119, -159, -123, -124]), 'PUNTO': ([58], [106]), 'DEFAULT': ([74, 120, 122, 169, 172, 173, 174, 177, 178, 179, 180, 181, 182, 183, 185, 189, 190, 191, 192, 194, 195, 197, 198, 199, 201, 245, 246, 247, 256, 260, 261, 297, 327, 328, 329, 333, 335, 336, 349, 359, 365], [121, -60, -62, -93, -94, -95, -96, 121, -40, -41, -42, -43, -44, -45, -47, -52, -53, -54, -55, 121, -71, -61, -63, -64, -78, 121, -57, -46, -58, -65, -75, -56, -48, -49, -50, -69, -59, -77, -51, -70, -76]), 'NULL': ([74, 102, 120, 122, 123, 159, 169, 172, 173, 174, 177, 178, 179, 180, 181, 182, 183, 185, 189, 190, 191, 192, 194, 195, 197, 198, 199, 201, 245, 246, 247, 256, 260, 261, 297, 314, 327, 328, 329, 333, 335, 336, 349, 359, 365], [122, 160, -60, -62, 198, 232, -93, -94, -95, -96, 122, -40, -41, -42, -43, -44, -45, -47, -52, -53, -54, -55, 122, -71, -61, -63, -64, -78, 122, -57, -46, -58, -65, -75, -56, 339, -48, -49, -50, -69, -59, -77, -51, -70, -76]), 'REFERENCE': ([74, 120, 122, 169, 172, 173, 174, 177, 178, 179, 180, 181, 182, 183, 185, 189, 190, 191, 192, 194, 195, 197, 198, 199, 201, 245, 246, 247, 256, 260, 261, 297, 327, 328, 329, 333, 335, 336, 349, 359, 365], [124, -60, -62, -93, -94, -95, -96, 124, -40, -41, -42, -43, -44, -45, -47, -52, -53, -54, -55, 124, -71, -61, -63, -64, -78, 124, -57, -46, -58, -65, -75, -56, -48, -49, -50, -69, -59, -77, -51, -70, -76]), 'CONSTRAINT': ([74, 82, 83, 120, 122, 169, 172, 173, 174, 177, 178, 179, 180, 181, 182, 183, 185, 189, 190, 191, 192, 194, 195, 197, 198, 199, 201, 245, 246, 247, 256, 260, 261, 297, 327, 328, 329, 333, 335, 336, 349, 359, 365], [125, 135, 138, -60, -62, -93, -94, -95, -96, 125, -40, -41, -42, -43, -44, -45, -47, -52, -53, -54, -55, 125, 258, -61, -63, -64, -78, 125, -57, -46, -58, -65, -75, -56, -48, -49, -50, -69, -59, -77, -51, -70, -76]), 'UNIQUE': ([74, 119, 120, 122, 169, 172, 173, 174, 177, 178, 179, 180, 181, 182, 183, 185, 189, 190, 191, 192, 194, 195, 197, 198, 199, 200, 201, 210, 245, 246, 247, 256, 260, 261, 297, 327, 328, 329, 333, 335, 336, 349, 359, 365], [-68, 195, -60, -62, -93, -94, -95, -96, -66, -40, -41, -42, -43, -44, -45, -47, -52, -53, -54, -55, -68, -71, -61, -63, -64, -67, -78, 275, -66, -57, -46, -58, -65, -75, -56, -48, -49, -50, -69, -59, -77, -51, -70, -76]), 'CHECK': ([74, 82, 119, 120, 122, 169, 172, 173, 174, 177, 178, 179, 180, 181, 182, 183, 185, 189, 190, 191, 192, 194, 195, 197, 198, 199, 200, 201, 245, 246, 247, 255, 256, 260, 261, 297, 307, 327, 328, 329, 333, 335, 336, 349, 359, 365], [-68, 134, 196, -60, -62, -93, -94, -95, -96, -66, -40, -41, -42, -43, -44, -45, -47, -52, -53, -54, -55, -68, -68, -61, -63, -64, -67, -78, -66, -57, -46, 303, -58, -65, -75, -56, -67, -48, -49, -50, -69, -59, -77, -51, -70, -76]), 'PRIMARY': ([74, 82, 120, 122, 169, 172, 173, 174, 177, 178, 179, 180, 181, 182, 183, 185, 189, 190, 191, 192, 194, 195, 197, 198, 199, 200, 201, 245, 246, 247, 256, 260, 261, 297, 327, 328, 329, 333, 335, 336, 349, 359, 365], [126, 126, -60, -62, -93, -94, -95, -96, 126, -40, -41, -42, -43, -44, -45, -47, -52, -53, -54, -55, 126, -71, -61, -63, -64, 126, -78, 126, -57, -46, -58, -65, -75, -56, -48, -49, -50, -69, -59, -77, -51, -70, -76]), 'FOREIGN': ([74, 82, 120, 122, 169, 172, 173, 174, 177, 178, 179, 180, 181, 182, 183, 185, 189, 190, 191, 192, 194, 195, 197, 198, 199, 200, 201, 245, 246, 247, 256, 260, 261, 297, 327, 328, 329, 333, 335, 336, 349, 359, 365], [127, 127, -60, -62, -93, -94, -95, -96, 127, -40, -41, -42, -43, -44, -45, -47, -52, -53, -54, -55, 127, -71, -61, -63, -64, 127, -78, 127, -57, -46, -58, -65, -75, -56, -48, -49, -50, -69, -59, -77, -51, -70, -76]), 'TO': ([78, 79], [130, 131]), 'COLUMN': ([80, 83], [132, 139]), 'SYMMETRIC': ([100, 157], [156, 229]), 'TRUE': ([102, 159], [161, 233]), 'FALSE': ([102, 159], [162, 234]), 'UNKNOWN': ([102, 159], [163, 235]), 'DECIMAL': ([111, 112, 114, 121, 176, 241, 273, 326], [173, 173, 181, 173, 173, 173, 181, 173]), 'SMALLINT': ([114, 273], [178, 178]), 'INTEGER': ([114, 273], [179, 179]), 'BIGINT': ([114, 273], [180, 180]), 'NUMERIC': ([114, 273], [182, 182]), 'REAL': ([114, 273], [183, 183]), 'DOUBLE': ([114, 273], [184, 184]), 'MONEY': ([114, 273], [185, 185]), 'VARCHAR': ([114, 273], [186, 186]), 'CHAR': ([114, 273], [187, 187]), 'CHARACTER': ([114, 273], [188, 188]), 'TEXT': ([114, 273], [189, 189]), 'DATE': ([114, 273], [190, 190]), 'TIMESTAMP': ([114, 273], [191, 191]), 'TIME': ([114, 273], [192, 192]), 'KEY': ([126, 127], [201, 202]), 'MODE': ([128, 203, 312], [-20, 265, -19]), 'LLAVE_ABRE': ([131], [207]), 'REFERENCES': ([136, 201, 261, 336, 337, 365], [211, -78, -75, -77, 353, -76]), 'PRECISION': ([184], [247]), 'VARYING': ([188], [251]), 'INHERITS': ([193], [253]), 'CURRENT_USER': ([207], [269]), 'SESSION_USER': ([207], [270]), 'TYPE': ([208], [273]), 'BY': ([220, 222], [278, 280]), 'ALL': ([224], [283]), 'LLAVE_CIERRA': ([267, 268, 269, 270], [313, -27, -28, -29]), 'NULLS': ([343, 344, 345], [357, -121, -122]), 'LAST': ([357], [361]), 'FIRST': ([357], [362])}
_lr_action = {}
for (_k, _v) in _lr_action_items.items():
for (_x, _y) in zip(_v[0], _v[1]):
if not _x in _lr_action:
_lr_action[_x] = {}
_lr_action[_x][_k] = _y
del _lr_action_items
_lr_goto_items = {'init': ([0], [1]), 'instrucciones': ([0], [2]), 'instruccion': ([0, 2], [3, 17]), 'crear_statement': ([0, 2], [4, 4]), 'alter_statement': ([0, 2], [5, 5]), 'drop_statement': ([0, 2], [6, 6]), 'seleccionar': ([0, 2, 34, 35, 36, 54, 57, 86, 87, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 107, 108, 109, 110, 156, 157, 221, 223, 226, 229, 230, 236, 259, 278, 280, 286, 287, 290, 323, 325, 332], [7, 7, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63]), 'or_replace': ([13], [28]), 'distinto': ([16], [34]), 'if_exists': ([32], [48]), 'select_list': ([34], [51]), 'expressiones': ([34, 35, 36, 86, 221, 223, 278, 280], [53, 67, 69, 141, 279, 281, 319, 320]), 'list_expression': ([34, 35, 36, 54, 86, 221, 223, 278, 280], [55, 55, 55, 88, 55, 55, 55, 55, 55]), 'expression': ([34, 35, 36, 54, 57, 86, 87, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 107, 108, 109, 110, 156, 157, 221, 223, 226, 229, 230, 236, 259, 278, 280, 286, 287, 290, 323, 325, 332], [56, 56, 56, 89, 105, 56, 142, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 165, 166, 167, 168, 227, 228, 56, 56, 285, 288, 289, 291, 308, 56, 56, 321, 322, 324, 346, 347, 351]), 'if_not_exists': ([44], [75]), 'rename_owner': ([46], [77]), 'alter_op': ([47], [81]), 'contenido_tabla': ([74], [115]), 'manejo_tabla': ([74, 194], [116, 254]), 'declaracion_columna': ([74, 194], [117, 117]), 'condition_column': ([74, 177, 194, 245], [118, 246, 118, 297]), 'constraint': ([74, 177, 194, 195, 245], [119, 119, 119, 255, 119]), 'key_table': ([74, 82, 177, 194, 200, 245], [120, 136, 120, 120, 260, 120]), 'op_add': ([82], [133]), 'alter_drop': ([83], [137]), 'table_expression': ([86], [140]), 'list_val': ([111], [170]), 'op_val': ([111, 112, 121, 176, 241, 326], [171, 175, 197, 244, 293, 348]), 'type_column': ([114, 273], [177, 315]), 'owner_': ([128], [203]), 'list_fin_select': ([140], [213]), 'fin_select': ([140, 213], [214, 277]), 'group_by': ([140, 213], [215, 215]), 'donde': ([140, 213], [216, 216]), 'order_by': ([140, 213], [217, 217]), 'group_having': ([140, 213], [218, 218]), 'limite': ([140, 213], [219, 219]), 'where': ([175], [242]), 'condition_column_row': ([177], [245]), 'inherits_statement': ([193], [252]), 'op_unique': ([195], [256]), 'list_key': ([201], [261]), 'mode_': ([203], [264]), 'ow_op': ([207], [267]), 'alter_col_op': ([208], [271]), 'list_id': ([257, 262, 263, 276, 363], [304, 309, 310, 318, 364]), 'alias': ([257, 262, 263, 276, 334, 363], [305, 305, 305, 305, 352, 305]), 'asc_desc': ([320], [343]), 'nulls_f_l': ([343], [356])}
_lr_goto = {}
for (_k, _v) in _lr_goto_items.items():
for (_x, _y) in zip(_v[0], _v[1]):
if not _x in _lr_goto:
_lr_goto[_x] = {}
_lr_goto[_x][_k] = _y
del _lr_goto_items
_lr_productions = [("S' -> init", "S'", 1, None, None, None), ('init -> instrucciones', 'init', 1, 'p_init', 'sql_grammar.py', 295), ('instrucciones -> instrucciones instruccion', 'instrucciones', 2, 'p_instrucciones_lista', 'sql_grammar.py', 299), ('instrucciones -> instruccion', 'instrucciones', 1, 'p_instrucciones_instruccion', 'sql_grammar.py', 304), ('instruccion -> crear_statement PUNTOCOMA', 'instruccion', 2, 'p_instruccion', 'sql_grammar.py', 308), ('instruccion -> alter_statement PUNTOCOMA', 'instruccion', 2, 'p_instruccion', 'sql_grammar.py', 309), ('instruccion -> drop_statement PUNTOCOMA', 'instruccion', 2, 'p_instruccion', 'sql_grammar.py', 310), ('instruccion -> seleccionar PUNTOCOMA', 'instruccion', 2, 'p_instruccion', 'sql_grammar.py', 311), ('instruccion -> SHOW DATABASES PUNTOCOMA', 'instruccion', 3, 'p_aux_instruccion', 'sql_grammar.py', 315), ('instruccion -> INSERT INTO ID VALUES PAR_ABRE list_val PAR_CIERRA PUNTOCOMA', 'instruccion', 8, 'p_aux_instruccion', 'sql_grammar.py', 316), ('instruccion -> UPDATE ID SET ID IGUAL op_val where PUNTOCOMA', 'instruccion', 8, 'p_aux_instruccion', 'sql_grammar.py', 317), ('instruccion -> DELETE FROM ID WHERE ID IGUAL op_val PUNTOCOMA', 'instruccion', 8, 'p_aux_instruccion', 'sql_grammar.py', 318), ('instruccion -> USE DATABASE ID PUNTOCOMA', 'instruccion', 4, 'p_aux_instruccion', 'sql_grammar.py', 319), ('crear_statement -> CREATE TABLE ID PAR_ABRE contenido_tabla PAR_CIERRA inherits_statement', 'crear_statement', 7, 'p_crear_statement_tbl', 'sql_grammar.py', 338), ('crear_statement -> CREATE or_replace DATABASE if_not_exists ID owner_ mode_', 'crear_statement', 7, 'p_crear_statement_db', 'sql_grammar.py', 344), ('or_replace -> OR REPLACE', 'or_replace', 2, 'p_or_replace_db', 'sql_grammar.py', 350), ('or_replace -> <empty>', 'or_replace', 0, 'p_or_replace_db', 'sql_grammar.py', 351), ('if_not_exists -> IF NOT EXISTS', 'if_not_exists', 3, 'p_if_not_exists_db', 'sql_grammar.py', 359), ('if_not_exists -> <empty>', 'if_not_exists', 0, 'p_if_not_exists_db', 'sql_grammar.py', 360), ('owner_ -> OWNER IGUAL ID', 'owner_', 3, 'p_owner_db', 'sql_grammar.py', 368), ('owner_ -> <empty>', 'owner_', 0, 'p_owner_db', 'sql_grammar.py', 369), ('mode_ -> MODE IGUAL ENTERO', 'mode_', 3, 'p_mode_db', 'sql_grammar.py', 379), ('mode_ -> <empty>', 'mode_', 0, 'p_mode_db', 'sql_grammar.py', 380), ('alter_statement -> ALTER DATABASE ID rename_owner', 'alter_statement', 4, 'p_alter_db', 'sql_grammar.py', 390), ('alter_statement -> ALTER TABLE ID alter_op', 'alter_statement', 4, 'p_alter_tbl', 'sql_grammar.py', 396), ('rename_owner -> RENAME TO ID', 'rename_owner', 3, 'p_rename_owner_db', 'sql_grammar.py', 403), ('rename_owner -> OWNER TO LLAVE_ABRE ow_op LLAVE_CIERRA', 'rename_owner', 5, 'p_rename_owner_db', 'sql_grammar.py', 404), ('ow_op -> ID', 'ow_op', 1, 'p_ow_op_db', 'sql_grammar.py', 414), ('ow_op -> CURRENT_USER', 'ow_op', 1, 'p_ow_op_db', 'sql_grammar.py', 415), ('ow_op -> SESSION_USER', 'ow_op', 1, 'p_ow_op_db', 'sql_grammar.py', 416), ('drop_statement -> DROP DATABASE if_exists ID', 'drop_statement', 4, 'p_drop_db', 'sql_grammar.py', 420), ('drop_statement -> DROP TABLE ID', 'drop_statement', 3, 'p_drop_tbl', 'sql_grammar.py', 430), ('if_exists -> IF EXISTS', 'if_exists', 2, 'p_if_exists_db', 'sql_grammar.py', 436), ('if_exists -> <empty>', 'if_exists', 0, 'p_if_exists_db', 'sql_grammar.py', 437), ('contenido_tabla -> contenido_tabla COMA manejo_tabla', 'contenido_tabla', 3, 'p_contenido_tabla', 'sql_grammar.py', 444), ('contenido_tabla -> manejo_tabla', 'contenido_tabla', 1, 'p_aux_contenido_table', 'sql_grammar.py', 449), ('manejo_tabla -> declaracion_columna', 'manejo_tabla', 1, 'p_manejo_tabla', 'sql_grammar.py', 453), ('manejo_tabla -> condition_column', 'manejo_tabla', 1, 'p_manejo_tabla', 'sql_grammar.py', 454), ('declaracion_columna -> ID type_column condition_column_row', 'declaracion_columna', 3, 'p_aux_declaracion_columna', 'sql_grammar.py', 458), ('declaracion_columna -> ID type_column', 'declaracion_columna', 2, 'p_declaracion_columna', 'sql_grammar.py', 464), ('type_column -> SMALLINT', 'type_column', 1, 'p_type_column', 'sql_grammar.py', 470), ('type_column -> INTEGER', 'type_column', 1, 'p_type_column', 'sql_grammar.py', 471), ('type_column -> BIGINT', 'type_column', 1, 'p_type_column', 'sql_grammar.py', 472), ('type_column -> DECIMAL', 'type_column', 1, 'p_type_column', 'sql_grammar.py', 473), ('type_column -> NUMERIC', 'type_column', 1, 'p_type_column', 'sql_grammar.py', 474), ('type_column -> REAL', 'type_column', 1, 'p_type_column', 'sql_grammar.py', 475), ('type_column -> DOUBLE PRECISION', 'type_column', 2, 'p_type_column', 'sql_grammar.py', 476), ('type_column -> MONEY', 'type_column', 1, 'p_type_column', 'sql_grammar.py', 477), ('type_column -> VARCHAR PAR_ABRE ENTERO PAR_CIERRA', 'type_column', 4, 'p_type_column', 'sql_grammar.py', 478), ('type_column -> CHAR PAR_ABRE ENTERO PAR_CIERRA', 'type_column', 4, 'p_type_column', 'sql_grammar.py', 479), ('type_column -> CHARACTER PAR_ABRE ENTERO PAR_CIERRA', 'type_column', 4, 'p_type_column', 'sql_grammar.py', 480), ('type_column -> CHARACTER VARYING PAR_ABRE ENTERO PAR_CIERRA', 'type_column', 5, 'p_type_column', 'sql_grammar.py', 481), ('type_column -> TEXT', 'type_column', 1, 'p_type_column', 'sql_grammar.py', 482), ('type_column -> DATE', 'type_column', 1, 'p_type_column', 'sql_grammar.py', 483), ('type_column -> TIMESTAMP', 'type_column', 1, 'p_type_column', 'sql_grammar.py', 484), ('type_column -> TIME', 'type_column', 1, 'p_type_column', 'sql_grammar.py', 485), ('condition_column_row -> condition_column_row condition_column', 'condition_column_row', 2, 'p_condition_column_row', 'sql_grammar.py', 519), ('condition_column_row -> condition_column', 'condition_column_row', 1, 'p_aux_condition_column_row', 'sql_grammar.py', 524), ('condition_column -> constraint UNIQUE op_unique', 'condition_column', 3, 'p_condition_column', 'sql_grammar.py', 528), ('condition_column -> constraint CHECK PAR_ABRE expression PAR_CIERRA', 'condition_column', 5, 'p_condition_column', 'sql_grammar.py', 529), ('condition_column -> key_table', 'condition_column', 1, 'p_condition_column', 'sql_grammar.py', 530), ('condition_column -> DEFAULT op_val', 'condition_column', 2, 'p_aux_condition_column', 'sql_grammar.py', 546), ('condition_column -> NULL', 'condition_column', 1, 'p_aux_condition_column', 'sql_grammar.py', 547), ('condition_column -> NOT NULL', 'condition_column', 2, 'p_aux_condition_column', 'sql_grammar.py', 548), ('condition_column -> REFERENCE ID', 'condition_column', 2, 'p_aux_condition_column', 'sql_grammar.py', 549), ('condition_column -> CONSTRAINT ID key_table', 'condition_column', 3, 'p_aux_condition_column', 'sql_grammar.py', 550), ('condition_column -> <empty>', 'condition_column', 0, 'p_aux_condition_column', 'sql_grammar.py', 551), ('constraint -> CONSTRAINT ID', 'constraint', 2, 'p_constraint', 'sql_grammar.py', 575), ('constraint -> <empty>', 'constraint', 0, 'p_constraint', 'sql_grammar.py', 576), ('op_unique -> PAR_ABRE list_id PAR_CIERRA', 'op_unique', 3, 'p_op_unique', 'sql_grammar.py', 588), ('op_unique -> constraint CHECK PAR_ABRE expression PAR_CIERRA', 'op_unique', 5, 'p_op_unique', 'sql_grammar.py', 589), ('op_unique -> <empty>', 'op_unique', 0, 'p_op_unique', 'sql_grammar.py', 590), ('list_id -> list_id COMA alias', 'list_id', 3, 'p_list_id', 'sql_grammar.py', 604), ('list_id -> alias', 'list_id', 1, 'p_aux_list_id', 'sql_grammar.py', 609), ('alias -> ID', 'alias', 1, 'p_alias', 'sql_grammar.py', 613), ('key_table -> PRIMARY KEY list_key', 'key_table', 3, 'p_key_table', 'sql_grammar.py', 619), ('key_table -> FOREIGN KEY PAR_ABRE list_id PAR_CIERRA REFERENCES ID PAR_ABRE list_id PAR_CIERRA', 'key_table', 10, 'p_key_table', 'sql_grammar.py', 620), ('list_key -> PAR_ABRE list_id PAR_CIERRA', 'list_key', 3, 'p_list_key', 'sql_grammar.py', 633), ('list_key -> <empty>', 'list_key', 0, 'p_list_key', 'sql_grammar.py', 634), ('alter_op -> ADD op_add', 'alter_op', 2, 'p_alter_op', 'sql_grammar.py', 641), ('alter_op -> ALTER COLUMN ID alter_col_op', 'alter_op', 4, 'p_alter_op', 'sql_grammar.py', 642), ('alter_op -> DROP alter_drop ID', 'alter_op', 3, 'p_alter_op', 'sql_grammar.py', 643), ('alter_drop -> CONSTRAINT', 'alter_drop', 1, 'p_aux_alter_op', 'sql_grammar.py', 660), ('alter_drop -> COLUMN', 'alter_drop', 1, 'p_aux_alter_op', 'sql_grammar.py', 661), ('op_add -> CHECK PAR_ABRE ID DIFERENTE CADENA PAR_CIERRA', 'op_add', 6, 'p_op_add', 'sql_grammar.py', 666), ('op_add -> CONSTRAINT ID UNIQUE PAR_ABRE ID PAR_CIERRA', 'op_add', 6, 'p_op_add', 'sql_grammar.py', 667), ('op_add -> key_table REFERENCES PAR_ABRE list_id PAR_CIERRA', 'op_add', 5, 'p_op_add', 'sql_grammar.py', 668), ('alter_col_op -> SET NOT NULL', 'alter_col_op', 3, 'p_alter_col_op', 'sql_grammar.py', 685), ('alter_col_op -> TYPE type_column', 'alter_col_op', 2, 'p_alter_col_op', 'sql_grammar.py', 686), ('inherits_statement -> INHERITS PAR_ABRE ID PAR_CIERRA', 'inherits_statement', 4, 'p_inherits_tbl', 'sql_grammar.py', 699), ('inherits_statement -> <empty>', 'inherits_statement', 0, 'p_inherits_tbl', 'sql_grammar.py', 700), ('list_val -> list_val COMA op_val', 'list_val', 3, 'p_list_val', 'sql_grammar.py', 709), ('list_val -> op_val', 'list_val', 1, 'p_aux_list_val', 'sql_grammar.py', 714), ('op_val -> ID', 'op_val', 1, 'p_op_val', 'sql_grammar.py', 718), ('op_val -> CADENA', 'op_val', 1, 'p_op_val', 'sql_grammar.py', 719), ('op_val -> DECIMAL', 'op_val', 1, 'p_op_val', 'sql_grammar.py', 720), ('op_val -> ENTERO', 'op_val', 1, 'p_op_val', 'sql_grammar.py', 721), ('where -> WHERE ID IGUAL op_val', 'where', 4, 'p_where', 'sql_grammar.py', 725), ('where -> <empty>', 'where', 0, 'p_where', 'sql_grammar.py', 726), ('seleccionar -> SELECT distinto select_list FROM table_expression list_fin_select', 'seleccionar', 6, 'p_seleccionar', 'sql_grammar.py', 736), ('seleccionar -> SELECT GREATEST expressiones', 'seleccionar', 3, 'p_aux_seleccionar', 'sql_grammar.py', 746), ('seleccionar -> SELECT LEAST expressiones', 'seleccionar', 3, 'p_aux_seleccionar', 'sql_grammar.py', 747), ('list_fin_select -> list_fin_select fin_select', 'list_fin_select', 2, 'p_list_fin_select', 'sql_grammar.py', 753), ('list_fin_select -> fin_select', 'list_fin_select', 1, 'p_aux_list_fin_select', 'sql_grammar.py', 758), ('fin_select -> group_by', 'fin_select', 1, 'p_fin_select', 'sql_grammar.py', 762), ('fin_select -> donde', 'fin_select', 1, 'p_fin_select', 'sql_grammar.py', 763), ('fin_select -> order_by', 'fin_select', 1, 'p_fin_select', 'sql_grammar.py', 764), ('fin_select -> group_having', 'fin_select', 1, 'p_fin_select', 'sql_grammar.py', 765), ('fin_select -> limite', 'fin_select', 1, 'p_fin_select', 'sql_grammar.py', 766), ('fin_select -> <empty>', 'fin_select', 0, 'p_fin_select', 'sql_grammar.py', 767), ('expressiones -> PAR_ABRE list_expression PAR_CIERRA', 'expressiones', 3, 'p_expressiones', 'sql_grammar.py', 774), ('expressiones -> list_expression', 'expressiones', 1, 'p_aux_expressiones', 'sql_grammar.py', 778), ('distinto -> DISTINCT', 'distinto', 1, 'p_distinto', 'sql_grammar.py', 782), ('distinto -> <empty>', 'distinto', 0, 'p_distinto', 'sql_grammar.py', 783), ('select_list -> ASTERISCO', 'select_list', 1, 'p_select_list', 'sql_grammar.py', 790), ('select_list -> expressiones', 'select_list', 1, 'p_select_list', 'sql_grammar.py', 791), ('table_expression -> expressiones', 'table_expression', 1, 'p_table_expression', 'sql_grammar.py', 795), ('donde -> WHERE expressiones', 'donde', 2, 'p_donde', 'sql_grammar.py', 799), ('group_by -> GROUP BY expressiones', 'group_by', 3, 'p_group_by', 'sql_grammar.py', 808), ('order_by -> ORDER BY expressiones asc_desc nulls_f_l', 'order_by', 5, 'p_order_by', 'sql_grammar.py', 817), ('group_having -> HAVING expressiones', 'group_having', 2, 'p_group_having', 'sql_grammar.py', 826), ('asc_desc -> ASC', 'asc_desc', 1, 'p_asc_desc', 'sql_grammar.py', 835), ('asc_desc -> DESC', 'asc_desc', 1, 'p_asc_desc', 'sql_grammar.py', 836), ('nulls_f_l -> NULLS LAST', 'nulls_f_l', 2, 'p_nulls_f_l', 'sql_grammar.py', 840), ('nulls_f_l -> NULLS FIRST', 'nulls_f_l', 2, 'p_nulls_f_l', 'sql_grammar.py', 841), ('nulls_f_l -> <empty>', 'nulls_f_l', 0, 'p_nulls_f_l', 'sql_grammar.py', 842), ('limite -> LIMIT ENTERO', 'limite', 2, 'p_limite', 'sql_grammar.py', 849), ('limite -> LIMIT ALL', 'limite', 2, 'p_limite', 'sql_grammar.py', 850), ('limite -> OFFSET ENTERO', 'limite', 2, 'p_limite', 'sql_grammar.py', 851), ('list_expression -> list_expression COMA expression', 'list_expression', 3, 'p_list_expression', 'sql_grammar.py', 860), ('list_expression -> expression', 'list_expression', 1, 'p_aux_list_expression', 'sql_grammar.py', 865), ('expression -> expression MAYOR expression', 'expression', 3, 'p_expression', 'sql_grammar.py', 869), ('expression -> expression MENOR expression', 'expression', 3, 'p_expression', 'sql_grammar.py', 870), ('expression -> expression MAYOR_IGUAL expression', 'expression', 3, 'p_expression', 'sql_grammar.py', 871), ('expression -> expression MENOR_IGUAL expression', 'expression', 3, 'p_expression', 'sql_grammar.py', 872), ('expression -> expression AND expression', 'expression', 3, 'p_expression', 'sql_grammar.py', 873), ('expression -> expression OR expression', 'expression', 3, 'p_expression', 'sql_grammar.py', 874), ('expression -> NOT expression', 'expression', 2, 'p_expression', 'sql_grammar.py', 875), ('expression -> expression IGUAL expression', 'expression', 3, 'p_expression', 'sql_grammar.py', 876), ('expression -> expression NO_IGUAL expression', 'expression', 3, 'p_expression', 'sql_grammar.py', 877), ('expression -> expression DIFERENTE expression', 'expression', 3, 'p_expression', 'sql_grammar.py', 878), ('expression -> PAR_ABRE expression PAR_CIERRA', 'expression', 3, 'p_expression', 'sql_grammar.py', 879), ('expression -> expression BETWEEN expression AND expression', 'expression', 5, 'p_expression', 'sql_grammar.py', 880), ('expression -> expression NOT BETWEEN expression AND expression', 'expression', 6, 'p_expression', 'sql_grammar.py', 881), ('expression -> expression BETWEEN SYMMETRIC expression AND expression', 'expression', 6, 'p_expression', 'sql_grammar.py', 882), ('expression -> expression NOT BETWEEN SYMMETRIC expression AND expression', 'expression', 7, 'p_expression', 'sql_grammar.py', 883), ('expression -> expression IS DISTINCT FROM expression', 'expression', 5, 'p_expression', 'sql_grammar.py', 884), ('expression -> expression IS NOT DISTINCT FROM expression', 'expression', 6, 'p_expression', 'sql_grammar.py', 885), ('expression -> ID PUNTO ID', 'expression', 3, 'p_expression', 'sql_grammar.py', 886), ('expression -> expression IS NULL', 'expression', 3, 'p_expression', 'sql_grammar.py', 887), ('expression -> expression IS NOT NULL', 'expression', 4, 'p_expression', 'sql_grammar.py', 888), ('expression -> expression ISNULL', 'expression', 2, 'p_expression', 'sql_grammar.py', 889), ('expression -> expression NOTNULL', 'expression', 2, 'p_expression', 'sql_grammar.py', 890), ('expression -> expression IS TRUE', 'expression', 3, 'p_expression', 'sql_grammar.py', 891), ('expression -> expression IS NOT TRUE', 'expression', 4, 'p_expression', 'sql_grammar.py', 892), ('expression -> expression IS FALSE', 'expression', 3, 'p_expression', 'sql_grammar.py', 893), ('expression -> expression IS NOT FALSE', 'expression', 4, 'p_expression', 'sql_grammar.py', 894), ('expression -> expression IS UNKNOWN', 'expression', 3, 'p_expression', 'sql_grammar.py', 895), ('expression -> expression IS NOT UNKNOWN', 'expression', 4, 'p_expression', 'sql_grammar.py', 896), ('expression -> SUBSTRING PAR_ABRE expression COMA expression COMA expression PAR_CIERRA', 'expression', 8, 'p_expression', 'sql_grammar.py', 897), ('expression -> SUM PAR_ABRE expression PAR_CIERRA', 'expression', 4, 'p_expression', 'sql_grammar.py', 898), ('expression -> COUNT PAR_ABRE expression PAR_CIERRA', 'expression', 4, 'p_expression', 'sql_grammar.py', 899), ('expression -> AVG PAR_ABRE expression PAR_CIERRA', 'expression', 4, 'p_expression', 'sql_grammar.py', 900), ('expression -> seleccionar', 'expression', 1, 'p_expression', 'sql_grammar.py', 901), ('expression -> ID', 'expression', 1, 'p_solouno_expression', 'sql_grammar.py', 905), ('expression -> ASTERISCO', 'expression', 1, 'p_solouno_expression', 'sql_grammar.py', 906), ('expression -> ENTERO', 'expression', 1, 'p_expression_entero', 'sql_grammar.py', 916), ('expression -> DECIMAL_NUM', 'expression', 1, 'p_expression_decimal', 'sql_grammar.py', 934), ('expression -> CADENA', 'expression', 1, 'p_expression_cadena', 'sql_grammar.py', 961)] |
#!/usr/bin/env python
class Elf_parser:
"Extracts parts from ELF files"
def __init__(self, filename):
self.elf_file = filename
def get_text(self):
"Returns the text section of the ELF file as array"
pass
def get_data(self):
"Returns the data section of the ELF file as array"
pass
def hex_dump_text(self):
"Prints a hex dump of the text section"
pass
def hex_dump_data(self):
"Prints a hex dump of the data section"
pass
| class Elf_Parser:
"""Extracts parts from ELF files"""
def __init__(self, filename):
self.elf_file = filename
def get_text(self):
"""Returns the text section of the ELF file as array"""
pass
def get_data(self):
"""Returns the data section of the ELF file as array"""
pass
def hex_dump_text(self):
"""Prints a hex dump of the text section"""
pass
def hex_dump_data(self):
"""Prints a hex dump of the data section"""
pass |
"""
@file
@brief Shortcuts to *sklconv*.
"""
| """
@file
@brief Shortcuts to *sklconv*.
""" |
def parse_binary(binary_string):
if not all(char in ('0', '1') for char in binary_string):
raise ValueError('invalid binary number')
return sum(int(digit) * (2 ** power) for power, digit in enumerate(reversed(binary_string)))
| def parse_binary(binary_string):
if not all((char in ('0', '1') for char in binary_string)):
raise value_error('invalid binary number')
return sum((int(digit) * 2 ** power for (power, digit) in enumerate(reversed(binary_string)))) |
"""Main classes."""
class MainClass1:
"""Parent dummy class 1."""
pass
class MainClass2:
"""Parent dummy class 2."""
pass
class MainClass3:
"""Parent dummy class 3."""
pass
class MainClass4:
"""Parent dummy class 4."""
pass
class MainClass5:
"""Parent dummy class 5."""
pass
class MainClass6:
"""Parent dummy class 6."""
pass
class MainClass7:
"""Parent dummy class 7."""
pass
"""Child classes."""
class ChildClass1(MainClass1, MainClass2, MainClass3):
"""Represent many-to-one."""
pass
class ChildClass2(MainClass1):
"""Represent one-to-many."""
pass
class ChildClass3(MainClass1):
"""Represent one-to-many."""
pass
class ChildClass4(MainClass1):
"""Represent one-to-many."""
pass
class ChildClass5(MainClass4):
"""Represent one-to-one."""
pass
class ChildClass6(MainClass5, MainClass6, MainClass7):
"""Represent many-to-many."""
pass
class ChildClass7(MainClass5, MainClass6, MainClass7):
"""Represent many-to-many."""
pass
class ChildClass8(MainClass5, MainClass6, MainClass7):
"""Represent many-to-many."""
pass
| """Main classes."""
class Mainclass1:
"""Parent dummy class 1."""
pass
class Mainclass2:
"""Parent dummy class 2."""
pass
class Mainclass3:
"""Parent dummy class 3."""
pass
class Mainclass4:
"""Parent dummy class 4."""
pass
class Mainclass5:
"""Parent dummy class 5."""
pass
class Mainclass6:
"""Parent dummy class 6."""
pass
class Mainclass7:
"""Parent dummy class 7."""
pass
'Child classes.'
class Childclass1(MainClass1, MainClass2, MainClass3):
"""Represent many-to-one."""
pass
class Childclass2(MainClass1):
"""Represent one-to-many."""
pass
class Childclass3(MainClass1):
"""Represent one-to-many."""
pass
class Childclass4(MainClass1):
"""Represent one-to-many."""
pass
class Childclass5(MainClass4):
"""Represent one-to-one."""
pass
class Childclass6(MainClass5, MainClass6, MainClass7):
"""Represent many-to-many."""
pass
class Childclass7(MainClass5, MainClass6, MainClass7):
"""Represent many-to-many."""
pass
class Childclass8(MainClass5, MainClass6, MainClass7):
"""Represent many-to-many."""
pass |
class SystemFonts(object):
""" Specifies the fonts used to display text in Windows display elements. """
@staticmethod
def GetFontByName(systemFontName):
"""
GetFontByName(systemFontName: str) -> Font
Returns a font object that corresponds to the specified system font name.
systemFontName: The name of the system font you need a font object for.
Returns: A System.Drawing.Font if the specified name matches a value in
System.Drawing.SystemFonts; otherwise,null.
"""
pass
CaptionFont=None
DefaultFont=None
DialogFont=None
IconTitleFont=None
MenuFont=None
MessageBoxFont=None
SmallCaptionFont=None
StatusFont=None
| class Systemfonts(object):
""" Specifies the fonts used to display text in Windows display elements. """
@staticmethod
def get_font_by_name(systemFontName):
"""
GetFontByName(systemFontName: str) -> Font
Returns a font object that corresponds to the specified system font name.
systemFontName: The name of the system font you need a font object for.
Returns: A System.Drawing.Font if the specified name matches a value in
System.Drawing.SystemFonts; otherwise,null.
"""
pass
caption_font = None
default_font = None
dialog_font = None
icon_title_font = None
menu_font = None
message_box_font = None
small_caption_font = None
status_font = None |
# -*- coding: utf-8 -*-
# Copyright 2021 Cohesity Inc.
class BackupSourceStats(object):
"""Implementation of the 'BackupSourceStats' model.
Specifies statistics about a Backup task in a Protection Job Run.
Specifies statistics for one backup task. One backup task is used to
backup on Protection Source. This structure is also used to aggregate
stats of a Backup tasks in a Protection Job Run.
Attributes:
queue_duration_usecs (long|int): "Specifies the duration between the
startTime and when gatekeeper permit is granted to the backup
task. If the backup task is rescheduled due to errors, the field
is updated considering the time when permit is granted again.
Queue duration = PermitGrantTimeUsecs - StartTimeUsecs"
total_bytes_tiered (long|int): Specifies the total amount of data
successfully tiered from the source.
admitted_time_usecs (long|int): Specifies the time the task was
unqueued from the queue to start running. This field can be used
to determine the following times: initial-wait-time =
admittedTimeUsecs - startTimeUsecs run-time = endTimeUsecs -
admittedTimeUsecs If the task ends up waiting in other queues,
then actual run-time will be smaller than the run-time computed
this way. This field is only populated for Backup tasks
currently.
end_time_usecs (long|int): Specifies the end time of the Protection
Run. The end time is specified as a Unix epoch Timestamp (in
microseconds).
permit_grant_time_usecs (long|int): Specifies the time when gatekeeper
permit is granted to the backup task. If the backup task is
rescheduled due to errors, the field is updated to
the time when permit is granted again.
start_time_usecs (long|int): Specifies the start time of the
Protection Run. The start time is specified as a Unix epoch
Timestamp (in microseconds). This time is when the task is queued
to an internal queue where tasks are waiting to run.
time_taken_usecs (long|int): Specifies the actual execution time for
the protection run to complete the backup task and the copy tasks.
This time will not include the time waited in various internal
queues. This field is only populated for Backup tasks currently.
total_bytes_read_from_source (long|int): Specifies the total amount of
data read from the source (so far).
total_bytes_to_read_from_source (long|int): Specifies the total amount
of data expected to be read from the source.
total_logical_backup_size_bytes (long|int): Specifies the size of the
source object (such as a VM) protected by this task on the primary
storage after the snapshot is taken. The logical size of the data
on the source if the data is fully hydrated or expanded and not
reduced by change-block tracking, compression and deduplication.
total_physical_backup_size_bytes (long|int): Specifies the total
amount of physical space used on the Cohesity Cluster to store the
protected object after being reduced by change-block tracking,
compression and deduplication. For example, if the logical backup
size is 1GB, but only 1MB was used on the Cohesity Cluster to
store it, this field be equal to 1MB.
total_source_size_bytes (long|int): Specifies the size of the source
object (such as a VM) protected by this task on the primary
storage before the snapshot is taken. The logical size of the data
on the source if the data is fully hydrated or expanded and not
reduced by change-block tracking, compression and deduplication.
"""
# Create a mapping from Model property names to API property names
_names = {
"queue_duration_usecs":'QueueDurationUsecs',
"total_bytes_tiered":'TotalBytesTiered',
"admitted_time_usecs":'admittedTimeUsecs',
"end_time_usecs":'endTimeUsecs',
"permit_grant_time_usecs":'permitGrantTimeUsecs',
"start_time_usecs":'startTimeUsecs',
"time_taken_usecs":'timeTakenUsecs',
"total_bytes_read_from_source":'totalBytesReadFromSource',
"total_bytes_to_read_from_source":'totalBytesToReadFromSource',
"total_logical_backup_size_bytes":'totalLogicalBackupSizeBytes',
"total_physical_backup_size_bytes":'totalPhysicalBackupSizeBytes',
"total_source_size_bytes":'totalSourceSizeBytes'
}
def __init__(self,
queue_duration_usecs=None,
total_bytes_tiered=None,
admitted_time_usecs=None,
end_time_usecs=None,
permit_grant_time_usecs=None,
start_time_usecs=None,
time_taken_usecs=None,
total_bytes_read_from_source=None,
total_bytes_to_read_from_source=None,
total_logical_backup_size_bytes=None,
total_physical_backup_size_bytes=None,
total_source_size_bytes=None):
"""Constructor for the BackupSourceStats class"""
# Initialize members of the class
self.queue_duration_usecs = queue_duration_usecs
self.total_bytes_tiered = total_bytes_tiered
self.admitted_time_usecs = admitted_time_usecs
self.end_time_usecs = end_time_usecs
self.permit_grant_time_usecs = permit_grant_time_usecs
self.start_time_usecs = start_time_usecs
self.time_taken_usecs = time_taken_usecs
self.total_bytes_read_from_source = total_bytes_read_from_source
self.total_bytes_to_read_from_source = total_bytes_to_read_from_source
self.total_logical_backup_size_bytes = total_logical_backup_size_bytes
self.total_physical_backup_size_bytes = total_physical_backup_size_bytes
self.total_source_size_bytes = total_source_size_bytes
@classmethod
def from_dictionary(cls,
dictionary):
"""Creates an instance of this model from a dictionary
Args:
dictionary (dictionary): A dictionary representation of the object as
obtained from the deserialization of the server's response. The keys
MUST match property names in the API description.
Returns:
object: An instance of this structure class.
"""
if dictionary is None:
return None
# Extract variables from the dictionary
queue_duration_usecs = dictionary.get('QueueDurationUsecs')
total_bytes_tiered = dictionary.get('TotalBytesTiered')
admitted_time_usecs = dictionary.get('admittedTimeUsecs')
end_time_usecs = dictionary.get('endTimeUsecs')
permit_grant_time_usecs = dictionary.get('permitGrantTimeUsecs')
start_time_usecs = dictionary.get('startTimeUsecs')
time_taken_usecs = dictionary.get('timeTakenUsecs')
total_bytes_read_from_source = dictionary.get('totalBytesReadFromSource')
total_bytes_to_read_from_source = dictionary.get('totalBytesToReadFromSource')
total_logical_backup_size_bytes = dictionary.get('totalLogicalBackupSizeBytes')
total_physical_backup_size_bytes = dictionary.get('totalPhysicalBackupSizeBytes')
total_source_size_bytes = dictionary.get('totalSourceSizeBytes')
# Return an object of this model
return cls(queue_duration_usecs,
total_bytes_tiered,
admitted_time_usecs,
end_time_usecs,
permit_grant_time_usecs,
start_time_usecs,
time_taken_usecs,
total_bytes_read_from_source,
total_bytes_to_read_from_source,
total_logical_backup_size_bytes,
total_physical_backup_size_bytes,
total_source_size_bytes)
| class Backupsourcestats(object):
"""Implementation of the 'BackupSourceStats' model.
Specifies statistics about a Backup task in a Protection Job Run.
Specifies statistics for one backup task. One backup task is used to
backup on Protection Source. This structure is also used to aggregate
stats of a Backup tasks in a Protection Job Run.
Attributes:
queue_duration_usecs (long|int): "Specifies the duration between the
startTime and when gatekeeper permit is granted to the backup
task. If the backup task is rescheduled due to errors, the field
is updated considering the time when permit is granted again.
Queue duration = PermitGrantTimeUsecs - StartTimeUsecs"
total_bytes_tiered (long|int): Specifies the total amount of data
successfully tiered from the source.
admitted_time_usecs (long|int): Specifies the time the task was
unqueued from the queue to start running. This field can be used
to determine the following times: initial-wait-time =
admittedTimeUsecs - startTimeUsecs run-time = endTimeUsecs -
admittedTimeUsecs If the task ends up waiting in other queues,
then actual run-time will be smaller than the run-time computed
this way. This field is only populated for Backup tasks
currently.
end_time_usecs (long|int): Specifies the end time of the Protection
Run. The end time is specified as a Unix epoch Timestamp (in
microseconds).
permit_grant_time_usecs (long|int): Specifies the time when gatekeeper
permit is granted to the backup task. If the backup task is
rescheduled due to errors, the field is updated to
the time when permit is granted again.
start_time_usecs (long|int): Specifies the start time of the
Protection Run. The start time is specified as a Unix epoch
Timestamp (in microseconds). This time is when the task is queued
to an internal queue where tasks are waiting to run.
time_taken_usecs (long|int): Specifies the actual execution time for
the protection run to complete the backup task and the copy tasks.
This time will not include the time waited in various internal
queues. This field is only populated for Backup tasks currently.
total_bytes_read_from_source (long|int): Specifies the total amount of
data read from the source (so far).
total_bytes_to_read_from_source (long|int): Specifies the total amount
of data expected to be read from the source.
total_logical_backup_size_bytes (long|int): Specifies the size of the
source object (such as a VM) protected by this task on the primary
storage after the snapshot is taken. The logical size of the data
on the source if the data is fully hydrated or expanded and not
reduced by change-block tracking, compression and deduplication.
total_physical_backup_size_bytes (long|int): Specifies the total
amount of physical space used on the Cohesity Cluster to store the
protected object after being reduced by change-block tracking,
compression and deduplication. For example, if the logical backup
size is 1GB, but only 1MB was used on the Cohesity Cluster to
store it, this field be equal to 1MB.
total_source_size_bytes (long|int): Specifies the size of the source
object (such as a VM) protected by this task on the primary
storage before the snapshot is taken. The logical size of the data
on the source if the data is fully hydrated or expanded and not
reduced by change-block tracking, compression and deduplication.
"""
_names = {'queue_duration_usecs': 'QueueDurationUsecs', 'total_bytes_tiered': 'TotalBytesTiered', 'admitted_time_usecs': 'admittedTimeUsecs', 'end_time_usecs': 'endTimeUsecs', 'permit_grant_time_usecs': 'permitGrantTimeUsecs', 'start_time_usecs': 'startTimeUsecs', 'time_taken_usecs': 'timeTakenUsecs', 'total_bytes_read_from_source': 'totalBytesReadFromSource', 'total_bytes_to_read_from_source': 'totalBytesToReadFromSource', 'total_logical_backup_size_bytes': 'totalLogicalBackupSizeBytes', 'total_physical_backup_size_bytes': 'totalPhysicalBackupSizeBytes', 'total_source_size_bytes': 'totalSourceSizeBytes'}
def __init__(self, queue_duration_usecs=None, total_bytes_tiered=None, admitted_time_usecs=None, end_time_usecs=None, permit_grant_time_usecs=None, start_time_usecs=None, time_taken_usecs=None, total_bytes_read_from_source=None, total_bytes_to_read_from_source=None, total_logical_backup_size_bytes=None, total_physical_backup_size_bytes=None, total_source_size_bytes=None):
"""Constructor for the BackupSourceStats class"""
self.queue_duration_usecs = queue_duration_usecs
self.total_bytes_tiered = total_bytes_tiered
self.admitted_time_usecs = admitted_time_usecs
self.end_time_usecs = end_time_usecs
self.permit_grant_time_usecs = permit_grant_time_usecs
self.start_time_usecs = start_time_usecs
self.time_taken_usecs = time_taken_usecs
self.total_bytes_read_from_source = total_bytes_read_from_source
self.total_bytes_to_read_from_source = total_bytes_to_read_from_source
self.total_logical_backup_size_bytes = total_logical_backup_size_bytes
self.total_physical_backup_size_bytes = total_physical_backup_size_bytes
self.total_source_size_bytes = total_source_size_bytes
@classmethod
def from_dictionary(cls, dictionary):
"""Creates an instance of this model from a dictionary
Args:
dictionary (dictionary): A dictionary representation of the object as
obtained from the deserialization of the server's response. The keys
MUST match property names in the API description.
Returns:
object: An instance of this structure class.
"""
if dictionary is None:
return None
queue_duration_usecs = dictionary.get('QueueDurationUsecs')
total_bytes_tiered = dictionary.get('TotalBytesTiered')
admitted_time_usecs = dictionary.get('admittedTimeUsecs')
end_time_usecs = dictionary.get('endTimeUsecs')
permit_grant_time_usecs = dictionary.get('permitGrantTimeUsecs')
start_time_usecs = dictionary.get('startTimeUsecs')
time_taken_usecs = dictionary.get('timeTakenUsecs')
total_bytes_read_from_source = dictionary.get('totalBytesReadFromSource')
total_bytes_to_read_from_source = dictionary.get('totalBytesToReadFromSource')
total_logical_backup_size_bytes = dictionary.get('totalLogicalBackupSizeBytes')
total_physical_backup_size_bytes = dictionary.get('totalPhysicalBackupSizeBytes')
total_source_size_bytes = dictionary.get('totalSourceSizeBytes')
return cls(queue_duration_usecs, total_bytes_tiered, admitted_time_usecs, end_time_usecs, permit_grant_time_usecs, start_time_usecs, time_taken_usecs, total_bytes_read_from_source, total_bytes_to_read_from_source, total_logical_backup_size_bytes, total_physical_backup_size_bytes, total_source_size_bytes) |
sample_rate = 16000
"""number: Target sample rate during feature extraction."""
n_window = 1024
"""int: Size of STFT window."""
hop_length = 664
"""int: Number of samples between frames."""
n_mels = 64
"""int: Number of Mel bins."""
| sample_rate = 16000
'number: Target sample rate during feature extraction.'
n_window = 1024
'int: Size of STFT window.'
hop_length = 664
'int: Number of samples between frames.'
n_mels = 64
'int: Number of Mel bins.' |
# Copyright (c) 2021 Huawei Technologies Co.,Ltd. All rights reserved.
#
# StratoVirt is licensed under Mulan PSL v2.
# You can use this software according to the terms and conditions of the Mulan
# PSL v2.
# You may obtain a copy of Mulan PSL v2 at:
# http:#license.coscl.org.cn/MulanPSL2
# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY
# KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
# NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
# See the Mulan PSL v2 for more details.
"""Exceptions"""
class UnknownFeatureException(Exception):
"""Exception Class for invalid build feature."""
def __init__(self):
"""Just a constructor."""
Exception.__init__(
self,
"Trying to get build binaries for unknown feature!"
)
# ssh error
class SSHError(Exception):
"""SSH error exception"""
def __init__(self, msg, output):
Exception.__init__(self, msg, output)
self.msg = msg
self.output = output
def __str__(self):
return "->message: %s ->(output: %r)" % (self.msg, self.output)
class LoginAuthenticationError(SSHError):
"""Login authentication error exception"""
class LoginTimeoutError(SSHError):
"""Login timeout error exception"""
def __init__(self, output):
SSHError.__init__(self, "Login timeout expired", output)
class LoginProcessTerminatedError(SSHError):
"""Login process terminated error exception"""
def __init__(self, status, output):
SSHError.__init__(self, None, output)
self.status = status
def __str__(self):
return ("Client process terminated (status: %s, output: %r)" %
(self.status, self.output))
class LoginBadClientError(SSHError):
"""Login bad client error exception"""
def __init__(self, client):
SSHError.__init__(self, None, None)
self.client = client
def __str__(self):
return "Unknown remote shell client: %r" % self.client
class SCPAuthenticationError(SSHError):
"""SCP authentication error exception"""
class SCPAuthenticationTimeoutError(SCPAuthenticationError):
"""SCP authentication timeout error exception"""
def __init__(self, output):
SCPAuthenticationError.__init__(self, "Authentication timeout expired",
output)
class SCPTransferTimeoutError(SSHError):
"""SCP transfer timeout error exception"""
def __init__(self, output):
SSHError.__init__(self, "Transfer timeout expired", output)
class SCPTransferError(SSHError):
"""SCP transfer failed exception"""
def __init__(self, status, output):
SSHError.__init__(self, None, output)
self.status = status
def __str__(self):
return ("SCP transfer failed (status: %s, output: %r)" %
(self.status, self.output))
# console error
class ConsoleError(Exception):
"""Console base exception"""
class NoConsoleError(ConsoleError):
"""No Console Error"""
def __str__(self):
return "No console available"
class ConsoleBusyError(ConsoleError):
"""Console Busy Error"""
def __str__(self):
return "Console is in use"
# qmp error
class QMPError(Exception):
"""QMP base exception"""
class QMPConnectError(QMPError):
"""QMP connection exception"""
class QMPCapabilitiesError(QMPError):
"""QMP negotiate capabilities exception"""
class QMPTimeoutError(QMPError):
"""QMP timeout exception"""
class VMLifeError(Exception):
"""Vmlife error exception"""
| """Exceptions"""
class Unknownfeatureexception(Exception):
"""Exception Class for invalid build feature."""
def __init__(self):
"""Just a constructor."""
Exception.__init__(self, 'Trying to get build binaries for unknown feature!')
class Ssherror(Exception):
"""SSH error exception"""
def __init__(self, msg, output):
Exception.__init__(self, msg, output)
self.msg = msg
self.output = output
def __str__(self):
return '->message: %s ->(output: %r)' % (self.msg, self.output)
class Loginauthenticationerror(SSHError):
"""Login authentication error exception"""
class Logintimeouterror(SSHError):
"""Login timeout error exception"""
def __init__(self, output):
SSHError.__init__(self, 'Login timeout expired', output)
class Loginprocessterminatederror(SSHError):
"""Login process terminated error exception"""
def __init__(self, status, output):
SSHError.__init__(self, None, output)
self.status = status
def __str__(self):
return 'Client process terminated (status: %s, output: %r)' % (self.status, self.output)
class Loginbadclienterror(SSHError):
"""Login bad client error exception"""
def __init__(self, client):
SSHError.__init__(self, None, None)
self.client = client
def __str__(self):
return 'Unknown remote shell client: %r' % self.client
class Scpauthenticationerror(SSHError):
"""SCP authentication error exception"""
class Scpauthenticationtimeouterror(SCPAuthenticationError):
"""SCP authentication timeout error exception"""
def __init__(self, output):
SCPAuthenticationError.__init__(self, 'Authentication timeout expired', output)
class Scptransfertimeouterror(SSHError):
"""SCP transfer timeout error exception"""
def __init__(self, output):
SSHError.__init__(self, 'Transfer timeout expired', output)
class Scptransfererror(SSHError):
"""SCP transfer failed exception"""
def __init__(self, status, output):
SSHError.__init__(self, None, output)
self.status = status
def __str__(self):
return 'SCP transfer failed (status: %s, output: %r)' % (self.status, self.output)
class Consoleerror(Exception):
"""Console base exception"""
class Noconsoleerror(ConsoleError):
"""No Console Error"""
def __str__(self):
return 'No console available'
class Consolebusyerror(ConsoleError):
"""Console Busy Error"""
def __str__(self):
return 'Console is in use'
class Qmperror(Exception):
"""QMP base exception"""
class Qmpconnecterror(QMPError):
"""QMP connection exception"""
class Qmpcapabilitieserror(QMPError):
"""QMP negotiate capabilities exception"""
class Qmptimeouterror(QMPError):
"""QMP timeout exception"""
class Vmlifeerror(Exception):
"""Vmlife error exception""" |
def f(x):
if(x>4):
return f(x-1)+2*x
elif(x>1 and x<=4):
return f(x-2)*x + x
else:
return x
print(f(6))
| def f(x):
if x > 4:
return f(x - 1) + 2 * x
elif x > 1 and x <= 4:
return f(x - 2) * x + x
else:
return x
print(f(6)) |
# encoding: utf-8
# module Grasshopper.GUI.Canvas.TagArtists calls itself TagArtists
# from Grasshopper,Version=1.0.0.20,Culture=neutral,PublicKeyToken=dda4f5ec2cd80803
# by generator 1.145
""" NamespaceTracker represent a CLS namespace. """
# no imports
# no functions
# classes
class GH_TagArtist(object,IGH_TagArtist):
# no doc
def Paint(self,canvas,channel):
""" Paint(self: GH_TagArtist,canvas: GH_Canvas,channel: GH_CanvasChannel) """
pass
def __init__(self,*args):
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod
def __new__(self,*args): #cannot find CLR constructor
""" __new__(cls: type,id: Guid) """
pass
def __repr__(self,*args):
""" __repr__(self: object) -> str """
pass
ID=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Get: ID(self: GH_TagArtist) -> Guid
"""
class GH_TagArtist_WirePainter(GH_TagArtist,IGH_TagArtist):
""" GH_TagArtist_WirePainter(source: IGH_Param,target: IGH_Param,colour: Color,width: int) """
def Paint(self,canvas,channel):
""" Paint(self: GH_TagArtist_WirePainter,canvas: GH_Canvas,channel: GH_CanvasChannel) """
pass
def __init__(self,*args):
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod
def __new__(self,source,target,colour,width):
""" __new__(cls: type,source: IGH_Param,target: IGH_Param,colour: Color,width: int) """
pass
WirePainter_ID=None
class IGH_TagArtist:
# no doc
def Paint(self,canvas,channel):
""" Paint(self: IGH_TagArtist,canvas: GH_Canvas,channel: GH_CanvasChannel) """
pass
def __init__(self,*args):
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
ID=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Get: ID(self: IGH_TagArtist) -> Guid
"""
| """ NamespaceTracker represent a CLS namespace. """
class Gh_Tagartist(object, IGH_TagArtist):
def paint(self, canvas, channel):
""" Paint(self: GH_TagArtist,canvas: GH_Canvas,channel: GH_CanvasChannel) """
pass
def __init__(self, *args):
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod
def __new__(self, *args):
""" __new__(cls: type,id: Guid) """
pass
def __repr__(self, *args):
""" __repr__(self: object) -> str """
pass
id = property(lambda self: object(), lambda self, v: None, lambda self: None)
'Get: ID(self: GH_TagArtist) -> Guid\n\n\n\n'
class Gh_Tagartist_Wirepainter(GH_TagArtist, IGH_TagArtist):
""" GH_TagArtist_WirePainter(source: IGH_Param,target: IGH_Param,colour: Color,width: int) """
def paint(self, canvas, channel):
""" Paint(self: GH_TagArtist_WirePainter,canvas: GH_Canvas,channel: GH_CanvasChannel) """
pass
def __init__(self, *args):
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
@staticmethod
def __new__(self, source, target, colour, width):
""" __new__(cls: type,source: IGH_Param,target: IGH_Param,colour: Color,width: int) """
pass
wire_painter_id = None
class Igh_Tagartist:
def paint(self, canvas, channel):
""" Paint(self: IGH_TagArtist,canvas: GH_Canvas,channel: GH_CanvasChannel) """
pass
def __init__(self, *args):
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
id = property(lambda self: object(), lambda self, v: None, lambda self: None)
'Get: ID(self: IGH_TagArtist) -> Guid\n\n\n\n' |
# Copyright 2016 Google Inc.
#
# 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.
"""Definition for Google Cloud Natural Language API entities.
An entity is used to describe a proper name extracted from text.
"""
class EntityType(object):
"""List of possible entity types."""
UNKNOWN = 'UNKNOWN'
"""Unknown entity type."""
PERSON = 'PERSON'
"""Person entity type."""
LOCATION = 'LOCATION'
"""Location entity type."""
ORGANIZATION = 'ORGANIZATION'
"""Organization entity type."""
EVENT = 'EVENT'
"""Event entity type."""
WORK_OF_ART = 'WORK_OF_ART'
"""Work of art entity type."""
CONSUMER_GOOD = 'CONSUMER_GOOD'
"""Consumer good entity type."""
OTHER = 'OTHER'
"""Other entity type (i.e. known but not classified)."""
class Entity(object):
"""A Google Cloud Natural Language API entity.
Represents a phrase in text that is a known entity, such as a person,
an organization, or location. The API associates information, such as
salience and mentions, with entities.
The only supported metadata (as of August 2016) is ``wikipedia_url``,
so this value will be removed from the passed in ``metadata``
and put in its own property.
.. _Entity message: https://cloud.google.com/natural-language/\
reference/rest/v1/Entity
.. _EntityType enum: https://cloud.google.com/natural-language/\
reference/rest/v1/Entity#Type
See `Entity message`_.
:type name: str
:param name: The name / phrase identified as the entity.
:type entity_type: str
:param entity_type: The type of the entity. See `EntityType enum`_.
:type metadata: dict
:param metadata: The metadata associated with the entity.
:type salience: float
:param salience: The prominence of the entity / phrase within the text
containing it.
:type mentions: list
:param mentions: List of strings that mention the entity.
"""
def __init__(self, name, entity_type, metadata, salience, mentions):
self.name = name
self.entity_type = entity_type
self.wikipedia_url = metadata.pop('wikipedia_url', None)
self.metadata = metadata
self.salience = salience
self.mentions = mentions
@classmethod
def from_api_repr(cls, payload):
"""Convert an Entity from the JSON API into an :class:`Entity`.
:param payload: dict
:type payload: The value from the backend.
:rtype: :class:`Entity`
:returns: The entity parsed from the API representation.
"""
name = payload['name']
entity_type = payload['type']
metadata = payload['metadata']
salience = payload['salience']
mentions = [value['text']['content']
for value in payload['mentions']]
return cls(name, entity_type, metadata, salience, mentions)
| """Definition for Google Cloud Natural Language API entities.
An entity is used to describe a proper name extracted from text.
"""
class Entitytype(object):
"""List of possible entity types."""
unknown = 'UNKNOWN'
'Unknown entity type.'
person = 'PERSON'
'Person entity type.'
location = 'LOCATION'
'Location entity type.'
organization = 'ORGANIZATION'
'Organization entity type.'
event = 'EVENT'
'Event entity type.'
work_of_art = 'WORK_OF_ART'
'Work of art entity type.'
consumer_good = 'CONSUMER_GOOD'
'Consumer good entity type.'
other = 'OTHER'
'Other entity type (i.e. known but not classified).'
class Entity(object):
"""A Google Cloud Natural Language API entity.
Represents a phrase in text that is a known entity, such as a person,
an organization, or location. The API associates information, such as
salience and mentions, with entities.
The only supported metadata (as of August 2016) is ``wikipedia_url``,
so this value will be removed from the passed in ``metadata``
and put in its own property.
.. _Entity message: https://cloud.google.com/natural-language/ reference/rest/v1/Entity
.. _EntityType enum: https://cloud.google.com/natural-language/ reference/rest/v1/Entity#Type
See `Entity message`_.
:type name: str
:param name: The name / phrase identified as the entity.
:type entity_type: str
:param entity_type: The type of the entity. See `EntityType enum`_.
:type metadata: dict
:param metadata: The metadata associated with the entity.
:type salience: float
:param salience: The prominence of the entity / phrase within the text
containing it.
:type mentions: list
:param mentions: List of strings that mention the entity.
"""
def __init__(self, name, entity_type, metadata, salience, mentions):
self.name = name
self.entity_type = entity_type
self.wikipedia_url = metadata.pop('wikipedia_url', None)
self.metadata = metadata
self.salience = salience
self.mentions = mentions
@classmethod
def from_api_repr(cls, payload):
"""Convert an Entity from the JSON API into an :class:`Entity`.
:param payload: dict
:type payload: The value from the backend.
:rtype: :class:`Entity`
:returns: The entity parsed from the API representation.
"""
name = payload['name']
entity_type = payload['type']
metadata = payload['metadata']
salience = payload['salience']
mentions = [value['text']['content'] for value in payload['mentions']]
return cls(name, entity_type, metadata, salience, mentions) |
"""
Code for identification of central nodes in a network.
Let G_v be the network where f_v is a variable, then a node is "significant" if #ATTRACTORS(G_v) > #ATTRACTORS(G),
and "central" if #ATTRACTORS(G_v) = max_u(#ATTRACTORS(G_u))
"""
| """
Code for identification of central nodes in a network.
Let G_v be the network where f_v is a variable, then a node is "significant" if #ATTRACTORS(G_v) > #ATTRACTORS(G),
and "central" if #ATTRACTORS(G_v) = max_u(#ATTRACTORS(G_u))
""" |
def stars_decorator(f):
def wrapper(n):
print("*" * 50)
f(n)
print("*" * 50)
return wrapper
# let's decorate greet:
@stars_decorator
def greet(name):
print("Howdy {}!".format(name))
# and use it:
greet("Pesho") | def stars_decorator(f):
def wrapper(n):
print('*' * 50)
f(n)
print('*' * 50)
return wrapper
@stars_decorator
def greet(name):
print('Howdy {}!'.format(name))
greet('Pesho') |
tabby_cat="\tI'm tabbed in";
persian_cat="I'm split\non s line."
backslash_cat="i'm \\ a \\ cat"
fat_cat="I'll do a list:\t* Cat food \t* Fishies \t* Catnip\n\t* Grass"
print(tabby_cat)
print(persian_cat)
print(backslash_cat)
print(fat_cat)
| tabby_cat = "\tI'm tabbed in"
persian_cat = "I'm split\non s line."
backslash_cat = "i'm \\ a \\ cat"
fat_cat = "I'll do a list:\t* Cat food \t* Fishies \t* Catnip\n\t* Grass"
print(tabby_cat)
print(persian_cat)
print(backslash_cat)
print(fat_cat) |
t= int(input("Enter the number of test cases\n"))
n=[]
stack=[]
for i in range(t):
n.append(input())
l=len(n[i])
stack.append([])
t=n[i][l-1]
stack[i].append(n[i][l-1])
for j in range(l-2,-1,-1):
if n[i][j]!=t:
stack[i].append(n[i][j])
t=n[i][j]
for i in stack:
while len(i)>0:
print(i.pop(),end="")
print()
| t = int(input('Enter the number of test cases\n'))
n = []
stack = []
for i in range(t):
n.append(input())
l = len(n[i])
stack.append([])
t = n[i][l - 1]
stack[i].append(n[i][l - 1])
for j in range(l - 2, -1, -1):
if n[i][j] != t:
stack[i].append(n[i][j])
t = n[i][j]
for i in stack:
while len(i) > 0:
print(i.pop(), end='')
print() |
def solution(a):
sm_num = min(a)
while not( all(x % sm_num == 0 for x in a)):
a = sorted(a)
lg_num = a[-1]
sm_num = a[0]
if lg_num % sm_num == 0:
a[-1] = sm_num
else:
a[-1] = lg_num % sm_num
return len(a) * sm_num | def solution(a):
sm_num = min(a)
while not all((x % sm_num == 0 for x in a)):
a = sorted(a)
lg_num = a[-1]
sm_num = a[0]
if lg_num % sm_num == 0:
a[-1] = sm_num
else:
a[-1] = lg_num % sm_num
return len(a) * sm_num |
class AnimeDLError(Exception):
pass
class URLError(AnimeDLError):
pass
class NotFoundError(AnimeDLError):
pass
| class Animedlerror(Exception):
pass
class Urlerror(AnimeDLError):
pass
class Notfounderror(AnimeDLError):
pass |
'''
Python program to format a specified string limiting the length of a string.
'''
str_num = "1234567890"
print("Original string:",str_num)
print('%.6s' % str_num)
print('%.9s' % str_num)
print('%.10s' % str_num)
| """
Python program to format a specified string limiting the length of a string.
"""
str_num = '1234567890'
print('Original string:', str_num)
print('%.6s' % str_num)
print('%.9s' % str_num)
print('%.10s' % str_num) |
# Copyright Notice:
# Copyright 2018 Dell, Inc. All rights reserved.
# License: BSD License. For full license text see link: https://github.com/RedDrum-Redfish-Project/RedDrum-Frontend/LICENSE.txt
class RdSystemsBackend():
# class for backend systems resource APIs
def __init__(self,rdr):
self.version=1
self.rdr=rdr
# update resourceDB and volatileDict properties
def updateResourceDbs(self,systemid, updateStaticProps=False, updateNonVols=True ):
# for the simulator, just return (0,False). The Sim backend currently doesnt update resources after discovery
return(0,False)
# DO action: Reset
def doSystemReset(self,systemid,resetType):
self.rdr.logMsg("DEBUG","--------SIM BACKEND systemReset. resetType={}".format(resetType))
return(0)
# DO Patch to System (IndicatorLED, AssetTag, or boot overrides
# the front-end will send an individual call for IndicatorLED and AssetTag or bootProperties
# multiple boot properties may be combined in one patch
def doPatch(self, systemid, patchData):
# the front-end has already validated that the patchData and systemid is ok
# so just send the request here
self.rdr.logMsg("DEBUG","--------BACKEND Patch system data. patchData={}".format(patchData))
return(0)
# update ProcessorsDb
def updateProcessorsDbFromBackend(self, systemid, procid=None, noCache=False ):
return(0)
# update MemoryDb
def updateMemoryDbFromBackend(self, systemid, memid=None, noCache=False ):
return(0)
# update SimpleStorageDb
def updateSimpleStorageDbFromBackend(self, systemid, cntlrid=None, noCache=False ):
return(0)
# update EthernetInterfaceDb
def updateEthernetInterfaceDbFromBackend(self, systemid, ethid=None, noCache=False ):
# for the simulator, just return (0). The Sim backend currently doesnt update resources after discovery
return(0)
| class Rdsystemsbackend:
def __init__(self, rdr):
self.version = 1
self.rdr = rdr
def update_resource_dbs(self, systemid, updateStaticProps=False, updateNonVols=True):
return (0, False)
def do_system_reset(self, systemid, resetType):
self.rdr.logMsg('DEBUG', '--------SIM BACKEND systemReset. resetType={}'.format(resetType))
return 0
def do_patch(self, systemid, patchData):
self.rdr.logMsg('DEBUG', '--------BACKEND Patch system data. patchData={}'.format(patchData))
return 0
def update_processors_db_from_backend(self, systemid, procid=None, noCache=False):
return 0
def update_memory_db_from_backend(self, systemid, memid=None, noCache=False):
return 0
def update_simple_storage_db_from_backend(self, systemid, cntlrid=None, noCache=False):
return 0
def update_ethernet_interface_db_from_backend(self, systemid, ethid=None, noCache=False):
return 0 |
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, val=0, next=None):
# self.val = val
# self.next = next
class Solution:
def swapPairs(self, head: ListNode) -> ListNode:
if not head or not head.next:
return head
newhead = head.next
ptr = head
prev = None
while ptr:
if ptr.next:
tmp = ptr.next.next
ptr.next.next = ptr
if prev:
prev.next = ptr.next
ptr.next = tmp
prev = ptr
ptr = tmp
else:
return newhead
return newhead
| class Solution:
def swap_pairs(self, head: ListNode) -> ListNode:
if not head or not head.next:
return head
newhead = head.next
ptr = head
prev = None
while ptr:
if ptr.next:
tmp = ptr.next.next
ptr.next.next = ptr
if prev:
prev.next = ptr.next
ptr.next = tmp
prev = ptr
ptr = tmp
else:
return newhead
return newhead |
class Rectangle:
# write your code here
def __init__(self, x1, y1, x2, y2):
self.x1 = x1
self.y1 = y1
self.x2 = x2
self.y2 = y2
print('Rectangle(',x1,', ',y1,', ',x2,', ',y2,') created')
# Alternative Solutions
class Rectangle2:
def __init__(self, x1, y1, x2, y2): # class constructor
if x1 < x2 and y1 > y2:
self.x1 = x1 # class variable
self.y1 = y1 # class variable
self.x2 = x2 # class variable
self.y2 = y2 # class variable
else:
print("Incorrect coordinates of the rectangle!")
r = Rectangle2(2, 7, 8, 4) | class Rectangle:
def __init__(self, x1, y1, x2, y2):
self.x1 = x1
self.y1 = y1
self.x2 = x2
self.y2 = y2
print('Rectangle(', x1, ', ', y1, ', ', x2, ', ', y2, ') created')
class Rectangle2:
def __init__(self, x1, y1, x2, y2):
if x1 < x2 and y1 > y2:
self.x1 = x1
self.y1 = y1
self.x2 = x2
self.y2 = y2
else:
print('Incorrect coordinates of the rectangle!')
r = rectangle2(2, 7, 8, 4) |
## Idiomatic dict comprehension
# No.1
def i1():
emails = {user.name: user.email for user in users if user.email}
# No.2
def i2():
dict_compr = {k: k**2 for k in range(10000)}
# No.3
def i3():
new_dict_comp = {n:n**2 for n in numbers if n%2 == 0}
# No.4
def i4():
dict1 = {'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5, 'f':6}
dict1_tripleCond = {k:v for (k,v) in dict1.items() if v>2 if v%2 == 0 if v%3 == 0}
print(dict1_tripleCond)
# No.5
def i5():
nested_dict = {'first':{'a':1}, 'second':{'b':2}}
float_dict = {outer_k: {float(inner_v) for (inner_k, inner_v) in outer_v.items()} for (outer_k, outer_v) in nested_dict.items()}
print(float_dict)
# No.6
def i6():
# Initialize the `fahrenheit` dictionary
fahrenheit = {'t1': -30,'t2': -20,'t3': -10,'t4': 0}
# Get the corresponding `celsius` values and create the new dictionary
celsius = {k:(float(5)/9)*(v-32) for (k,v) in fahrenheit.items()}
print(celsius_dict)
# No.7
def i7():
mcase = {'a':10, 'b': 34, 'A': 7, 'Z':3}
mcase_frequency = { k.lower() : mcase.get(k.lower(), 0) + mcase.get(k.upper(), 0) for k in mcase.keys() }
| def i1():
emails = {user.name: user.email for user in users if user.email}
def i2():
dict_compr = {k: k ** 2 for k in range(10000)}
def i3():
new_dict_comp = {n: n ** 2 for n in numbers if n % 2 == 0}
def i4():
dict1 = {'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5, 'f': 6}
dict1_triple_cond = {k: v for (k, v) in dict1.items() if v > 2 if v % 2 == 0 if v % 3 == 0}
print(dict1_tripleCond)
def i5():
nested_dict = {'first': {'a': 1}, 'second': {'b': 2}}
float_dict = {outer_k: {float(inner_v) for (inner_k, inner_v) in outer_v.items()} for (outer_k, outer_v) in nested_dict.items()}
print(float_dict)
def i6():
fahrenheit = {'t1': -30, 't2': -20, 't3': -10, 't4': 0}
celsius = {k: float(5) / 9 * (v - 32) for (k, v) in fahrenheit.items()}
print(celsius_dict)
def i7():
mcase = {'a': 10, 'b': 34, 'A': 7, 'Z': 3}
mcase_frequency = {k.lower(): mcase.get(k.lower(), 0) + mcase.get(k.upper(), 0) for k in mcase.keys()} |
"""
0526. Beautiful Arrangement
Medium
Suppose you have n integers labeled 1 through n. A permutation of those n integers perm (1-indexed) is considered a beautiful arrangement if for every i (1 <= i <= n), either of the following is true:
perm[i] is divisible by i.
i is divisible by perm[i].
Given an integer n, return the number of the beautiful arrangements that you can construct.
Example 1:
Input: n = 2
Output: 2
Explanation:
The first beautiful arrangement is [1,2]:
- perm[1] = 1 is divisible by i = 1
- perm[2] = 2 is divisible by i = 2
The second beautiful arrangement is [2,1]:
- perm[1] = 2 is divisible by i = 1
- i = 2 is divisible by perm[2] = 1
Example 2:
Input: n = 1
Output: 1
Constraints:
1 <= n <= 15
"""
class Solution:
def countArrangement(self, n: int) -> int:
def count(i, X):
if i == 1:
return 1
return sum(count(i - 1, X - {x})
for x in X
if x % i == 0 or i % x == 0)
return count(n, set(range(1, n + 1))) | """
0526. Beautiful Arrangement
Medium
Suppose you have n integers labeled 1 through n. A permutation of those n integers perm (1-indexed) is considered a beautiful arrangement if for every i (1 <= i <= n), either of the following is true:
perm[i] is divisible by i.
i is divisible by perm[i].
Given an integer n, return the number of the beautiful arrangements that you can construct.
Example 1:
Input: n = 2
Output: 2
Explanation:
The first beautiful arrangement is [1,2]:
- perm[1] = 1 is divisible by i = 1
- perm[2] = 2 is divisible by i = 2
The second beautiful arrangement is [2,1]:
- perm[1] = 2 is divisible by i = 1
- i = 2 is divisible by perm[2] = 1
Example 2:
Input: n = 1
Output: 1
Constraints:
1 <= n <= 15
"""
class Solution:
def count_arrangement(self, n: int) -> int:
def count(i, X):
if i == 1:
return 1
return sum((count(i - 1, X - {x}) for x in X if x % i == 0 or i % x == 0))
return count(n, set(range(1, n + 1))) |
print("Hello World1")
a = 1
b = 2
c = a+b
print("c:",c) | print('Hello World1')
a = 1
b = 2
c = a + b
print('c:', c) |
class Solution:
def largestTriangleArea(self, points):
"""
:type points: List[List[int]]
:rtype: float
"""
maxArea = 0
n = len(points)
def area(p1, p2, p3):
return 0.5 * abs(p1[0] * p2[1] + p2[0] * p3[1] + p3[0] * p1[1] - p2[0] * p1[1] - p3[0] * p2[1] - p1[0] * p3[1])
for i in range(n - 2):
for j in range(i + 1, n - 1):
for k in range(j + 1, n):
maxArea = max(maxArea, area(points[i], points[j], points[k]))
return maxArea
| class Solution:
def largest_triangle_area(self, points):
"""
:type points: List[List[int]]
:rtype: float
"""
max_area = 0
n = len(points)
def area(p1, p2, p3):
return 0.5 * abs(p1[0] * p2[1] + p2[0] * p3[1] + p3[0] * p1[1] - p2[0] * p1[1] - p3[0] * p2[1] - p1[0] * p3[1])
for i in range(n - 2):
for j in range(i + 1, n - 1):
for k in range(j + 1, n):
max_area = max(maxArea, area(points[i], points[j], points[k]))
return maxArea |
'''
A simple documentation utility for python. It extracts the documentation from the `docstring` and generate `markdown` files from that.
This documentation is also generated using `code2doc`.
Module dependency graph:

Here are the list of all files and folders in this module:
''' | """
A simple documentation utility for python. It extracts the documentation from the `docstring` and generate `markdown` files from that.
This documentation is also generated using `code2doc`.
Module dependency graph:

Here are the list of all files and folders in this module:
""" |
"""
Definition of TreeNode:
class TreeNode:
def __init__(self, val):
self.val = val
self.left, self.right = None, None
"""
class Solution:
"""
@param root: The root of the binary search tree.
@param k1 and k2: range k1 to k2.
@return: Return all keys that k1<=key<=k2 in ascending order.
"""
def searchRange(self, root, k1, k2):
# write your code here
# Solution 1
# def inOrder(bst):
# res = []
# if (bst):
# stack = []
# cur = bst
# while (cur):
# stack.append(cur)
# cur = cur.left
# while (stack):
# target = stack.pop()
# res.append(target.val)
# if (target.right):
# cur = target.right
# while (cur):
# stack.append(cur)
# cur = cur.left
# return res
# res = inOrder(root)
# return filter(lambda x: x >= k1 and x <= k2, res)
# Solution 2
if (root is None):
return []
if (root.left is None and root.right is None):
if (root.val >= k1 and root.val <= k2):
return [root.val]
else:
return []
leftResult = self.searchRange(root.left, k1, k2)
rightResult = self.searchRange(root.right, k1, k2)
if (root.val >= k1 and root.val <= k2):
return leftResult + [root.val] + rightResult
else:
return leftResult + rightResult
| """
Definition of TreeNode:
class TreeNode:
def __init__(self, val):
self.val = val
self.left, self.right = None, None
"""
class Solution:
"""
@param root: The root of the binary search tree.
@param k1 and k2: range k1 to k2.
@return: Return all keys that k1<=key<=k2 in ascending order.
"""
def search_range(self, root, k1, k2):
if root is None:
return []
if root.left is None and root.right is None:
if root.val >= k1 and root.val <= k2:
return [root.val]
else:
return []
left_result = self.searchRange(root.left, k1, k2)
right_result = self.searchRange(root.right, k1, k2)
if root.val >= k1 and root.val <= k2:
return leftResult + [root.val] + rightResult
else:
return leftResult + rightResult |
#Author: OMKAR PATHAK
#This program checks whether the entered number is prime or not
def checkPrime(number):
'''This function checks for prime number'''
isPrime = False
if number == 2:
print(number, 'is a Prime Number')
if number > 1:
for i in range(2, number):
if number % i == 0:
print(number, 'is not a Prime Number')
isPrime = False
break
else:
isPrime = True
if isPrime:
print(number, 'is a Prime Number')
if __name__ == '__main__':
userInput = int(input('Enter a number to check: '))
checkPrime(userInput)
| def check_prime(number):
"""This function checks for prime number"""
is_prime = False
if number == 2:
print(number, 'is a Prime Number')
if number > 1:
for i in range(2, number):
if number % i == 0:
print(number, 'is not a Prime Number')
is_prime = False
break
else:
is_prime = True
if isPrime:
print(number, 'is a Prime Number')
if __name__ == '__main__':
user_input = int(input('Enter a number to check: '))
check_prime(userInput) |
class AnalyticalLinkType(ElementType,IDisposable):
""" An object that specifies the analysis properties for an AnalyticalLink element. """
def Dispose(self):
""" Dispose(self: Element,A_0: bool) """
pass
def getBoundingBox(self,*args):
""" getBoundingBox(self: Element,view: View) -> BoundingBoxXYZ """
pass
@staticmethod
def IsValidAnalyticalFixityState(fixityState):
"""
IsValidAnalyticalFixityState(fixityState: AnalyticalFixityState) -> bool
Returns whether the input fixity state is valid for Analytical Link Type
parameters.
fixityState: The fixity state value to check.
Returns: True if valid.
"""
pass
def ReleaseUnmanagedResources(self,*args):
""" ReleaseUnmanagedResources(self: Element,disposing: bool) """
pass
def setElementType(self,*args):
""" setElementType(self: Element,type: ElementType,incompatibleExceptionMessage: str) """
pass
def __enter__(self,*args):
""" __enter__(self: IDisposable) -> object """
pass
def __exit__(self,*args):
""" __exit__(self: IDisposable,exc_type: object,exc_value: object,exc_back: object) """
pass
def __init__(self,*args):
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
RotationX=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Fixity of rotation around X.
Get: RotationX(self: AnalyticalLinkType) -> AnalyticalFixityState
Set: RotationX(self: AnalyticalLinkType)=value
"""
RotationY=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Fixity of rotation around Y.
Get: RotationY(self: AnalyticalLinkType) -> AnalyticalFixityState
Set: RotationY(self: AnalyticalLinkType)=value
"""
RotationZ=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Fixity of rotation around Z.
Get: RotationZ(self: AnalyticalLinkType) -> AnalyticalFixityState
Set: RotationZ(self: AnalyticalLinkType)=value
"""
TranslationX=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Fixity of translation along X.
Get: TranslationX(self: AnalyticalLinkType) -> AnalyticalFixityState
Set: TranslationX(self: AnalyticalLinkType)=value
"""
TranslationY=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Fixity of translation along Y.
Get: TranslationY(self: AnalyticalLinkType) -> AnalyticalFixityState
Set: TranslationY(self: AnalyticalLinkType)=value
"""
TranslationZ=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Fixity of translation along Z.
Get: TranslationZ(self: AnalyticalLinkType) -> AnalyticalFixityState
Set: TranslationZ(self: AnalyticalLinkType)=value
"""
| class Analyticallinktype(ElementType, IDisposable):
""" An object that specifies the analysis properties for an AnalyticalLink element. """
def dispose(self):
""" Dispose(self: Element,A_0: bool) """
pass
def get_bounding_box(self, *args):
""" getBoundingBox(self: Element,view: View) -> BoundingBoxXYZ """
pass
@staticmethod
def is_valid_analytical_fixity_state(fixityState):
"""
IsValidAnalyticalFixityState(fixityState: AnalyticalFixityState) -> bool
Returns whether the input fixity state is valid for Analytical Link Type
parameters.
fixityState: The fixity state value to check.
Returns: True if valid.
"""
pass
def release_unmanaged_resources(self, *args):
""" ReleaseUnmanagedResources(self: Element,disposing: bool) """
pass
def set_element_type(self, *args):
""" setElementType(self: Element,type: ElementType,incompatibleExceptionMessage: str) """
pass
def __enter__(self, *args):
""" __enter__(self: IDisposable) -> object """
pass
def __exit__(self, *args):
""" __exit__(self: IDisposable,exc_type: object,exc_value: object,exc_back: object) """
pass
def __init__(self, *args):
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
rotation_x = property(lambda self: object(), lambda self, v: None, lambda self: None)
'Fixity of rotation around X.\n\n\n\nGet: RotationX(self: AnalyticalLinkType) -> AnalyticalFixityState\n\n\n\nSet: RotationX(self: AnalyticalLinkType)=value\n\n'
rotation_y = property(lambda self: object(), lambda self, v: None, lambda self: None)
'Fixity of rotation around Y.\n\n\n\nGet: RotationY(self: AnalyticalLinkType) -> AnalyticalFixityState\n\n\n\nSet: RotationY(self: AnalyticalLinkType)=value\n\n'
rotation_z = property(lambda self: object(), lambda self, v: None, lambda self: None)
'Fixity of rotation around Z.\n\n\n\nGet: RotationZ(self: AnalyticalLinkType) -> AnalyticalFixityState\n\n\n\nSet: RotationZ(self: AnalyticalLinkType)=value\n\n'
translation_x = property(lambda self: object(), lambda self, v: None, lambda self: None)
'Fixity of translation along X.\n\n\n\nGet: TranslationX(self: AnalyticalLinkType) -> AnalyticalFixityState\n\n\n\nSet: TranslationX(self: AnalyticalLinkType)=value\n\n'
translation_y = property(lambda self: object(), lambda self, v: None, lambda self: None)
'Fixity of translation along Y.\n\n\n\nGet: TranslationY(self: AnalyticalLinkType) -> AnalyticalFixityState\n\n\n\nSet: TranslationY(self: AnalyticalLinkType)=value\n\n'
translation_z = property(lambda self: object(), lambda self, v: None, lambda self: None)
'Fixity of translation along Z.\n\n\n\nGet: TranslationZ(self: AnalyticalLinkType) -> AnalyticalFixityState\n\n\n\nSet: TranslationZ(self: AnalyticalLinkType)=value\n\n' |
#
# PySNMP MIB module APPIAN-TIMESLOTS-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/APPIAN-TIMESLOTS-MIB
# Produced by pysmi-0.3.4 at Wed May 1 11:24:00 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)
#
AcAdminStatus, acOsap = mibBuilder.importSymbols("APPIAN-SMI-MIB", "AcAdminStatus", "acOsap")
ObjectIdentifier, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueRangeConstraint, ConstraintsUnion, ConstraintsIntersection, ValueSizeConstraint, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "ConstraintsUnion", "ConstraintsIntersection", "ValueSizeConstraint", "SingleValueConstraint")
NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance")
ObjectIdentity, TimeTicks, Bits, Counter64, ModuleIdentity, iso, Unsigned32, MibIdentifier, NotificationType, MibScalar, MibTable, MibTableRow, MibTableColumn, Counter32, Gauge32, Integer32, IpAddress = mibBuilder.importSymbols("SNMPv2-SMI", "ObjectIdentity", "TimeTicks", "Bits", "Counter64", "ModuleIdentity", "iso", "Unsigned32", "MibIdentifier", "NotificationType", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Counter32", "Gauge32", "Integer32", "IpAddress")
DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention")
acTimeSlots = ModuleIdentity((1, 3, 6, 1, 4, 1, 2785, 2, 5))
acTimeSlots.setRevisions(('1900-08-21 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: acTimeSlots.setRevisionsDescriptions(('MIB definitons for the timeslots',))
if mibBuilder.loadTexts: acTimeSlots.setLastUpdated('0008210000Z')
if mibBuilder.loadTexts: acTimeSlots.setOrganization('Appian Communications, Inc.')
if mibBuilder.loadTexts: acTimeSlots.setContactInfo('Douglas Theriault')
if mibBuilder.loadTexts: acTimeSlots.setDescription('Appian Communications Network provisioning MIB definition.')
acTimeSlotTable = MibTable((1, 3, 6, 1, 4, 1, 2785, 2, 5, 1), )
if mibBuilder.loadTexts: acTimeSlotTable.setStatus('current')
if mibBuilder.loadTexts: acTimeSlotTable.setDescription('The timeslot table defines how the SONET ring timeslots are provisioned (carved). The timeslot table is SHARED between all OSAPs in a ring. It indicates the width and payload type of each timeslot, type of SONET protection scheme used as well as other timeslot related information. It also contain the SHARED logical port data such as payload Type, LineType, and MgmtDLType.')
acTimeSlotEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2785, 2, 5, 1, 1), ).setIndexNames((0, "APPIAN-TIMESLOTS-MIB", "acTimeSlotIndex"))
if mibBuilder.loadTexts: acTimeSlotEntry.setStatus('current')
if mibBuilder.loadTexts: acTimeSlotEntry.setDescription('A row in the timeslot table.')
acTimeSlotIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2785, 2, 5, 1, 1, 1), Integer32()).setMaxAccess("accessiblefornotify")
if mibBuilder.loadTexts: acTimeSlotIndex.setStatus('current')
if mibBuilder.loadTexts: acTimeSlotIndex.setDescription('The value identifies a timeslot on either the ring or the interconnect SONET interfaces. This index is a 32 bit number comprised of bit fields. The algorithm used to determine this index is set so both AppianVista (EMS) and the Command Line Interface (CLI) can configure this table. This index is also used to index rows in trunk shared table for the trunk table agent (TTA). The following bit assignments define the format for the timeslot index: Bits Description ------- ----------------------------------------- 0..2 Virtual Tributary (VT) 3..5 Virtual Tributary Group (VTG) 6..15 STS number 16..22 Reserved - Wavelength 23..26 Physical Port number 27..31 Physical Slot number Note: for additional information refer to trunk shared.mib file.')
acTimeSlotAdminStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 2785, 2, 5, 1, 1, 2), AcAdminStatus().clone('inactivate')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: acTimeSlotAdminStatus.setStatus('current')
if mibBuilder.loadTexts: acTimeSlotAdminStatus.setDescription('Appian Administrative Status attribute used to set the provisioning state as either activate(1), inactivate(2) or delete(3). Refer to the Appian-SMI.mib file for additional information.')
acTimeSlotWidth = MibTableColumn((1, 3, 6, 1, 4, 1, 2785, 2, 5, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("unknown", 0), ("vt1dot5", 1), ("vtgroup", 2), ("sts1", 3), ("sts3", 4), ("sts12", 5), ("sts48", 6))).clone('unknown')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: acTimeSlotWidth.setStatus('current')
if mibBuilder.loadTexts: acTimeSlotWidth.setDescription('The type and size of the timeslot described in this row of the timeslot table.')
acTimeSlotOuterIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2785, 2, 5, 1, 1, 4), Integer32()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: acTimeSlotOuterIndex.setStatus('current')
if mibBuilder.loadTexts: acTimeSlotOuterIndex.setDescription("This value is either zero(0) or the index of another row in this table. If it is not zero(0), it is the index of another row in this table which describes the parent timeslot to the timeslot associated with this row. A parent timeslot is another timeslot which is carved into smaller timeslots, one of which is this current timeslot. For example, a row in this table describing a VT1.5 always has an outerIndex which identifies a row in this table which describes a VT group. A VT group always has an outerIndex that describes a STS-1. The row describing the STS-1 has an outerIndex which identifies a row describing an OC3 SONET interface or perhaps, in the future, an STS12 within an STS48. Thus this object describes a nesting of timeslots. To continue the previous example: an STS-1 with 28 VT1.5's within it is represented by 36 rows in this table; 28 of which identify and describe each VT1.5. Every 4 VT rows have a corresponding VT group (vtgroup) for a total of 7 more rows. Each of the 4 VT1.5 rows that make up the VT group have an indentical value for outerIndex (index of the VT group row that the VT1.5's are associated). Each of the 7 VT group rows have an identical value in outerIndex (index of the STS-1 row that the VT groups are associated).")
acTimeSlotNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 2785, 2, 5, 1, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 48))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: acTimeSlotNumber.setStatus('current')
if mibBuilder.loadTexts: acTimeSlotNumber.setDescription('This identifies the timeslot within a SONET payload or within an outer timeslot within the payload. In the later case, the acTimeSlotOuterIndex object identifies the outer timeslot within the SONET payload. OC-3 + For an STS-1 carved out of an OC3, acTimeSlotNumber is a number 1, 2 or 3. + For a VT group carved out of an STS-1 in an OC3, acTimeSlotNumber is a number from 1 to 7. + For a VT1.5 carved out of an VT group, acTimeSlotNumber is a number from 1 to 4. OC-48 + For an STS-1 carved out of an OC48, acTimeSlotNumber is a number from 1 to 48. + For an STS-3 carved out of an OC48, acTimeSlotNumber is a number 1, 4, 7, 10, 13, 16, 19, 22, 25, 28, 31, 34, 37, 40, 43, or 46. + For an STS-12 carved out of an OC48, acTimeSlotNumber is a number 1, 13, 25, or 37 + For an STS-48 carved out of an OC48, acTimeSlotNumber can only be 1. ')
acTimeSlotPathProtectionMode = MibTableColumn((1, 3, 6, 1, 4, 1, 2785, 2, 5, 1, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))).clone(namedValues=NamedValues(("not-used", 0), ("unprotected", 1), ("odp", 2), ("upsr", 3))).clone('not-used')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: acTimeSlotPathProtectionMode.setStatus('current')
if mibBuilder.loadTexts: acTimeSlotPathProtectionMode.setDescription("The type of protection switching to be used if independent path level protection switching is enabled on this timeslot. This object is only relevant for the ring side. Note that ODP is used on shared trunks that are either FR or TLS trunks. In either case, these shared trunks can be either STS-1, a VT1.5 or a bundle of VT1.5's. not-used: Timeslot is provisioned only over a linear interconnet. Timeslot is not protected at this level in the Timeslot hierarchy. Example: A VT1.5 row when protection switching is done at the STS-1 level unprotected: Timeslot is unprotected. One significance of this is that if this timeslot becomes unavailable, it will not remain in service by bumping another peer timeslot using the same timeslot on another fiber. odp: Appian's Optical Data Protection. ODP is used on shared trunks that are either FR or TLS trunks. uspr: Traditional UPSR can be used on non-shared timeslots such as PPP trunks and TDM service trunks. ")
acTimeSlotChassisSlot = MibTableColumn((1, 3, 6, 1, 4, 1, 2785, 2, 5, 1, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("not-applicable", 0), ("slot1", 1), ("slot2", 2))).clone('not-applicable')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: acTimeSlotChassisSlot.setStatus('current')
if mibBuilder.loadTexts: acTimeSlotChassisSlot.setDescription('For most timeslots, this object is an element of the specification of exactly which timeslot this table row identifies. In some cases, it is ignored. The ChassisSlot has the following significance for the various scenarios: ring: ChassisSlot 1 indicates the timeslot on the westward transmitting fiber. ChassisSlot 2 indicates the timeslot on the eastward facing fiber. ring/interconnect: ChassisSlot 1 indicates the timeslot on the westward transmitting fiber and on the linear interconnect fiber on slot 1. ChassisSlot 2 indicates the timeslot on the eastward transmitting fiber and the linear interconnect fiber on slot 2. linear: ChassisSlot, along with Port, identifies the fiber out of which this timeslot is extracted. ')
acTimeSlotPort = MibTableColumn((1, 3, 6, 1, 4, 1, 2785, 2, 5, 1, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("not-applicable", 0), ("port1", 1), ("port2", 2))).clone('not-applicable')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: acTimeSlotPort.setStatus('current')
if mibBuilder.loadTexts: acTimeSlotPort.setDescription('For timeslots in configurations with no ring fibers, this object is an element of the specification of which exactly which timeslot this table row identifies. This object is ignored unless there are two linear interconnects on a single SONET board. When there are two linear interconnects, this object dictates out of which linear interconnect this timeslot is to be extracted. ')
acTimeSlotPayloadConfiguration = MibTableColumn((1, 3, 6, 1, 4, 1, 2785, 2, 5, 1, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("unprovisioned", 0), ("ring-only", 1), ("ring-interconnect", 2))).clone('unprovisioned')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: acTimeSlotPayloadConfiguration.setStatus('current')
if mibBuilder.loadTexts: acTimeSlotPayloadConfiguration.setDescription("The payload configuration defines the connection topology over which the payload's path is provisioned. More description needed here... This object is ignored if this row describes a timeslot that is broken down further into lower bandwidth timeslots.")
acTimeSlotPayloadLineType = MibTableColumn((1, 3, 6, 1, 4, 1, 2785, 2, 5, 1, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("not-applicable", 0), ("ds1ESF", 1), ("ds1D4", 2), ("ds3M23", 3), ("ds3CbitParity", 4), ("ds1tdm", 5))).clone('not-applicable')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: acTimeSlotPayloadLineType.setStatus('current')
if mibBuilder.loadTexts: acTimeSlotPayloadLineType.setDescription('This variable indicates the variety of DS1 Line or DS3 C-bit application implementing this circuit. The type of circuit affects the number of bits per second that the circuit can reasonable carry, as well as the interpretation of the usage and error statistics. The payload line type must correspond correctly to the payload type that was configured in acTimeSlotPayloadType. For example, if ds1 was choosen, the line type must either be ds1ESF or ds1D4. These values are only valid when acTimeSlotPayloadType is ds1 or ds3. For ds1tdm, these values are obtained from the acDs1ConfigTable and are not shared. The value ds1tdm is used to distinguish when a vt1.5 is used for voice. The values, in sequence describe: TITLE: SPECIFICATION not-applicable ds1ESF Extended SuperFrame DS1 (T1.107) ds1D4 AT&T D4 format DS1 (T1.107) ds3M23 ANSI T1.107-1988 [9] ds3CbitParity ANSI T1.107a-1990 [9a] This object is not applicable in rows associated with timeslots that are carved into lower bandwidth inner timeslots.')
acTimeSlotPayloadMgmtDLType = MibTableColumn((1, 3, 6, 1, 4, 1, 2785, 2, 5, 1, 1, 11), Integer32().clone(1)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: acTimeSlotPayloadMgmtDLType.setStatus('current')
if mibBuilder.loadTexts: acTimeSlotPayloadMgmtDLType.setDescription("This bitmap describes the use of the management data link, and is the sum of the capabilities. These values are only valid when acTimeSlotPayloadType is ds1 or ds3. For ds1tdm, these values are obtained from the acDs1ConfigTable and are not shared. Set any bits that are appropriate: none(1), ds1AnsiT1403(2), ds1Att54016(4), ds3PMDL(8), 'none' indicates that this device does not use FDL or PMDL. 'ds1AnsiT1403' refers to the DS1 FDL exchange recommended by ANSI. 'ds1Att54016' refers to DS1 ESF FDL exchanges. 'ds3PMDL' refers to DS3 Path Maintainance Data Link. PMDL will not be supported but is here for future use. Possible combinations are: (1) none (2) ANSI FDL when running in ds1 mode. (4) AT&T FDL when running in ds1 mode. (6) ANSI and AT&T FDL when running in ds1 mode. (8) PMDL when running in ds3 mode. All other combinations will result in the non-applicable bits being ignored. This object is not applicable in rows associated with timeslots that are carved into lower bandwidth inner timeslots. They are valid only when the timeslot width is vt1.5 and when payload line type is ds1ESF, ds1D4, ds3M23, or ds3CbitParity")
acTimeSlotChannelConfiguration = MibTableColumn((1, 3, 6, 1, 4, 1, 2785, 2, 5, 1, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("unprovisioned", 0), ("data-and-tdm", 1), ("tdm-only", 2))).clone('unprovisioned')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: acTimeSlotChannelConfiguration.setStatus('current')
if mibBuilder.loadTexts: acTimeSlotChannelConfiguration.setDescription('The channel configuration describes the payload contents of all channels making up this channelized path. These two enumerations describe the lower bandwidth component timeslots. These values also serve as a validation when creating, for example, a vt1.5 whose outerIndex corresponds to this row. It should be noted that when changing these values (tdm-ony and data-and-tdm), brief service interruptsion can result on all timeslots that are lower bandwidth components of this timeslot. This object is ignored if this row describes a timeslot that is NOT broken down further into lower bandwidth timeslots.')
acTimeSlotPayloadContent = MibTableColumn((1, 3, 6, 1, 4, 1, 2785, 2, 5, 1, 1, 13), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))).clone(namedValues=NamedValues(("unprovisioned", 0), ("data", 1), ("tdm", 2), ("unequipped", 3))).clone('unprovisioned')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: acTimeSlotPayloadContent.setStatus('current')
if mibBuilder.loadTexts: acTimeSlotPayloadContent.setDescription('The payload content defines the content of the payload and indirectly the source fo the transmission stream within the OSAP. Payloads carrying data(1) are process by the packet switch. Payloads carrying tdm(2) traffic are not processed by the packet switch and are instead connected directly to the TDM access ports. Unequipped(3) dictates that the payloads are not sourced from either the packet switch or the TDM access ports. Instead, the timeslot is filled with unequipped payload. This object is ignored if this row describes a timeslot that is broken down further into lower bandwidth timeslots.')
mibBuilder.exportSymbols("APPIAN-TIMESLOTS-MIB", acTimeSlotPayloadContent=acTimeSlotPayloadContent, acTimeSlotOuterIndex=acTimeSlotOuterIndex, acTimeSlotEntry=acTimeSlotEntry, acTimeSlotWidth=acTimeSlotWidth, acTimeSlotPayloadLineType=acTimeSlotPayloadLineType, acTimeSlotPathProtectionMode=acTimeSlotPathProtectionMode, acTimeSlotChassisSlot=acTimeSlotChassisSlot, acTimeSlotPayloadMgmtDLType=acTimeSlotPayloadMgmtDLType, acTimeSlots=acTimeSlots, acTimeSlotAdminStatus=acTimeSlotAdminStatus, acTimeSlotPort=acTimeSlotPort, PYSNMP_MODULE_ID=acTimeSlots, acTimeSlotIndex=acTimeSlotIndex, acTimeSlotNumber=acTimeSlotNumber, acTimeSlotPayloadConfiguration=acTimeSlotPayloadConfiguration, acTimeSlotTable=acTimeSlotTable, acTimeSlotChannelConfiguration=acTimeSlotChannelConfiguration)
| (ac_admin_status, ac_osap) = mibBuilder.importSymbols('APPIAN-SMI-MIB', 'AcAdminStatus', 'acOsap')
(object_identifier, octet_string, integer) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'OctetString', 'Integer')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(value_range_constraint, constraints_union, constraints_intersection, value_size_constraint, single_value_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueRangeConstraint', 'ConstraintsUnion', 'ConstraintsIntersection', 'ValueSizeConstraint', 'SingleValueConstraint')
(notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance')
(object_identity, time_ticks, bits, counter64, module_identity, iso, unsigned32, mib_identifier, notification_type, mib_scalar, mib_table, mib_table_row, mib_table_column, counter32, gauge32, integer32, ip_address) = mibBuilder.importSymbols('SNMPv2-SMI', 'ObjectIdentity', 'TimeTicks', 'Bits', 'Counter64', 'ModuleIdentity', 'iso', 'Unsigned32', 'MibIdentifier', 'NotificationType', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Counter32', 'Gauge32', 'Integer32', 'IpAddress')
(display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention')
ac_time_slots = module_identity((1, 3, 6, 1, 4, 1, 2785, 2, 5))
acTimeSlots.setRevisions(('1900-08-21 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts:
acTimeSlots.setRevisionsDescriptions(('MIB definitons for the timeslots',))
if mibBuilder.loadTexts:
acTimeSlots.setLastUpdated('0008210000Z')
if mibBuilder.loadTexts:
acTimeSlots.setOrganization('Appian Communications, Inc.')
if mibBuilder.loadTexts:
acTimeSlots.setContactInfo('Douglas Theriault')
if mibBuilder.loadTexts:
acTimeSlots.setDescription('Appian Communications Network provisioning MIB definition.')
ac_time_slot_table = mib_table((1, 3, 6, 1, 4, 1, 2785, 2, 5, 1))
if mibBuilder.loadTexts:
acTimeSlotTable.setStatus('current')
if mibBuilder.loadTexts:
acTimeSlotTable.setDescription('The timeslot table defines how the SONET ring timeslots are provisioned (carved). The timeslot table is SHARED between all OSAPs in a ring. It indicates the width and payload type of each timeslot, type of SONET protection scheme used as well as other timeslot related information. It also contain the SHARED logical port data such as payload Type, LineType, and MgmtDLType.')
ac_time_slot_entry = mib_table_row((1, 3, 6, 1, 4, 1, 2785, 2, 5, 1, 1)).setIndexNames((0, 'APPIAN-TIMESLOTS-MIB', 'acTimeSlotIndex'))
if mibBuilder.loadTexts:
acTimeSlotEntry.setStatus('current')
if mibBuilder.loadTexts:
acTimeSlotEntry.setDescription('A row in the timeslot table.')
ac_time_slot_index = mib_table_column((1, 3, 6, 1, 4, 1, 2785, 2, 5, 1, 1, 1), integer32()).setMaxAccess('accessiblefornotify')
if mibBuilder.loadTexts:
acTimeSlotIndex.setStatus('current')
if mibBuilder.loadTexts:
acTimeSlotIndex.setDescription('The value identifies a timeslot on either the ring or the interconnect SONET interfaces. This index is a 32 bit number comprised of bit fields. The algorithm used to determine this index is set so both AppianVista (EMS) and the Command Line Interface (CLI) can configure this table. This index is also used to index rows in trunk shared table for the trunk table agent (TTA). The following bit assignments define the format for the timeslot index: Bits Description ------- ----------------------------------------- 0..2 Virtual Tributary (VT) 3..5 Virtual Tributary Group (VTG) 6..15 STS number 16..22 Reserved - Wavelength 23..26 Physical Port number 27..31 Physical Slot number Note: for additional information refer to trunk shared.mib file.')
ac_time_slot_admin_status = mib_table_column((1, 3, 6, 1, 4, 1, 2785, 2, 5, 1, 1, 2), ac_admin_status().clone('inactivate')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
acTimeSlotAdminStatus.setStatus('current')
if mibBuilder.loadTexts:
acTimeSlotAdminStatus.setDescription('Appian Administrative Status attribute used to set the provisioning state as either activate(1), inactivate(2) or delete(3). Refer to the Appian-SMI.mib file for additional information.')
ac_time_slot_width = mib_table_column((1, 3, 6, 1, 4, 1, 2785, 2, 5, 1, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6))).clone(namedValues=named_values(('unknown', 0), ('vt1dot5', 1), ('vtgroup', 2), ('sts1', 3), ('sts3', 4), ('sts12', 5), ('sts48', 6))).clone('unknown')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
acTimeSlotWidth.setStatus('current')
if mibBuilder.loadTexts:
acTimeSlotWidth.setDescription('The type and size of the timeslot described in this row of the timeslot table.')
ac_time_slot_outer_index = mib_table_column((1, 3, 6, 1, 4, 1, 2785, 2, 5, 1, 1, 4), integer32()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
acTimeSlotOuterIndex.setStatus('current')
if mibBuilder.loadTexts:
acTimeSlotOuterIndex.setDescription("This value is either zero(0) or the index of another row in this table. If it is not zero(0), it is the index of another row in this table which describes the parent timeslot to the timeslot associated with this row. A parent timeslot is another timeslot which is carved into smaller timeslots, one of which is this current timeslot. For example, a row in this table describing a VT1.5 always has an outerIndex which identifies a row in this table which describes a VT group. A VT group always has an outerIndex that describes a STS-1. The row describing the STS-1 has an outerIndex which identifies a row describing an OC3 SONET interface or perhaps, in the future, an STS12 within an STS48. Thus this object describes a nesting of timeslots. To continue the previous example: an STS-1 with 28 VT1.5's within it is represented by 36 rows in this table; 28 of which identify and describe each VT1.5. Every 4 VT rows have a corresponding VT group (vtgroup) for a total of 7 more rows. Each of the 4 VT1.5 rows that make up the VT group have an indentical value for outerIndex (index of the VT group row that the VT1.5's are associated). Each of the 7 VT group rows have an identical value in outerIndex (index of the STS-1 row that the VT groups are associated).")
ac_time_slot_number = mib_table_column((1, 3, 6, 1, 4, 1, 2785, 2, 5, 1, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(1, 48))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
acTimeSlotNumber.setStatus('current')
if mibBuilder.loadTexts:
acTimeSlotNumber.setDescription('This identifies the timeslot within a SONET payload or within an outer timeslot within the payload. In the later case, the acTimeSlotOuterIndex object identifies the outer timeslot within the SONET payload. OC-3 + For an STS-1 carved out of an OC3, acTimeSlotNumber is a number 1, 2 or 3. + For a VT group carved out of an STS-1 in an OC3, acTimeSlotNumber is a number from 1 to 7. + For a VT1.5 carved out of an VT group, acTimeSlotNumber is a number from 1 to 4. OC-48 + For an STS-1 carved out of an OC48, acTimeSlotNumber is a number from 1 to 48. + For an STS-3 carved out of an OC48, acTimeSlotNumber is a number 1, 4, 7, 10, 13, 16, 19, 22, 25, 28, 31, 34, 37, 40, 43, or 46. + For an STS-12 carved out of an OC48, acTimeSlotNumber is a number 1, 13, 25, or 37 + For an STS-48 carved out of an OC48, acTimeSlotNumber can only be 1. ')
ac_time_slot_path_protection_mode = mib_table_column((1, 3, 6, 1, 4, 1, 2785, 2, 5, 1, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3))).clone(namedValues=named_values(('not-used', 0), ('unprotected', 1), ('odp', 2), ('upsr', 3))).clone('not-used')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
acTimeSlotPathProtectionMode.setStatus('current')
if mibBuilder.loadTexts:
acTimeSlotPathProtectionMode.setDescription("The type of protection switching to be used if independent path level protection switching is enabled on this timeslot. This object is only relevant for the ring side. Note that ODP is used on shared trunks that are either FR or TLS trunks. In either case, these shared trunks can be either STS-1, a VT1.5 or a bundle of VT1.5's. not-used: Timeslot is provisioned only over a linear interconnet. Timeslot is not protected at this level in the Timeslot hierarchy. Example: A VT1.5 row when protection switching is done at the STS-1 level unprotected: Timeslot is unprotected. One significance of this is that if this timeslot becomes unavailable, it will not remain in service by bumping another peer timeslot using the same timeslot on another fiber. odp: Appian's Optical Data Protection. ODP is used on shared trunks that are either FR or TLS trunks. uspr: Traditional UPSR can be used on non-shared timeslots such as PPP trunks and TDM service trunks. ")
ac_time_slot_chassis_slot = mib_table_column((1, 3, 6, 1, 4, 1, 2785, 2, 5, 1, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('not-applicable', 0), ('slot1', 1), ('slot2', 2))).clone('not-applicable')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
acTimeSlotChassisSlot.setStatus('current')
if mibBuilder.loadTexts:
acTimeSlotChassisSlot.setDescription('For most timeslots, this object is an element of the specification of exactly which timeslot this table row identifies. In some cases, it is ignored. The ChassisSlot has the following significance for the various scenarios: ring: ChassisSlot 1 indicates the timeslot on the westward transmitting fiber. ChassisSlot 2 indicates the timeslot on the eastward facing fiber. ring/interconnect: ChassisSlot 1 indicates the timeslot on the westward transmitting fiber and on the linear interconnect fiber on slot 1. ChassisSlot 2 indicates the timeslot on the eastward transmitting fiber and the linear interconnect fiber on slot 2. linear: ChassisSlot, along with Port, identifies the fiber out of which this timeslot is extracted. ')
ac_time_slot_port = mib_table_column((1, 3, 6, 1, 4, 1, 2785, 2, 5, 1, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('not-applicable', 0), ('port1', 1), ('port2', 2))).clone('not-applicable')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
acTimeSlotPort.setStatus('current')
if mibBuilder.loadTexts:
acTimeSlotPort.setDescription('For timeslots in configurations with no ring fibers, this object is an element of the specification of which exactly which timeslot this table row identifies. This object is ignored unless there are two linear interconnects on a single SONET board. When there are two linear interconnects, this object dictates out of which linear interconnect this timeslot is to be extracted. ')
ac_time_slot_payload_configuration = mib_table_column((1, 3, 6, 1, 4, 1, 2785, 2, 5, 1, 1, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('unprovisioned', 0), ('ring-only', 1), ('ring-interconnect', 2))).clone('unprovisioned')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
acTimeSlotPayloadConfiguration.setStatus('current')
if mibBuilder.loadTexts:
acTimeSlotPayloadConfiguration.setDescription("The payload configuration defines the connection topology over which the payload's path is provisioned. More description needed here... This object is ignored if this row describes a timeslot that is broken down further into lower bandwidth timeslots.")
ac_time_slot_payload_line_type = mib_table_column((1, 3, 6, 1, 4, 1, 2785, 2, 5, 1, 1, 10), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5))).clone(namedValues=named_values(('not-applicable', 0), ('ds1ESF', 1), ('ds1D4', 2), ('ds3M23', 3), ('ds3CbitParity', 4), ('ds1tdm', 5))).clone('not-applicable')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
acTimeSlotPayloadLineType.setStatus('current')
if mibBuilder.loadTexts:
acTimeSlotPayloadLineType.setDescription('This variable indicates the variety of DS1 Line or DS3 C-bit application implementing this circuit. The type of circuit affects the number of bits per second that the circuit can reasonable carry, as well as the interpretation of the usage and error statistics. The payload line type must correspond correctly to the payload type that was configured in acTimeSlotPayloadType. For example, if ds1 was choosen, the line type must either be ds1ESF or ds1D4. These values are only valid when acTimeSlotPayloadType is ds1 or ds3. For ds1tdm, these values are obtained from the acDs1ConfigTable and are not shared. The value ds1tdm is used to distinguish when a vt1.5 is used for voice. The values, in sequence describe: TITLE: SPECIFICATION not-applicable ds1ESF Extended SuperFrame DS1 (T1.107) ds1D4 AT&T D4 format DS1 (T1.107) ds3M23 ANSI T1.107-1988 [9] ds3CbitParity ANSI T1.107a-1990 [9a] This object is not applicable in rows associated with timeslots that are carved into lower bandwidth inner timeslots.')
ac_time_slot_payload_mgmt_dl_type = mib_table_column((1, 3, 6, 1, 4, 1, 2785, 2, 5, 1, 1, 11), integer32().clone(1)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
acTimeSlotPayloadMgmtDLType.setStatus('current')
if mibBuilder.loadTexts:
acTimeSlotPayloadMgmtDLType.setDescription("This bitmap describes the use of the management data link, and is the sum of the capabilities. These values are only valid when acTimeSlotPayloadType is ds1 or ds3. For ds1tdm, these values are obtained from the acDs1ConfigTable and are not shared. Set any bits that are appropriate: none(1), ds1AnsiT1403(2), ds1Att54016(4), ds3PMDL(8), 'none' indicates that this device does not use FDL or PMDL. 'ds1AnsiT1403' refers to the DS1 FDL exchange recommended by ANSI. 'ds1Att54016' refers to DS1 ESF FDL exchanges. 'ds3PMDL' refers to DS3 Path Maintainance Data Link. PMDL will not be supported but is here for future use. Possible combinations are: (1) none (2) ANSI FDL when running in ds1 mode. (4) AT&T FDL when running in ds1 mode. (6) ANSI and AT&T FDL when running in ds1 mode. (8) PMDL when running in ds3 mode. All other combinations will result in the non-applicable bits being ignored. This object is not applicable in rows associated with timeslots that are carved into lower bandwidth inner timeslots. They are valid only when the timeslot width is vt1.5 and when payload line type is ds1ESF, ds1D4, ds3M23, or ds3CbitParity")
ac_time_slot_channel_configuration = mib_table_column((1, 3, 6, 1, 4, 1, 2785, 2, 5, 1, 1, 12), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('unprovisioned', 0), ('data-and-tdm', 1), ('tdm-only', 2))).clone('unprovisioned')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
acTimeSlotChannelConfiguration.setStatus('current')
if mibBuilder.loadTexts:
acTimeSlotChannelConfiguration.setDescription('The channel configuration describes the payload contents of all channels making up this channelized path. These two enumerations describe the lower bandwidth component timeslots. These values also serve as a validation when creating, for example, a vt1.5 whose outerIndex corresponds to this row. It should be noted that when changing these values (tdm-ony and data-and-tdm), brief service interruptsion can result on all timeslots that are lower bandwidth components of this timeslot. This object is ignored if this row describes a timeslot that is NOT broken down further into lower bandwidth timeslots.')
ac_time_slot_payload_content = mib_table_column((1, 3, 6, 1, 4, 1, 2785, 2, 5, 1, 1, 13), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3))).clone(namedValues=named_values(('unprovisioned', 0), ('data', 1), ('tdm', 2), ('unequipped', 3))).clone('unprovisioned')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
acTimeSlotPayloadContent.setStatus('current')
if mibBuilder.loadTexts:
acTimeSlotPayloadContent.setDescription('The payload content defines the content of the payload and indirectly the source fo the transmission stream within the OSAP. Payloads carrying data(1) are process by the packet switch. Payloads carrying tdm(2) traffic are not processed by the packet switch and are instead connected directly to the TDM access ports. Unequipped(3) dictates that the payloads are not sourced from either the packet switch or the TDM access ports. Instead, the timeslot is filled with unequipped payload. This object is ignored if this row describes a timeslot that is broken down further into lower bandwidth timeslots.')
mibBuilder.exportSymbols('APPIAN-TIMESLOTS-MIB', acTimeSlotPayloadContent=acTimeSlotPayloadContent, acTimeSlotOuterIndex=acTimeSlotOuterIndex, acTimeSlotEntry=acTimeSlotEntry, acTimeSlotWidth=acTimeSlotWidth, acTimeSlotPayloadLineType=acTimeSlotPayloadLineType, acTimeSlotPathProtectionMode=acTimeSlotPathProtectionMode, acTimeSlotChassisSlot=acTimeSlotChassisSlot, acTimeSlotPayloadMgmtDLType=acTimeSlotPayloadMgmtDLType, acTimeSlots=acTimeSlots, acTimeSlotAdminStatus=acTimeSlotAdminStatus, acTimeSlotPort=acTimeSlotPort, PYSNMP_MODULE_ID=acTimeSlots, acTimeSlotIndex=acTimeSlotIndex, acTimeSlotNumber=acTimeSlotNumber, acTimeSlotPayloadConfiguration=acTimeSlotPayloadConfiguration, acTimeSlotTable=acTimeSlotTable, acTimeSlotChannelConfiguration=acTimeSlotChannelConfiguration) |
#
# PySNMP MIB module Unisphere-Data-ERX-Registry (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/Unisphere-Data-ERX-Registry
# Produced by pysmi-0.3.4 at Wed May 1 15:31:00 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ConstraintsIntersection, ValueSizeConstraint, SingleValueConstraint, ConstraintsUnion, ValueRangeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "ValueSizeConstraint", "SingleValueConstraint", "ConstraintsUnion", "ValueRangeConstraint")
NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance")
MibIdentifier, MibScalar, MibTable, MibTableRow, MibTableColumn, IpAddress, Integer32, Gauge32, ObjectIdentity, iso, ModuleIdentity, NotificationType, Counter64, Bits, Counter32, Unsigned32, TimeTicks = mibBuilder.importSymbols("SNMPv2-SMI", "MibIdentifier", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "IpAddress", "Integer32", "Gauge32", "ObjectIdentity", "iso", "ModuleIdentity", "NotificationType", "Counter64", "Bits", "Counter32", "Unsigned32", "TimeTicks")
DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention")
usDataAdmin, = mibBuilder.importSymbols("Unisphere-Data-Registry", "usDataAdmin")
usdErxRegistry = ModuleIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2))
usdErxRegistry.setRevisions(('2002-10-10 18:51', '2002-05-08 12:34', '2002-05-07 14:05', '2001-08-20 16:08', '2001-06-12 18:27', '2001-06-04 20:11',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: usdErxRegistry.setRevisionsDescriptions(('Added support for the 12-port E3 IO adapter. Added support for the Ut3f12 line card. Added SRP module with 40 gbps plus switch fabric. Added Vitrual Tunneling Server (VTS) module. Added X.21/V.35 Server module and I/O adapter. Added OC12 APS I/O adapters. Added redundant midplane spare I/O adapters.', 'Added GE SFP IOA module.', "Added SRP modules with 5 gbps and 40 gbps 'plus' switch fabrics.", 'Added 12 port channelized T3 modules.', 'Added High Speed Serial Interface (HSSI) modules.', 'Initial version of this SNMP management information module.',))
if mibBuilder.loadTexts: usdErxRegistry.setLastUpdated('200210101851Z')
if mibBuilder.loadTexts: usdErxRegistry.setOrganization('Juniper Networks, Inc.')
if mibBuilder.loadTexts: usdErxRegistry.setContactInfo(' Juniper Networks, Inc. Postal: 10 Technology Park Drive Westford, MA 01886 USA Tel: +1 978 589 5800 Email: mib@Juniper.net')
if mibBuilder.loadTexts: usdErxRegistry.setDescription('Unisphere Edge Routing Switch (ERX) product family system-specific object identification values. This module includes the textual convention definition for the ERX module types. It also defines AutonomousType (OID) values for all the physical entity types (entPhysicalVendorType). This module will be updated whenever a new type of module or other hardware becomes available in ERX systems.')
usdErxEntPhysicalType = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1))
erxChassis = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 1))
if mibBuilder.loadTexts: erxChassis.setStatus('current')
if mibBuilder.loadTexts: erxChassis.setDescription("The vendor type ID for a generic Edge Routing Switch (ERX) chassis. This identifies an 'overall' physical entity for any ERX system.")
erx700Chassis = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 1, 1))
if mibBuilder.loadTexts: erx700Chassis.setStatus('current')
if mibBuilder.loadTexts: erx700Chassis.setDescription("The vendor type ID for an Edge Routing Switch 700 (ERX-700) 7-slot chassis. This is the 'overall' physical entity for an ERX-700 system.")
erx1400Chassis = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 1, 2))
if mibBuilder.loadTexts: erx1400Chassis.setStatus('current')
if mibBuilder.loadTexts: erx1400Chassis.setDescription("The vendor type ID for an Edge Routing Switch 1400 (ERX-1400) 14-slot chassis. This is the 'overall' physical entity for an ERX-1400 system.")
erxFanAssembly = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 2))
if mibBuilder.loadTexts: erxFanAssembly.setStatus('current')
if mibBuilder.loadTexts: erxFanAssembly.setDescription('The vendor type ID for an ERX fan assembly.')
erx700FanAssembly = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 2, 1))
if mibBuilder.loadTexts: erx700FanAssembly.setStatus('current')
if mibBuilder.loadTexts: erx700FanAssembly.setDescription('The vendor type ID for an ERX700 fan assembly with four fans and two -12 volt, 15 watt power converters (Product Code: FAN-7).')
erx1400FanAssembly = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 2, 2))
if mibBuilder.loadTexts: erx1400FanAssembly.setStatus('current')
if mibBuilder.loadTexts: erx1400FanAssembly.setDescription('The vendor type ID for an ERX1400 fan assembly with six fans and two -24 volt, 50 watt power converters (Product Code: FAN-14).')
erxPowerInput = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 3))
if mibBuilder.loadTexts: erxPowerInput.setStatus('current')
if mibBuilder.loadTexts: erxPowerInput.setDescription('The vendor type ID for an ERX power distribution module (Product Code: PDU).')
erxMidplane = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 4))
if mibBuilder.loadTexts: erxMidplane.setStatus('current')
if mibBuilder.loadTexts: erxMidplane.setDescription('The vendor type ID for an ERX midplane.')
erx700Midplane = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 4, 1))
if mibBuilder.loadTexts: erx700Midplane.setStatus('current')
if mibBuilder.loadTexts: erx700Midplane.setDescription('The vendor type ID for an ERX700 (7-slot) midplane.')
erx1400Midplane = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 4, 2))
if mibBuilder.loadTexts: erx1400Midplane.setStatus('current')
if mibBuilder.loadTexts: erx1400Midplane.setDescription('The vendor type ID for an ERX1400 (14-slot) midplane.')
erx1Plus1RedundantT1E1Midplane = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 4, 3))
if mibBuilder.loadTexts: erx1Plus1RedundantT1E1Midplane.setStatus('current')
if mibBuilder.loadTexts: erx1Plus1RedundantT1E1Midplane.setDescription('The vendor type ID for an ERX 1 + 1 redundant T1/E1 midplane (Product Code: REDMID-T1/E1/1/1).')
erx2Plus1RedundantT1E1Midplane = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 4, 4))
if mibBuilder.loadTexts: erx2Plus1RedundantT1E1Midplane.setStatus('current')
if mibBuilder.loadTexts: erx2Plus1RedundantT1E1Midplane.setDescription('The vendor type ID for an ERX 2 + 1 redundant T1/E1 midplane (Product Code: REDMID-T1/E1/2/1).')
erx3Plus1RedundantT1E1Midplane = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 4, 5))
if mibBuilder.loadTexts: erx3Plus1RedundantT1E1Midplane.setStatus('current')
if mibBuilder.loadTexts: erx3Plus1RedundantT1E1Midplane.setDescription('The vendor type ID for an ERX 3 + 1 redundant T1/E1 midplane (Product Code: REDMID-T1/E1/3/1).')
erx4Plus1RedundantT1E1Midplane = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 4, 6))
if mibBuilder.loadTexts: erx4Plus1RedundantT1E1Midplane.setStatus('current')
if mibBuilder.loadTexts: erx4Plus1RedundantT1E1Midplane.setDescription('The vendor type ID for an ERX 4 + 1 redundant T1/E1 midplane (Product Code: REDMID-T1/E1/4/1).')
erx5Plus1RedundantT1E1Midplane = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 4, 7))
if mibBuilder.loadTexts: erx5Plus1RedundantT1E1Midplane.setStatus('current')
if mibBuilder.loadTexts: erx5Plus1RedundantT1E1Midplane.setDescription('The vendor type ID for an ERX 5 + 1 redundant T1/E1 midplane (Product Code: REDMID-T1/E1/5/1).')
erx1Plus1RedundantT3E3Midplane = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 4, 8))
if mibBuilder.loadTexts: erx1Plus1RedundantT3E3Midplane.setStatus('current')
if mibBuilder.loadTexts: erx1Plus1RedundantT3E3Midplane.setDescription('The vendor type ID for an ERX 1 + 1 redundant CT3/T3/E3 midplane (Product Code: REDMID-T3/E3/1/1).')
erx2Plus1RedundantT3E3Midplane = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 4, 9))
if mibBuilder.loadTexts: erx2Plus1RedundantT3E3Midplane.setStatus('current')
if mibBuilder.loadTexts: erx2Plus1RedundantT3E3Midplane.setDescription('The vendor type ID for an ERX 2 + 1 redundant CT3/T3/E3 midplane (Product Code: REDMID-T3/E3/2/1).')
erx3Plus1RedundantT3E3Midplane = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 4, 10))
if mibBuilder.loadTexts: erx3Plus1RedundantT3E3Midplane.setStatus('current')
if mibBuilder.loadTexts: erx3Plus1RedundantT3E3Midplane.setDescription('The vendor type ID for an ERX 3 + 1 redundant CT3/T3/E3 midplane (Product Code: REDMID-T3/E3/3/1).')
erx4Plus1RedundantT3E3Midplane = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 4, 11))
if mibBuilder.loadTexts: erx4Plus1RedundantT3E3Midplane.setStatus('current')
if mibBuilder.loadTexts: erx4Plus1RedundantT3E3Midplane.setDescription('The vendor type ID for an ERX 4 + 1 redundant CT3/T3/E3 midplane (Product Code: REDMID-T3/E3/4/1).')
erx5Plus1RedundantT3E3Midplane = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 4, 12))
if mibBuilder.loadTexts: erx5Plus1RedundantT3E3Midplane.setStatus('current')
if mibBuilder.loadTexts: erx5Plus1RedundantT3E3Midplane.setDescription('The vendor type ID for an ERX 5 + 1 redundant CT3/T3/E3 midplane (Product Code: REDMID-T3/E3/5/1).')
erx1Plus1RedundantOcMidplane = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 4, 13))
if mibBuilder.loadTexts: erx1Plus1RedundantOcMidplane.setStatus('current')
if mibBuilder.loadTexts: erx1Plus1RedundantOcMidplane.setDescription('The vendor type ID for an ERX 1 + 1 redundant OC3/OC12 midplane (Product Code: REDMID-OC/1/1).')
erx2Plus1RedundantOcMidplane = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 4, 14))
if mibBuilder.loadTexts: erx2Plus1RedundantOcMidplane.setStatus('current')
if mibBuilder.loadTexts: erx2Plus1RedundantOcMidplane.setDescription('The vendor type ID for an ERX 2 + 1 redundant OC3/OC12 midplane (Product Code: REDMID-OC/2/1).')
erx3Plus1RedundantOcMidplane = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 4, 15))
if mibBuilder.loadTexts: erx3Plus1RedundantOcMidplane.setStatus('current')
if mibBuilder.loadTexts: erx3Plus1RedundantOcMidplane.setDescription('The vendor type ID for an ERX 3 + 1 redundant OC3/OC12 midplane (Product Code: REDMID-OC/3/1).')
erx4Plus1RedundantOcMidplane = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 4, 16))
if mibBuilder.loadTexts: erx4Plus1RedundantOcMidplane.setStatus('current')
if mibBuilder.loadTexts: erx4Plus1RedundantOcMidplane.setDescription('The vendor type ID for an ERX 4 + 1 redundant OC3/OC12 midplane (Product Code: REDMID-OC/4/1).')
erx5Plus1RedundantOcMidplane = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 4, 17))
if mibBuilder.loadTexts: erx5Plus1RedundantOcMidplane.setStatus('current')
if mibBuilder.loadTexts: erx5Plus1RedundantOcMidplane.setDescription('The vendor type ID for an ERX 5 + 1 redundant OC3/OC12 midplane (Product Code: REDMID-OC/5/1).')
erxSrpModule = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 5))
if mibBuilder.loadTexts: erxSrpModule.setStatus('current')
if mibBuilder.loadTexts: erxSrpModule.setDescription('The vendor type ID for an ERX Switch and Router Processor (SRP) module.')
erxSrp5 = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 5, 1))
if mibBuilder.loadTexts: erxSrp5.setStatus('current')
if mibBuilder.loadTexts: erxSrp5.setDescription('The vendor type ID for an ERX Switch and Router Processor (SRP) module with 5 Gbps switch fabric (Product Code: SRP-5).')
erxSrp10 = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 5, 2))
if mibBuilder.loadTexts: erxSrp10.setStatus('current')
if mibBuilder.loadTexts: erxSrp10.setDescription('The vendor type ID for an ERX Switch and Router Processor (SRP) module with 10 Gbps switch fabric (Product Code: SRP-10).')
erxSrp10Ecc = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 5, 3))
if mibBuilder.loadTexts: erxSrp10Ecc.setStatus('current')
if mibBuilder.loadTexts: erxSrp10Ecc.setDescription('The vendor type ID for an ERX Switch and Router Processor (SRP) module with 10 Gbps switch fabric with ECC (Product Code: SRP-10-ECC).')
erxSrp40 = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 5, 4))
if mibBuilder.loadTexts: erxSrp40.setStatus('current')
if mibBuilder.loadTexts: erxSrp40.setDescription('The vendor type ID for an ERX Switch and Router Processor (SRP) module with 40 Gbps switch fabric with ECC (Product Code: SRP-40-ECC).')
erxSrp5Plus = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 5, 5))
if mibBuilder.loadTexts: erxSrp5Plus.setStatus('current')
if mibBuilder.loadTexts: erxSrp5Plus.setDescription("The vendor type ID for an ERX Switch and Router Processor (SRP) module with 5 Gbps 'plus' switch fabric (Product Code: SRP-5Plus).")
erxSrp40Plus = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 5, 6))
if mibBuilder.loadTexts: erxSrp40Plus.setStatus('current')
if mibBuilder.loadTexts: erxSrp40Plus.setDescription("The vendor type ID for an ERX Switch and Router Processor (SRP) module with 40 Gbps 'plus' switch fabric (Product Code: ERX-40EC2-SRP).")
erxSrpIoAdapter = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 6))
if mibBuilder.loadTexts: erxSrpIoAdapter.setStatus('current')
if mibBuilder.loadTexts: erxSrpIoAdapter.setDescription('The vendor type ID for an ERX SRP I/O adapter (Product Code: SRP_I/O).')
erxLineModule = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 7))
if mibBuilder.loadTexts: erxLineModule.setStatus('current')
if mibBuilder.loadTexts: erxLineModule.setDescription('The vendor type ID for an ERX line module.')
erxCt1 = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 7, 1))
if mibBuilder.loadTexts: erxCt1.setStatus('current')
if mibBuilder.loadTexts: erxCt1.setDescription('The vendor type ID for an ERX 24 port fully channelized T1 line module (Product Code: CT1-FULL).')
erxCe1 = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 7, 2))
if mibBuilder.loadTexts: erxCe1.setStatus('current')
if mibBuilder.loadTexts: erxCe1.setDescription('The vendor type ID for an ERX 20 port fully channelized E1 line module (Product Code: CE1-FULL).')
erxCt3 = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 7, 4))
if mibBuilder.loadTexts: erxCt3.setStatus('current')
if mibBuilder.loadTexts: erxCt3.setDescription('The vendor type ID for an ERX 3 port channelized T3 line module (Product Code: CT3-3).')
erxT3Atm = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 7, 5))
if mibBuilder.loadTexts: erxT3Atm.setStatus('current')
if mibBuilder.loadTexts: erxT3Atm.setDescription('The vendor type ID for an ERX 3 port unchannelized T3 cell service line module (Product Code: T3-3A).')
erxT3Frame = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 7, 6))
if mibBuilder.loadTexts: erxT3Frame.setStatus('current')
if mibBuilder.loadTexts: erxT3Frame.setDescription('The vendor type ID for an ERX 3 port unchannelized T3 packet service line module (Product Code: T3-3F).')
erxE3Atm = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 7, 7))
if mibBuilder.loadTexts: erxE3Atm.setStatus('current')
if mibBuilder.loadTexts: erxE3Atm.setDescription('The vendor type ID for an ERX 3 port unchannelized E3 cell service line module (Product Code: E3-3A).')
erxE3Frame = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 7, 8))
if mibBuilder.loadTexts: erxE3Frame.setStatus('current')
if mibBuilder.loadTexts: erxE3Frame.setDescription('The vendor type ID for an ERX 3 port unchannelized E3 packet service line module (Product Code: E3-3F).')
erxOc3 = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 7, 9))
if mibBuilder.loadTexts: erxOc3.setStatus('current')
if mibBuilder.loadTexts: erxOc3.setDescription('The vendor type ID for an ERX dual port Optical Carrier 3 (OC-3/STM-1) SONET/SDH line module (Product Code: OC3-2).')
erxOc3Oc12Atm = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 7, 10))
if mibBuilder.loadTexts: erxOc3Oc12Atm.setStatus('current')
if mibBuilder.loadTexts: erxOc3Oc12Atm.setDescription('The vendor type ID for an ERX OC3/OC12 multi-personality cell service line module (Product Code: OC3/OC12-ATM).')
erxOc3Oc12Pos = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 7, 11))
if mibBuilder.loadTexts: erxOc3Oc12Pos.setStatus('current')
if mibBuilder.loadTexts: erxOc3Oc12Pos.setDescription('The vendor type ID for an ERX OC3/OC12 multi-personality packet service line module (Product Code: OC3/OC12-POS).')
erxCOcx = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 7, 12))
if mibBuilder.loadTexts: erxCOcx.setStatus('current')
if mibBuilder.loadTexts: erxCOcx.setDescription('The vendor type ID for an ERX channelized OC3/STM1 and OC12/STM4 line module (Product Code: COCX/STMX-F0).')
erxFe2 = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 7, 13))
if mibBuilder.loadTexts: erxFe2.setStatus('current')
if mibBuilder.loadTexts: erxFe2.setDescription('The vendor type ID for an ERX dual port fast (10/100) Ethernet line module (Product Code: 10/100_FE-2).')
erxGeFe = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 7, 14))
if mibBuilder.loadTexts: erxGeFe.setStatus('current')
if mibBuilder.loadTexts: erxGeFe.setDescription('The vendor type ID for an ERX multi-personality gigabit or fast (10/100) Ethernet line module (Product Code: GE/FE-8).')
erxTunnelService = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 7, 15))
if mibBuilder.loadTexts: erxTunnelService.setStatus('current')
if mibBuilder.loadTexts: erxTunnelService.setDescription('The vendor type ID for an ERX L2TP LNS and GRE Tunnel Service line module (Product Code: TUNNEL-SERVICE).')
erxHssi = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 7, 16))
if mibBuilder.loadTexts: erxHssi.setStatus('current')
if mibBuilder.loadTexts: erxHssi.setDescription('The vendor type ID for an ERX 3 port High Speed Serial Interface (HSSI) line module (Product Code: HSSI-3F).')
erxVts = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 7, 17))
if mibBuilder.loadTexts: erxVts.setStatus('current')
if mibBuilder.loadTexts: erxVts.setDescription('The vendor type ID for an ERX Virtual Tunnelling Server (VTS) line module (Product Code: ERX-IPSEC-MOD).')
erxCt3P12 = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 7, 18))
if mibBuilder.loadTexts: erxCt3P12.setStatus('current')
if mibBuilder.loadTexts: erxCt3P12.setDescription('The vendor type ID for an ERX 12 port channelized T3 line module (Product Code: CT3-12-F0).')
erxV35 = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 7, 19))
if mibBuilder.loadTexts: erxV35.setStatus('current')
if mibBuilder.loadTexts: erxV35.setDescription('The vendor type ID for an ERX X.21/V.35 server line module (Product Code: ERX-X21-V35-MOD).')
erxUt3E3Ocx = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 7, 20))
if mibBuilder.loadTexts: erxUt3E3Ocx.setStatus('current')
if mibBuilder.loadTexts: erxUt3E3Ocx.setDescription('The vendor type ID for an ERX OC12, quad OC3 or 12 port T3/E3 server line module (Product Code: ERX-UT3E3OCX-MOD).')
erxLineIoAdapter = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8))
if mibBuilder.loadTexts: erxLineIoAdapter.setStatus('current')
if mibBuilder.loadTexts: erxLineIoAdapter.setDescription('The vendor type ID for an ERX I/O adapter for a line module.')
erxCt1Ioa = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 1))
if mibBuilder.loadTexts: erxCt1Ioa.setStatus('current')
if mibBuilder.loadTexts: erxCt1Ioa.setDescription('The vendor type ID for an ERX 24 port channelized T1/J1 I/O adapter (Product Code: CT1-FULL-I/O).')
erxCe1Ioa = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 2))
if mibBuilder.loadTexts: erxCe1Ioa.setStatus('current')
if mibBuilder.loadTexts: erxCe1Ioa.setDescription('The vendor type ID for an ERX 20 port channelized E1 I/O adapter (Product Code: CE1-FULL-I/O).')
erxCe1TIoa = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 3))
if mibBuilder.loadTexts: erxCe1TIoa.setStatus('current')
if mibBuilder.loadTexts: erxCe1TIoa.setDescription('The vendor type ID for an ERX 20 port channelized E1 Telco I/O adapter (Product Code: CE1-FULL-I/OT).')
erxCt3Ioa = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 4))
if mibBuilder.loadTexts: erxCt3Ioa.setStatus('current')
if mibBuilder.loadTexts: erxCt3Ioa.setDescription('The vendor type ID for an ERX 3 port channelized T3/E3 I/O adapter (Product Code: CT3/T3-3_I/O).')
erxE3Ioa = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 5))
if mibBuilder.loadTexts: erxE3Ioa.setStatus('current')
if mibBuilder.loadTexts: erxE3Ioa.setDescription('The vendor type ID for an ERX 3 port E3 I/O adapter (Product Code: E3-3_I/O).')
erxOc3Mm2Ioa = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 6))
if mibBuilder.loadTexts: erxOc3Mm2Ioa.setStatus('current')
if mibBuilder.loadTexts: erxOc3Mm2Ioa.setDescription('The vendor type ID for an ERX dual port OC3/STM1 multi-mode I/O adapter (Product Code: OC3-2M_I/O).')
erxOc3Sm2Ioa = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 7))
if mibBuilder.loadTexts: erxOc3Sm2Ioa.setStatus('current')
if mibBuilder.loadTexts: erxOc3Sm2Ioa.setDescription('The vendor type ID for an ERX dual port OC3/STM1 single-mode I/O adapter (Product Code: OC3-2S_I/O).')
erxOc3Mm4Ioa = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 8))
if mibBuilder.loadTexts: erxOc3Mm4Ioa.setStatus('current')
if mibBuilder.loadTexts: erxOc3Mm4Ioa.setDescription('The vendor type ID for an ERX 4 port OC3/STM1 multi-mode I/O adapter (Product Code: OC3-4MM_I/O).')
erxOc3SmIr4Ioa = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 9))
if mibBuilder.loadTexts: erxOc3SmIr4Ioa.setStatus('current')
if mibBuilder.loadTexts: erxOc3SmIr4Ioa.setDescription('The vendor type ID for an ERX 4 port OC3/STM single-mode intermediate- reach I/O adapter (Product Code: OC3-4SM_I/O).')
erxOc3SmLr4Ioa = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 10))
if mibBuilder.loadTexts: erxOc3SmLr4Ioa.setStatus('current')
if mibBuilder.loadTexts: erxOc3SmLr4Ioa.setDescription('The vendor type ID for an ERX 4 port OC3/STM1 single-mode long-reach I/O adapter (Product Code: OC3-4LH-I/O).')
erxCOc3Mm4Ioa = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 11))
if mibBuilder.loadTexts: erxCOc3Mm4Ioa.setStatus('current')
if mibBuilder.loadTexts: erxCOc3Mm4Ioa.setDescription('The vendor type ID for an ERX 4 port channelized OC3/STM multi-mode I/O adapter (Product Code: COC3F0-MM-I/O).')
erxCOc3SmIr4Ioa = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 12))
if mibBuilder.loadTexts: erxCOc3SmIr4Ioa.setStatus('current')
if mibBuilder.loadTexts: erxCOc3SmIr4Ioa.setDescription('The vendor type ID for an ERX 4 port channelized OC3/STM1 single-mode intermediate-reach I/O adapter (Product Code: COC3F0-SM-I/O).')
erxCOc3SmLr4Ioa = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 13))
if mibBuilder.loadTexts: erxCOc3SmLr4Ioa.setStatus('current')
if mibBuilder.loadTexts: erxCOc3SmLr4Ioa.setDescription('The vendor type ID for an ERX 4 port channelized OC3/STM1 single-mode long-reach I/O adapter (Product Code: ERX-COC3-4LH-IOA).')
erxOc12Mm1Ioa = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 14))
if mibBuilder.loadTexts: erxOc12Mm1Ioa.setStatus('current')
if mibBuilder.loadTexts: erxOc12Mm1Ioa.setDescription('The vendor type ID for an ERX single port OC12/STM4 multi-mode I/O adapter (Product Code: OC12-MM_I/O).')
erxOc12SmIr1Ioa = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 15))
if mibBuilder.loadTexts: erxOc12SmIr1Ioa.setStatus('current')
if mibBuilder.loadTexts: erxOc12SmIr1Ioa.setDescription('The vendor type ID for an ERX single port OC12/STM4 single-mode intermediate-reach I/O adapter (Product Code: OC12-SM_I/O).')
erxOc12SmLr1Ioa = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 16))
if mibBuilder.loadTexts: erxOc12SmLr1Ioa.setStatus('current')
if mibBuilder.loadTexts: erxOc12SmLr1Ioa.setDescription('The vendor type ID for an ERX single port OC12/STM4 single-mode long-reach I/O adapter (Product Code: OC12-LH-I/O).')
erxCOc12Mm1Ioa = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 17))
if mibBuilder.loadTexts: erxCOc12Mm1Ioa.setStatus('current')
if mibBuilder.loadTexts: erxCOc12Mm1Ioa.setDescription('The vendor type ID for an ERX single port channelized OC12/STM4 multi-mode I/O adapter (Product Code: COC12F0-MM-I/O).')
erxCOc12SmIr1Ioa = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 18))
if mibBuilder.loadTexts: erxCOc12SmIr1Ioa.setStatus('current')
if mibBuilder.loadTexts: erxCOc12SmIr1Ioa.setDescription('The vendor type ID for an ERX single port channelized OC12/STM4 single-mode intermediate-reach I/O adapter (Product Code: COC12F0-SM-I/O).')
erxCOc12SmLr1Ioa = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 19))
if mibBuilder.loadTexts: erxCOc12SmLr1Ioa.setStatus('current')
if mibBuilder.loadTexts: erxCOc12SmLr1Ioa.setDescription('The vendor type ID for an ERX single port channelized OC12/STM4 single-mode long-reach I/O adapter (Product Code: ERX-COC12-LH-IOA).')
erxFe2Ioa = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 20))
if mibBuilder.loadTexts: erxFe2Ioa.setStatus('current')
if mibBuilder.loadTexts: erxFe2Ioa.setDescription('The vendor type ID for an ERX dual port 10/100 Fast Ethernet I/O adapter (Product Code: 10/100_FE-2_I/O).')
erxFe8Ioa = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 21))
if mibBuilder.loadTexts: erxFe8Ioa.setStatus('current')
if mibBuilder.loadTexts: erxFe8Ioa.setDescription('The vendor type ID for an ERX 8 port 10/100 Fast Ethernet I/O adapter (Product Code: FE-8_I/O).')
erxGeMm1Ioa = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 22))
if mibBuilder.loadTexts: erxGeMm1Ioa.setStatus('current')
if mibBuilder.loadTexts: erxGeMm1Ioa.setDescription('The vendor type ID for an ERX single port Gigabit Ethernet multi-mode I/O adapter (Product Code: GE_M_I/O).')
erxGeSm1Ioa = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 23))
if mibBuilder.loadTexts: erxGeSm1Ioa.setStatus('current')
if mibBuilder.loadTexts: erxGeSm1Ioa.setDescription('The vendor type ID for an ERX single port Gigabit Ethernet single-mode I/O adapter (Product Code: GE_S_I/O).')
erxHssiIoa = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 24))
if mibBuilder.loadTexts: erxHssiIoa.setStatus('current')
if mibBuilder.loadTexts: erxHssiIoa.setDescription('The vendor type ID for an ERX 3 port High Speed Serial Interface (HSSI) I/O adapter (Product Code: HSSI-3-I/O).')
erxCt3P12Ioa = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 25))
if mibBuilder.loadTexts: erxCt3P12Ioa.setStatus('current')
if mibBuilder.loadTexts: erxCt3P12Ioa.setDescription('The vendor type ID for an ERX 12 port channelized T3 I/O adapter (Product Code: T312-F0-F3-I/O).')
erxV35Ioa = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 26))
if mibBuilder.loadTexts: erxV35Ioa.setStatus('current')
if mibBuilder.loadTexts: erxV35Ioa.setDescription('The vendor type ID for an ERX X.21/V.35 I/O adapter (Product Code: ERX-X21-V35-IOA).')
erxGeSfpIoa = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 27))
if mibBuilder.loadTexts: erxGeSfpIoa.setStatus('current')
if mibBuilder.loadTexts: erxGeSfpIoa.setDescription('The vendor type ID for an ERX single port Gigabit Ethernet SFP I/O adapter (Product Code: ERX-GIGESFP-IOA).')
erxE3P12Ioa = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 28))
if mibBuilder.loadTexts: erxE3P12Ioa.setStatus('current')
if mibBuilder.loadTexts: erxE3P12Ioa.setDescription('The vendor type ID for an ERX 12-port E3 I/O adapter (Product Code: E3-12-F3-I/O).')
erxCOc12Mm2Ioa = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 30))
if mibBuilder.loadTexts: erxCOc12Mm2Ioa.setStatus('current')
if mibBuilder.loadTexts: erxCOc12Mm2Ioa.setDescription('The vendor type ID for an ERX dual port OC12/STM4 channelized multi-mode I/O adapter (Product Code: ERX-COC12-MA-IOA).')
erxCOc12SmIr2Ioa = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 31))
if mibBuilder.loadTexts: erxCOc12SmIr2Ioa.setStatus('current')
if mibBuilder.loadTexts: erxCOc12SmIr2Ioa.setDescription('The vendor type ID for an ERX dual port OC12/STM4 channelized single-mode intermediate-reach I/O adapter (Product Code: ERX-COC12-SA-IOA).')
erxCOc12SmLr2Ioa = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 32))
if mibBuilder.loadTexts: erxCOc12SmLr2Ioa.setStatus('current')
if mibBuilder.loadTexts: erxCOc12SmLr2Ioa.setDescription('The vendor type ID for an ERX dual port OC12/STM4 channelized single-mode long-reach I/O adapter (Product Code: ERX-COC12-LA-IOA).')
erxOc12Mm2ApsIoa = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 33))
if mibBuilder.loadTexts: erxOc12Mm2ApsIoa.setStatus('current')
if mibBuilder.loadTexts: erxOc12Mm2ApsIoa.setDescription('The vendor type ID for an ERX dual port OC12/STM4 multi-mode with APS I/O adapter (Product Code: ERX-OC12MM-A-IOA).')
erxOc12SmIr2ApsIoa = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 34))
if mibBuilder.loadTexts: erxOc12SmIr2ApsIoa.setStatus('current')
if mibBuilder.loadTexts: erxOc12SmIr2ApsIoa.setDescription('The vendor type ID for an ERX dual port OC12/STM4 single-mode intermediate-reach with APS I/O adapter (Product Code: ERX-OC12SM-A-IOA).')
erxOc12SmLr2ApsIoa = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 35))
if mibBuilder.loadTexts: erxOc12SmLr2ApsIoa.setStatus('current')
if mibBuilder.loadTexts: erxOc12SmLr2ApsIoa.setDescription('The vendor type ID for an ERX dual port OC12/STM4 single-mode long-reach with APS I/O adapter (Product Code: ERX-OC12LH-A-IOA).')
erxT1E1RMidSpareIoa = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 42))
if mibBuilder.loadTexts: erxT1E1RMidSpareIoa.setStatus('current')
if mibBuilder.loadTexts: erxT1E1RMidSpareIoa.setDescription('The vendor type ID for an ERX T1/E1 redundant midplane spare I/O adapter (Product Code: PNL-RDMD-T1/E1).')
erxT3E3RMidSpareIoa = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 43))
if mibBuilder.loadTexts: erxT3E3RMidSpareIoa.setStatus('current')
if mibBuilder.loadTexts: erxT3E3RMidSpareIoa.setDescription('The vendor type ID for an ERX T3/E3 redundant midplane spare I/O adapter (Product Code: PNL-RDMD-T3/E3).')
erxCt3RMidSpareIoa = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 44))
if mibBuilder.loadTexts: erxCt3RMidSpareIoa.setStatus('current')
if mibBuilder.loadTexts: erxCt3RMidSpareIoa.setDescription('The vendor type ID for an ERX 12 port channelized T3 redundant midplane spare I/O adapter (Product Code: ERX-12PT3E3-PNL).')
erxOcxRMidSpareIoa = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 45))
if mibBuilder.loadTexts: erxOcxRMidSpareIoa.setStatus('current')
if mibBuilder.loadTexts: erxOcxRMidSpareIoa.setDescription('The vendor type ID for an ERX OC3/OC12 redundant midplane spare I/O adapter (Product Code: PNL-RDMD-OCX).')
erxCOcxRMidSpareIoa = ObjectIdentity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 46))
if mibBuilder.loadTexts: erxCOcxRMidSpareIoa.setStatus('current')
if mibBuilder.loadTexts: erxCOcxRMidSpareIoa.setDescription('The vendor type ID for an ERX OC3/OC12 channelized redundant midplane spare I/O adapter (Product Code: ERX-COCXPNL-IOA).')
mibBuilder.exportSymbols("Unisphere-Data-ERX-Registry", erxE3Frame=erxE3Frame, erxGeFe=erxGeFe, erxCOc12SmLr1Ioa=erxCOc12SmLr1Ioa, erxTunnelService=erxTunnelService, erxSrp10=erxSrp10, erx1400Midplane=erx1400Midplane, erxE3P12Ioa=erxE3P12Ioa, erx700Midplane=erx700Midplane, erxLineModule=erxLineModule, erxGeSm1Ioa=erxGeSm1Ioa, erxOc3Mm4Ioa=erxOc3Mm4Ioa, erxSrp5Plus=erxSrp5Plus, erxCOcx=erxCOcx, erxE3Ioa=erxE3Ioa, erxOcxRMidSpareIoa=erxOcxRMidSpareIoa, erxFe2=erxFe2, erxCt3RMidSpareIoa=erxCt3RMidSpareIoa, erxLineIoAdapter=erxLineIoAdapter, erxV35Ioa=erxV35Ioa, erxCOc3SmLr4Ioa=erxCOc3SmLr4Ioa, erxOc3Mm2Ioa=erxOc3Mm2Ioa, usdErxRegistry=usdErxRegistry, erxT3Frame=erxT3Frame, erxT3E3RMidSpareIoa=erxT3E3RMidSpareIoa, erx1400Chassis=erx1400Chassis, erxV35=erxV35, erxCe1TIoa=erxCe1TIoa, erxSrp40=erxSrp40, erx3Plus1RedundantT3E3Midplane=erx3Plus1RedundantT3E3Midplane, erxSrp40Plus=erxSrp40Plus, erx700FanAssembly=erx700FanAssembly, erxOc12SmLr2ApsIoa=erxOc12SmLr2ApsIoa, erxChassis=erxChassis, erxOc3Oc12Pos=erxOc3Oc12Pos, erxSrp5=erxSrp5, erxCe1=erxCe1, erxHssiIoa=erxHssiIoa, erx1Plus1RedundantOcMidplane=erx1Plus1RedundantOcMidplane, erx700Chassis=erx700Chassis, erxUt3E3Ocx=erxUt3E3Ocx, erx2Plus1RedundantOcMidplane=erx2Plus1RedundantOcMidplane, erx5Plus1RedundantT1E1Midplane=erx5Plus1RedundantT1E1Midplane, erxE3Atm=erxE3Atm, erxGeSfpIoa=erxGeSfpIoa, erxCOc12SmLr2Ioa=erxCOc12SmLr2Ioa, erxCOc12SmIr1Ioa=erxCOc12SmIr1Ioa, erxSrp10Ecc=erxSrp10Ecc, erx4Plus1RedundantT1E1Midplane=erx4Plus1RedundantT1E1Midplane, erxOc12SmLr1Ioa=erxOc12SmLr1Ioa, erxT1E1RMidSpareIoa=erxT1E1RMidSpareIoa, erxFe2Ioa=erxFe2Ioa, erxCe1Ioa=erxCe1Ioa, erxCt3=erxCt3, erx4Plus1RedundantT3E3Midplane=erx4Plus1RedundantT3E3Midplane, erxMidplane=erxMidplane, erxOc12SmIr2ApsIoa=erxOc12SmIr2ApsIoa, erxCOcxRMidSpareIoa=erxCOcxRMidSpareIoa, erxOc3SmIr4Ioa=erxOc3SmIr4Ioa, erx2Plus1RedundantT3E3Midplane=erx2Plus1RedundantT3E3Midplane, erxOc12SmIr1Ioa=erxOc12SmIr1Ioa, erxCOc12SmIr2Ioa=erxCOc12SmIr2Ioa, erxOc12Mm2ApsIoa=erxOc12Mm2ApsIoa, erxOc3SmLr4Ioa=erxOc3SmLr4Ioa, erx1400FanAssembly=erx1400FanAssembly, erxT3Atm=erxT3Atm, erxPowerInput=erxPowerInput, erxCt1=erxCt1, erxSrpIoAdapter=erxSrpIoAdapter, erx5Plus1RedundantT3E3Midplane=erx5Plus1RedundantT3E3Midplane, erx5Plus1RedundantOcMidplane=erx5Plus1RedundantOcMidplane, erxOc12Mm1Ioa=erxOc12Mm1Ioa, PYSNMP_MODULE_ID=usdErxRegistry, erxFe8Ioa=erxFe8Ioa, usdErxEntPhysicalType=usdErxEntPhysicalType, erxFanAssembly=erxFanAssembly, erxCt3Ioa=erxCt3Ioa, erx3Plus1RedundantT1E1Midplane=erx3Plus1RedundantT1E1Midplane, erx3Plus1RedundantOcMidplane=erx3Plus1RedundantOcMidplane, erxSrpModule=erxSrpModule, erxOc3Oc12Atm=erxOc3Oc12Atm, erxCt1Ioa=erxCt1Ioa, erx2Plus1RedundantT1E1Midplane=erx2Plus1RedundantT1E1Midplane, erxOc3=erxOc3, erxHssi=erxHssi, erxCt3P12Ioa=erxCt3P12Ioa, erxCOc3SmIr4Ioa=erxCOc3SmIr4Ioa, erx1Plus1RedundantT1E1Midplane=erx1Plus1RedundantT1E1Midplane, erxVts=erxVts, erx1Plus1RedundantT3E3Midplane=erx1Plus1RedundantT3E3Midplane, erx4Plus1RedundantOcMidplane=erx4Plus1RedundantOcMidplane, erxCOc12Mm2Ioa=erxCOc12Mm2Ioa, erxCOc12Mm1Ioa=erxCOc12Mm1Ioa, erxCt3P12=erxCt3P12, erxCOc3Mm4Ioa=erxCOc3Mm4Ioa, erxGeMm1Ioa=erxGeMm1Ioa, erxOc3Sm2Ioa=erxOc3Sm2Ioa)
| (object_identifier, integer, octet_string) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'Integer', 'OctetString')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(constraints_intersection, value_size_constraint, single_value_constraint, constraints_union, value_range_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsIntersection', 'ValueSizeConstraint', 'SingleValueConstraint', 'ConstraintsUnion', 'ValueRangeConstraint')
(notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance')
(mib_identifier, mib_scalar, mib_table, mib_table_row, mib_table_column, ip_address, integer32, gauge32, object_identity, iso, module_identity, notification_type, counter64, bits, counter32, unsigned32, time_ticks) = mibBuilder.importSymbols('SNMPv2-SMI', 'MibIdentifier', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'IpAddress', 'Integer32', 'Gauge32', 'ObjectIdentity', 'iso', 'ModuleIdentity', 'NotificationType', 'Counter64', 'Bits', 'Counter32', 'Unsigned32', 'TimeTicks')
(display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention')
(us_data_admin,) = mibBuilder.importSymbols('Unisphere-Data-Registry', 'usDataAdmin')
usd_erx_registry = module_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2))
usdErxRegistry.setRevisions(('2002-10-10 18:51', '2002-05-08 12:34', '2002-05-07 14:05', '2001-08-20 16:08', '2001-06-12 18:27', '2001-06-04 20:11'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts:
usdErxRegistry.setRevisionsDescriptions(('Added support for the 12-port E3 IO adapter. Added support for the Ut3f12 line card. Added SRP module with 40 gbps plus switch fabric. Added Vitrual Tunneling Server (VTS) module. Added X.21/V.35 Server module and I/O adapter. Added OC12 APS I/O adapters. Added redundant midplane spare I/O adapters.', 'Added GE SFP IOA module.', "Added SRP modules with 5 gbps and 40 gbps 'plus' switch fabrics.", 'Added 12 port channelized T3 modules.', 'Added High Speed Serial Interface (HSSI) modules.', 'Initial version of this SNMP management information module.'))
if mibBuilder.loadTexts:
usdErxRegistry.setLastUpdated('200210101851Z')
if mibBuilder.loadTexts:
usdErxRegistry.setOrganization('Juniper Networks, Inc.')
if mibBuilder.loadTexts:
usdErxRegistry.setContactInfo(' Juniper Networks, Inc. Postal: 10 Technology Park Drive Westford, MA 01886 USA Tel: +1 978 589 5800 Email: mib@Juniper.net')
if mibBuilder.loadTexts:
usdErxRegistry.setDescription('Unisphere Edge Routing Switch (ERX) product family system-specific object identification values. This module includes the textual convention definition for the ERX module types. It also defines AutonomousType (OID) values for all the physical entity types (entPhysicalVendorType). This module will be updated whenever a new type of module or other hardware becomes available in ERX systems.')
usd_erx_ent_physical_type = mib_identifier((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1))
erx_chassis = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 1))
if mibBuilder.loadTexts:
erxChassis.setStatus('current')
if mibBuilder.loadTexts:
erxChassis.setDescription("The vendor type ID for a generic Edge Routing Switch (ERX) chassis. This identifies an 'overall' physical entity for any ERX system.")
erx700_chassis = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 1, 1))
if mibBuilder.loadTexts:
erx700Chassis.setStatus('current')
if mibBuilder.loadTexts:
erx700Chassis.setDescription("The vendor type ID for an Edge Routing Switch 700 (ERX-700) 7-slot chassis. This is the 'overall' physical entity for an ERX-700 system.")
erx1400_chassis = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 1, 2))
if mibBuilder.loadTexts:
erx1400Chassis.setStatus('current')
if mibBuilder.loadTexts:
erx1400Chassis.setDescription("The vendor type ID for an Edge Routing Switch 1400 (ERX-1400) 14-slot chassis. This is the 'overall' physical entity for an ERX-1400 system.")
erx_fan_assembly = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 2))
if mibBuilder.loadTexts:
erxFanAssembly.setStatus('current')
if mibBuilder.loadTexts:
erxFanAssembly.setDescription('The vendor type ID for an ERX fan assembly.')
erx700_fan_assembly = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 2, 1))
if mibBuilder.loadTexts:
erx700FanAssembly.setStatus('current')
if mibBuilder.loadTexts:
erx700FanAssembly.setDescription('The vendor type ID for an ERX700 fan assembly with four fans and two -12 volt, 15 watt power converters (Product Code: FAN-7).')
erx1400_fan_assembly = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 2, 2))
if mibBuilder.loadTexts:
erx1400FanAssembly.setStatus('current')
if mibBuilder.loadTexts:
erx1400FanAssembly.setDescription('The vendor type ID for an ERX1400 fan assembly with six fans and two -24 volt, 50 watt power converters (Product Code: FAN-14).')
erx_power_input = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 3))
if mibBuilder.loadTexts:
erxPowerInput.setStatus('current')
if mibBuilder.loadTexts:
erxPowerInput.setDescription('The vendor type ID for an ERX power distribution module (Product Code: PDU).')
erx_midplane = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 4))
if mibBuilder.loadTexts:
erxMidplane.setStatus('current')
if mibBuilder.loadTexts:
erxMidplane.setDescription('The vendor type ID for an ERX midplane.')
erx700_midplane = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 4, 1))
if mibBuilder.loadTexts:
erx700Midplane.setStatus('current')
if mibBuilder.loadTexts:
erx700Midplane.setDescription('The vendor type ID for an ERX700 (7-slot) midplane.')
erx1400_midplane = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 4, 2))
if mibBuilder.loadTexts:
erx1400Midplane.setStatus('current')
if mibBuilder.loadTexts:
erx1400Midplane.setDescription('The vendor type ID for an ERX1400 (14-slot) midplane.')
erx1_plus1_redundant_t1_e1_midplane = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 4, 3))
if mibBuilder.loadTexts:
erx1Plus1RedundantT1E1Midplane.setStatus('current')
if mibBuilder.loadTexts:
erx1Plus1RedundantT1E1Midplane.setDescription('The vendor type ID for an ERX 1 + 1 redundant T1/E1 midplane (Product Code: REDMID-T1/E1/1/1).')
erx2_plus1_redundant_t1_e1_midplane = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 4, 4))
if mibBuilder.loadTexts:
erx2Plus1RedundantT1E1Midplane.setStatus('current')
if mibBuilder.loadTexts:
erx2Plus1RedundantT1E1Midplane.setDescription('The vendor type ID for an ERX 2 + 1 redundant T1/E1 midplane (Product Code: REDMID-T1/E1/2/1).')
erx3_plus1_redundant_t1_e1_midplane = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 4, 5))
if mibBuilder.loadTexts:
erx3Plus1RedundantT1E1Midplane.setStatus('current')
if mibBuilder.loadTexts:
erx3Plus1RedundantT1E1Midplane.setDescription('The vendor type ID for an ERX 3 + 1 redundant T1/E1 midplane (Product Code: REDMID-T1/E1/3/1).')
erx4_plus1_redundant_t1_e1_midplane = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 4, 6))
if mibBuilder.loadTexts:
erx4Plus1RedundantT1E1Midplane.setStatus('current')
if mibBuilder.loadTexts:
erx4Plus1RedundantT1E1Midplane.setDescription('The vendor type ID for an ERX 4 + 1 redundant T1/E1 midplane (Product Code: REDMID-T1/E1/4/1).')
erx5_plus1_redundant_t1_e1_midplane = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 4, 7))
if mibBuilder.loadTexts:
erx5Plus1RedundantT1E1Midplane.setStatus('current')
if mibBuilder.loadTexts:
erx5Plus1RedundantT1E1Midplane.setDescription('The vendor type ID for an ERX 5 + 1 redundant T1/E1 midplane (Product Code: REDMID-T1/E1/5/1).')
erx1_plus1_redundant_t3_e3_midplane = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 4, 8))
if mibBuilder.loadTexts:
erx1Plus1RedundantT3E3Midplane.setStatus('current')
if mibBuilder.loadTexts:
erx1Plus1RedundantT3E3Midplane.setDescription('The vendor type ID for an ERX 1 + 1 redundant CT3/T3/E3 midplane (Product Code: REDMID-T3/E3/1/1).')
erx2_plus1_redundant_t3_e3_midplane = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 4, 9))
if mibBuilder.loadTexts:
erx2Plus1RedundantT3E3Midplane.setStatus('current')
if mibBuilder.loadTexts:
erx2Plus1RedundantT3E3Midplane.setDescription('The vendor type ID for an ERX 2 + 1 redundant CT3/T3/E3 midplane (Product Code: REDMID-T3/E3/2/1).')
erx3_plus1_redundant_t3_e3_midplane = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 4, 10))
if mibBuilder.loadTexts:
erx3Plus1RedundantT3E3Midplane.setStatus('current')
if mibBuilder.loadTexts:
erx3Plus1RedundantT3E3Midplane.setDescription('The vendor type ID for an ERX 3 + 1 redundant CT3/T3/E3 midplane (Product Code: REDMID-T3/E3/3/1).')
erx4_plus1_redundant_t3_e3_midplane = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 4, 11))
if mibBuilder.loadTexts:
erx4Plus1RedundantT3E3Midplane.setStatus('current')
if mibBuilder.loadTexts:
erx4Plus1RedundantT3E3Midplane.setDescription('The vendor type ID for an ERX 4 + 1 redundant CT3/T3/E3 midplane (Product Code: REDMID-T3/E3/4/1).')
erx5_plus1_redundant_t3_e3_midplane = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 4, 12))
if mibBuilder.loadTexts:
erx5Plus1RedundantT3E3Midplane.setStatus('current')
if mibBuilder.loadTexts:
erx5Plus1RedundantT3E3Midplane.setDescription('The vendor type ID for an ERX 5 + 1 redundant CT3/T3/E3 midplane (Product Code: REDMID-T3/E3/5/1).')
erx1_plus1_redundant_oc_midplane = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 4, 13))
if mibBuilder.loadTexts:
erx1Plus1RedundantOcMidplane.setStatus('current')
if mibBuilder.loadTexts:
erx1Plus1RedundantOcMidplane.setDescription('The vendor type ID for an ERX 1 + 1 redundant OC3/OC12 midplane (Product Code: REDMID-OC/1/1).')
erx2_plus1_redundant_oc_midplane = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 4, 14))
if mibBuilder.loadTexts:
erx2Plus1RedundantOcMidplane.setStatus('current')
if mibBuilder.loadTexts:
erx2Plus1RedundantOcMidplane.setDescription('The vendor type ID for an ERX 2 + 1 redundant OC3/OC12 midplane (Product Code: REDMID-OC/2/1).')
erx3_plus1_redundant_oc_midplane = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 4, 15))
if mibBuilder.loadTexts:
erx3Plus1RedundantOcMidplane.setStatus('current')
if mibBuilder.loadTexts:
erx3Plus1RedundantOcMidplane.setDescription('The vendor type ID for an ERX 3 + 1 redundant OC3/OC12 midplane (Product Code: REDMID-OC/3/1).')
erx4_plus1_redundant_oc_midplane = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 4, 16))
if mibBuilder.loadTexts:
erx4Plus1RedundantOcMidplane.setStatus('current')
if mibBuilder.loadTexts:
erx4Plus1RedundantOcMidplane.setDescription('The vendor type ID for an ERX 4 + 1 redundant OC3/OC12 midplane (Product Code: REDMID-OC/4/1).')
erx5_plus1_redundant_oc_midplane = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 4, 17))
if mibBuilder.loadTexts:
erx5Plus1RedundantOcMidplane.setStatus('current')
if mibBuilder.loadTexts:
erx5Plus1RedundantOcMidplane.setDescription('The vendor type ID for an ERX 5 + 1 redundant OC3/OC12 midplane (Product Code: REDMID-OC/5/1).')
erx_srp_module = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 5))
if mibBuilder.loadTexts:
erxSrpModule.setStatus('current')
if mibBuilder.loadTexts:
erxSrpModule.setDescription('The vendor type ID for an ERX Switch and Router Processor (SRP) module.')
erx_srp5 = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 5, 1))
if mibBuilder.loadTexts:
erxSrp5.setStatus('current')
if mibBuilder.loadTexts:
erxSrp5.setDescription('The vendor type ID for an ERX Switch and Router Processor (SRP) module with 5 Gbps switch fabric (Product Code: SRP-5).')
erx_srp10 = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 5, 2))
if mibBuilder.loadTexts:
erxSrp10.setStatus('current')
if mibBuilder.loadTexts:
erxSrp10.setDescription('The vendor type ID for an ERX Switch and Router Processor (SRP) module with 10 Gbps switch fabric (Product Code: SRP-10).')
erx_srp10_ecc = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 5, 3))
if mibBuilder.loadTexts:
erxSrp10Ecc.setStatus('current')
if mibBuilder.loadTexts:
erxSrp10Ecc.setDescription('The vendor type ID for an ERX Switch and Router Processor (SRP) module with 10 Gbps switch fabric with ECC (Product Code: SRP-10-ECC).')
erx_srp40 = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 5, 4))
if mibBuilder.loadTexts:
erxSrp40.setStatus('current')
if mibBuilder.loadTexts:
erxSrp40.setDescription('The vendor type ID for an ERX Switch and Router Processor (SRP) module with 40 Gbps switch fabric with ECC (Product Code: SRP-40-ECC).')
erx_srp5_plus = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 5, 5))
if mibBuilder.loadTexts:
erxSrp5Plus.setStatus('current')
if mibBuilder.loadTexts:
erxSrp5Plus.setDescription("The vendor type ID for an ERX Switch and Router Processor (SRP) module with 5 Gbps 'plus' switch fabric (Product Code: SRP-5Plus).")
erx_srp40_plus = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 5, 6))
if mibBuilder.loadTexts:
erxSrp40Plus.setStatus('current')
if mibBuilder.loadTexts:
erxSrp40Plus.setDescription("The vendor type ID for an ERX Switch and Router Processor (SRP) module with 40 Gbps 'plus' switch fabric (Product Code: ERX-40EC2-SRP).")
erx_srp_io_adapter = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 6))
if mibBuilder.loadTexts:
erxSrpIoAdapter.setStatus('current')
if mibBuilder.loadTexts:
erxSrpIoAdapter.setDescription('The vendor type ID for an ERX SRP I/O adapter (Product Code: SRP_I/O).')
erx_line_module = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 7))
if mibBuilder.loadTexts:
erxLineModule.setStatus('current')
if mibBuilder.loadTexts:
erxLineModule.setDescription('The vendor type ID for an ERX line module.')
erx_ct1 = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 7, 1))
if mibBuilder.loadTexts:
erxCt1.setStatus('current')
if mibBuilder.loadTexts:
erxCt1.setDescription('The vendor type ID for an ERX 24 port fully channelized T1 line module (Product Code: CT1-FULL).')
erx_ce1 = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 7, 2))
if mibBuilder.loadTexts:
erxCe1.setStatus('current')
if mibBuilder.loadTexts:
erxCe1.setDescription('The vendor type ID for an ERX 20 port fully channelized E1 line module (Product Code: CE1-FULL).')
erx_ct3 = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 7, 4))
if mibBuilder.loadTexts:
erxCt3.setStatus('current')
if mibBuilder.loadTexts:
erxCt3.setDescription('The vendor type ID for an ERX 3 port channelized T3 line module (Product Code: CT3-3).')
erx_t3_atm = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 7, 5))
if mibBuilder.loadTexts:
erxT3Atm.setStatus('current')
if mibBuilder.loadTexts:
erxT3Atm.setDescription('The vendor type ID for an ERX 3 port unchannelized T3 cell service line module (Product Code: T3-3A).')
erx_t3_frame = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 7, 6))
if mibBuilder.loadTexts:
erxT3Frame.setStatus('current')
if mibBuilder.loadTexts:
erxT3Frame.setDescription('The vendor type ID for an ERX 3 port unchannelized T3 packet service line module (Product Code: T3-3F).')
erx_e3_atm = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 7, 7))
if mibBuilder.loadTexts:
erxE3Atm.setStatus('current')
if mibBuilder.loadTexts:
erxE3Atm.setDescription('The vendor type ID for an ERX 3 port unchannelized E3 cell service line module (Product Code: E3-3A).')
erx_e3_frame = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 7, 8))
if mibBuilder.loadTexts:
erxE3Frame.setStatus('current')
if mibBuilder.loadTexts:
erxE3Frame.setDescription('The vendor type ID for an ERX 3 port unchannelized E3 packet service line module (Product Code: E3-3F).')
erx_oc3 = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 7, 9))
if mibBuilder.loadTexts:
erxOc3.setStatus('current')
if mibBuilder.loadTexts:
erxOc3.setDescription('The vendor type ID for an ERX dual port Optical Carrier 3 (OC-3/STM-1) SONET/SDH line module (Product Code: OC3-2).')
erx_oc3_oc12_atm = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 7, 10))
if mibBuilder.loadTexts:
erxOc3Oc12Atm.setStatus('current')
if mibBuilder.loadTexts:
erxOc3Oc12Atm.setDescription('The vendor type ID for an ERX OC3/OC12 multi-personality cell service line module (Product Code: OC3/OC12-ATM).')
erx_oc3_oc12_pos = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 7, 11))
if mibBuilder.loadTexts:
erxOc3Oc12Pos.setStatus('current')
if mibBuilder.loadTexts:
erxOc3Oc12Pos.setDescription('The vendor type ID for an ERX OC3/OC12 multi-personality packet service line module (Product Code: OC3/OC12-POS).')
erx_c_ocx = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 7, 12))
if mibBuilder.loadTexts:
erxCOcx.setStatus('current')
if mibBuilder.loadTexts:
erxCOcx.setDescription('The vendor type ID for an ERX channelized OC3/STM1 and OC12/STM4 line module (Product Code: COCX/STMX-F0).')
erx_fe2 = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 7, 13))
if mibBuilder.loadTexts:
erxFe2.setStatus('current')
if mibBuilder.loadTexts:
erxFe2.setDescription('The vendor type ID for an ERX dual port fast (10/100) Ethernet line module (Product Code: 10/100_FE-2).')
erx_ge_fe = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 7, 14))
if mibBuilder.loadTexts:
erxGeFe.setStatus('current')
if mibBuilder.loadTexts:
erxGeFe.setDescription('The vendor type ID for an ERX multi-personality gigabit or fast (10/100) Ethernet line module (Product Code: GE/FE-8).')
erx_tunnel_service = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 7, 15))
if mibBuilder.loadTexts:
erxTunnelService.setStatus('current')
if mibBuilder.loadTexts:
erxTunnelService.setDescription('The vendor type ID for an ERX L2TP LNS and GRE Tunnel Service line module (Product Code: TUNNEL-SERVICE).')
erx_hssi = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 7, 16))
if mibBuilder.loadTexts:
erxHssi.setStatus('current')
if mibBuilder.loadTexts:
erxHssi.setDescription('The vendor type ID for an ERX 3 port High Speed Serial Interface (HSSI) line module (Product Code: HSSI-3F).')
erx_vts = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 7, 17))
if mibBuilder.loadTexts:
erxVts.setStatus('current')
if mibBuilder.loadTexts:
erxVts.setDescription('The vendor type ID for an ERX Virtual Tunnelling Server (VTS) line module (Product Code: ERX-IPSEC-MOD).')
erx_ct3_p12 = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 7, 18))
if mibBuilder.loadTexts:
erxCt3P12.setStatus('current')
if mibBuilder.loadTexts:
erxCt3P12.setDescription('The vendor type ID for an ERX 12 port channelized T3 line module (Product Code: CT3-12-F0).')
erx_v35 = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 7, 19))
if mibBuilder.loadTexts:
erxV35.setStatus('current')
if mibBuilder.loadTexts:
erxV35.setDescription('The vendor type ID for an ERX X.21/V.35 server line module (Product Code: ERX-X21-V35-MOD).')
erx_ut3_e3_ocx = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 7, 20))
if mibBuilder.loadTexts:
erxUt3E3Ocx.setStatus('current')
if mibBuilder.loadTexts:
erxUt3E3Ocx.setDescription('The vendor type ID for an ERX OC12, quad OC3 or 12 port T3/E3 server line module (Product Code: ERX-UT3E3OCX-MOD).')
erx_line_io_adapter = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8))
if mibBuilder.loadTexts:
erxLineIoAdapter.setStatus('current')
if mibBuilder.loadTexts:
erxLineIoAdapter.setDescription('The vendor type ID for an ERX I/O adapter for a line module.')
erx_ct1_ioa = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 1))
if mibBuilder.loadTexts:
erxCt1Ioa.setStatus('current')
if mibBuilder.loadTexts:
erxCt1Ioa.setDescription('The vendor type ID for an ERX 24 port channelized T1/J1 I/O adapter (Product Code: CT1-FULL-I/O).')
erx_ce1_ioa = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 2))
if mibBuilder.loadTexts:
erxCe1Ioa.setStatus('current')
if mibBuilder.loadTexts:
erxCe1Ioa.setDescription('The vendor type ID for an ERX 20 port channelized E1 I/O adapter (Product Code: CE1-FULL-I/O).')
erx_ce1_t_ioa = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 3))
if mibBuilder.loadTexts:
erxCe1TIoa.setStatus('current')
if mibBuilder.loadTexts:
erxCe1TIoa.setDescription('The vendor type ID for an ERX 20 port channelized E1 Telco I/O adapter (Product Code: CE1-FULL-I/OT).')
erx_ct3_ioa = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 4))
if mibBuilder.loadTexts:
erxCt3Ioa.setStatus('current')
if mibBuilder.loadTexts:
erxCt3Ioa.setDescription('The vendor type ID for an ERX 3 port channelized T3/E3 I/O adapter (Product Code: CT3/T3-3_I/O).')
erx_e3_ioa = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 5))
if mibBuilder.loadTexts:
erxE3Ioa.setStatus('current')
if mibBuilder.loadTexts:
erxE3Ioa.setDescription('The vendor type ID for an ERX 3 port E3 I/O adapter (Product Code: E3-3_I/O).')
erx_oc3_mm2_ioa = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 6))
if mibBuilder.loadTexts:
erxOc3Mm2Ioa.setStatus('current')
if mibBuilder.loadTexts:
erxOc3Mm2Ioa.setDescription('The vendor type ID for an ERX dual port OC3/STM1 multi-mode I/O adapter (Product Code: OC3-2M_I/O).')
erx_oc3_sm2_ioa = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 7))
if mibBuilder.loadTexts:
erxOc3Sm2Ioa.setStatus('current')
if mibBuilder.loadTexts:
erxOc3Sm2Ioa.setDescription('The vendor type ID for an ERX dual port OC3/STM1 single-mode I/O adapter (Product Code: OC3-2S_I/O).')
erx_oc3_mm4_ioa = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 8))
if mibBuilder.loadTexts:
erxOc3Mm4Ioa.setStatus('current')
if mibBuilder.loadTexts:
erxOc3Mm4Ioa.setDescription('The vendor type ID for an ERX 4 port OC3/STM1 multi-mode I/O adapter (Product Code: OC3-4MM_I/O).')
erx_oc3_sm_ir4_ioa = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 9))
if mibBuilder.loadTexts:
erxOc3SmIr4Ioa.setStatus('current')
if mibBuilder.loadTexts:
erxOc3SmIr4Ioa.setDescription('The vendor type ID for an ERX 4 port OC3/STM single-mode intermediate- reach I/O adapter (Product Code: OC3-4SM_I/O).')
erx_oc3_sm_lr4_ioa = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 10))
if mibBuilder.loadTexts:
erxOc3SmLr4Ioa.setStatus('current')
if mibBuilder.loadTexts:
erxOc3SmLr4Ioa.setDescription('The vendor type ID for an ERX 4 port OC3/STM1 single-mode long-reach I/O adapter (Product Code: OC3-4LH-I/O).')
erx_c_oc3_mm4_ioa = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 11))
if mibBuilder.loadTexts:
erxCOc3Mm4Ioa.setStatus('current')
if mibBuilder.loadTexts:
erxCOc3Mm4Ioa.setDescription('The vendor type ID for an ERX 4 port channelized OC3/STM multi-mode I/O adapter (Product Code: COC3F0-MM-I/O).')
erx_c_oc3_sm_ir4_ioa = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 12))
if mibBuilder.loadTexts:
erxCOc3SmIr4Ioa.setStatus('current')
if mibBuilder.loadTexts:
erxCOc3SmIr4Ioa.setDescription('The vendor type ID for an ERX 4 port channelized OC3/STM1 single-mode intermediate-reach I/O adapter (Product Code: COC3F0-SM-I/O).')
erx_c_oc3_sm_lr4_ioa = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 13))
if mibBuilder.loadTexts:
erxCOc3SmLr4Ioa.setStatus('current')
if mibBuilder.loadTexts:
erxCOc3SmLr4Ioa.setDescription('The vendor type ID for an ERX 4 port channelized OC3/STM1 single-mode long-reach I/O adapter (Product Code: ERX-COC3-4LH-IOA).')
erx_oc12_mm1_ioa = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 14))
if mibBuilder.loadTexts:
erxOc12Mm1Ioa.setStatus('current')
if mibBuilder.loadTexts:
erxOc12Mm1Ioa.setDescription('The vendor type ID for an ERX single port OC12/STM4 multi-mode I/O adapter (Product Code: OC12-MM_I/O).')
erx_oc12_sm_ir1_ioa = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 15))
if mibBuilder.loadTexts:
erxOc12SmIr1Ioa.setStatus('current')
if mibBuilder.loadTexts:
erxOc12SmIr1Ioa.setDescription('The vendor type ID for an ERX single port OC12/STM4 single-mode intermediate-reach I/O adapter (Product Code: OC12-SM_I/O).')
erx_oc12_sm_lr1_ioa = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 16))
if mibBuilder.loadTexts:
erxOc12SmLr1Ioa.setStatus('current')
if mibBuilder.loadTexts:
erxOc12SmLr1Ioa.setDescription('The vendor type ID for an ERX single port OC12/STM4 single-mode long-reach I/O adapter (Product Code: OC12-LH-I/O).')
erx_c_oc12_mm1_ioa = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 17))
if mibBuilder.loadTexts:
erxCOc12Mm1Ioa.setStatus('current')
if mibBuilder.loadTexts:
erxCOc12Mm1Ioa.setDescription('The vendor type ID for an ERX single port channelized OC12/STM4 multi-mode I/O adapter (Product Code: COC12F0-MM-I/O).')
erx_c_oc12_sm_ir1_ioa = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 18))
if mibBuilder.loadTexts:
erxCOc12SmIr1Ioa.setStatus('current')
if mibBuilder.loadTexts:
erxCOc12SmIr1Ioa.setDescription('The vendor type ID for an ERX single port channelized OC12/STM4 single-mode intermediate-reach I/O adapter (Product Code: COC12F0-SM-I/O).')
erx_c_oc12_sm_lr1_ioa = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 19))
if mibBuilder.loadTexts:
erxCOc12SmLr1Ioa.setStatus('current')
if mibBuilder.loadTexts:
erxCOc12SmLr1Ioa.setDescription('The vendor type ID for an ERX single port channelized OC12/STM4 single-mode long-reach I/O adapter (Product Code: ERX-COC12-LH-IOA).')
erx_fe2_ioa = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 20))
if mibBuilder.loadTexts:
erxFe2Ioa.setStatus('current')
if mibBuilder.loadTexts:
erxFe2Ioa.setDescription('The vendor type ID for an ERX dual port 10/100 Fast Ethernet I/O adapter (Product Code: 10/100_FE-2_I/O).')
erx_fe8_ioa = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 21))
if mibBuilder.loadTexts:
erxFe8Ioa.setStatus('current')
if mibBuilder.loadTexts:
erxFe8Ioa.setDescription('The vendor type ID for an ERX 8 port 10/100 Fast Ethernet I/O adapter (Product Code: FE-8_I/O).')
erx_ge_mm1_ioa = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 22))
if mibBuilder.loadTexts:
erxGeMm1Ioa.setStatus('current')
if mibBuilder.loadTexts:
erxGeMm1Ioa.setDescription('The vendor type ID for an ERX single port Gigabit Ethernet multi-mode I/O adapter (Product Code: GE_M_I/O).')
erx_ge_sm1_ioa = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 23))
if mibBuilder.loadTexts:
erxGeSm1Ioa.setStatus('current')
if mibBuilder.loadTexts:
erxGeSm1Ioa.setDescription('The vendor type ID for an ERX single port Gigabit Ethernet single-mode I/O adapter (Product Code: GE_S_I/O).')
erx_hssi_ioa = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 24))
if mibBuilder.loadTexts:
erxHssiIoa.setStatus('current')
if mibBuilder.loadTexts:
erxHssiIoa.setDescription('The vendor type ID for an ERX 3 port High Speed Serial Interface (HSSI) I/O adapter (Product Code: HSSI-3-I/O).')
erx_ct3_p12_ioa = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 25))
if mibBuilder.loadTexts:
erxCt3P12Ioa.setStatus('current')
if mibBuilder.loadTexts:
erxCt3P12Ioa.setDescription('The vendor type ID for an ERX 12 port channelized T3 I/O adapter (Product Code: T312-F0-F3-I/O).')
erx_v35_ioa = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 26))
if mibBuilder.loadTexts:
erxV35Ioa.setStatus('current')
if mibBuilder.loadTexts:
erxV35Ioa.setDescription('The vendor type ID for an ERX X.21/V.35 I/O adapter (Product Code: ERX-X21-V35-IOA).')
erx_ge_sfp_ioa = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 27))
if mibBuilder.loadTexts:
erxGeSfpIoa.setStatus('current')
if mibBuilder.loadTexts:
erxGeSfpIoa.setDescription('The vendor type ID for an ERX single port Gigabit Ethernet SFP I/O adapter (Product Code: ERX-GIGESFP-IOA).')
erx_e3_p12_ioa = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 28))
if mibBuilder.loadTexts:
erxE3P12Ioa.setStatus('current')
if mibBuilder.loadTexts:
erxE3P12Ioa.setDescription('The vendor type ID for an ERX 12-port E3 I/O adapter (Product Code: E3-12-F3-I/O).')
erx_c_oc12_mm2_ioa = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 30))
if mibBuilder.loadTexts:
erxCOc12Mm2Ioa.setStatus('current')
if mibBuilder.loadTexts:
erxCOc12Mm2Ioa.setDescription('The vendor type ID for an ERX dual port OC12/STM4 channelized multi-mode I/O adapter (Product Code: ERX-COC12-MA-IOA).')
erx_c_oc12_sm_ir2_ioa = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 31))
if mibBuilder.loadTexts:
erxCOc12SmIr2Ioa.setStatus('current')
if mibBuilder.loadTexts:
erxCOc12SmIr2Ioa.setDescription('The vendor type ID for an ERX dual port OC12/STM4 channelized single-mode intermediate-reach I/O adapter (Product Code: ERX-COC12-SA-IOA).')
erx_c_oc12_sm_lr2_ioa = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 32))
if mibBuilder.loadTexts:
erxCOc12SmLr2Ioa.setStatus('current')
if mibBuilder.loadTexts:
erxCOc12SmLr2Ioa.setDescription('The vendor type ID for an ERX dual port OC12/STM4 channelized single-mode long-reach I/O adapter (Product Code: ERX-COC12-LA-IOA).')
erx_oc12_mm2_aps_ioa = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 33))
if mibBuilder.loadTexts:
erxOc12Mm2ApsIoa.setStatus('current')
if mibBuilder.loadTexts:
erxOc12Mm2ApsIoa.setDescription('The vendor type ID for an ERX dual port OC12/STM4 multi-mode with APS I/O adapter (Product Code: ERX-OC12MM-A-IOA).')
erx_oc12_sm_ir2_aps_ioa = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 34))
if mibBuilder.loadTexts:
erxOc12SmIr2ApsIoa.setStatus('current')
if mibBuilder.loadTexts:
erxOc12SmIr2ApsIoa.setDescription('The vendor type ID for an ERX dual port OC12/STM4 single-mode intermediate-reach with APS I/O adapter (Product Code: ERX-OC12SM-A-IOA).')
erx_oc12_sm_lr2_aps_ioa = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 35))
if mibBuilder.loadTexts:
erxOc12SmLr2ApsIoa.setStatus('current')
if mibBuilder.loadTexts:
erxOc12SmLr2ApsIoa.setDescription('The vendor type ID for an ERX dual port OC12/STM4 single-mode long-reach with APS I/O adapter (Product Code: ERX-OC12LH-A-IOA).')
erx_t1_e1_r_mid_spare_ioa = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 42))
if mibBuilder.loadTexts:
erxT1E1RMidSpareIoa.setStatus('current')
if mibBuilder.loadTexts:
erxT1E1RMidSpareIoa.setDescription('The vendor type ID for an ERX T1/E1 redundant midplane spare I/O adapter (Product Code: PNL-RDMD-T1/E1).')
erx_t3_e3_r_mid_spare_ioa = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 43))
if mibBuilder.loadTexts:
erxT3E3RMidSpareIoa.setStatus('current')
if mibBuilder.loadTexts:
erxT3E3RMidSpareIoa.setDescription('The vendor type ID for an ERX T3/E3 redundant midplane spare I/O adapter (Product Code: PNL-RDMD-T3/E3).')
erx_ct3_r_mid_spare_ioa = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 44))
if mibBuilder.loadTexts:
erxCt3RMidSpareIoa.setStatus('current')
if mibBuilder.loadTexts:
erxCt3RMidSpareIoa.setDescription('The vendor type ID for an ERX 12 port channelized T3 redundant midplane spare I/O adapter (Product Code: ERX-12PT3E3-PNL).')
erx_ocx_r_mid_spare_ioa = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 45))
if mibBuilder.loadTexts:
erxOcxRMidSpareIoa.setStatus('current')
if mibBuilder.loadTexts:
erxOcxRMidSpareIoa.setDescription('The vendor type ID for an ERX OC3/OC12 redundant midplane spare I/O adapter (Product Code: PNL-RDMD-OCX).')
erx_c_ocx_r_mid_spare_ioa = object_identity((1, 3, 6, 1, 4, 1, 4874, 4, 2, 2, 1, 8, 46))
if mibBuilder.loadTexts:
erxCOcxRMidSpareIoa.setStatus('current')
if mibBuilder.loadTexts:
erxCOcxRMidSpareIoa.setDescription('The vendor type ID for an ERX OC3/OC12 channelized redundant midplane spare I/O adapter (Product Code: ERX-COCXPNL-IOA).')
mibBuilder.exportSymbols('Unisphere-Data-ERX-Registry', erxE3Frame=erxE3Frame, erxGeFe=erxGeFe, erxCOc12SmLr1Ioa=erxCOc12SmLr1Ioa, erxTunnelService=erxTunnelService, erxSrp10=erxSrp10, erx1400Midplane=erx1400Midplane, erxE3P12Ioa=erxE3P12Ioa, erx700Midplane=erx700Midplane, erxLineModule=erxLineModule, erxGeSm1Ioa=erxGeSm1Ioa, erxOc3Mm4Ioa=erxOc3Mm4Ioa, erxSrp5Plus=erxSrp5Plus, erxCOcx=erxCOcx, erxE3Ioa=erxE3Ioa, erxOcxRMidSpareIoa=erxOcxRMidSpareIoa, erxFe2=erxFe2, erxCt3RMidSpareIoa=erxCt3RMidSpareIoa, erxLineIoAdapter=erxLineIoAdapter, erxV35Ioa=erxV35Ioa, erxCOc3SmLr4Ioa=erxCOc3SmLr4Ioa, erxOc3Mm2Ioa=erxOc3Mm2Ioa, usdErxRegistry=usdErxRegistry, erxT3Frame=erxT3Frame, erxT3E3RMidSpareIoa=erxT3E3RMidSpareIoa, erx1400Chassis=erx1400Chassis, erxV35=erxV35, erxCe1TIoa=erxCe1TIoa, erxSrp40=erxSrp40, erx3Plus1RedundantT3E3Midplane=erx3Plus1RedundantT3E3Midplane, erxSrp40Plus=erxSrp40Plus, erx700FanAssembly=erx700FanAssembly, erxOc12SmLr2ApsIoa=erxOc12SmLr2ApsIoa, erxChassis=erxChassis, erxOc3Oc12Pos=erxOc3Oc12Pos, erxSrp5=erxSrp5, erxCe1=erxCe1, erxHssiIoa=erxHssiIoa, erx1Plus1RedundantOcMidplane=erx1Plus1RedundantOcMidplane, erx700Chassis=erx700Chassis, erxUt3E3Ocx=erxUt3E3Ocx, erx2Plus1RedundantOcMidplane=erx2Plus1RedundantOcMidplane, erx5Plus1RedundantT1E1Midplane=erx5Plus1RedundantT1E1Midplane, erxE3Atm=erxE3Atm, erxGeSfpIoa=erxGeSfpIoa, erxCOc12SmLr2Ioa=erxCOc12SmLr2Ioa, erxCOc12SmIr1Ioa=erxCOc12SmIr1Ioa, erxSrp10Ecc=erxSrp10Ecc, erx4Plus1RedundantT1E1Midplane=erx4Plus1RedundantT1E1Midplane, erxOc12SmLr1Ioa=erxOc12SmLr1Ioa, erxT1E1RMidSpareIoa=erxT1E1RMidSpareIoa, erxFe2Ioa=erxFe2Ioa, erxCe1Ioa=erxCe1Ioa, erxCt3=erxCt3, erx4Plus1RedundantT3E3Midplane=erx4Plus1RedundantT3E3Midplane, erxMidplane=erxMidplane, erxOc12SmIr2ApsIoa=erxOc12SmIr2ApsIoa, erxCOcxRMidSpareIoa=erxCOcxRMidSpareIoa, erxOc3SmIr4Ioa=erxOc3SmIr4Ioa, erx2Plus1RedundantT3E3Midplane=erx2Plus1RedundantT3E3Midplane, erxOc12SmIr1Ioa=erxOc12SmIr1Ioa, erxCOc12SmIr2Ioa=erxCOc12SmIr2Ioa, erxOc12Mm2ApsIoa=erxOc12Mm2ApsIoa, erxOc3SmLr4Ioa=erxOc3SmLr4Ioa, erx1400FanAssembly=erx1400FanAssembly, erxT3Atm=erxT3Atm, erxPowerInput=erxPowerInput, erxCt1=erxCt1, erxSrpIoAdapter=erxSrpIoAdapter, erx5Plus1RedundantT3E3Midplane=erx5Plus1RedundantT3E3Midplane, erx5Plus1RedundantOcMidplane=erx5Plus1RedundantOcMidplane, erxOc12Mm1Ioa=erxOc12Mm1Ioa, PYSNMP_MODULE_ID=usdErxRegistry, erxFe8Ioa=erxFe8Ioa, usdErxEntPhysicalType=usdErxEntPhysicalType, erxFanAssembly=erxFanAssembly, erxCt3Ioa=erxCt3Ioa, erx3Plus1RedundantT1E1Midplane=erx3Plus1RedundantT1E1Midplane, erx3Plus1RedundantOcMidplane=erx3Plus1RedundantOcMidplane, erxSrpModule=erxSrpModule, erxOc3Oc12Atm=erxOc3Oc12Atm, erxCt1Ioa=erxCt1Ioa, erx2Plus1RedundantT1E1Midplane=erx2Plus1RedundantT1E1Midplane, erxOc3=erxOc3, erxHssi=erxHssi, erxCt3P12Ioa=erxCt3P12Ioa, erxCOc3SmIr4Ioa=erxCOc3SmIr4Ioa, erx1Plus1RedundantT1E1Midplane=erx1Plus1RedundantT1E1Midplane, erxVts=erxVts, erx1Plus1RedundantT3E3Midplane=erx1Plus1RedundantT3E3Midplane, erx4Plus1RedundantOcMidplane=erx4Plus1RedundantOcMidplane, erxCOc12Mm2Ioa=erxCOc12Mm2Ioa, erxCOc12Mm1Ioa=erxCOc12Mm1Ioa, erxCt3P12=erxCt3P12, erxCOc3Mm4Ioa=erxCOc3Mm4Ioa, erxGeMm1Ioa=erxGeMm1Ioa, erxOc3Sm2Ioa=erxOc3Sm2Ioa) |
# parsetab.py
# This file is automatically generated. Do not edit.
_tabversion = '3.2'
_lr_method = 'LALR'
_lr_signature = '\x11\x13C\xf3\x8a\xda\x0f\xf9op-\xf5B\xe1`\xb1'
_lr_action_items = {'BOX':([0,8,9,12,14,15,16,23,24,25,28,29,30,31,32,35,37,40,48,54,56,59,63,64,70,74,75,80,84,87,91,92,95,99,101,104,111,112,113,114,],[1,-14,-3,-7,1,-8,-10,-11,-39,-40,-38,-5,-37,-35,-36,-4,-13,-16,-12,-15,-9,-34,-32,-30,-33,-31,-29,-18,-6,-20,-21,-22,-17,-19,-23,-24,-28,-26,-27,-25,]),'SCALE':([0,8,9,12,14,15,16,23,24,25,28,29,30,31,32,35,37,40,48,54,56,59,63,64,70,74,75,80,84,87,91,92,95,99,101,104,111,112,113,114,],[2,-14,-3,-7,2,-8,-10,-11,-39,-40,-38,-5,-37,-35,-36,-4,-13,-16,-12,-15,-9,-34,-32,-30,-33,-31,-29,-18,-6,-20,-21,-22,-17,-19,-23,-24,-28,-26,-27,-25,]),'BASENAME':([0,8,9,12,14,15,16,23,24,25,28,29,30,31,32,35,37,40,48,54,56,59,63,64,70,74,75,80,84,87,91,92,95,99,101,104,111,112,113,114,],[3,-14,-3,-7,3,-8,-10,-11,-39,-40,-38,-5,-37,-35,-36,-4,-13,-16,-12,-15,-9,-34,-32,-30,-33,-31,-29,-18,-6,-20,-21,-22,-17,-19,-23,-24,-28,-26,-27,-25,]),'MOVE':([0,8,9,12,14,15,16,23,24,25,28,29,30,31,32,35,37,40,48,54,56,59,63,64,70,74,75,80,84,87,91,92,95,99,101,104,111,112,113,114,],[4,-14,-3,-7,4,-8,-10,-11,-39,-40,-38,-5,-37,-35,-36,-4,-13,-16,-12,-15,-9,-34,-32,-30,-33,-31,-29,-18,-6,-20,-21,-22,-17,-19,-23,-24,-28,-26,-27,-25,]),'VARY':([0,8,9,12,14,15,16,23,24,25,28,29,30,31,32,35,37,40,48,54,56,59,63,64,70,74,75,80,84,87,91,92,95,99,101,104,111,112,113,114,],[5,-14,-3,-7,5,-8,-10,-11,-39,-40,-38,-5,-37,-35,-36,-4,-13,-16,-12,-15,-9,-34,-32,-30,-33,-31,-29,-18,-6,-20,-21,-22,-17,-19,-23,-24,-28,-26,-27,-25,]),'FRAMES':([0,8,9,12,14,15,16,23,24,25,28,29,30,31,32,35,37,40,48,54,56,59,63,64,70,74,75,80,84,87,91,92,95,99,101,104,111,112,113,114,],[6,-14,-3,-7,6,-8,-10,-11,-39,-40,-38,-5,-37,-35,-36,-4,-13,-16,-12,-15,-9,-34,-32,-30,-33,-31,-29,-18,-6,-20,-21,-22,-17,-19,-23,-24,-28,-26,-27,-25,]),'LINE':([0,8,9,12,14,15,16,23,24,25,28,29,30,31,32,35,37,40,48,54,56,59,63,64,70,74,75,80,84,87,91,92,95,99,101,104,111,112,113,114,],[7,-14,-3,-7,7,-8,-10,-11,-39,-40,-38,-5,-37,-35,-36,-4,-13,-16,-12,-15,-9,-34,-32,-30,-33,-31,-29,-18,-6,-20,-21,-22,-17,-19,-23,-24,-28,-26,-27,-25,]),'DISPLAY':([0,8,9,12,14,15,16,23,24,25,28,29,30,31,32,35,37,40,48,54,56,59,63,64,70,74,75,80,84,87,91,92,95,99,101,104,111,112,113,114,],[8,-14,-3,-7,8,-8,-10,-11,-39,-40,-38,-5,-37,-35,-36,-4,-13,-16,-12,-15,-9,-34,-32,-30,-33,-31,-29,-18,-6,-20,-21,-22,-17,-19,-23,-24,-28,-26,-27,-25,]),'COMMENT':([0,8,9,12,14,15,16,23,24,25,28,29,30,31,32,35,37,40,48,54,56,59,63,64,70,74,75,80,84,87,91,92,95,99,101,104,111,112,113,114,],[9,-14,-3,-7,9,-8,-10,-11,-39,-40,-38,-5,-37,-35,-36,-4,-13,-16,-12,-15,-9,-34,-32,-30,-33,-31,-29,-18,-6,-20,-21,-22,-17,-19,-23,-24,-28,-26,-27,-25,]),'SET':([0,8,9,12,14,15,16,23,24,25,28,29,30,31,32,35,37,40,48,54,56,59,63,64,70,74,75,80,84,87,91,92,95,99,101,104,111,112,113,114,],[10,-14,-3,-7,10,-8,-10,-11,-39,-40,-38,-5,-37,-35,-36,-4,-13,-16,-12,-15,-9,-34,-32,-30,-33,-31,-29,-18,-6,-20,-21,-22,-17,-19,-23,-24,-28,-26,-27,-25,]),'HERMITE':([0,8,9,12,14,15,16,23,24,25,28,29,30,31,32,35,37,40,48,54,56,59,63,64,70,74,75,80,84,87,91,92,95,99,101,104,111,112,113,114,],[11,-14,-3,-7,11,-8,-10,-11,-39,-40,-38,-5,-37,-35,-36,-4,-13,-16,-12,-15,-9,-34,-32,-30,-33,-31,-29,-18,-6,-20,-21,-22,-17,-19,-23,-24,-28,-26,-27,-25,]),'POP':([0,8,9,12,14,15,16,23,24,25,28,29,30,31,32,35,37,40,48,54,56,59,63,64,70,74,75,80,84,87,91,92,95,99,101,104,111,112,113,114,],[12,-14,-3,-7,12,-8,-10,-11,-39,-40,-38,-5,-37,-35,-36,-4,-13,-16,-12,-15,-9,-34,-32,-30,-33,-31,-29,-18,-6,-20,-21,-22,-17,-19,-23,-24,-28,-26,-27,-25,]),'PUSH':([0,8,9,12,14,15,16,23,24,25,28,29,30,31,32,35,37,40,48,54,56,59,63,64,70,74,75,80,84,87,91,92,95,99,101,104,111,112,113,114,],[15,-14,-3,-7,15,-8,-10,-11,-39,-40,-38,-5,-37,-35,-36,-4,-13,-16,-12,-15,-9,-34,-32,-30,-33,-31,-29,-18,-6,-20,-21,-22,-17,-19,-23,-24,-28,-26,-27,-25,]),'SCREEN':([0,8,9,12,14,15,16,23,24,25,28,29,30,31,32,35,37,40,48,54,56,59,63,64,70,74,75,80,84,87,91,92,95,99,101,104,111,112,113,114,],[16,-14,-3,-7,16,-8,-10,-11,-39,-40,-38,-5,-37,-35,-36,-4,-13,-16,-12,-15,-9,-34,-32,-30,-33,-31,-29,-18,-6,-20,-21,-22,-17,-19,-23,-24,-28,-26,-27,-25,]),'$end':([0,8,9,12,14,15,16,21,23,24,25,28,29,30,31,32,35,37,40,41,48,54,56,59,63,64,70,74,75,80,84,87,91,92,95,99,101,104,111,112,113,114,],[-1,-14,-3,-7,-1,-8,-10,0,-11,-39,-40,-38,-5,-37,-35,-36,-4,-13,-16,-2,-12,-15,-9,-34,-32,-30,-33,-31,-29,-18,-6,-20,-21,-22,-17,-19,-23,-24,-28,-26,-27,-25,]),'STRING':([3,8,23,],[28,28,28,]),'TORUS':([0,8,9,12,14,15,16,23,24,25,28,29,30,31,32,35,37,40,48,54,56,59,63,64,70,74,75,80,84,87,91,92,95,99,101,104,111,112,113,114,],[17,-14,-3,-7,17,-8,-10,-11,-39,-40,-38,-5,-37,-35,-36,-4,-13,-16,-12,-15,-9,-34,-32,-30,-33,-31,-29,-18,-6,-20,-21,-22,-17,-19,-23,-24,-28,-26,-27,-25,]),'SPHERE':([0,8,9,12,14,15,16,23,24,25,28,29,30,31,32,35,37,40,48,54,56,59,63,64,70,74,75,80,84,87,91,92,95,99,101,104,111,112,113,114,],[18,-14,-3,-7,18,-8,-10,-11,-39,-40,-38,-5,-37,-35,-36,-4,-13,-16,-12,-15,-9,-34,-32,-30,-33,-31,-29,-18,-6,-20,-21,-22,-17,-19,-23,-24,-28,-26,-27,-25,]),'ID':([3,5,8,10,23,24,25,59,63,64,],[32,32,32,32,32,-39,-40,32,32,32,]),'ROTATE':([0,8,9,12,14,15,16,23,24,25,28,29,30,31,32,35,37,40,48,54,56,59,63,64,70,74,75,80,84,87,91,92,95,99,101,104,111,112,113,114,],[19,-14,-3,-7,19,-8,-10,-11,-39,-40,-38,-5,-37,-35,-36,-4,-13,-16,-12,-15,-9,-34,-32,-30,-33,-31,-29,-18,-6,-20,-21,-22,-17,-19,-23,-24,-28,-26,-27,-25,]),'INT':([1,2,4,6,7,11,13,16,17,18,20,22,24,25,26,27,31,32,33,34,36,38,39,42,43,44,45,46,47,49,50,51,52,53,55,57,58,60,61,62,65,66,67,68,69,71,72,73,76,77,78,79,80,81,82,83,85,86,87,88,89,90,93,94,96,97,98,100,101,102,103,105,106,107,108,109,110,111,112,],[25,25,25,35,25,25,25,42,25,25,25,25,-39,-40,25,25,-35,-36,25,52,25,25,25,56,25,25,25,25,25,25,25,25,65,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,88,25,25,25,25,25,94,95,25,25,25,99,25,25,25,25,104,25,25,25,25,25,25,25,25,113,114,]),'DOUBLE':([1,2,4,7,11,13,17,18,20,22,24,25,26,27,31,32,33,36,38,39,43,44,45,46,47,49,50,51,53,55,57,58,60,61,62,65,66,67,68,69,71,72,73,76,77,78,79,81,82,83,85,86,89,90,93,96,97,98,100,102,103,105,106,107,108,109,110,],[24,24,24,24,24,24,24,24,24,24,-39,-40,24,24,-35,-36,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,]),'XYZ':([3,5,8,10,19,23,24,25,59,63,64,],[31,31,31,31,45,31,-39,-40,31,31,31,]),'BEZIER':([0,8,9,12,14,15,16,23,24,25,28,29,30,31,32,35,37,40,48,54,56,59,63,64,70,74,75,80,84,87,91,92,95,99,101,104,111,112,113,114,],[20,-14,-3,-7,20,-8,-10,-11,-39,-40,-38,-5,-37,-35,-36,-4,-13,-16,-12,-15,-9,-34,-32,-30,-33,-31,-29,-18,-6,-20,-21,-22,-17,-19,-23,-24,-28,-26,-27,-25,]),'SET_KNOBS':([0,8,9,12,14,15,16,23,24,25,28,29,30,31,32,35,37,40,48,54,56,59,63,64,70,74,75,80,84,87,91,92,95,99,101,104,111,112,113,114,],[13,-14,-3,-7,13,-8,-10,-11,-39,-40,-38,-5,-37,-35,-36,-4,-13,-16,-12,-15,-9,-34,-32,-30,-33,-31,-29,-18,-6,-20,-21,-22,-17,-19,-23,-24,-28,-26,-27,-25,]),'CIRCLE':([0,8,9,12,14,15,16,23,24,25,28,29,30,31,32,35,37,40,48,54,56,59,63,64,70,74,75,80,84,87,91,92,95,99,101,104,111,112,113,114,],[22,-14,-3,-7,22,-8,-10,-11,-39,-40,-38,-5,-37,-35,-36,-4,-13,-16,-12,-15,-9,-34,-32,-30,-33,-31,-29,-18,-6,-20,-21,-22,-17,-19,-23,-24,-28,-26,-27,-25,]),'SAVE':([0,8,9,12,14,15,16,23,24,25,28,29,30,31,32,35,37,40,48,54,56,59,63,64,70,74,75,80,84,87,91,92,95,99,101,104,111,112,113,114,],[23,-14,-3,-7,23,-8,-10,-11,-39,-40,-38,-5,-37,-35,-36,-4,-13,-16,-12,-15,-9,-34,-32,-30,-33,-31,-29,-18,-6,-20,-21,-22,-17,-19,-23,-24,-28,-26,-27,-25,]),}
_lr_action = { }
for _k, _v in _lr_action_items.items():
for _x,_y in zip(_v[0],_v[1]):
if not _x in _lr_action: _lr_action[_x] = { }
_lr_action[_x][_k] = _y
del _lr_action_items
_lr_goto_items = {'TEXT':([3,8,23,],[29,37,48,]),'SYMBOL':([3,5,8,10,23,59,63,64,],[30,34,30,38,30,70,74,75,]),'stuff':([0,14,],[21,41,]),'NUMBER':([1,2,4,7,11,13,17,18,20,22,26,27,33,36,38,39,43,44,45,46,47,49,50,51,53,55,57,58,60,61,62,65,66,67,68,69,71,72,73,76,77,78,79,81,82,83,85,86,89,90,93,96,97,98,100,102,103,105,106,107,108,109,110,],[26,27,33,36,39,40,43,44,46,47,49,50,51,53,54,55,57,58,59,60,61,62,63,64,66,67,68,69,71,72,73,76,77,78,79,80,81,82,83,84,85,86,87,89,90,91,92,93,96,97,98,100,101,102,103,105,106,107,108,109,110,111,112,]),'statement':([0,14,],[14,14,]),}
_lr_goto = { }
for _k, _v in _lr_goto_items.items():
for _x,_y in zip(_v[0],_v[1]):
if not _x in _lr_goto: _lr_goto[_x] = { }
_lr_goto[_x][_k] = _y
del _lr_goto_items
_lr_productions = [
("S' -> stuff","S'",1,None,None,None),
('stuff -> <empty>','stuff',0,'p_stuff','/home/aidan/graphics16/mdl.py',131),
('stuff -> statement stuff','stuff',2,'p_stuff','/home/aidan/graphics16/mdl.py',132),
('statement -> COMMENT','statement',1,'p_statement_comment','/home/aidan/graphics16/mdl.py',136),
('statement -> FRAMES INT','statement',2,'p_statement_frames','/home/aidan/graphics16/mdl.py',140),
('statement -> BASENAME TEXT','statement',2,'p_statement_basename','/home/aidan/graphics16/mdl.py',144),
('statement -> VARY SYMBOL INT INT NUMBER NUMBER','statement',6,'p_statement_vary','/home/aidan/graphics16/mdl.py',148),
('statement -> POP','statement',1,'p_statement_stack','/home/aidan/graphics16/mdl.py',153),
('statement -> PUSH','statement',1,'p_statement_stack','/home/aidan/graphics16/mdl.py',154),
('statement -> SCREEN INT INT','statement',3,'p_statement_screen','/home/aidan/graphics16/mdl.py',158),
('statement -> SCREEN','statement',1,'p_statement_screen','/home/aidan/graphics16/mdl.py',159),
('statement -> SAVE','statement',1,'p_statement_save','/home/aidan/graphics16/mdl.py',166),
('statement -> SAVE TEXT','statement',2,'p_statement_save','/home/aidan/graphics16/mdl.py',167),
('statement -> DISPLAY TEXT','statement',2,'p_statement_show','/home/aidan/graphics16/mdl.py',174),
('statement -> DISPLAY','statement',1,'p_statement_show','/home/aidan/graphics16/mdl.py',175),
('statement -> SET SYMBOL NUMBER','statement',3,'p_statement_knobs','/home/aidan/graphics16/mdl.py',179),
('statement -> SET_KNOBS NUMBER','statement',2,'p_statement_knobs','/home/aidan/graphics16/mdl.py',180),
('statement -> SPHERE NUMBER NUMBER NUMBER NUMBER INT INT','statement',7,'p_statement_sphere','/home/aidan/graphics16/mdl.py',186),
('statement -> SPHERE NUMBER NUMBER NUMBER NUMBER','statement',5,'p_statement_sphere','/home/aidan/graphics16/mdl.py',187),
('statement -> TORUS NUMBER NUMBER NUMBER NUMBER NUMBER INT INT','statement',8,'p_statement_torus','/home/aidan/graphics16/mdl.py',194),
('statement -> TORUS NUMBER NUMBER NUMBER NUMBER NUMBER','statement',6,'p_statement_torus','/home/aidan/graphics16/mdl.py',195),
('statement -> BOX NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER','statement',7,'p_statement_box','/home/aidan/graphics16/mdl.py',202),
('statement -> LINE NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER','statement',7,'p_statement_line','/home/aidan/graphics16/mdl.py',206),
('statement -> CIRCLE NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER','statement',8,'p_statement_circle','/home/aidan/graphics16/mdl.py',210),
('statement -> CIRCLE NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER INT','statement',9,'p_statement_circle','/home/aidan/graphics16/mdl.py',211),
('statement -> BEZIER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER INT','statement',14,'p_statement_curve','/home/aidan/graphics16/mdl.py',221),
('statement -> BEZIER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER','statement',13,'p_statement_curve','/home/aidan/graphics16/mdl.py',222),
('statement -> HERMITE NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER INT','statement',14,'p_statement_curve','/home/aidan/graphics16/mdl.py',223),
('statement -> HERMITE NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER','statement',13,'p_statement_curve','/home/aidan/graphics16/mdl.py',224),
('statement -> MOVE NUMBER NUMBER NUMBER SYMBOL','statement',5,'p_statement_move','/home/aidan/graphics16/mdl.py',231),
('statement -> MOVE NUMBER NUMBER NUMBER','statement',4,'p_statement_move','/home/aidan/graphics16/mdl.py',232),
('statement -> SCALE NUMBER NUMBER NUMBER SYMBOL','statement',5,'p_statement_scale','/home/aidan/graphics16/mdl.py',240),
('statement -> SCALE NUMBER NUMBER NUMBER','statement',4,'p_statement_scale','/home/aidan/graphics16/mdl.py',241),
('statement -> ROTATE XYZ NUMBER SYMBOL','statement',4,'p_statement_rotate','/home/aidan/graphics16/mdl.py',249),
('statement -> ROTATE XYZ NUMBER','statement',3,'p_statement_rotate','/home/aidan/graphics16/mdl.py',250),
('SYMBOL -> XYZ','SYMBOL',1,'p_SYMBOL','/home/aidan/graphics16/mdl.py',258),
('SYMBOL -> ID','SYMBOL',1,'p_SYMBOL','/home/aidan/graphics16/mdl.py',259),
('TEXT -> SYMBOL','TEXT',1,'p_TEXT','/home/aidan/graphics16/mdl.py',263),
('TEXT -> STRING','TEXT',1,'p_TEXT','/home/aidan/graphics16/mdl.py',264),
('NUMBER -> DOUBLE','NUMBER',1,'p_NUMBER','/home/aidan/graphics16/mdl.py',268),
('NUMBER -> INT','NUMBER',1,'p_NUMBER','/home/aidan/graphics16/mdl.py',269),
]
| _tabversion = '3.2'
_lr_method = 'LALR'
_lr_signature = '\x11\x13Có\x8aÚ\x0fùop-õBá`±'
_lr_action_items = {'BOX': ([0, 8, 9, 12, 14, 15, 16, 23, 24, 25, 28, 29, 30, 31, 32, 35, 37, 40, 48, 54, 56, 59, 63, 64, 70, 74, 75, 80, 84, 87, 91, 92, 95, 99, 101, 104, 111, 112, 113, 114], [1, -14, -3, -7, 1, -8, -10, -11, -39, -40, -38, -5, -37, -35, -36, -4, -13, -16, -12, -15, -9, -34, -32, -30, -33, -31, -29, -18, -6, -20, -21, -22, -17, -19, -23, -24, -28, -26, -27, -25]), 'SCALE': ([0, 8, 9, 12, 14, 15, 16, 23, 24, 25, 28, 29, 30, 31, 32, 35, 37, 40, 48, 54, 56, 59, 63, 64, 70, 74, 75, 80, 84, 87, 91, 92, 95, 99, 101, 104, 111, 112, 113, 114], [2, -14, -3, -7, 2, -8, -10, -11, -39, -40, -38, -5, -37, -35, -36, -4, -13, -16, -12, -15, -9, -34, -32, -30, -33, -31, -29, -18, -6, -20, -21, -22, -17, -19, -23, -24, -28, -26, -27, -25]), 'BASENAME': ([0, 8, 9, 12, 14, 15, 16, 23, 24, 25, 28, 29, 30, 31, 32, 35, 37, 40, 48, 54, 56, 59, 63, 64, 70, 74, 75, 80, 84, 87, 91, 92, 95, 99, 101, 104, 111, 112, 113, 114], [3, -14, -3, -7, 3, -8, -10, -11, -39, -40, -38, -5, -37, -35, -36, -4, -13, -16, -12, -15, -9, -34, -32, -30, -33, -31, -29, -18, -6, -20, -21, -22, -17, -19, -23, -24, -28, -26, -27, -25]), 'MOVE': ([0, 8, 9, 12, 14, 15, 16, 23, 24, 25, 28, 29, 30, 31, 32, 35, 37, 40, 48, 54, 56, 59, 63, 64, 70, 74, 75, 80, 84, 87, 91, 92, 95, 99, 101, 104, 111, 112, 113, 114], [4, -14, -3, -7, 4, -8, -10, -11, -39, -40, -38, -5, -37, -35, -36, -4, -13, -16, -12, -15, -9, -34, -32, -30, -33, -31, -29, -18, -6, -20, -21, -22, -17, -19, -23, -24, -28, -26, -27, -25]), 'VARY': ([0, 8, 9, 12, 14, 15, 16, 23, 24, 25, 28, 29, 30, 31, 32, 35, 37, 40, 48, 54, 56, 59, 63, 64, 70, 74, 75, 80, 84, 87, 91, 92, 95, 99, 101, 104, 111, 112, 113, 114], [5, -14, -3, -7, 5, -8, -10, -11, -39, -40, -38, -5, -37, -35, -36, -4, -13, -16, -12, -15, -9, -34, -32, -30, -33, -31, -29, -18, -6, -20, -21, -22, -17, -19, -23, -24, -28, -26, -27, -25]), 'FRAMES': ([0, 8, 9, 12, 14, 15, 16, 23, 24, 25, 28, 29, 30, 31, 32, 35, 37, 40, 48, 54, 56, 59, 63, 64, 70, 74, 75, 80, 84, 87, 91, 92, 95, 99, 101, 104, 111, 112, 113, 114], [6, -14, -3, -7, 6, -8, -10, -11, -39, -40, -38, -5, -37, -35, -36, -4, -13, -16, -12, -15, -9, -34, -32, -30, -33, -31, -29, -18, -6, -20, -21, -22, -17, -19, -23, -24, -28, -26, -27, -25]), 'LINE': ([0, 8, 9, 12, 14, 15, 16, 23, 24, 25, 28, 29, 30, 31, 32, 35, 37, 40, 48, 54, 56, 59, 63, 64, 70, 74, 75, 80, 84, 87, 91, 92, 95, 99, 101, 104, 111, 112, 113, 114], [7, -14, -3, -7, 7, -8, -10, -11, -39, -40, -38, -5, -37, -35, -36, -4, -13, -16, -12, -15, -9, -34, -32, -30, -33, -31, -29, -18, -6, -20, -21, -22, -17, -19, -23, -24, -28, -26, -27, -25]), 'DISPLAY': ([0, 8, 9, 12, 14, 15, 16, 23, 24, 25, 28, 29, 30, 31, 32, 35, 37, 40, 48, 54, 56, 59, 63, 64, 70, 74, 75, 80, 84, 87, 91, 92, 95, 99, 101, 104, 111, 112, 113, 114], [8, -14, -3, -7, 8, -8, -10, -11, -39, -40, -38, -5, -37, -35, -36, -4, -13, -16, -12, -15, -9, -34, -32, -30, -33, -31, -29, -18, -6, -20, -21, -22, -17, -19, -23, -24, -28, -26, -27, -25]), 'COMMENT': ([0, 8, 9, 12, 14, 15, 16, 23, 24, 25, 28, 29, 30, 31, 32, 35, 37, 40, 48, 54, 56, 59, 63, 64, 70, 74, 75, 80, 84, 87, 91, 92, 95, 99, 101, 104, 111, 112, 113, 114], [9, -14, -3, -7, 9, -8, -10, -11, -39, -40, -38, -5, -37, -35, -36, -4, -13, -16, -12, -15, -9, -34, -32, -30, -33, -31, -29, -18, -6, -20, -21, -22, -17, -19, -23, -24, -28, -26, -27, -25]), 'SET': ([0, 8, 9, 12, 14, 15, 16, 23, 24, 25, 28, 29, 30, 31, 32, 35, 37, 40, 48, 54, 56, 59, 63, 64, 70, 74, 75, 80, 84, 87, 91, 92, 95, 99, 101, 104, 111, 112, 113, 114], [10, -14, -3, -7, 10, -8, -10, -11, -39, -40, -38, -5, -37, -35, -36, -4, -13, -16, -12, -15, -9, -34, -32, -30, -33, -31, -29, -18, -6, -20, -21, -22, -17, -19, -23, -24, -28, -26, -27, -25]), 'HERMITE': ([0, 8, 9, 12, 14, 15, 16, 23, 24, 25, 28, 29, 30, 31, 32, 35, 37, 40, 48, 54, 56, 59, 63, 64, 70, 74, 75, 80, 84, 87, 91, 92, 95, 99, 101, 104, 111, 112, 113, 114], [11, -14, -3, -7, 11, -8, -10, -11, -39, -40, -38, -5, -37, -35, -36, -4, -13, -16, -12, -15, -9, -34, -32, -30, -33, -31, -29, -18, -6, -20, -21, -22, -17, -19, -23, -24, -28, -26, -27, -25]), 'POP': ([0, 8, 9, 12, 14, 15, 16, 23, 24, 25, 28, 29, 30, 31, 32, 35, 37, 40, 48, 54, 56, 59, 63, 64, 70, 74, 75, 80, 84, 87, 91, 92, 95, 99, 101, 104, 111, 112, 113, 114], [12, -14, -3, -7, 12, -8, -10, -11, -39, -40, -38, -5, -37, -35, -36, -4, -13, -16, -12, -15, -9, -34, -32, -30, -33, -31, -29, -18, -6, -20, -21, -22, -17, -19, -23, -24, -28, -26, -27, -25]), 'PUSH': ([0, 8, 9, 12, 14, 15, 16, 23, 24, 25, 28, 29, 30, 31, 32, 35, 37, 40, 48, 54, 56, 59, 63, 64, 70, 74, 75, 80, 84, 87, 91, 92, 95, 99, 101, 104, 111, 112, 113, 114], [15, -14, -3, -7, 15, -8, -10, -11, -39, -40, -38, -5, -37, -35, -36, -4, -13, -16, -12, -15, -9, -34, -32, -30, -33, -31, -29, -18, -6, -20, -21, -22, -17, -19, -23, -24, -28, -26, -27, -25]), 'SCREEN': ([0, 8, 9, 12, 14, 15, 16, 23, 24, 25, 28, 29, 30, 31, 32, 35, 37, 40, 48, 54, 56, 59, 63, 64, 70, 74, 75, 80, 84, 87, 91, 92, 95, 99, 101, 104, 111, 112, 113, 114], [16, -14, -3, -7, 16, -8, -10, -11, -39, -40, -38, -5, -37, -35, -36, -4, -13, -16, -12, -15, -9, -34, -32, -30, -33, -31, -29, -18, -6, -20, -21, -22, -17, -19, -23, -24, -28, -26, -27, -25]), '$end': ([0, 8, 9, 12, 14, 15, 16, 21, 23, 24, 25, 28, 29, 30, 31, 32, 35, 37, 40, 41, 48, 54, 56, 59, 63, 64, 70, 74, 75, 80, 84, 87, 91, 92, 95, 99, 101, 104, 111, 112, 113, 114], [-1, -14, -3, -7, -1, -8, -10, 0, -11, -39, -40, -38, -5, -37, -35, -36, -4, -13, -16, -2, -12, -15, -9, -34, -32, -30, -33, -31, -29, -18, -6, -20, -21, -22, -17, -19, -23, -24, -28, -26, -27, -25]), 'STRING': ([3, 8, 23], [28, 28, 28]), 'TORUS': ([0, 8, 9, 12, 14, 15, 16, 23, 24, 25, 28, 29, 30, 31, 32, 35, 37, 40, 48, 54, 56, 59, 63, 64, 70, 74, 75, 80, 84, 87, 91, 92, 95, 99, 101, 104, 111, 112, 113, 114], [17, -14, -3, -7, 17, -8, -10, -11, -39, -40, -38, -5, -37, -35, -36, -4, -13, -16, -12, -15, -9, -34, -32, -30, -33, -31, -29, -18, -6, -20, -21, -22, -17, -19, -23, -24, -28, -26, -27, -25]), 'SPHERE': ([0, 8, 9, 12, 14, 15, 16, 23, 24, 25, 28, 29, 30, 31, 32, 35, 37, 40, 48, 54, 56, 59, 63, 64, 70, 74, 75, 80, 84, 87, 91, 92, 95, 99, 101, 104, 111, 112, 113, 114], [18, -14, -3, -7, 18, -8, -10, -11, -39, -40, -38, -5, -37, -35, -36, -4, -13, -16, -12, -15, -9, -34, -32, -30, -33, -31, -29, -18, -6, -20, -21, -22, -17, -19, -23, -24, -28, -26, -27, -25]), 'ID': ([3, 5, 8, 10, 23, 24, 25, 59, 63, 64], [32, 32, 32, 32, 32, -39, -40, 32, 32, 32]), 'ROTATE': ([0, 8, 9, 12, 14, 15, 16, 23, 24, 25, 28, 29, 30, 31, 32, 35, 37, 40, 48, 54, 56, 59, 63, 64, 70, 74, 75, 80, 84, 87, 91, 92, 95, 99, 101, 104, 111, 112, 113, 114], [19, -14, -3, -7, 19, -8, -10, -11, -39, -40, -38, -5, -37, -35, -36, -4, -13, -16, -12, -15, -9, -34, -32, -30, -33, -31, -29, -18, -6, -20, -21, -22, -17, -19, -23, -24, -28, -26, -27, -25]), 'INT': ([1, 2, 4, 6, 7, 11, 13, 16, 17, 18, 20, 22, 24, 25, 26, 27, 31, 32, 33, 34, 36, 38, 39, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 55, 57, 58, 60, 61, 62, 65, 66, 67, 68, 69, 71, 72, 73, 76, 77, 78, 79, 80, 81, 82, 83, 85, 86, 87, 88, 89, 90, 93, 94, 96, 97, 98, 100, 101, 102, 103, 105, 106, 107, 108, 109, 110, 111, 112], [25, 25, 25, 35, 25, 25, 25, 42, 25, 25, 25, 25, -39, -40, 25, 25, -35, -36, 25, 52, 25, 25, 25, 56, 25, 25, 25, 25, 25, 25, 25, 25, 65, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 88, 25, 25, 25, 25, 25, 94, 95, 25, 25, 25, 99, 25, 25, 25, 25, 104, 25, 25, 25, 25, 25, 25, 25, 25, 113, 114]), 'DOUBLE': ([1, 2, 4, 7, 11, 13, 17, 18, 20, 22, 24, 25, 26, 27, 31, 32, 33, 36, 38, 39, 43, 44, 45, 46, 47, 49, 50, 51, 53, 55, 57, 58, 60, 61, 62, 65, 66, 67, 68, 69, 71, 72, 73, 76, 77, 78, 79, 81, 82, 83, 85, 86, 89, 90, 93, 96, 97, 98, 100, 102, 103, 105, 106, 107, 108, 109, 110], [24, 24, 24, 24, 24, 24, 24, 24, 24, 24, -39, -40, 24, 24, -35, -36, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24]), 'XYZ': ([3, 5, 8, 10, 19, 23, 24, 25, 59, 63, 64], [31, 31, 31, 31, 45, 31, -39, -40, 31, 31, 31]), 'BEZIER': ([0, 8, 9, 12, 14, 15, 16, 23, 24, 25, 28, 29, 30, 31, 32, 35, 37, 40, 48, 54, 56, 59, 63, 64, 70, 74, 75, 80, 84, 87, 91, 92, 95, 99, 101, 104, 111, 112, 113, 114], [20, -14, -3, -7, 20, -8, -10, -11, -39, -40, -38, -5, -37, -35, -36, -4, -13, -16, -12, -15, -9, -34, -32, -30, -33, -31, -29, -18, -6, -20, -21, -22, -17, -19, -23, -24, -28, -26, -27, -25]), 'SET_KNOBS': ([0, 8, 9, 12, 14, 15, 16, 23, 24, 25, 28, 29, 30, 31, 32, 35, 37, 40, 48, 54, 56, 59, 63, 64, 70, 74, 75, 80, 84, 87, 91, 92, 95, 99, 101, 104, 111, 112, 113, 114], [13, -14, -3, -7, 13, -8, -10, -11, -39, -40, -38, -5, -37, -35, -36, -4, -13, -16, -12, -15, -9, -34, -32, -30, -33, -31, -29, -18, -6, -20, -21, -22, -17, -19, -23, -24, -28, -26, -27, -25]), 'CIRCLE': ([0, 8, 9, 12, 14, 15, 16, 23, 24, 25, 28, 29, 30, 31, 32, 35, 37, 40, 48, 54, 56, 59, 63, 64, 70, 74, 75, 80, 84, 87, 91, 92, 95, 99, 101, 104, 111, 112, 113, 114], [22, -14, -3, -7, 22, -8, -10, -11, -39, -40, -38, -5, -37, -35, -36, -4, -13, -16, -12, -15, -9, -34, -32, -30, -33, -31, -29, -18, -6, -20, -21, -22, -17, -19, -23, -24, -28, -26, -27, -25]), 'SAVE': ([0, 8, 9, 12, 14, 15, 16, 23, 24, 25, 28, 29, 30, 31, 32, 35, 37, 40, 48, 54, 56, 59, 63, 64, 70, 74, 75, 80, 84, 87, 91, 92, 95, 99, 101, 104, 111, 112, 113, 114], [23, -14, -3, -7, 23, -8, -10, -11, -39, -40, -38, -5, -37, -35, -36, -4, -13, -16, -12, -15, -9, -34, -32, -30, -33, -31, -29, -18, -6, -20, -21, -22, -17, -19, -23, -24, -28, -26, -27, -25])}
_lr_action = {}
for (_k, _v) in _lr_action_items.items():
for (_x, _y) in zip(_v[0], _v[1]):
if not _x in _lr_action:
_lr_action[_x] = {}
_lr_action[_x][_k] = _y
del _lr_action_items
_lr_goto_items = {'TEXT': ([3, 8, 23], [29, 37, 48]), 'SYMBOL': ([3, 5, 8, 10, 23, 59, 63, 64], [30, 34, 30, 38, 30, 70, 74, 75]), 'stuff': ([0, 14], [21, 41]), 'NUMBER': ([1, 2, 4, 7, 11, 13, 17, 18, 20, 22, 26, 27, 33, 36, 38, 39, 43, 44, 45, 46, 47, 49, 50, 51, 53, 55, 57, 58, 60, 61, 62, 65, 66, 67, 68, 69, 71, 72, 73, 76, 77, 78, 79, 81, 82, 83, 85, 86, 89, 90, 93, 96, 97, 98, 100, 102, 103, 105, 106, 107, 108, 109, 110], [26, 27, 33, 36, 39, 40, 43, 44, 46, 47, 49, 50, 51, 53, 54, 55, 57, 58, 59, 60, 61, 62, 63, 64, 66, 67, 68, 69, 71, 72, 73, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 89, 90, 91, 92, 93, 96, 97, 98, 100, 101, 102, 103, 105, 106, 107, 108, 109, 110, 111, 112]), 'statement': ([0, 14], [14, 14])}
_lr_goto = {}
for (_k, _v) in _lr_goto_items.items():
for (_x, _y) in zip(_v[0], _v[1]):
if not _x in _lr_goto:
_lr_goto[_x] = {}
_lr_goto[_x][_k] = _y
del _lr_goto_items
_lr_productions = [("S' -> stuff", "S'", 1, None, None, None), ('stuff -> <empty>', 'stuff', 0, 'p_stuff', '/home/aidan/graphics16/mdl.py', 131), ('stuff -> statement stuff', 'stuff', 2, 'p_stuff', '/home/aidan/graphics16/mdl.py', 132), ('statement -> COMMENT', 'statement', 1, 'p_statement_comment', '/home/aidan/graphics16/mdl.py', 136), ('statement -> FRAMES INT', 'statement', 2, 'p_statement_frames', '/home/aidan/graphics16/mdl.py', 140), ('statement -> BASENAME TEXT', 'statement', 2, 'p_statement_basename', '/home/aidan/graphics16/mdl.py', 144), ('statement -> VARY SYMBOL INT INT NUMBER NUMBER', 'statement', 6, 'p_statement_vary', '/home/aidan/graphics16/mdl.py', 148), ('statement -> POP', 'statement', 1, 'p_statement_stack', '/home/aidan/graphics16/mdl.py', 153), ('statement -> PUSH', 'statement', 1, 'p_statement_stack', '/home/aidan/graphics16/mdl.py', 154), ('statement -> SCREEN INT INT', 'statement', 3, 'p_statement_screen', '/home/aidan/graphics16/mdl.py', 158), ('statement -> SCREEN', 'statement', 1, 'p_statement_screen', '/home/aidan/graphics16/mdl.py', 159), ('statement -> SAVE', 'statement', 1, 'p_statement_save', '/home/aidan/graphics16/mdl.py', 166), ('statement -> SAVE TEXT', 'statement', 2, 'p_statement_save', '/home/aidan/graphics16/mdl.py', 167), ('statement -> DISPLAY TEXT', 'statement', 2, 'p_statement_show', '/home/aidan/graphics16/mdl.py', 174), ('statement -> DISPLAY', 'statement', 1, 'p_statement_show', '/home/aidan/graphics16/mdl.py', 175), ('statement -> SET SYMBOL NUMBER', 'statement', 3, 'p_statement_knobs', '/home/aidan/graphics16/mdl.py', 179), ('statement -> SET_KNOBS NUMBER', 'statement', 2, 'p_statement_knobs', '/home/aidan/graphics16/mdl.py', 180), ('statement -> SPHERE NUMBER NUMBER NUMBER NUMBER INT INT', 'statement', 7, 'p_statement_sphere', '/home/aidan/graphics16/mdl.py', 186), ('statement -> SPHERE NUMBER NUMBER NUMBER NUMBER', 'statement', 5, 'p_statement_sphere', '/home/aidan/graphics16/mdl.py', 187), ('statement -> TORUS NUMBER NUMBER NUMBER NUMBER NUMBER INT INT', 'statement', 8, 'p_statement_torus', '/home/aidan/graphics16/mdl.py', 194), ('statement -> TORUS NUMBER NUMBER NUMBER NUMBER NUMBER', 'statement', 6, 'p_statement_torus', '/home/aidan/graphics16/mdl.py', 195), ('statement -> BOX NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER', 'statement', 7, 'p_statement_box', '/home/aidan/graphics16/mdl.py', 202), ('statement -> LINE NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER', 'statement', 7, 'p_statement_line', '/home/aidan/graphics16/mdl.py', 206), ('statement -> CIRCLE NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER', 'statement', 8, 'p_statement_circle', '/home/aidan/graphics16/mdl.py', 210), ('statement -> CIRCLE NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER INT', 'statement', 9, 'p_statement_circle', '/home/aidan/graphics16/mdl.py', 211), ('statement -> BEZIER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER INT', 'statement', 14, 'p_statement_curve', '/home/aidan/graphics16/mdl.py', 221), ('statement -> BEZIER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER', 'statement', 13, 'p_statement_curve', '/home/aidan/graphics16/mdl.py', 222), ('statement -> HERMITE NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER INT', 'statement', 14, 'p_statement_curve', '/home/aidan/graphics16/mdl.py', 223), ('statement -> HERMITE NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER', 'statement', 13, 'p_statement_curve', '/home/aidan/graphics16/mdl.py', 224), ('statement -> MOVE NUMBER NUMBER NUMBER SYMBOL', 'statement', 5, 'p_statement_move', '/home/aidan/graphics16/mdl.py', 231), ('statement -> MOVE NUMBER NUMBER NUMBER', 'statement', 4, 'p_statement_move', '/home/aidan/graphics16/mdl.py', 232), ('statement -> SCALE NUMBER NUMBER NUMBER SYMBOL', 'statement', 5, 'p_statement_scale', '/home/aidan/graphics16/mdl.py', 240), ('statement -> SCALE NUMBER NUMBER NUMBER', 'statement', 4, 'p_statement_scale', '/home/aidan/graphics16/mdl.py', 241), ('statement -> ROTATE XYZ NUMBER SYMBOL', 'statement', 4, 'p_statement_rotate', '/home/aidan/graphics16/mdl.py', 249), ('statement -> ROTATE XYZ NUMBER', 'statement', 3, 'p_statement_rotate', '/home/aidan/graphics16/mdl.py', 250), ('SYMBOL -> XYZ', 'SYMBOL', 1, 'p_SYMBOL', '/home/aidan/graphics16/mdl.py', 258), ('SYMBOL -> ID', 'SYMBOL', 1, 'p_SYMBOL', '/home/aidan/graphics16/mdl.py', 259), ('TEXT -> SYMBOL', 'TEXT', 1, 'p_TEXT', '/home/aidan/graphics16/mdl.py', 263), ('TEXT -> STRING', 'TEXT', 1, 'p_TEXT', '/home/aidan/graphics16/mdl.py', 264), ('NUMBER -> DOUBLE', 'NUMBER', 1, 'p_NUMBER', '/home/aidan/graphics16/mdl.py', 268), ('NUMBER -> INT', 'NUMBER', 1, 'p_NUMBER', '/home/aidan/graphics16/mdl.py', 269)] |
#!/usr/bin/env python3
END_MARK = None # any singleton could be used for this
FALLBACK = '0' # text to print when there are no matches
for _ in range(int(input())):
input() # don't need n
# Build the trie.
trie = {}
for word in input().split():
cur = trie
for ch in word:
try:
cur = cur[ch]
except KeyError:
nxt = {}
cur[ch] = nxt
cur = nxt
cur[END_MARK] = word
# Define a generator to enumerate all words under a root.
def dfs(node):
try:
yield node[END_MARK]
except KeyError:
pass
for ch in sorted(key for key in node if key is not END_MARK):
yield from dfs(node[ch])
# Look up the specified word, (re)enumerating all words at each step.
for ch in input().strip():
try:
trie = trie[ch]
except TypeError: # the trie has already been discarded
print(FALLBACK)
except KeyError: # the trie does not contain this prefix
trie = None
print(FALLBACK)
else:
print(' '.join(dfs(trie)))
| end_mark = None
fallback = '0'
for _ in range(int(input())):
input()
trie = {}
for word in input().split():
cur = trie
for ch in word:
try:
cur = cur[ch]
except KeyError:
nxt = {}
cur[ch] = nxt
cur = nxt
cur[END_MARK] = word
def dfs(node):
try:
yield node[END_MARK]
except KeyError:
pass
for ch in sorted((key for key in node if key is not END_MARK)):
yield from dfs(node[ch])
for ch in input().strip():
try:
trie = trie[ch]
except TypeError:
print(FALLBACK)
except KeyError:
trie = None
print(FALLBACK)
else:
print(' '.join(dfs(trie))) |
class Solution:
def lengthOfLongestSubstring(self, s: str) -> int:
temp = []
result = 0
for i in s:
if i not in temp:
temp.append(i)
else:
result = max(result, len(temp))
temp = temp[temp.index(i)+1::]
temp.append(i)
print(temp)
result = max(result, len(temp))
return result
| class Solution:
def length_of_longest_substring(self, s: str) -> int:
temp = []
result = 0
for i in s:
if i not in temp:
temp.append(i)
else:
result = max(result, len(temp))
temp = temp[temp.index(i) + 1:]
temp.append(i)
print(temp)
result = max(result, len(temp))
return result |
followers_likes= {}
followers_comments= {}
while True:
line = input()
if line == 'Log out':
break
args = line.split(': ')
command= args[0]
username = args[1]
if command == 'New follower':
if username not in followers_likes and username not in followers_comments:
followers_comments[username] = 0
followers_likes[username] = 0
elif command == 'Like':
count = int(args[2])
if username not in followers_likes and username not in followers_comments:
followers_comments[username] = 0
followers_likes[username] = 0
followers_likes[username] += count
elif command == 'Comment':
count = 1
if username not in followers_comments and username not in followers_likes:
followers_comments[username] = count
followers_likes[username] = 0
else:
followers_comments[username] += count
elif command == 'Blocked':
if username in followers_comments and username in followers_likes:
followers_comments.pop(username)
followers_likes.pop(username)
else:
print(f"{username} doesn't exist.")
count_followers = len(followers_likes.keys())
print(f'{count_followers} followers')
sorted_followers = dict(sorted(followers_likes.items(), key=lambda x: (-x[1], x[0])))
for k, v in sorted_followers.items():
print(f'{k}: {v + followers_comments[k]}') | followers_likes = {}
followers_comments = {}
while True:
line = input()
if line == 'Log out':
break
args = line.split(': ')
command = args[0]
username = args[1]
if command == 'New follower':
if username not in followers_likes and username not in followers_comments:
followers_comments[username] = 0
followers_likes[username] = 0
elif command == 'Like':
count = int(args[2])
if username not in followers_likes and username not in followers_comments:
followers_comments[username] = 0
followers_likes[username] = 0
followers_likes[username] += count
elif command == 'Comment':
count = 1
if username not in followers_comments and username not in followers_likes:
followers_comments[username] = count
followers_likes[username] = 0
else:
followers_comments[username] += count
elif command == 'Blocked':
if username in followers_comments and username in followers_likes:
followers_comments.pop(username)
followers_likes.pop(username)
else:
print(f"{username} doesn't exist.")
count_followers = len(followers_likes.keys())
print(f'{count_followers} followers')
sorted_followers = dict(sorted(followers_likes.items(), key=lambda x: (-x[1], x[0])))
for (k, v) in sorted_followers.items():
print(f'{k}: {v + followers_comments[k]}') |
# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
DEPS = [
'core',
'recipe_engine/path',
'recipe_engine/properties',
]
def RunSteps(api):
api.core.setup()
def GenTests(api):
buildername = 'Build-Win-Clang-x86_64-Release-Vulkan'
yield (
api.test('test') +
api.properties(buildername=buildername,
repository='https://skia.googlesource.com/skia.git',
revision='abc123',
path_config='kitchen',
swarm_out_dir='[SWARM_OUT_DIR]') +
api.properties(patch_storage='gerrit') +
api.properties.tryserver(
buildername=buildername,
gerrit_project='skia',
gerrit_url='https://skia-review.googlesource.com/',
)
)
buildername = ('Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-' +
'Debug-All-ANGLE')
yield (
api.test('no_persistent_checkout') +
api.properties(buildername=buildername,
repository='https://skia.googlesource.com/skia.git',
revision='abc123',
path_config='kitchen',
swarm_out_dir='[SWARM_OUT_DIR]') +
api.properties(patch_storage='gerrit') +
api.properties.tryserver(
buildername=buildername,
gerrit_project='skia',
gerrit_url='https://skia-review.googlesource.com/',
)
)
buildername = 'Build-Debian9-GCC-x86_64-Release-PDFium'
yield (
api.test('pdfium_trybot') +
api.properties(
repository='https://skia.googlesource.com/skia.git',
buildername=buildername,
path_config='kitchen',
swarm_out_dir='[SWARM_OUT_DIR]',
revision='abc123',
patch_issue=500,
patch_set=1,
patch_storage='gerrit') +
api.properties.tryserver(
buildername=buildername,
gerrit_project='skia',
gerrit_url='https://skia-review.googlesource.com/',
) +
api.path.exists(
api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
)
)
buildername = 'Build-Debian9-GCC-x86_64-Release-Flutter_Android'
yield (
api.test('flutter_trybot') +
api.properties(
repository='https://skia.googlesource.com/skia.git',
buildername=buildername,
path_config='kitchen',
swarm_out_dir='[SWARM_OUT_DIR]',
revision='abc123',
patch_issue=500,
patch_set=1,
patch_storage='gerrit') +
api.properties.tryserver(
buildername=buildername,
gerrit_project='skia',
gerrit_url='https://skia-review.googlesource.com/',
) +
api.path.exists(
api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
)
)
builder = 'Housekeeper-Weekly-RecreateSKPs'
yield (
api.test(builder) +
api.properties(buildername=builder,
repository='https://skia.googlesource.com/skia.git',
revision='abc123',
path_config='kitchen',
swarm_out_dir='[SWARM_OUT_DIR]') +
api.path.exists(api.path['start_dir'].join('skp_output'))
)
buildername = 'Build-Debian9-GCC-x86_64-Release'
yield (
api.test('cross_repo_trybot') +
api.properties(
repository='https://skia.googlesource.com/parent_repo.git',
buildername=buildername,
path_config='kitchen',
swarm_out_dir='[SWARM_OUT_DIR]',
revision='abc123',
patch_issue=500,
patch_repo='https://skia.googlesource.com/skia.git',
patch_set=1,
patch_storage='gerrit') +
api.properties.tryserver(
buildername=buildername,
gerrit_project='skia',
gerrit_url='https://skia-review.googlesource.com/',
) +
api.path.exists(
api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
)
)
| deps = ['core', 'recipe_engine/path', 'recipe_engine/properties']
def run_steps(api):
api.core.setup()
def gen_tests(api):
buildername = 'Build-Win-Clang-x86_64-Release-Vulkan'
yield (api.test('test') + api.properties(buildername=buildername, repository='https://skia.googlesource.com/skia.git', revision='abc123', path_config='kitchen', swarm_out_dir='[SWARM_OUT_DIR]') + api.properties(patch_storage='gerrit') + api.properties.tryserver(buildername=buildername, gerrit_project='skia', gerrit_url='https://skia-review.googlesource.com/'))
buildername = 'Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-' + 'Debug-All-ANGLE'
yield (api.test('no_persistent_checkout') + api.properties(buildername=buildername, repository='https://skia.googlesource.com/skia.git', revision='abc123', path_config='kitchen', swarm_out_dir='[SWARM_OUT_DIR]') + api.properties(patch_storage='gerrit') + api.properties.tryserver(buildername=buildername, gerrit_project='skia', gerrit_url='https://skia-review.googlesource.com/'))
buildername = 'Build-Debian9-GCC-x86_64-Release-PDFium'
yield (api.test('pdfium_trybot') + api.properties(repository='https://skia.googlesource.com/skia.git', buildername=buildername, path_config='kitchen', swarm_out_dir='[SWARM_OUT_DIR]', revision='abc123', patch_issue=500, patch_set=1, patch_storage='gerrit') + api.properties.tryserver(buildername=buildername, gerrit_project='skia', gerrit_url='https://skia-review.googlesource.com/') + api.path.exists(api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')))
buildername = 'Build-Debian9-GCC-x86_64-Release-Flutter_Android'
yield (api.test('flutter_trybot') + api.properties(repository='https://skia.googlesource.com/skia.git', buildername=buildername, path_config='kitchen', swarm_out_dir='[SWARM_OUT_DIR]', revision='abc123', patch_issue=500, patch_set=1, patch_storage='gerrit') + api.properties.tryserver(buildername=buildername, gerrit_project='skia', gerrit_url='https://skia-review.googlesource.com/') + api.path.exists(api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')))
builder = 'Housekeeper-Weekly-RecreateSKPs'
yield (api.test(builder) + api.properties(buildername=builder, repository='https://skia.googlesource.com/skia.git', revision='abc123', path_config='kitchen', swarm_out_dir='[SWARM_OUT_DIR]') + api.path.exists(api.path['start_dir'].join('skp_output')))
buildername = 'Build-Debian9-GCC-x86_64-Release'
yield (api.test('cross_repo_trybot') + api.properties(repository='https://skia.googlesource.com/parent_repo.git', buildername=buildername, path_config='kitchen', swarm_out_dir='[SWARM_OUT_DIR]', revision='abc123', patch_issue=500, patch_repo='https://skia.googlesource.com/skia.git', patch_set=1, patch_storage='gerrit') + api.properties.tryserver(buildername=buildername, gerrit_project='skia', gerrit_url='https://skia-review.googlesource.com/') + api.path.exists(api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt'))) |
a=int(input("Enter a Number"))
if (a%2==0):
print(a,"Entered Number is Divisible by 2")
if(a%5==0):
print(a,"Entered Number is Divisible by 5")
else:
print(a,"Entered Number is Not Divisible by 5")
else:
print(a,"Entered Number is Not Divisible by 2")
| a = int(input('Enter a Number'))
if a % 2 == 0:
print(a, 'Entered Number is Divisible by 2')
if a % 5 == 0:
print(a, 'Entered Number is Divisible by 5')
else:
print(a, 'Entered Number is Not Divisible by 5')
else:
print(a, 'Entered Number is Not Divisible by 2') |
s = map(ord, input())
r = 0
c = 0
a = ord('a')
z = ord('z')
for x in s:
if a <= x <= z:
x -= a
r += min(abs(x - c), 26 - abs(x - c))
c = x
else:
break
print(r)
| s = map(ord, input())
r = 0
c = 0
a = ord('a')
z = ord('z')
for x in s:
if a <= x <= z:
x -= a
r += min(abs(x - c), 26 - abs(x - c))
c = x
else:
break
print(r) |
# generated by scripts/build_keyboard_adjacency_graphs.py
ADJACENCY_GRAPHS = {
"qwerty": {"!": ["`~", None, None, "2@", "qQ", None], "\"": [";:", "[{", "]}", None, None, "/?"], "#": ["2@", None, None, "4$", "eE", "wW"], "$": ["3#", None, None, "5%", "rR", "eE"], "%": ["4$", None, None, "6^", "tT", "rR"], "&": ["6^", None, None, "8*", "uU", "yY"], "'": [";:", "[{", "]}", None, None, "/?"], "(": ["8*", None, None, "0)", "oO", "iI"], ")": ["9(", None, None, "-_", "pP", "oO"], "*": ["7&", None, None, "9(", "iI", "uU"], "+": ["-_", None, None, None, "]}", "[{"], ",": ["mM", "kK", "lL", ".>", None, None], "-": ["0)", None, None, "=+", "[{", "pP"], ".": [",<", "lL", ";:", "/?", None, None], "/": [".>", ";:", "'\"", None, None, None], "0": ["9(", None, None, "-_", "pP", "oO"], "1": ["`~", None, None, "2@", "qQ", None], "2": ["1!", None, None, "3#", "wW", "qQ"], "3": ["2@", None, None, "4$", "eE", "wW"], "4": ["3#", None, None, "5%", "rR", "eE"], "5": ["4$", None, None, "6^", "tT", "rR"], "6": ["5%", None, None, "7&", "yY", "tT"], "7": ["6^", None, None, "8*", "uU", "yY"], "8": ["7&", None, None, "9(", "iI", "uU"], "9": ["8*", None, None, "0)", "oO", "iI"], ":": ["lL", "pP", "[{", "'\"", "/?", ".>"], ";": ["lL", "pP", "[{", "'\"", "/?", ".>"], "<": ["mM", "kK", "lL", ".>", None, None], "=": ["-_", None, None, None, "]}", "[{"], ">": [",<", "lL", ";:", "/?", None, None], "?": [".>", ";:", "'\"", None, None, None], "@": ["1!", None, None, "3#", "wW", "qQ"], "A": [None, "qQ", "wW", "sS", "zZ", None], "B": ["vV", "gG", "hH", "nN", None, None], "C": ["xX", "dD", "fF", "vV", None, None], "D": ["sS", "eE", "rR", "fF", "cC", "xX"], "E": ["wW", "3#", "4$", "rR", "dD", "sS"], "F": ["dD", "rR", "tT", "gG", "vV", "cC"], "G": ["fF", "tT", "yY", "hH", "bB", "vV"], "H": ["gG", "yY", "uU", "jJ", "nN", "bB"], "I": ["uU", "8*", "9(", "oO", "kK", "jJ"], "J": ["hH", "uU", "iI", "kK", "mM", "nN"], "K": ["jJ", "iI", "oO", "lL", ",<", "mM"], "L": ["kK", "oO", "pP", ";:", ".>", ",<"], "M": ["nN", "jJ", "kK", ",<", None, None], "N": ["bB", "hH", "jJ", "mM", None, None], "O": ["iI", "9(", "0)", "pP", "lL", "kK"], "P": ["oO", "0)", "-_", "[{", ";:", "lL"], "Q": [None, "1!", "2@", "wW", "aA", None], "R": ["eE", "4$", "5%", "tT", "fF", "dD"], "S": ["aA", "wW", "eE", "dD", "xX", "zZ"], "T": ["rR", "5%", "6^", "yY", "gG", "fF"], "U": ["yY", "7&", "8*", "iI", "jJ", "hH"], "V": ["cC", "fF", "gG", "bB", None, None], "W": ["qQ", "2@", "3#", "eE", "sS", "aA"], "X": ["zZ", "sS", "dD", "cC", None, None], "Y": ["tT", "6^", "7&", "uU", "hH", "gG"], "Z": [None, "aA", "sS", "xX", None, None], "[": ["pP", "-_", "=+", "]}", "'\"", ";:"], "\\": ["]}", None, None, None, None, None], "]": ["[{", "=+", None, "\\|", None, "'\""], "^": ["5%", None, None, "7&", "yY", "tT"], "_": ["0)", None, None, "=+", "[{", "pP"], "`": [None, None, None, "1!", None, None], "a": [None, "qQ", "wW", "sS", "zZ", None], "b": ["vV", "gG", "hH", "nN", None, None], "c": ["xX", "dD", "fF", "vV", None, None], "d": ["sS", "eE", "rR", "fF", "cC", "xX"], "e": ["wW", "3#", "4$", "rR", "dD", "sS"], "f": ["dD", "rR", "tT", "gG", "vV", "cC"], "g": ["fF", "tT", "yY", "hH", "bB", "vV"], "h": ["gG", "yY", "uU", "jJ", "nN", "bB"], "i": ["uU", "8*", "9(", "oO", "kK", "jJ"], "j": ["hH", "uU", "iI", "kK", "mM", "nN"], "k": ["jJ", "iI", "oO", "lL", ",<", "mM"], "l": ["kK", "oO", "pP", ";:", ".>", ",<"], "m": ["nN", "jJ", "kK", ",<", None, None], "n": ["bB", "hH", "jJ", "mM", None, None], "o": ["iI", "9(", "0)", "pP", "lL", "kK"], "p": ["oO", "0)", "-_", "[{", ";:", "lL"], "q": [None, "1!", "2@", "wW", "aA", None], "r": ["eE", "4$", "5%", "tT", "fF", "dD"], "s": ["aA", "wW", "eE", "dD", "xX", "zZ"], "t": ["rR", "5%", "6^", "yY", "gG", "fF"], "u": ["yY", "7&", "8*", "iI", "jJ", "hH"], "v": ["cC", "fF", "gG", "bB", None, None], "w": ["qQ", "2@", "3#", "eE", "sS", "aA"], "x": ["zZ", "sS", "dD", "cC", None, None], "y": ["tT", "6^", "7&", "uU", "hH", "gG"], "z": [None, "aA", "sS", "xX", None, None], "{": ["pP", "-_", "=+", "]}", "'\"", ";:"], "|": ["]}", None, None, None, None, None], "}": ["[{", "=+", None, "\\|", None, "'\""], "~": [None, None, None, "1!", None, None]},
"dvorak": {"!": ["`~", None, None, "2@", "'\"", None], "\"": [None, "1!", "2@", ",<", "aA", None], "#": ["2@", None, None, "4$", ".>", ",<"], "$": ["3#", None, None, "5%", "pP", ".>"], "%": ["4$", None, None, "6^", "yY", "pP"], "&": ["6^", None, None, "8*", "gG", "fF"], "'": [None, "1!", "2@", ",<", "aA", None], "(": ["8*", None, None, "0)", "rR", "cC"], ")": ["9(", None, None, "[{", "lL", "rR"], "*": ["7&", None, None, "9(", "cC", "gG"], "+": ["/?", "]}", None, "\\|", None, "-_"], ",": ["'\"", "2@", "3#", ".>", "oO", "aA"], "-": ["sS", "/?", "=+", None, None, "zZ"], ".": [",<", "3#", "4$", "pP", "eE", "oO"], "/": ["lL", "[{", "]}", "=+", "-_", "sS"], "0": ["9(", None, None, "[{", "lL", "rR"], "1": ["`~", None, None, "2@", "'\"", None], "2": ["1!", None, None, "3#", ",<", "'\""], "3": ["2@", None, None, "4$", ".>", ",<"], "4": ["3#", None, None, "5%", "pP", ".>"], "5": ["4$", None, None, "6^", "yY", "pP"], "6": ["5%", None, None, "7&", "fF", "yY"], "7": ["6^", None, None, "8*", "gG", "fF"], "8": ["7&", None, None, "9(", "cC", "gG"], "9": ["8*", None, None, "0)", "rR", "cC"], ":": [None, "aA", "oO", "qQ", None, None], ";": [None, "aA", "oO", "qQ", None, None], "<": ["'\"", "2@", "3#", ".>", "oO", "aA"], "=": ["/?", "]}", None, "\\|", None, "-_"], ">": [",<", "3#", "4$", "pP", "eE", "oO"], "?": ["lL", "[{", "]}", "=+", "-_", "sS"], "@": ["1!", None, None, "3#", ",<", "'\""], "A": [None, "'\"", ",<", "oO", ";:", None], "B": ["xX", "dD", "hH", "mM", None, None], "C": ["gG", "8*", "9(", "rR", "tT", "hH"], "D": ["iI", "fF", "gG", "hH", "bB", "xX"], "E": ["oO", ".>", "pP", "uU", "jJ", "qQ"], "F": ["yY", "6^", "7&", "gG", "dD", "iI"], "G": ["fF", "7&", "8*", "cC", "hH", "dD"], "H": ["dD", "gG", "cC", "tT", "mM", "bB"], "I": ["uU", "yY", "fF", "dD", "xX", "kK"], "J": ["qQ", "eE", "uU", "kK", None, None], "K": ["jJ", "uU", "iI", "xX", None, None], "L": ["rR", "0)", "[{", "/?", "sS", "nN"], "M": ["bB", "hH", "tT", "wW", None, None], "N": ["tT", "rR", "lL", "sS", "vV", "wW"], "O": ["aA", ",<", ".>", "eE", "qQ", ";:"], "P": [".>", "4$", "5%", "yY", "uU", "eE"], "Q": [";:", "oO", "eE", "jJ", None, None], "R": ["cC", "9(", "0)", "lL", "nN", "tT"], "S": ["nN", "lL", "/?", "-_", "zZ", "vV"], "T": ["hH", "cC", "rR", "nN", "wW", "mM"], "U": ["eE", "pP", "yY", "iI", "kK", "jJ"], "V": ["wW", "nN", "sS", "zZ", None, None], "W": ["mM", "tT", "nN", "vV", None, None], "X": ["kK", "iI", "dD", "bB", None, None], "Y": ["pP", "5%", "6^", "fF", "iI", "uU"], "Z": ["vV", "sS", "-_", None, None, None], "[": ["0)", None, None, "]}", "/?", "lL"], "\\": ["=+", None, None, None, None, None], "]": ["[{", None, None, None, "=+", "/?"], "^": ["5%", None, None, "7&", "fF", "yY"], "_": ["sS", "/?", "=+", None, None, "zZ"], "`": [None, None, None, "1!", None, None], "a": [None, "'\"", ",<", "oO", ";:", None], "b": ["xX", "dD", "hH", "mM", None, None], "c": ["gG", "8*", "9(", "rR", "tT", "hH"], "d": ["iI", "fF", "gG", "hH", "bB", "xX"], "e": ["oO", ".>", "pP", "uU", "jJ", "qQ"], "f": ["yY", "6^", "7&", "gG", "dD", "iI"], "g": ["fF", "7&", "8*", "cC", "hH", "dD"], "h": ["dD", "gG", "cC", "tT", "mM", "bB"], "i": ["uU", "yY", "fF", "dD", "xX", "kK"], "j": ["qQ", "eE", "uU", "kK", None, None], "k": ["jJ", "uU", "iI", "xX", None, None], "l": ["rR", "0)", "[{", "/?", "sS", "nN"], "m": ["bB", "hH", "tT", "wW", None, None], "n": ["tT", "rR", "lL", "sS", "vV", "wW"], "o": ["aA", ",<", ".>", "eE", "qQ", ";:"], "p": [".>", "4$", "5%", "yY", "uU", "eE"], "q": [";:", "oO", "eE", "jJ", None, None], "r": ["cC", "9(", "0)", "lL", "nN", "tT"], "s": ["nN", "lL", "/?", "-_", "zZ", "vV"], "t": ["hH", "cC", "rR", "nN", "wW", "mM"], "u": ["eE", "pP", "yY", "iI", "kK", "jJ"], "v": ["wW", "nN", "sS", "zZ", None, None], "w": ["mM", "tT", "nN", "vV", None, None], "x": ["kK", "iI", "dD", "bB", None, None], "y": ["pP", "5%", "6^", "fF", "iI", "uU"], "z": ["vV", "sS", "-_", None, None, None], "{": ["0)", None, None, "]}", "/?", "lL"], "|": ["=+", None, None, None, None, None], "}": ["[{", None, None, None, "=+", "/?"], "~": [None, None, None, "1!", None, None]},
"keypad": {"*": ["/", None, None, None, "-", "+", "9", "8"], "+": ["9", "*", "-", None, None, None, None, "6"], "-": ["*", None, None, None, None, None, "+", "9"], ".": ["0", "2", "3", None, None, None, None, None], "/": [None, None, None, None, "*", "9", "8", "7"], "0": [None, "1", "2", "3", ".", None, None, None], "1": [None, None, "4", "5", "2", "0", None, None], "2": ["1", "4", "5", "6", "3", ".", "0", None], "3": ["2", "5", "6", None, None, None, ".", "0"], "4": [None, None, "7", "8", "5", "2", "1", None], "5": ["4", "7", "8", "9", "6", "3", "2", "1"], "6": ["5", "8", "9", "+", None, None, "3", "2"], "7": [None, None, None, "/", "8", "5", "4", None], "8": ["7", None, "/", "*", "9", "6", "5", "4"], "9": ["8", "/", "*", "-", "+", None, "6", "5"]},
"mac_keypad": {"*": ["/", None, None, None, None, None, "-", "9"], "+": ["6", "9", "-", None, None, None, None, "3"], "-": ["9", "/", "*", None, None, None, "+", "6"], ".": ["0", "2", "3", None, None, None, None, None], "/": ["=", None, None, None, "*", "-", "9", "8"], "0": [None, "1", "2", "3", ".", None, None, None], "1": [None, None, "4", "5", "2", "0", None, None], "2": ["1", "4", "5", "6", "3", ".", "0", None], "3": ["2", "5", "6", "+", None, None, ".", "0"], "4": [None, None, "7", "8", "5", "2", "1", None], "5": ["4", "7", "8", "9", "6", "3", "2", "1"], "6": ["5", "8", "9", "-", "+", None, "3", "2"], "7": [None, None, None, "=", "8", "5", "4", None], "8": ["7", None, "=", "/", "9", "6", "5", "4"], "9": ["8", "=", "/", "*", "-", "+", "6", "5"], "=": [None, None, None, None, "/", "9", "8", "7"]}
} | adjacency_graphs = {'qwerty': {'!': ['`~', None, None, '2@', 'qQ', None], '"': [';:', '[{', ']}', None, None, '/?'], '#': ['2@', None, None, '4$', 'eE', 'wW'], '$': ['3#', None, None, '5%', 'rR', 'eE'], '%': ['4$', None, None, '6^', 'tT', 'rR'], '&': ['6^', None, None, '8*', 'uU', 'yY'], "'": [';:', '[{', ']}', None, None, '/?'], '(': ['8*', None, None, '0)', 'oO', 'iI'], ')': ['9(', None, None, '-_', 'pP', 'oO'], '*': ['7&', None, None, '9(', 'iI', 'uU'], '+': ['-_', None, None, None, ']}', '[{'], ',': ['mM', 'kK', 'lL', '.>', None, None], '-': ['0)', None, None, '=+', '[{', 'pP'], '.': [',<', 'lL', ';:', '/?', None, None], '/': ['.>', ';:', '\'"', None, None, None], '0': ['9(', None, None, '-_', 'pP', 'oO'], '1': ['`~', None, None, '2@', 'qQ', None], '2': ['1!', None, None, '3#', 'wW', 'qQ'], '3': ['2@', None, None, '4$', 'eE', 'wW'], '4': ['3#', None, None, '5%', 'rR', 'eE'], '5': ['4$', None, None, '6^', 'tT', 'rR'], '6': ['5%', None, None, '7&', 'yY', 'tT'], '7': ['6^', None, None, '8*', 'uU', 'yY'], '8': ['7&', None, None, '9(', 'iI', 'uU'], '9': ['8*', None, None, '0)', 'oO', 'iI'], ':': ['lL', 'pP', '[{', '\'"', '/?', '.>'], ';': ['lL', 'pP', '[{', '\'"', '/?', '.>'], '<': ['mM', 'kK', 'lL', '.>', None, None], '=': ['-_', None, None, None, ']}', '[{'], '>': [',<', 'lL', ';:', '/?', None, None], '?': ['.>', ';:', '\'"', None, None, None], '@': ['1!', None, None, '3#', 'wW', 'qQ'], 'A': [None, 'qQ', 'wW', 'sS', 'zZ', None], 'B': ['vV', 'gG', 'hH', 'nN', None, None], 'C': ['xX', 'dD', 'fF', 'vV', None, None], 'D': ['sS', 'eE', 'rR', 'fF', 'cC', 'xX'], 'E': ['wW', '3#', '4$', 'rR', 'dD', 'sS'], 'F': ['dD', 'rR', 'tT', 'gG', 'vV', 'cC'], 'G': ['fF', 'tT', 'yY', 'hH', 'bB', 'vV'], 'H': ['gG', 'yY', 'uU', 'jJ', 'nN', 'bB'], 'I': ['uU', '8*', '9(', 'oO', 'kK', 'jJ'], 'J': ['hH', 'uU', 'iI', 'kK', 'mM', 'nN'], 'K': ['jJ', 'iI', 'oO', 'lL', ',<', 'mM'], 'L': ['kK', 'oO', 'pP', ';:', '.>', ',<'], 'M': ['nN', 'jJ', 'kK', ',<', None, None], 'N': ['bB', 'hH', 'jJ', 'mM', None, None], 'O': ['iI', '9(', '0)', 'pP', 'lL', 'kK'], 'P': ['oO', '0)', '-_', '[{', ';:', 'lL'], 'Q': [None, '1!', '2@', 'wW', 'aA', None], 'R': ['eE', '4$', '5%', 'tT', 'fF', 'dD'], 'S': ['aA', 'wW', 'eE', 'dD', 'xX', 'zZ'], 'T': ['rR', '5%', '6^', 'yY', 'gG', 'fF'], 'U': ['yY', '7&', '8*', 'iI', 'jJ', 'hH'], 'V': ['cC', 'fF', 'gG', 'bB', None, None], 'W': ['qQ', '2@', '3#', 'eE', 'sS', 'aA'], 'X': ['zZ', 'sS', 'dD', 'cC', None, None], 'Y': ['tT', '6^', '7&', 'uU', 'hH', 'gG'], 'Z': [None, 'aA', 'sS', 'xX', None, None], '[': ['pP', '-_', '=+', ']}', '\'"', ';:'], '\\': [']}', None, None, None, None, None], ']': ['[{', '=+', None, '\\|', None, '\'"'], '^': ['5%', None, None, '7&', 'yY', 'tT'], '_': ['0)', None, None, '=+', '[{', 'pP'], '`': [None, None, None, '1!', None, None], 'a': [None, 'qQ', 'wW', 'sS', 'zZ', None], 'b': ['vV', 'gG', 'hH', 'nN', None, None], 'c': ['xX', 'dD', 'fF', 'vV', None, None], 'd': ['sS', 'eE', 'rR', 'fF', 'cC', 'xX'], 'e': ['wW', '3#', '4$', 'rR', 'dD', 'sS'], 'f': ['dD', 'rR', 'tT', 'gG', 'vV', 'cC'], 'g': ['fF', 'tT', 'yY', 'hH', 'bB', 'vV'], 'h': ['gG', 'yY', 'uU', 'jJ', 'nN', 'bB'], 'i': ['uU', '8*', '9(', 'oO', 'kK', 'jJ'], 'j': ['hH', 'uU', 'iI', 'kK', 'mM', 'nN'], 'k': ['jJ', 'iI', 'oO', 'lL', ',<', 'mM'], 'l': ['kK', 'oO', 'pP', ';:', '.>', ',<'], 'm': ['nN', 'jJ', 'kK', ',<', None, None], 'n': ['bB', 'hH', 'jJ', 'mM', None, None], 'o': ['iI', '9(', '0)', 'pP', 'lL', 'kK'], 'p': ['oO', '0)', '-_', '[{', ';:', 'lL'], 'q': [None, '1!', '2@', 'wW', 'aA', None], 'r': ['eE', '4$', '5%', 'tT', 'fF', 'dD'], 's': ['aA', 'wW', 'eE', 'dD', 'xX', 'zZ'], 't': ['rR', '5%', '6^', 'yY', 'gG', 'fF'], 'u': ['yY', '7&', '8*', 'iI', 'jJ', 'hH'], 'v': ['cC', 'fF', 'gG', 'bB', None, None], 'w': ['qQ', '2@', '3#', 'eE', 'sS', 'aA'], 'x': ['zZ', 'sS', 'dD', 'cC', None, None], 'y': ['tT', '6^', '7&', 'uU', 'hH', 'gG'], 'z': [None, 'aA', 'sS', 'xX', None, None], '{': ['pP', '-_', '=+', ']}', '\'"', ';:'], '|': [']}', None, None, None, None, None], '}': ['[{', '=+', None, '\\|', None, '\'"'], '~': [None, None, None, '1!', None, None]}, 'dvorak': {'!': ['`~', None, None, '2@', '\'"', None], '"': [None, '1!', '2@', ',<', 'aA', None], '#': ['2@', None, None, '4$', '.>', ',<'], '$': ['3#', None, None, '5%', 'pP', '.>'], '%': ['4$', None, None, '6^', 'yY', 'pP'], '&': ['6^', None, None, '8*', 'gG', 'fF'], "'": [None, '1!', '2@', ',<', 'aA', None], '(': ['8*', None, None, '0)', 'rR', 'cC'], ')': ['9(', None, None, '[{', 'lL', 'rR'], '*': ['7&', None, None, '9(', 'cC', 'gG'], '+': ['/?', ']}', None, '\\|', None, '-_'], ',': ['\'"', '2@', '3#', '.>', 'oO', 'aA'], '-': ['sS', '/?', '=+', None, None, 'zZ'], '.': [',<', '3#', '4$', 'pP', 'eE', 'oO'], '/': ['lL', '[{', ']}', '=+', '-_', 'sS'], '0': ['9(', None, None, '[{', 'lL', 'rR'], '1': ['`~', None, None, '2@', '\'"', None], '2': ['1!', None, None, '3#', ',<', '\'"'], '3': ['2@', None, None, '4$', '.>', ',<'], '4': ['3#', None, None, '5%', 'pP', '.>'], '5': ['4$', None, None, '6^', 'yY', 'pP'], '6': ['5%', None, None, '7&', 'fF', 'yY'], '7': ['6^', None, None, '8*', 'gG', 'fF'], '8': ['7&', None, None, '9(', 'cC', 'gG'], '9': ['8*', None, None, '0)', 'rR', 'cC'], ':': [None, 'aA', 'oO', 'qQ', None, None], ';': [None, 'aA', 'oO', 'qQ', None, None], '<': ['\'"', '2@', '3#', '.>', 'oO', 'aA'], '=': ['/?', ']}', None, '\\|', None, '-_'], '>': [',<', '3#', '4$', 'pP', 'eE', 'oO'], '?': ['lL', '[{', ']}', '=+', '-_', 'sS'], '@': ['1!', None, None, '3#', ',<', '\'"'], 'A': [None, '\'"', ',<', 'oO', ';:', None], 'B': ['xX', 'dD', 'hH', 'mM', None, None], 'C': ['gG', '8*', '9(', 'rR', 'tT', 'hH'], 'D': ['iI', 'fF', 'gG', 'hH', 'bB', 'xX'], 'E': ['oO', '.>', 'pP', 'uU', 'jJ', 'qQ'], 'F': ['yY', '6^', '7&', 'gG', 'dD', 'iI'], 'G': ['fF', '7&', '8*', 'cC', 'hH', 'dD'], 'H': ['dD', 'gG', 'cC', 'tT', 'mM', 'bB'], 'I': ['uU', 'yY', 'fF', 'dD', 'xX', 'kK'], 'J': ['qQ', 'eE', 'uU', 'kK', None, None], 'K': ['jJ', 'uU', 'iI', 'xX', None, None], 'L': ['rR', '0)', '[{', '/?', 'sS', 'nN'], 'M': ['bB', 'hH', 'tT', 'wW', None, None], 'N': ['tT', 'rR', 'lL', 'sS', 'vV', 'wW'], 'O': ['aA', ',<', '.>', 'eE', 'qQ', ';:'], 'P': ['.>', '4$', '5%', 'yY', 'uU', 'eE'], 'Q': [';:', 'oO', 'eE', 'jJ', None, None], 'R': ['cC', '9(', '0)', 'lL', 'nN', 'tT'], 'S': ['nN', 'lL', '/?', '-_', 'zZ', 'vV'], 'T': ['hH', 'cC', 'rR', 'nN', 'wW', 'mM'], 'U': ['eE', 'pP', 'yY', 'iI', 'kK', 'jJ'], 'V': ['wW', 'nN', 'sS', 'zZ', None, None], 'W': ['mM', 'tT', 'nN', 'vV', None, None], 'X': ['kK', 'iI', 'dD', 'bB', None, None], 'Y': ['pP', '5%', '6^', 'fF', 'iI', 'uU'], 'Z': ['vV', 'sS', '-_', None, None, None], '[': ['0)', None, None, ']}', '/?', 'lL'], '\\': ['=+', None, None, None, None, None], ']': ['[{', None, None, None, '=+', '/?'], '^': ['5%', None, None, '7&', 'fF', 'yY'], '_': ['sS', '/?', '=+', None, None, 'zZ'], '`': [None, None, None, '1!', None, None], 'a': [None, '\'"', ',<', 'oO', ';:', None], 'b': ['xX', 'dD', 'hH', 'mM', None, None], 'c': ['gG', '8*', '9(', 'rR', 'tT', 'hH'], 'd': ['iI', 'fF', 'gG', 'hH', 'bB', 'xX'], 'e': ['oO', '.>', 'pP', 'uU', 'jJ', 'qQ'], 'f': ['yY', '6^', '7&', 'gG', 'dD', 'iI'], 'g': ['fF', '7&', '8*', 'cC', 'hH', 'dD'], 'h': ['dD', 'gG', 'cC', 'tT', 'mM', 'bB'], 'i': ['uU', 'yY', 'fF', 'dD', 'xX', 'kK'], 'j': ['qQ', 'eE', 'uU', 'kK', None, None], 'k': ['jJ', 'uU', 'iI', 'xX', None, None], 'l': ['rR', '0)', '[{', '/?', 'sS', 'nN'], 'm': ['bB', 'hH', 'tT', 'wW', None, None], 'n': ['tT', 'rR', 'lL', 'sS', 'vV', 'wW'], 'o': ['aA', ',<', '.>', 'eE', 'qQ', ';:'], 'p': ['.>', '4$', '5%', 'yY', 'uU', 'eE'], 'q': [';:', 'oO', 'eE', 'jJ', None, None], 'r': ['cC', '9(', '0)', 'lL', 'nN', 'tT'], 's': ['nN', 'lL', '/?', '-_', 'zZ', 'vV'], 't': ['hH', 'cC', 'rR', 'nN', 'wW', 'mM'], 'u': ['eE', 'pP', 'yY', 'iI', 'kK', 'jJ'], 'v': ['wW', 'nN', 'sS', 'zZ', None, None], 'w': ['mM', 'tT', 'nN', 'vV', None, None], 'x': ['kK', 'iI', 'dD', 'bB', None, None], 'y': ['pP', '5%', '6^', 'fF', 'iI', 'uU'], 'z': ['vV', 'sS', '-_', None, None, None], '{': ['0)', None, None, ']}', '/?', 'lL'], '|': ['=+', None, None, None, None, None], '}': ['[{', None, None, None, '=+', '/?'], '~': [None, None, None, '1!', None, None]}, 'keypad': {'*': ['/', None, None, None, '-', '+', '9', '8'], '+': ['9', '*', '-', None, None, None, None, '6'], '-': ['*', None, None, None, None, None, '+', '9'], '.': ['0', '2', '3', None, None, None, None, None], '/': [None, None, None, None, '*', '9', '8', '7'], '0': [None, '1', '2', '3', '.', None, None, None], '1': [None, None, '4', '5', '2', '0', None, None], '2': ['1', '4', '5', '6', '3', '.', '0', None], '3': ['2', '5', '6', None, None, None, '.', '0'], '4': [None, None, '7', '8', '5', '2', '1', None], '5': ['4', '7', '8', '9', '6', '3', '2', '1'], '6': ['5', '8', '9', '+', None, None, '3', '2'], '7': [None, None, None, '/', '8', '5', '4', None], '8': ['7', None, '/', '*', '9', '6', '5', '4'], '9': ['8', '/', '*', '-', '+', None, '6', '5']}, 'mac_keypad': {'*': ['/', None, None, None, None, None, '-', '9'], '+': ['6', '9', '-', None, None, None, None, '3'], '-': ['9', '/', '*', None, None, None, '+', '6'], '.': ['0', '2', '3', None, None, None, None, None], '/': ['=', None, None, None, '*', '-', '9', '8'], '0': [None, '1', '2', '3', '.', None, None, None], '1': [None, None, '4', '5', '2', '0', None, None], '2': ['1', '4', '5', '6', '3', '.', '0', None], '3': ['2', '5', '6', '+', None, None, '.', '0'], '4': [None, None, '7', '8', '5', '2', '1', None], '5': ['4', '7', '8', '9', '6', '3', '2', '1'], '6': ['5', '8', '9', '-', '+', None, '3', '2'], '7': [None, None, None, '=', '8', '5', '4', None], '8': ['7', None, '=', '/', '9', '6', '5', '4'], '9': ['8', '=', '/', '*', '-', '+', '6', '5'], '=': [None, None, None, None, '/', '9', '8', '7']}} |
class Solution:
def __init__(self, rects):
self.rects, self.ranges, sm = rects, [], 0
for x1, y1, x2, y2 in rects:
sm += (x2 - x1 + 1) * (y2 - y1 + 1)
self.ranges.append(sm)
def pick(self):
x1, y1, x2, y2 = self.rects[bisect.bisect_left(self.ranges, random.randint(1, self.ranges[-1]))]
return [random.randint(x1, x2), random.randint(y1, y2)] | class Solution:
def __init__(self, rects):
(self.rects, self.ranges, sm) = (rects, [], 0)
for (x1, y1, x2, y2) in rects:
sm += (x2 - x1 + 1) * (y2 - y1 + 1)
self.ranges.append(sm)
def pick(self):
(x1, y1, x2, y2) = self.rects[bisect.bisect_left(self.ranges, random.randint(1, self.ranges[-1]))]
return [random.randint(x1, x2), random.randint(y1, y2)] |
class FoldrNode(object):
def __init__(self, depth, code):
'''
>>> node = FoldrNode(0,'aaa')
>>> node.add(FoldrNode(1,'bbb'))
>>> node.add(FoldrNode(2,'ccc'))
>>> node.depth
0
>>> node.code
'aaa'
>>> node.parent
'''
self.depth = depth
self.code = code
self.parent = None
self.children = []
def add(self, child):
'''
>>> node1 = FoldrNode(0,'aaa')
>>> node2 = FoldrNode(1,'bbb')
>>> node1.add(node2)
>>> node1.children[0] == node2
True
>>> node2.parent == node1
True
'''
child.parent = self
self.children.append(child)
def simplify(head):
'''
>>> head = FoldrNode(0,'aaa')
>>> head.add(FoldrNode(1,'bbb'))
>>> head.add(FoldrNode(2,'ccc'))
>>> simplify(head)
['aaa', [['bbb', []], ['ccc', []]]]
'''
resp = [head.code, []]
for node in head.children:
resp[1].append(simplify(node))
return resp
def from_list(lines, simple=False):
'''
>>> data = [(0,'aaa'),
... (1,'bbb'),
... (2,'ccc'),
... (1,'ddd'),
... (2,'eee'),
... (2,'fff')]
>>> r = from_list(data,simple=True)
>>> r == [['aaa',
... [['bbb',
... [['ccc', []]]],
... ['ddd',
... [['eee', []],
... ['fff', []]]]]]]
True
'''
root = FoldrNode(-4, '')
ptr = root
for depth, code in lines:
line = FoldrNode(depth, code)
if line.depth > ptr.depth:
ptr.add(line)
ptr = ptr.children[-1]
elif line.depth == ptr.depth:
ptr = ptr.parent
ptr.add(line)
ptr = ptr.children[-1]
else:
while line.depth < ptr.depth:
ptr = ptr.parent
ptr = ptr.parent
ptr.add(line)
ptr = ptr.children[-1]
if simple:
return [simplify(c) for c in root.children]
# else:
return [c for c in root.children]
def from_attribute(lines, attr, simple=False):
data = []
for line in lines:
try:
data.append((getattr(line, attr), line))
except AttributeError:
# TODO: anything
pass
return from_list(data, simple)
def from_method(lines, attr, simple=False):
data = []
for line in lines:
try:
data.append((getattr(line, attr)(), line))
except AttributeError:
# TODO: anything
pass
return from_list(data,simple)
def collapse_chars(s):
if s == []:
return s
during = [s.pop(0)]
while s != []:
if isinstance(during[-1], str) and isinstance(s[0], str):
during[-1] += s.pop(0)
else:
during.append(s.pop(0))
return during
# TODO: optimize
def lisp(line, char=None):
if not char:
start, finish = '(', ')'
else:
start, finish = char
line = list(line)
assert line.count(start) == line.count(finish)
while start in line:
last = None
i = 0
while True:
if i >= len(line):
break
if line[i] == start:
last = i
if line[i] == finish:
break
i += 1
if i >= len(line):
break
if last != None:
before = line[:last]
during = collapse_chars(line[last+1:i])
after = line[i+1:]
line = before+[during]+after
return collapse_chars(line)
| class Foldrnode(object):
def __init__(self, depth, code):
"""
>>> node = FoldrNode(0,'aaa')
>>> node.add(FoldrNode(1,'bbb'))
>>> node.add(FoldrNode(2,'ccc'))
>>> node.depth
0
>>> node.code
'aaa'
>>> node.parent
"""
self.depth = depth
self.code = code
self.parent = None
self.children = []
def add(self, child):
"""
>>> node1 = FoldrNode(0,'aaa')
>>> node2 = FoldrNode(1,'bbb')
>>> node1.add(node2)
>>> node1.children[0] == node2
True
>>> node2.parent == node1
True
"""
child.parent = self
self.children.append(child)
def simplify(head):
"""
>>> head = FoldrNode(0,'aaa')
>>> head.add(FoldrNode(1,'bbb'))
>>> head.add(FoldrNode(2,'ccc'))
>>> simplify(head)
['aaa', [['bbb', []], ['ccc', []]]]
"""
resp = [head.code, []]
for node in head.children:
resp[1].append(simplify(node))
return resp
def from_list(lines, simple=False):
"""
>>> data = [(0,'aaa'),
... (1,'bbb'),
... (2,'ccc'),
... (1,'ddd'),
... (2,'eee'),
... (2,'fff')]
>>> r = from_list(data,simple=True)
>>> r == [['aaa',
... [['bbb',
... [['ccc', []]]],
... ['ddd',
... [['eee', []],
... ['fff', []]]]]]]
True
"""
root = foldr_node(-4, '')
ptr = root
for (depth, code) in lines:
line = foldr_node(depth, code)
if line.depth > ptr.depth:
ptr.add(line)
ptr = ptr.children[-1]
elif line.depth == ptr.depth:
ptr = ptr.parent
ptr.add(line)
ptr = ptr.children[-1]
else:
while line.depth < ptr.depth:
ptr = ptr.parent
ptr = ptr.parent
ptr.add(line)
ptr = ptr.children[-1]
if simple:
return [simplify(c) for c in root.children]
return [c for c in root.children]
def from_attribute(lines, attr, simple=False):
data = []
for line in lines:
try:
data.append((getattr(line, attr), line))
except AttributeError:
pass
return from_list(data, simple)
def from_method(lines, attr, simple=False):
data = []
for line in lines:
try:
data.append((getattr(line, attr)(), line))
except AttributeError:
pass
return from_list(data, simple)
def collapse_chars(s):
if s == []:
return s
during = [s.pop(0)]
while s != []:
if isinstance(during[-1], str) and isinstance(s[0], str):
during[-1] += s.pop(0)
else:
during.append(s.pop(0))
return during
def lisp(line, char=None):
if not char:
(start, finish) = ('(', ')')
else:
(start, finish) = char
line = list(line)
assert line.count(start) == line.count(finish)
while start in line:
last = None
i = 0
while True:
if i >= len(line):
break
if line[i] == start:
last = i
if line[i] == finish:
break
i += 1
if i >= len(line):
break
if last != None:
before = line[:last]
during = collapse_chars(line[last + 1:i])
after = line[i + 1:]
line = before + [during] + after
return collapse_chars(line) |
class RebarShapeSegment(object,IDisposable):
"""
Part of a RebarShapeDefinitionBySegments,representing one segment
of a shape definition.
"""
def Dispose(self):
""" Dispose(self: RebarShapeSegment) """
pass
def GetConstraints(self):
"""
GetConstraints(self: RebarShapeSegment) -> IList[RebarShapeConstraint]
Retrieve the list of constraints associated with this segment.
Returns: The list of constraints.
"""
pass
def ReleaseUnmanagedResources(self,*args):
""" ReleaseUnmanagedResources(self: RebarShapeSegment,disposing: bool) """
pass
def SetConstraints(self,constraints):
""" SetConstraints(self: RebarShapeSegment,constraints: IList[RebarShapeConstraint]) """
pass
def __enter__(self,*args):
""" __enter__(self: IDisposable) -> object """
pass
def __exit__(self,*args):
""" __exit__(self: IDisposable,exc_type: object,exc_value: object,exc_back: object) """
pass
def __init__(self,*args):
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
def __repr__(self,*args):
""" __repr__(self: object) -> str """
pass
IsValidObject=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Specifies whether the .NET object represents a valid Revit entity.
Get: IsValidObject(self: RebarShapeSegment) -> bool
"""
| class Rebarshapesegment(object, IDisposable):
"""
Part of a RebarShapeDefinitionBySegments,representing one segment
of a shape definition.
"""
def dispose(self):
""" Dispose(self: RebarShapeSegment) """
pass
def get_constraints(self):
"""
GetConstraints(self: RebarShapeSegment) -> IList[RebarShapeConstraint]
Retrieve the list of constraints associated with this segment.
Returns: The list of constraints.
"""
pass
def release_unmanaged_resources(self, *args):
""" ReleaseUnmanagedResources(self: RebarShapeSegment,disposing: bool) """
pass
def set_constraints(self, constraints):
""" SetConstraints(self: RebarShapeSegment,constraints: IList[RebarShapeConstraint]) """
pass
def __enter__(self, *args):
""" __enter__(self: IDisposable) -> object """
pass
def __exit__(self, *args):
""" __exit__(self: IDisposable,exc_type: object,exc_value: object,exc_back: object) """
pass
def __init__(self, *args):
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
def __repr__(self, *args):
""" __repr__(self: object) -> str """
pass
is_valid_object = property(lambda self: object(), lambda self, v: None, lambda self: None)
'Specifies whether the .NET object represents a valid Revit entity.\n\n\n\nGet: IsValidObject(self: RebarShapeSegment) -> bool\n\n\n\n' |
class UnknownWrapper(object):
"""
Wraps objects the marshaler should marshal as a VT_UNKNOWN.
UnknownWrapper(obj: object)
"""
@staticmethod
def __new__(self,obj):
""" __new__(cls: type,obj: object) """
pass
WrappedObject=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Gets the object contained by this wrapper.
Get: WrappedObject(self: UnknownWrapper) -> object
"""
| class Unknownwrapper(object):
"""
Wraps objects the marshaler should marshal as a VT_UNKNOWN.
UnknownWrapper(obj: object)
"""
@staticmethod
def __new__(self, obj):
""" __new__(cls: type,obj: object) """
pass
wrapped_object = property(lambda self: object(), lambda self, v: None, lambda self: None)
'Gets the object contained by this wrapper.\n\n\n\nGet: WrappedObject(self: UnknownWrapper) -> object\n\n\n\n' |
class Common(object):
def __init__(self):
pass
def start(self, f, title):
f.writelines("[TITLE]\n")
f.writelines(title)
f.writelines("\n")
f.writelines("\n")
def end(self, f):
f.writelines("[END]")
f.writelines("\n")
def export_tags(self, f):
tmp = "./templates/tags_template.inp"
with open(tmp, 'r') as tmp:
for line in tmp:
f.writelines(line)
f.writelines("\n")
def export_options(self, f):
tmp = "./templates/options_template.inp"
with open(tmp, 'r') as tmp:
for line in tmp:
f.writelines(line)
f.writelines("\n")
f.writelines("\n")
| class Common(object):
def __init__(self):
pass
def start(self, f, title):
f.writelines('[TITLE]\n')
f.writelines(title)
f.writelines('\n')
f.writelines('\n')
def end(self, f):
f.writelines('[END]')
f.writelines('\n')
def export_tags(self, f):
tmp = './templates/tags_template.inp'
with open(tmp, 'r') as tmp:
for line in tmp:
f.writelines(line)
f.writelines('\n')
def export_options(self, f):
tmp = './templates/options_template.inp'
with open(tmp, 'r') as tmp:
for line in tmp:
f.writelines(line)
f.writelines('\n')
f.writelines('\n') |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Module with dummy functionality that isn't tested, to show a gap
in the code coverage.
"""
class Baz(object):
"""
A class with many lines that don't get tested
"""
a: int = 123
b: int = 123
c: int = 123
d: int = 123
e: int = 123
f: int = 123
g: int = 123
h: int = 123
i: int = 123
j: int = 123
k: int = 123
m: int = 123
n: int = 123
o: int = 123
p: int = 123
q: int = 123
r: int = 123
| """
Module with dummy functionality that isn't tested, to show a gap
in the code coverage.
"""
class Baz(object):
"""
A class with many lines that don't get tested
"""
a: int = 123
b: int = 123
c: int = 123
d: int = 123
e: int = 123
f: int = 123
g: int = 123
h: int = 123
i: int = 123
j: int = 123
k: int = 123
m: int = 123
n: int = 123
o: int = 123
p: int = 123
q: int = 123
r: int = 123 |
# -*- coding: utf-8 -*-
source = """
AUDUSD NEW SIGNAL
2018.03.22 10:05:36AUDUSD #33557610BUY Above: 0.7754StopLoss: 0.7726TakeProfit: 0.7810
"""
result = """AUDUSD NEW SIGNAL
2018.03.22 10:05:36
AUDUSD #33557610
BUY Above: 0.7754
StopLoss: 0.7726
TakeProfit: 0.7810"""
source1 = """
EURGBP NEW PENDING ORDER
2018.03.22 14:00:04EURGBP #33559469SELL Below: 0.8691StopLoss: 0.8742TakeProfit: 0.8589
"""
result1 = """EURGBP NEW PENDING ORDER
2018.03.22 14:00:04
EURGBP #33559469
SELL Below: 0.8691
StopLoss: 0.8742
TakeProfit: 0.8589"""
source2 = """
EURGBP CLOSED % LOT AND BREAKEVEN
2018.03.22 14:00:14 EURGBP #33559469SELL Trade: 0.8691Close Price: 0.8672Profit of 190 p
"""
result2 = """EURGBP CLOSED % LOT AND BREAKEVEN
2018.03.22 14:00:14
EURGBP #33559469
SELL Trade: 0.8691
Close Price: 0.8672
Profit of 190 p"""
source3 = """
XAUUSD CLOSED % LOT AND BREAKEVEN
2018.03.22 14:30:06 XAUUSD #33559505BUY Trade: 1329.90Close Price: 1331.50Profit of 160 p
"""
result3 = """XAUUSD CLOSED % LOT AND BREAKEVEN
2018.03.22 14:30:06
XAUUSD #33559505
BUY Trade: 1329.90
Close Price: 1331.50
Profit of 160 p"""
source4 = """
XAUUSD CLOSED 50% LOT AND BREAKEVEN
2018.03.26 01:00:57 XAUUSD #33566961BUY Trade: 1343.30Close Price: 1347.60Profit of 430 p
"""
result4 = """XAUUSD CLOSED 50% LOT AND BREAKEVEN
2018.03.26 01:00:57
XAUUSD #33566961
BUY Trade: 1343.30
Close Price: 1347.60
Profit of 430 p"""
broken1 = """
AUDUSD NEW SIGNAL
2018.03.22 10:05:36AUDUSD #33557610BUY Above: 0.7754StopLoss: 0.7726Take: 0.7810
"""
broken2 = """
AUDUSD NEW SIGNAL
2018.03.22 10:05:36AUDUSD #33557610BUY Above: 0.7754Stop: 0.7726Take: 0.7810
"""
broken3 = """
EURGBP NEW PENDING ORDER
2018.03.22 14:00:04EURGBP #33559469SELL Below: 0.8691StopLoss: 0.8742Take: 0.8589
"""
broken4 = """
EURGBP NEW PENDING ORDER
2018.03.22 14:00:04EURGBP #33559469SELL Below: 0.8691Stop: 0.8742Take: 0.8589
"""
broken5 = """
EURGBP CLOSED % LOT AND BREAKEVEN
2018.03.22 14:00:14 EURGBP #33559469SELL Trade: 0.8691Close Price: 0.8672Profit 190 p
"""
broken6 = """
EURGBP CLOSED % LOT AND BREAKEVEN
2018.03.22 14:00:14 EURGBP #33559469SELL Trade: 0.8691Close: 0.8672Profit 190 p
"""
broken7 = """
XAUUSD CLOSED % LOT AND BREAKEVEN
2018.03.22 14:30:06 XAUUSD #33559505BUY Trade: 1329.90Close: 1331.50Profit of 160 p
"""
| source = '\nAUDUSD NEW SIGNAL\n\n2018.03.22 10:05:36AUDUSD #33557610BUY Above: 0.7754StopLoss: 0.7726TakeProfit: 0.7810\n'
result = 'AUDUSD NEW SIGNAL\n\n2018.03.22 10:05:36\nAUDUSD #33557610\nBUY Above: 0.7754\nStopLoss: 0.7726\nTakeProfit: 0.7810'
source1 = '\nEURGBP NEW PENDING ORDER \n\n2018.03.22 14:00:04EURGBP #33559469SELL Below: 0.8691StopLoss: 0.8742TakeProfit: 0.8589\n'
result1 = 'EURGBP NEW PENDING ORDER \n\n2018.03.22 14:00:04\nEURGBP #33559469\nSELL Below: 0.8691\nStopLoss: 0.8742\nTakeProfit: 0.8589'
source2 = '\nEURGBP CLOSED % LOT AND BREAKEVEN\n\n2018.03.22 14:00:14 EURGBP #33559469SELL Trade: 0.8691Close Price: 0.8672Profit of 190 p\n'
result2 = 'EURGBP CLOSED % LOT AND BREAKEVEN\n\n2018.03.22 14:00:14\n EURGBP #33559469\nSELL Trade: 0.8691\nClose Price: 0.8672\nProfit of 190 p'
source3 = '\nXAUUSD CLOSED % LOT AND BREAKEVEN\n\n2018.03.22 14:30:06 XAUUSD #33559505BUY Trade: 1329.90Close Price: 1331.50Profit of 160 p\n'
result3 = 'XAUUSD CLOSED % LOT AND BREAKEVEN\n\n2018.03.22 14:30:06\n XAUUSD #33559505\nBUY Trade: 1329.90\nClose Price: 1331.50\nProfit of 160 p'
source4 = '\nXAUUSD CLOSED 50% LOT AND BREAKEVEN\n\n2018.03.26 01:00:57 XAUUSD #33566961BUY Trade: 1343.30Close Price: 1347.60Profit of 430 p\n'
result4 = 'XAUUSD CLOSED 50% LOT AND BREAKEVEN\n\n2018.03.26 01:00:57\n XAUUSD #33566961\nBUY Trade: 1343.30\nClose Price: 1347.60\nProfit of 430 p'
broken1 = '\nAUDUSD NEW SIGNAL\n\n2018.03.22 10:05:36AUDUSD #33557610BUY Above: 0.7754StopLoss: 0.7726Take: 0.7810\n'
broken2 = '\nAUDUSD NEW SIGNAL\n\n2018.03.22 10:05:36AUDUSD #33557610BUY Above: 0.7754Stop: 0.7726Take: 0.7810\n'
broken3 = '\nEURGBP NEW PENDING ORDER \n\n2018.03.22 14:00:04EURGBP #33559469SELL Below: 0.8691StopLoss: 0.8742Take: 0.8589\n'
broken4 = '\nEURGBP NEW PENDING ORDER \n\n2018.03.22 14:00:04EURGBP #33559469SELL Below: 0.8691Stop: 0.8742Take: 0.8589\n'
broken5 = '\nEURGBP CLOSED % LOT AND BREAKEVEN\n\n2018.03.22 14:00:14 EURGBP #33559469SELL Trade: 0.8691Close Price: 0.8672Profit 190 p\n'
broken6 = '\nEURGBP CLOSED % LOT AND BREAKEVEN\n\n2018.03.22 14:00:14 EURGBP #33559469SELL Trade: 0.8691Close: 0.8672Profit 190 p\n'
broken7 = '\nXAUUSD CLOSED % LOT AND BREAKEVEN\n\n2018.03.22 14:30:06 XAUUSD #33559505BUY Trade: 1329.90Close: 1331.50Profit of 160 p\n' |
# Flask settings
DEBUG = False
SQLALCHEMY_DATABASE_URI = "sqlite:///hortiradar.sqlite"
CSRF_ENABLED = True
# Flask-Babel
BABEL_DEFAULT_LOCALE = "nl"
# Flask-Mail settings
MAIL_USERNAME = "noreply@acba.labs.vu.nl"
MAIL_DEFAULT_SENDER = '"Hortiradar" <noreply@acba.labs.vu.nl>'
MAIL_SERVER = "localhost"
MAIL_PORT = 25
# MAIL_USE_SSL = True
# Flask-User settings
USER_APP_NAME = "Hortiradar"
USER_ENABLE_LOGIN_WITHOUT_CONFIRM_EMAIL = True
# Our app is served within the /hortiradar/ subdirectory
USER_CHANGE_PASSWORD_URL = "/hortiradar/user/change-password"
USER_CHANGE_USERNAME_URL = "/hortiradar/user/change-username"
USER_CONFIRM_EMAIL_URL = "/hortiradar/user/confirm-email/<token>"
USER_EMAIL_ACTION_URL = "/hortiradar/user/email/<id>/<action>"
USER_FORGOT_PASSWORD_URL = "/hortiradar/user/forgot-password"
USER_INVITE_URL = "/hortiradar/user/invite"
USER_LOGIN_URL = "/hortiradar/user/login"
USER_LOGOUT_URL = "/hortiradar/user/logout"
USER_MANAGE_EMAILS_URL = "/hortiradar/user/manage-emails"
USER_REGISTER_URL = "/hortiradar/user/register"
USER_RESEND_CONFIRM_EMAIL_URL = "/hortiradar/user/resend-confirm-email"
USER_RESET_PASSWORD_URL = "/hortiradar/user/reset-password/<token>"
# Endpoints are converted to URLs using url_for()
# The empty endpoint ("") will be mapped to the root URL ("/")
USER_AFTER_CHANGE_PASSWORD_ENDPOINT = "horti.home"
USER_AFTER_CHANGE_USERNAME_ENDPOINT = "horti.home"
USER_AFTER_CONFIRM_ENDPOINT = "horti.home"
USER_AFTER_FORGOT_PASSWORD_ENDPOINT = "horti.home"
USER_AFTER_LOGIN_ENDPOINT = "horti.home"
USER_AFTER_LOGOUT_ENDPOINT = "horti.home"
USER_AFTER_REGISTER_ENDPOINT = "horti.home"
USER_AFTER_RESEND_CONFIRM_EMAIL_ENDPOINT = "horti.home"
USER_AFTER_RESET_PASSWORD_ENDPOINT = "horti.home"
USER_INVITE_ENDPOINT = "horti.home"
# Users with an unconfirmed email trying to access a view that has been
# decorated with @confirm_email_required will be redirected to this endpoint
USER_UNCONFIRMED_EMAIL_ENDPOINT = "user.login"
# Unauthenticated users trying to access a view that has been decorated
# with @login_required or @roles_required will be redirected to this endpoint
USER_UNAUTHENTICATED_ENDPOINT = "user.login"
# Unauthorized users trying to access a view that has been decorated
# with @roles_required will be redirected to this endpoint
USER_UNAUTHORIZED_ENDPOINT = "horti.home"
# Flask-SQLAlchemy
SQLALCHEMY_TRACK_MODIFICATIONS = False
# SECRET_KEY and MAIL_PASSWORD in settings-secret.py
| debug = False
sqlalchemy_database_uri = 'sqlite:///hortiradar.sqlite'
csrf_enabled = True
babel_default_locale = 'nl'
mail_username = 'noreply@acba.labs.vu.nl'
mail_default_sender = '"Hortiradar" <noreply@acba.labs.vu.nl>'
mail_server = 'localhost'
mail_port = 25
user_app_name = 'Hortiradar'
user_enable_login_without_confirm_email = True
user_change_password_url = '/hortiradar/user/change-password'
user_change_username_url = '/hortiradar/user/change-username'
user_confirm_email_url = '/hortiradar/user/confirm-email/<token>'
user_email_action_url = '/hortiradar/user/email/<id>/<action>'
user_forgot_password_url = '/hortiradar/user/forgot-password'
user_invite_url = '/hortiradar/user/invite'
user_login_url = '/hortiradar/user/login'
user_logout_url = '/hortiradar/user/logout'
user_manage_emails_url = '/hortiradar/user/manage-emails'
user_register_url = '/hortiradar/user/register'
user_resend_confirm_email_url = '/hortiradar/user/resend-confirm-email'
user_reset_password_url = '/hortiradar/user/reset-password/<token>'
user_after_change_password_endpoint = 'horti.home'
user_after_change_username_endpoint = 'horti.home'
user_after_confirm_endpoint = 'horti.home'
user_after_forgot_password_endpoint = 'horti.home'
user_after_login_endpoint = 'horti.home'
user_after_logout_endpoint = 'horti.home'
user_after_register_endpoint = 'horti.home'
user_after_resend_confirm_email_endpoint = 'horti.home'
user_after_reset_password_endpoint = 'horti.home'
user_invite_endpoint = 'horti.home'
user_unconfirmed_email_endpoint = 'user.login'
user_unauthenticated_endpoint = 'user.login'
user_unauthorized_endpoint = 'horti.home'
sqlalchemy_track_modifications = False |
"""
Module containing errors that can be raised by key stores.
"""
class Error(Exception):
"""
Base class for key store errors.
"""
class UnsupportedOperation(Error):
"""
Raised when an unsupported operation is attempted.
"""
class KeyNotFound(Error):
"""
Raised when no SSH key can be found for a user.
"""
| """
Module containing errors that can be raised by key stores.
"""
class Error(Exception):
"""
Base class for key store errors.
"""
class Unsupportedoperation(Error):
"""
Raised when an unsupported operation is attempted.
"""
class Keynotfound(Error):
"""
Raised when no SSH key can be found for a user.
""" |
def bubble_sort(arr):
for i in range(len(arr)):
for j in range(0, len(arr) - i - 1):
if arr[j] > arr[j+1]:
arr[j], arr[j+1] = arr[j+1], arr[j]
array = [5, 3, 2, 4, 11, 9, 15, 7]
bubble_sort(array)
print(array) | def bubble_sort(arr):
for i in range(len(arr)):
for j in range(0, len(arr) - i - 1):
if arr[j] > arr[j + 1]:
(arr[j], arr[j + 1]) = (arr[j + 1], arr[j])
array = [5, 3, 2, 4, 11, 9, 15, 7]
bubble_sort(array)
print(array) |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# How many rectangles can be formed from a set of points
# jill-jenn vie et christoph durr - 2014-2015
# snip{
def rectangles_from_points(S):
"""How many rectangles can be formed from a set of points
:param S: list of points, as coordinate pairs
:returns: the number of rectangles
:complexity: :math:`O(n^2)`
"""
answ = 0
pairs = {}
for j in range(len(S)):
for i in range(j):
px, py = S[i]
qx, qy = S[j]
center = (px + qx, py + qy)
dist = (px - qx) ** 2 + (py - qy) ** 2
sign = (center, dist)
if sign in pairs:
answ += len(pairs[sign])
pairs[sign].append((i, j))
else:
pairs[sign] = [(i, j)]
return answ
# snip}
| def rectangles_from_points(S):
"""How many rectangles can be formed from a set of points
:param S: list of points, as coordinate pairs
:returns: the number of rectangles
:complexity: :math:`O(n^2)`
"""
answ = 0
pairs = {}
for j in range(len(S)):
for i in range(j):
(px, py) = S[i]
(qx, qy) = S[j]
center = (px + qx, py + qy)
dist = (px - qx) ** 2 + (py - qy) ** 2
sign = (center, dist)
if sign in pairs:
answ += len(pairs[sign])
pairs[sign].append((i, j))
else:
pairs[sign] = [(i, j)]
return answ |
# Epiphany (25512) | Luminous 4th Job
if chr.getJob() == 2711:
sm.flipDialoguePlayerAsSpeaker()
sm.sendNext("(I feel the Light and Dark within me coming together, "
"merging into a new kind of energy!)")
sm.sendSay("(I've reached a new level of balance between the Light and Dark.)")
sm.jobAdvance(2712)
sm.startQuest(parentID)
sm.completeQuest(parentID) | if chr.getJob() == 2711:
sm.flipDialoguePlayerAsSpeaker()
sm.sendNext('(I feel the Light and Dark within me coming together, merging into a new kind of energy!)')
sm.sendSay("(I've reached a new level of balance between the Light and Dark.)")
sm.jobAdvance(2712)
sm.startQuest(parentID)
sm.completeQuest(parentID) |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
class Writter():
"""a class to normalize all output in console"""
verbose = False
def printed(method):
"""decorator to check if the self.verbose is true """
def wrapper(cls, *args):
if cls.verbose:
return method(cls, *args)
return wrapper
@classmethod
@printed
def event(cls, text):
"""print an event"""
print('\r\n- {}'.format(text))
@classmethod
@printed
def sql_log(cls, sql_query, data=None):
"""print an SQL log"""
# if data exists , I replace them into `complete_sql_query`
if data:
for key, value in data.items():
search = ':{}'.format(key)
replace = '`{}`'.format(value)
sql_query = sql_query.replace(search, replace)
print('\t{}'.format(sql_query))
| class Writter:
"""a class to normalize all output in console"""
verbose = False
def printed(method):
"""decorator to check if the self.verbose is true """
def wrapper(cls, *args):
if cls.verbose:
return method(cls, *args)
return wrapper
@classmethod
@printed
def event(cls, text):
"""print an event"""
print('\r\n- {}'.format(text))
@classmethod
@printed
def sql_log(cls, sql_query, data=None):
"""print an SQL log"""
if data:
for (key, value) in data.items():
search = ':{}'.format(key)
replace = '`{}`'.format(value)
sql_query = sql_query.replace(search, replace)
print('\t{}'.format(sql_query)) |
# encoding: utf-8
"""
protocol.py
Created by Thomas Mangin on 2010-01-15.
Copyright (c) 2009-2013 Exa Networks. All rights reserved.
"""
# ===================================================================== Protocol
# http://www.iana.org/assignments/protocol-numbers/
class Protocol (int):
ICMP = 0x01
IGMP = 0x02
TCP = 0x06
EGP = 0x08
UDP = 0x11
RSVP = 0x2E
GRE = 0x2F
ESP = 0x32
AH = 0x33
OSPF = 0x59
IPIP = 0x5E
PIM = 0x67
SCTP = 0x84
def __str__ (self):
if self == Protocol.ICMP: return 'ICMP'
if self == Protocol.IGMP: return 'IGMP'
if self == Protocol.TCP: return 'TCP'
if self == Protocol.EGP: return 'EGP'
if self == Protocol.UDP: return 'UDP'
if self == Protocol.RSVP: return 'RSVP'
if self == Protocol.GRE: return 'GRE'
if self == Protocol.ESP: return 'ESP'
if self == Protocol.AH: return 'AH'
if self == Protocol.OSPF: return 'OSPF'
if self == Protocol.IPIP: return 'IPIP'
if self == Protocol.PIM: return 'PIM'
if self == Protocol.SCTP: return 'SCTP'
return "unknown protocol %d" % int(self)
def pack (self):
return chr(self)
def NamedProtocol (protocol):
name = protocol.upper()
if name == 'ICMP': return Protocol(Protocol.ICMP)
elif name == 'IGMP': return Protocol(Protocol.IGMP)
elif name == 'TCP': return Protocol(Protocol.TCP)
elif name == 'EGP': return Protocol(Protocol.EGP)
elif name == 'UDP': return Protocol(Protocol.UDP)
elif name == 'RSVP': return Protocol(Protocol.RSVP)
elif name == 'GRE': return Protocol(Protocol.GRE)
elif name == 'ESP': return Protocol(Protocol.ESP)
elif name == 'AH': return Protocol(Protocol.AH)
elif name == 'OSPF': return Protocol(Protocol.OSPF)
elif name == 'IPIP': return Protocol(Protocol.IPIP)
elif name == 'PIM': return Protocol(Protocol.PIM)
elif name == 'SCTP': return Protocol(Protocol.SCTP)
else: raise ValueError('unknown protocol %s' % name)
| """
protocol.py
Created by Thomas Mangin on 2010-01-15.
Copyright (c) 2009-2013 Exa Networks. All rights reserved.
"""
class Protocol(int):
icmp = 1
igmp = 2
tcp = 6
egp = 8
udp = 17
rsvp = 46
gre = 47
esp = 50
ah = 51
ospf = 89
ipip = 94
pim = 103
sctp = 132
def __str__(self):
if self == Protocol.ICMP:
return 'ICMP'
if self == Protocol.IGMP:
return 'IGMP'
if self == Protocol.TCP:
return 'TCP'
if self == Protocol.EGP:
return 'EGP'
if self == Protocol.UDP:
return 'UDP'
if self == Protocol.RSVP:
return 'RSVP'
if self == Protocol.GRE:
return 'GRE'
if self == Protocol.ESP:
return 'ESP'
if self == Protocol.AH:
return 'AH'
if self == Protocol.OSPF:
return 'OSPF'
if self == Protocol.IPIP:
return 'IPIP'
if self == Protocol.PIM:
return 'PIM'
if self == Protocol.SCTP:
return 'SCTP'
return 'unknown protocol %d' % int(self)
def pack(self):
return chr(self)
def named_protocol(protocol):
name = protocol.upper()
if name == 'ICMP':
return protocol(Protocol.ICMP)
elif name == 'IGMP':
return protocol(Protocol.IGMP)
elif name == 'TCP':
return protocol(Protocol.TCP)
elif name == 'EGP':
return protocol(Protocol.EGP)
elif name == 'UDP':
return protocol(Protocol.UDP)
elif name == 'RSVP':
return protocol(Protocol.RSVP)
elif name == 'GRE':
return protocol(Protocol.GRE)
elif name == 'ESP':
return protocol(Protocol.ESP)
elif name == 'AH':
return protocol(Protocol.AH)
elif name == 'OSPF':
return protocol(Protocol.OSPF)
elif name == 'IPIP':
return protocol(Protocol.IPIP)
elif name == 'PIM':
return protocol(Protocol.PIM)
elif name == 'SCTP':
return protocol(Protocol.SCTP)
else:
raise value_error('unknown protocol %s' % name) |
'''
Graph as:
- Vertex/node - contains name "key", data "payload"
- Edge - connects 2 vertices, symbolizing relationship
- Weight - cost to traverse vertex
- G = (V,E) (V=vertex, E=edges)
ex.) V = {V0..V5}, E = {(V0, V1, 5), (V1, V2, 2) ...}
- Path - sequence of vertices connected by edges
- Cycle - path that starts/ends at same vertex
'''
class Vertex(object):
def __init__(self, key):
self.key = key
self.neighbors = {}
def add_neighbor(self, neighbor, weight=0):
self.neighbors[neighbor] = weight
def __str__(self):
return '{} neighbors: {}'.format(
self.key,
[x.key for x in self.neighbors]
)
def get_connections(self):
return self.neighbors.keys()
def get_weight(self, neighbor):
return self.neighbors[neighbor]
class Graph(object):
def __init__(self):
self.vertices = {}
def add_vertex(self, vertex):
self.vertices[vertex.key] = vertex
def get_vertex(self, key):
try:
return self.vertices[key]
except KeyError:
return None
def __contains__(self, key):
return key in self.vertices
def add_edge(self, from_key, to_key, weight=0):
if from_key not in self.vertices:
self.add_vertex(Vertex(from_key))
if to_key not in self.vertices:
self.add_vertex(Vertex(to_key))
self.vertices[from_key].add_neighbor(self.vertices[to_key], weight)
def get_vertices(self):
return self.vertices.keys()
def __iter__(self):
return iter(self.vertices.values())
g = Graph()
for i in range(5):
g.add_vertex(Vertex(i))
print(g.vertices)
g.add_edge(0, 1, 5)
g.add_edge(0, 5, 2)
g.add_edge(1, 2, 4)
g.add_edge(2, 3, 9)
g.add_edge(3, 4, 7)
g.add_edge(3, 5, 3)
g.add_edge(4, 0, 1)
g.add_edge(5, 4, 8)
g.add_edge(5, 2, 1)
for v in g:
for w in v.get_connections():
print('{} -> {}'.format(v.key, w.key))
# Same graph, different representation
g2 = {
0: {1:5, 5:2},
1: {2: 4},
2: {3: 9},
3: {4:7, 5:3},
4: {0: 1},
5: {4: 8}
} | """
Graph as:
- Vertex/node - contains name "key", data "payload"
- Edge - connects 2 vertices, symbolizing relationship
- Weight - cost to traverse vertex
- G = (V,E) (V=vertex, E=edges)
ex.) V = {V0..V5}, E = {(V0, V1, 5), (V1, V2, 2) ...}
- Path - sequence of vertices connected by edges
- Cycle - path that starts/ends at same vertex
"""
class Vertex(object):
def __init__(self, key):
self.key = key
self.neighbors = {}
def add_neighbor(self, neighbor, weight=0):
self.neighbors[neighbor] = weight
def __str__(self):
return '{} neighbors: {}'.format(self.key, [x.key for x in self.neighbors])
def get_connections(self):
return self.neighbors.keys()
def get_weight(self, neighbor):
return self.neighbors[neighbor]
class Graph(object):
def __init__(self):
self.vertices = {}
def add_vertex(self, vertex):
self.vertices[vertex.key] = vertex
def get_vertex(self, key):
try:
return self.vertices[key]
except KeyError:
return None
def __contains__(self, key):
return key in self.vertices
def add_edge(self, from_key, to_key, weight=0):
if from_key not in self.vertices:
self.add_vertex(vertex(from_key))
if to_key not in self.vertices:
self.add_vertex(vertex(to_key))
self.vertices[from_key].add_neighbor(self.vertices[to_key], weight)
def get_vertices(self):
return self.vertices.keys()
def __iter__(self):
return iter(self.vertices.values())
g = graph()
for i in range(5):
g.add_vertex(vertex(i))
print(g.vertices)
g.add_edge(0, 1, 5)
g.add_edge(0, 5, 2)
g.add_edge(1, 2, 4)
g.add_edge(2, 3, 9)
g.add_edge(3, 4, 7)
g.add_edge(3, 5, 3)
g.add_edge(4, 0, 1)
g.add_edge(5, 4, 8)
g.add_edge(5, 2, 1)
for v in g:
for w in v.get_connections():
print('{} -> {}'.format(v.key, w.key))
g2 = {0: {1: 5, 5: 2}, 1: {2: 4}, 2: {3: 9}, 3: {4: 7, 5: 3}, 4: {0: 1}, 5: {4: 8}} |
class Solution:
def numSquares(self, n: int) -> int:
if n==1:
return n
dp=[(n+1) for i in range(n+1)]
sq=[i**2 for i in range(int(sqrt(n))+1)]
for i in range(len(dp)):
if i in sq:
dp[i]=1
else:
for j in sq:
if i>j:
dp[i]=min(dp[i],dp[i-j]+1)
return dp[-1]
| class Solution:
def num_squares(self, n: int) -> int:
if n == 1:
return n
dp = [n + 1 for i in range(n + 1)]
sq = [i ** 2 for i in range(int(sqrt(n)) + 1)]
for i in range(len(dp)):
if i in sq:
dp[i] = 1
else:
for j in sq:
if i > j:
dp[i] = min(dp[i], dp[i - j] + 1)
return dp[-1] |
load(":intellij_module.bzl", "IntellijModuleConfig")
BazelPackageDep = provider(
fields = {
"bazel_package": "package name",
"label_name": "label name",
"attr_name": "the attribute name through which the dependency was established",
"depends_on_bazel_package": "the bazel package depends on this other package",
}
)
BazelPackageDeps = provider(
fields = {
"all": "all bazel package dependencies",
}
)
JarDep = provider(
fields = {
"bazel_package": "package name of the target",
"label_name": "label name of the target that generated this jar",
"generated_by_build": "is this file generated by the build, or already-existing?",
"relative_jar_path": "the path to the jar from the execroot",
"owner_workspace_root": "the workspace root of the owner of the jar",
}
)
JarDeps = provider(
fields = {
"all": "all jars for module",
}
)
DeclaredIntellijModule = provider(
fields = {
"bazel_package": "the bazel package that this module represents",
"module_name_override": "intellij module name, must be unique across the project",
"iml_type": "the type of iml file to use, defined in the iml_types xml file",
}
)
ProjectData = provider(
fields = [
"bazel_package_deps",
"build_managed_label_matchlist",
"iml_types_path",
"jar_deps",
"module_dependency_matchlist",
"modules",
"project_root_files_paths",
"project_root_files_path_ignore_prefix",
"root_bazel_package",
"symlinks",
"test_lib_label_matchlist",
"workspace_xml_fragment_paths",
]
)
def _target_attrs_from_struct(a_struct):
"""Returns the attrs of a_struct that have a list of Targets"""
attr_name_to_targets = {}
for attr_candidate_name in dir(a_struct):
if attr_candidate_name == "to_json" or attr_candidate_name == "to_proto":
continue
attr_candidate = getattr(a_struct, attr_candidate_name)
# TODO: also should work for single-target attrs - scenario test for this (custom attrs...)
if type(attr_candidate) == "list" and len(attr_candidate) > 0 and type(attr_candidate[0]) == "Target":
attr_name_to_targets[attr_candidate_name] = attr_candidate
return attr_name_to_targets
def _gather_bazel_package_dependencies(target, ctx):
"""Recurse through target dependencies, and accumulate all package-to-package dependencies.
A bazel package dependency, for the purposes of this rules project, is established when a target in
one package relates to a target in another package, via a target attribute that contains a reference
to a label in the other package."""
all_bazel_package_dependencies = {}
attr_name_to_targets = _target_attrs_from_struct(ctx.rule.attr)
for attr_name in attr_name_to_targets:
for d in attr_name_to_targets[attr_name]:
if BazelPackageDeps in d:
all_bazel_package_dependencies.update(d[BazelPackageDeps].all)
if target.label.workspace_root == "" and \
d.label.workspace_root == "" and \
target.label.package != d.label.package:
# make sure we only ever have one copy of this we pass through in the json.
key = "%s;%s;%s;%s" % (target.label.package, target.label.name, attr_name, d.label.package)
if key not in all_bazel_package_dependencies:
all_bazel_package_dependencies[key] = \
BazelPackageDep(
bazel_package=target.label.package,
label_name=target.label.name,
attr_name=attr_name,
depends_on_bazel_package=d.label.package)
return [BazelPackageDeps(all=all_bazel_package_dependencies)]
_gather_bazel_package_dependencies_aspect = aspect(
implementation = _gather_bazel_package_dependencies,
attr_aspects = ["*"],
)
def _declared_modules(ctx):
"""All modules 'declared' in the project, i.e. per intellij_module target."""
all_modules = []
for intellij_module in ctx.attr.modules:
all_modules.append(
DeclaredIntellijModule(
bazel_package=intellij_module.label.package,
module_name_override=intellij_module[IntellijModuleConfig].module_name_override,
iml_type=intellij_module[IntellijModuleConfig].iml_type))
return all_modules
def _jar_dep(labeled, jar):
return JarDep(
bazel_package=labeled.label.package,
label_name=labeled.label.name,
# is_source means "Returns true if this is a source file, i.e. it is not generated."
# We use this to distinguish between build-generated jars, and "external" jars
generated_by_build=not jar.is_source,
relative_jar_path=jar.path,
owner_workspace_root=jar.owner.workspace_root)
def _jar_dep_key(j):
# make sure we only ever have one copy of this we pass through in the json.
return "%s;%s;%s;%s;%s" % (j.bazel_package, j.label_name, j.relative_jar_path, j.generated_by_build, j.owner_workspace_root)
def _jar_deps(target, ctx):
"""Walk all dependencies and gather up associations between bazel packages and jars."""
# We must use transitive_runtime_jars, to get at the full jars, at the moment
# see https://stackoverflow.com/a/45942563
all_jar_deps = {}
if JavaInfo in target:
for jar in target[JavaInfo].transitive_runtime_jars.to_list():
j = _jar_dep(target, jar)
key = _jar_dep_key(j)
all_jar_deps[key] = j
if JarDeps in target:
all_jar_deps.update(target[JarDeps].all)
attr_name_to_targets = _target_attrs_from_struct(ctx.rule.attr)
for attr_name in attr_name_to_targets:
for d in attr_name_to_targets[attr_name]:
if JarDeps in d:
all_jar_deps.update(d[JarDeps].all)
if JavaInfo in d:
for jar in d[JavaInfo].transitive_runtime_jars.to_list():
j = _jar_dep(target, jar)
key = _jar_dep_key(j)
all_jar_deps[key] = j
return [JarDeps(all=all_jar_deps)]
_gather_jar_deps_aspect = aspect(
implementation = _jar_deps,
attr_aspects = ["*"],
)
def _all_jar_deps(ctx):
all_jar_deps = {}
for dep in ctx.attr.deps:
all_jar_deps.update(dep[JarDeps].all)
keys_sorted = sorted(all_jar_deps.keys())
results = []
for k in keys_sorted:
results.append(all_jar_deps[k])
return results
def _bazel_package_deps(ctx):
all_deps = {}
for dep in ctx.attr.deps:
all_deps.update(dep[BazelPackageDeps].all)
keys_sorted = sorted(all_deps.keys())
results = []
for k in keys_sorted:
results.append(all_deps[k])
return results
def _impl(ctx):
"""Main rule method"""
project_data_json_file = ctx.actions.declare_file("project-data.json")
iml_types_file = ctx.attr.iml_types_file.files.to_list()[0]
inputs = [
iml_types_file,
project_data_json_file,
]
# gather up all top-level project files - the xml files that will go under the .idea directory
paths = []
if hasattr(ctx.attr.project_root_filegroup, "files"):
inputs.extend(ctx.attr.project_root_filegroup.files.to_list())
for f in ctx.attr.project_root_filegroup.files.to_list():
paths.append(f.path)
# gather up all workspace fragment files - these will be used as parts of .idea/workspace.xml
workspace_xml_fragment_paths = []
if hasattr(ctx.attr.workspace_xml_fragments_filegroup, "files"):
inputs.extend(ctx.attr.workspace_xml_fragments_filegroup.files.to_list())
for f in ctx.attr.workspace_xml_fragments_filegroup.files.to_list():
workspace_xml_fragment_paths.append(f.path)
# call out and gather data about this build, traversing build targets to find package dependencies and jars.
project_data = ProjectData(
root_bazel_package = ctx.label.package,
bazel_package_deps = _bazel_package_deps(ctx),
module_dependency_matchlist = ctx.attr.module_dependency_matchlist,
jar_deps = _all_jar_deps(ctx),
build_managed_label_matchlist = ctx.attr.build_managed_label_matchlist,
test_lib_label_matchlist = ctx.attr.test_lib_label_matchlist,
iml_types_path = iml_types_file.path,
modules = _declared_modules(ctx),
project_root_files_paths = paths,
project_root_files_path_ignore_prefix = ctx.attr.project_root_filegroup_ignore_prefix,
workspace_xml_fragment_paths = workspace_xml_fragment_paths,
symlinks = ctx.attr.symlinks
)
# this json file is the "input" to the python transformation executable action
ctx.actions.write(
output=project_data_json_file,
content=project_data.to_json())
# execute the python script that transforms the input project data,
# to an archive files containing all "managed" intellij configuration files.
ctx.actions.run(
executable = ctx.executable._intellij_generate_project_files,
arguments = [
project_data_json_file.path,
ctx.outputs.intellij_files.path
],
inputs = inputs,
outputs = [ctx.outputs.intellij_files],
progress_message = "Generating intellij project files: %s" % ctx.outputs.intellij_files.path)
# build up a list of custom substitution variables that the install script will
# use to transform the (templated) files into the intellij archive into
# final intellij config files
all_substitutions = {}
all_substitutions.update(ctx.attr.custom_substitutions)
custom_env_vars_str = ""
for k in all_substitutions:
# note: the "tools" attribute magically causes expand_location to see the dependencies specified there
# see https://stackoverflow.com/a/44025866
custom_env_vars_str += "'%s':'%s',\n" % (k, ctx.expand_location(all_substitutions[k]))
if custom_env_vars_str == "":
custom_env_vars_str = "# (note: no custom substitutions defined)"
ctx.actions.expand_template(
output=ctx.outputs.install_intellij_files_script,
template=ctx.file._install_script_template_file,
substitutions={
"# _CUSTOM_ENV_VARS_GO_HERE": custom_env_vars_str,
"_BAZELEXE_": ctx.attr.bazelexec,
},
is_executable=True)
ctx.actions.expand_template(
output=ctx.outputs.fswatch_and_install_intellij_files_mac_sh,
template=ctx.file._fswatch_and_install_intellij_files_mac_template_file,
substitutions={},
is_executable=True)
intellij_project = rule(
implementation = _impl,
attrs = {
"_intellij_generate_project_files": attr.label(
default=Label("//private:intellij_generate_project_files"),
executable=True,
cfg="target"),
"_install_script_template_file": attr.label(
default=Label("//private:install_intellij_files.py.template"), allow_single_file=True),
"_fswatch_and_install_intellij_files_mac_template_file": attr.label(
default=Label("//private:fswatch_and_install_intellij_files_mac.sh.template"), allow_single_file=True),
"bazelexec": attr.string(
default='bazel',
doc="""
The install_intellij_files script gets information about the version of bazel you are using.
If you are using something like bazelisk, you can specify ./bazelisk instead of a system bazel.
"""),
"deps": attr.label_list(
default=[],
aspects=[_gather_bazel_package_dependencies_aspect, _gather_jar_deps_aspect],
doc="""
This is the list of targets that the aspects will walk, to gather information about target
and jar dependencies.
So, these targets are what determine what packages are related, and therefore,
what Intellij modules are related.
"""),
"module_dependency_matchlist": attr.string_list(
default=[ # in the attr docs...srcs/data/deps are the three principle types of dependencies
'{"attr":"data"}',
'{"attr":"deps"}',
'{"attr":"srcs"}',
], doc="""
A series of match rules on a source target, one of its attributes names, and a target that it depends on,
which decides what entries drive the determination of bazel package dependnencies, and therefore,
intellij module dependencies.
An entry in the matchlist is a stringified json document of the form:
{"package":"foo","attr":"deps","to_package":"bar"}
This example would be very restrictive: only module dependencies flowing from package foo to package bar,
via an attribute on foo called deps, would impact how the Intellij project is constructed.
Wildcards are possible:
{"package":"foo","attr":"deps","to_package":"*"}
The now means: consider all dependencies found flowing from foo, via attr deps.
The equivalent shorthand:
{"package":"foo","attr":"deps"}
Any ommitted attribute is treated as an implicit * / "match all", so:
{"attr":"zorg"}
means all dependencies established from any package, to any other package, via the attribute name "zorg",
will be used to construct Intellij module dependencies.
"""),
"build_managed_label_matchlist": attr.string_list(default=[],
doc="""
A matcher list of the form
{"package":"*","label_name":"java_grpc"}
which determines what jars, that are generated based on code in
the project, are "bazel-managed" - that is to say, Intellij
does not attempt any sort of compilation related to these jars.
The most prominent example is protobuf-codegen. Users need
the generated code, compiled, and jar'd, to be available in order
to sensibly develop code based on these proto defintions.
Assuming all java proto codegen targets are named "java_proto",
this match rule will cause all proto jars to be included as
module jar libraries:
{"label_name":"java_proto"}
"""),
"test_lib_label_matchlist": attr.string_list(default=[],
doc="""
A matcher list of the form
{"package":"*","label_name":"java_test"}
which determines what jar libraries are marked as "Test" libraries
in Intellij modules. Note: any jars that are dependencies of
non-test targets in the same module/bazel package, will cause
the jar dependency to be marked as a "Compile" jar library.
"""),
"custom_substitutions": attr.string_dict(default={},
doc="""
Variables that may be used in intellij xml files and templates, which
are committed into the client project. At intellij project file
installation time, these variables are substituted for their values,
specified here.
"""),
"iml_types_file": attr.label(mandatory=True, allow_single_file=True,
doc = """
A file containing iml type names, and xml contents that form the basis of
intellij module files, for a given iml type.
"""),
"project_root_filegroup": attr.label(default=None,
doc="""
Filegroup of files that will be placed under the .idea directory -
i.e. the intellij project directory.
"""),
"project_root_filegroup_ignore_prefix": attr.string(
doc="""
Prefix that should be stripped off the project_root_filegroup files, before they're placed under the .idea
directory.
(This is not the most elegant idea, but I can't think of a better approach for accomplishing this goal,
at the moment)
"""),
"workspace_xml_fragments_filegroup": attr.label(default=None,
doc="""
A filegroup of xml files that should each correspond to
a workspace.xml "component". These should be named with
the component name in the middle of the filename, ex:
workspace.RunManager.xml
The installer will overwrite any components with these names.
This way, it's possible to control the contents of (only) parts
of workspace.xml, and let other parts be managed directly by
Intellij.
"""),
"modules": attr.label_list(default=[],
doc="""
intellij_module targets must be added here in order to appear in the intellij project.
"""),
"symlinks": attr.string_dict(default={}),
"tools": attr.label_list(default=[], allow_files=True),
},
outputs={
"intellij_files": "intellij_files",
"install_intellij_files_script": "install_intellij_files_script",
"fswatch_and_install_intellij_files_mac_sh": "fswatch_and_install_intellij_files_mac.sh",
},
)
| load(':intellij_module.bzl', 'IntellijModuleConfig')
bazel_package_dep = provider(fields={'bazel_package': 'package name', 'label_name': 'label name', 'attr_name': 'the attribute name through which the dependency was established', 'depends_on_bazel_package': 'the bazel package depends on this other package'})
bazel_package_deps = provider(fields={'all': 'all bazel package dependencies'})
jar_dep = provider(fields={'bazel_package': 'package name of the target', 'label_name': 'label name of the target that generated this jar', 'generated_by_build': 'is this file generated by the build, or already-existing?', 'relative_jar_path': 'the path to the jar from the execroot', 'owner_workspace_root': 'the workspace root of the owner of the jar'})
jar_deps = provider(fields={'all': 'all jars for module'})
declared_intellij_module = provider(fields={'bazel_package': 'the bazel package that this module represents', 'module_name_override': 'intellij module name, must be unique across the project', 'iml_type': 'the type of iml file to use, defined in the iml_types xml file'})
project_data = provider(fields=['bazel_package_deps', 'build_managed_label_matchlist', 'iml_types_path', 'jar_deps', 'module_dependency_matchlist', 'modules', 'project_root_files_paths', 'project_root_files_path_ignore_prefix', 'root_bazel_package', 'symlinks', 'test_lib_label_matchlist', 'workspace_xml_fragment_paths'])
def _target_attrs_from_struct(a_struct):
"""Returns the attrs of a_struct that have a list of Targets"""
attr_name_to_targets = {}
for attr_candidate_name in dir(a_struct):
if attr_candidate_name == 'to_json' or attr_candidate_name == 'to_proto':
continue
attr_candidate = getattr(a_struct, attr_candidate_name)
if type(attr_candidate) == 'list' and len(attr_candidate) > 0 and (type(attr_candidate[0]) == 'Target'):
attr_name_to_targets[attr_candidate_name] = attr_candidate
return attr_name_to_targets
def _gather_bazel_package_dependencies(target, ctx):
"""Recurse through target dependencies, and accumulate all package-to-package dependencies.
A bazel package dependency, for the purposes of this rules project, is established when a target in
one package relates to a target in another package, via a target attribute that contains a reference
to a label in the other package."""
all_bazel_package_dependencies = {}
attr_name_to_targets = _target_attrs_from_struct(ctx.rule.attr)
for attr_name in attr_name_to_targets:
for d in attr_name_to_targets[attr_name]:
if BazelPackageDeps in d:
all_bazel_package_dependencies.update(d[BazelPackageDeps].all)
if target.label.workspace_root == '' and d.label.workspace_root == '' and (target.label.package != d.label.package):
key = '%s;%s;%s;%s' % (target.label.package, target.label.name, attr_name, d.label.package)
if key not in all_bazel_package_dependencies:
all_bazel_package_dependencies[key] = bazel_package_dep(bazel_package=target.label.package, label_name=target.label.name, attr_name=attr_name, depends_on_bazel_package=d.label.package)
return [bazel_package_deps(all=all_bazel_package_dependencies)]
_gather_bazel_package_dependencies_aspect = aspect(implementation=_gather_bazel_package_dependencies, attr_aspects=['*'])
def _declared_modules(ctx):
"""All modules 'declared' in the project, i.e. per intellij_module target."""
all_modules = []
for intellij_module in ctx.attr.modules:
all_modules.append(declared_intellij_module(bazel_package=intellij_module.label.package, module_name_override=intellij_module[IntellijModuleConfig].module_name_override, iml_type=intellij_module[IntellijModuleConfig].iml_type))
return all_modules
def _jar_dep(labeled, jar):
return jar_dep(bazel_package=labeled.label.package, label_name=labeled.label.name, generated_by_build=not jar.is_source, relative_jar_path=jar.path, owner_workspace_root=jar.owner.workspace_root)
def _jar_dep_key(j):
return '%s;%s;%s;%s;%s' % (j.bazel_package, j.label_name, j.relative_jar_path, j.generated_by_build, j.owner_workspace_root)
def _jar_deps(target, ctx):
"""Walk all dependencies and gather up associations between bazel packages and jars."""
all_jar_deps = {}
if JavaInfo in target:
for jar in target[JavaInfo].transitive_runtime_jars.to_list():
j = _jar_dep(target, jar)
key = _jar_dep_key(j)
all_jar_deps[key] = j
if JarDeps in target:
all_jar_deps.update(target[JarDeps].all)
attr_name_to_targets = _target_attrs_from_struct(ctx.rule.attr)
for attr_name in attr_name_to_targets:
for d in attr_name_to_targets[attr_name]:
if JarDeps in d:
all_jar_deps.update(d[JarDeps].all)
if JavaInfo in d:
for jar in d[JavaInfo].transitive_runtime_jars.to_list():
j = _jar_dep(target, jar)
key = _jar_dep_key(j)
all_jar_deps[key] = j
return [jar_deps(all=all_jar_deps)]
_gather_jar_deps_aspect = aspect(implementation=_jar_deps, attr_aspects=['*'])
def _all_jar_deps(ctx):
all_jar_deps = {}
for dep in ctx.attr.deps:
all_jar_deps.update(dep[JarDeps].all)
keys_sorted = sorted(all_jar_deps.keys())
results = []
for k in keys_sorted:
results.append(all_jar_deps[k])
return results
def _bazel_package_deps(ctx):
all_deps = {}
for dep in ctx.attr.deps:
all_deps.update(dep[BazelPackageDeps].all)
keys_sorted = sorted(all_deps.keys())
results = []
for k in keys_sorted:
results.append(all_deps[k])
return results
def _impl(ctx):
"""Main rule method"""
project_data_json_file = ctx.actions.declare_file('project-data.json')
iml_types_file = ctx.attr.iml_types_file.files.to_list()[0]
inputs = [iml_types_file, project_data_json_file]
paths = []
if hasattr(ctx.attr.project_root_filegroup, 'files'):
inputs.extend(ctx.attr.project_root_filegroup.files.to_list())
for f in ctx.attr.project_root_filegroup.files.to_list():
paths.append(f.path)
workspace_xml_fragment_paths = []
if hasattr(ctx.attr.workspace_xml_fragments_filegroup, 'files'):
inputs.extend(ctx.attr.workspace_xml_fragments_filegroup.files.to_list())
for f in ctx.attr.workspace_xml_fragments_filegroup.files.to_list():
workspace_xml_fragment_paths.append(f.path)
project_data = project_data(root_bazel_package=ctx.label.package, bazel_package_deps=_bazel_package_deps(ctx), module_dependency_matchlist=ctx.attr.module_dependency_matchlist, jar_deps=_all_jar_deps(ctx), build_managed_label_matchlist=ctx.attr.build_managed_label_matchlist, test_lib_label_matchlist=ctx.attr.test_lib_label_matchlist, iml_types_path=iml_types_file.path, modules=_declared_modules(ctx), project_root_files_paths=paths, project_root_files_path_ignore_prefix=ctx.attr.project_root_filegroup_ignore_prefix, workspace_xml_fragment_paths=workspace_xml_fragment_paths, symlinks=ctx.attr.symlinks)
ctx.actions.write(output=project_data_json_file, content=project_data.to_json())
ctx.actions.run(executable=ctx.executable._intellij_generate_project_files, arguments=[project_data_json_file.path, ctx.outputs.intellij_files.path], inputs=inputs, outputs=[ctx.outputs.intellij_files], progress_message='Generating intellij project files: %s' % ctx.outputs.intellij_files.path)
all_substitutions = {}
all_substitutions.update(ctx.attr.custom_substitutions)
custom_env_vars_str = ''
for k in all_substitutions:
custom_env_vars_str += "'%s':'%s',\n" % (k, ctx.expand_location(all_substitutions[k]))
if custom_env_vars_str == '':
custom_env_vars_str = '# (note: no custom substitutions defined)'
ctx.actions.expand_template(output=ctx.outputs.install_intellij_files_script, template=ctx.file._install_script_template_file, substitutions={'# _CUSTOM_ENV_VARS_GO_HERE': custom_env_vars_str, '_BAZELEXE_': ctx.attr.bazelexec}, is_executable=True)
ctx.actions.expand_template(output=ctx.outputs.fswatch_and_install_intellij_files_mac_sh, template=ctx.file._fswatch_and_install_intellij_files_mac_template_file, substitutions={}, is_executable=True)
intellij_project = rule(implementation=_impl, attrs={'_intellij_generate_project_files': attr.label(default=label('//private:intellij_generate_project_files'), executable=True, cfg='target'), '_install_script_template_file': attr.label(default=label('//private:install_intellij_files.py.template'), allow_single_file=True), '_fswatch_and_install_intellij_files_mac_template_file': attr.label(default=label('//private:fswatch_and_install_intellij_files_mac.sh.template'), allow_single_file=True), 'bazelexec': attr.string(default='bazel', doc='\n The install_intellij_files script gets information about the version of bazel you are using.\n If you are using something like bazelisk, you can specify ./bazelisk instead of a system bazel.\n '), 'deps': attr.label_list(default=[], aspects=[_gather_bazel_package_dependencies_aspect, _gather_jar_deps_aspect], doc='\n This is the list of targets that the aspects will walk, to gather information about target\n and jar dependencies.\n\n So, these targets are what determine what packages are related, and therefore,\n what Intellij modules are related.\n '), 'module_dependency_matchlist': attr.string_list(default=['{"attr":"data"}', '{"attr":"deps"}', '{"attr":"srcs"}'], doc='\n A series of match rules on a source target, one of its attributes names, and a target that it depends on,\n which decides what entries drive the determination of bazel package dependnencies, and therefore,\n intellij module dependencies.\n\n An entry in the matchlist is a stringified json document of the form:\n\n {"package":"foo","attr":"deps","to_package":"bar"}\n\n This example would be very restrictive: only module dependencies flowing from package foo to package bar,\n via an attribute on foo called deps, would impact how the Intellij project is constructed.\n\n Wildcards are possible:\n\n {"package":"foo","attr":"deps","to_package":"*"}\n\n The now means: consider all dependencies found flowing from foo, via attr deps.\n\n The equivalent shorthand:\n\n {"package":"foo","attr":"deps"}\n\n Any ommitted attribute is treated as an implicit * / "match all", so:\n\n {"attr":"zorg"}\n\n means all dependencies established from any package, to any other package, via the attribute name "zorg",\n will be used to construct Intellij module dependencies.\n '), 'build_managed_label_matchlist': attr.string_list(default=[], doc='\n A matcher list of the form\n\n {"package":"*","label_name":"java_grpc"}\n\n which determines what jars, that are generated based on code in\n the project, are "bazel-managed" - that is to say, Intellij\n does not attempt any sort of compilation related to these jars.\n\n The most prominent example is protobuf-codegen. Users need\n the generated code, compiled, and jar\'d, to be available in order\n to sensibly develop code based on these proto defintions.\n\n Assuming all java proto codegen targets are named "java_proto",\n this match rule will cause all proto jars to be included as\n module jar libraries:\n\n {"label_name":"java_proto"}\n '), 'test_lib_label_matchlist': attr.string_list(default=[], doc='\n A matcher list of the form\n\n {"package":"*","label_name":"java_test"}\n\n which determines what jar libraries are marked as "Test" libraries\n in Intellij modules. Note: any jars that are dependencies of\n non-test targets in the same module/bazel package, will cause\n the jar dependency to be marked as a "Compile" jar library.\n '), 'custom_substitutions': attr.string_dict(default={}, doc='\n Variables that may be used in intellij xml files and templates, which\n are committed into the client project. At intellij project file\n installation time, these variables are substituted for their values,\n specified here.\n '), 'iml_types_file': attr.label(mandatory=True, allow_single_file=True, doc='\n A file containing iml type names, and xml contents that form the basis of\n intellij module files, for a given iml type.\n '), 'project_root_filegroup': attr.label(default=None, doc='\n Filegroup of files that will be placed under the .idea directory -\n i.e. the intellij project directory.\n '), 'project_root_filegroup_ignore_prefix': attr.string(doc="\n Prefix that should be stripped off the project_root_filegroup files, before they're placed under the .idea\n directory.\n\n (This is not the most elegant idea, but I can't think of a better approach for accomplishing this goal,\n at the moment)\n "), 'workspace_xml_fragments_filegroup': attr.label(default=None, doc='\n A filegroup of xml files that should each correspond to\n a workspace.xml "component". These should be named with\n the component name in the middle of the filename, ex:\n\n workspace.RunManager.xml\n\n The installer will overwrite any components with these names.\n\n This way, it\'s possible to control the contents of (only) parts\n of workspace.xml, and let other parts be managed directly by\n Intellij.\n '), 'modules': attr.label_list(default=[], doc='\n intellij_module targets must be added here in order to appear in the intellij project.\n '), 'symlinks': attr.string_dict(default={}), 'tools': attr.label_list(default=[], allow_files=True)}, outputs={'intellij_files': 'intellij_files', 'install_intellij_files_script': 'install_intellij_files_script', 'fswatch_and_install_intellij_files_mac_sh': 'fswatch_and_install_intellij_files_mac.sh'}) |
# Your Nessus Scanner API Keys
ACCESS_KEY = "Your_Nessus_Access_Key"
SECRET_KEY = "Your_Nessus_SecretKey"
# Your URL for the API
API_URL = "https://nessus.yourInfo.com"
# The Port Number
API_PORT = "1234"
# Warnings Greater than or equal to the number you want
SEVERITY = '1' # Meaning we will see 1 and above
# Before we can sort the devices to their owners, we need a directory.
# The set up of the Directory is represented with key, value pairs.
# This is represented with the IP on the left, followed by a delimiter, and then the Owners name.
# EX: 10.10.10.10 : Mike
DIRECTORY = False
# Enabling the email functionality. Change to True if you want to emails to be sent
# The set up of the Directory is represented with key, value pairs.
# This is represented with the Name on the left and the email on the right with a space in between
# EX: Mike mike@gmail.com
EMAIL = False
# The email address that will be sending the emails
EMAIL_ADDRESS = "Send_Emails_From_Here@site.com"
PASSWORD = ""
# When writing your dictionary of IP and Owner, and the email file of Owners and Email
# make sure to include a delimiter that is unique and does not show in the .txt file
# of your choosing
Delimiter = ":" | access_key = 'Your_Nessus_Access_Key'
secret_key = 'Your_Nessus_SecretKey'
api_url = 'https://nessus.yourInfo.com'
api_port = '1234'
severity = '1'
directory = False
email = False
email_address = 'Send_Emails_From_Here@site.com'
password = ''
delimiter = ':' |
def create_python_script(filename):
comments = "# Start of a new Python program"
with open("program.py","w") as f:
filesize = f.write(comments)
return(filesize)
print(create_python_script("program.py")) | def create_python_script(filename):
comments = '# Start of a new Python program'
with open('program.py', 'w') as f:
filesize = f.write(comments)
return filesize
print(create_python_script('program.py')) |
# The following RTTTL tunes were extracted from the following:
# https://github.com/onebeartoe/media-players/blob/master/pi-ezo/src/main/java/org/onebeartoe/media/piezo/ports/rtttl/BuiltInSongs.java
# most of which originated from here:
# http://www.picaxe.com/RTTTL-Ringtones-for-Tune-Command/
#
SONGS = [
'Super Mario - Main Theme:d=4,o=5,b=125:a,8f.,16c,16d,16f,16p,f,16d,16c,16p,16f,16p,16f,16p,8c6,8a.,g,16c,a,8f.,16c,16d,16f,16p,f,16d,16c,16p,16f,16p,16a#,16a,16g,2f,16p,8a.,8f.,8c,8a.,f,16g#,16f,16c,16p,8g#.,2g,8a.,8f.,8c,8a.,f,16g#,16f,8c,2c6',
'Super Mario - Title Music:d=4,o=5,b=125:8d7,8d7,8d7,8d6,8d7,8d7,8d7,8d6,2d#7,8d7,p,32p,8d6,8b6,8b6,8b6,8d6,8b6,8b6,8b6,8d6,8b6,8b6,8b6,16b6,16c7,b6,8a6,8d6,8a6,8a6,8a6,8d6,8a6,8a6,8a6,8d6,8a6,8a6,8a6,16a6,16b6,a6,8g6,8d6,8b6,8b6,8b6,8d6,8b6,8b6,8b6,8d6,8b6,8b6,8b6,16a6,16b6,c7,e7,8d7,8d7,8d7,8d6,8c7,8c7,8c7,8f#6,2g6',
'SMBtheme:d=4,o=5,b=100:16e6,16e6,32p,8e6,16c6,8e6,8g6,8p,8g,8p,8c6,16p,8g,16p,8e,16p,8a,8b,16a#,8a,16g.,16e6,16g6,8a6,16f6,8g6,8e6,16c6,16d6,8b,16p,8c6,16p,8g,16p,8e,16p,8a,8b,16a#,8a,16g.,16e6,16g6,8a6,16f6,8g6,8e6,16c6,16d6,8b,8p,16g6,16f#6,16f6,16d#6,16p,16e6,16p,16g#,16a,16c6,16p,16a,16c6,16d6,8p,16g6,16f#6,16f6,16d#6,16p,16e6,16p,16c7,16p,16c7,16c7,p,16g6,16f#6,16f6,16d#6,16p,16e6,16p,16g#,16a,16c6,16p,16a,16c6,16d6,8p,16d#6,8p,16d6,8p,16c6',
'SMBwater:d=8,o=6,b=225:4d5,4e5,4f#5,4g5,4a5,4a#5,b5,b5,b5,p,b5,p,2b5,p,g5,2e.,2d#.,2e.,p,g5,a5,b5,c,d,2e.,2d#,4f,2e.,2p,p,g5,2d.,2c#.,2d.,p,g5,a5,b5,c,c#,2d.,2g5,4f,2e.,2p,p,g5,2g.,2g.,2g.,4g,4a,p,g,2f.,2f.,2f.,4f,4g,p,f,2e.,4a5,4b5,4f,e,e,4e.,b5,2c.',
'SMBunderground:d=16,o=6,b=100:c,c5,a5,a,a#5,a#,2p,8p,c,c5,a5,a,a#5,a#,2p,8p,f5,f,d5,d,d#5,d#,2p,8p,f5,f,d5,d,d#5,d#,2p,32d#,d,32c#,c,p,d#,p,d,p,g#5,p,g5,p,c#,p,32c,f#,32f,32e,a#,32a,g#,32p,d#,b5,32p,a#5,32p,a5,g#5',
'Picaxe:d=4,o=6,b=101:g5,c,8c,c,e,d,8c,d,8e,8d,c,8c,e,g,2a,a,g,8e,e,c,d,8c,d,8e,8d,c,8a5,a5,g5,2c',
'The Simpsons:d=4,o=5,b=160:c.6,e6,f#6,8a6,g.6,e6,c6,8a,8f#,8f#,8f#,2g,8p,8p,8f#,8f#,8f#,8g,a#.,8c6,8c6,8c6,c6',
'Indiana:d=4,o=5,b=250:e,8p,8f,8g,8p,1c6,8p.,d,8p,8e,1f,p.,g,8p,8a,8b,8p,1f6,p,a,8p,8b,2c6,2d6,2e6,e,8p,8f,8g,8p,1c6,p,d6,8p,8e6,1f.6,g,8p,8g,e.6,8p,d6,8p,8g,e.6,8p,d6,8p,8g,f.6,8p,e6,8p,8d6,2c6',
'TakeOnMe:d=4,o=4,b=160:8f#5,8f#5,8f#5,8d5,8p,8b,8p,8e5,8p,8e5,8p,8e5,8g#5,8g#5,8a5,8b5,8a5,8a5,8a5,8e5,8p,8d5,8p,8f#5,8p,8f#5,8p,8f#5,8e5,8e5,8f#5,8e5,8f#5,8f#5,8f#5,8d5,8p,8b,8p,8e5,8p,8e5,8p,8e5,8g#5,8g#5,8a5,8b5,8a5,8a5,8a5,8e5,8p,8d5,8p,8f#5,8p,8f#5,8p,8f#5,8e5,8e5',
'Entertainer:d=4,o=5,b=140:8d,8d#,8e,c6,8e,c6,8e,2c.6,8c6,8d6,8d#6,8e6,8c6,8d6,e6,8b,d6,2c6,p,8d,8d#,8e,c6,8e,c6,8e,2c.6,8p,8a,8g,8f#,8a,8c6,e6,8d6,8c6,8a,2d6',
'Muppets:d=4,o=5,b=250:c6,c6,a,b,8a,b,g,p,c6,c6,a,8b,8a,8p,g.,p,e,e,g,f,8e,f,8c6,8c,8d,e,8e,8e,8p,8e,g,2p,c6,c6,a,b,8a,b,g,p,c6,c6,a,8b,a,g.,p,e,e,g,f,8e,f,8c6,8c,8d,e,8e,d,8d,c',
'Xfiles:d=4,o=5,b=125:e,b,a,b,d6,2b.,1p,e,b,a,b,e6,2b.,1p,g6,f#6,e6,d6,e6,2b.,1p,g6,f#6,e6,d6,f#6,2b.,1p,e,b,a,b,d6,2b.,1p,e,b,a,b,e6,2b.,1p,e6,2b.',
'Looney:d=4,o=5,b=140:32p,c6,8f6,8e6,8d6,8c6,a.,8c6,8f6,8e6,8d6,8d#6,e.6,8e6,8e6,8c6,8d6,8c6,8e6,8c6,8d6,8a,8c6,8g,8a#,8a,8f',
'20thCenFox:d=16,o=5,b=140:b,8p,b,b,2b,p,c6,32p,b,32p,c6,32p,b,32p,c6,32p,b,8p,b,b,b,32p,b,32p,b,32p,b,32p,b,32p,b,32p,b,32p,g#,32p,a,32p,b,8p,b,b,2b,4p,8e,8g#,8b,1c#6,8f#,8a,8c#6,1e6,8a,8c#6,8e6,1e6,8b,8g#,8a,2b',
'Bond:d=4,o=5,b=80:32p,16c#6,32d#6,32d#6,16d#6,8d#6,16c#6,16c#6,16c#6,16c#6,32e6,32e6,16e6,8e6,16d#6,16d#6,16d#6,16c#6,32d#6,32d#6,16d#6,8d#6,16c#6,16c#6,16c#6,16c#6,32e6,32e6,16e6,8e6,16d#6,16d6,16c#6,16c#7,c.7,16g#6,16f#6,g#.6',
'MASH:d=8,o=5,b=140:4a,4g,f#,g,p,f#,p,g,p,f#,p,2e.,p,f#,e,4f#,e,f#,p,e,p,4d.,p,f#,4e,d,e,p,d,p,e,p,d,p,2c#.,p,d,c#,4d,c#,d,p,e,p,4f#,p,a,p,4b,a,b,p,a,p,b,p,2a.,4p,a,b,a,4b,a,b,p,2a.,a,4f#,a,b,p,d6,p,4e.6,d6,b,p,a,p,2b',
'StarWars:d=4,o=5,b=45:32p,32f#,32f#,32f#,8b.,8f#.6,32e6,32d#6,32c#6,8b.6,16f#.6,32e6,32d#6,32c#6,8b.6,16f#.6,32e6,32d#6,32e6,8c#.6,32f#,32f#,32f#,8b.,8f#.6,32e6,32d#6,32c#6,8b.6,16f#.6,32e6,32d#6,32c#6,8b.6,16f#.6,32e6,32d#6,32e6,8c#6',
'GoodBad:d=4,o=5,b=56:32p,32a#,32d#6,32a#,32d#6,8a#.,16f#.,16g#.,d#,32a#,32d#6,32a#,32d#6,8a#.,16f#.,16g#.,c#6,32a#,32d#6,32a#,32d#6,8a#.,16f#.,32f.,32d#.,c#,32a#,32d#6,32a#,32d#6,8a#.,16g#.,d#',
'TopGun:d=4,o=4,b=31:32p,16c#,16g#,16g#,32f#,32f,32f#,32f,16d#,16d#,32c#,32d#,16f,32d#,32f,16f#,32f,32c#,16f,d#,16c#,16g#,16g#,32f#,32f,32f#,32f,16d#,16d#,32c#,32d#,16f,32d#,32f,16f#,32f,32c#,g#',
'A-Team:d=8,o=5,b=125:4d#6,a#,2d#6,16p,g#,4a#,4d#.,p,16g,16a#,d#6,a#,f6,2d#6,16p,c#.6,16c6,16a#,g#.,2a#',
'Flinstones:d=4,o=5,b=40:32p,16f6,16a#,16a#6,32g6,16f6,16a#.,16f6,32d#6,32d6,32d6,32d#6,32f6,16a#,16c6,d6,16f6,16a#.,16a#6,32g6,16f6,16a#.,32f6,32f6,32d#6,32d6,32d6,32d#6,32f6,16a#,16c6,a#,16a6,16d.6,16a#6,32a6,32a6,32g6,32f#6,32a6,8g6,16g6,16c.6,32a6,32a6,32g6,32g6,32f6,32e6,32g6,8f6,16f6,16a#.,16a#6,32g6,16f6,16a#.,16f6,32d#6,32d6,32d6,32d#6,32f6,16a#,16c.6,32d6,32d#6,32f6,16a#,16c.6,32d6,32d#6,32f6,16a#6,16c7,8a#.6',
'Jeopardy:d=4,o=6,b=125:c,f,c,f5,c,f,2c,c,f,c,f,a.,8g,8f,8e,8d,8c#,c,f,c,f5,c,f,2c,f.,8d,c,a#5,a5,g5,f5,p,d#,g#,d#,g#5,d#,g#,2d#,d#,g#,d#,g#,c.7,8a#,8g#,8g,8f,8e,d#,g#,d#,g#5,d#,g#,2d#,g#.,8f,d#,c#,c,p,a#5,p,g#.5,d#,g#',
'Gadget:d=16,o=5,b=50:32d#,32f,32f#,32g#,a#,f#,a,f,g#,f#,32d#,32f,32f#,32g#,a#,d#6,4d6,32d#,32f,32f#,32g#,a#,f#,a,f,g#,f#,8d#',
'Smurfs:d=32,o=5,b=200:4c#6,16p,4f#6,p,16c#6,p,8d#6,p,8b,p,4g#,16p,4c#6,p,16a#,p,8f#,p,8a#,p,4g#,4p,g#,p,a#,p,b,p,c6,p,4c#6,16p,4f#6,p,16c#6,p,8d#6,p,8b,p,4g#,16p,4c#6,p,16a#,p,8b,p,8f,p,4f#',
'MahnaMahna:d=16,o=6,b=125:c#,c.,b5,8a#.5,8f.,4g#,a#,g.,4d#,8p,c#,c.,b5,8a#.5,8f.,g#.,8a#.,4g,8p,c#,c.,b5,8a#.5,8f.,4g#,f,g.,8d#.,f,g.,8d#.,f,8g,8d#.,f,8g,d#,8c,a#5,8d#.,8d#.,4d#,8d#.',
'LeisureSuit:d=16,o=6,b=56:f.5,f#.5,g.5,g#5,32a#5,f5,g#.5,a#.5,32f5,g#5,32a#5,g#5,8c#.,a#5,32c#,a5,a#.5,c#.,32a5,a#5,32c#,d#,8e,c#.,f.,f.,f.,f.,f,32e,d#,8d,a#.5,e,32f,e,32f,c#,d#.,c#',
'MissionImp:d=16,o=6,b=95:32d,32d#,32d,32d#,32d,32d#,32d,32d#,32d,32d,32d#,32e,32f,32f#,32g,g,8p,g,8p,a#,p,c7,p,g,8p,g,8p,f,p,f#,p,g,8p,g,8p,a#,p,c7,p,g,8p,g,8p,f,p,f#,p,a#,g,2d,32p,a#,g,2c#,32p,a#,g,2c,a#5,8c,2p,32p,a#5,g5,2f#,32p,a#5,g5,2f,32p,a#5,g5,2e,d#,8d',
]
def find(name):
for song in SONGS:
song_name = song.split(':')[0]
if song_name == name:
return song
| songs = ['Super Mario - Main Theme:d=4,o=5,b=125:a,8f.,16c,16d,16f,16p,f,16d,16c,16p,16f,16p,16f,16p,8c6,8a.,g,16c,a,8f.,16c,16d,16f,16p,f,16d,16c,16p,16f,16p,16a#,16a,16g,2f,16p,8a.,8f.,8c,8a.,f,16g#,16f,16c,16p,8g#.,2g,8a.,8f.,8c,8a.,f,16g#,16f,8c,2c6', 'Super Mario - Title Music:d=4,o=5,b=125:8d7,8d7,8d7,8d6,8d7,8d7,8d7,8d6,2d#7,8d7,p,32p,8d6,8b6,8b6,8b6,8d6,8b6,8b6,8b6,8d6,8b6,8b6,8b6,16b6,16c7,b6,8a6,8d6,8a6,8a6,8a6,8d6,8a6,8a6,8a6,8d6,8a6,8a6,8a6,16a6,16b6,a6,8g6,8d6,8b6,8b6,8b6,8d6,8b6,8b6,8b6,8d6,8b6,8b6,8b6,16a6,16b6,c7,e7,8d7,8d7,8d7,8d6,8c7,8c7,8c7,8f#6,2g6', 'SMBtheme:d=4,o=5,b=100:16e6,16e6,32p,8e6,16c6,8e6,8g6,8p,8g,8p,8c6,16p,8g,16p,8e,16p,8a,8b,16a#,8a,16g.,16e6,16g6,8a6,16f6,8g6,8e6,16c6,16d6,8b,16p,8c6,16p,8g,16p,8e,16p,8a,8b,16a#,8a,16g.,16e6,16g6,8a6,16f6,8g6,8e6,16c6,16d6,8b,8p,16g6,16f#6,16f6,16d#6,16p,16e6,16p,16g#,16a,16c6,16p,16a,16c6,16d6,8p,16g6,16f#6,16f6,16d#6,16p,16e6,16p,16c7,16p,16c7,16c7,p,16g6,16f#6,16f6,16d#6,16p,16e6,16p,16g#,16a,16c6,16p,16a,16c6,16d6,8p,16d#6,8p,16d6,8p,16c6', 'SMBwater:d=8,o=6,b=225:4d5,4e5,4f#5,4g5,4a5,4a#5,b5,b5,b5,p,b5,p,2b5,p,g5,2e.,2d#.,2e.,p,g5,a5,b5,c,d,2e.,2d#,4f,2e.,2p,p,g5,2d.,2c#.,2d.,p,g5,a5,b5,c,c#,2d.,2g5,4f,2e.,2p,p,g5,2g.,2g.,2g.,4g,4a,p,g,2f.,2f.,2f.,4f,4g,p,f,2e.,4a5,4b5,4f,e,e,4e.,b5,2c.', 'SMBunderground:d=16,o=6,b=100:c,c5,a5,a,a#5,a#,2p,8p,c,c5,a5,a,a#5,a#,2p,8p,f5,f,d5,d,d#5,d#,2p,8p,f5,f,d5,d,d#5,d#,2p,32d#,d,32c#,c,p,d#,p,d,p,g#5,p,g5,p,c#,p,32c,f#,32f,32e,a#,32a,g#,32p,d#,b5,32p,a#5,32p,a5,g#5', 'Picaxe:d=4,o=6,b=101:g5,c,8c,c,e,d,8c,d,8e,8d,c,8c,e,g,2a,a,g,8e,e,c,d,8c,d,8e,8d,c,8a5,a5,g5,2c', 'The Simpsons:d=4,o=5,b=160:c.6,e6,f#6,8a6,g.6,e6,c6,8a,8f#,8f#,8f#,2g,8p,8p,8f#,8f#,8f#,8g,a#.,8c6,8c6,8c6,c6', 'Indiana:d=4,o=5,b=250:e,8p,8f,8g,8p,1c6,8p.,d,8p,8e,1f,p.,g,8p,8a,8b,8p,1f6,p,a,8p,8b,2c6,2d6,2e6,e,8p,8f,8g,8p,1c6,p,d6,8p,8e6,1f.6,g,8p,8g,e.6,8p,d6,8p,8g,e.6,8p,d6,8p,8g,f.6,8p,e6,8p,8d6,2c6', 'TakeOnMe:d=4,o=4,b=160:8f#5,8f#5,8f#5,8d5,8p,8b,8p,8e5,8p,8e5,8p,8e5,8g#5,8g#5,8a5,8b5,8a5,8a5,8a5,8e5,8p,8d5,8p,8f#5,8p,8f#5,8p,8f#5,8e5,8e5,8f#5,8e5,8f#5,8f#5,8f#5,8d5,8p,8b,8p,8e5,8p,8e5,8p,8e5,8g#5,8g#5,8a5,8b5,8a5,8a5,8a5,8e5,8p,8d5,8p,8f#5,8p,8f#5,8p,8f#5,8e5,8e5', 'Entertainer:d=4,o=5,b=140:8d,8d#,8e,c6,8e,c6,8e,2c.6,8c6,8d6,8d#6,8e6,8c6,8d6,e6,8b,d6,2c6,p,8d,8d#,8e,c6,8e,c6,8e,2c.6,8p,8a,8g,8f#,8a,8c6,e6,8d6,8c6,8a,2d6', 'Muppets:d=4,o=5,b=250:c6,c6,a,b,8a,b,g,p,c6,c6,a,8b,8a,8p,g.,p,e,e,g,f,8e,f,8c6,8c,8d,e,8e,8e,8p,8e,g,2p,c6,c6,a,b,8a,b,g,p,c6,c6,a,8b,a,g.,p,e,e,g,f,8e,f,8c6,8c,8d,e,8e,d,8d,c', 'Xfiles:d=4,o=5,b=125:e,b,a,b,d6,2b.,1p,e,b,a,b,e6,2b.,1p,g6,f#6,e6,d6,e6,2b.,1p,g6,f#6,e6,d6,f#6,2b.,1p,e,b,a,b,d6,2b.,1p,e,b,a,b,e6,2b.,1p,e6,2b.', 'Looney:d=4,o=5,b=140:32p,c6,8f6,8e6,8d6,8c6,a.,8c6,8f6,8e6,8d6,8d#6,e.6,8e6,8e6,8c6,8d6,8c6,8e6,8c6,8d6,8a,8c6,8g,8a#,8a,8f', '20thCenFox:d=16,o=5,b=140:b,8p,b,b,2b,p,c6,32p,b,32p,c6,32p,b,32p,c6,32p,b,8p,b,b,b,32p,b,32p,b,32p,b,32p,b,32p,b,32p,b,32p,g#,32p,a,32p,b,8p,b,b,2b,4p,8e,8g#,8b,1c#6,8f#,8a,8c#6,1e6,8a,8c#6,8e6,1e6,8b,8g#,8a,2b', 'Bond:d=4,o=5,b=80:32p,16c#6,32d#6,32d#6,16d#6,8d#6,16c#6,16c#6,16c#6,16c#6,32e6,32e6,16e6,8e6,16d#6,16d#6,16d#6,16c#6,32d#6,32d#6,16d#6,8d#6,16c#6,16c#6,16c#6,16c#6,32e6,32e6,16e6,8e6,16d#6,16d6,16c#6,16c#7,c.7,16g#6,16f#6,g#.6', 'MASH:d=8,o=5,b=140:4a,4g,f#,g,p,f#,p,g,p,f#,p,2e.,p,f#,e,4f#,e,f#,p,e,p,4d.,p,f#,4e,d,e,p,d,p,e,p,d,p,2c#.,p,d,c#,4d,c#,d,p,e,p,4f#,p,a,p,4b,a,b,p,a,p,b,p,2a.,4p,a,b,a,4b,a,b,p,2a.,a,4f#,a,b,p,d6,p,4e.6,d6,b,p,a,p,2b', 'StarWars:d=4,o=5,b=45:32p,32f#,32f#,32f#,8b.,8f#.6,32e6,32d#6,32c#6,8b.6,16f#.6,32e6,32d#6,32c#6,8b.6,16f#.6,32e6,32d#6,32e6,8c#.6,32f#,32f#,32f#,8b.,8f#.6,32e6,32d#6,32c#6,8b.6,16f#.6,32e6,32d#6,32c#6,8b.6,16f#.6,32e6,32d#6,32e6,8c#6', 'GoodBad:d=4,o=5,b=56:32p,32a#,32d#6,32a#,32d#6,8a#.,16f#.,16g#.,d#,32a#,32d#6,32a#,32d#6,8a#.,16f#.,16g#.,c#6,32a#,32d#6,32a#,32d#6,8a#.,16f#.,32f.,32d#.,c#,32a#,32d#6,32a#,32d#6,8a#.,16g#.,d#', 'TopGun:d=4,o=4,b=31:32p,16c#,16g#,16g#,32f#,32f,32f#,32f,16d#,16d#,32c#,32d#,16f,32d#,32f,16f#,32f,32c#,16f,d#,16c#,16g#,16g#,32f#,32f,32f#,32f,16d#,16d#,32c#,32d#,16f,32d#,32f,16f#,32f,32c#,g#', 'A-Team:d=8,o=5,b=125:4d#6,a#,2d#6,16p,g#,4a#,4d#.,p,16g,16a#,d#6,a#,f6,2d#6,16p,c#.6,16c6,16a#,g#.,2a#', 'Flinstones:d=4,o=5,b=40:32p,16f6,16a#,16a#6,32g6,16f6,16a#.,16f6,32d#6,32d6,32d6,32d#6,32f6,16a#,16c6,d6,16f6,16a#.,16a#6,32g6,16f6,16a#.,32f6,32f6,32d#6,32d6,32d6,32d#6,32f6,16a#,16c6,a#,16a6,16d.6,16a#6,32a6,32a6,32g6,32f#6,32a6,8g6,16g6,16c.6,32a6,32a6,32g6,32g6,32f6,32e6,32g6,8f6,16f6,16a#.,16a#6,32g6,16f6,16a#.,16f6,32d#6,32d6,32d6,32d#6,32f6,16a#,16c.6,32d6,32d#6,32f6,16a#,16c.6,32d6,32d#6,32f6,16a#6,16c7,8a#.6', 'Jeopardy:d=4,o=6,b=125:c,f,c,f5,c,f,2c,c,f,c,f,a.,8g,8f,8e,8d,8c#,c,f,c,f5,c,f,2c,f.,8d,c,a#5,a5,g5,f5,p,d#,g#,d#,g#5,d#,g#,2d#,d#,g#,d#,g#,c.7,8a#,8g#,8g,8f,8e,d#,g#,d#,g#5,d#,g#,2d#,g#.,8f,d#,c#,c,p,a#5,p,g#.5,d#,g#', 'Gadget:d=16,o=5,b=50:32d#,32f,32f#,32g#,a#,f#,a,f,g#,f#,32d#,32f,32f#,32g#,a#,d#6,4d6,32d#,32f,32f#,32g#,a#,f#,a,f,g#,f#,8d#', 'Smurfs:d=32,o=5,b=200:4c#6,16p,4f#6,p,16c#6,p,8d#6,p,8b,p,4g#,16p,4c#6,p,16a#,p,8f#,p,8a#,p,4g#,4p,g#,p,a#,p,b,p,c6,p,4c#6,16p,4f#6,p,16c#6,p,8d#6,p,8b,p,4g#,16p,4c#6,p,16a#,p,8b,p,8f,p,4f#', 'MahnaMahna:d=16,o=6,b=125:c#,c.,b5,8a#.5,8f.,4g#,a#,g.,4d#,8p,c#,c.,b5,8a#.5,8f.,g#.,8a#.,4g,8p,c#,c.,b5,8a#.5,8f.,4g#,f,g.,8d#.,f,g.,8d#.,f,8g,8d#.,f,8g,d#,8c,a#5,8d#.,8d#.,4d#,8d#.', 'LeisureSuit:d=16,o=6,b=56:f.5,f#.5,g.5,g#5,32a#5,f5,g#.5,a#.5,32f5,g#5,32a#5,g#5,8c#.,a#5,32c#,a5,a#.5,c#.,32a5,a#5,32c#,d#,8e,c#.,f.,f.,f.,f.,f,32e,d#,8d,a#.5,e,32f,e,32f,c#,d#.,c#', 'MissionImp:d=16,o=6,b=95:32d,32d#,32d,32d#,32d,32d#,32d,32d#,32d,32d,32d#,32e,32f,32f#,32g,g,8p,g,8p,a#,p,c7,p,g,8p,g,8p,f,p,f#,p,g,8p,g,8p,a#,p,c7,p,g,8p,g,8p,f,p,f#,p,a#,g,2d,32p,a#,g,2c#,32p,a#,g,2c,a#5,8c,2p,32p,a#5,g5,2f#,32p,a#5,g5,2f,32p,a#5,g5,2e,d#,8d']
def find(name):
for song in SONGS:
song_name = song.split(':')[0]
if song_name == name:
return song |
class Solution(object):
def minFlipsMonoIncr(self, s):
"""
:type s: str
:rtype: int
"""
# we split the string into left part and right part, and count how many ones in left and zeros in right
left_ones = 0
right_zeroes = s.count("0")
ans = right_zeroes
for c in s:
if c == "1": left_ones += 1
if c == "0": right_zeroes -= 1
ans = min(ans, right_zeroes + left_ones)
return ans | class Solution(object):
def min_flips_mono_incr(self, s):
"""
:type s: str
:rtype: int
"""
left_ones = 0
right_zeroes = s.count('0')
ans = right_zeroes
for c in s:
if c == '1':
left_ones += 1
if c == '0':
right_zeroes -= 1
ans = min(ans, right_zeroes + left_ones)
return ans |
#https://leetcode.com/problems/count-binary-substrings/submissions/
# Referred : https://www.youtube.com/watch?v=MrVfk4HKAuU
class Solution(object):
def countBinarySubstrings(self, s):
"""
:type s: str
:rtype: int
"""
groups = [1]
for i in range(1, len(s)):
if s[i-1] != s[i]:
groups.append(1)
else:
groups[-1] += 1
ans = 0
for i in range(1, len(groups)):
ans += min(groups[i-1], groups[i])
return ans | class Solution(object):
def count_binary_substrings(self, s):
"""
:type s: str
:rtype: int
"""
groups = [1]
for i in range(1, len(s)):
if s[i - 1] != s[i]:
groups.append(1)
else:
groups[-1] += 1
ans = 0
for i in range(1, len(groups)):
ans += min(groups[i - 1], groups[i])
return ans |
# config file name
RIGOR_YML = "rigor.yml"
# content-types
TEXT_HTML = "text/html"
TEXT_PLAIN = "text/plain"
APPLICATION_JSON = "application/json"
# headers
CONTENT_TYPE = "Content-Type"
| rigor_yml = 'rigor.yml'
text_html = 'text/html'
text_plain = 'text/plain'
application_json = 'application/json'
content_type = 'Content-Type' |
"""General constants from python-openflow library."""
# Max values of each basic type
UBINT8_MAX_VALUE = 255
UBINT16_MAX_VALUE = 65535
UBINT32_MAX_VALUE = 4294967295
UBINT64_MAX_VALUE = 18446744073709551615
OFP_ETH_ALEN = 6
OFP_MAX_PORT_NAME_LEN = 16
OFP_MAX_TABLE_NAME_LEN = 32
SERIAL_NUM_LEN = 32
DESC_STR_LEN = 256
| """General constants from python-openflow library."""
ubint8_max_value = 255
ubint16_max_value = 65535
ubint32_max_value = 4294967295
ubint64_max_value = 18446744073709551615
ofp_eth_alen = 6
ofp_max_port_name_len = 16
ofp_max_table_name_len = 32
serial_num_len = 32
desc_str_len = 256 |
__char_num = [('a',0),('b',1),('c',2),('d',3),('e',4),('f',5),('g',6),('h',7),('i',8),('j',9),('k',10),('l',11),('m',12),('n',13),('o',14),('p',15),('q',16),('r',17),('s',18),('t',19),('u',20),('v',21),('w',22),('x',23),('y',24),('z',25)]
def char2num(char):
return next(filter(lambda x: x[0] == char.lower(), __char_num))[1]
def num2char(num):
return next(filter(lambda x: x[1] == num, __char_num))[0] | __char_num = [('a', 0), ('b', 1), ('c', 2), ('d', 3), ('e', 4), ('f', 5), ('g', 6), ('h', 7), ('i', 8), ('j', 9), ('k', 10), ('l', 11), ('m', 12), ('n', 13), ('o', 14), ('p', 15), ('q', 16), ('r', 17), ('s', 18), ('t', 19), ('u', 20), ('v', 21), ('w', 22), ('x', 23), ('y', 24), ('z', 25)]
def char2num(char):
return next(filter(lambda x: x[0] == char.lower(), __char_num))[1]
def num2char(num):
return next(filter(lambda x: x[1] == num, __char_num))[0] |
class Solution:
def isRectangleOverlap(self, rec1: List[int], rec2: List[int]) -> bool:
def intersect(p_left, p_right, q_left, q_right):
return min(p_right, q_right) > max(p_left, q_left)
return (intersect(rec1[0], rec1[2], rec2[0], rec2[2]) and intersect(rec1[1], rec1[3], rec2[1], rec2[3]))
| class Solution:
def is_rectangle_overlap(self, rec1: List[int], rec2: List[int]) -> bool:
def intersect(p_left, p_right, q_left, q_right):
return min(p_right, q_right) > max(p_left, q_left)
return intersect(rec1[0], rec1[2], rec2[0], rec2[2]) and intersect(rec1[1], rec1[3], rec2[1], rec2[3]) |
__all__ = [
"messenger",
"writer",
"processor",
"listener",
]
| __all__ = ['messenger', 'writer', 'processor', 'listener'] |
class Solution:
def hammingDistance(self, x: int, y: int) -> int:
if x < 0 or y < 0:
raise Exception("Negative Input(s)")
h_dist = 0
while x > 0 or y > 0:
if (x ^ y) & 1 == 1:
h_dist += 1
x >>= 1
y >>= 1
return h_dist
| class Solution:
def hamming_distance(self, x: int, y: int) -> int:
if x < 0 or y < 0:
raise exception('Negative Input(s)')
h_dist = 0
while x > 0 or y > 0:
if (x ^ y) & 1 == 1:
h_dist += 1
x >>= 1
y >>= 1
return h_dist |
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def helper(self, l1, r1, l2, r2):
if l1 > r1: return None
mid = self.postorder[r2]
mid_idx = self.inorder.index(mid)
left_size = mid_idx - l1
return TreeNode(mid, self.helper(l1, l1+left_size-1, l2, l2+left_size-1), self.helper(mid_idx+1, r1, l2+left_size, r2-1))
def buildTree(self, inorder: List[int], postorder: List[int]) -> TreeNode:
self.inorder = inorder
self.postorder = postorder
return self.helper(0, len(inorder)-1, 0, len(postorder)-1)
| class Solution:
def helper(self, l1, r1, l2, r2):
if l1 > r1:
return None
mid = self.postorder[r2]
mid_idx = self.inorder.index(mid)
left_size = mid_idx - l1
return tree_node(mid, self.helper(l1, l1 + left_size - 1, l2, l2 + left_size - 1), self.helper(mid_idx + 1, r1, l2 + left_size, r2 - 1))
def build_tree(self, inorder: List[int], postorder: List[int]) -> TreeNode:
self.inorder = inorder
self.postorder = postorder
return self.helper(0, len(inorder) - 1, 0, len(postorder) - 1) |
def DIST_NAIF(x, y):
return DIST_NAIF_REC(x, y, 0, 0, 0, float('inf'))
def DIST_NAIF_REC(x, y, i, j, c, dist):
"""
x: Dna
y: Dna
i: indice dans [0..|x|]
j: indice dans [0..|y|]
dist: coup du meilleur alignement connu avant cet appel
return
dist meilleur coup connu apre cet appel
"""
if i == len(x.seq) and j == len(x.seq):
if c < dist:
dist = c
else:
if i<len(x.seq) and j<len(y.seq):
dist = DIST_NAIF_REC(x, y, i+1, j+1, c+Dna.c_atomique(x.seq[i+1], y.seq[j+1]), dist)
if i<len(x.seq):
dist = DIST_NAIF_REC(x, y, i+1, j, c+Dna.c_ins, dist)
if j<len(y.seq):
dist = DIST_NAIF_REC(x, y, i, j+1, c+Dna.c_del, dist)
return dist
| def dist_naif(x, y):
return dist_naif_rec(x, y, 0, 0, 0, float('inf'))
def dist_naif_rec(x, y, i, j, c, dist):
"""
x: Dna
y: Dna
i: indice dans [0..|x|]
j: indice dans [0..|y|]
dist: coup du meilleur alignement connu avant cet appel
return
dist meilleur coup connu apre cet appel
"""
if i == len(x.seq) and j == len(x.seq):
if c < dist:
dist = c
else:
if i < len(x.seq) and j < len(y.seq):
dist = dist_naif_rec(x, y, i + 1, j + 1, c + Dna.c_atomique(x.seq[i + 1], y.seq[j + 1]), dist)
if i < len(x.seq):
dist = dist_naif_rec(x, y, i + 1, j, c + Dna.c_ins, dist)
if j < len(y.seq):
dist = dist_naif_rec(x, y, i, j + 1, c + Dna.c_del, dist)
return dist |
"""
Safe Squares from Rooks
On a generalized n-by-n chessboard, there are some number of rooks, each rook represented as a
two-tuple (row, column) of the row and the column that it is in. (The rows and columns are
numbered from 0 to n-1.) A chess rook covers all squares that are in the same row or in the same
column as that rook. Given the board size n and the list of rooks on that board, count the number of
empty squares that are safe, that is, are not covered by any rook.
Input: [(1, 1), (3, 5), (7, 0), (7, 6)], 8
Output: 20
=========================================
The result is a multiplication between free rows and free columns.
Use hashsets to store the free rows and columns.
Time Complexity: O(N)
Space Complexity: O(N)
"""
############
# Solution #
############
def safe_squares_rooks(rooks, n):
rows = set()
cols = set()
for i in range(n):
rows.add(i)
cols.add(i)
for rook in rooks:
if rook[0] in rows:
rows.remove(rook[0])
if rook[1] in cols:
cols.remove(rook[1])
return len(rows) * len(cols)
###########
# Testsing #
###########
# safe_squares_rooks 1
# Correct result => 1
print(safe_squares_rooks([(1, 1)], 2))
# safe_squares_rooks 2
# Correct result => 4
print(safe_squares_rooks([(2, 3), (0, 1)], 4))
# safe_squares_rooks 3
# Correct result => 20
print(safe_squares_rooks([(1, 1), (3, 5), (7, 0), (7, 6)], 8))
# safe_squares_rooks 4
# Correct result => 0
print(safe_squares_rooks([(0, 0), (1, 1), (2, 2), (3, 3), (4, 4), (5, 5)], 6))
| """
Safe Squares from Rooks
On a generalized n-by-n chessboard, there are some number of rooks, each rook represented as a
two-tuple (row, column) of the row and the column that it is in. (The rows and columns are
numbered from 0 to n-1.) A chess rook covers all squares that are in the same row or in the same
column as that rook. Given the board size n and the list of rooks on that board, count the number of
empty squares that are safe, that is, are not covered by any rook.
Input: [(1, 1), (3, 5), (7, 0), (7, 6)], 8
Output: 20
=========================================
The result is a multiplication between free rows and free columns.
Use hashsets to store the free rows and columns.
Time Complexity: O(N)
Space Complexity: O(N)
"""
def safe_squares_rooks(rooks, n):
rows = set()
cols = set()
for i in range(n):
rows.add(i)
cols.add(i)
for rook in rooks:
if rook[0] in rows:
rows.remove(rook[0])
if rook[1] in cols:
cols.remove(rook[1])
return len(rows) * len(cols)
print(safe_squares_rooks([(1, 1)], 2))
print(safe_squares_rooks([(2, 3), (0, 1)], 4))
print(safe_squares_rooks([(1, 1), (3, 5), (7, 0), (7, 6)], 8))
print(safe_squares_rooks([(0, 0), (1, 1), (2, 2), (3, 3), (4, 4), (5, 5)], 6)) |
"""
Link: https://www.hackerrank.com/challenges/python-print/problem?isFullScreen=true
Problem: Print Function
"""
#Solution
if __name__ == '__main__':
n = int(input())
for i in range(1,n+1):
print(i, end="")
| """
Link: https://www.hackerrank.com/challenges/python-print/problem?isFullScreen=true
Problem: Print Function
"""
if __name__ == '__main__':
n = int(input())
for i in range(1, n + 1):
print(i, end='') |
def mergeSort(alist):
if len(alist) > 1:
mid = len(alist)//2
lefthalf = alist[:mid]
righthalf = alist[mid:]
mergeSort(lefthalf)
mergeSort(righthalf)
i = 0; j = 0; k = 0
while i < len(lefthalf) and j < len(righthalf):
if lefthalf[i] < righthalf[j]:
alist[k] = lefthalf[i]
i += 1
else:
alist[k] = righthalf[j]
j += 1
k += 1
while i < len(lefthalf):
alist[k] = lefthalf[i]
i += 1
k += 1
while j < len(righthalf):
alist[k] = righthalf[j]
j += 1
k += 1
alist = [54,26,93,17,77,31,44,55,20]
mergeSort(alist)
print(alist) | def merge_sort(alist):
if len(alist) > 1:
mid = len(alist) // 2
lefthalf = alist[:mid]
righthalf = alist[mid:]
merge_sort(lefthalf)
merge_sort(righthalf)
i = 0
j = 0
k = 0
while i < len(lefthalf) and j < len(righthalf):
if lefthalf[i] < righthalf[j]:
alist[k] = lefthalf[i]
i += 1
else:
alist[k] = righthalf[j]
j += 1
k += 1
while i < len(lefthalf):
alist[k] = lefthalf[i]
i += 1
k += 1
while j < len(righthalf):
alist[k] = righthalf[j]
j += 1
k += 1
alist = [54, 26, 93, 17, 77, 31, 44, 55, 20]
merge_sort(alist)
print(alist) |
#AREA DO CIRCULO
r= float(input())
resultado= 3.14* r**2/10000
print("Area={:.4f}".format(resultado) )
| r = float(input())
resultado = 3.14 * r ** 2 / 10000
print('Area={:.4f}'.format(resultado)) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.