content stringlengths 7 1.05M | fixed_cases stringlengths 1 1.28M |
|---|---|
t = int(input())
while(t!=0):
count=0
n=int(input())
if n==1:
print('no')
else:
for i in range(2,n//2):
if(n%i == 0):
count+=1
if(count>=1):
print('no')
else:
print('yes')
t-=1
| t = int(input())
while t != 0:
count = 0
n = int(input())
if n == 1:
print('no')
else:
for i in range(2, n // 2):
if n % i == 0:
count += 1
if count >= 1:
print('no')
else:
print('yes')
t -= 1 |
class OrderDamageConfirmation:
def __init__(self, content):
self.system_seat_ids = content['systemSeatIds']
self.msg_id = content['msgId']
self.game_state_id = content['gameStateId']
self.result = content['orderDamageConfirmation']['result']
self.order_damage_type = content['orderDamageConfirmation'][
'orderDamageType']
| class Orderdamageconfirmation:
def __init__(self, content):
self.system_seat_ids = content['systemSeatIds']
self.msg_id = content['msgId']
self.game_state_id = content['gameStateId']
self.result = content['orderDamageConfirmation']['result']
self.order_damage_type = content['orderDamageConfirmation']['orderDamageType'] |
def test():
# if an assertion fails, the message will be displayed
# --> must have the output in a comment
assert "Mean: 5.0" in __solution__, "Did you record the correct program output as a comment?"
# --> must have the correct arithmetic mean
assert mean == 5.0, "Are you calculating the arithmetic mean?"
# --> must not have a TODO marker in the solution
assert "TODO" not in __solution__, "Did you remove the TODO marker when finished?"
# display a congratulations for a correct solution
__msg__.good("Well done!")
| def test():
assert 'Mean: 5.0' in __solution__, 'Did you record the correct program output as a comment?'
assert mean == 5.0, 'Are you calculating the arithmetic mean?'
assert 'TODO' not in __solution__, 'Did you remove the TODO marker when finished?'
__msg__.good('Well done!') |
MASTER_NAME = 'localhost:9090'
MASTER_AUTH = ('admin', 'password')
TEST_MONITOR_SVC_URLS = dict(
base='http://{0}/nitestmonitor',
base_sans_protocol='{0}://{1}/nitestmonitor',
can_write='/v2/can-write',
query_results='/v1/query-results',
query_results_skip_take='/v1/query-results?skip={0}&take={1}',
create_results='/v2/results',
update_results='/v2/results',
delete_result='/v2/results/{0}',
query_steps='/v1/query-steps',
query_steps_skip_take='/v1/query-steps?skip={0}&take={1}',
create_steps='/v2/steps',
delete_step='/v2/steps/{0}',
delete_steps='/v2/delete-steps',
delete_results='/v2/delete-results',
list_report_files='/v2/reports',
upload_report_for_result='/v2/results/{0}/upload',
attach_report_to_result='/v2/results/{0}/attach',
download_report='/v2/reports/{0}',
delete_report='/v2/reports/{0}'
)
| master_name = 'localhost:9090'
master_auth = ('admin', 'password')
test_monitor_svc_urls = dict(base='http://{0}/nitestmonitor', base_sans_protocol='{0}://{1}/nitestmonitor', can_write='/v2/can-write', query_results='/v1/query-results', query_results_skip_take='/v1/query-results?skip={0}&take={1}', create_results='/v2/results', update_results='/v2/results', delete_result='/v2/results/{0}', query_steps='/v1/query-steps', query_steps_skip_take='/v1/query-steps?skip={0}&take={1}', create_steps='/v2/steps', delete_step='/v2/steps/{0}', delete_steps='/v2/delete-steps', delete_results='/v2/delete-results', list_report_files='/v2/reports', upload_report_for_result='/v2/results/{0}/upload', attach_report_to_result='/v2/results/{0}/attach', download_report='/v2/reports/{0}', delete_report='/v2/reports/{0}') |
extensions = ["sphinx-favicon"]
master_doc = "index"
exclude_patterns = ["_build"]
html_theme = "basic"
html_static_path = ["gfx"]
favicons = [
{
"sizes": "32x32",
"static-file": "square.svg",
},
{
"sizes": "128x128",
"static-file": "nested/triangle.svg",
},
]
| extensions = ['sphinx-favicon']
master_doc = 'index'
exclude_patterns = ['_build']
html_theme = 'basic'
html_static_path = ['gfx']
favicons = [{'sizes': '32x32', 'static-file': 'square.svg'}, {'sizes': '128x128', 'static-file': 'nested/triangle.svg'}] |
acceptall = [
"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Language: en-US,en;q=0.5\r\nAccept-Encoding: gzip, deflate\r\n",
"Accept-Encoding: gzip, deflate\r\n",
"Accept-Language: en-US,en;q=0.5\r\nAccept-Encoding: gzip, deflate\r\n",
"Accept: text/html, application/xhtml+xml, application/xml;q=0.9, */*;q=0.8\r\nAccept-Language: en-US,en;q=0.5\r\nAccept-Charset: iso-8859-1\r\nAccept-Encoding: gzip\r\n",
"Accept: application/xml,application/xhtml+xml,text/html;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5\r\nAccept-Charset: iso-8859-1\r\n",
"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Encoding: br;q=1.0, gzip;q=0.8, *;q=0.1\r\nAccept-Language: utf-8, iso-8859-1;q=0.5, *;q=0.1\r\nAccept-Charset: utf-8, iso-8859-1;q=0.5\r\n",
"Accept: image/jpeg, application/x-ms-application, image/gif, application/xaml+xml, image/pjpeg, application/x-ms-xbap, application/x-shockwave-flash, application/msword, */*\r\nAccept-Language: en-US,en;q=0.5\r\n",
"Accept: text/html, application/xhtml+xml, image/jxr, */*\r\nAccept-Encoding: gzip\r\nAccept-Charset: utf-8, iso-8859-1;q=0.5\r\nAccept-Language: utf-8, iso-8859-1;q=0.5, *;q=0.1\r\n",
"Accept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/webp, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1\r\nAccept-Encoding: gzip\r\nAccept-Language: en-US,en;q=0.5\r\nAccept-Charset: utf-8, iso-8859-1;q=0.5\r\n,"
"Accept: text/html, application/xhtml+xml, application/xml;q=0.9, */*;q=0.8\r\nAccept-Language: en-US,en;q=0.5\r\n",
"Accept-Charset: utf-8, iso-8859-1;q=0.5\r\nAccept-Language: utf-8, iso-8859-1;q=0.5, *;q=0.1\r\n",
"Accept: text/html, application/xhtml+xml",
"Accept-Language: en-US,en;q=0.5\r\n",
"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Encoding: br;q=1.0, gzip;q=0.8, *;q=0.1\r\n",
"Accept: text/plain;q=0.8,image/png,*/*;q=0.5\r\nAccept-Charset: iso-8859-1\r\n",
]
referers = [
"https://www.google.com/search?q=",
"https://check-host.net/",
"https://www.facebook.com/",
"https://www.youtube.com/",
"https://www.fbi.com/",
"https://www.bing.com/search?q=",
"https://r.search.yahoo.com/",
"https://www.cia.gov/index.html",
"https://vk.com/profile.php?redirect=",
"https://www.usatoday.com/search/results?q=",
"https://help.baidu.com/searchResult?keywords=",
"https://steamcommunity.com/market/search?q=",
"https://www.ted.com/search?q=",
"https://play.google.com/store/search?q=",
"https://www.qwant.com/search?q=",
"https://soda.demo.socrata.com/resource/4tka-6guv.json?$q=",
"https://www.google.ad/search?q=",
"https://www.google.ae/search?q=",
"https://www.google.com.af/search?q=",
"https://www.google.com.ag/search?q=",
"https://www.google.com.ai/search?q=",
"https://www.google.al/search?q=",
"https://www.google.am/search?q=",
"https://www.google.co.ao/search?q=",
]
post_data = ""
cookies = ""
| acceptall = ['Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Language: en-US,en;q=0.5\r\nAccept-Encoding: gzip, deflate\r\n', 'Accept-Encoding: gzip, deflate\r\n', 'Accept-Language: en-US,en;q=0.5\r\nAccept-Encoding: gzip, deflate\r\n', 'Accept: text/html, application/xhtml+xml, application/xml;q=0.9, */*;q=0.8\r\nAccept-Language: en-US,en;q=0.5\r\nAccept-Charset: iso-8859-1\r\nAccept-Encoding: gzip\r\n', 'Accept: application/xml,application/xhtml+xml,text/html;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5\r\nAccept-Charset: iso-8859-1\r\n', 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Encoding: br;q=1.0, gzip;q=0.8, *;q=0.1\r\nAccept-Language: utf-8, iso-8859-1;q=0.5, *;q=0.1\r\nAccept-Charset: utf-8, iso-8859-1;q=0.5\r\n', 'Accept: image/jpeg, application/x-ms-application, image/gif, application/xaml+xml, image/pjpeg, application/x-ms-xbap, application/x-shockwave-flash, application/msword, */*\r\nAccept-Language: en-US,en;q=0.5\r\n', 'Accept: text/html, application/xhtml+xml, image/jxr, */*\r\nAccept-Encoding: gzip\r\nAccept-Charset: utf-8, iso-8859-1;q=0.5\r\nAccept-Language: utf-8, iso-8859-1;q=0.5, *;q=0.1\r\n', 'Accept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/webp, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1\r\nAccept-Encoding: gzip\r\nAccept-Language: en-US,en;q=0.5\r\nAccept-Charset: utf-8, iso-8859-1;q=0.5\r\n,Accept: text/html, application/xhtml+xml, application/xml;q=0.9, */*;q=0.8\r\nAccept-Language: en-US,en;q=0.5\r\n', 'Accept-Charset: utf-8, iso-8859-1;q=0.5\r\nAccept-Language: utf-8, iso-8859-1;q=0.5, *;q=0.1\r\n', 'Accept: text/html, application/xhtml+xml', 'Accept-Language: en-US,en;q=0.5\r\n', 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Encoding: br;q=1.0, gzip;q=0.8, *;q=0.1\r\n', 'Accept: text/plain;q=0.8,image/png,*/*;q=0.5\r\nAccept-Charset: iso-8859-1\r\n']
referers = ['https://www.google.com/search?q=', 'https://check-host.net/', 'https://www.facebook.com/', 'https://www.youtube.com/', 'https://www.fbi.com/', 'https://www.bing.com/search?q=', 'https://r.search.yahoo.com/', 'https://www.cia.gov/index.html', 'https://vk.com/profile.php?redirect=', 'https://www.usatoday.com/search/results?q=', 'https://help.baidu.com/searchResult?keywords=', 'https://steamcommunity.com/market/search?q=', 'https://www.ted.com/search?q=', 'https://play.google.com/store/search?q=', 'https://www.qwant.com/search?q=', 'https://soda.demo.socrata.com/resource/4tka-6guv.json?$q=', 'https://www.google.ad/search?q=', 'https://www.google.ae/search?q=', 'https://www.google.com.af/search?q=', 'https://www.google.com.ag/search?q=', 'https://www.google.com.ai/search?q=', 'https://www.google.al/search?q=', 'https://www.google.am/search?q=', 'https://www.google.co.ao/search?q=']
post_data = ''
cookies = '' |
# region headers
# escript-template v20190605 / stephane.bourdeaud@nutanix.com
# * author: Geluykens, Andy <Andy.Geluykens@pfizer.com>
# * version: 2019/06/05
# task_name: RubrikGetSlaDomainId
# description: This script gets the id of the specified Rubrik SLA domain.
# endregion
# region capture Calm macros
username = '@@{rubrik.username}@@'
username_secret = "@@{rubrik.secret}@@"
api_server = "@@{rubrik_ip}@@"
sla_domain = "@@{sla_domain}@@"
# endregion
# region Get Rubrik SLA domain ID
api_server_port = "443"
api_server_endpoint = "/api/v1/sla_domain?name={}".format(sla_domain)
url = "https://{}:{}{}".format(
api_server,
api_server_port,
api_server_endpoint
)
method = "GET"
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
print("Making a {} API call to {}".format(method, url))
resp = urlreq(
url,
verb=method,
auth='BASIC',
user=username,
passwd=username_secret,
headers=headers,
verify=False
)
if resp.ok:
json_resp = json.loads(resp.content)
sla_domain_id = json_resp['data'][0]['id']
print("rubrik_sla_domain_id={}".format(sla_domain_id))
exit(0)
else:
print("Request failed")
print("Headers: {}".format(headers))
print('Status code: {}'.format(resp.status_code))
print('Response: {}'.format(json.dumps(json.loads(resp.content), indent=4)))
exit(1)
# endregion
| username = '@@{rubrik.username}@@'
username_secret = '@@{rubrik.secret}@@'
api_server = '@@{rubrik_ip}@@'
sla_domain = '@@{sla_domain}@@'
api_server_port = '443'
api_server_endpoint = '/api/v1/sla_domain?name={}'.format(sla_domain)
url = 'https://{}:{}{}'.format(api_server, api_server_port, api_server_endpoint)
method = 'GET'
headers = {'Content-Type': 'application/json', 'Accept': 'application/json'}
print('Making a {} API call to {}'.format(method, url))
resp = urlreq(url, verb=method, auth='BASIC', user=username, passwd=username_secret, headers=headers, verify=False)
if resp.ok:
json_resp = json.loads(resp.content)
sla_domain_id = json_resp['data'][0]['id']
print('rubrik_sla_domain_id={}'.format(sla_domain_id))
exit(0)
else:
print('Request failed')
print('Headers: {}'.format(headers))
print('Status code: {}'.format(resp.status_code))
print('Response: {}'.format(json.dumps(json.loads(resp.content), indent=4)))
exit(1) |
class Animal:
def __init__(self, name): # Constructor of the class
self.name = name
def speak(self): # Abstract method, defined by convention only
raise NotImplementedError("Subclass must implement abstract method")
class Dog(Animal):
def speak(self):
return self.name+' says Woof!'
class Cat(Animal):
def speak(self):
return self.name+' says Meow!'
fido = Dog('Fido')
isis = Cat('Isis')
print(fido.speak())
print(isis.speak())
# In this example, the derived classes did not need their own __init__ methods
# because the base class __init__ gets called automatically
# if you do define an __init__ in the derived class, this will override the base
#* Multiple inheritance
class Computer:
def __init__(self,battery):
self.battery = battery
class Mac(Computer):
def __init__(self, OS="MacOS", HW="proprietary",battery="LiIon"):
self.OS = OS
self.HW = HW
self.battery = battery
def run_mac_os(self):
print("MacOS is running now")
def mac_charge(self):
print("Chargig via USB C")
class PC(Computer):
def __init__(self, OS="Windows", HW="assembled", battery="LiAmber"):
self.OS = OS
self.HW = HW
self.battery = battery
def run_windows_os(self):
print("Windows is running now")
def pc_charge(self):
print("Chargig via brick charger")
class hackintosh(Mac,PC):
def __init__(self,OS = "Linux", HW="Assembled and modified", battery="Combined"):
Mac.__init__(self, OS, HW, battery="LiIon")
PC.__init__(self,OS,HW,battery="LiAmber")
hck1 = hackintosh()
print(hck1.HW)
print(hck1.OS)
print(hck1.battery)
hck1.mac_charge()
hck1.run_mac_os()
hck1.pc_charge()
hck1.run_windows_os()
#* Super keyword
#* super() function provides a shortcut for calling base classes
#* it automatically follows Method Resolution Order.
class MyBaseClass:
def __init__(self,x,y):
self.x = x
self.y = y
class MyDerivedClass(MyBaseClass):
def __init__(self,x,y,z):
super().__init__(x,y)
self.z = z | class Animal:
def __init__(self, name):
self.name = name
def speak(self):
raise not_implemented_error('Subclass must implement abstract method')
class Dog(Animal):
def speak(self):
return self.name + ' says Woof!'
class Cat(Animal):
def speak(self):
return self.name + ' says Meow!'
fido = dog('Fido')
isis = cat('Isis')
print(fido.speak())
print(isis.speak())
class Computer:
def __init__(self, battery):
self.battery = battery
class Mac(Computer):
def __init__(self, OS='MacOS', HW='proprietary', battery='LiIon'):
self.OS = OS
self.HW = HW
self.battery = battery
def run_mac_os(self):
print('MacOS is running now')
def mac_charge(self):
print('Chargig via USB C')
class Pc(Computer):
def __init__(self, OS='Windows', HW='assembled', battery='LiAmber'):
self.OS = OS
self.HW = HW
self.battery = battery
def run_windows_os(self):
print('Windows is running now')
def pc_charge(self):
print('Chargig via brick charger')
class Hackintosh(Mac, PC):
def __init__(self, OS='Linux', HW='Assembled and modified', battery='Combined'):
Mac.__init__(self, OS, HW, battery='LiIon')
PC.__init__(self, OS, HW, battery='LiAmber')
hck1 = hackintosh()
print(hck1.HW)
print(hck1.OS)
print(hck1.battery)
hck1.mac_charge()
hck1.run_mac_os()
hck1.pc_charge()
hck1.run_windows_os()
class Mybaseclass:
def __init__(self, x, y):
self.x = x
self.y = y
class Myderivedclass(MyBaseClass):
def __init__(self, x, y, z):
super().__init__(x, y)
self.z = z |
'''
You are given a spreadsheet that contains a list of N athletes and their details (such as age, height, weight and so on). You are required to sort the data based on the Kth attribute and print the final resulting table. Follow the example given below for better understanding.
image
Note that K is indexed from 0 to M-1, where M is the number of attributes.
Note: If two attributes are the same for different rows, for example, if two atheletes are of the same age, print the row that appeared first in the input.
Input Format
The first line contains N and M separated by a space.
The next lines each contain M elements.
The last line contains K.
Output Format
Print the lines of the sorted table. Each line should contain the space separated elements. Check the sample below for clarity.
Sample Input 0
5 3
10 2 5
7 1 0
9 9 9
1 23 12
6 5 9
1
Sample Output 0
7 1 0
10 2 5
6 5 9
9 9 9
1 23 12
Explanation 0
The details are sorted based on the second attribute, since K is zero-indexed.
'''
#!/bin/python3
def sortingCriteria(arr):
return arr[k]
def athleteSort(athleteList): # global?
athleteList.sort(key=sortingCriteria)
return athleteList
if __name__ == '__main__':
nm = input().rstrip().split()
n = int(nm[0])
m = int(nm[1])
arr = []
for x in range(n):
arr.append(list(map(int, input().rstrip().split())))
k = int(input().rstrip())
result = athleteSort(arr)
for athlete in result:
print(' '.join(map(str, athlete)))
| """
You are given a spreadsheet that contains a list of N athletes and their details (such as age, height, weight and so on). You are required to sort the data based on the Kth attribute and print the final resulting table. Follow the example given below for better understanding.
image
Note that K is indexed from 0 to M-1, where M is the number of attributes.
Note: If two attributes are the same for different rows, for example, if two atheletes are of the same age, print the row that appeared first in the input.
Input Format
The first line contains N and M separated by a space.
The next lines each contain M elements.
The last line contains K.
Output Format
Print the lines of the sorted table. Each line should contain the space separated elements. Check the sample below for clarity.
Sample Input 0
5 3
10 2 5
7 1 0
9 9 9
1 23 12
6 5 9
1
Sample Output 0
7 1 0
10 2 5
6 5 9
9 9 9
1 23 12
Explanation 0
The details are sorted based on the second attribute, since K is zero-indexed.
"""
def sorting_criteria(arr):
return arr[k]
def athlete_sort(athleteList):
athleteList.sort(key=sortingCriteria)
return athleteList
if __name__ == '__main__':
nm = input().rstrip().split()
n = int(nm[0])
m = int(nm[1])
arr = []
for x in range(n):
arr.append(list(map(int, input().rstrip().split())))
k = int(input().rstrip())
result = athlete_sort(arr)
for athlete in result:
print(' '.join(map(str, athlete))) |
# Copyright 2019 BlueCat Networks. All rights reserved.
# -*- coding: utf-8 -*-
type = 'ui'
sub_pages = [
{
'name' : 'cmdb_routers_page',
'title' : u'CMDB Routers',
'endpoint' : 'cmdb_routers/cmdb_routers_endpoint',
'description' : u'cmdb_routers'
},
]
| type = 'ui'
sub_pages = [{'name': 'cmdb_routers_page', 'title': u'CMDB Routers', 'endpoint': 'cmdb_routers/cmdb_routers_endpoint', 'description': u'cmdb_routers'}] |
__title__ = "mathy_core"
__version__ = "0.8.4"
__summary__ = "Computer Algebra System for working with math expressions"
__uri__ = "https://mathy.ai"
__author__ = "Justin DuJardin"
__email__ = "justin@dujardinconsulting.com"
__license__ = "All rights reserved"
| __title__ = 'mathy_core'
__version__ = '0.8.4'
__summary__ = 'Computer Algebra System for working with math expressions'
__uri__ = 'https://mathy.ai'
__author__ = 'Justin DuJardin'
__email__ = 'justin@dujardinconsulting.com'
__license__ = 'All rights reserved' |
class ContactHelper:
def __init__(self, app):
self.app = app
def open_contacts_page(self):
wd = self.app.wd
if not (wd.current_url.endswith("/group.php") and len (wd.find_elements_by_name("new"))) > 0:
wd.find_element_by_link_text("home").click()
def create(self, contact):
wd = self.app.wd
self.open_contacts_page()
# init contact_add
wd.find_element_by_link_text("add new").click()
self.fill_contact_form(contact)
wd.find_element_by_xpath("//div[@id='content']/form/input[21]").click()
def change_field_value(self, field_name, text):
wd = self.app.wd
if text is not None:
wd.find_element_by_name(field_name).click()
wd.find_element_by_name(field_name).clear()
wd.find_element_by_name(field_name).send_keys(text)
def fill_contact_form(self, contact):
wd = self.app.wd
self.change_field_value("firstname", contact.name)
self.change_field_value("middlename", contact.midname)
self.change_field_value("lastname", contact.lastname)
self.change_field_value("nickname", contact.nickname)
self.change_field_value("company", contact.company)
def test_select_first_contact(self):
wd = self.app.wd
self.open_contacts_page()
# choose check box
wd.find_element_by_name("selected[]").click()
def test_del_first_contact(self):
wd = self.app.wd
self.open_contacts_page()
# choose check box
self.test_select_first_contact()
wd.find_element_by_xpath("//div[@id='content']/form[2]/div[2]/input").click()
wd.switch_to_alert().accept()
def test_modify_first_contact(self, contact):
wd = self.app.wd
self.open_contacts_page()
# choose first contact
wd.find_element_by_xpath("//table[@id='maintable']/tbody/tr[2]/td[8]/a/img").click()
# fill contact
self.fill_contact_form(contact)
# click submit
wd.find_element_by_xpath("//div[@id='content']/form[1]/input[22]").click()
def count(self):
wd = self.app.wd
self.open_contacts_page()
return len(wd.find_elements_by_name("selected[]"))
| class Contacthelper:
def __init__(self, app):
self.app = app
def open_contacts_page(self):
wd = self.app.wd
if not (wd.current_url.endswith('/group.php') and len(wd.find_elements_by_name('new'))) > 0:
wd.find_element_by_link_text('home').click()
def create(self, contact):
wd = self.app.wd
self.open_contacts_page()
wd.find_element_by_link_text('add new').click()
self.fill_contact_form(contact)
wd.find_element_by_xpath("//div[@id='content']/form/input[21]").click()
def change_field_value(self, field_name, text):
wd = self.app.wd
if text is not None:
wd.find_element_by_name(field_name).click()
wd.find_element_by_name(field_name).clear()
wd.find_element_by_name(field_name).send_keys(text)
def fill_contact_form(self, contact):
wd = self.app.wd
self.change_field_value('firstname', contact.name)
self.change_field_value('middlename', contact.midname)
self.change_field_value('lastname', contact.lastname)
self.change_field_value('nickname', contact.nickname)
self.change_field_value('company', contact.company)
def test_select_first_contact(self):
wd = self.app.wd
self.open_contacts_page()
wd.find_element_by_name('selected[]').click()
def test_del_first_contact(self):
wd = self.app.wd
self.open_contacts_page()
self.test_select_first_contact()
wd.find_element_by_xpath("//div[@id='content']/form[2]/div[2]/input").click()
wd.switch_to_alert().accept()
def test_modify_first_contact(self, contact):
wd = self.app.wd
self.open_contacts_page()
wd.find_element_by_xpath("//table[@id='maintable']/tbody/tr[2]/td[8]/a/img").click()
self.fill_contact_form(contact)
wd.find_element_by_xpath("//div[@id='content']/form[1]/input[22]").click()
def count(self):
wd = self.app.wd
self.open_contacts_page()
return len(wd.find_elements_by_name('selected[]')) |
# some sample
PROJECT_NAME = "My Application"
APPLICATION_SENTENCE = "Hello Django"
# add apps into project read after settings.py
# append application into lists
# INSTALLED_APPS.append('my_application')
# MIDDLEWARE.append('my_application.middleware.MyApplicationMiddleware')
# add an application
INSTALLED_APPS.append("myapplication.apps.MyapplicationConfig")
| project_name = 'My Application'
application_sentence = 'Hello Django'
INSTALLED_APPS.append('myapplication.apps.MyapplicationConfig') |
__all__=["declare_reproducible"]
def declare_reproducible(SEED = 123):
'''
https://github.com/NVIDIA/framework-determinism/blob/master/pytorch.md
'''
# or whatever you choose
try :
random.seed(SEED) # if you're using random
except :
pass
try :
np.random.seed(SEED) # if you're using numpy
except :
pass
try :
torch.manual_seed(SEED) # torch.cuda.manual_seed_all(SEED) is not required
torch.backends.cudnn.deterministic = True
torch.backends.cudnn.benchmark = False
except :
pass
try :
tf.set_random_seed(1234)
except :
pass
declare_reproducible() | __all__ = ['declare_reproducible']
def declare_reproducible(SEED=123):
"""
https://github.com/NVIDIA/framework-determinism/blob/master/pytorch.md
"""
try:
random.seed(SEED)
except:
pass
try:
np.random.seed(SEED)
except:
pass
try:
torch.manual_seed(SEED)
torch.backends.cudnn.deterministic = True
torch.backends.cudnn.benchmark = False
except:
pass
try:
tf.set_random_seed(1234)
except:
pass
declare_reproducible() |
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:'
}
}
SECRET_KEY = 'supersecret'
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'nonrelated_inlines.tests.testapp'
]
ROOT_URLCONF = 'nonrelated_inlines.tests.urls'
MIDDLEWARE = [
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware'
]
TEMPLATES = [{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'APP_DIRS': True,
}]
| databases = {'default': {'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:'}}
secret_key = 'supersecret'
installed_apps = ['django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'nonrelated_inlines.tests.testapp']
root_urlconf = 'nonrelated_inlines.tests.urls'
middleware = ['django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware']
templates = [{'BACKEND': 'django.template.backends.django.DjangoTemplates', 'APP_DIRS': True}] |
class Solution:
def buildTree(self, preorder, inorder):
if not inorder:
return None
root_val = preorder[0]
index = inorder.index(root_val)
left_tree = self.buildTree(preorder[1:index + 1], inorder[:index])
right_tree = self.buildTree(preorder[index + 1:], inorder[index + 1:])
root = TreeNode(root_val)
root.left = left_tree
root.right = right_tree
return root
| class Solution:
def build_tree(self, preorder, inorder):
if not inorder:
return None
root_val = preorder[0]
index = inorder.index(root_val)
left_tree = self.buildTree(preorder[1:index + 1], inorder[:index])
right_tree = self.buildTree(preorder[index + 1:], inorder[index + 1:])
root = tree_node(root_val)
root.left = left_tree
root.right = right_tree
return root |
num1 = int(input())
num2 = int(input())
print(f'X = {num1 + num2}')
| num1 = int(input())
num2 = int(input())
print(f'X = {num1 + num2}') |
def PeptideMasses(PeptideMassesSummaryFileName, PeptidesListFileLocation):
# 'amino acid', monoisotopic residue mass, average residue mass
AAResidueMassData = {'A':('Ala', 71.037114, 71.0779),
'C':('Cys', 103.009185, 103.1429),
'D':('Asp', 115.026943, 115.0874),
'E':('Glu', 129.042593, 129.114),
'F':('Phe', 147.068414, 147.1739),
'G':('Gly', 57.021464, 57.0513),
'H':('His', 137.058912, 137.1393),
'I':('Ile', 113.084064, 113.1576),
'K':('Lys', 128.094963, 128.1723),
'L':('Leu', 113.084064, 113.1576),
'M':('Met', 131.040485, 131.1961),
'N':('Asn', 114.042927, 114.1026),
'P':('Pro', 97.052764, 97.1152),
'Q':('Gln', 128.058578, 128.1292),
'R':('Arg', 156.101111, 156.1857),
'S':('Ser', 87.032028, 87.0773),
'T':('Thr', 101.047679, 101.1039),
'V':('Val', 99.068414, 99.1311),
'W':('Trp', 186.079313, 186.2099),
'Y':('Tyr', 163.06332, 163.1733),
'y':('D-Tyr', 163.06332, 163.1733),
'X':('HONH-Glu',144.05349, 144.1300),
'Z':('HONH-ASub',186.10044, 186.2110)
}
PeptidesListFile = open(PeptidesListFileLocation, 'r')
Lines = PeptidesListFile.readlines()
PeptidesListFile.close
# print Lines
PeptideMassesFile = open(PeptideMassesSummaryFileName, 'w')
PeptideMassesFile.write('#' + ',' +
'peptide' + ',' +
'MI linear (Da)' + ',' +
'A linear (Da)' + ',' +
'MI cyclic (Da)' + ',' +
'A cyclic (Da)' + ',' +
'Ext 280nm (1/M*cm)''\n')
PeptideNumber = 0
for Line in Lines:
Peptide = Line.strip('\n')
PeptideNumber += 1
LinearPeptideMIM = 17.02655
LinearPeptideAM = 17.0310
CysExt = 110.0
TrpExt = 5630.0
TyrExt = 1215.0
#uses the data from this paper http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2143013/pdf/8563639.pdf
#alternatively these data can be used http://www.rpgroup.caltech.edu/courses/aph162/2007/pdf/articles/Gill1989.pdf
CysCount = 0
TrpCount = 0
TyrCount = 0
for i in range(len(Peptide)):
LinearPeptideMIM += AAResidueMassData[Peptide[i]][1]
LinearPeptideAM += AAResidueMassData[Peptide[i]][2]
if Peptide[i] == 'C':
CysCount += 1
elif Peptide[i] == 'W':
TrpCount += 1
elif Peptide[i] == 'Y' or Peptide[i] == 'y':
TyrCount += 1
CyclicPeptideMIM = LinearPeptideMIM + 42.01056
#print MICyclic
CyclicPeptideAM = LinearPeptideAM + 42.0370
#print ACyclic
PeptideExt = CysCount * CysExt + TrpCount *TrpExt + TyrCount * TyrExt
#
PeptideMassesFile.write(str(PeptideNumber) + ',' +
Peptide + ',' +
'{:.2f}'.format(LinearPeptideMIM) + ',' +
'{:.2f}'.format(LinearPeptideAM) + ',' +
'{:.2f}'.format(CyclicPeptideMIM) + ',' +
'{:.2f}'.format(CyclicPeptideAM) + ',' +
'{:.0f}'.format(PeptideExt) + '\n')
PeptideMassesFile.close
#_____________________________RUNNING THE FUNCTION_____________________________#
#___PeptideMassesSummaryFileName, PeptidesListFileLocation___
PeptideMasses('CloneMasses Result Test.csv', '/Users/NikitaLoik/CloneSynthesis.txt') | def peptide_masses(PeptideMassesSummaryFileName, PeptidesListFileLocation):
aa_residue_mass_data = {'A': ('Ala', 71.037114, 71.0779), 'C': ('Cys', 103.009185, 103.1429), 'D': ('Asp', 115.026943, 115.0874), 'E': ('Glu', 129.042593, 129.114), 'F': ('Phe', 147.068414, 147.1739), 'G': ('Gly', 57.021464, 57.0513), 'H': ('His', 137.058912, 137.1393), 'I': ('Ile', 113.084064, 113.1576), 'K': ('Lys', 128.094963, 128.1723), 'L': ('Leu', 113.084064, 113.1576), 'M': ('Met', 131.040485, 131.1961), 'N': ('Asn', 114.042927, 114.1026), 'P': ('Pro', 97.052764, 97.1152), 'Q': ('Gln', 128.058578, 128.1292), 'R': ('Arg', 156.101111, 156.1857), 'S': ('Ser', 87.032028, 87.0773), 'T': ('Thr', 101.047679, 101.1039), 'V': ('Val', 99.068414, 99.1311), 'W': ('Trp', 186.079313, 186.2099), 'Y': ('Tyr', 163.06332, 163.1733), 'y': ('D-Tyr', 163.06332, 163.1733), 'X': ('HONH-Glu', 144.05349, 144.13), 'Z': ('HONH-ASub', 186.10044, 186.211)}
peptides_list_file = open(PeptidesListFileLocation, 'r')
lines = PeptidesListFile.readlines()
PeptidesListFile.close
peptide_masses_file = open(PeptideMassesSummaryFileName, 'w')
PeptideMassesFile.write('#' + ',' + 'peptide' + ',' + 'MI linear (Da)' + ',' + 'A linear (Da)' + ',' + 'MI cyclic (Da)' + ',' + 'A cyclic (Da)' + ',' + 'Ext 280nm (1/M*cm)\n')
peptide_number = 0
for line in Lines:
peptide = Line.strip('\n')
peptide_number += 1
linear_peptide_mim = 17.02655
linear_peptide_am = 17.031
cys_ext = 110.0
trp_ext = 5630.0
tyr_ext = 1215.0
cys_count = 0
trp_count = 0
tyr_count = 0
for i in range(len(Peptide)):
linear_peptide_mim += AAResidueMassData[Peptide[i]][1]
linear_peptide_am += AAResidueMassData[Peptide[i]][2]
if Peptide[i] == 'C':
cys_count += 1
elif Peptide[i] == 'W':
trp_count += 1
elif Peptide[i] == 'Y' or Peptide[i] == 'y':
tyr_count += 1
cyclic_peptide_mim = LinearPeptideMIM + 42.01056
cyclic_peptide_am = LinearPeptideAM + 42.037
peptide_ext = CysCount * CysExt + TrpCount * TrpExt + TyrCount * TyrExt
PeptideMassesFile.write(str(PeptideNumber) + ',' + Peptide + ',' + '{:.2f}'.format(LinearPeptideMIM) + ',' + '{:.2f}'.format(LinearPeptideAM) + ',' + '{:.2f}'.format(CyclicPeptideMIM) + ',' + '{:.2f}'.format(CyclicPeptideAM) + ',' + '{:.0f}'.format(PeptideExt) + '\n')
PeptideMassesFile.close
peptide_masses('CloneMasses Result Test.csv', '/Users/NikitaLoik/CloneSynthesis.txt') |
# Multiplying strings and accessing characters within them
# You can print a string multiple times by... multiplying it!
print("-" * 10)
# Since strings are basically a list, you can also access characters
# or ranges of characters by indexing into them
name = "Phil Hinton"
print(f"Name: {name}")
# First character
print(name[0])
| print('-' * 10)
name = 'Phil Hinton'
print(f'Name: {name}')
print(name[0]) |
# TWITTER
ACCESS_KEY = (" ")
ACCESS_SECRET = (" ")
CONSUMER_KEY = (" ")
CONSUMER_SECRET = (" ")
BEARER_TOKEN = (" ")
# TELEGRAM
API_KEY = (" ")
BOT_CHAT_ID = (" ")
# DISCORD
APPLICATION_ID = (" ")
PUBLIC_KEY = (" ")
CLIENT_ID = (" ")
CLIENT_SECRET = (" ")
TOKEN = (" ")
invite_url = (" ")
# tweets baixados
tweets = []
# numero de tweets baixados
number = 0 | access_key = ' '
access_secret = ' '
consumer_key = ' '
consumer_secret = ' '
bearer_token = ' '
api_key = ' '
bot_chat_id = ' '
application_id = ' '
public_key = ' '
client_id = ' '
client_secret = ' '
token = ' '
invite_url = ' '
tweets = []
number = 0 |
SESSION_EXPIRED = "Session expired. Please log in again."
NETWORK_ERROR_MESSAGE = (
"Network error. Please check your connection and try again."
)
AUTH_SERVER_ERROR = (
"A problem occured while trying to authenticate with divio.com. "
"Please try again later"
)
SERVER_ERROR = (
"A problem occured while trying to communicate with divio.com. "
"Please try again later"
)
AUTH_INVALID_TOKEN = "Login failed. Invalid token specified"
RESOURCE_NOT_FOUND_ANONYMOUS = "Resource not found"
RESOURCE_NOT_FOUND = "Resource not found. You are logged in as '{login}', please check if you have permissions to access the ressource"
LOGIN_SUCCESSFUL = (
u"Welcome to Divio Cloud. You are now logged in as {greeting}"
)
CONFIG_FILE_NOT_FOUND = u"Config file could not be not found at location: {}"
FILE_NOT_FOUND = u"File could not be found: {}"
INVALID_DB_SUBMITTED = (
"The database dump you have uploaded contains an error. "
"Please check the file 'db_upload.log' for errors and try again"
)
LOGIN_CHECK_SUCCESSFUL = (
"Authentication with server successful. You are logged in."
)
LOGIN_CHECK_ERROR = (
"You are currently not logged in, " "please log in using `divio login`."
)
PUSH_DB_WARNING = "\n".join(
(
"WARNING",
"=======",
"\nYou are about to push your local database to the {stage} server on ",
"the Divio Cloud. This will replace ALL data on the Divio Cloud {stage} ",
"server with the data you are about to push, including (but not limited to):",
" - User accounts",
" - CMS Pages & Plugins",
"\nYou will also lose any changes that have been made on the {stage} ",
"server since you pulled its database to your local environment. ",
"\nIt is recommended to go the project settings on control.divio.com",
"and take a backup before restoring the database. You can find this ",
'action in the "Manage Project" section.',
"\nPlease proceed with caution!",
)
)
PUSH_MEDIA_WARNING = "\n".join(
(
"WARNING",
"=======",
"\nYou are about to push your local media files to the {stage} server on ",
"the Divio Cloud. This will replace ALL existing media files with the ",
"ones you are about to push.",
"\nYou will also lose any changes that have been made on the {stage} ",
"server since you pulled its files to your local environment. ",
"\nIt is recommended to go the project settings on control.divio.com",
"and take a backup before restoring media files. You can find this ",
'action in the "Manage Project" section.',
"\nPlease proceed with caution!",
)
)
| session_expired = 'Session expired. Please log in again.'
network_error_message = 'Network error. Please check your connection and try again.'
auth_server_error = 'A problem occured while trying to authenticate with divio.com. Please try again later'
server_error = 'A problem occured while trying to communicate with divio.com. Please try again later'
auth_invalid_token = 'Login failed. Invalid token specified'
resource_not_found_anonymous = 'Resource not found'
resource_not_found = "Resource not found. You are logged in as '{login}', please check if you have permissions to access the ressource"
login_successful = u'Welcome to Divio Cloud. You are now logged in as {greeting}'
config_file_not_found = u'Config file could not be not found at location: {}'
file_not_found = u'File could not be found: {}'
invalid_db_submitted = "The database dump you have uploaded contains an error. Please check the file 'db_upload.log' for errors and try again"
login_check_successful = 'Authentication with server successful. You are logged in.'
login_check_error = 'You are currently not logged in, please log in using `divio login`.'
push_db_warning = '\n'.join(('WARNING', '=======', '\nYou are about to push your local database to the {stage} server on ', 'the Divio Cloud. This will replace ALL data on the Divio Cloud {stage} ', 'server with the data you are about to push, including (but not limited to):', ' - User accounts', ' - CMS Pages & Plugins', '\nYou will also lose any changes that have been made on the {stage} ', 'server since you pulled its database to your local environment. ', '\nIt is recommended to go the project settings on control.divio.com', 'and take a backup before restoring the database. You can find this ', 'action in the "Manage Project" section.', '\nPlease proceed with caution!'))
push_media_warning = '\n'.join(('WARNING', '=======', '\nYou are about to push your local media files to the {stage} server on ', 'the Divio Cloud. This will replace ALL existing media files with the ', 'ones you are about to push.', '\nYou will also lose any changes that have been made on the {stage} ', 'server since you pulled its files to your local environment. ', '\nIt is recommended to go the project settings on control.divio.com', 'and take a backup before restoring media files. You can find this ', 'action in the "Manage Project" section.', '\nPlease proceed with caution!')) |
class FileType:
CSV = 'csv'
XLSX = 'xlsx'
JSON = 'json'
XML = 'xml' | class Filetype:
csv = 'csv'
xlsx = 'xlsx'
json = 'json'
xml = 'xml' |
# encoding: UTF-8
def remove_chinese(str):
s = ""
for w in str:
if w >= u'\u4e00' and w <= u'\u9fa5':
continue
s += w
return s
def remove_non_numerical(s):
f = ''
for i in range(len(s)):
try:
f = float(s[:i+1])
except:
return f
return str(f) | def remove_chinese(str):
s = ''
for w in str:
if w >= u'一' and w <= u'龥':
continue
s += w
return s
def remove_non_numerical(s):
f = ''
for i in range(len(s)):
try:
f = float(s[:i + 1])
except:
return f
return str(f) |
# Link: https://leetcode.com/problems/search-in-rotated-sorted-array/
# Time: O(LogN)
# Space: O(1)
# As the given array is rotated sorted, binary search cannot be applied directly.
def search(nums, target):
start, end = 0, len(nums) - 1
while start <= end:
mid = (start + end) // 2
if target == nums[mid]:
return mid
if nums[start] <= nums[mid]: # the array is sorted from start to mid.
if nums[start] <= target < nums[mid]:
# as the target lies between start and mid, reduce the search window.
end = mid - 1
else:
# if target does not lie between start and mid, search from (mid + 1) - end.
start = mid + 1
else: # here the array is sorted from mid to end.
if nums[mid] < target <= nums[end]:
# as the target lies between mid and end, reduce the search window.
start = mid + 1
else:
# the target does not lie between mid and end, search from start - (mid - 1)
end = mid - 1
return -1
def main():
nums = [3, 5, 1]
target = 3
print(search(nums, target))
if __name__ == "__main__":
main()
| def search(nums, target):
(start, end) = (0, len(nums) - 1)
while start <= end:
mid = (start + end) // 2
if target == nums[mid]:
return mid
if nums[start] <= nums[mid]:
if nums[start] <= target < nums[mid]:
end = mid - 1
else:
start = mid + 1
elif nums[mid] < target <= nums[end]:
start = mid + 1
else:
end = mid - 1
return -1
def main():
nums = [3, 5, 1]
target = 3
print(search(nums, target))
if __name__ == '__main__':
main() |
class Sequence:
transcription_table = {'A':'U', 'T':'A', 'C':'G' , 'G':'C'}
enz_dict = {'EcoRI':'GAATTC', 'EcoRV':'GATATC'}
def __init__(self, seqstring):
self.seqstring = seqstring.upper()
def restriction(self, enz):
try:
enz_target = Sequence.enz_dict[enz]
return self.seqstring.count(enz_target)
except KeyError:
return 0
def transcription(self):
tt = ""
for letter in self.seqstring:
if letter in 'ATCG':
tt += self.transcription_table[letter]
return tt
| class Sequence:
transcription_table = {'A': 'U', 'T': 'A', 'C': 'G', 'G': 'C'}
enz_dict = {'EcoRI': 'GAATTC', 'EcoRV': 'GATATC'}
def __init__(self, seqstring):
self.seqstring = seqstring.upper()
def restriction(self, enz):
try:
enz_target = Sequence.enz_dict[enz]
return self.seqstring.count(enz_target)
except KeyError:
return 0
def transcription(self):
tt = ''
for letter in self.seqstring:
if letter in 'ATCG':
tt += self.transcription_table[letter]
return tt |
class Messages:
USERS_1 = 'Username already exists.'
USERS_2 = 'Email already exists.'
USERS_3 = 'Password and Confirm Password must be same.'
USERS_4 = 'Username or Password is incorrect.'
USERS_5 = 'Your email address is not verified.'
TOKENS_1 = 'Token does not exist.'
TOKENS_2 = 'User does not exist.'
TOKENS_3 = 'Your email has been verified.'
| class Messages:
users_1 = 'Username already exists.'
users_2 = 'Email already exists.'
users_3 = 'Password and Confirm Password must be same.'
users_4 = 'Username or Password is incorrect.'
users_5 = 'Your email address is not verified.'
tokens_1 = 'Token does not exist.'
tokens_2 = 'User does not exist.'
tokens_3 = 'Your email has been verified.' |
class PageEffectiveImageMixin(object):
def get_effective_image(self):
if self.image:
return self.image
page = self.get_main_language_page()
if page.specific.image:
return page.specific.get_effective_image()
return ''
| class Pageeffectiveimagemixin(object):
def get_effective_image(self):
if self.image:
return self.image
page = self.get_main_language_page()
if page.specific.image:
return page.specific.get_effective_image()
return '' |
# /home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser_tables.py
# This file is automatically generated. Do not edit.
_tabversion = '3.2'
_lr_method = 'LALR'
_lr_signature = '`\xa3O\x17\xd6C\xd4E2\xb5\xf60wIM\xd9'
_lr_action_items = {'TAKING_TOK':([142,161,187,216,],[-66,188,-66,240,]),'LP_TOK':([18,32,43,65,73,85,88,95,111,112,124,125,128,132,144,150,158,162,165,170,171,179,180,181,182,183,184,185,189,192,193,196,197,199,204,205,206,207,210,212,214,218,219,220,224,225,226,231,233,234,235,236,238,239,244,245,251,253,254,255,257,258,260,266,268,269,272,273,275,276,278,279,283,284,289,292,295,296,300,301,304,307,308,310,312,],[32,43,65,65,43,65,43,111,43,43,-94,43,-79,43,-111,-32,43,43,192,43,43,-91,-51,-76,-50,-11,212,43,43,43,-38,43,43,226,231,43,-51,-50,43,43,-57,-33,-37,-36,-31,-21,43,43,-59,43,-108,255,43,43,-40,-34,266,43,-11,43,-11,-11,-30,43,-11,-60,-52,-25,-56,-16,-39,43,-53,-58,-61,43,-54,-63,-35,-55,43,-11,-65,-62,-64,]),'FOREACH_TOK':([61,],[79,]),'AS_TOK':([256,267,285,294,],[271,271,271,271,]),'ANONYMOUS_VAR_TOK':([32,43,65,66,73,85,88,100,106,111,112,124,125,128,132,144,150,158,162,170,171,179,181,183,185,189,192,193,196,197,205,210,212,214,218,219,220,224,225,226,231,233,234,235,238,239,244,245,253,254,255,257,258,260,266,268,269,272,273,275,276,278,279,283,284,289,292,295,296,300,301,304,307,308,310,312,],[46,46,46,46,46,46,46,46,46,46,46,-94,46,-79,46,-111,-32,46,46,46,46,-91,-76,-11,46,46,46,-38,46,46,46,46,46,-57,-33,-37,-36,-31,-21,46,46,-59,46,-108,46,46,-40,-34,46,-11,46,-11,-11,-30,46,-11,-60,-52,-25,-56,-16,-39,46,-53,-58,-61,46,-54,-63,-35,-55,46,-11,-65,-62,-64,]),'NUMBER_TOK':([32,43,65,73,85,88,111,112,124,125,128,132,144,150,158,162,170,171,179,181,183,185,189,192,193,196,197,205,210,212,214,218,219,220,224,225,226,231,233,234,235,238,239,244,245,253,254,255,257,258,260,266,268,269,272,273,274,275,276,278,279,283,284,289,292,295,296,300,301,304,307,308,310,312,],[44,44,44,44,44,44,44,44,-94,44,-79,44,-111,-32,44,44,44,44,-91,-76,-11,44,44,44,-38,44,44,44,44,44,-57,-33,-37,-36,-31,-21,44,44,-59,44,-108,44,44,-40,-34,44,-11,44,-11,-11,-30,44,-11,-60,-52,-25,288,-56,-16,-39,44,-53,-58,-61,44,-54,-63,-35,-55,44,-11,-65,-62,-64,]),'DEINDENT_TOK':([94,107,109,114,119,121,124,125,128,144,150,153,154,159,160,172,173,179,181,183,189,193,196,197,209,214,218,219,220,224,225,229,233,235,241,244,245,250,254,257,258,260,261,265,268,269,272,273,275,276,277,278,280,281,283,284,289,291,292,293,295,296,300,301,305,307,308,310,311,312,],[-104,118,-106,135,138,140,-94,143,-79,-111,-32,-90,173,-49,-48,-107,198,-91,-76,209,218,-38,224,225,-9,-57,-33,-37,-36,-31,-21,250,-59,-108,-85,-40,-34,-15,269,275,276,-30,278,-43,284,-60,-52,-25,-56,-16,291,-39,-41,293,-53,-58,-61,-86,300,-42,-54,-63,-35,-55,308,310,-65,-62,312,-64,]),'STEP_TOK':([256,267,285,294,],[274,274,274,274,]),'EXTENDING_TOK':([0,3,6,],[-22,-23,9,]),'ASSERT_TOK':([61,80,143,],[-101,97,-29,]),'INDENT_TOK':([33,37,39,58,59,60,62,77,96,113,122,139,141,145,151,152,157,160,168,194,200,208,213,215,227,232,262,273,287,298,299,303,],[-69,61,-69,75,76,-69,81,93,112,134,-10,-68,158,162,170,171,176,187,-70,222,-70,234,238,239,248,253,279,-67,297,-67,304,306,]),'.':([7,129,155,180,182,184,204,206,207,],[10,147,174,-51,-50,211,230,-51,-50,]),'!':([158,179,181,183,185,193,205,210,214,219,220,233,234,235,238,239,244,253,254,257,258,268,269,272,273,275,276,278,283,284,289,295,296,301,304,307,308,310,312,],[177,-91,-76,-11,177,-38,177,177,-57,-37,-36,-59,177,-108,177,177,-40,177,-11,-11,-11,-11,-60,-52,-25,-56,-16,-39,-53,-58,-61,-54,-63,-55,177,-11,-65,-62,-64,]),'IN_TOK':([44,46,48,49,50,52,53,54,55,56,67,99,103,104,127,129,136,137,146,180,182,],[-78,-75,-74,-89,-80,-88,-81,-116,-20,-84,-100,-117,-121,-120,-66,-87,-118,-119,163,-74,-87,]),'NOTANY_TOK':([112,124,125,128,132,144,150,158,162,170,171,179,181,183,185,189,193,196,197,205,210,214,218,219,220,224,225,233,234,235,238,239,244,245,253,254,257,258,260,268,269,272,273,275,276,278,279,283,284,289,292,295,296,300,301,304,307,308,310,312,],[126,-94,126,-79,126,-111,-32,178,126,126,126,-91,-76,-11,178,126,-38,126,126,178,178,-57,-33,-37,-36,-31,-21,-59,178,-108,178,178,-40,-34,178,-11,-11,-11,-30,-11,-60,-52,-25,-56,-16,-39,126,-53,-58,-61,126,-54,-63,-35,-55,178,-11,-65,-62,-64,]),'WITHOUT_TOK':([17,],[30,]),'*':([43,65,85,88,],[66,66,100,106,]),',':([40,41,44,45,46,47,48,49,50,52,53,54,55,56,57,67,68,69,70,71,82,83,90,99,101,102,103,104,105,136,137,],[-98,63,-78,-87,-75,-96,-74,-89,-80,-88,-81,-116,-20,-84,73,-100,85,-97,-93,88,-115,85,-113,-117,-110,88,-121,-120,-114,-118,-119,]),'BC_EXTRAS_TOK':([11,16,21,140,],[19,-92,-109,-45,]),'CODE_TOK':([75,81,93,148,163,164,176,188,195,222,228,240,248,297,306,],[91,91,91,166,166,166,202,166,166,166,166,166,166,202,202,]),'REQUIRE_TOK':([225,276,],[246,290,]),'PATTERN_VAR_TOK':([32,43,65,66,73,85,88,100,106,111,112,124,125,128,132,144,150,158,162,170,171,177,179,181,183,185,189,192,193,196,197,205,210,211,212,214,218,219,220,224,225,226,230,231,233,234,235,238,239,244,245,253,254,255,257,258,260,266,268,269,271,272,273,275,276,278,279,283,284,289,292,295,296,300,301,304,307,308,310,312,],[48,48,48,48,48,48,48,48,48,48,48,-94,48,-79,48,-111,-32,180,48,48,48,206,-91,-76,-11,180,48,48,-38,48,48,180,180,206,48,-57,-33,-37,-36,-31,-21,48,206,48,-59,180,-108,180,180,-40,-34,180,-11,48,-11,-11,-30,48,-11,-60,286,-52,-25,-56,-16,-39,48,-53,-58,-61,48,-54,-63,-35,-55,180,-11,-65,-62,-64,]),'TRUE_TOK':([32,43,65,73,85,88,111,112,124,125,128,132,144,150,158,162,170,171,179,181,183,185,189,192,193,196,197,205,210,212,214,218,219,220,224,225,226,231,233,234,235,238,239,244,245,253,254,255,257,258,260,266,268,269,272,273,275,276,278,279,283,284,289,292,295,296,300,301,304,307,308,310,312,],[49,49,49,49,49,49,49,49,-94,49,-79,49,-111,-32,49,49,49,49,-91,-76,-11,49,49,49,-38,49,49,49,49,49,-57,-33,-37,-36,-31,-21,49,49,-59,49,-108,49,49,-40,-34,49,-11,49,-11,-11,-30,49,-11,-60,-52,-25,-56,-16,-39,49,-53,-58,-61,49,-54,-63,-35,-55,49,-11,-65,-62,-64,]),'PLAN_EXTRAS_TOK':([11,16,21,22,118,140,],[-99,-92,-109,36,-12,-45,]),':':([12,20,],[23,23,]),'=':([44,46,48,49,50,52,53,54,55,56,67,99,103,104,127,129,136,137,146,180,182,],[-78,-75,-74,-89,-80,-88,-81,-116,-20,-84,-100,-117,-121,-120,-66,-87,-118,-119,164,-74,-87,]),'NOT_NL_TOK':([149,169,175,201,],[-66,195,-66,228,]),'$end':([2,4,5,11,13,14,15,16,21,22,25,26,27,29,35,38,72,118,135,138,140,198,],[0,-1,-2,-99,-95,-46,-6,-92,-109,-103,-4,-46,-112,-77,-47,-5,-3,-12,-13,-14,-45,-28,]),'PYTHON_TOK':([112,124,125,128,131,132,134,144,150,153,154,156,158,162,170,171,172,179,181,183,185,189,193,196,197,205,210,214,218,219,220,224,225,233,234,235,238,239,244,245,253,254,257,258,260,265,268,269,272,273,275,276,278,279,280,283,284,289,292,293,295,296,300,301,304,307,308,310,312,],[-44,-94,-44,-79,149,-44,-44,-111,-32,-90,-44,175,-44,-44,-44,-44,-107,-91,-76,-11,-44,-44,-38,-44,-44,-44,-44,-57,-33,-37,-36,-31,-21,-59,-44,-108,-44,-44,-40,-34,-44,-11,-11,-11,-30,-43,-11,-60,-52,-25,-56,-16,-39,-44,-41,-53,-58,-61,-44,-42,-54,-63,-35,-55,-44,-11,-65,-62,-64,]),'USE_TOK':([61,76,],[78,78,]),'WITH_TOK':([94,109,159,160,209,241,291,],[-104,120,-49,-48,-9,-85,-86,]),'FALSE_TOK':([32,43,65,73,85,88,111,112,124,125,128,132,144,150,158,162,170,171,179,181,183,185,189,192,193,196,197,205,210,212,214,218,219,220,224,225,226,231,233,234,235,238,239,244,245,253,254,255,257,258,260,266,268,269,272,273,275,276,278,279,283,284,289,292,295,296,300,301,304,307,308,310,312,],[52,52,52,52,52,52,52,52,-94,52,-79,52,-111,-32,52,52,52,52,-91,-76,-11,52,52,52,-38,52,52,52,52,52,-57,-33,-37,-36,-31,-21,52,52,-59,52,-108,52,52,-40,-34,52,-11,52,-11,-11,-30,52,-11,-60,-52,-25,-56,-16,-39,52,-53,-58,-61,52,-54,-63,-35,-55,52,-11,-65,-62,-64,]),'CHECK_TOK':([0,112,124,125,128,130,132,144,150,158,162,170,171,179,181,183,185,189,193,196,197,205,210,214,218,219,220,224,225,233,234,235,238,239,244,245,253,254,257,258,260,268,269,272,273,275,276,278,279,283,284,289,292,295,296,300,301,304,307,308,310,312,],[1,-66,-94,-66,-79,148,-66,-111,-32,-66,-66,-66,-66,-91,-76,-11,-66,-66,-38,-66,-66,-66,-66,-57,-33,-37,-36,-31,-21,-59,-66,-108,-66,-66,-40,-34,-66,-11,-11,-11,-30,-11,-60,-52,-25,-56,-16,-39,-66,-53,-58,-61,-66,-54,-63,-35,-55,-66,-11,-65,-62,-64,]),'IDENTIFIER_TOK':([0,1,3,6,8,9,10,11,13,14,16,21,26,27,30,32,42,43,63,65,73,78,85,88,111,112,124,125,128,132,134,135,140,144,147,150,153,154,158,162,170,171,172,174,177,179,181,183,185,189,192,193,196,197,198,205,210,211,212,214,218,219,220,224,225,226,230,231,233,234,235,238,239,244,245,253,254,255,257,258,260,265,266,268,269,272,273,275,276,278,279,280,283,284,289,292,293,295,296,300,301,304,307,308,310,312,],[-22,7,-23,-24,12,17,18,20,-95,12,-92,-109,20,-112,40,45,-7,45,82,45,45,95,45,45,45,129,-94,129,-79,129,155,-13,-45,-111,165,-32,-90,155,182,129,129,129,-107,199,207,-91,-76,-11,182,129,45,-38,129,129,-28,182,182,207,45,-57,-33,-37,-36,-31,-21,45,207,45,-59,182,-108,182,182,-40,-34,182,-11,45,-11,-11,-30,-43,45,-11,-60,-52,-25,-56,-16,-39,129,-41,-53,-58,-61,129,-42,-54,-63,-35,-55,182,-11,-65,-62,-64,]),'NONE_TOK':([32,43,65,73,85,88,111,112,124,125,128,132,144,150,158,162,170,171,179,181,183,185,189,192,193,196,197,205,210,212,214,218,219,220,224,225,226,231,233,234,235,238,239,244,245,253,254,255,257,258,260,266,268,269,272,273,275,276,278,279,283,284,289,292,295,296,300,301,304,307,308,310,312,],[55,55,55,55,55,55,55,55,-94,55,-79,55,-111,-32,55,55,55,55,-91,-76,-11,55,55,55,-38,55,55,55,55,55,-57,-33,-37,-36,-31,-21,55,55,-59,55,-108,55,55,-40,-34,55,-11,55,-11,-11,-30,55,-11,-60,-52,-25,-56,-16,-39,55,-53,-58,-61,55,-54,-63,-35,-55,55,-11,-65,-62,-64,]),'FORALL_TOK':([112,124,125,128,132,144,150,158,162,170,171,179,181,183,185,189,193,196,197,205,210,214,218,219,220,224,225,233,234,235,238,239,244,245,253,254,257,258,260,268,269,272,273,275,276,278,279,283,284,289,292,295,296,300,301,304,307,308,310,312,],[133,-94,133,-79,133,-111,-32,186,133,133,133,-91,-76,-11,186,133,-38,133,133,186,186,-57,-33,-37,-36,-31,-21,-59,186,-108,186,186,-40,-34,186,-11,-11,-11,-30,-11,-60,-52,-25,-56,-16,-39,133,-53,-58,-61,133,-54,-63,-35,-55,186,-11,-65,-62,-64,]),'STRING_TOK':([32,43,65,73,85,88,111,112,124,125,128,132,144,150,158,162,170,171,179,181,183,185,189,192,193,196,197,205,210,212,214,218,219,220,224,225,226,231,233,234,235,238,239,244,245,253,254,255,257,258,260,266,268,269,272,273,275,276,278,279,283,284,289,292,295,296,300,301,304,307,308,310,312,],[56,56,56,56,56,56,56,56,-94,56,-79,56,-111,-32,56,56,56,56,-91,-76,-11,56,56,56,-38,56,56,56,56,56,-57,-33,-37,-36,-31,-21,56,56,-59,56,-108,56,56,-40,-34,56,-11,56,-11,-11,-30,56,-11,-60,-52,-25,-56,-16,-39,56,-53,-58,-61,56,-54,-63,-35,-55,56,-11,-65,-62,-64,]),'WHEN_TOK':([94,159,160,241,291,],[110,-49,-48,-85,-86,]),'FIRST_TOK':([112,124,125,128,132,144,150,158,162,170,171,177,179,181,183,185,189,193,196,197,205,210,214,218,219,220,224,225,233,234,235,238,239,244,245,253,254,257,258,260,268,269,272,273,275,276,278,279,283,284,289,292,295,296,300,301,304,307,308,310,312,],[132,-94,132,-79,132,-111,-32,185,132,132,132,205,-91,-76,-11,185,132,-38,132,132,185,185,-57,-33,-37,-36,-31,-21,-59,185,-108,185,185,-40,-34,185,-11,-11,-11,-30,-11,-60,-52,-25,-56,-16,-39,132,-53,-58,-61,132,-54,-63,-35,-55,185,-11,-65,-62,-64,]),'RP_TOK':([32,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,65,67,68,69,70,71,73,74,83,84,85,86,87,88,89,90,99,101,102,103,104,105,111,115,116,117,123,136,137,192,212,221,226,231,237,247,252,255,266,270,282,],[-102,67,-78,-87,-75,-96,-74,-89,-80,72,-88,-81,-116,-20,-84,-17,67,-100,-17,-97,-93,-17,-18,-82,-17,99,-18,103,104,-18,-26,-113,-117,-110,-17,-121,-120,-114,-102,136,137,-83,142,-118,-119,-102,-102,242,-102,-102,256,263,267,-102,-102,285,294,]),'FC_EXTRAS_TOK':([13,14,27,198,],[-95,28,-112,-28,]),'NL_TOK':([0,12,17,19,20,23,24,28,31,34,36,40,41,63,64,79,82,91,92,97,98,108,110,120,126,132,133,142,149,166,167,175,178,185,186,190,191,202,203,205,217,223,242,243,246,249,256,259,263,264,267,285,286,288,290,294,302,309,],[3,-19,-105,33,-19,-27,37,39,42,59,60,-98,-17,-18,-8,96,-115,-73,107,113,114,119,122,139,145,151,152,160,168,-71,193,200,208,213,215,219,220,-72,229,232,241,244,260,261,262,265,273,277,280,281,273,273,296,298,299,273,305,311,]),}
_lr_action = { }
for _k, _v in list(_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 = {'inc_plan_vars':([183,254,257,258,268,307,],[210,210,210,210,210,210,]),'when_opt':([94,],[109,]),'bc_rules_opt':([14,26,],[25,38,]),'parent_opt':([6,],[8,]),'fc_extras':([14,],[26,]),'start_extra_statements':([33,39,60,],[58,62,77,]),'bc_rules':([8,14,26,],[11,11,11,]),'file':([0,],[4,]),'fc_premise':([112,125,132,162,170,171,189,196,197,279,292,],[124,144,150,124,124,124,144,144,144,124,144,]),'python_plan_code':([176,297,306,],[203,302,309,]),'bc_require_opt':([276,],[289,]),'plan_spec':([256,267,285,294,],[272,283,295,301,]),'goal':([78,],[94,]),'plan_extras_opt':([22,],[35,]),'pattern':([32,73,88,111,112,125,132,158,162,170,171,185,189,192,196,197,205,210,212,226,231,234,238,239,253,255,266,279,292,304,],[47,90,105,47,127,127,127,127,127,127,127,127,127,47,127,127,127,127,47,47,47,127,127,127,127,47,47,127,127,127,]),'top':([0,],[2,]),'bc_premise':([158,185,205,210,234,238,239,253,304,],[179,214,233,235,179,179,179,179,179,]),'assertion':([134,154,],[153,172,]),'name':([158,177,185,205,210,211,230,234,238,239,253,304,],[184,204,184,184,184,236,251,184,184,184,184,184,]),'data_list':([43,65,],[68,83,]),'start_python_plan_call':([273,298,],[287,303,]),'pattern_proper':([32,43,65,73,85,88,111,112,125,132,158,162,170,171,185,189,192,196,197,205,210,212,226,231,234,238,239,253,255,266,279,292,304,],[50,69,69,50,69,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,]),'python_goal':([0,],[5,]),'without_names':([30,],[41,]),'bc_extras_opt':([11,],[22,]),'start_python_statements':([139,],[157,]),'patterns_opt':([32,111,192,212,226,231,255,266,],[51,123,221,237,247,252,270,282,]),'fc_require_opt':([225,],[245,]),'python_premise':([112,125,132,158,162,170,171,185,189,196,197,205,210,234,238,239,253,279,292,304,],[128,128,128,181,128,128,128,181,128,128,128,181,181,181,181,181,181,128,128,181,]),'with_opt':([109,],[121,]),'variable':([32,43,65,66,73,85,88,100,106,111,112,125,132,158,162,170,171,185,189,192,196,197,205,210,212,226,231,234,238,239,253,255,266,279,292,304,],[53,53,53,84,53,53,53,115,117,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,]),'fc_rule':([8,14,],[13,27,]),'start_python_code':([112,125,127,132,142,149,158,162,170,171,175,185,187,189,196,197,205,210,234,238,239,253,279,292,304,],[130,130,146,130,161,169,130,130,130,130,201,130,216,130,130,130,130,130,130,130,130,130,130,130,130,]),'bc_premises':([158,234,238,239,253,304,],[183,254,257,258,268,307,]),'data':([32,43,65,73,85,88,111,112,125,132,158,162,170,171,185,189,192,196,197,205,210,212,226,231,234,238,239,253,255,266,279,292,304,],[54,70,70,54,101,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,]),'patterns_proper':([43,65,85,],[71,71,102,]),'check_nl':([112,125,132,134,154,158,162,170,171,185,189,196,197,205,210,234,238,239,253,279,292,304,],[131,131,131,156,156,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,]),'rest_opt':([71,102,],[87,116,]),'fc_rules':([8,],[14,]),'bc_rules_section':([8,14,26,],[15,29,29,]),'python_extras_code':([75,81,93,],[92,98,108,]),'nl_opt':([0,],[6,]),'python_rule_code':([148,163,164,188,195,222,228,240,248,],[167,190,191,217,223,243,249,259,264,]),'colon_opt':([12,20,],[24,34,]),'fc_premises':([112,162,170,171,279,],[125,189,196,197,292,]),'patterns':([32,111,192,212,226,231,255,266,],[57,57,57,57,57,57,57,57,]),'comma_opt':([41,57,68,71,83,102,],[64,74,86,89,86,89,]),'reset_plan_vars':([122,],[141,]),'taking':([142,],[159,]),'without_opt':([17,],[31,]),'foreach_opt':([61,],[80,]),'bc_rule':([8,11,14,26,],[16,21,16,16,]),'start_python_assertion':([168,200,],[194,227,]),'assertions':([134,],[154,]),}
_lr_goto = { }
for _k, _v in list(_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' -> top","S'",1,None,None,None),
('top -> file','top',1,'p_top','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',40),
('top -> python_goal','top',1,'p_top','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',41),
('python_goal -> CHECK_TOK IDENTIFIER_TOK . IDENTIFIER_TOK LP_TOK patterns_opt RP_TOK','python_goal',7,'p_goal','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',46),
('file -> nl_opt parent_opt fc_rules bc_rules_opt','file',4,'p_file','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',51),
('file -> nl_opt parent_opt fc_rules fc_extras bc_rules_opt','file',5,'p_file_fc_extras','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',56),
('file -> nl_opt parent_opt bc_rules_section','file',3,'p_file_bc','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',61),
('parent_opt -> EXTENDING_TOK IDENTIFIER_TOK without_opt NL_TOK','parent_opt',4,'p_parent','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',72),
('without_opt -> WITHOUT_TOK without_names comma_opt','without_opt',3,'p_second','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',77),
('when_opt -> WHEN_TOK NL_TOK reset_plan_vars INDENT_TOK bc_premises DEINDENT_TOK','when_opt',6,'p_fourth','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',82),
('reset_plan_vars -> <empty>','reset_plan_vars',0,'p_reset_plan_vars','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',87),
('inc_plan_vars -> <empty>','inc_plan_vars',0,'p_inc_plan_vars','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',95),
('bc_extras_opt -> BC_EXTRAS_TOK NL_TOK start_extra_statements INDENT_TOK python_extras_code NL_TOK DEINDENT_TOK','bc_extras_opt',7,'p_fifth','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',103),
('fc_extras -> FC_EXTRAS_TOK NL_TOK start_extra_statements INDENT_TOK python_extras_code NL_TOK DEINDENT_TOK','fc_extras',7,'p_fifth','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',104),
('plan_extras_opt -> PLAN_EXTRAS_TOK NL_TOK start_extra_statements INDENT_TOK python_extras_code NL_TOK DEINDENT_TOK','plan_extras_opt',7,'p_fifth','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',105),
('with_opt -> WITH_TOK NL_TOK start_python_statements INDENT_TOK python_plan_code NL_TOK DEINDENT_TOK','with_opt',7,'p_fifth','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',106),
('bc_require_opt -> <empty>','bc_require_opt',0,'p_none','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',111),
('comma_opt -> <empty>','comma_opt',0,'p_none','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',112),
('comma_opt -> ,','comma_opt',1,'p_none','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',113),
('colon_opt -> <empty>','colon_opt',0,'p_none','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',114),
('data -> NONE_TOK','data',1,'p_none','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',115),
('fc_require_opt -> <empty>','fc_require_opt',0,'p_none','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',116),
('nl_opt -> <empty>','nl_opt',0,'p_none','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',117),
('nl_opt -> NL_TOK','nl_opt',1,'p_none','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',118),
('parent_opt -> <empty>','parent_opt',0,'p_none','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',119),
('plan_spec -> NL_TOK','plan_spec',1,'p_none','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',120),
('rest_opt -> comma_opt','rest_opt',1,'p_none','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',121),
('colon_opt -> :','colon_opt',1,'p_colon_deprication','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',126),
('fc_rule -> IDENTIFIER_TOK colon_opt NL_TOK INDENT_TOK foreach_opt ASSERT_TOK NL_TOK INDENT_TOK assertions DEINDENT_TOK DEINDENT_TOK','fc_rule',11,'p_fc_rule','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',134),
('foreach_opt -> FOREACH_TOK NL_TOK INDENT_TOK fc_premises DEINDENT_TOK','foreach_opt',5,'p_foreach','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',139),
('fc_premise -> IDENTIFIER_TOK . IDENTIFIER_TOK LP_TOK patterns_opt RP_TOK NL_TOK','fc_premise',7,'p_fc_premise','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',144),
('fc_premise -> FIRST_TOK NL_TOK INDENT_TOK fc_premises DEINDENT_TOK','fc_premise',5,'p_fc_first_1','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',149),
('fc_premise -> FIRST_TOK fc_premise','fc_premise',2,'p_fc_first_n','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',154),
('fc_premise -> NOTANY_TOK NL_TOK INDENT_TOK fc_premises DEINDENT_TOK','fc_premise',5,'p_fc_notany','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',159),
('fc_premise -> FORALL_TOK NL_TOK INDENT_TOK fc_premises DEINDENT_TOK fc_require_opt','fc_premise',6,'p_fc_forall','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',164),
('fc_require_opt -> REQUIRE_TOK NL_TOK INDENT_TOK fc_premises DEINDENT_TOK','fc_require_opt',5,'p_fc_require_opt','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',169),
('python_premise -> pattern start_python_code = python_rule_code NL_TOK','python_premise',5,'p_python_eq','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',174),
('python_premise -> pattern start_python_code IN_TOK python_rule_code NL_TOK','python_premise',5,'p_python_in','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',179),
('python_premise -> start_python_code CHECK_TOK python_rule_code NL_TOK','python_premise',4,'p_python_check','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',184),
('python_premise -> check_nl PYTHON_TOK NL_TOK start_python_assertion INDENT_TOK python_rule_code NL_TOK DEINDENT_TOK','python_premise',8,'p_python_block_n','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',189),
('python_premise -> check_nl PYTHON_TOK start_python_code NOT_NL_TOK python_rule_code NL_TOK','python_premise',6,'p_python_block_1','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',194),
('assertion -> IDENTIFIER_TOK . IDENTIFIER_TOK LP_TOK patterns_opt RP_TOK NL_TOK','assertion',7,'p_assertion','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',199),
('assertion -> check_nl PYTHON_TOK NL_TOK start_python_assertion INDENT_TOK python_rule_code NL_TOK DEINDENT_TOK','assertion',8,'p_python_assertion_n','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',204),
('assertion -> check_nl PYTHON_TOK start_python_code NOT_NL_TOK python_rule_code NL_TOK','assertion',6,'p_python_assertion_1','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',209),
('check_nl -> <empty>','check_nl',0,'p_check_nl','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',214),
('bc_rule -> IDENTIFIER_TOK colon_opt NL_TOK INDENT_TOK USE_TOK goal when_opt with_opt DEINDENT_TOK','bc_rule',9,'p_bc_rule','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',220),
('bc_rules_opt -> <empty>','bc_rules_opt',0,'p_empty_bc_rules_opt','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',225),
('bc_rules_section -> bc_rules bc_extras_opt plan_extras_opt','bc_rules_section',3,'p_bc_rules_section','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',230),
('goal -> IDENTIFIER_TOK LP_TOK patterns_opt RP_TOK NL_TOK','goal',5,'p_goal_no_taking','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',235),
('goal -> IDENTIFIER_TOK LP_TOK patterns_opt RP_TOK taking','goal',5,'p_goal_taking','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',240),
('name -> IDENTIFIER_TOK','name',1,'p_name_sym','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',245),
('name -> PATTERN_VAR_TOK','name',1,'p_name_pat_var','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',250),
('bc_premise -> name LP_TOK patterns_opt RP_TOK plan_spec','bc_premise',5,'p_bc_premise1','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',255),
('bc_premise -> ! name LP_TOK patterns_opt RP_TOK plan_spec','bc_premise',6,'p_bc_premise2','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',261),
('bc_premise -> name . name LP_TOK patterns_opt RP_TOK plan_spec','bc_premise',7,'p_bc_premise3','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',267),
('bc_premise -> ! name . name LP_TOK patterns_opt RP_TOK plan_spec','bc_premise',8,'p_bc_premise4','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',273),
('bc_premise -> FIRST_TOK NL_TOK INDENT_TOK bc_premises DEINDENT_TOK','bc_premise',5,'p_bc_first_1f','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',279),
('bc_premise -> FIRST_TOK bc_premise','bc_premise',2,'p_bc_first_nf','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',284),
('bc_premise -> ! FIRST_TOK NL_TOK INDENT_TOK bc_premises DEINDENT_TOK','bc_premise',6,'p_bc_first_1t','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',289),
('bc_premise -> ! FIRST_TOK bc_premise','bc_premise',3,'p_bc_first_nt','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',294),
('bc_premise -> NOTANY_TOK NL_TOK INDENT_TOK bc_premises DEINDENT_TOK','bc_premise',5,'p_bc_notany','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',299),
('bc_premise -> FORALL_TOK NL_TOK INDENT_TOK bc_premises DEINDENT_TOK bc_require_opt','bc_premise',6,'p_bc_forall','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',304),
('bc_require_opt -> REQUIRE_TOK NL_TOK INDENT_TOK bc_premises DEINDENT_TOK','bc_require_opt',5,'p_bc_require_opt','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',309),
('plan_spec -> AS_TOK PATTERN_VAR_TOK NL_TOK','plan_spec',3,'p_as','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',314),
('plan_spec -> STEP_TOK NUMBER_TOK NL_TOK start_python_plan_call INDENT_TOK python_plan_code NL_TOK DEINDENT_TOK','plan_spec',8,'p_step_code','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',319),
('plan_spec -> NL_TOK start_python_plan_call INDENT_TOK python_plan_code NL_TOK DEINDENT_TOK','plan_spec',6,'p_code','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',325),
('start_python_code -> <empty>','start_python_code',0,'p_start_python_code','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',330),
('start_python_plan_call -> <empty>','start_python_plan_call',0,'p_start_python_plan_call','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',336),
('start_python_statements -> <empty>','start_python_statements',0,'p_start_python_statements','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',342),
('start_extra_statements -> <empty>','start_extra_statements',0,'p_start_extra_statements','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',348),
('start_python_assertion -> <empty>','start_python_assertion',0,'p_start_python_assertion','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',354),
('python_rule_code -> CODE_TOK','python_rule_code',1,'p_python_rule_code','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',361),
('python_plan_code -> CODE_TOK','python_plan_code',1,'p_python_plan_code','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',366),
('python_extras_code -> CODE_TOK','python_extras_code',1,'p_python_extras_code','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',371),
('variable -> PATTERN_VAR_TOK','variable',1,'p_pattern_var','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',376),
('variable -> ANONYMOUS_VAR_TOK','variable',1,'p_anonymous_var','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',386),
('bc_premise -> python_premise','bc_premise',1,'p_first','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',394),
('bc_rules_opt -> bc_rules_section','bc_rules_opt',1,'p_first','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',395),
('data -> NUMBER_TOK','data',1,'p_first','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',396),
('fc_premise -> python_premise','fc_premise',1,'p_first','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',397),
('pattern -> pattern_proper','pattern',1,'p_first','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',398),
('pattern_proper -> variable','pattern_proper',1,'p_first','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',399),
('patterns_opt -> patterns comma_opt','patterns_opt',2,'p_first','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',400),
('rest_opt -> , * variable','rest_opt',3,'p_last','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',405),
('data -> STRING_TOK','data',1,'p_data_string','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',410),
('taking -> start_python_code TAKING_TOK python_rule_code NL_TOK','taking',4,'p_taking','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',421),
('taking -> NL_TOK INDENT_TOK start_python_code TAKING_TOK python_rule_code NL_TOK DEINDENT_TOK','taking',7,'p_taking2','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',426),
('data -> IDENTIFIER_TOK','data',1,'p_quoted_last','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',431),
('data -> FALSE_TOK','data',1,'p_false','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',439),
('data -> TRUE_TOK','data',1,'p_true','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',444),
('assertions -> assertion','assertions',1,'p_start_list','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',449),
('bc_premises -> bc_premise','bc_premises',1,'p_start_list','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',450),
('bc_rules -> bc_rule','bc_rules',1,'p_start_list','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',451),
('data_list -> data','data_list',1,'p_start_list','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',452),
('fc_premises -> fc_premise','fc_premises',1,'p_start_list','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',453),
('fc_rules -> fc_rule','fc_rules',1,'p_start_list','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',454),
('patterns -> pattern','patterns',1,'p_start_list','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',455),
('patterns_proper -> pattern_proper','patterns_proper',1,'p_start_list','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',456),
('without_names -> IDENTIFIER_TOK','without_names',1,'p_start_list','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',457),
('bc_extras_opt -> <empty>','bc_extras_opt',0,'p_empty_tuple','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',462),
('data -> LP_TOK RP_TOK','data',2,'p_empty_tuple','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',463),
('foreach_opt -> <empty>','foreach_opt',0,'p_empty_tuple','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',464),
('patterns_opt -> <empty>','patterns_opt',0,'p_empty_tuple','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',465),
('plan_extras_opt -> <empty>','plan_extras_opt',0,'p_empty_tuple','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',466),
('when_opt -> <empty>','when_opt',0,'p_empty_tuple','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',467),
('without_opt -> <empty>','without_opt',0,'p_empty_tuple','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',468),
('with_opt -> <empty>','with_opt',0,'p_double_empty_tuple','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',473),
('assertions -> assertions assertion','assertions',2,'p_append_list','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',478),
('bc_premises -> bc_premises inc_plan_vars bc_premise','bc_premises',3,'p_append_list','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',479),
('bc_rules -> bc_rules bc_rule','bc_rules',2,'p_append_list','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',480),
('data_list -> data_list , data','data_list',3,'p_append_list','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',481),
('fc_premises -> fc_premises fc_premise','fc_premises',2,'p_append_list','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',482),
('fc_rules -> fc_rules fc_rule','fc_rules',2,'p_append_list','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',483),
('patterns -> patterns , pattern','patterns',3,'p_append_list','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',484),
('patterns_proper -> patterns_proper , pattern','patterns_proper',3,'p_append_list','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',485),
('without_names -> without_names , IDENTIFIER_TOK','without_names',3,'p_append_list','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',486),
('pattern -> data','pattern',1,'p_pattern','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',492),
('pattern_proper -> LP_TOK * variable RP_TOK','pattern_proper',4,'p_pattern_tuple1','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',499),
('pattern_proper -> LP_TOK data_list , * variable RP_TOK','pattern_proper',6,'p_pattern_tuple2','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',506),
('pattern_proper -> LP_TOK data_list , patterns_proper rest_opt RP_TOK','pattern_proper',6,'p_pattern_tuple3','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',518),
('pattern_proper -> LP_TOK patterns_proper rest_opt RP_TOK','pattern_proper',4,'p_pattern_tuple4','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',534),
('data -> LP_TOK data_list comma_opt RP_TOK','data',4,'p_tuple','/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py',543),
]
| _tabversion = '3.2'
_lr_method = 'LALR'
_lr_signature = '`£O\x17ÖCÔE2µö0wIMÙ'
_lr_action_items = {'TAKING_TOK': ([142, 161, 187, 216], [-66, 188, -66, 240]), 'LP_TOK': ([18, 32, 43, 65, 73, 85, 88, 95, 111, 112, 124, 125, 128, 132, 144, 150, 158, 162, 165, 170, 171, 179, 180, 181, 182, 183, 184, 185, 189, 192, 193, 196, 197, 199, 204, 205, 206, 207, 210, 212, 214, 218, 219, 220, 224, 225, 226, 231, 233, 234, 235, 236, 238, 239, 244, 245, 251, 253, 254, 255, 257, 258, 260, 266, 268, 269, 272, 273, 275, 276, 278, 279, 283, 284, 289, 292, 295, 296, 300, 301, 304, 307, 308, 310, 312], [32, 43, 65, 65, 43, 65, 43, 111, 43, 43, -94, 43, -79, 43, -111, -32, 43, 43, 192, 43, 43, -91, -51, -76, -50, -11, 212, 43, 43, 43, -38, 43, 43, 226, 231, 43, -51, -50, 43, 43, -57, -33, -37, -36, -31, -21, 43, 43, -59, 43, -108, 255, 43, 43, -40, -34, 266, 43, -11, 43, -11, -11, -30, 43, -11, -60, -52, -25, -56, -16, -39, 43, -53, -58, -61, 43, -54, -63, -35, -55, 43, -11, -65, -62, -64]), 'FOREACH_TOK': ([61], [79]), 'AS_TOK': ([256, 267, 285, 294], [271, 271, 271, 271]), 'ANONYMOUS_VAR_TOK': ([32, 43, 65, 66, 73, 85, 88, 100, 106, 111, 112, 124, 125, 128, 132, 144, 150, 158, 162, 170, 171, 179, 181, 183, 185, 189, 192, 193, 196, 197, 205, 210, 212, 214, 218, 219, 220, 224, 225, 226, 231, 233, 234, 235, 238, 239, 244, 245, 253, 254, 255, 257, 258, 260, 266, 268, 269, 272, 273, 275, 276, 278, 279, 283, 284, 289, 292, 295, 296, 300, 301, 304, 307, 308, 310, 312], [46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, -94, 46, -79, 46, -111, -32, 46, 46, 46, 46, -91, -76, -11, 46, 46, 46, -38, 46, 46, 46, 46, 46, -57, -33, -37, -36, -31, -21, 46, 46, -59, 46, -108, 46, 46, -40, -34, 46, -11, 46, -11, -11, -30, 46, -11, -60, -52, -25, -56, -16, -39, 46, -53, -58, -61, 46, -54, -63, -35, -55, 46, -11, -65, -62, -64]), 'NUMBER_TOK': ([32, 43, 65, 73, 85, 88, 111, 112, 124, 125, 128, 132, 144, 150, 158, 162, 170, 171, 179, 181, 183, 185, 189, 192, 193, 196, 197, 205, 210, 212, 214, 218, 219, 220, 224, 225, 226, 231, 233, 234, 235, 238, 239, 244, 245, 253, 254, 255, 257, 258, 260, 266, 268, 269, 272, 273, 274, 275, 276, 278, 279, 283, 284, 289, 292, 295, 296, 300, 301, 304, 307, 308, 310, 312], [44, 44, 44, 44, 44, 44, 44, 44, -94, 44, -79, 44, -111, -32, 44, 44, 44, 44, -91, -76, -11, 44, 44, 44, -38, 44, 44, 44, 44, 44, -57, -33, -37, -36, -31, -21, 44, 44, -59, 44, -108, 44, 44, -40, -34, 44, -11, 44, -11, -11, -30, 44, -11, -60, -52, -25, 288, -56, -16, -39, 44, -53, -58, -61, 44, -54, -63, -35, -55, 44, -11, -65, -62, -64]), 'DEINDENT_TOK': ([94, 107, 109, 114, 119, 121, 124, 125, 128, 144, 150, 153, 154, 159, 160, 172, 173, 179, 181, 183, 189, 193, 196, 197, 209, 214, 218, 219, 220, 224, 225, 229, 233, 235, 241, 244, 245, 250, 254, 257, 258, 260, 261, 265, 268, 269, 272, 273, 275, 276, 277, 278, 280, 281, 283, 284, 289, 291, 292, 293, 295, 296, 300, 301, 305, 307, 308, 310, 311, 312], [-104, 118, -106, 135, 138, 140, -94, 143, -79, -111, -32, -90, 173, -49, -48, -107, 198, -91, -76, 209, 218, -38, 224, 225, -9, -57, -33, -37, -36, -31, -21, 250, -59, -108, -85, -40, -34, -15, 269, 275, 276, -30, 278, -43, 284, -60, -52, -25, -56, -16, 291, -39, -41, 293, -53, -58, -61, -86, 300, -42, -54, -63, -35, -55, 308, 310, -65, -62, 312, -64]), 'STEP_TOK': ([256, 267, 285, 294], [274, 274, 274, 274]), 'EXTENDING_TOK': ([0, 3, 6], [-22, -23, 9]), 'ASSERT_TOK': ([61, 80, 143], [-101, 97, -29]), 'INDENT_TOK': ([33, 37, 39, 58, 59, 60, 62, 77, 96, 113, 122, 139, 141, 145, 151, 152, 157, 160, 168, 194, 200, 208, 213, 215, 227, 232, 262, 273, 287, 298, 299, 303], [-69, 61, -69, 75, 76, -69, 81, 93, 112, 134, -10, -68, 158, 162, 170, 171, 176, 187, -70, 222, -70, 234, 238, 239, 248, 253, 279, -67, 297, -67, 304, 306]), '.': ([7, 129, 155, 180, 182, 184, 204, 206, 207], [10, 147, 174, -51, -50, 211, 230, -51, -50]), '!': ([158, 179, 181, 183, 185, 193, 205, 210, 214, 219, 220, 233, 234, 235, 238, 239, 244, 253, 254, 257, 258, 268, 269, 272, 273, 275, 276, 278, 283, 284, 289, 295, 296, 301, 304, 307, 308, 310, 312], [177, -91, -76, -11, 177, -38, 177, 177, -57, -37, -36, -59, 177, -108, 177, 177, -40, 177, -11, -11, -11, -11, -60, -52, -25, -56, -16, -39, -53, -58, -61, -54, -63, -55, 177, -11, -65, -62, -64]), 'IN_TOK': ([44, 46, 48, 49, 50, 52, 53, 54, 55, 56, 67, 99, 103, 104, 127, 129, 136, 137, 146, 180, 182], [-78, -75, -74, -89, -80, -88, -81, -116, -20, -84, -100, -117, -121, -120, -66, -87, -118, -119, 163, -74, -87]), 'NOTANY_TOK': ([112, 124, 125, 128, 132, 144, 150, 158, 162, 170, 171, 179, 181, 183, 185, 189, 193, 196, 197, 205, 210, 214, 218, 219, 220, 224, 225, 233, 234, 235, 238, 239, 244, 245, 253, 254, 257, 258, 260, 268, 269, 272, 273, 275, 276, 278, 279, 283, 284, 289, 292, 295, 296, 300, 301, 304, 307, 308, 310, 312], [126, -94, 126, -79, 126, -111, -32, 178, 126, 126, 126, -91, -76, -11, 178, 126, -38, 126, 126, 178, 178, -57, -33, -37, -36, -31, -21, -59, 178, -108, 178, 178, -40, -34, 178, -11, -11, -11, -30, -11, -60, -52, -25, -56, -16, -39, 126, -53, -58, -61, 126, -54, -63, -35, -55, 178, -11, -65, -62, -64]), 'WITHOUT_TOK': ([17], [30]), '*': ([43, 65, 85, 88], [66, 66, 100, 106]), ',': ([40, 41, 44, 45, 46, 47, 48, 49, 50, 52, 53, 54, 55, 56, 57, 67, 68, 69, 70, 71, 82, 83, 90, 99, 101, 102, 103, 104, 105, 136, 137], [-98, 63, -78, -87, -75, -96, -74, -89, -80, -88, -81, -116, -20, -84, 73, -100, 85, -97, -93, 88, -115, 85, -113, -117, -110, 88, -121, -120, -114, -118, -119]), 'BC_EXTRAS_TOK': ([11, 16, 21, 140], [19, -92, -109, -45]), 'CODE_TOK': ([75, 81, 93, 148, 163, 164, 176, 188, 195, 222, 228, 240, 248, 297, 306], [91, 91, 91, 166, 166, 166, 202, 166, 166, 166, 166, 166, 166, 202, 202]), 'REQUIRE_TOK': ([225, 276], [246, 290]), 'PATTERN_VAR_TOK': ([32, 43, 65, 66, 73, 85, 88, 100, 106, 111, 112, 124, 125, 128, 132, 144, 150, 158, 162, 170, 171, 177, 179, 181, 183, 185, 189, 192, 193, 196, 197, 205, 210, 211, 212, 214, 218, 219, 220, 224, 225, 226, 230, 231, 233, 234, 235, 238, 239, 244, 245, 253, 254, 255, 257, 258, 260, 266, 268, 269, 271, 272, 273, 275, 276, 278, 279, 283, 284, 289, 292, 295, 296, 300, 301, 304, 307, 308, 310, 312], [48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, -94, 48, -79, 48, -111, -32, 180, 48, 48, 48, 206, -91, -76, -11, 180, 48, 48, -38, 48, 48, 180, 180, 206, 48, -57, -33, -37, -36, -31, -21, 48, 206, 48, -59, 180, -108, 180, 180, -40, -34, 180, -11, 48, -11, -11, -30, 48, -11, -60, 286, -52, -25, -56, -16, -39, 48, -53, -58, -61, 48, -54, -63, -35, -55, 180, -11, -65, -62, -64]), 'TRUE_TOK': ([32, 43, 65, 73, 85, 88, 111, 112, 124, 125, 128, 132, 144, 150, 158, 162, 170, 171, 179, 181, 183, 185, 189, 192, 193, 196, 197, 205, 210, 212, 214, 218, 219, 220, 224, 225, 226, 231, 233, 234, 235, 238, 239, 244, 245, 253, 254, 255, 257, 258, 260, 266, 268, 269, 272, 273, 275, 276, 278, 279, 283, 284, 289, 292, 295, 296, 300, 301, 304, 307, 308, 310, 312], [49, 49, 49, 49, 49, 49, 49, 49, -94, 49, -79, 49, -111, -32, 49, 49, 49, 49, -91, -76, -11, 49, 49, 49, -38, 49, 49, 49, 49, 49, -57, -33, -37, -36, -31, -21, 49, 49, -59, 49, -108, 49, 49, -40, -34, 49, -11, 49, -11, -11, -30, 49, -11, -60, -52, -25, -56, -16, -39, 49, -53, -58, -61, 49, -54, -63, -35, -55, 49, -11, -65, -62, -64]), 'PLAN_EXTRAS_TOK': ([11, 16, 21, 22, 118, 140], [-99, -92, -109, 36, -12, -45]), ':': ([12, 20], [23, 23]), '=': ([44, 46, 48, 49, 50, 52, 53, 54, 55, 56, 67, 99, 103, 104, 127, 129, 136, 137, 146, 180, 182], [-78, -75, -74, -89, -80, -88, -81, -116, -20, -84, -100, -117, -121, -120, -66, -87, -118, -119, 164, -74, -87]), 'NOT_NL_TOK': ([149, 169, 175, 201], [-66, 195, -66, 228]), '$end': ([2, 4, 5, 11, 13, 14, 15, 16, 21, 22, 25, 26, 27, 29, 35, 38, 72, 118, 135, 138, 140, 198], [0, -1, -2, -99, -95, -46, -6, -92, -109, -103, -4, -46, -112, -77, -47, -5, -3, -12, -13, -14, -45, -28]), 'PYTHON_TOK': ([112, 124, 125, 128, 131, 132, 134, 144, 150, 153, 154, 156, 158, 162, 170, 171, 172, 179, 181, 183, 185, 189, 193, 196, 197, 205, 210, 214, 218, 219, 220, 224, 225, 233, 234, 235, 238, 239, 244, 245, 253, 254, 257, 258, 260, 265, 268, 269, 272, 273, 275, 276, 278, 279, 280, 283, 284, 289, 292, 293, 295, 296, 300, 301, 304, 307, 308, 310, 312], [-44, -94, -44, -79, 149, -44, -44, -111, -32, -90, -44, 175, -44, -44, -44, -44, -107, -91, -76, -11, -44, -44, -38, -44, -44, -44, -44, -57, -33, -37, -36, -31, -21, -59, -44, -108, -44, -44, -40, -34, -44, -11, -11, -11, -30, -43, -11, -60, -52, -25, -56, -16, -39, -44, -41, -53, -58, -61, -44, -42, -54, -63, -35, -55, -44, -11, -65, -62, -64]), 'USE_TOK': ([61, 76], [78, 78]), 'WITH_TOK': ([94, 109, 159, 160, 209, 241, 291], [-104, 120, -49, -48, -9, -85, -86]), 'FALSE_TOK': ([32, 43, 65, 73, 85, 88, 111, 112, 124, 125, 128, 132, 144, 150, 158, 162, 170, 171, 179, 181, 183, 185, 189, 192, 193, 196, 197, 205, 210, 212, 214, 218, 219, 220, 224, 225, 226, 231, 233, 234, 235, 238, 239, 244, 245, 253, 254, 255, 257, 258, 260, 266, 268, 269, 272, 273, 275, 276, 278, 279, 283, 284, 289, 292, 295, 296, 300, 301, 304, 307, 308, 310, 312], [52, 52, 52, 52, 52, 52, 52, 52, -94, 52, -79, 52, -111, -32, 52, 52, 52, 52, -91, -76, -11, 52, 52, 52, -38, 52, 52, 52, 52, 52, -57, -33, -37, -36, -31, -21, 52, 52, -59, 52, -108, 52, 52, -40, -34, 52, -11, 52, -11, -11, -30, 52, -11, -60, -52, -25, -56, -16, -39, 52, -53, -58, -61, 52, -54, -63, -35, -55, 52, -11, -65, -62, -64]), 'CHECK_TOK': ([0, 112, 124, 125, 128, 130, 132, 144, 150, 158, 162, 170, 171, 179, 181, 183, 185, 189, 193, 196, 197, 205, 210, 214, 218, 219, 220, 224, 225, 233, 234, 235, 238, 239, 244, 245, 253, 254, 257, 258, 260, 268, 269, 272, 273, 275, 276, 278, 279, 283, 284, 289, 292, 295, 296, 300, 301, 304, 307, 308, 310, 312], [1, -66, -94, -66, -79, 148, -66, -111, -32, -66, -66, -66, -66, -91, -76, -11, -66, -66, -38, -66, -66, -66, -66, -57, -33, -37, -36, -31, -21, -59, -66, -108, -66, -66, -40, -34, -66, -11, -11, -11, -30, -11, -60, -52, -25, -56, -16, -39, -66, -53, -58, -61, -66, -54, -63, -35, -55, -66, -11, -65, -62, -64]), 'IDENTIFIER_TOK': ([0, 1, 3, 6, 8, 9, 10, 11, 13, 14, 16, 21, 26, 27, 30, 32, 42, 43, 63, 65, 73, 78, 85, 88, 111, 112, 124, 125, 128, 132, 134, 135, 140, 144, 147, 150, 153, 154, 158, 162, 170, 171, 172, 174, 177, 179, 181, 183, 185, 189, 192, 193, 196, 197, 198, 205, 210, 211, 212, 214, 218, 219, 220, 224, 225, 226, 230, 231, 233, 234, 235, 238, 239, 244, 245, 253, 254, 255, 257, 258, 260, 265, 266, 268, 269, 272, 273, 275, 276, 278, 279, 280, 283, 284, 289, 292, 293, 295, 296, 300, 301, 304, 307, 308, 310, 312], [-22, 7, -23, -24, 12, 17, 18, 20, -95, 12, -92, -109, 20, -112, 40, 45, -7, 45, 82, 45, 45, 95, 45, 45, 45, 129, -94, 129, -79, 129, 155, -13, -45, -111, 165, -32, -90, 155, 182, 129, 129, 129, -107, 199, 207, -91, -76, -11, 182, 129, 45, -38, 129, 129, -28, 182, 182, 207, 45, -57, -33, -37, -36, -31, -21, 45, 207, 45, -59, 182, -108, 182, 182, -40, -34, 182, -11, 45, -11, -11, -30, -43, 45, -11, -60, -52, -25, -56, -16, -39, 129, -41, -53, -58, -61, 129, -42, -54, -63, -35, -55, 182, -11, -65, -62, -64]), 'NONE_TOK': ([32, 43, 65, 73, 85, 88, 111, 112, 124, 125, 128, 132, 144, 150, 158, 162, 170, 171, 179, 181, 183, 185, 189, 192, 193, 196, 197, 205, 210, 212, 214, 218, 219, 220, 224, 225, 226, 231, 233, 234, 235, 238, 239, 244, 245, 253, 254, 255, 257, 258, 260, 266, 268, 269, 272, 273, 275, 276, 278, 279, 283, 284, 289, 292, 295, 296, 300, 301, 304, 307, 308, 310, 312], [55, 55, 55, 55, 55, 55, 55, 55, -94, 55, -79, 55, -111, -32, 55, 55, 55, 55, -91, -76, -11, 55, 55, 55, -38, 55, 55, 55, 55, 55, -57, -33, -37, -36, -31, -21, 55, 55, -59, 55, -108, 55, 55, -40, -34, 55, -11, 55, -11, -11, -30, 55, -11, -60, -52, -25, -56, -16, -39, 55, -53, -58, -61, 55, -54, -63, -35, -55, 55, -11, -65, -62, -64]), 'FORALL_TOK': ([112, 124, 125, 128, 132, 144, 150, 158, 162, 170, 171, 179, 181, 183, 185, 189, 193, 196, 197, 205, 210, 214, 218, 219, 220, 224, 225, 233, 234, 235, 238, 239, 244, 245, 253, 254, 257, 258, 260, 268, 269, 272, 273, 275, 276, 278, 279, 283, 284, 289, 292, 295, 296, 300, 301, 304, 307, 308, 310, 312], [133, -94, 133, -79, 133, -111, -32, 186, 133, 133, 133, -91, -76, -11, 186, 133, -38, 133, 133, 186, 186, -57, -33, -37, -36, -31, -21, -59, 186, -108, 186, 186, -40, -34, 186, -11, -11, -11, -30, -11, -60, -52, -25, -56, -16, -39, 133, -53, -58, -61, 133, -54, -63, -35, -55, 186, -11, -65, -62, -64]), 'STRING_TOK': ([32, 43, 65, 73, 85, 88, 111, 112, 124, 125, 128, 132, 144, 150, 158, 162, 170, 171, 179, 181, 183, 185, 189, 192, 193, 196, 197, 205, 210, 212, 214, 218, 219, 220, 224, 225, 226, 231, 233, 234, 235, 238, 239, 244, 245, 253, 254, 255, 257, 258, 260, 266, 268, 269, 272, 273, 275, 276, 278, 279, 283, 284, 289, 292, 295, 296, 300, 301, 304, 307, 308, 310, 312], [56, 56, 56, 56, 56, 56, 56, 56, -94, 56, -79, 56, -111, -32, 56, 56, 56, 56, -91, -76, -11, 56, 56, 56, -38, 56, 56, 56, 56, 56, -57, -33, -37, -36, -31, -21, 56, 56, -59, 56, -108, 56, 56, -40, -34, 56, -11, 56, -11, -11, -30, 56, -11, -60, -52, -25, -56, -16, -39, 56, -53, -58, -61, 56, -54, -63, -35, -55, 56, -11, -65, -62, -64]), 'WHEN_TOK': ([94, 159, 160, 241, 291], [110, -49, -48, -85, -86]), 'FIRST_TOK': ([112, 124, 125, 128, 132, 144, 150, 158, 162, 170, 171, 177, 179, 181, 183, 185, 189, 193, 196, 197, 205, 210, 214, 218, 219, 220, 224, 225, 233, 234, 235, 238, 239, 244, 245, 253, 254, 257, 258, 260, 268, 269, 272, 273, 275, 276, 278, 279, 283, 284, 289, 292, 295, 296, 300, 301, 304, 307, 308, 310, 312], [132, -94, 132, -79, 132, -111, -32, 185, 132, 132, 132, 205, -91, -76, -11, 185, 132, -38, 132, 132, 185, 185, -57, -33, -37, -36, -31, -21, -59, 185, -108, 185, 185, -40, -34, 185, -11, -11, -11, -30, -11, -60, -52, -25, -56, -16, -39, 132, -53, -58, -61, 132, -54, -63, -35, -55, 185, -11, -65, -62, -64]), 'RP_TOK': ([32, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 65, 67, 68, 69, 70, 71, 73, 74, 83, 84, 85, 86, 87, 88, 89, 90, 99, 101, 102, 103, 104, 105, 111, 115, 116, 117, 123, 136, 137, 192, 212, 221, 226, 231, 237, 247, 252, 255, 266, 270, 282], [-102, 67, -78, -87, -75, -96, -74, -89, -80, 72, -88, -81, -116, -20, -84, -17, 67, -100, -17, -97, -93, -17, -18, -82, -17, 99, -18, 103, 104, -18, -26, -113, -117, -110, -17, -121, -120, -114, -102, 136, 137, -83, 142, -118, -119, -102, -102, 242, -102, -102, 256, 263, 267, -102, -102, 285, 294]), 'FC_EXTRAS_TOK': ([13, 14, 27, 198], [-95, 28, -112, -28]), 'NL_TOK': ([0, 12, 17, 19, 20, 23, 24, 28, 31, 34, 36, 40, 41, 63, 64, 79, 82, 91, 92, 97, 98, 108, 110, 120, 126, 132, 133, 142, 149, 166, 167, 175, 178, 185, 186, 190, 191, 202, 203, 205, 217, 223, 242, 243, 246, 249, 256, 259, 263, 264, 267, 285, 286, 288, 290, 294, 302, 309], [3, -19, -105, 33, -19, -27, 37, 39, 42, 59, 60, -98, -17, -18, -8, 96, -115, -73, 107, 113, 114, 119, 122, 139, 145, 151, 152, 160, 168, -71, 193, 200, 208, 213, 215, 219, 220, -72, 229, 232, 241, 244, 260, 261, 262, 265, 273, 277, 280, 281, 273, 273, 296, 298, 299, 273, 305, 311])}
_lr_action = {}
for (_k, _v) in list(_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 = {'inc_plan_vars': ([183, 254, 257, 258, 268, 307], [210, 210, 210, 210, 210, 210]), 'when_opt': ([94], [109]), 'bc_rules_opt': ([14, 26], [25, 38]), 'parent_opt': ([6], [8]), 'fc_extras': ([14], [26]), 'start_extra_statements': ([33, 39, 60], [58, 62, 77]), 'bc_rules': ([8, 14, 26], [11, 11, 11]), 'file': ([0], [4]), 'fc_premise': ([112, 125, 132, 162, 170, 171, 189, 196, 197, 279, 292], [124, 144, 150, 124, 124, 124, 144, 144, 144, 124, 144]), 'python_plan_code': ([176, 297, 306], [203, 302, 309]), 'bc_require_opt': ([276], [289]), 'plan_spec': ([256, 267, 285, 294], [272, 283, 295, 301]), 'goal': ([78], [94]), 'plan_extras_opt': ([22], [35]), 'pattern': ([32, 73, 88, 111, 112, 125, 132, 158, 162, 170, 171, 185, 189, 192, 196, 197, 205, 210, 212, 226, 231, 234, 238, 239, 253, 255, 266, 279, 292, 304], [47, 90, 105, 47, 127, 127, 127, 127, 127, 127, 127, 127, 127, 47, 127, 127, 127, 127, 47, 47, 47, 127, 127, 127, 127, 47, 47, 127, 127, 127]), 'top': ([0], [2]), 'bc_premise': ([158, 185, 205, 210, 234, 238, 239, 253, 304], [179, 214, 233, 235, 179, 179, 179, 179, 179]), 'assertion': ([134, 154], [153, 172]), 'name': ([158, 177, 185, 205, 210, 211, 230, 234, 238, 239, 253, 304], [184, 204, 184, 184, 184, 236, 251, 184, 184, 184, 184, 184]), 'data_list': ([43, 65], [68, 83]), 'start_python_plan_call': ([273, 298], [287, 303]), 'pattern_proper': ([32, 43, 65, 73, 85, 88, 111, 112, 125, 132, 158, 162, 170, 171, 185, 189, 192, 196, 197, 205, 210, 212, 226, 231, 234, 238, 239, 253, 255, 266, 279, 292, 304], [50, 69, 69, 50, 69, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50]), 'python_goal': ([0], [5]), 'without_names': ([30], [41]), 'bc_extras_opt': ([11], [22]), 'start_python_statements': ([139], [157]), 'patterns_opt': ([32, 111, 192, 212, 226, 231, 255, 266], [51, 123, 221, 237, 247, 252, 270, 282]), 'fc_require_opt': ([225], [245]), 'python_premise': ([112, 125, 132, 158, 162, 170, 171, 185, 189, 196, 197, 205, 210, 234, 238, 239, 253, 279, 292, 304], [128, 128, 128, 181, 128, 128, 128, 181, 128, 128, 128, 181, 181, 181, 181, 181, 181, 128, 128, 181]), 'with_opt': ([109], [121]), 'variable': ([32, 43, 65, 66, 73, 85, 88, 100, 106, 111, 112, 125, 132, 158, 162, 170, 171, 185, 189, 192, 196, 197, 205, 210, 212, 226, 231, 234, 238, 239, 253, 255, 266, 279, 292, 304], [53, 53, 53, 84, 53, 53, 53, 115, 117, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53]), 'fc_rule': ([8, 14], [13, 27]), 'start_python_code': ([112, 125, 127, 132, 142, 149, 158, 162, 170, 171, 175, 185, 187, 189, 196, 197, 205, 210, 234, 238, 239, 253, 279, 292, 304], [130, 130, 146, 130, 161, 169, 130, 130, 130, 130, 201, 130, 216, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130]), 'bc_premises': ([158, 234, 238, 239, 253, 304], [183, 254, 257, 258, 268, 307]), 'data': ([32, 43, 65, 73, 85, 88, 111, 112, 125, 132, 158, 162, 170, 171, 185, 189, 192, 196, 197, 205, 210, 212, 226, 231, 234, 238, 239, 253, 255, 266, 279, 292, 304], [54, 70, 70, 54, 101, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54]), 'patterns_proper': ([43, 65, 85], [71, 71, 102]), 'check_nl': ([112, 125, 132, 134, 154, 158, 162, 170, 171, 185, 189, 196, 197, 205, 210, 234, 238, 239, 253, 279, 292, 304], [131, 131, 131, 156, 156, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131]), 'rest_opt': ([71, 102], [87, 116]), 'fc_rules': ([8], [14]), 'bc_rules_section': ([8, 14, 26], [15, 29, 29]), 'python_extras_code': ([75, 81, 93], [92, 98, 108]), 'nl_opt': ([0], [6]), 'python_rule_code': ([148, 163, 164, 188, 195, 222, 228, 240, 248], [167, 190, 191, 217, 223, 243, 249, 259, 264]), 'colon_opt': ([12, 20], [24, 34]), 'fc_premises': ([112, 162, 170, 171, 279], [125, 189, 196, 197, 292]), 'patterns': ([32, 111, 192, 212, 226, 231, 255, 266], [57, 57, 57, 57, 57, 57, 57, 57]), 'comma_opt': ([41, 57, 68, 71, 83, 102], [64, 74, 86, 89, 86, 89]), 'reset_plan_vars': ([122], [141]), 'taking': ([142], [159]), 'without_opt': ([17], [31]), 'foreach_opt': ([61], [80]), 'bc_rule': ([8, 11, 14, 26], [16, 21, 16, 16]), 'start_python_assertion': ([168, 200], [194, 227]), 'assertions': ([134], [154])}
_lr_goto = {}
for (_k, _v) in list(_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' -> top", "S'", 1, None, None, None), ('top -> file', 'top', 1, 'p_top', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 40), ('top -> python_goal', 'top', 1, 'p_top', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 41), ('python_goal -> CHECK_TOK IDENTIFIER_TOK . IDENTIFIER_TOK LP_TOK patterns_opt RP_TOK', 'python_goal', 7, 'p_goal', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 46), ('file -> nl_opt parent_opt fc_rules bc_rules_opt', 'file', 4, 'p_file', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 51), ('file -> nl_opt parent_opt fc_rules fc_extras bc_rules_opt', 'file', 5, 'p_file_fc_extras', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 56), ('file -> nl_opt parent_opt bc_rules_section', 'file', 3, 'p_file_bc', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 61), ('parent_opt -> EXTENDING_TOK IDENTIFIER_TOK without_opt NL_TOK', 'parent_opt', 4, 'p_parent', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 72), ('without_opt -> WITHOUT_TOK without_names comma_opt', 'without_opt', 3, 'p_second', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 77), ('when_opt -> WHEN_TOK NL_TOK reset_plan_vars INDENT_TOK bc_premises DEINDENT_TOK', 'when_opt', 6, 'p_fourth', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 82), ('reset_plan_vars -> <empty>', 'reset_plan_vars', 0, 'p_reset_plan_vars', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 87), ('inc_plan_vars -> <empty>', 'inc_plan_vars', 0, 'p_inc_plan_vars', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 95), ('bc_extras_opt -> BC_EXTRAS_TOK NL_TOK start_extra_statements INDENT_TOK python_extras_code NL_TOK DEINDENT_TOK', 'bc_extras_opt', 7, 'p_fifth', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 103), ('fc_extras -> FC_EXTRAS_TOK NL_TOK start_extra_statements INDENT_TOK python_extras_code NL_TOK DEINDENT_TOK', 'fc_extras', 7, 'p_fifth', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 104), ('plan_extras_opt -> PLAN_EXTRAS_TOK NL_TOK start_extra_statements INDENT_TOK python_extras_code NL_TOK DEINDENT_TOK', 'plan_extras_opt', 7, 'p_fifth', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 105), ('with_opt -> WITH_TOK NL_TOK start_python_statements INDENT_TOK python_plan_code NL_TOK DEINDENT_TOK', 'with_opt', 7, 'p_fifth', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 106), ('bc_require_opt -> <empty>', 'bc_require_opt', 0, 'p_none', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 111), ('comma_opt -> <empty>', 'comma_opt', 0, 'p_none', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 112), ('comma_opt -> ,', 'comma_opt', 1, 'p_none', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 113), ('colon_opt -> <empty>', 'colon_opt', 0, 'p_none', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 114), ('data -> NONE_TOK', 'data', 1, 'p_none', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 115), ('fc_require_opt -> <empty>', 'fc_require_opt', 0, 'p_none', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 116), ('nl_opt -> <empty>', 'nl_opt', 0, 'p_none', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 117), ('nl_opt -> NL_TOK', 'nl_opt', 1, 'p_none', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 118), ('parent_opt -> <empty>', 'parent_opt', 0, 'p_none', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 119), ('plan_spec -> NL_TOK', 'plan_spec', 1, 'p_none', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 120), ('rest_opt -> comma_opt', 'rest_opt', 1, 'p_none', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 121), ('colon_opt -> :', 'colon_opt', 1, 'p_colon_deprication', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 126), ('fc_rule -> IDENTIFIER_TOK colon_opt NL_TOK INDENT_TOK foreach_opt ASSERT_TOK NL_TOK INDENT_TOK assertions DEINDENT_TOK DEINDENT_TOK', 'fc_rule', 11, 'p_fc_rule', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 134), ('foreach_opt -> FOREACH_TOK NL_TOK INDENT_TOK fc_premises DEINDENT_TOK', 'foreach_opt', 5, 'p_foreach', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 139), ('fc_premise -> IDENTIFIER_TOK . IDENTIFIER_TOK LP_TOK patterns_opt RP_TOK NL_TOK', 'fc_premise', 7, 'p_fc_premise', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 144), ('fc_premise -> FIRST_TOK NL_TOK INDENT_TOK fc_premises DEINDENT_TOK', 'fc_premise', 5, 'p_fc_first_1', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 149), ('fc_premise -> FIRST_TOK fc_premise', 'fc_premise', 2, 'p_fc_first_n', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 154), ('fc_premise -> NOTANY_TOK NL_TOK INDENT_TOK fc_premises DEINDENT_TOK', 'fc_premise', 5, 'p_fc_notany', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 159), ('fc_premise -> FORALL_TOK NL_TOK INDENT_TOK fc_premises DEINDENT_TOK fc_require_opt', 'fc_premise', 6, 'p_fc_forall', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 164), ('fc_require_opt -> REQUIRE_TOK NL_TOK INDENT_TOK fc_premises DEINDENT_TOK', 'fc_require_opt', 5, 'p_fc_require_opt', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 169), ('python_premise -> pattern start_python_code = python_rule_code NL_TOK', 'python_premise', 5, 'p_python_eq', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 174), ('python_premise -> pattern start_python_code IN_TOK python_rule_code NL_TOK', 'python_premise', 5, 'p_python_in', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 179), ('python_premise -> start_python_code CHECK_TOK python_rule_code NL_TOK', 'python_premise', 4, 'p_python_check', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 184), ('python_premise -> check_nl PYTHON_TOK NL_TOK start_python_assertion INDENT_TOK python_rule_code NL_TOK DEINDENT_TOK', 'python_premise', 8, 'p_python_block_n', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 189), ('python_premise -> check_nl PYTHON_TOK start_python_code NOT_NL_TOK python_rule_code NL_TOK', 'python_premise', 6, 'p_python_block_1', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 194), ('assertion -> IDENTIFIER_TOK . IDENTIFIER_TOK LP_TOK patterns_opt RP_TOK NL_TOK', 'assertion', 7, 'p_assertion', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 199), ('assertion -> check_nl PYTHON_TOK NL_TOK start_python_assertion INDENT_TOK python_rule_code NL_TOK DEINDENT_TOK', 'assertion', 8, 'p_python_assertion_n', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 204), ('assertion -> check_nl PYTHON_TOK start_python_code NOT_NL_TOK python_rule_code NL_TOK', 'assertion', 6, 'p_python_assertion_1', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 209), ('check_nl -> <empty>', 'check_nl', 0, 'p_check_nl', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 214), ('bc_rule -> IDENTIFIER_TOK colon_opt NL_TOK INDENT_TOK USE_TOK goal when_opt with_opt DEINDENT_TOK', 'bc_rule', 9, 'p_bc_rule', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 220), ('bc_rules_opt -> <empty>', 'bc_rules_opt', 0, 'p_empty_bc_rules_opt', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 225), ('bc_rules_section -> bc_rules bc_extras_opt plan_extras_opt', 'bc_rules_section', 3, 'p_bc_rules_section', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 230), ('goal -> IDENTIFIER_TOK LP_TOK patterns_opt RP_TOK NL_TOK', 'goal', 5, 'p_goal_no_taking', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 235), ('goal -> IDENTIFIER_TOK LP_TOK patterns_opt RP_TOK taking', 'goal', 5, 'p_goal_taking', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 240), ('name -> IDENTIFIER_TOK', 'name', 1, 'p_name_sym', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 245), ('name -> PATTERN_VAR_TOK', 'name', 1, 'p_name_pat_var', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 250), ('bc_premise -> name LP_TOK patterns_opt RP_TOK plan_spec', 'bc_premise', 5, 'p_bc_premise1', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 255), ('bc_premise -> ! name LP_TOK patterns_opt RP_TOK plan_spec', 'bc_premise', 6, 'p_bc_premise2', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 261), ('bc_premise -> name . name LP_TOK patterns_opt RP_TOK plan_spec', 'bc_premise', 7, 'p_bc_premise3', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 267), ('bc_premise -> ! name . name LP_TOK patterns_opt RP_TOK plan_spec', 'bc_premise', 8, 'p_bc_premise4', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 273), ('bc_premise -> FIRST_TOK NL_TOK INDENT_TOK bc_premises DEINDENT_TOK', 'bc_premise', 5, 'p_bc_first_1f', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 279), ('bc_premise -> FIRST_TOK bc_premise', 'bc_premise', 2, 'p_bc_first_nf', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 284), ('bc_premise -> ! FIRST_TOK NL_TOK INDENT_TOK bc_premises DEINDENT_TOK', 'bc_premise', 6, 'p_bc_first_1t', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 289), ('bc_premise -> ! FIRST_TOK bc_premise', 'bc_premise', 3, 'p_bc_first_nt', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 294), ('bc_premise -> NOTANY_TOK NL_TOK INDENT_TOK bc_premises DEINDENT_TOK', 'bc_premise', 5, 'p_bc_notany', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 299), ('bc_premise -> FORALL_TOK NL_TOK INDENT_TOK bc_premises DEINDENT_TOK bc_require_opt', 'bc_premise', 6, 'p_bc_forall', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 304), ('bc_require_opt -> REQUIRE_TOK NL_TOK INDENT_TOK bc_premises DEINDENT_TOK', 'bc_require_opt', 5, 'p_bc_require_opt', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 309), ('plan_spec -> AS_TOK PATTERN_VAR_TOK NL_TOK', 'plan_spec', 3, 'p_as', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 314), ('plan_spec -> STEP_TOK NUMBER_TOK NL_TOK start_python_plan_call INDENT_TOK python_plan_code NL_TOK DEINDENT_TOK', 'plan_spec', 8, 'p_step_code', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 319), ('plan_spec -> NL_TOK start_python_plan_call INDENT_TOK python_plan_code NL_TOK DEINDENT_TOK', 'plan_spec', 6, 'p_code', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 325), ('start_python_code -> <empty>', 'start_python_code', 0, 'p_start_python_code', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 330), ('start_python_plan_call -> <empty>', 'start_python_plan_call', 0, 'p_start_python_plan_call', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 336), ('start_python_statements -> <empty>', 'start_python_statements', 0, 'p_start_python_statements', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 342), ('start_extra_statements -> <empty>', 'start_extra_statements', 0, 'p_start_extra_statements', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 348), ('start_python_assertion -> <empty>', 'start_python_assertion', 0, 'p_start_python_assertion', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 354), ('python_rule_code -> CODE_TOK', 'python_rule_code', 1, 'p_python_rule_code', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 361), ('python_plan_code -> CODE_TOK', 'python_plan_code', 1, 'p_python_plan_code', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 366), ('python_extras_code -> CODE_TOK', 'python_extras_code', 1, 'p_python_extras_code', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 371), ('variable -> PATTERN_VAR_TOK', 'variable', 1, 'p_pattern_var', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 376), ('variable -> ANONYMOUS_VAR_TOK', 'variable', 1, 'p_anonymous_var', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 386), ('bc_premise -> python_premise', 'bc_premise', 1, 'p_first', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 394), ('bc_rules_opt -> bc_rules_section', 'bc_rules_opt', 1, 'p_first', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 395), ('data -> NUMBER_TOK', 'data', 1, 'p_first', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 396), ('fc_premise -> python_premise', 'fc_premise', 1, 'p_first', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 397), ('pattern -> pattern_proper', 'pattern', 1, 'p_first', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 398), ('pattern_proper -> variable', 'pattern_proper', 1, 'p_first', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 399), ('patterns_opt -> patterns comma_opt', 'patterns_opt', 2, 'p_first', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 400), ('rest_opt -> , * variable', 'rest_opt', 3, 'p_last', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 405), ('data -> STRING_TOK', 'data', 1, 'p_data_string', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 410), ('taking -> start_python_code TAKING_TOK python_rule_code NL_TOK', 'taking', 4, 'p_taking', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 421), ('taking -> NL_TOK INDENT_TOK start_python_code TAKING_TOK python_rule_code NL_TOK DEINDENT_TOK', 'taking', 7, 'p_taking2', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 426), ('data -> IDENTIFIER_TOK', 'data', 1, 'p_quoted_last', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 431), ('data -> FALSE_TOK', 'data', 1, 'p_false', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 439), ('data -> TRUE_TOK', 'data', 1, 'p_true', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 444), ('assertions -> assertion', 'assertions', 1, 'p_start_list', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 449), ('bc_premises -> bc_premise', 'bc_premises', 1, 'p_start_list', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 450), ('bc_rules -> bc_rule', 'bc_rules', 1, 'p_start_list', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 451), ('data_list -> data', 'data_list', 1, 'p_start_list', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 452), ('fc_premises -> fc_premise', 'fc_premises', 1, 'p_start_list', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 453), ('fc_rules -> fc_rule', 'fc_rules', 1, 'p_start_list', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 454), ('patterns -> pattern', 'patterns', 1, 'p_start_list', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 455), ('patterns_proper -> pattern_proper', 'patterns_proper', 1, 'p_start_list', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 456), ('without_names -> IDENTIFIER_TOK', 'without_names', 1, 'p_start_list', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 457), ('bc_extras_opt -> <empty>', 'bc_extras_opt', 0, 'p_empty_tuple', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 462), ('data -> LP_TOK RP_TOK', 'data', 2, 'p_empty_tuple', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 463), ('foreach_opt -> <empty>', 'foreach_opt', 0, 'p_empty_tuple', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 464), ('patterns_opt -> <empty>', 'patterns_opt', 0, 'p_empty_tuple', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 465), ('plan_extras_opt -> <empty>', 'plan_extras_opt', 0, 'p_empty_tuple', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 466), ('when_opt -> <empty>', 'when_opt', 0, 'p_empty_tuple', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 467), ('without_opt -> <empty>', 'without_opt', 0, 'p_empty_tuple', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 468), ('with_opt -> <empty>', 'with_opt', 0, 'p_double_empty_tuple', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 473), ('assertions -> assertions assertion', 'assertions', 2, 'p_append_list', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 478), ('bc_premises -> bc_premises inc_plan_vars bc_premise', 'bc_premises', 3, 'p_append_list', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 479), ('bc_rules -> bc_rules bc_rule', 'bc_rules', 2, 'p_append_list', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 480), ('data_list -> data_list , data', 'data_list', 3, 'p_append_list', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 481), ('fc_premises -> fc_premises fc_premise', 'fc_premises', 2, 'p_append_list', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 482), ('fc_rules -> fc_rules fc_rule', 'fc_rules', 2, 'p_append_list', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 483), ('patterns -> patterns , pattern', 'patterns', 3, 'p_append_list', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 484), ('patterns_proper -> patterns_proper , pattern', 'patterns_proper', 3, 'p_append_list', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 485), ('without_names -> without_names , IDENTIFIER_TOK', 'without_names', 3, 'p_append_list', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 486), ('pattern -> data', 'pattern', 1, 'p_pattern', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 492), ('pattern_proper -> LP_TOK * variable RP_TOK', 'pattern_proper', 4, 'p_pattern_tuple1', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 499), ('pattern_proper -> LP_TOK data_list , * variable RP_TOK', 'pattern_proper', 6, 'p_pattern_tuple2', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 506), ('pattern_proper -> LP_TOK data_list , patterns_proper rest_opt RP_TOK', 'pattern_proper', 6, 'p_pattern_tuple3', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 518), ('pattern_proper -> LP_TOK patterns_proper rest_opt RP_TOK', 'pattern_proper', 4, 'p_pattern_tuple4', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 534), ('data -> LP_TOK data_list comma_opt RP_TOK', 'data', 4, 'p_tuple', '/home/bruce/python/workareas/pyke-hg/r1_working/pyke/krb_compiler/krbparser.py', 543)] |
# The next lines will make the Pixel Turtle and its heading invisible
# and will clear the screen for light show
hidePixel()
hideHeading()
clear()
# Those are the colors for the light show
colors = [white, red, yellow, green, cyan, blue, purple, white]
# First we move to the top left corner
moveTo(0, 0)
# For each color we will make the Pixel Turtle make a stripe of that color
for color in colors:
setColor(color)
# Walk 7 steps backward (since Pixel Turtle is facing up)
backward(7)
# Side step to the right
move(1, 0)
# Walk 7 steps forward
forward(7)
# Side step to the right
move(1, 0)
# Move back to the center of the screen
moveTo(8, 4)
# Set the Pixel Turtle color back to its original green
setColor(green)
# Make both the Pixel Turtle and its heading visible again
showPixel()
showHeading()
| hide_pixel()
hide_heading()
clear()
colors = [white, red, yellow, green, cyan, blue, purple, white]
move_to(0, 0)
for color in colors:
set_color(color)
backward(7)
move(1, 0)
forward(7)
move(1, 0)
move_to(8, 4)
set_color(green)
show_pixel()
show_heading() |
# Write a Python program to multiply two numbers entered by the user and display their product
# for more info on this quiz, go to this url: http://www.programmr.com/multiply-two-numbers-1
def multiply_number():
print("Please enter two numbers")
user_inputs = []
result = 1
for i in range(2):
user_input = int(input("Enter a number: "))
user_inputs.append(user_input)
for i in user_inputs:
result = i * result
return result
print(multiply_number())
| def multiply_number():
print('Please enter two numbers')
user_inputs = []
result = 1
for i in range(2):
user_input = int(input('Enter a number: '))
user_inputs.append(user_input)
for i in user_inputs:
result = i * result
return result
print(multiply_number()) |
personal_details = ('Sanjar', 22, 'India')
print(personal_details)
name, _, country = personal_details
print(name, country)
| personal_details = ('Sanjar', 22, 'India')
print(personal_details)
(name, _, country) = personal_details
print(name, country) |
print ("how old are you?.",)
age=raw_input()
print("How tall are you?.",)
height=raw_input()
print("How much do you weight?.",)
weight=raw_input()
print("So you're %r old,%r tall and %r heavy."%(age,height,weight))
| print('how old are you?.')
age = raw_input()
print('How tall are you?.')
height = raw_input()
print('How much do you weight?.')
weight = raw_input()
print("So you're %r old,%r tall and %r heavy." % (age, height, weight)) |
x = list(input().lower())
y = list(input().lower())
for i,j in zip(x,y):
if i>j:
print("1")
break
elif i<j:
print("-1")
break
else:
print("0") | x = list(input().lower())
y = list(input().lower())
for (i, j) in zip(x, y):
if i > j:
print('1')
break
elif i < j:
print('-1')
break
else:
print('0') |
fashion_mnist = tf.keras.datasets.fashion_mnist
(train_images, train_labels), (test_images, test_labels) = fashion_mnist.load_data()
class_names = ['T-shirt/top', 'Trouser', 'Pullover', 'Dress', 'Coat',
'Sandal', 'Shirt', 'Sneaker', 'Bag', 'Ankle boot']
(train_images, train_labels), (test_images, test_labels) = fashion_mnist.load_data()
idxs = np.arange(len(test_labels))
grouped_idx = [idxs[test_labels==i] for i in range(test_labels.max()+1)]
ims_idx = [idx[0] for idx in grouped_idx]
cm = plt.get_cmap()
fig, ax = plt.subplots(2, 6, figsize=(2*6, 2*2))
ax_idxs = [0,1,2,3,4, 6,7,8,9,10, ]
axs = [ax_xy for ax_y in ax for ax_xy in ax_y]
for i, (ax_idx, im_idx) in enumerate(zip(ax_idxs, ims_idx)):
axi=axs[ax_idx]
im = test_images[im_idx]
im_class = test_labels[im_idx]
axi.imshow(im, cmap='gray')
axi.text(0, 27, f'{class_names[im_class]}', color='w', size=16)
for axi in axs:
for axy in [axi.get_xaxis(), axi.get_yaxis()]:
axy.set_visible(False)
axi.axis('off')
axi = axs[5]
plt.sca(axi)
for i in range(10):
plt.scatter([0], [15], c=[cm.colors[256*i//10]], s=200)
plt.scatter([0], [15], c='w', s=180)
fig.legend(class_names, fontsize=16)
plt.tight_layout(0,1,1)
# ====
mnist = tf.keras.datasets.mnist
(train_images, train_labels), (test_images, test_labels) = mnist.load_data()
class_names = [str(i) for i in range(10)]
idxs = np.arange(len(test_labels))
grouped_idx = [idxs[test_labels==i] for i in range(test_labels.max()+1)]
ims_idx = [idx[10] for idx in grouped_idx]
cm = plt.get_cmap()
fig, ax = plt.subplots(2, 6, figsize=(2*6, 2*2))
ax_idxs = [0,1,2,3,4, 6,7,8,9,10, ]
axs = [ax_xy for ax_y in ax for ax_xy in ax_y]
for i, (ax_idx, im_idx) in enumerate(zip(ax_idxs, ims_idx)):
axi=axs[ax_idx]
im = test_images[im_idx]
im_class = test_labels[im_idx]
axi.imshow(im, cmap='gray')
axi.text(0, 27, f'{class_names[im_class]}', color='w', size=16)
for axi in axs:
for axy in [axi.get_xaxis(), axi.get_yaxis()]:
axy.set_visible(False)
axi.axis('off')
axi = axs[5]
plt.sca(axi)
for i in range(10):
plt.scatter([0], [15], c=[cm.colors[256*i//10]], s=200)
plt.scatter([0], [15], c='w', s=280)
fig.legend(class_names, fontsize=16)
plt.tight_layout(0,1,1) | fashion_mnist = tf.keras.datasets.fashion_mnist
((train_images, train_labels), (test_images, test_labels)) = fashion_mnist.load_data()
class_names = ['T-shirt/top', 'Trouser', 'Pullover', 'Dress', 'Coat', 'Sandal', 'Shirt', 'Sneaker', 'Bag', 'Ankle boot']
((train_images, train_labels), (test_images, test_labels)) = fashion_mnist.load_data()
idxs = np.arange(len(test_labels))
grouped_idx = [idxs[test_labels == i] for i in range(test_labels.max() + 1)]
ims_idx = [idx[0] for idx in grouped_idx]
cm = plt.get_cmap()
(fig, ax) = plt.subplots(2, 6, figsize=(2 * 6, 2 * 2))
ax_idxs = [0, 1, 2, 3, 4, 6, 7, 8, 9, 10]
axs = [ax_xy for ax_y in ax for ax_xy in ax_y]
for (i, (ax_idx, im_idx)) in enumerate(zip(ax_idxs, ims_idx)):
axi = axs[ax_idx]
im = test_images[im_idx]
im_class = test_labels[im_idx]
axi.imshow(im, cmap='gray')
axi.text(0, 27, f'{class_names[im_class]}', color='w', size=16)
for axi in axs:
for axy in [axi.get_xaxis(), axi.get_yaxis()]:
axy.set_visible(False)
axi.axis('off')
axi = axs[5]
plt.sca(axi)
for i in range(10):
plt.scatter([0], [15], c=[cm.colors[256 * i // 10]], s=200)
plt.scatter([0], [15], c='w', s=180)
fig.legend(class_names, fontsize=16)
plt.tight_layout(0, 1, 1)
mnist = tf.keras.datasets.mnist
((train_images, train_labels), (test_images, test_labels)) = mnist.load_data()
class_names = [str(i) for i in range(10)]
idxs = np.arange(len(test_labels))
grouped_idx = [idxs[test_labels == i] for i in range(test_labels.max() + 1)]
ims_idx = [idx[10] for idx in grouped_idx]
cm = plt.get_cmap()
(fig, ax) = plt.subplots(2, 6, figsize=(2 * 6, 2 * 2))
ax_idxs = [0, 1, 2, 3, 4, 6, 7, 8, 9, 10]
axs = [ax_xy for ax_y in ax for ax_xy in ax_y]
for (i, (ax_idx, im_idx)) in enumerate(zip(ax_idxs, ims_idx)):
axi = axs[ax_idx]
im = test_images[im_idx]
im_class = test_labels[im_idx]
axi.imshow(im, cmap='gray')
axi.text(0, 27, f'{class_names[im_class]}', color='w', size=16)
for axi in axs:
for axy in [axi.get_xaxis(), axi.get_yaxis()]:
axy.set_visible(False)
axi.axis('off')
axi = axs[5]
plt.sca(axi)
for i in range(10):
plt.scatter([0], [15], c=[cm.colors[256 * i // 10]], s=200)
plt.scatter([0], [15], c='w', s=280)
fig.legend(class_names, fontsize=16)
plt.tight_layout(0, 1, 1) |
marksheet = []
scores = []
n = int(input())
for i in range(n):
name = input()
score = float(input())
marksheet += [[name, score]]
scores += [score]
li = sorted(set(scores))[1]
for n, s in marksheet:
if s == li:
print(n)
| marksheet = []
scores = []
n = int(input())
for i in range(n):
name = input()
score = float(input())
marksheet += [[name, score]]
scores += [score]
li = sorted(set(scores))[1]
for (n, s) in marksheet:
if s == li:
print(n) |
# -*- coding: utf-8 -*-
def main():
n = int(input())
ans = set()
for i in range(n):
ai, bi = map(int, input().split())
if ai > bi:
ans.add((bi, ai))
else:
ans.add((ai, bi))
print(len(ans))
if __name__ == '__main__':
main()
| def main():
n = int(input())
ans = set()
for i in range(n):
(ai, bi) = map(int, input().split())
if ai > bi:
ans.add((bi, ai))
else:
ans.add((ai, bi))
print(len(ans))
if __name__ == '__main__':
main() |
# vim: set ts=4 sw=4 et fileencoding=utf-8:
'''Vim encoding mappings to Sublime Text'''
ENCODING_MAP = {
'latin1': 'Western (Windows 1252)',
'koi8-r': 'Cyrillic (KOI8-R)',
'koi8-u': 'Cyrillic (KOI8-U)',
'macroman': 'Western (Mac Roman)',
'iso-8859-1': 'Western (ISO 8859-1)',
'iso-8859-2': 'Central European (ISO 8859-2)',
'iso-8859-3': 'Western (ISO 8859-3)',
'iso-8859-4': 'Baltic (ISO 8859-4)',
'iso-8859-5': 'Cyrillic (ISO 8859-5)',
'iso-8859-6': 'Arabic (ISO 8859-6)',
'iso-8859-7': 'Greek (ISO 8859-7)',
'iso-8859-8': 'Hebrew (ISO 8859-8)',
'iso-8859-9': 'Turkish (ISO 8859-9)',
'iso-8859-10': 'Nordic (ISO 8859-10)',
'iso-8859-13': 'Estonian (ISO 8859-13)',
'iso-8859-14': 'Celtic (ISO 8859-14)',
'iso-8859-15': 'Western (ISO 8859-15)',
'iso-8859-16': 'Romanian (ISO 8859-16)',
'cp437': 'DOS (CP 437)',
'cp737': None,
'cp775': None,
'cp850': None,
'cp852': None,
'cp855': None,
'cp857': None,
'cp860': None,
'cp861': None,
'cp862': None,
'cp863': None,
'cp865': None,
'cp866': 'Cyrillic (Windows 866)',
'cp869': None,
'cp874': None,
'cp1250': 'Central European (Windows 1250)',
'cp1251': 'Cyrillic (Windows 1251)',
'cp1252': 'Western (Windows 1252)',
'cp1253': 'Greek (Windows 1253)',
'cp1254': 'Turkish (Windows 1254)',
'cp1255': 'Hebrew (Windows 1255)',
'cp1256': 'Arabic (Windows 1256)',
'cp1257': 'Baltic (Windows 1257)',
'cp1258': 'Vietnamese (Windows 1258)',
'cp932': None,
'euc-jp': None,
'sjis ': None,
'cp949': None,
'euc-kr': None,
'cp936': None,
'euc-cn': None,
'cp950': None,
'big5': None,
'euc-tw': None,
'utf-8': 'utf-8',
'ucs-2le': 'utf-16 le',
'utf-16': 'utf-16 be',
'utf-16le': 'utf-16 le',
'ucs-4': None,
'ucs-4le': None
}
| """Vim encoding mappings to Sublime Text"""
encoding_map = {'latin1': 'Western (Windows 1252)', 'koi8-r': 'Cyrillic (KOI8-R)', 'koi8-u': 'Cyrillic (KOI8-U)', 'macroman': 'Western (Mac Roman)', 'iso-8859-1': 'Western (ISO 8859-1)', 'iso-8859-2': 'Central European (ISO 8859-2)', 'iso-8859-3': 'Western (ISO 8859-3)', 'iso-8859-4': 'Baltic (ISO 8859-4)', 'iso-8859-5': 'Cyrillic (ISO 8859-5)', 'iso-8859-6': 'Arabic (ISO 8859-6)', 'iso-8859-7': 'Greek (ISO 8859-7)', 'iso-8859-8': 'Hebrew (ISO 8859-8)', 'iso-8859-9': 'Turkish (ISO 8859-9)', 'iso-8859-10': 'Nordic (ISO 8859-10)', 'iso-8859-13': 'Estonian (ISO 8859-13)', 'iso-8859-14': 'Celtic (ISO 8859-14)', 'iso-8859-15': 'Western (ISO 8859-15)', 'iso-8859-16': 'Romanian (ISO 8859-16)', 'cp437': 'DOS (CP 437)', 'cp737': None, 'cp775': None, 'cp850': None, 'cp852': None, 'cp855': None, 'cp857': None, 'cp860': None, 'cp861': None, 'cp862': None, 'cp863': None, 'cp865': None, 'cp866': 'Cyrillic (Windows 866)', 'cp869': None, 'cp874': None, 'cp1250': 'Central European (Windows 1250)', 'cp1251': 'Cyrillic (Windows 1251)', 'cp1252': 'Western (Windows 1252)', 'cp1253': 'Greek (Windows 1253)', 'cp1254': 'Turkish (Windows 1254)', 'cp1255': 'Hebrew (Windows 1255)', 'cp1256': 'Arabic (Windows 1256)', 'cp1257': 'Baltic (Windows 1257)', 'cp1258': 'Vietnamese (Windows 1258)', 'cp932': None, 'euc-jp': None, 'sjis ': None, 'cp949': None, 'euc-kr': None, 'cp936': None, 'euc-cn': None, 'cp950': None, 'big5': None, 'euc-tw': None, 'utf-8': 'utf-8', 'ucs-2le': 'utf-16 le', 'utf-16': 'utf-16 be', 'utf-16le': 'utf-16 le', 'ucs-4': None, 'ucs-4le': None} |
#
# PySNMP MIB module NNCEXTPVC-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/NNCEXTPVC-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 20:13:11 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, SingleValueConstraint, ValueRangeConstraint, ConstraintsUnion, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "SingleValueConstraint", "ValueRangeConstraint", "ConstraintsUnion", "ValueSizeConstraint")
InterfaceIndex, = mibBuilder.importSymbols("IF-MIB", "InterfaceIndex")
nncExtensions, = mibBuilder.importSymbols("NNCGNI0001-SMI", "nncExtensions")
ObjectGroup, ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ObjectGroup", "ModuleCompliance", "NotificationGroup")
Integer32, MibScalar, MibTable, MibTableRow, MibTableColumn, Counter32, iso, MibIdentifier, TimeTicks, Counter64, ObjectIdentity, IpAddress, Unsigned32, NotificationType, ModuleIdentity, Bits, Gauge32 = mibBuilder.importSymbols("SNMPv2-SMI", "Integer32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Counter32", "iso", "MibIdentifier", "TimeTicks", "Counter64", "ObjectIdentity", "IpAddress", "Unsigned32", "NotificationType", "ModuleIdentity", "Bits", "Gauge32")
DisplayString, RowStatus, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "RowStatus", "TextualConvention")
nncExtPvc = ModuleIdentity((1, 3, 6, 1, 4, 1, 123, 3, 79))
if mibBuilder.loadTexts: nncExtPvc.setLastUpdated('200101261907Z')
if mibBuilder.loadTexts: nncExtPvc.setOrganization('Alcatel Networks Corporation')
nncExtPvcObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 123, 3, 79, 1))
nncExtPvcGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 123, 3, 79, 3))
nncExtPvcCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 123, 3, 79, 4))
nncCrPvpcTable = MibTable((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1), )
if mibBuilder.loadTexts: nncCrPvpcTable.setStatus('current')
nncCrPvpcTableEntry = MibTableRow((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1), ).setIndexNames((0, "NNCEXTPVC-MIB", "nncCrPvpcSrcIfIndex"), (0, "NNCEXTPVC-MIB", "nncCrPvpcSrcVpi"), (0, "NNCEXTPVC-MIB", "nncCrPvpcDstIfIndex"), (0, "NNCEXTPVC-MIB", "nncCrPvpcDstVpi"))
if mibBuilder.loadTexts: nncCrPvpcTableEntry.setStatus('current')
nncCrPvpcSrcIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 1), InterfaceIndex())
if mibBuilder.loadTexts: nncCrPvpcSrcIfIndex.setStatus('current')
nncCrPvpcSrcVpi = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 4095)))
if mibBuilder.loadTexts: nncCrPvpcSrcVpi.setStatus('current')
nncCrPvpcDstIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 3), InterfaceIndex())
if mibBuilder.loadTexts: nncCrPvpcDstIfIndex.setStatus('current')
nncCrPvpcDstVpi = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 4095)))
if mibBuilder.loadTexts: nncCrPvpcDstVpi.setStatus('current')
nncCrPvpcCastType = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("p2p", 1), ("p2mp", 2))).clone('p2p')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nncCrPvpcCastType.setStatus('current')
nncCrPvpcFwdServiceCategory = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 6))).clone(namedValues=NamedValues(("cbr", 1), ("nrtvbr", 2), ("abr", 3), ("ubr", 4), ("rtvbr", 6))).clone('nrtvbr')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nncCrPvpcFwdServiceCategory.setStatus('current')
nncCrPvpcBwdServiceCategory = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 6))).clone(namedValues=NamedValues(("cbr", 1), ("nrtvbr", 2), ("abr", 3), ("ubr", 4), ("rtvbr", 6))).clone('nrtvbr')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nncCrPvpcBwdServiceCategory.setStatus('current')
nncCrPvpcFwdAbrDynTrfcIcr = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2488320)).clone(1000)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nncCrPvpcFwdAbrDynTrfcIcr.setStatus('current')
nncCrPvpcFwdAbrDynTrfcRif = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 9), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 9)).clone(9)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nncCrPvpcFwdAbrDynTrfcRif.setStatus('current')
nncCrPvpcFwdAbrDynTrfcRdf = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 10), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 9)).clone(9)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nncCrPvpcFwdAbrDynTrfcRdf.setStatus('current')
nncCrPvpcBwdAbrDynTrfcIcr = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 11), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2488320)).clone(1000)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nncCrPvpcBwdAbrDynTrfcIcr.setStatus('current')
nncCrPvpcBwdAbrDynTrfcRif = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 12), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 9)).clone(9)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nncCrPvpcBwdAbrDynTrfcRif.setStatus('current')
nncCrPvpcBwdAbrDynTrfcRdf = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 13), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 9)).clone(9)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nncCrPvpcBwdAbrDynTrfcRdf.setStatus('current')
nncCrPvpcSrcBillingFlag = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 14), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1))).clone('disabled')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nncCrPvpcSrcBillingFlag.setStatus('current')
nncCrPvpcDstBillingFlag = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 15), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1))).clone('disabled')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nncCrPvpcDstBillingFlag.setStatus('current')
nncCrPvpcFwdTmTrafficDescriptor = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 16), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("none", 0), ("tagAll", 1), ("p0Plus1", 2), ("p0Plus1SlashS0Plus1", 3), ("p0Plus1SlashS0", 4), ("p0Plus1SlashM0Plus1", 5))).clone('p0Plus1SlashS0Plus1')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nncCrPvpcFwdTmTrafficDescriptor.setStatus('current')
nncCrPvpcFwdTmPolicingOption = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 17), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))).clone(namedValues=NamedValues(("none", 0), ("disabled", 1), ("tag", 2), ("discard", 3))).clone('disabled')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nncCrPvpcFwdTmPolicingOption.setStatus('current')
nncCrPvpcFwdTmBucketOneRate = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 18), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2488320)).clone(1000)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nncCrPvpcFwdTmBucketOneRate.setStatus('current')
nncCrPvpcFwdTmBucketOneCdvt = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 19), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 190000)).clone(250)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nncCrPvpcFwdTmBucketOneCdvt.setStatus('current')
nncCrPvpcFwdTmBucketTwoRate = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 20), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2488320)).clone(1000)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nncCrPvpcFwdTmBucketTwoRate.setStatus('current')
nncCrPvpcFwdTmBucketTwoMbs = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 21), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 10000)).clone(32)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nncCrPvpcFwdTmBucketTwoMbs.setStatus('current')
nncCrPvpcFwdTmCdv = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 22), Integer32().subtype(subtypeSpec=ValueRangeConstraint(250, 10000)).clone(10000)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nncCrPvpcFwdTmCdv.setStatus('current')
nncCrPvpcFwdTmClr = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 23), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 7)).clone(7)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nncCrPvpcFwdTmClr.setStatus('current')
nncCrPvpcBwdTmTrafficDescriptor = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 24), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("none", 0), ("tagAll", 1), ("p0Plus1", 2), ("p0Plus1SlashS0Plus1", 3), ("p0Plus1SlashS0", 4), ("p0Plus1SlashM0Plus1", 5))).clone('p0Plus1SlashS0Plus1')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nncCrPvpcBwdTmTrafficDescriptor.setStatus('current')
nncCrPvpcBwdTmPolicingOption = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 25), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))).clone(namedValues=NamedValues(("none", 0), ("disabled", 1), ("tag", 2), ("discard", 3))).clone('disabled')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nncCrPvpcBwdTmPolicingOption.setStatus('current')
nncCrPvpcBwdTmBucketOneRate = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 26), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2488320)).clone(1000)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nncCrPvpcBwdTmBucketOneRate.setStatus('current')
nncCrPvpcBwdTmBucketOneCdvt = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 27), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 190000)).clone(250)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nncCrPvpcBwdTmBucketOneCdvt.setStatus('current')
nncCrPvpcBwdTmBucketTwoRate = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 28), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2488320)).clone(1000)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nncCrPvpcBwdTmBucketTwoRate.setStatus('current')
nncCrPvpcBwdTmBucketTwoMbs = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 29), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 10000)).clone(32)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nncCrPvpcBwdTmBucketTwoMbs.setStatus('current')
nncCrPvpcBwdTmCdv = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 30), Integer32().subtype(subtypeSpec=ValueRangeConstraint(250, 10000)).clone(10000)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nncCrPvpcBwdTmCdv.setStatus('current')
nncCrPvpcBwdTmClr = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 31), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 7)).clone(7)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nncCrPvpcBwdTmClr.setStatus('current')
nncCrPvpcSrcAlsConfig = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 32), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1))).clone('disabled')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nncCrPvpcSrcAlsConfig.setStatus('current')
nncCrPvpcDstAlsConfig = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 33), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1))).clone('disabled')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nncCrPvpcDstAlsConfig.setStatus('current')
nncCrPvpcCreator = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 34), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 9))).clone(namedValues=NamedValues(("unknown", 0), ("nmti", 1), ("nm5620", 2), ("snmp", 9)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: nncCrPvpcCreator.setStatus('current')
nncCrPvpcRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 35), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nncCrPvpcRowStatus.setStatus('current')
nncCrPvccTable = MibTable((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2), )
if mibBuilder.loadTexts: nncCrPvccTable.setStatus('current')
nncCrPvccTableEntry = MibTableRow((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1), ).setIndexNames((0, "NNCEXTPVC-MIB", "nncCrPvccSrcIfIndex"), (0, "NNCEXTPVC-MIB", "nncCrPvccSrcVpi"), (0, "NNCEXTPVC-MIB", "nncCrPvccSrcVci"), (0, "NNCEXTPVC-MIB", "nncCrPvccDstIfIndex"), (0, "NNCEXTPVC-MIB", "nncCrPvccDstVpi"), (0, "NNCEXTPVC-MIB", "nncCrPvccDstVci"))
if mibBuilder.loadTexts: nncCrPvccTableEntry.setStatus('current')
nncCrPvccSrcIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 1), InterfaceIndex())
if mibBuilder.loadTexts: nncCrPvccSrcIfIndex.setStatus('current')
nncCrPvccSrcVpi = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 4095)))
if mibBuilder.loadTexts: nncCrPvccSrcVpi.setStatus('current')
nncCrPvccSrcVci = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535)))
if mibBuilder.loadTexts: nncCrPvccSrcVci.setStatus('current')
nncCrPvccDstIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 4), InterfaceIndex())
if mibBuilder.loadTexts: nncCrPvccDstIfIndex.setStatus('current')
nncCrPvccDstVpi = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 4095)))
if mibBuilder.loadTexts: nncCrPvccDstVpi.setStatus('current')
nncCrPvccDstVci = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535)))
if mibBuilder.loadTexts: nncCrPvccDstVci.setStatus('current')
nncCrPvccCastType = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("p2p", 1), ("p2mp", 2))).clone('p2p')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nncCrPvccCastType.setStatus('current')
nncCrPvccFwdServiceCategory = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 6))).clone(namedValues=NamedValues(("cbr", 1), ("nrtvbr", 2), ("abr", 3), ("ubr", 4), ("rtvbr", 6))).clone('nrtvbr')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nncCrPvccFwdServiceCategory.setStatus('current')
nncCrPvccBwdServiceCategory = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 6))).clone(namedValues=NamedValues(("cbr", 1), ("nrtvbr", 2), ("abr", 3), ("ubr", 4), ("rtvbr", 6))).clone('nrtvbr')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nncCrPvccBwdServiceCategory.setStatus('current')
nncCrPvccFwdAbrDynTrfcIcr = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 10), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2488320)).clone(1000)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nncCrPvccFwdAbrDynTrfcIcr.setStatus('current')
nncCrPvccFwdAbrDynTrfcRif = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 11), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 9)).clone(9)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nncCrPvccFwdAbrDynTrfcRif.setStatus('current')
nncCrPvccFwdAbrDynTrfcRdf = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 12), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 9)).clone(9)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nncCrPvccFwdAbrDynTrfcRdf.setStatus('current')
nncCrPvccBwdAbrDynTrfcIcr = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 13), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2488320)).clone(1000)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nncCrPvccBwdAbrDynTrfcIcr.setStatus('current')
nncCrPvccBwdAbrDynTrfcRif = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 14), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 9)).clone(9)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nncCrPvccBwdAbrDynTrfcRif.setStatus('current')
nncCrPvccBwdAbrDynTrfcRdf = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 15), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 9)).clone(9)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nncCrPvccBwdAbrDynTrfcRdf.setStatus('current')
nncCrPvccSrcBillingFlag = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 16), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1))).clone('disabled')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nncCrPvccSrcBillingFlag.setStatus('current')
nncCrPvccDstBillingFlag = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 17), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1))).clone('disabled')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nncCrPvccDstBillingFlag.setStatus('current')
nncCrPvccFwdTmTrafficDescriptor = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 18), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("none", 0), ("tagAll", 1), ("p0Plus1", 2), ("p0Plus1SlashS0Plus1", 3), ("p0Plus1SlashS0", 4), ("p0Plus1SlashM0Plus1", 5))).clone('p0Plus1SlashS0Plus1')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nncCrPvccFwdTmTrafficDescriptor.setStatus('current')
nncCrPvccFwdTmPolicingOption = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 19), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))).clone(namedValues=NamedValues(("none", 0), ("disabled", 1), ("tag", 2), ("discard", 3))).clone('disabled')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nncCrPvccFwdTmPolicingOption.setStatus('current')
nncCrPvccFwdTmBucketOneRate = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 20), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2488320)).clone(1000)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nncCrPvccFwdTmBucketOneRate.setStatus('current')
nncCrPvccFwdTmBucketOneCdvt = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 21), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 190000)).clone(250)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nncCrPvccFwdTmBucketOneCdvt.setStatus('current')
nncCrPvccFwdTmBucketTwoRate = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 22), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2488320)).clone(1000)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nncCrPvccFwdTmBucketTwoRate.setStatus('current')
nncCrPvccFwdTmBucketTwoMbs = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 23), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 10000)).clone(32)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nncCrPvccFwdTmBucketTwoMbs.setStatus('current')
nncCrPvccFwdTmCdv = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 24), Integer32().subtype(subtypeSpec=ValueRangeConstraint(250, 10000)).clone(10000)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nncCrPvccFwdTmCdv.setStatus('current')
nncCrPvccFwdTmClr = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 25), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 7)).clone(7)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nncCrPvccFwdTmClr.setStatus('current')
nncCrPvccFwdTmFrameDiscard = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 26), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1))).clone('disabled')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nncCrPvccFwdTmFrameDiscard.setStatus('current')
nncCrPvccBwdTmTrafficDescriptor = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 27), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("none", 0), ("tagAll", 1), ("p0Plus1", 2), ("p0Plus1SlashS0Plus1", 3), ("p0Plus1SlashS0", 4), ("p0Plus1SlashM0Plus1", 5))).clone('p0Plus1SlashS0Plus1')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nncCrPvccBwdTmTrafficDescriptor.setStatus('current')
nncCrPvccBwdTmPolicingOption = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 28), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))).clone(namedValues=NamedValues(("none", 0), ("disabled", 1), ("tag", 2), ("discard", 3))).clone('disabled')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nncCrPvccBwdTmPolicingOption.setStatus('current')
nncCrPvccBwdTmBucketOneRate = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 29), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2488320)).clone(1000)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nncCrPvccBwdTmBucketOneRate.setStatus('current')
nncCrPvccBwdTmBucketOneCdvt = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 30), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 190000)).clone(250)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nncCrPvccBwdTmBucketOneCdvt.setStatus('current')
nncCrPvccBwdTmBucketTwoRate = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 31), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2488320)).clone(1000)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nncCrPvccBwdTmBucketTwoRate.setStatus('current')
nncCrPvccBwdTmBucketTwoMbs = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 32), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 10000)).clone(32)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nncCrPvccBwdTmBucketTwoMbs.setStatus('current')
nncCrPvccBwdTmCdv = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 33), Integer32().subtype(subtypeSpec=ValueRangeConstraint(250, 10000)).clone(10000)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nncCrPvccBwdTmCdv.setStatus('current')
nncCrPvccBwdTmClr = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 34), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 7)).clone(7)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nncCrPvccBwdTmClr.setStatus('current')
nncCrPvccBwdTmFrameDiscard = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 35), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1))).clone('disabled')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nncCrPvccBwdTmFrameDiscard.setStatus('current')
nncCrPvccSrcAlsConfig = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 36), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1))).clone('disabled')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nncCrPvccSrcAlsConfig.setStatus('current')
nncCrPvccDstAlsConfig = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 37), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1))).clone(namedValues=NamedValues(("disabled", 0), ("enabled", 1))).clone('disabled')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nncCrPvccDstAlsConfig.setStatus('current')
nncCrPvccCreator = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 38), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 9))).clone(namedValues=NamedValues(("unknown", 0), ("nmti", 1), ("nm5620", 2), ("snmp", 9)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: nncCrPvccCreator.setStatus('current')
nncCrPvccRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 39), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nncCrPvccRowStatus.setStatus('current')
nncCrPvpcGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 123, 3, 79, 3, 1)).setObjects(("NNCEXTPVC-MIB", "nncCrPvpcSrcIfIndex"), ("NNCEXTPVC-MIB", "nncCrPvpcSrcVpi"), ("NNCEXTPVC-MIB", "nncCrPvpcDstIfIndex"), ("NNCEXTPVC-MIB", "nncCrPvpcDstVpi"), ("NNCEXTPVC-MIB", "nncCrPvpcCastType"), ("NNCEXTPVC-MIB", "nncCrPvpcFwdServiceCategory"), ("NNCEXTPVC-MIB", "nncCrPvpcBwdServiceCategory"), ("NNCEXTPVC-MIB", "nncCrPvpcFwdAbrDynTrfcIcr"), ("NNCEXTPVC-MIB", "nncCrPvpcFwdAbrDynTrfcRif"), ("NNCEXTPVC-MIB", "nncCrPvpcFwdAbrDynTrfcRdf"), ("NNCEXTPVC-MIB", "nncCrPvpcBwdAbrDynTrfcIcr"), ("NNCEXTPVC-MIB", "nncCrPvpcBwdAbrDynTrfcRif"), ("NNCEXTPVC-MIB", "nncCrPvpcBwdAbrDynTrfcRdf"), ("NNCEXTPVC-MIB", "nncCrPvpcSrcBillingFlag"), ("NNCEXTPVC-MIB", "nncCrPvpcDstBillingFlag"), ("NNCEXTPVC-MIB", "nncCrPvpcFwdTmTrafficDescriptor"), ("NNCEXTPVC-MIB", "nncCrPvpcFwdTmPolicingOption"), ("NNCEXTPVC-MIB", "nncCrPvpcFwdTmBucketOneRate"), ("NNCEXTPVC-MIB", "nncCrPvpcFwdTmBucketOneCdvt"), ("NNCEXTPVC-MIB", "nncCrPvpcFwdTmBucketTwoRate"), ("NNCEXTPVC-MIB", "nncCrPvpcFwdTmBucketTwoMbs"), ("NNCEXTPVC-MIB", "nncCrPvpcFwdTmCdv"), ("NNCEXTPVC-MIB", "nncCrPvpcFwdTmClr"), ("NNCEXTPVC-MIB", "nncCrPvpcBwdTmTrafficDescriptor"), ("NNCEXTPVC-MIB", "nncCrPvpcBwdTmPolicingOption"), ("NNCEXTPVC-MIB", "nncCrPvpcBwdTmBucketOneRate"), ("NNCEXTPVC-MIB", "nncCrPvpcBwdTmBucketOneCdvt"), ("NNCEXTPVC-MIB", "nncCrPvpcBwdTmBucketTwoRate"), ("NNCEXTPVC-MIB", "nncCrPvpcBwdTmBucketTwoMbs"), ("NNCEXTPVC-MIB", "nncCrPvpcBwdTmCdv"), ("NNCEXTPVC-MIB", "nncCrPvpcBwdTmClr"), ("NNCEXTPVC-MIB", "nncCrPvpcSrcAlsConfig"), ("NNCEXTPVC-MIB", "nncCrPvpcDstAlsConfig"), ("NNCEXTPVC-MIB", "nncCrPvpcCreator"), ("NNCEXTPVC-MIB", "nncCrPvpcRowStatus"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
nncCrPvpcGroup = nncCrPvpcGroup.setStatus('current')
nncCrPvccGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 123, 3, 79, 3, 2)).setObjects(("NNCEXTPVC-MIB", "nncCrPvccSrcIfIndex"), ("NNCEXTPVC-MIB", "nncCrPvccSrcVpi"), ("NNCEXTPVC-MIB", "nncCrPvccSrcVci"), ("NNCEXTPVC-MIB", "nncCrPvccDstIfIndex"), ("NNCEXTPVC-MIB", "nncCrPvccDstVpi"), ("NNCEXTPVC-MIB", "nncCrPvccDstVci"), ("NNCEXTPVC-MIB", "nncCrPvccCastType"), ("NNCEXTPVC-MIB", "nncCrPvccFwdServiceCategory"), ("NNCEXTPVC-MIB", "nncCrPvccBwdServiceCategory"), ("NNCEXTPVC-MIB", "nncCrPvccFwdAbrDynTrfcIcr"), ("NNCEXTPVC-MIB", "nncCrPvccFwdAbrDynTrfcRif"), ("NNCEXTPVC-MIB", "nncCrPvccFwdAbrDynTrfcRdf"), ("NNCEXTPVC-MIB", "nncCrPvccBwdAbrDynTrfcIcr"), ("NNCEXTPVC-MIB", "nncCrPvccBwdAbrDynTrfcRif"), ("NNCEXTPVC-MIB", "nncCrPvccBwdAbrDynTrfcRdf"), ("NNCEXTPVC-MIB", "nncCrPvccSrcBillingFlag"), ("NNCEXTPVC-MIB", "nncCrPvccDstBillingFlag"), ("NNCEXTPVC-MIB", "nncCrPvccFwdTmTrafficDescriptor"), ("NNCEXTPVC-MIB", "nncCrPvccFwdTmPolicingOption"), ("NNCEXTPVC-MIB", "nncCrPvccFwdTmBucketOneRate"), ("NNCEXTPVC-MIB", "nncCrPvccFwdTmBucketOneCdvt"), ("NNCEXTPVC-MIB", "nncCrPvccFwdTmBucketTwoRate"), ("NNCEXTPVC-MIB", "nncCrPvccFwdTmBucketTwoMbs"), ("NNCEXTPVC-MIB", "nncCrPvccFwdTmCdv"), ("NNCEXTPVC-MIB", "nncCrPvccFwdTmClr"), ("NNCEXTPVC-MIB", "nncCrPvccFwdTmFrameDiscard"), ("NNCEXTPVC-MIB", "nncCrPvccBwdTmTrafficDescriptor"), ("NNCEXTPVC-MIB", "nncCrPvccBwdTmPolicingOption"), ("NNCEXTPVC-MIB", "nncCrPvccBwdTmBucketOneRate"), ("NNCEXTPVC-MIB", "nncCrPvccBwdTmBucketOneCdvt"), ("NNCEXTPVC-MIB", "nncCrPvccBwdTmBucketTwoRate"), ("NNCEXTPVC-MIB", "nncCrPvccBwdTmBucketTwoMbs"), ("NNCEXTPVC-MIB", "nncCrPvccBwdTmCdv"), ("NNCEXTPVC-MIB", "nncCrPvccBwdTmClr"), ("NNCEXTPVC-MIB", "nncCrPvccBwdTmFrameDiscard"), ("NNCEXTPVC-MIB", "nncCrPvccSrcAlsConfig"), ("NNCEXTPVC-MIB", "nncCrPvccDstAlsConfig"), ("NNCEXTPVC-MIB", "nncCrPvccCreator"), ("NNCEXTPVC-MIB", "nncCrPvccRowStatus"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
nncCrPvccGroup = nncCrPvccGroup.setStatus('current')
nncPvcCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 123, 3, 79, 4, 1)).setObjects(("NNCEXTPVC-MIB", "nncCrPvpcGroup"), ("NNCEXTPVC-MIB", "nncCrPvccGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
nncPvcCompliance = nncPvcCompliance.setStatus('current')
mibBuilder.exportSymbols("NNCEXTPVC-MIB", nncCrPvpcBwdTmClr=nncCrPvpcBwdTmClr, nncCrPvpcSrcBillingFlag=nncCrPvpcSrcBillingFlag, nncCrPvccDstIfIndex=nncCrPvccDstIfIndex, nncExtPvcGroups=nncExtPvcGroups, nncCrPvpcFwdAbrDynTrfcIcr=nncCrPvpcFwdAbrDynTrfcIcr, nncCrPvccFwdAbrDynTrfcIcr=nncCrPvccFwdAbrDynTrfcIcr, nncCrPvpcFwdServiceCategory=nncCrPvpcFwdServiceCategory, nncCrPvpcTableEntry=nncCrPvpcTableEntry, nncCrPvccCastType=nncCrPvccCastType, nncCrPvccBwdAbrDynTrfcRif=nncCrPvccBwdAbrDynTrfcRif, nncCrPvccBwdAbrDynTrfcIcr=nncCrPvccBwdAbrDynTrfcIcr, nncCrPvpcFwdTmBucketTwoMbs=nncCrPvpcFwdTmBucketTwoMbs, nncCrPvccCreator=nncCrPvccCreator, nncCrPvccFwdTmBucketTwoRate=nncCrPvccFwdTmBucketTwoRate, nncCrPvpcSrcIfIndex=nncCrPvpcSrcIfIndex, nncCrPvccBwdTmBucketTwoRate=nncCrPvccBwdTmBucketTwoRate, nncCrPvpcBwdAbrDynTrfcIcr=nncCrPvpcBwdAbrDynTrfcIcr, nncCrPvpcBwdTmBucketOneCdvt=nncCrPvpcBwdTmBucketOneCdvt, nncCrPvccFwdTmFrameDiscard=nncCrPvccFwdTmFrameDiscard, nncCrPvccDstVci=nncCrPvccDstVci, nncExtPvcObjects=nncExtPvcObjects, nncCrPvpcDstIfIndex=nncCrPvpcDstIfIndex, nncCrPvccTableEntry=nncCrPvccTableEntry, nncCrPvccSrcVci=nncCrPvccSrcVci, nncCrPvccRowStatus=nncCrPvccRowStatus, PYSNMP_MODULE_ID=nncExtPvc, nncCrPvccSrcVpi=nncCrPvccSrcVpi, nncCrPvccFwdTmBucketTwoMbs=nncCrPvccFwdTmBucketTwoMbs, nncCrPvccBwdTmFrameDiscard=nncCrPvccBwdTmFrameDiscard, nncCrPvpcFwdAbrDynTrfcRdf=nncCrPvpcFwdAbrDynTrfcRdf, nncCrPvccFwdTmCdv=nncCrPvccFwdTmCdv, nncCrPvpcDstAlsConfig=nncCrPvpcDstAlsConfig, nncCrPvpcBwdServiceCategory=nncCrPvpcBwdServiceCategory, nncCrPvpcFwdTmPolicingOption=nncCrPvpcFwdTmPolicingOption, nncPvcCompliance=nncPvcCompliance, nncCrPvpcBwdTmTrafficDescriptor=nncCrPvpcBwdTmTrafficDescriptor, nncCrPvccFwdTmTrafficDescriptor=nncCrPvccFwdTmTrafficDescriptor, nncCrPvccBwdTmBucketTwoMbs=nncCrPvccBwdTmBucketTwoMbs, nncCrPvccBwdTmPolicingOption=nncCrPvccBwdTmPolicingOption, nncCrPvccFwdTmBucketOneRate=nncCrPvccFwdTmBucketOneRate, nncCrPvccBwdAbrDynTrfcRdf=nncCrPvccBwdAbrDynTrfcRdf, nncCrPvccSrcBillingFlag=nncCrPvccSrcBillingFlag, nncCrPvccFwdTmBucketOneCdvt=nncCrPvccFwdTmBucketOneCdvt, nncCrPvccBwdTmBucketOneRate=nncCrPvccBwdTmBucketOneRate, nncCrPvpcTable=nncCrPvpcTable, nncCrPvpcDstBillingFlag=nncCrPvpcDstBillingFlag, nncCrPvpcFwdTmCdv=nncCrPvpcFwdTmCdv, nncCrPvccDstBillingFlag=nncCrPvccDstBillingFlag, nncCrPvccFwdAbrDynTrfcRdf=nncCrPvccFwdAbrDynTrfcRdf, nncExtPvc=nncExtPvc, nncExtPvcCompliances=nncExtPvcCompliances, nncCrPvccFwdTmClr=nncCrPvccFwdTmClr, nncCrPvpcDstVpi=nncCrPvpcDstVpi, nncCrPvpcBwdAbrDynTrfcRdf=nncCrPvpcBwdAbrDynTrfcRdf, nncCrPvpcSrcVpi=nncCrPvpcSrcVpi, nncCrPvpcFwdTmTrafficDescriptor=nncCrPvpcFwdTmTrafficDescriptor, nncCrPvccSrcIfIndex=nncCrPvccSrcIfIndex, nncCrPvpcFwdTmClr=nncCrPvpcFwdTmClr, nncCrPvccSrcAlsConfig=nncCrPvccSrcAlsConfig, nncCrPvccBwdTmClr=nncCrPvccBwdTmClr, nncCrPvpcCastType=nncCrPvpcCastType, nncCrPvpcFwdAbrDynTrfcRif=nncCrPvpcFwdAbrDynTrfcRif, nncCrPvccTable=nncCrPvccTable, nncCrPvpcRowStatus=nncCrPvpcRowStatus, nncCrPvpcBwdTmBucketTwoRate=nncCrPvpcBwdTmBucketTwoRate, nncCrPvccBwdServiceCategory=nncCrPvccBwdServiceCategory, nncCrPvpcGroup=nncCrPvpcGroup, nncCrPvccGroup=nncCrPvccGroup, nncCrPvpcBwdTmCdv=nncCrPvpcBwdTmCdv, nncCrPvccBwdTmCdv=nncCrPvccBwdTmCdv, nncCrPvpcBwdTmPolicingOption=nncCrPvpcBwdTmPolicingOption, nncCrPvpcFwdTmBucketOneRate=nncCrPvpcFwdTmBucketOneRate, nncCrPvpcBwdAbrDynTrfcRif=nncCrPvpcBwdAbrDynTrfcRif, nncCrPvpcFwdTmBucketTwoRate=nncCrPvpcFwdTmBucketTwoRate, nncCrPvpcBwdTmBucketTwoMbs=nncCrPvpcBwdTmBucketTwoMbs, nncCrPvccBwdTmBucketOneCdvt=nncCrPvccBwdTmBucketOneCdvt, nncCrPvccFwdAbrDynTrfcRif=nncCrPvccFwdAbrDynTrfcRif, nncCrPvccDstVpi=nncCrPvccDstVpi, nncCrPvccBwdTmTrafficDescriptor=nncCrPvccBwdTmTrafficDescriptor, nncCrPvccDstAlsConfig=nncCrPvccDstAlsConfig, nncCrPvpcSrcAlsConfig=nncCrPvpcSrcAlsConfig, nncCrPvpcBwdTmBucketOneRate=nncCrPvpcBwdTmBucketOneRate, nncCrPvpcCreator=nncCrPvpcCreator, nncCrPvpcFwdTmBucketOneCdvt=nncCrPvpcFwdTmBucketOneCdvt, nncCrPvccFwdServiceCategory=nncCrPvccFwdServiceCategory, nncCrPvccFwdTmPolicingOption=nncCrPvccFwdTmPolicingOption)
| (object_identifier, integer, octet_string) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'Integer', 'OctetString')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(constraints_intersection, single_value_constraint, value_range_constraint, constraints_union, value_size_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsIntersection', 'SingleValueConstraint', 'ValueRangeConstraint', 'ConstraintsUnion', 'ValueSizeConstraint')
(interface_index,) = mibBuilder.importSymbols('IF-MIB', 'InterfaceIndex')
(nnc_extensions,) = mibBuilder.importSymbols('NNCGNI0001-SMI', 'nncExtensions')
(object_group, module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ObjectGroup', 'ModuleCompliance', 'NotificationGroup')
(integer32, mib_scalar, mib_table, mib_table_row, mib_table_column, counter32, iso, mib_identifier, time_ticks, counter64, object_identity, ip_address, unsigned32, notification_type, module_identity, bits, gauge32) = mibBuilder.importSymbols('SNMPv2-SMI', 'Integer32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Counter32', 'iso', 'MibIdentifier', 'TimeTicks', 'Counter64', 'ObjectIdentity', 'IpAddress', 'Unsigned32', 'NotificationType', 'ModuleIdentity', 'Bits', 'Gauge32')
(display_string, row_status, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'RowStatus', 'TextualConvention')
nnc_ext_pvc = module_identity((1, 3, 6, 1, 4, 1, 123, 3, 79))
if mibBuilder.loadTexts:
nncExtPvc.setLastUpdated('200101261907Z')
if mibBuilder.loadTexts:
nncExtPvc.setOrganization('Alcatel Networks Corporation')
nnc_ext_pvc_objects = mib_identifier((1, 3, 6, 1, 4, 1, 123, 3, 79, 1))
nnc_ext_pvc_groups = mib_identifier((1, 3, 6, 1, 4, 1, 123, 3, 79, 3))
nnc_ext_pvc_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 123, 3, 79, 4))
nnc_cr_pvpc_table = mib_table((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1))
if mibBuilder.loadTexts:
nncCrPvpcTable.setStatus('current')
nnc_cr_pvpc_table_entry = mib_table_row((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1)).setIndexNames((0, 'NNCEXTPVC-MIB', 'nncCrPvpcSrcIfIndex'), (0, 'NNCEXTPVC-MIB', 'nncCrPvpcSrcVpi'), (0, 'NNCEXTPVC-MIB', 'nncCrPvpcDstIfIndex'), (0, 'NNCEXTPVC-MIB', 'nncCrPvpcDstVpi'))
if mibBuilder.loadTexts:
nncCrPvpcTableEntry.setStatus('current')
nnc_cr_pvpc_src_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 1), interface_index())
if mibBuilder.loadTexts:
nncCrPvpcSrcIfIndex.setStatus('current')
nnc_cr_pvpc_src_vpi = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 4095)))
if mibBuilder.loadTexts:
nncCrPvpcSrcVpi.setStatus('current')
nnc_cr_pvpc_dst_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 3), interface_index())
if mibBuilder.loadTexts:
nncCrPvpcDstIfIndex.setStatus('current')
nnc_cr_pvpc_dst_vpi = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 4), integer32().subtype(subtypeSpec=value_range_constraint(0, 4095)))
if mibBuilder.loadTexts:
nncCrPvpcDstVpi.setStatus('current')
nnc_cr_pvpc_cast_type = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('p2p', 1), ('p2mp', 2))).clone('p2p')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nncCrPvpcCastType.setStatus('current')
nnc_cr_pvpc_fwd_service_category = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 6))).clone(namedValues=named_values(('cbr', 1), ('nrtvbr', 2), ('abr', 3), ('ubr', 4), ('rtvbr', 6))).clone('nrtvbr')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nncCrPvpcFwdServiceCategory.setStatus('current')
nnc_cr_pvpc_bwd_service_category = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 6))).clone(namedValues=named_values(('cbr', 1), ('nrtvbr', 2), ('abr', 3), ('ubr', 4), ('rtvbr', 6))).clone('nrtvbr')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nncCrPvpcBwdServiceCategory.setStatus('current')
nnc_cr_pvpc_fwd_abr_dyn_trfc_icr = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 8), integer32().subtype(subtypeSpec=value_range_constraint(0, 2488320)).clone(1000)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nncCrPvpcFwdAbrDynTrfcIcr.setStatus('current')
nnc_cr_pvpc_fwd_abr_dyn_trfc_rif = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 9), integer32().subtype(subtypeSpec=value_range_constraint(0, 9)).clone(9)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nncCrPvpcFwdAbrDynTrfcRif.setStatus('current')
nnc_cr_pvpc_fwd_abr_dyn_trfc_rdf = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 10), integer32().subtype(subtypeSpec=value_range_constraint(0, 9)).clone(9)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nncCrPvpcFwdAbrDynTrfcRdf.setStatus('current')
nnc_cr_pvpc_bwd_abr_dyn_trfc_icr = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 11), integer32().subtype(subtypeSpec=value_range_constraint(0, 2488320)).clone(1000)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nncCrPvpcBwdAbrDynTrfcIcr.setStatus('current')
nnc_cr_pvpc_bwd_abr_dyn_trfc_rif = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 12), integer32().subtype(subtypeSpec=value_range_constraint(0, 9)).clone(9)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nncCrPvpcBwdAbrDynTrfcRif.setStatus('current')
nnc_cr_pvpc_bwd_abr_dyn_trfc_rdf = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 13), integer32().subtype(subtypeSpec=value_range_constraint(0, 9)).clone(9)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nncCrPvpcBwdAbrDynTrfcRdf.setStatus('current')
nnc_cr_pvpc_src_billing_flag = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 14), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('disabled', 0), ('enabled', 1))).clone('disabled')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nncCrPvpcSrcBillingFlag.setStatus('current')
nnc_cr_pvpc_dst_billing_flag = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 15), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('disabled', 0), ('enabled', 1))).clone('disabled')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nncCrPvpcDstBillingFlag.setStatus('current')
nnc_cr_pvpc_fwd_tm_traffic_descriptor = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 16), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5))).clone(namedValues=named_values(('none', 0), ('tagAll', 1), ('p0Plus1', 2), ('p0Plus1SlashS0Plus1', 3), ('p0Plus1SlashS0', 4), ('p0Plus1SlashM0Plus1', 5))).clone('p0Plus1SlashS0Plus1')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nncCrPvpcFwdTmTrafficDescriptor.setStatus('current')
nnc_cr_pvpc_fwd_tm_policing_option = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 17), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3))).clone(namedValues=named_values(('none', 0), ('disabled', 1), ('tag', 2), ('discard', 3))).clone('disabled')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nncCrPvpcFwdTmPolicingOption.setStatus('current')
nnc_cr_pvpc_fwd_tm_bucket_one_rate = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 18), integer32().subtype(subtypeSpec=value_range_constraint(0, 2488320)).clone(1000)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nncCrPvpcFwdTmBucketOneRate.setStatus('current')
nnc_cr_pvpc_fwd_tm_bucket_one_cdvt = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 19), integer32().subtype(subtypeSpec=value_range_constraint(1, 190000)).clone(250)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nncCrPvpcFwdTmBucketOneCdvt.setStatus('current')
nnc_cr_pvpc_fwd_tm_bucket_two_rate = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 20), integer32().subtype(subtypeSpec=value_range_constraint(0, 2488320)).clone(1000)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nncCrPvpcFwdTmBucketTwoRate.setStatus('current')
nnc_cr_pvpc_fwd_tm_bucket_two_mbs = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 21), integer32().subtype(subtypeSpec=value_range_constraint(1, 10000)).clone(32)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nncCrPvpcFwdTmBucketTwoMbs.setStatus('current')
nnc_cr_pvpc_fwd_tm_cdv = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 22), integer32().subtype(subtypeSpec=value_range_constraint(250, 10000)).clone(10000)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nncCrPvpcFwdTmCdv.setStatus('current')
nnc_cr_pvpc_fwd_tm_clr = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 23), integer32().subtype(subtypeSpec=value_range_constraint(1, 7)).clone(7)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nncCrPvpcFwdTmClr.setStatus('current')
nnc_cr_pvpc_bwd_tm_traffic_descriptor = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 24), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5))).clone(namedValues=named_values(('none', 0), ('tagAll', 1), ('p0Plus1', 2), ('p0Plus1SlashS0Plus1', 3), ('p0Plus1SlashS0', 4), ('p0Plus1SlashM0Plus1', 5))).clone('p0Plus1SlashS0Plus1')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nncCrPvpcBwdTmTrafficDescriptor.setStatus('current')
nnc_cr_pvpc_bwd_tm_policing_option = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 25), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3))).clone(namedValues=named_values(('none', 0), ('disabled', 1), ('tag', 2), ('discard', 3))).clone('disabled')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nncCrPvpcBwdTmPolicingOption.setStatus('current')
nnc_cr_pvpc_bwd_tm_bucket_one_rate = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 26), integer32().subtype(subtypeSpec=value_range_constraint(0, 2488320)).clone(1000)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nncCrPvpcBwdTmBucketOneRate.setStatus('current')
nnc_cr_pvpc_bwd_tm_bucket_one_cdvt = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 27), integer32().subtype(subtypeSpec=value_range_constraint(1, 190000)).clone(250)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nncCrPvpcBwdTmBucketOneCdvt.setStatus('current')
nnc_cr_pvpc_bwd_tm_bucket_two_rate = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 28), integer32().subtype(subtypeSpec=value_range_constraint(0, 2488320)).clone(1000)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nncCrPvpcBwdTmBucketTwoRate.setStatus('current')
nnc_cr_pvpc_bwd_tm_bucket_two_mbs = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 29), integer32().subtype(subtypeSpec=value_range_constraint(1, 10000)).clone(32)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nncCrPvpcBwdTmBucketTwoMbs.setStatus('current')
nnc_cr_pvpc_bwd_tm_cdv = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 30), integer32().subtype(subtypeSpec=value_range_constraint(250, 10000)).clone(10000)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nncCrPvpcBwdTmCdv.setStatus('current')
nnc_cr_pvpc_bwd_tm_clr = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 31), integer32().subtype(subtypeSpec=value_range_constraint(1, 7)).clone(7)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nncCrPvpcBwdTmClr.setStatus('current')
nnc_cr_pvpc_src_als_config = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 32), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('disabled', 0), ('enabled', 1))).clone('disabled')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nncCrPvpcSrcAlsConfig.setStatus('current')
nnc_cr_pvpc_dst_als_config = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 33), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('disabled', 0), ('enabled', 1))).clone('disabled')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nncCrPvpcDstAlsConfig.setStatus('current')
nnc_cr_pvpc_creator = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 34), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 9))).clone(namedValues=named_values(('unknown', 0), ('nmti', 1), ('nm5620', 2), ('snmp', 9)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nncCrPvpcCreator.setStatus('current')
nnc_cr_pvpc_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 1, 1, 35), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nncCrPvpcRowStatus.setStatus('current')
nnc_cr_pvcc_table = mib_table((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2))
if mibBuilder.loadTexts:
nncCrPvccTable.setStatus('current')
nnc_cr_pvcc_table_entry = mib_table_row((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1)).setIndexNames((0, 'NNCEXTPVC-MIB', 'nncCrPvccSrcIfIndex'), (0, 'NNCEXTPVC-MIB', 'nncCrPvccSrcVpi'), (0, 'NNCEXTPVC-MIB', 'nncCrPvccSrcVci'), (0, 'NNCEXTPVC-MIB', 'nncCrPvccDstIfIndex'), (0, 'NNCEXTPVC-MIB', 'nncCrPvccDstVpi'), (0, 'NNCEXTPVC-MIB', 'nncCrPvccDstVci'))
if mibBuilder.loadTexts:
nncCrPvccTableEntry.setStatus('current')
nnc_cr_pvcc_src_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 1), interface_index())
if mibBuilder.loadTexts:
nncCrPvccSrcIfIndex.setStatus('current')
nnc_cr_pvcc_src_vpi = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 2), integer32().subtype(subtypeSpec=value_range_constraint(0, 4095)))
if mibBuilder.loadTexts:
nncCrPvccSrcVpi.setStatus('current')
nnc_cr_pvcc_src_vci = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535)))
if mibBuilder.loadTexts:
nncCrPvccSrcVci.setStatus('current')
nnc_cr_pvcc_dst_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 4), interface_index())
if mibBuilder.loadTexts:
nncCrPvccDstIfIndex.setStatus('current')
nnc_cr_pvcc_dst_vpi = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(0, 4095)))
if mibBuilder.loadTexts:
nncCrPvccDstVpi.setStatus('current')
nnc_cr_pvcc_dst_vci = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535)))
if mibBuilder.loadTexts:
nncCrPvccDstVci.setStatus('current')
nnc_cr_pvcc_cast_type = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('p2p', 1), ('p2mp', 2))).clone('p2p')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nncCrPvccCastType.setStatus('current')
nnc_cr_pvcc_fwd_service_category = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 8), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 6))).clone(namedValues=named_values(('cbr', 1), ('nrtvbr', 2), ('abr', 3), ('ubr', 4), ('rtvbr', 6))).clone('nrtvbr')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nncCrPvccFwdServiceCategory.setStatus('current')
nnc_cr_pvcc_bwd_service_category = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 6))).clone(namedValues=named_values(('cbr', 1), ('nrtvbr', 2), ('abr', 3), ('ubr', 4), ('rtvbr', 6))).clone('nrtvbr')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nncCrPvccBwdServiceCategory.setStatus('current')
nnc_cr_pvcc_fwd_abr_dyn_trfc_icr = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 10), integer32().subtype(subtypeSpec=value_range_constraint(0, 2488320)).clone(1000)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nncCrPvccFwdAbrDynTrfcIcr.setStatus('current')
nnc_cr_pvcc_fwd_abr_dyn_trfc_rif = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 11), integer32().subtype(subtypeSpec=value_range_constraint(0, 9)).clone(9)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nncCrPvccFwdAbrDynTrfcRif.setStatus('current')
nnc_cr_pvcc_fwd_abr_dyn_trfc_rdf = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 12), integer32().subtype(subtypeSpec=value_range_constraint(0, 9)).clone(9)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nncCrPvccFwdAbrDynTrfcRdf.setStatus('current')
nnc_cr_pvcc_bwd_abr_dyn_trfc_icr = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 13), integer32().subtype(subtypeSpec=value_range_constraint(0, 2488320)).clone(1000)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nncCrPvccBwdAbrDynTrfcIcr.setStatus('current')
nnc_cr_pvcc_bwd_abr_dyn_trfc_rif = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 14), integer32().subtype(subtypeSpec=value_range_constraint(0, 9)).clone(9)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nncCrPvccBwdAbrDynTrfcRif.setStatus('current')
nnc_cr_pvcc_bwd_abr_dyn_trfc_rdf = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 15), integer32().subtype(subtypeSpec=value_range_constraint(0, 9)).clone(9)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nncCrPvccBwdAbrDynTrfcRdf.setStatus('current')
nnc_cr_pvcc_src_billing_flag = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 16), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('disabled', 0), ('enabled', 1))).clone('disabled')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nncCrPvccSrcBillingFlag.setStatus('current')
nnc_cr_pvcc_dst_billing_flag = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 17), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('disabled', 0), ('enabled', 1))).clone('disabled')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nncCrPvccDstBillingFlag.setStatus('current')
nnc_cr_pvcc_fwd_tm_traffic_descriptor = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 18), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5))).clone(namedValues=named_values(('none', 0), ('tagAll', 1), ('p0Plus1', 2), ('p0Plus1SlashS0Plus1', 3), ('p0Plus1SlashS0', 4), ('p0Plus1SlashM0Plus1', 5))).clone('p0Plus1SlashS0Plus1')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nncCrPvccFwdTmTrafficDescriptor.setStatus('current')
nnc_cr_pvcc_fwd_tm_policing_option = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 19), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3))).clone(namedValues=named_values(('none', 0), ('disabled', 1), ('tag', 2), ('discard', 3))).clone('disabled')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nncCrPvccFwdTmPolicingOption.setStatus('current')
nnc_cr_pvcc_fwd_tm_bucket_one_rate = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 20), integer32().subtype(subtypeSpec=value_range_constraint(0, 2488320)).clone(1000)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nncCrPvccFwdTmBucketOneRate.setStatus('current')
nnc_cr_pvcc_fwd_tm_bucket_one_cdvt = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 21), integer32().subtype(subtypeSpec=value_range_constraint(1, 190000)).clone(250)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nncCrPvccFwdTmBucketOneCdvt.setStatus('current')
nnc_cr_pvcc_fwd_tm_bucket_two_rate = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 22), integer32().subtype(subtypeSpec=value_range_constraint(0, 2488320)).clone(1000)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nncCrPvccFwdTmBucketTwoRate.setStatus('current')
nnc_cr_pvcc_fwd_tm_bucket_two_mbs = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 23), integer32().subtype(subtypeSpec=value_range_constraint(1, 10000)).clone(32)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nncCrPvccFwdTmBucketTwoMbs.setStatus('current')
nnc_cr_pvcc_fwd_tm_cdv = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 24), integer32().subtype(subtypeSpec=value_range_constraint(250, 10000)).clone(10000)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nncCrPvccFwdTmCdv.setStatus('current')
nnc_cr_pvcc_fwd_tm_clr = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 25), integer32().subtype(subtypeSpec=value_range_constraint(1, 7)).clone(7)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nncCrPvccFwdTmClr.setStatus('current')
nnc_cr_pvcc_fwd_tm_frame_discard = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 26), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('disabled', 0), ('enabled', 1))).clone('disabled')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nncCrPvccFwdTmFrameDiscard.setStatus('current')
nnc_cr_pvcc_bwd_tm_traffic_descriptor = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 27), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5))).clone(namedValues=named_values(('none', 0), ('tagAll', 1), ('p0Plus1', 2), ('p0Plus1SlashS0Plus1', 3), ('p0Plus1SlashS0', 4), ('p0Plus1SlashM0Plus1', 5))).clone('p0Plus1SlashS0Plus1')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nncCrPvccBwdTmTrafficDescriptor.setStatus('current')
nnc_cr_pvcc_bwd_tm_policing_option = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 28), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3))).clone(namedValues=named_values(('none', 0), ('disabled', 1), ('tag', 2), ('discard', 3))).clone('disabled')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nncCrPvccBwdTmPolicingOption.setStatus('current')
nnc_cr_pvcc_bwd_tm_bucket_one_rate = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 29), integer32().subtype(subtypeSpec=value_range_constraint(0, 2488320)).clone(1000)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nncCrPvccBwdTmBucketOneRate.setStatus('current')
nnc_cr_pvcc_bwd_tm_bucket_one_cdvt = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 30), integer32().subtype(subtypeSpec=value_range_constraint(1, 190000)).clone(250)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nncCrPvccBwdTmBucketOneCdvt.setStatus('current')
nnc_cr_pvcc_bwd_tm_bucket_two_rate = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 31), integer32().subtype(subtypeSpec=value_range_constraint(0, 2488320)).clone(1000)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nncCrPvccBwdTmBucketTwoRate.setStatus('current')
nnc_cr_pvcc_bwd_tm_bucket_two_mbs = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 32), integer32().subtype(subtypeSpec=value_range_constraint(1, 10000)).clone(32)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nncCrPvccBwdTmBucketTwoMbs.setStatus('current')
nnc_cr_pvcc_bwd_tm_cdv = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 33), integer32().subtype(subtypeSpec=value_range_constraint(250, 10000)).clone(10000)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nncCrPvccBwdTmCdv.setStatus('current')
nnc_cr_pvcc_bwd_tm_clr = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 34), integer32().subtype(subtypeSpec=value_range_constraint(1, 7)).clone(7)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nncCrPvccBwdTmClr.setStatus('current')
nnc_cr_pvcc_bwd_tm_frame_discard = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 35), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('disabled', 0), ('enabled', 1))).clone('disabled')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nncCrPvccBwdTmFrameDiscard.setStatus('current')
nnc_cr_pvcc_src_als_config = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 36), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('disabled', 0), ('enabled', 1))).clone('disabled')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nncCrPvccSrcAlsConfig.setStatus('current')
nnc_cr_pvcc_dst_als_config = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 37), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1))).clone(namedValues=named_values(('disabled', 0), ('enabled', 1))).clone('disabled')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nncCrPvccDstAlsConfig.setStatus('current')
nnc_cr_pvcc_creator = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 38), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 9))).clone(namedValues=named_values(('unknown', 0), ('nmti', 1), ('nm5620', 2), ('snmp', 9)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nncCrPvccCreator.setStatus('current')
nnc_cr_pvcc_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 123, 3, 79, 1, 2, 1, 39), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nncCrPvccRowStatus.setStatus('current')
nnc_cr_pvpc_group = object_group((1, 3, 6, 1, 4, 1, 123, 3, 79, 3, 1)).setObjects(('NNCEXTPVC-MIB', 'nncCrPvpcSrcIfIndex'), ('NNCEXTPVC-MIB', 'nncCrPvpcSrcVpi'), ('NNCEXTPVC-MIB', 'nncCrPvpcDstIfIndex'), ('NNCEXTPVC-MIB', 'nncCrPvpcDstVpi'), ('NNCEXTPVC-MIB', 'nncCrPvpcCastType'), ('NNCEXTPVC-MIB', 'nncCrPvpcFwdServiceCategory'), ('NNCEXTPVC-MIB', 'nncCrPvpcBwdServiceCategory'), ('NNCEXTPVC-MIB', 'nncCrPvpcFwdAbrDynTrfcIcr'), ('NNCEXTPVC-MIB', 'nncCrPvpcFwdAbrDynTrfcRif'), ('NNCEXTPVC-MIB', 'nncCrPvpcFwdAbrDynTrfcRdf'), ('NNCEXTPVC-MIB', 'nncCrPvpcBwdAbrDynTrfcIcr'), ('NNCEXTPVC-MIB', 'nncCrPvpcBwdAbrDynTrfcRif'), ('NNCEXTPVC-MIB', 'nncCrPvpcBwdAbrDynTrfcRdf'), ('NNCEXTPVC-MIB', 'nncCrPvpcSrcBillingFlag'), ('NNCEXTPVC-MIB', 'nncCrPvpcDstBillingFlag'), ('NNCEXTPVC-MIB', 'nncCrPvpcFwdTmTrafficDescriptor'), ('NNCEXTPVC-MIB', 'nncCrPvpcFwdTmPolicingOption'), ('NNCEXTPVC-MIB', 'nncCrPvpcFwdTmBucketOneRate'), ('NNCEXTPVC-MIB', 'nncCrPvpcFwdTmBucketOneCdvt'), ('NNCEXTPVC-MIB', 'nncCrPvpcFwdTmBucketTwoRate'), ('NNCEXTPVC-MIB', 'nncCrPvpcFwdTmBucketTwoMbs'), ('NNCEXTPVC-MIB', 'nncCrPvpcFwdTmCdv'), ('NNCEXTPVC-MIB', 'nncCrPvpcFwdTmClr'), ('NNCEXTPVC-MIB', 'nncCrPvpcBwdTmTrafficDescriptor'), ('NNCEXTPVC-MIB', 'nncCrPvpcBwdTmPolicingOption'), ('NNCEXTPVC-MIB', 'nncCrPvpcBwdTmBucketOneRate'), ('NNCEXTPVC-MIB', 'nncCrPvpcBwdTmBucketOneCdvt'), ('NNCEXTPVC-MIB', 'nncCrPvpcBwdTmBucketTwoRate'), ('NNCEXTPVC-MIB', 'nncCrPvpcBwdTmBucketTwoMbs'), ('NNCEXTPVC-MIB', 'nncCrPvpcBwdTmCdv'), ('NNCEXTPVC-MIB', 'nncCrPvpcBwdTmClr'), ('NNCEXTPVC-MIB', 'nncCrPvpcSrcAlsConfig'), ('NNCEXTPVC-MIB', 'nncCrPvpcDstAlsConfig'), ('NNCEXTPVC-MIB', 'nncCrPvpcCreator'), ('NNCEXTPVC-MIB', 'nncCrPvpcRowStatus'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
nnc_cr_pvpc_group = nncCrPvpcGroup.setStatus('current')
nnc_cr_pvcc_group = object_group((1, 3, 6, 1, 4, 1, 123, 3, 79, 3, 2)).setObjects(('NNCEXTPVC-MIB', 'nncCrPvccSrcIfIndex'), ('NNCEXTPVC-MIB', 'nncCrPvccSrcVpi'), ('NNCEXTPVC-MIB', 'nncCrPvccSrcVci'), ('NNCEXTPVC-MIB', 'nncCrPvccDstIfIndex'), ('NNCEXTPVC-MIB', 'nncCrPvccDstVpi'), ('NNCEXTPVC-MIB', 'nncCrPvccDstVci'), ('NNCEXTPVC-MIB', 'nncCrPvccCastType'), ('NNCEXTPVC-MIB', 'nncCrPvccFwdServiceCategory'), ('NNCEXTPVC-MIB', 'nncCrPvccBwdServiceCategory'), ('NNCEXTPVC-MIB', 'nncCrPvccFwdAbrDynTrfcIcr'), ('NNCEXTPVC-MIB', 'nncCrPvccFwdAbrDynTrfcRif'), ('NNCEXTPVC-MIB', 'nncCrPvccFwdAbrDynTrfcRdf'), ('NNCEXTPVC-MIB', 'nncCrPvccBwdAbrDynTrfcIcr'), ('NNCEXTPVC-MIB', 'nncCrPvccBwdAbrDynTrfcRif'), ('NNCEXTPVC-MIB', 'nncCrPvccBwdAbrDynTrfcRdf'), ('NNCEXTPVC-MIB', 'nncCrPvccSrcBillingFlag'), ('NNCEXTPVC-MIB', 'nncCrPvccDstBillingFlag'), ('NNCEXTPVC-MIB', 'nncCrPvccFwdTmTrafficDescriptor'), ('NNCEXTPVC-MIB', 'nncCrPvccFwdTmPolicingOption'), ('NNCEXTPVC-MIB', 'nncCrPvccFwdTmBucketOneRate'), ('NNCEXTPVC-MIB', 'nncCrPvccFwdTmBucketOneCdvt'), ('NNCEXTPVC-MIB', 'nncCrPvccFwdTmBucketTwoRate'), ('NNCEXTPVC-MIB', 'nncCrPvccFwdTmBucketTwoMbs'), ('NNCEXTPVC-MIB', 'nncCrPvccFwdTmCdv'), ('NNCEXTPVC-MIB', 'nncCrPvccFwdTmClr'), ('NNCEXTPVC-MIB', 'nncCrPvccFwdTmFrameDiscard'), ('NNCEXTPVC-MIB', 'nncCrPvccBwdTmTrafficDescriptor'), ('NNCEXTPVC-MIB', 'nncCrPvccBwdTmPolicingOption'), ('NNCEXTPVC-MIB', 'nncCrPvccBwdTmBucketOneRate'), ('NNCEXTPVC-MIB', 'nncCrPvccBwdTmBucketOneCdvt'), ('NNCEXTPVC-MIB', 'nncCrPvccBwdTmBucketTwoRate'), ('NNCEXTPVC-MIB', 'nncCrPvccBwdTmBucketTwoMbs'), ('NNCEXTPVC-MIB', 'nncCrPvccBwdTmCdv'), ('NNCEXTPVC-MIB', 'nncCrPvccBwdTmClr'), ('NNCEXTPVC-MIB', 'nncCrPvccBwdTmFrameDiscard'), ('NNCEXTPVC-MIB', 'nncCrPvccSrcAlsConfig'), ('NNCEXTPVC-MIB', 'nncCrPvccDstAlsConfig'), ('NNCEXTPVC-MIB', 'nncCrPvccCreator'), ('NNCEXTPVC-MIB', 'nncCrPvccRowStatus'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
nnc_cr_pvcc_group = nncCrPvccGroup.setStatus('current')
nnc_pvc_compliance = module_compliance((1, 3, 6, 1, 4, 1, 123, 3, 79, 4, 1)).setObjects(('NNCEXTPVC-MIB', 'nncCrPvpcGroup'), ('NNCEXTPVC-MIB', 'nncCrPvccGroup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
nnc_pvc_compliance = nncPvcCompliance.setStatus('current')
mibBuilder.exportSymbols('NNCEXTPVC-MIB', nncCrPvpcBwdTmClr=nncCrPvpcBwdTmClr, nncCrPvpcSrcBillingFlag=nncCrPvpcSrcBillingFlag, nncCrPvccDstIfIndex=nncCrPvccDstIfIndex, nncExtPvcGroups=nncExtPvcGroups, nncCrPvpcFwdAbrDynTrfcIcr=nncCrPvpcFwdAbrDynTrfcIcr, nncCrPvccFwdAbrDynTrfcIcr=nncCrPvccFwdAbrDynTrfcIcr, nncCrPvpcFwdServiceCategory=nncCrPvpcFwdServiceCategory, nncCrPvpcTableEntry=nncCrPvpcTableEntry, nncCrPvccCastType=nncCrPvccCastType, nncCrPvccBwdAbrDynTrfcRif=nncCrPvccBwdAbrDynTrfcRif, nncCrPvccBwdAbrDynTrfcIcr=nncCrPvccBwdAbrDynTrfcIcr, nncCrPvpcFwdTmBucketTwoMbs=nncCrPvpcFwdTmBucketTwoMbs, nncCrPvccCreator=nncCrPvccCreator, nncCrPvccFwdTmBucketTwoRate=nncCrPvccFwdTmBucketTwoRate, nncCrPvpcSrcIfIndex=nncCrPvpcSrcIfIndex, nncCrPvccBwdTmBucketTwoRate=nncCrPvccBwdTmBucketTwoRate, nncCrPvpcBwdAbrDynTrfcIcr=nncCrPvpcBwdAbrDynTrfcIcr, nncCrPvpcBwdTmBucketOneCdvt=nncCrPvpcBwdTmBucketOneCdvt, nncCrPvccFwdTmFrameDiscard=nncCrPvccFwdTmFrameDiscard, nncCrPvccDstVci=nncCrPvccDstVci, nncExtPvcObjects=nncExtPvcObjects, nncCrPvpcDstIfIndex=nncCrPvpcDstIfIndex, nncCrPvccTableEntry=nncCrPvccTableEntry, nncCrPvccSrcVci=nncCrPvccSrcVci, nncCrPvccRowStatus=nncCrPvccRowStatus, PYSNMP_MODULE_ID=nncExtPvc, nncCrPvccSrcVpi=nncCrPvccSrcVpi, nncCrPvccFwdTmBucketTwoMbs=nncCrPvccFwdTmBucketTwoMbs, nncCrPvccBwdTmFrameDiscard=nncCrPvccBwdTmFrameDiscard, nncCrPvpcFwdAbrDynTrfcRdf=nncCrPvpcFwdAbrDynTrfcRdf, nncCrPvccFwdTmCdv=nncCrPvccFwdTmCdv, nncCrPvpcDstAlsConfig=nncCrPvpcDstAlsConfig, nncCrPvpcBwdServiceCategory=nncCrPvpcBwdServiceCategory, nncCrPvpcFwdTmPolicingOption=nncCrPvpcFwdTmPolicingOption, nncPvcCompliance=nncPvcCompliance, nncCrPvpcBwdTmTrafficDescriptor=nncCrPvpcBwdTmTrafficDescriptor, nncCrPvccFwdTmTrafficDescriptor=nncCrPvccFwdTmTrafficDescriptor, nncCrPvccBwdTmBucketTwoMbs=nncCrPvccBwdTmBucketTwoMbs, nncCrPvccBwdTmPolicingOption=nncCrPvccBwdTmPolicingOption, nncCrPvccFwdTmBucketOneRate=nncCrPvccFwdTmBucketOneRate, nncCrPvccBwdAbrDynTrfcRdf=nncCrPvccBwdAbrDynTrfcRdf, nncCrPvccSrcBillingFlag=nncCrPvccSrcBillingFlag, nncCrPvccFwdTmBucketOneCdvt=nncCrPvccFwdTmBucketOneCdvt, nncCrPvccBwdTmBucketOneRate=nncCrPvccBwdTmBucketOneRate, nncCrPvpcTable=nncCrPvpcTable, nncCrPvpcDstBillingFlag=nncCrPvpcDstBillingFlag, nncCrPvpcFwdTmCdv=nncCrPvpcFwdTmCdv, nncCrPvccDstBillingFlag=nncCrPvccDstBillingFlag, nncCrPvccFwdAbrDynTrfcRdf=nncCrPvccFwdAbrDynTrfcRdf, nncExtPvc=nncExtPvc, nncExtPvcCompliances=nncExtPvcCompliances, nncCrPvccFwdTmClr=nncCrPvccFwdTmClr, nncCrPvpcDstVpi=nncCrPvpcDstVpi, nncCrPvpcBwdAbrDynTrfcRdf=nncCrPvpcBwdAbrDynTrfcRdf, nncCrPvpcSrcVpi=nncCrPvpcSrcVpi, nncCrPvpcFwdTmTrafficDescriptor=nncCrPvpcFwdTmTrafficDescriptor, nncCrPvccSrcIfIndex=nncCrPvccSrcIfIndex, nncCrPvpcFwdTmClr=nncCrPvpcFwdTmClr, nncCrPvccSrcAlsConfig=nncCrPvccSrcAlsConfig, nncCrPvccBwdTmClr=nncCrPvccBwdTmClr, nncCrPvpcCastType=nncCrPvpcCastType, nncCrPvpcFwdAbrDynTrfcRif=nncCrPvpcFwdAbrDynTrfcRif, nncCrPvccTable=nncCrPvccTable, nncCrPvpcRowStatus=nncCrPvpcRowStatus, nncCrPvpcBwdTmBucketTwoRate=nncCrPvpcBwdTmBucketTwoRate, nncCrPvccBwdServiceCategory=nncCrPvccBwdServiceCategory, nncCrPvpcGroup=nncCrPvpcGroup, nncCrPvccGroup=nncCrPvccGroup, nncCrPvpcBwdTmCdv=nncCrPvpcBwdTmCdv, nncCrPvccBwdTmCdv=nncCrPvccBwdTmCdv, nncCrPvpcBwdTmPolicingOption=nncCrPvpcBwdTmPolicingOption, nncCrPvpcFwdTmBucketOneRate=nncCrPvpcFwdTmBucketOneRate, nncCrPvpcBwdAbrDynTrfcRif=nncCrPvpcBwdAbrDynTrfcRif, nncCrPvpcFwdTmBucketTwoRate=nncCrPvpcFwdTmBucketTwoRate, nncCrPvpcBwdTmBucketTwoMbs=nncCrPvpcBwdTmBucketTwoMbs, nncCrPvccBwdTmBucketOneCdvt=nncCrPvccBwdTmBucketOneCdvt, nncCrPvccFwdAbrDynTrfcRif=nncCrPvccFwdAbrDynTrfcRif, nncCrPvccDstVpi=nncCrPvccDstVpi, nncCrPvccBwdTmTrafficDescriptor=nncCrPvccBwdTmTrafficDescriptor, nncCrPvccDstAlsConfig=nncCrPvccDstAlsConfig, nncCrPvpcSrcAlsConfig=nncCrPvpcSrcAlsConfig, nncCrPvpcBwdTmBucketOneRate=nncCrPvpcBwdTmBucketOneRate, nncCrPvpcCreator=nncCrPvpcCreator, nncCrPvpcFwdTmBucketOneCdvt=nncCrPvpcFwdTmBucketOneCdvt, nncCrPvccFwdServiceCategory=nncCrPvccFwdServiceCategory, nncCrPvccFwdTmPolicingOption=nncCrPvccFwdTmPolicingOption) |
# The isBadVersion API is already defined for you.
# def isBadVersion(version: int) -> int:
class Solution:
def firstBadVersion(self, n: int) -> int:
start, end = 1, n
while start < end:
mid = start + (end - start) // 2
check = isBadVersion(mid)
if check:
end = mid
else:
start = mid + 1
return start | class Solution:
def first_bad_version(self, n: int) -> int:
(start, end) = (1, n)
while start < end:
mid = start + (end - start) // 2
check = is_bad_version(mid)
if check:
end = mid
else:
start = mid + 1
return start |
current_petrol = 0
current_position = 0
n = int(input().strip())
for i in range(n):
petrol, distance = map(int, input().strip().split(' '))
current_petrol += petrol
if (current_petrol > distance):
current_petrol -= distance
else:
current_petrol = 0
current_position = i
print(current_position + 1)
| current_petrol = 0
current_position = 0
n = int(input().strip())
for i in range(n):
(petrol, distance) = map(int, input().strip().split(' '))
current_petrol += petrol
if current_petrol > distance:
current_petrol -= distance
else:
current_petrol = 0
current_position = i
print(current_position + 1) |
APPNAME = 'assembly'
APPAUTHOR = 'kbase'
URL = 'http://kbase.us/services/assembly'
AUTH_SERVICE = 'KBase'
OAUTH_EXP_DAYS = 14
OAUTH_FILENAME = 'globus_oauth.prop'
| appname = 'assembly'
appauthor = 'kbase'
url = 'http://kbase.us/services/assembly'
auth_service = 'KBase'
oauth_exp_days = 14
oauth_filename = 'globus_oauth.prop' |
PACKAGE = "python-ptrace"
VERSION = "0.9"
WEBSITE = "http://python-ptrace.readthedocs.org/"
LICENSE = "GNU GPL v2"
| package = 'python-ptrace'
version = '0.9'
website = 'http://python-ptrace.readthedocs.org/'
license = 'GNU GPL v2' |
def findmax(items):
if len(items) == 0:
return None
m = items[0]
i = 1
while i < len(items):
if m < items[i]:
m = items[i]
i = i + 1
return m
| def findmax(items):
if len(items) == 0:
return None
m = items[0]
i = 1
while i < len(items):
if m < items[i]:
m = items[i]
i = i + 1
return m |
#!/usr/bin/python
patch_size = [25, 31, 35]
scale_factor = [1.15, 1.2, 1.3]
num_levels = [4, 8, 10]
max_dist = [35, 40, 45, 50]
fp_runscript = open("/home/kivan/source/cv-stereo/scripts/egomotion_kitti_eval/run_validation_orb2.sh", 'w')
fp_runscript.write("#!/bin/bash\n\n")
cnt = 0
for i in range(len(patch_size)):
for j in range(len(num_levels)):
for k in range(len(scale_factor)):
for l in range(len(max_dist)):
cnt += 1
filepath = "/home/kivan/source/cv-stereo/config_files/experiments/kitti/validation/orb/validation_orb2_" + str(cnt) + ".txt"
print(filepath)
fp = open(filepath, 'w')
fp.write("egomotion_method = EgomotionRansac\n")
fp.write("ransac_iters = 1000\n")
fp.write("ransac_threshold = 1.5\n")
fp.write("loss_function_type = Squared\n")
fp.write("use_weighting = false\n")
fp.write("use_deformation_field = false\n")
fp.write("tracker = StereoTrackerORB\n")
fp.write("max_features = 5000\n")
fp.write("max_xdiff = 100\n")
fp.write("max_disparity = 160\n")
fp.write("orb_patch_size = " + str(patch_size[i]) + "\n")
fp.write("orb_num_levels = " + str(num_levels[j]) + "\n")
fp.write("orb_scale_factor = " + str(scale_factor[k]) + "\n")
fp.write("orb_max_dist_stereo = " + str(max_dist[l]) + "\n")
fp.write("orb_max_dist_mono = " + str(max_dist[l]) + "\n")
fp.write("use_bundle_adjustment = true\n")
fp.write("bundle_adjuster = BundleAdjuster\n")
fp.write("ba_num_frames = 6\n")
fp.close()
fp_runscript.write('./run_evaluation_i7.sh "' + filepath + '"\n')
fp_runscript.close()
| patch_size = [25, 31, 35]
scale_factor = [1.15, 1.2, 1.3]
num_levels = [4, 8, 10]
max_dist = [35, 40, 45, 50]
fp_runscript = open('/home/kivan/source/cv-stereo/scripts/egomotion_kitti_eval/run_validation_orb2.sh', 'w')
fp_runscript.write('#!/bin/bash\n\n')
cnt = 0
for i in range(len(patch_size)):
for j in range(len(num_levels)):
for k in range(len(scale_factor)):
for l in range(len(max_dist)):
cnt += 1
filepath = '/home/kivan/source/cv-stereo/config_files/experiments/kitti/validation/orb/validation_orb2_' + str(cnt) + '.txt'
print(filepath)
fp = open(filepath, 'w')
fp.write('egomotion_method = EgomotionRansac\n')
fp.write('ransac_iters = 1000\n')
fp.write('ransac_threshold = 1.5\n')
fp.write('loss_function_type = Squared\n')
fp.write('use_weighting = false\n')
fp.write('use_deformation_field = false\n')
fp.write('tracker = StereoTrackerORB\n')
fp.write('max_features = 5000\n')
fp.write('max_xdiff = 100\n')
fp.write('max_disparity = 160\n')
fp.write('orb_patch_size = ' + str(patch_size[i]) + '\n')
fp.write('orb_num_levels = ' + str(num_levels[j]) + '\n')
fp.write('orb_scale_factor = ' + str(scale_factor[k]) + '\n')
fp.write('orb_max_dist_stereo = ' + str(max_dist[l]) + '\n')
fp.write('orb_max_dist_mono = ' + str(max_dist[l]) + '\n')
fp.write('use_bundle_adjustment = true\n')
fp.write('bundle_adjuster = BundleAdjuster\n')
fp.write('ba_num_frames = 6\n')
fp.close()
fp_runscript.write('./run_evaluation_i7.sh "' + filepath + '"\n')
fp_runscript.close() |
class Queue:
def __init__(self, size):
if size <= 0:
raise "Size must be 1 or greater."
self.start = 0
self.end = 0
self.count = 0
self.size = size
self.items = [None] * size
def enqueue(self, data):
if self.count >= self.size:
raise "Queue is full."
self.items[self.end] = data
newEnd = self.end + 1
if newEnd >= self.size - 1:
newEnd -= self.size
self.end = newEnd
self.count += 1
def dequeue(self):
if self.count == 0:
raise "Queue is empty."
data = self.items[self.start]
self.items[self.start] = None
self.start += 1
self.count -= 1
if self.start >= self.size:
self.start -= self.size
return data
def printQueue(self):
for i in range(self.count):
index = self.start + i
if index >= self.size - 1:
index -= self.size
print(self.items[index], end="; ")
print()
queue = Queue(10)
while True:
print("1. Enqueue")
print("2. Dequeue")
print("3. Print queue")
print("4. Exit")
choice = int(input("Enter your choice: "))
if choice == 1:
data = input("Enter data: ")
queue.enqueue(data)
elif choice == 2:
print(queue.dequeue())
elif choice == 3:
queue.printQueue()
elif choice == 4:
break
else:
print("Invalid choice.")
| class Queue:
def __init__(self, size):
if size <= 0:
raise 'Size must be 1 or greater.'
self.start = 0
self.end = 0
self.count = 0
self.size = size
self.items = [None] * size
def enqueue(self, data):
if self.count >= self.size:
raise 'Queue is full.'
self.items[self.end] = data
new_end = self.end + 1
if newEnd >= self.size - 1:
new_end -= self.size
self.end = newEnd
self.count += 1
def dequeue(self):
if self.count == 0:
raise 'Queue is empty.'
data = self.items[self.start]
self.items[self.start] = None
self.start += 1
self.count -= 1
if self.start >= self.size:
self.start -= self.size
return data
def print_queue(self):
for i in range(self.count):
index = self.start + i
if index >= self.size - 1:
index -= self.size
print(self.items[index], end='; ')
print()
queue = queue(10)
while True:
print('1. Enqueue')
print('2. Dequeue')
print('3. Print queue')
print('4. Exit')
choice = int(input('Enter your choice: '))
if choice == 1:
data = input('Enter data: ')
queue.enqueue(data)
elif choice == 2:
print(queue.dequeue())
elif choice == 3:
queue.printQueue()
elif choice == 4:
break
else:
print('Invalid choice.') |
# -----------------------------------------------------------------------------
# Staff Assistance Flow
# -----------------------------------------------------------------------------
staff_assistance_customer_email_inputtext = "xpath=//*[@id='emailInput']"
staff_assistance_company_input = "//*[@id='customerInput']"
staff_assistance_company_dropdown = "xpath=//*[@id='customerInput']/div/div[2]/div"
staff_assistance_company_select_button = "xpath=//button[contains(text(),'Done')]"
staff_assistance_company_dropdown_option_01 = "xpath=//div[contains(@class,' css-1n7v3ny-option')]"
staff_assistance_changed_company_dropdown_option_01 = "xpath=//div[contains(@class,' css-yt9ioa-option')]"
staff_assistance_changed_company_dropdown_option_02 = "xpath=//div[contains(@class,' css-1n7v3ny-option')]"
staff_assistance_header_banner_change_link = "xpath=//a[contains(text(),'Change')]"
staff_assistance_email_address_label = "xpath=//*[contains(@data-testid,'currentAccountEmail')]"
staff_assistance_currently_access_label = "xpath=//*[@id='gatsby-focus-wrapper']/div[4]/div/div/span"
staff_assistance_company_email_label = "xpath=//*[contains(@data-testid,'companyEmail')]"
staff_assistance_company_name_label = "xpath=//*[contains(@data-testid,'companyName')]"
staff_assistance_header_text_label = "You are currently acting on behalf of"
staff_assistance_customer_email_address_01 = "kumindu777+yellowms@gmail.com"
staff_assistance_header_company_name_label_0101 = "Yellow NZ Advertising MS"
staff_assistance_customer_email_address_02 = "kumindu777+yellowsa@gmail.com"
staff_assistance_header_company_name_label_0201 = "Test Business Search Ads Go Live"
staff_assistance_header_company_link = "xpath=//a[contains(@href, '/my-yellow/choose-customer')]"
staff_assistance_customer_email_address_03 = "kumindu777+fingoo@gmail.com"
staff_assistance_header_company_name_label_0301 = "Ian Charle Langdon"
staff_assistance_header_company_name_label_0302 = "Sriwis Foods"
staff_assistance_select_button = "//a[contains(text(),'Select')]"
| staff_assistance_customer_email_inputtext = "xpath=//*[@id='emailInput']"
staff_assistance_company_input = "//*[@id='customerInput']"
staff_assistance_company_dropdown = "xpath=//*[@id='customerInput']/div/div[2]/div"
staff_assistance_company_select_button = "xpath=//button[contains(text(),'Done')]"
staff_assistance_company_dropdown_option_01 = "xpath=//div[contains(@class,' css-1n7v3ny-option')]"
staff_assistance_changed_company_dropdown_option_01 = "xpath=//div[contains(@class,' css-yt9ioa-option')]"
staff_assistance_changed_company_dropdown_option_02 = "xpath=//div[contains(@class,' css-1n7v3ny-option')]"
staff_assistance_header_banner_change_link = "xpath=//a[contains(text(),'Change')]"
staff_assistance_email_address_label = "xpath=//*[contains(@data-testid,'currentAccountEmail')]"
staff_assistance_currently_access_label = "xpath=//*[@id='gatsby-focus-wrapper']/div[4]/div/div/span"
staff_assistance_company_email_label = "xpath=//*[contains(@data-testid,'companyEmail')]"
staff_assistance_company_name_label = "xpath=//*[contains(@data-testid,'companyName')]"
staff_assistance_header_text_label = 'You are currently acting on behalf of'
staff_assistance_customer_email_address_01 = 'kumindu777+yellowms@gmail.com'
staff_assistance_header_company_name_label_0101 = 'Yellow NZ Advertising MS'
staff_assistance_customer_email_address_02 = 'kumindu777+yellowsa@gmail.com'
staff_assistance_header_company_name_label_0201 = 'Test Business Search Ads Go Live'
staff_assistance_header_company_link = "xpath=//a[contains(@href, '/my-yellow/choose-customer')]"
staff_assistance_customer_email_address_03 = 'kumindu777+fingoo@gmail.com'
staff_assistance_header_company_name_label_0301 = 'Ian Charle Langdon'
staff_assistance_header_company_name_label_0302 = 'Sriwis Foods'
staff_assistance_select_button = "//a[contains(text(),'Select')]" |
# Python Program To Copy An Image Into Another Files
'''
Function Name : Copy An Image Into Another Files
Function Date : 24 Sep 2020
Function Author : Prasad Dangare
Input : --
Output : --
'''
# Open The File In Binary Modes
f1 = open('new.jpg.png', 'rb')
f2 = open('neww.jpg.jpg', 'wb')
# Read Bytes From f1 And Write Into f2
bytes = f1.read()
f2.write(bytes)
# Close The File
f1.close()
f2.close()
| """
Function Name : Copy An Image Into Another Files
Function Date : 24 Sep 2020
Function Author : Prasad Dangare
Input : --
Output : --
"""
f1 = open('new.jpg.png', 'rb')
f2 = open('neww.jpg.jpg', 'wb')
bytes = f1.read()
f2.write(bytes)
f1.close()
f2.close() |
# Oefening: Vraag de geboortedatum van de gebruiker en zeg de leeftijd.
huidig_jaar = 2017
huidige_maand = 10
huidige_dag = 24
jaar = int(input("In welk jaar ben je geboren? "))
maand = int(input("En in welke maand? (getal) "))
# De dag moeten we pas weten als de geboortemaand deze maand is!
# Je kan het hier natuurlijk ook al vragen als je wilt.
leeftijd = huidig_jaar - jaar
if (maand > huidige_maand): # De gebruiker is nog niet verjaard
leeftijd -= 1 # hetzelfde als "leeftijd = leeftijd - 1"
elif (maand == huidige_maand):
dag = int(input("En welke dag? (getal) "))
if (dag > huidige_dag):
leeftijd -= 1
elif (dag == huidige_dag):
# leeftijd = leeftijd # Dat doet helemaal niets natuurlijk
print("Gelukkige verjaardag!")
# else: # Enkel (dag < huidige_dag) kan nog =>
# # De gebruiker is al verjaard deze maand!
# leeftijd = leeftijd # Maar er hoeft niets veranderd te worden.
# else: # De gebruiker is zeker al verjaard,
# # want enkel maand < huidige_maand kan nog!
# leeftijd = leeftijd # Maar we moeten niets aanpassen!
print("Dan ben je " + str(leeftijd) + " jaar oud.")
## Oefeningen zonder oplossing (mail bij vragen!).
#
# Oefening: start met leeftijd = huidig_jaar - jaar - 1 en verhoog die
# waarde wanneer nodig. Vergelijk de voorwaarden daar met die hier.
# Wat is het verschil in de tekens?
#
# Nog een oefening: kijk de waarden die de gebruiker ingeeft na.
# Zorg ervoor je geen dag kan invoeren die later komt dan vandaag.
# Probeer dat zo onafhankelijk mogelijk te doen van de bovenstaande code.
#
# Nadenkoefening: kan je bovenstaande 2 voorwaarden in de vorige opdracht uitvoeren
# zonder in de herhaling te vallen? (dat is geen uitdaging, maar een vraag!).
# Als je toch iets mag aanpassen aan bovenstaande code, kan het dan?
# Wat denk je dat de beste optie is? | huidig_jaar = 2017
huidige_maand = 10
huidige_dag = 24
jaar = int(input('In welk jaar ben je geboren? '))
maand = int(input('En in welke maand? (getal) '))
leeftijd = huidig_jaar - jaar
if maand > huidige_maand:
leeftijd -= 1
elif maand == huidige_maand:
dag = int(input('En welke dag? (getal) '))
if dag > huidige_dag:
leeftijd -= 1
elif dag == huidige_dag:
print('Gelukkige verjaardag!')
print('Dan ben je ' + str(leeftijd) + ' jaar oud.') |
# Problem for Prof Charnesky's mid term review sheet at:
# https://canvas.umd.umich.edu/courses/522665/pages/midterm-practice?module_item_id=9243802
# 1 Classes and Unit Test question
# Given the following UML, write the class
# Pizza
# toppings : []
# slices : int
# base_cost : float
# price_per_topping : int
# get_total_price() : int
# Write a unit test for get_total_price()
class Pizza:
def __init__(self, toppings, slices, base_cost=2.5, price_per_topping=1):
self._toppings = toppings
self._slices = slices
self._base_cost = base_cost
self._price_per_topping = price_per_topping
def get_total_price(self):
return (self._base_cost + self._price_per_topping * (len(self._toppings))) * self._slices
if __name__ == "__main__":
nice = Pizza(['pineapple', 'ham', 'mushrooms'], 3)
print(nice.get_total_price()) | class Pizza:
def __init__(self, toppings, slices, base_cost=2.5, price_per_topping=1):
self._toppings = toppings
self._slices = slices
self._base_cost = base_cost
self._price_per_topping = price_per_topping
def get_total_price(self):
return (self._base_cost + self._price_per_topping * len(self._toppings)) * self._slices
if __name__ == '__main__':
nice = pizza(['pineapple', 'ham', 'mushrooms'], 3)
print(nice.get_total_price()) |
class Node:
def __init__(self, value):
self.value = value
self.left = None
self.right = None
def insert(self, value):
if self.value:
if value < self.value:
if self.left:
self.left.insert(value)
else:
self.left = Node(value)
else:
if self.right:
self.right.insert(value)
else:
self.right = Node(value)
else:
self.value = value
def preorder(self):
result = []
if not self:
return result
result.append(self.value)
if self.left:
result += self.left.preorder()
if self.right:
result += self.right.preorder()
return result
def inorder(self):
result = []
if not self:
return result
if self.left:
result += self.left.inorder()
result.append(self.value)
if self.right:
result += self.right.inorder()
return result
def postorder(self):
result = []
if not self:
return result
if self.left:
result += self.left.postorder()
if self.right:
result += self.right.postorder()
result.append(self.value)
return result
def create_bst(lst):
root = Node(lst[0])
for i in lst[1:]:
root.insert(i)
return root
| class Node:
def __init__(self, value):
self.value = value
self.left = None
self.right = None
def insert(self, value):
if self.value:
if value < self.value:
if self.left:
self.left.insert(value)
else:
self.left = node(value)
elif self.right:
self.right.insert(value)
else:
self.right = node(value)
else:
self.value = value
def preorder(self):
result = []
if not self:
return result
result.append(self.value)
if self.left:
result += self.left.preorder()
if self.right:
result += self.right.preorder()
return result
def inorder(self):
result = []
if not self:
return result
if self.left:
result += self.left.inorder()
result.append(self.value)
if self.right:
result += self.right.inorder()
return result
def postorder(self):
result = []
if not self:
return result
if self.left:
result += self.left.postorder()
if self.right:
result += self.right.postorder()
result.append(self.value)
return result
def create_bst(lst):
root = node(lst[0])
for i in lst[1:]:
root.insert(i)
return root |
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
ACR_RESOURCE_PROVIDER = 'Microsoft.ContainerRegistry'
ACR_RESOURCE_TYPE = ACR_RESOURCE_PROVIDER + '/registries'
STORAGE_RESOURCE_TYPE = 'Microsoft.Storage/storageAccounts'
WEBHOOK_RESOURCE_TYPE = ACR_RESOURCE_TYPE + '/webhooks'
WEBHOOK_API_VERSION = '2017-06-01-preview'
MANAGED_REGISTRY_API_VERSION = '2017-06-01-preview'
MANAGED_REGISTRY_SKU = ['Managed_Basic', 'Managed_Standard', 'Managed_Premium']
| acr_resource_provider = 'Microsoft.ContainerRegistry'
acr_resource_type = ACR_RESOURCE_PROVIDER + '/registries'
storage_resource_type = 'Microsoft.Storage/storageAccounts'
webhook_resource_type = ACR_RESOURCE_TYPE + '/webhooks'
webhook_api_version = '2017-06-01-preview'
managed_registry_api_version = '2017-06-01-preview'
managed_registry_sku = ['Managed_Basic', 'Managed_Standard', 'Managed_Premium'] |
total = 0
for num in range(101):
total = total + num
print (total)
| total = 0
for num in range(101):
total = total + num
print(total) |
def totalFruit(self, tree):
count = {}
i = res = 0
for j, v in enumerate(tree):
count[v] = count.get(v, 0) + 1
while len(count) > 2:
count[tree[i]] -= 1
if count[tree[i]] == 0: del count[tree[i]]
i += 1
res = max(res, j - i + 1)
return res
| def total_fruit(self, tree):
count = {}
i = res = 0
for (j, v) in enumerate(tree):
count[v] = count.get(v, 0) + 1
while len(count) > 2:
count[tree[i]] -= 1
if count[tree[i]] == 0:
del count[tree[i]]
i += 1
res = max(res, j - i + 1)
return res |
a, b = input().split()
st = ''
num_a = int(a)
num_b = int(b)
if num_a % 2 == 0 :
answer = -num_a
st += str(-num_a)
else :
answer = num_a
st += str(num_a)
if a == b :
if int(a) % 2 == 0 :
print("-", a, "=-", a, sep='')
else :
print(a, "=+", a, sep='')
exit()
while num_a != num_b :
num_a += 1
if(num_a %2 == 0) :
st += '-' + str(num_a)
answer -= num_a
else :
st += '+' + str(num_a)
answer += num_a
st += '='
if (num_b - 1) % 2 == 0 :
st += '+' + str(answer)
else :
st += str(answer)
print(st)
| (a, b) = input().split()
st = ''
num_a = int(a)
num_b = int(b)
if num_a % 2 == 0:
answer = -num_a
st += str(-num_a)
else:
answer = num_a
st += str(num_a)
if a == b:
if int(a) % 2 == 0:
print('-', a, '=-', a, sep='')
else:
print(a, '=+', a, sep='')
exit()
while num_a != num_b:
num_a += 1
if num_a % 2 == 0:
st += '-' + str(num_a)
answer -= num_a
else:
st += '+' + str(num_a)
answer += num_a
st += '='
if (num_b - 1) % 2 == 0:
st += '+' + str(answer)
else:
st += str(answer)
print(st) |
result =1
i=1
while i<=100:
result=result*i
i=i+1
pass
print("the factorial is {}".format(result)) | result = 1
i = 1
while i <= 100:
result = result * i
i = i + 1
pass
print('the factorial is {}'.format(result)) |
class TOS(QTextEdit):
tos_signal = pyqtSignal()
error_signal = pyqtSignal(object)
class Plugin(TrustedCoinPlugin):
def __init__(self, parent, config, name):
super().__init__(parent, config, name)
@hook
def on_new_window(self, window):
wallet = window.wallet
if not isinstance(wallet, self.wallet_class):
return
if wallet.can_sign_without_server():
msg = " ".join([_("This wallet was restored from seed, and it contains two master private keys."), _("Therefore, two-factor authentication is disabled.")])
action = lambda: window.show_message(msg)
else:
action = partial(self.settings_dialog, window)
button = StatusBarButton(QIcon(":icons/trustedcoin-status.png"), _("TrustedCoin"), action)
window.statusBar().addPermanentWidget(button)
self.start_request_thread(window.wallet)
def auth_dialog(self, window):
d = WindowModalDialog(window, _("Authorization"))
vbox = QVBoxLayout(d)
pw = AmountEdit(None, is_int=True)
msg = _("Please enter your Google Authenticator code")
vbox.addWidget(QLabel(msg))
grid = QGridLayout()
grid.setSpacing(8)
grid.addWidget(QLabel(_("Code")), 1, 0)
grid.addWidget(pw, 1, 1)
vbox.addLayout(grid)
msg = _("If you have lost your second factor, you need to restore your wallet from seed in order to request a new code.")
label = QLabel(msg)
label.setWordWrap(1)
vbox.addWidget(label)
vbox.addLayout(Buttons(CancelButton(d), OkButton(d)))
if not d.exec_():
return
return pw.get_amount()
@hook
def sign_tx(self, window, tx):
wallet = window.wallet
if not isinstance(wallet, self.wallet_class):
return
if not wallet.can_sign_without_server():
self.print_error("twofactor:sign_tx")
auth_code = None
if wallet.keystores["x3/"].get_tx_derivations(tx):
auth_code = self.auth_dialog(window)
else:
self.print_error("twofactor: xpub3 not needed")
window.wallet.auth_code = auth_code
def waiting_dialog(self, window, on_finished=None):
task = partial(self.request_billing_info, window.wallet)
return WaitingDialog(window, "Getting billing information...", task, on_finished)
@hook
def abort_send(self, window):
wallet = window.wallet
if not isinstance(wallet, self.wallet_class):
return
if wallet.can_sign_without_server():
return
if wallet.billing_info is None:
return True
return False
def settings_dialog(self, window):
self.waiting_dialog(window, partial(self.show_settings_dialog, window))
def show_settings_dialog(self, window, success):
if not success:
window.show_message(_("Server not reachable."))
return
wallet = window.wallet
d = WindowModalDialog(window, _("TrustedCoin Information"))
d.setMinimumSize(500, 200)
vbox = QVBoxLayout(d)
hbox = QHBoxLayout()
logo = QLabel()
logo.setPixmap(QPixmap(":icons/trustedcoin-status.png"))
msg = _("This wallet is protected by TrustedCoin's two-factor authentication.") + "<br/>" + _("For more information, visit") + ' <a href="https://api.trustedcoin.com/#/electrum-help">https://api.trustedcoin.com/#/electrum-help</a>'
label = QLabel(msg)
label.setOpenExternalLinks(1)
hbox.addStretch(10)
hbox.addWidget(logo)
hbox.addStretch(10)
hbox.addWidget(label)
hbox.addStretch(10)
vbox.addLayout(hbox)
vbox.addStretch(10)
msg = _("TrustedCoin charges a small fee to co-sign transactions. The fee depends on how many prepaid transactions you buy. An extra output is added to your transaction everytime you run out of prepaid transactions.") + "<br/>"
label = QLabel(msg)
label.setWordWrap(1)
vbox.addWidget(label)
vbox.addStretch(10)
grid = QGridLayout()
vbox.addLayout(grid)
price_per_tx = wallet.price_per_tx
n_prepay = wallet.num_prepay(self.config)
i = 0
for k, v in sorted(price_per_tx.items()):
if k == 1:
continue
grid.addWidget(QLabel("Pay every %d transactions:" % k), i, 0)
grid.addWidget(QLabel(window.format_amount(v / k) + " " + window.base_unit() + "/tx"), i, 1)
b = QRadioButton()
b.setChecked(k == n_prepay)
b.clicked.connect(lambda b, k=k: self.config.set_key("trustedcoin_prepay", k, True))
grid.addWidget(b, i, 2)
i += 1
n = wallet.billing_info.get("tx_remaining", 0)
grid.addWidget(QLabel(_("Your wallet has {} prepaid transactions.").format(n)), i, 0)
vbox.addLayout(Buttons(CloseButton(d)))
d.exec_()
def on_buy(self, window, k, v, d):
d.close()
if window.pluginsdialog:
window.pluginsdialog.close()
wallet = window.wallet
uri = "bitcoin:" + wallet.billing_info["billing_address"] + "?message=TrustedCoin %d Prepaid Transactions&amount=" % k + str(Decimal(v) / 100000000)
wallet.is_billing = True
window.pay_to_URI(uri)
window.payto_e.setFrozen(True)
window.message_e.setFrozen(True)
window.amount_e.setFrozen(True)
def accept_terms_of_use(self, window):
vbox = QVBoxLayout()
vbox.addWidget(QLabel(_("Terms of Service")))
tos_e = TOS()
tos_e.setReadOnly(True)
vbox.addWidget(tos_e)
tos_received = False
vbox.addWidget(QLabel(_("Please enter your e-mail address")))
email_e = QLineEdit()
vbox.addWidget(email_e)
next_button = window.next_button
prior_button_text = next_button.text()
next_button.setText(_("Accept"))
def request_TOS():
try:
tos = server.get_terms_of_service()
except Exception as e:
traceback.print_exc(file=sys.stderr)
tos_e.error_signal.emit(_("Could not retrieve Terms of Service:") + "\n" + str(e))
return
self.TOS = tos
tos_e.tos_signal.emit()
def on_result():
tos_e.setText(self.TOS)
nonlocal tos_received
tos_received = True
set_enabled()
def on_error(msg):
window.show_error(str(msg))
window.terminate()
def set_enabled():
valid_email = re.match(regexp, email_e.text()) is not None
next_button.setEnabled(tos_received and valid_email)
tos_e.tos_signal.connect(on_result)
tos_e.error_signal.connect(on_error)
t = Thread(target=request_TOS)
t.setDaemon(True)
t.start()
regexp = r"[^@]+@[^@]+\.[^@]+"
email_e.textChanged.connect(set_enabled)
email_e.setFocus(True)
window.exec_layout(vbox, next_enabled=False)
next_button.setText(prior_button_text)
return str(email_e.text())
def request_otp_dialog(self, window, _id, otp_secret):
vbox = QVBoxLayout()
if otp_secret is not None:
uri = "otpauth://totp/%s?secret=%s" % ("trustedcoin.com", otp_secret)
l = QLabel("Please scan the following QR code in Google Authenticator. You may as well use the following key: %s" % otp_secret)
l.setWordWrap(True)
vbox.addWidget(l)
qrw = QRCodeWidget(uri)
vbox.addWidget(qrw, 1)
msg = _("Then, enter your Google Authenticator code:")
else:
label = QLabel("This wallet is already registered with Trustedcoin. " "To finalize wallet creation, please enter your Google Authenticator Code. ")
label.setWordWrap(1)
vbox.addWidget(label)
msg = _("Google Authenticator code:")
hbox = QHBoxLayout()
hbox.addWidget(WWLabel(msg))
pw = AmountEdit(None, is_int=True)
pw.setFocus(True)
pw.setMaximumWidth(50)
hbox.addWidget(pw)
vbox.addLayout(hbox)
cb_lost = QCheckBox(_("I have lost my Google Authenticator account"))
cb_lost.setToolTip(_("Check this box to request a new secret. You will need to retype your seed."))
vbox.addWidget(cb_lost)
cb_lost.setVisible(otp_secret is None)
def set_enabled():
b = True if cb_lost.isChecked() else len(pw.text()) == 6
window.next_button.setEnabled(b)
pw.textChanged.connect(set_enabled)
cb_lost.toggled.connect(set_enabled)
window.exec_layout(vbox, next_enabled=False, raise_on_cancel=False)
return pw.get_amount(), cb_lost.isChecked() | class Tos(QTextEdit):
tos_signal = pyqt_signal()
error_signal = pyqt_signal(object)
class Plugin(TrustedCoinPlugin):
def __init__(self, parent, config, name):
super().__init__(parent, config, name)
@hook
def on_new_window(self, window):
wallet = window.wallet
if not isinstance(wallet, self.wallet_class):
return
if wallet.can_sign_without_server():
msg = ' '.join([_('This wallet was restored from seed, and it contains two master private keys.'), _('Therefore, two-factor authentication is disabled.')])
action = lambda : window.show_message(msg)
else:
action = partial(self.settings_dialog, window)
button = status_bar_button(q_icon(':icons/trustedcoin-status.png'), _('TrustedCoin'), action)
window.statusBar().addPermanentWidget(button)
self.start_request_thread(window.wallet)
def auth_dialog(self, window):
d = window_modal_dialog(window, _('Authorization'))
vbox = qv_box_layout(d)
pw = amount_edit(None, is_int=True)
msg = _('Please enter your Google Authenticator code')
vbox.addWidget(q_label(msg))
grid = q_grid_layout()
grid.setSpacing(8)
grid.addWidget(q_label(_('Code')), 1, 0)
grid.addWidget(pw, 1, 1)
vbox.addLayout(grid)
msg = _('If you have lost your second factor, you need to restore your wallet from seed in order to request a new code.')
label = q_label(msg)
label.setWordWrap(1)
vbox.addWidget(label)
vbox.addLayout(buttons(cancel_button(d), ok_button(d)))
if not d.exec_():
return
return pw.get_amount()
@hook
def sign_tx(self, window, tx):
wallet = window.wallet
if not isinstance(wallet, self.wallet_class):
return
if not wallet.can_sign_without_server():
self.print_error('twofactor:sign_tx')
auth_code = None
if wallet.keystores['x3/'].get_tx_derivations(tx):
auth_code = self.auth_dialog(window)
else:
self.print_error('twofactor: xpub3 not needed')
window.wallet.auth_code = auth_code
def waiting_dialog(self, window, on_finished=None):
task = partial(self.request_billing_info, window.wallet)
return waiting_dialog(window, 'Getting billing information...', task, on_finished)
@hook
def abort_send(self, window):
wallet = window.wallet
if not isinstance(wallet, self.wallet_class):
return
if wallet.can_sign_without_server():
return
if wallet.billing_info is None:
return True
return False
def settings_dialog(self, window):
self.waiting_dialog(window, partial(self.show_settings_dialog, window))
def show_settings_dialog(self, window, success):
if not success:
window.show_message(_('Server not reachable.'))
return
wallet = window.wallet
d = window_modal_dialog(window, _('TrustedCoin Information'))
d.setMinimumSize(500, 200)
vbox = qv_box_layout(d)
hbox = qh_box_layout()
logo = q_label()
logo.setPixmap(q_pixmap(':icons/trustedcoin-status.png'))
msg = _("This wallet is protected by TrustedCoin's two-factor authentication.") + '<br/>' + _('For more information, visit') + ' <a href="https://api.trustedcoin.com/#/electrum-help">https://api.trustedcoin.com/#/electrum-help</a>'
label = q_label(msg)
label.setOpenExternalLinks(1)
hbox.addStretch(10)
hbox.addWidget(logo)
hbox.addStretch(10)
hbox.addWidget(label)
hbox.addStretch(10)
vbox.addLayout(hbox)
vbox.addStretch(10)
msg = _('TrustedCoin charges a small fee to co-sign transactions. The fee depends on how many prepaid transactions you buy. An extra output is added to your transaction everytime you run out of prepaid transactions.') + '<br/>'
label = q_label(msg)
label.setWordWrap(1)
vbox.addWidget(label)
vbox.addStretch(10)
grid = q_grid_layout()
vbox.addLayout(grid)
price_per_tx = wallet.price_per_tx
n_prepay = wallet.num_prepay(self.config)
i = 0
for (k, v) in sorted(price_per_tx.items()):
if k == 1:
continue
grid.addWidget(q_label('Pay every %d transactions:' % k), i, 0)
grid.addWidget(q_label(window.format_amount(v / k) + ' ' + window.base_unit() + '/tx'), i, 1)
b = q_radio_button()
b.setChecked(k == n_prepay)
b.clicked.connect(lambda b, k=k: self.config.set_key('trustedcoin_prepay', k, True))
grid.addWidget(b, i, 2)
i += 1
n = wallet.billing_info.get('tx_remaining', 0)
grid.addWidget(q_label(_('Your wallet has {} prepaid transactions.').format(n)), i, 0)
vbox.addLayout(buttons(close_button(d)))
d.exec_()
def on_buy(self, window, k, v, d):
d.close()
if window.pluginsdialog:
window.pluginsdialog.close()
wallet = window.wallet
uri = 'bitcoin:' + wallet.billing_info['billing_address'] + '?message=TrustedCoin %d Prepaid Transactions&amount=' % k + str(decimal(v) / 100000000)
wallet.is_billing = True
window.pay_to_URI(uri)
window.payto_e.setFrozen(True)
window.message_e.setFrozen(True)
window.amount_e.setFrozen(True)
def accept_terms_of_use(self, window):
vbox = qv_box_layout()
vbox.addWidget(q_label(_('Terms of Service')))
tos_e = tos()
tos_e.setReadOnly(True)
vbox.addWidget(tos_e)
tos_received = False
vbox.addWidget(q_label(_('Please enter your e-mail address')))
email_e = q_line_edit()
vbox.addWidget(email_e)
next_button = window.next_button
prior_button_text = next_button.text()
next_button.setText(_('Accept'))
def request_tos():
try:
tos = server.get_terms_of_service()
except Exception as e:
traceback.print_exc(file=sys.stderr)
tos_e.error_signal.emit(_('Could not retrieve Terms of Service:') + '\n' + str(e))
return
self.TOS = tos
tos_e.tos_signal.emit()
def on_result():
tos_e.setText(self.TOS)
nonlocal tos_received
tos_received = True
set_enabled()
def on_error(msg):
window.show_error(str(msg))
window.terminate()
def set_enabled():
valid_email = re.match(regexp, email_e.text()) is not None
next_button.setEnabled(tos_received and valid_email)
tos_e.tos_signal.connect(on_result)
tos_e.error_signal.connect(on_error)
t = thread(target=request_TOS)
t.setDaemon(True)
t.start()
regexp = '[^@]+@[^@]+\\.[^@]+'
email_e.textChanged.connect(set_enabled)
email_e.setFocus(True)
window.exec_layout(vbox, next_enabled=False)
next_button.setText(prior_button_text)
return str(email_e.text())
def request_otp_dialog(self, window, _id, otp_secret):
vbox = qv_box_layout()
if otp_secret is not None:
uri = 'otpauth://totp/%s?secret=%s' % ('trustedcoin.com', otp_secret)
l = q_label('Please scan the following QR code in Google Authenticator. You may as well use the following key: %s' % otp_secret)
l.setWordWrap(True)
vbox.addWidget(l)
qrw = qr_code_widget(uri)
vbox.addWidget(qrw, 1)
msg = _('Then, enter your Google Authenticator code:')
else:
label = q_label('This wallet is already registered with Trustedcoin. To finalize wallet creation, please enter your Google Authenticator Code. ')
label.setWordWrap(1)
vbox.addWidget(label)
msg = _('Google Authenticator code:')
hbox = qh_box_layout()
hbox.addWidget(ww_label(msg))
pw = amount_edit(None, is_int=True)
pw.setFocus(True)
pw.setMaximumWidth(50)
hbox.addWidget(pw)
vbox.addLayout(hbox)
cb_lost = q_check_box(_('I have lost my Google Authenticator account'))
cb_lost.setToolTip(_('Check this box to request a new secret. You will need to retype your seed.'))
vbox.addWidget(cb_lost)
cb_lost.setVisible(otp_secret is None)
def set_enabled():
b = True if cb_lost.isChecked() else len(pw.text()) == 6
window.next_button.setEnabled(b)
pw.textChanged.connect(set_enabled)
cb_lost.toggled.connect(set_enabled)
window.exec_layout(vbox, next_enabled=False, raise_on_cancel=False)
return (pw.get_amount(), cb_lost.isChecked()) |
#
# PySNMP MIB module ZHONE-PHY-SONET-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ZHONE-PHY-SONET-MIB
# Produced by pysmi-0.3.4 at Wed May 1 15:47:49 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
ObjectIdentifier, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ConstraintsUnion, ValueSizeConstraint, ValueRangeConstraint, ConstraintsIntersection, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "ValueSizeConstraint", "ValueRangeConstraint", "ConstraintsIntersection", "SingleValueConstraint")
InterfaceIndex, = mibBuilder.importSymbols("IF-MIB", "InterfaceIndex")
NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance")
Unsigned32, Bits, Counter32, Gauge32, MibIdentifier, ObjectIdentity, Counter64, NotificationType, Integer32, MibScalar, MibTable, MibTableRow, MibTableColumn, iso, IpAddress, ModuleIdentity, TimeTicks = mibBuilder.importSymbols("SNMPv2-SMI", "Unsigned32", "Bits", "Counter32", "Gauge32", "MibIdentifier", "ObjectIdentity", "Counter64", "NotificationType", "Integer32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "iso", "IpAddress", "ModuleIdentity", "TimeTicks")
TextualConvention, TruthValue, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "TruthValue", "DisplayString")
sonetMediumEntry, sonetPathCurrentStatus, sonetSectionCurrentStatus, sonetLineCurrentStatus = mibBuilder.importSymbols("SONET-MIB", "sonetMediumEntry", "sonetPathCurrentStatus", "sonetSectionCurrentStatus", "sonetLineCurrentStatus")
zhoneModules, zhoneSonet = mibBuilder.importSymbols("Zhone", "zhoneModules", "zhoneSonet")
phySonet = ModuleIdentity((1, 3, 6, 1, 4, 1, 5504, 6, 16))
phySonet.setRevisions(('2004-08-18 11:47', '2003-07-10 13:30', '2002-03-26 14:30', '2001-09-12 15:08', '2001-07-19 18:00', '2001-02-22 11:35', '2000-12-19 15:23', '2000-12-18 16:20',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: phySonet.setRevisionsDescriptions(('1.03.04 - Add zhoneSonetErrorStatsTable.', '1.03.02 Add sonetPathStatusChange trap.', '1.03.01 Add sonetSectionStatusChange trap and sonetLineStatusChange trap.', 'V01.03.00 Changed names for valid values for sonetClockTransmitSource', 'V01.02.00 Add Sonet clock source change trap.', 'V01.01.00 - Add Sonet Medium Extension Table.', 'V01.00.01 - Add Zhone keywords.', 'V01.00.00 - Initial Release',))
if mibBuilder.loadTexts: phySonet.setLastUpdated('200408181330Z')
if mibBuilder.loadTexts: phySonet.setOrganization('Zhone Technologies, Inc.')
if mibBuilder.loadTexts: phySonet.setContactInfo(' Postal: Zhone Technologies, Inc. @ Zhone Way 7001 Oakport Street Oakland, CA 94621 USA Toll-Free: +1 877-ZHONE20 (+1 877-946-6320) Tel: +1-510-777-7000 Fax: +1-510-777-7001 E-mail: support@zhone.com')
if mibBuilder.loadTexts: phySonet.setDescription('SONET physical MIB to configure and monitor SONET physical attributes. ')
sonetClockTable = MibTable((1, 3, 6, 1, 4, 1, 5504, 5, 9, 1), )
if mibBuilder.loadTexts: sonetClockTable.setStatus('current')
if mibBuilder.loadTexts: sonetClockTable.setDescription('MIB table for clock related configuration for SONET interfaces.')
sonetClockEntry = MibTableRow((1, 3, 6, 1, 4, 1, 5504, 5, 9, 1, 1), )
sonetMediumEntry.registerAugmentions(("ZHONE-PHY-SONET-MIB", "sonetClockEntry"))
sonetClockEntry.setIndexNames(*sonetMediumEntry.getIndexNames())
if mibBuilder.loadTexts: sonetClockEntry.setStatus('current')
if mibBuilder.loadTexts: sonetClockEntry.setDescription('An entry of the sonetClockEntry. sonetClockEntry is augmented to sonetMediumEntry defined in rfc2558.mib. Whenever a row is instantiated in the sonetMediumTable, a corresponding row will be instantiated in the sonetClockTable.')
sonetClockExternalRecovery = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 5, 9, 1, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonetClockExternalRecovery.setStatus('current')
if mibBuilder.loadTexts: sonetClockExternalRecovery.setDescription("This variable indicates if external clock recovery is enabled for this SONET interface. The default value is 'enabled'.")
sonetClockTransmitSource = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 5, 9, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("loopTiming", 1), ("throughTiming", 2), ("localTiming", 3), ("external155MHz", 4)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonetClockTransmitSource.setStatus('current')
if mibBuilder.loadTexts: sonetClockTransmitSource.setDescription("This variable describes the SONET transmit clock source. Valid values are: loopTiming - transmit clock synthesized from the recovered receive clock. throughTiming - transmit clock is derived from the recovered receive clock of another SONET interface. localTiming - transmit clock synthesized from a local clock source or that an external clock is attached to the box containing the interface. external155MHz - transmit clock synthesized from an external 155.52 MHz source. The default value is 'loopTiming'. 'external155MHz' option is not valid for Sechtor 100.")
sonetMediumExtTable = MibTable((1, 3, 6, 1, 4, 1, 5504, 5, 9, 2), )
if mibBuilder.loadTexts: sonetMediumExtTable.setStatus('current')
if mibBuilder.loadTexts: sonetMediumExtTable.setDescription('This is an extenion of the standard Sonet MIB (RFC 2558).')
sonetMediumExtEntry = MibTableRow((1, 3, 6, 1, 4, 1, 5504, 5, 9, 2, 1), )
sonetMediumEntry.registerAugmentions(("ZHONE-PHY-SONET-MIB", "sonetMediumExtEntry"))
sonetMediumExtEntry.setIndexNames(*sonetMediumEntry.getIndexNames())
if mibBuilder.loadTexts: sonetMediumExtEntry.setStatus('current')
if mibBuilder.loadTexts: sonetMediumExtEntry.setDescription('Each row is an extension to the sonetMediumTable for Zhone specific fields. This row is created when the augmented sonetMediumEntry is created.')
sonetMediumExtScrambleEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 5, 9, 2, 1, 1), TruthValue().clone('true')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonetMediumExtScrambleEnabled.setStatus('current')
if mibBuilder.loadTexts: sonetMediumExtScrambleEnabled.setDescription('This field describes the enabled status of the Sonet Scramble mode. If this field is true(1) then Scramble mode is enabled, if this field is false(2) scramble mode is disable.')
sonetMediumExtLineScrmEnabled = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 5, 9, 2, 1, 2), TruthValue().clone('true')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: sonetMediumExtLineScrmEnabled.setStatus('current')
if mibBuilder.loadTexts: sonetMediumExtLineScrmEnabled.setDescription('This field describes the enabled status of the Line level Sonet Scramble mode. If this field is true(1), then Scramble mode is enabled. If this field is false(2), scramble mode is disable.')
sonetTraps = ObjectIdentity((1, 3, 6, 1, 4, 1, 5504, 5, 9, 3))
if mibBuilder.loadTexts: sonetTraps.setStatus('current')
if mibBuilder.loadTexts: sonetTraps.setDescription('All Zhone Sonet traps will be defined under this object identity.')
sonetV2Traps = ObjectIdentity((1, 3, 6, 1, 4, 1, 5504, 5, 9, 3, 0))
if mibBuilder.loadTexts: sonetV2Traps.setStatus('current')
if mibBuilder.loadTexts: sonetV2Traps.setDescription('This object identity adds a zero(0) for the next to last sub-identifier which should be used for new SNMPv2 Traps.')
sonetClockTransmitSourceChange = NotificationType((1, 3, 6, 1, 4, 1, 5504, 5, 9, 3, 0, 1)).setObjects(("ZHONE-PHY-SONET-MIB", "sonetClockExternalRecovery"), ("ZHONE-PHY-SONET-MIB", "sonetClockTransmitSource"))
if mibBuilder.loadTexts: sonetClockTransmitSourceChange.setStatus('current')
if mibBuilder.loadTexts: sonetClockTransmitSourceChange.setDescription('A notification trap is sent when either sonetClockExternalRecovery or sonetClockTransmitSource is changed. The trap object is identified by the OID instance of sonetClockTransmitSource described in the OBJECTS clause.')
sonetSectionStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 5504, 5, 9, 3, 0, 2)).setObjects(("SONET-MIB", "sonetSectionCurrentStatus"))
if mibBuilder.loadTexts: sonetSectionStatusChange.setStatus('current')
if mibBuilder.loadTexts: sonetSectionStatusChange.setDescription('A notification trap is sent when there is a change in the sonet SECTION status. Currenly the following are supported: NO-DEFECT = 1 LOS = 2 LOF = 4 The trap object is identified by the OID instance of sonetSectionCurrentStatus described in the OBJECTS clause.')
sonetLineStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 5504, 5, 9, 3, 0, 3)).setObjects(("SONET-MIB", "sonetLineCurrentStatus"))
if mibBuilder.loadTexts: sonetLineStatusChange.setStatus('current')
if mibBuilder.loadTexts: sonetLineStatusChange.setDescription('A notification trap is sent when there is a change in the sonet LINE status. Currenly the following are supported: NO-DEFECT = 1 AIS = 2 RDI = 4 The trap object is identified by the OID instance of sonetLineCurrentStatus described in the OBJECTS clause.')
sonetPathStatusChange = NotificationType((1, 3, 6, 1, 4, 1, 5504, 5, 9, 3, 0, 4)).setObjects(("SONET-MIB", "sonetPathCurrentStatus"))
if mibBuilder.loadTexts: sonetPathStatusChange.setStatus('current')
if mibBuilder.loadTexts: sonetPathStatusChange.setDescription('A notification trap is sent when there is a change in the sonetPathCurrentStatus. Currenly the following are supported: 1 sonetPathNoDefect 2 sonetPathSTSLOP 4 sonetPathSTSAIS 8 sonetPathSTSRDI 16 sonetPathUnequipped 32 sonetPathSignalLabelMismatch The trap object is identified by the OID instance of sonetPathCurrentStatus described in the OBJECTS clause.')
zhoneSonetErrorStatsTable = MibTable((1, 3, 6, 1, 4, 1, 5504, 5, 9, 6), )
if mibBuilder.loadTexts: zhoneSonetErrorStatsTable.setStatus('current')
if mibBuilder.loadTexts: zhoneSonetErrorStatsTable.setDescription('Description.')
zhoneSonetErrorStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 5504, 5, 9, 6, 1), ).setIndexNames((0, "ZHONE-PHY-SONET-MIB", "zhoneSonetErrorStatsIndex"))
if mibBuilder.loadTexts: zhoneSonetErrorStatsEntry.setStatus('current')
if mibBuilder.loadTexts: zhoneSonetErrorStatsEntry.setDescription('Description.')
zhoneSonetErrorStatsIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 5, 9, 6, 1, 1), InterfaceIndex())
if mibBuilder.loadTexts: zhoneSonetErrorStatsIndex.setStatus('current')
if mibBuilder.loadTexts: zhoneSonetErrorStatsIndex.setDescription('Description.')
zhoneSonetErrorStatsLineFebeCount = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 5, 9, 6, 1, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: zhoneSonetErrorStatsLineFebeCount.setStatus('current')
if mibBuilder.loadTexts: zhoneSonetErrorStatsLineFebeCount.setDescription('Number of RLOP far-end block errors (FEBE).')
zhoneSonetErrorStatsPathFebeCount = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 5, 9, 6, 1, 3), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: zhoneSonetErrorStatsPathFebeCount.setStatus('current')
if mibBuilder.loadTexts: zhoneSonetErrorStatsPathFebeCount.setDescription('Number of RPOP far-end block errors (FEBE).')
zhoneSonetErrorStatsLineBipCount = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 5, 9, 6, 1, 4), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: zhoneSonetErrorStatsLineBipCount.setStatus('current')
if mibBuilder.loadTexts: zhoneSonetErrorStatsLineBipCount.setDescription('Number of Receive Line Overhead Processor (RLOP) BIP-8 errors. The RLOP is responsible for line-level alarms and for monitoring performance.')
zhoneSonetErrorStatsSectionBipCount = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 5, 9, 6, 1, 5), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: zhoneSonetErrorStatsSectionBipCount.setStatus('current')
if mibBuilder.loadTexts: zhoneSonetErrorStatsSectionBipCount.setDescription('Number of Receive Section Overhead Processor (RSOP) bit-interleaved parity (BIP)-8 errors. The RSOP synchronizes and descrambles frames and provides section-level alarms and performance monitoring.')
zhoneSonetErrorStatsPathBipCount = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 5, 9, 6, 1, 6), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: zhoneSonetErrorStatsPathBipCount.setStatus('current')
if mibBuilder.loadTexts: zhoneSonetErrorStatsPathBipCount.setDescription('Number of Receive Path Overhead Processor (RPOP) BIP-8 errors. The RSOP interprets pointers and extracts path overhead and the synchronous payload envelope. It is also responsible for path-level alarms and for monitoring performance.')
zhoneSonetErrorStatsOofCount = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 5, 9, 6, 1, 7), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: zhoneSonetErrorStatsOofCount.setStatus('current')
if mibBuilder.loadTexts: zhoneSonetErrorStatsOofCount.setDescription('Near end is out of frame. False indicates that the line is up and in frame.')
zhoneSonetErrorStatsRxCellCount = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 5, 9, 6, 1, 8), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: zhoneSonetErrorStatsRxCellCount.setStatus('current')
if mibBuilder.loadTexts: zhoneSonetErrorStatsRxCellCount.setDescription('Receive ATM Cell Processor (RACP) receive cell count.')
zhoneSonetErrorStatsTxCellCount = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 5, 9, 6, 1, 9), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: zhoneSonetErrorStatsTxCellCount.setStatus('current')
if mibBuilder.loadTexts: zhoneSonetErrorStatsTxCellCount.setDescription('Transmit ATM Cell Processor (TACP) transmit cell count.')
zhoneSonetErrorStatsHecCorrectedCount = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 5, 9, 6, 1, 10), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: zhoneSonetErrorStatsHecCorrectedCount.setStatus('current')
if mibBuilder.loadTexts: zhoneSonetErrorStatsHecCorrectedCount.setDescription('Number of corrected HEC cells.')
zhoneSonetErrorStatsHecUncorrectedCount = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 5, 9, 6, 1, 11), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: zhoneSonetErrorStatsHecUncorrectedCount.setStatus('current')
if mibBuilder.loadTexts: zhoneSonetErrorStatsHecUncorrectedCount.setDescription('Number of uncorrected dropped HEC cells.')
zhoneSonetErrorStatsCellFifoOverflowCount = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 5, 9, 6, 1, 12), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: zhoneSonetErrorStatsCellFifoOverflowCount.setStatus('current')
if mibBuilder.loadTexts: zhoneSonetErrorStatsCellFifoOverflowCount.setDescription('Number of cells dropped because of first in, first out (FIFO) overflow.')
zhoneSonetErrorStatsLocdCount = MibTableColumn((1, 3, 6, 1, 4, 1, 5504, 5, 9, 6, 1, 13), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: zhoneSonetErrorStatsLocdCount.setStatus('current')
if mibBuilder.loadTexts: zhoneSonetErrorStatsLocdCount.setDescription('Loss of cell delineation.')
mibBuilder.exportSymbols("ZHONE-PHY-SONET-MIB", sonetLineStatusChange=sonetLineStatusChange, zhoneSonetErrorStatsPathBipCount=zhoneSonetErrorStatsPathBipCount, zhoneSonetErrorStatsSectionBipCount=zhoneSonetErrorStatsSectionBipCount, sonetTraps=sonetTraps, zhoneSonetErrorStatsPathFebeCount=zhoneSonetErrorStatsPathFebeCount, zhoneSonetErrorStatsRxCellCount=zhoneSonetErrorStatsRxCellCount, sonetMediumExtEntry=sonetMediumExtEntry, sonetMediumExtTable=sonetMediumExtTable, sonetClockEntry=sonetClockEntry, sonetSectionStatusChange=sonetSectionStatusChange, sonetClockExternalRecovery=sonetClockExternalRecovery, sonetClockTransmitSource=sonetClockTransmitSource, sonetMediumExtLineScrmEnabled=sonetMediumExtLineScrmEnabled, zhoneSonetErrorStatsHecCorrectedCount=zhoneSonetErrorStatsHecCorrectedCount, zhoneSonetErrorStatsTable=zhoneSonetErrorStatsTable, zhoneSonetErrorStatsIndex=zhoneSonetErrorStatsIndex, zhoneSonetErrorStatsLineFebeCount=zhoneSonetErrorStatsLineFebeCount, phySonet=phySonet, sonetV2Traps=sonetV2Traps, sonetMediumExtScrambleEnabled=sonetMediumExtScrambleEnabled, zhoneSonetErrorStatsEntry=zhoneSonetErrorStatsEntry, zhoneSonetErrorStatsLineBipCount=zhoneSonetErrorStatsLineBipCount, PYSNMP_MODULE_ID=phySonet, zhoneSonetErrorStatsHecUncorrectedCount=zhoneSonetErrorStatsHecUncorrectedCount, sonetPathStatusChange=sonetPathStatusChange, sonetClockTransmitSourceChange=sonetClockTransmitSourceChange, sonetClockTable=sonetClockTable, zhoneSonetErrorStatsCellFifoOverflowCount=zhoneSonetErrorStatsCellFifoOverflowCount, zhoneSonetErrorStatsOofCount=zhoneSonetErrorStatsOofCount, zhoneSonetErrorStatsLocdCount=zhoneSonetErrorStatsLocdCount, zhoneSonetErrorStatsTxCellCount=zhoneSonetErrorStatsTxCellCount)
| (object_identifier, octet_string, integer) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'OctetString', 'Integer')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(constraints_union, value_size_constraint, value_range_constraint, constraints_intersection, single_value_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsUnion', 'ValueSizeConstraint', 'ValueRangeConstraint', 'ConstraintsIntersection', 'SingleValueConstraint')
(interface_index,) = mibBuilder.importSymbols('IF-MIB', 'InterfaceIndex')
(notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance')
(unsigned32, bits, counter32, gauge32, mib_identifier, object_identity, counter64, notification_type, integer32, mib_scalar, mib_table, mib_table_row, mib_table_column, iso, ip_address, module_identity, time_ticks) = mibBuilder.importSymbols('SNMPv2-SMI', 'Unsigned32', 'Bits', 'Counter32', 'Gauge32', 'MibIdentifier', 'ObjectIdentity', 'Counter64', 'NotificationType', 'Integer32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'iso', 'IpAddress', 'ModuleIdentity', 'TimeTicks')
(textual_convention, truth_value, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'TruthValue', 'DisplayString')
(sonet_medium_entry, sonet_path_current_status, sonet_section_current_status, sonet_line_current_status) = mibBuilder.importSymbols('SONET-MIB', 'sonetMediumEntry', 'sonetPathCurrentStatus', 'sonetSectionCurrentStatus', 'sonetLineCurrentStatus')
(zhone_modules, zhone_sonet) = mibBuilder.importSymbols('Zhone', 'zhoneModules', 'zhoneSonet')
phy_sonet = module_identity((1, 3, 6, 1, 4, 1, 5504, 6, 16))
phySonet.setRevisions(('2004-08-18 11:47', '2003-07-10 13:30', '2002-03-26 14:30', '2001-09-12 15:08', '2001-07-19 18:00', '2001-02-22 11:35', '2000-12-19 15:23', '2000-12-18 16:20'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts:
phySonet.setRevisionsDescriptions(('1.03.04 - Add zhoneSonetErrorStatsTable.', '1.03.02 Add sonetPathStatusChange trap.', '1.03.01 Add sonetSectionStatusChange trap and sonetLineStatusChange trap.', 'V01.03.00 Changed names for valid values for sonetClockTransmitSource', 'V01.02.00 Add Sonet clock source change trap.', 'V01.01.00 - Add Sonet Medium Extension Table.', 'V01.00.01 - Add Zhone keywords.', 'V01.00.00 - Initial Release'))
if mibBuilder.loadTexts:
phySonet.setLastUpdated('200408181330Z')
if mibBuilder.loadTexts:
phySonet.setOrganization('Zhone Technologies, Inc.')
if mibBuilder.loadTexts:
phySonet.setContactInfo(' Postal: Zhone Technologies, Inc. @ Zhone Way 7001 Oakport Street Oakland, CA 94621 USA Toll-Free: +1 877-ZHONE20 (+1 877-946-6320) Tel: +1-510-777-7000 Fax: +1-510-777-7001 E-mail: support@zhone.com')
if mibBuilder.loadTexts:
phySonet.setDescription('SONET physical MIB to configure and monitor SONET physical attributes. ')
sonet_clock_table = mib_table((1, 3, 6, 1, 4, 1, 5504, 5, 9, 1))
if mibBuilder.loadTexts:
sonetClockTable.setStatus('current')
if mibBuilder.loadTexts:
sonetClockTable.setDescription('MIB table for clock related configuration for SONET interfaces.')
sonet_clock_entry = mib_table_row((1, 3, 6, 1, 4, 1, 5504, 5, 9, 1, 1))
sonetMediumEntry.registerAugmentions(('ZHONE-PHY-SONET-MIB', 'sonetClockEntry'))
sonetClockEntry.setIndexNames(*sonetMediumEntry.getIndexNames())
if mibBuilder.loadTexts:
sonetClockEntry.setStatus('current')
if mibBuilder.loadTexts:
sonetClockEntry.setDescription('An entry of the sonetClockEntry. sonetClockEntry is augmented to sonetMediumEntry defined in rfc2558.mib. Whenever a row is instantiated in the sonetMediumTable, a corresponding row will be instantiated in the sonetClockTable.')
sonet_clock_external_recovery = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 5, 9, 1, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
sonetClockExternalRecovery.setStatus('current')
if mibBuilder.loadTexts:
sonetClockExternalRecovery.setDescription("This variable indicates if external clock recovery is enabled for this SONET interface. The default value is 'enabled'.")
sonet_clock_transmit_source = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 5, 9, 1, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4))).clone(namedValues=named_values(('loopTiming', 1), ('throughTiming', 2), ('localTiming', 3), ('external155MHz', 4)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
sonetClockTransmitSource.setStatus('current')
if mibBuilder.loadTexts:
sonetClockTransmitSource.setDescription("This variable describes the SONET transmit clock source. Valid values are: loopTiming - transmit clock synthesized from the recovered receive clock. throughTiming - transmit clock is derived from the recovered receive clock of another SONET interface. localTiming - transmit clock synthesized from a local clock source or that an external clock is attached to the box containing the interface. external155MHz - transmit clock synthesized from an external 155.52 MHz source. The default value is 'loopTiming'. 'external155MHz' option is not valid for Sechtor 100.")
sonet_medium_ext_table = mib_table((1, 3, 6, 1, 4, 1, 5504, 5, 9, 2))
if mibBuilder.loadTexts:
sonetMediumExtTable.setStatus('current')
if mibBuilder.loadTexts:
sonetMediumExtTable.setDescription('This is an extenion of the standard Sonet MIB (RFC 2558).')
sonet_medium_ext_entry = mib_table_row((1, 3, 6, 1, 4, 1, 5504, 5, 9, 2, 1))
sonetMediumEntry.registerAugmentions(('ZHONE-PHY-SONET-MIB', 'sonetMediumExtEntry'))
sonetMediumExtEntry.setIndexNames(*sonetMediumEntry.getIndexNames())
if mibBuilder.loadTexts:
sonetMediumExtEntry.setStatus('current')
if mibBuilder.loadTexts:
sonetMediumExtEntry.setDescription('Each row is an extension to the sonetMediumTable for Zhone specific fields. This row is created when the augmented sonetMediumEntry is created.')
sonet_medium_ext_scramble_enabled = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 5, 9, 2, 1, 1), truth_value().clone('true')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
sonetMediumExtScrambleEnabled.setStatus('current')
if mibBuilder.loadTexts:
sonetMediumExtScrambleEnabled.setDescription('This field describes the enabled status of the Sonet Scramble mode. If this field is true(1) then Scramble mode is enabled, if this field is false(2) scramble mode is disable.')
sonet_medium_ext_line_scrm_enabled = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 5, 9, 2, 1, 2), truth_value().clone('true')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
sonetMediumExtLineScrmEnabled.setStatus('current')
if mibBuilder.loadTexts:
sonetMediumExtLineScrmEnabled.setDescription('This field describes the enabled status of the Line level Sonet Scramble mode. If this field is true(1), then Scramble mode is enabled. If this field is false(2), scramble mode is disable.')
sonet_traps = object_identity((1, 3, 6, 1, 4, 1, 5504, 5, 9, 3))
if mibBuilder.loadTexts:
sonetTraps.setStatus('current')
if mibBuilder.loadTexts:
sonetTraps.setDescription('All Zhone Sonet traps will be defined under this object identity.')
sonet_v2_traps = object_identity((1, 3, 6, 1, 4, 1, 5504, 5, 9, 3, 0))
if mibBuilder.loadTexts:
sonetV2Traps.setStatus('current')
if mibBuilder.loadTexts:
sonetV2Traps.setDescription('This object identity adds a zero(0) for the next to last sub-identifier which should be used for new SNMPv2 Traps.')
sonet_clock_transmit_source_change = notification_type((1, 3, 6, 1, 4, 1, 5504, 5, 9, 3, 0, 1)).setObjects(('ZHONE-PHY-SONET-MIB', 'sonetClockExternalRecovery'), ('ZHONE-PHY-SONET-MIB', 'sonetClockTransmitSource'))
if mibBuilder.loadTexts:
sonetClockTransmitSourceChange.setStatus('current')
if mibBuilder.loadTexts:
sonetClockTransmitSourceChange.setDescription('A notification trap is sent when either sonetClockExternalRecovery or sonetClockTransmitSource is changed. The trap object is identified by the OID instance of sonetClockTransmitSource described in the OBJECTS clause.')
sonet_section_status_change = notification_type((1, 3, 6, 1, 4, 1, 5504, 5, 9, 3, 0, 2)).setObjects(('SONET-MIB', 'sonetSectionCurrentStatus'))
if mibBuilder.loadTexts:
sonetSectionStatusChange.setStatus('current')
if mibBuilder.loadTexts:
sonetSectionStatusChange.setDescription('A notification trap is sent when there is a change in the sonet SECTION status. Currenly the following are supported: NO-DEFECT = 1 LOS = 2 LOF = 4 The trap object is identified by the OID instance of sonetSectionCurrentStatus described in the OBJECTS clause.')
sonet_line_status_change = notification_type((1, 3, 6, 1, 4, 1, 5504, 5, 9, 3, 0, 3)).setObjects(('SONET-MIB', 'sonetLineCurrentStatus'))
if mibBuilder.loadTexts:
sonetLineStatusChange.setStatus('current')
if mibBuilder.loadTexts:
sonetLineStatusChange.setDescription('A notification trap is sent when there is a change in the sonet LINE status. Currenly the following are supported: NO-DEFECT = 1 AIS = 2 RDI = 4 The trap object is identified by the OID instance of sonetLineCurrentStatus described in the OBJECTS clause.')
sonet_path_status_change = notification_type((1, 3, 6, 1, 4, 1, 5504, 5, 9, 3, 0, 4)).setObjects(('SONET-MIB', 'sonetPathCurrentStatus'))
if mibBuilder.loadTexts:
sonetPathStatusChange.setStatus('current')
if mibBuilder.loadTexts:
sonetPathStatusChange.setDescription('A notification trap is sent when there is a change in the sonetPathCurrentStatus. Currenly the following are supported: 1 sonetPathNoDefect 2 sonetPathSTSLOP 4 sonetPathSTSAIS 8 sonetPathSTSRDI 16 sonetPathUnequipped 32 sonetPathSignalLabelMismatch The trap object is identified by the OID instance of sonetPathCurrentStatus described in the OBJECTS clause.')
zhone_sonet_error_stats_table = mib_table((1, 3, 6, 1, 4, 1, 5504, 5, 9, 6))
if mibBuilder.loadTexts:
zhoneSonetErrorStatsTable.setStatus('current')
if mibBuilder.loadTexts:
zhoneSonetErrorStatsTable.setDescription('Description.')
zhone_sonet_error_stats_entry = mib_table_row((1, 3, 6, 1, 4, 1, 5504, 5, 9, 6, 1)).setIndexNames((0, 'ZHONE-PHY-SONET-MIB', 'zhoneSonetErrorStatsIndex'))
if mibBuilder.loadTexts:
zhoneSonetErrorStatsEntry.setStatus('current')
if mibBuilder.loadTexts:
zhoneSonetErrorStatsEntry.setDescription('Description.')
zhone_sonet_error_stats_index = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 5, 9, 6, 1, 1), interface_index())
if mibBuilder.loadTexts:
zhoneSonetErrorStatsIndex.setStatus('current')
if mibBuilder.loadTexts:
zhoneSonetErrorStatsIndex.setDescription('Description.')
zhone_sonet_error_stats_line_febe_count = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 5, 9, 6, 1, 2), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
zhoneSonetErrorStatsLineFebeCount.setStatus('current')
if mibBuilder.loadTexts:
zhoneSonetErrorStatsLineFebeCount.setDescription('Number of RLOP far-end block errors (FEBE).')
zhone_sonet_error_stats_path_febe_count = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 5, 9, 6, 1, 3), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
zhoneSonetErrorStatsPathFebeCount.setStatus('current')
if mibBuilder.loadTexts:
zhoneSonetErrorStatsPathFebeCount.setDescription('Number of RPOP far-end block errors (FEBE).')
zhone_sonet_error_stats_line_bip_count = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 5, 9, 6, 1, 4), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
zhoneSonetErrorStatsLineBipCount.setStatus('current')
if mibBuilder.loadTexts:
zhoneSonetErrorStatsLineBipCount.setDescription('Number of Receive Line Overhead Processor (RLOP) BIP-8 errors. The RLOP is responsible for line-level alarms and for monitoring performance.')
zhone_sonet_error_stats_section_bip_count = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 5, 9, 6, 1, 5), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
zhoneSonetErrorStatsSectionBipCount.setStatus('current')
if mibBuilder.loadTexts:
zhoneSonetErrorStatsSectionBipCount.setDescription('Number of Receive Section Overhead Processor (RSOP) bit-interleaved parity (BIP)-8 errors. The RSOP synchronizes and descrambles frames and provides section-level alarms and performance monitoring.')
zhone_sonet_error_stats_path_bip_count = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 5, 9, 6, 1, 6), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
zhoneSonetErrorStatsPathBipCount.setStatus('current')
if mibBuilder.loadTexts:
zhoneSonetErrorStatsPathBipCount.setDescription('Number of Receive Path Overhead Processor (RPOP) BIP-8 errors. The RSOP interprets pointers and extracts path overhead and the synchronous payload envelope. It is also responsible for path-level alarms and for monitoring performance.')
zhone_sonet_error_stats_oof_count = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 5, 9, 6, 1, 7), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
zhoneSonetErrorStatsOofCount.setStatus('current')
if mibBuilder.loadTexts:
zhoneSonetErrorStatsOofCount.setDescription('Near end is out of frame. False indicates that the line is up and in frame.')
zhone_sonet_error_stats_rx_cell_count = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 5, 9, 6, 1, 8), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
zhoneSonetErrorStatsRxCellCount.setStatus('current')
if mibBuilder.loadTexts:
zhoneSonetErrorStatsRxCellCount.setDescription('Receive ATM Cell Processor (RACP) receive cell count.')
zhone_sonet_error_stats_tx_cell_count = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 5, 9, 6, 1, 9), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
zhoneSonetErrorStatsTxCellCount.setStatus('current')
if mibBuilder.loadTexts:
zhoneSonetErrorStatsTxCellCount.setDescription('Transmit ATM Cell Processor (TACP) transmit cell count.')
zhone_sonet_error_stats_hec_corrected_count = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 5, 9, 6, 1, 10), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
zhoneSonetErrorStatsHecCorrectedCount.setStatus('current')
if mibBuilder.loadTexts:
zhoneSonetErrorStatsHecCorrectedCount.setDescription('Number of corrected HEC cells.')
zhone_sonet_error_stats_hec_uncorrected_count = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 5, 9, 6, 1, 11), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
zhoneSonetErrorStatsHecUncorrectedCount.setStatus('current')
if mibBuilder.loadTexts:
zhoneSonetErrorStatsHecUncorrectedCount.setDescription('Number of uncorrected dropped HEC cells.')
zhone_sonet_error_stats_cell_fifo_overflow_count = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 5, 9, 6, 1, 12), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
zhoneSonetErrorStatsCellFifoOverflowCount.setStatus('current')
if mibBuilder.loadTexts:
zhoneSonetErrorStatsCellFifoOverflowCount.setDescription('Number of cells dropped because of first in, first out (FIFO) overflow.')
zhone_sonet_error_stats_locd_count = mib_table_column((1, 3, 6, 1, 4, 1, 5504, 5, 9, 6, 1, 13), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
zhoneSonetErrorStatsLocdCount.setStatus('current')
if mibBuilder.loadTexts:
zhoneSonetErrorStatsLocdCount.setDescription('Loss of cell delineation.')
mibBuilder.exportSymbols('ZHONE-PHY-SONET-MIB', sonetLineStatusChange=sonetLineStatusChange, zhoneSonetErrorStatsPathBipCount=zhoneSonetErrorStatsPathBipCount, zhoneSonetErrorStatsSectionBipCount=zhoneSonetErrorStatsSectionBipCount, sonetTraps=sonetTraps, zhoneSonetErrorStatsPathFebeCount=zhoneSonetErrorStatsPathFebeCount, zhoneSonetErrorStatsRxCellCount=zhoneSonetErrorStatsRxCellCount, sonetMediumExtEntry=sonetMediumExtEntry, sonetMediumExtTable=sonetMediumExtTable, sonetClockEntry=sonetClockEntry, sonetSectionStatusChange=sonetSectionStatusChange, sonetClockExternalRecovery=sonetClockExternalRecovery, sonetClockTransmitSource=sonetClockTransmitSource, sonetMediumExtLineScrmEnabled=sonetMediumExtLineScrmEnabled, zhoneSonetErrorStatsHecCorrectedCount=zhoneSonetErrorStatsHecCorrectedCount, zhoneSonetErrorStatsTable=zhoneSonetErrorStatsTable, zhoneSonetErrorStatsIndex=zhoneSonetErrorStatsIndex, zhoneSonetErrorStatsLineFebeCount=zhoneSonetErrorStatsLineFebeCount, phySonet=phySonet, sonetV2Traps=sonetV2Traps, sonetMediumExtScrambleEnabled=sonetMediumExtScrambleEnabled, zhoneSonetErrorStatsEntry=zhoneSonetErrorStatsEntry, zhoneSonetErrorStatsLineBipCount=zhoneSonetErrorStatsLineBipCount, PYSNMP_MODULE_ID=phySonet, zhoneSonetErrorStatsHecUncorrectedCount=zhoneSonetErrorStatsHecUncorrectedCount, sonetPathStatusChange=sonetPathStatusChange, sonetClockTransmitSourceChange=sonetClockTransmitSourceChange, sonetClockTable=sonetClockTable, zhoneSonetErrorStatsCellFifoOverflowCount=zhoneSonetErrorStatsCellFifoOverflowCount, zhoneSonetErrorStatsOofCount=zhoneSonetErrorStatsOofCount, zhoneSonetErrorStatsLocdCount=zhoneSonetErrorStatsLocdCount, zhoneSonetErrorStatsTxCellCount=zhoneSonetErrorStatsTxCellCount) |
### SATISFACTORY RESPONSE
## Not found code
OK = 200
OK_NOCONTENT = 204
### CLIENT ERROR
## Not found code
NOT_FOUND = 404
UNAUTHORIZED = 401
### SERVER ERROR
## Internal server error
INTERNAL_ERROR = 500
| ok = 200
ok_nocontent = 204
not_found = 404
unauthorized = 401
internal_error = 500 |
# DESCRIPTION
# Return the root node of a binary search tree that matches the given preorder traversal.
# It's guaranteed that for the given test cases there is always possible to find a
# binary search tree with the given requirements.
# EXAMPLE
# Input: [8,5,1,7,10,12]
# Output: [8,5,10,1,7,null,12]
# 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 bstFromPreorder(self, preorder: List[int]) -> TreeNode:
'''
Time: O(N), Must iterate over every element of the list
Space: O(N), max space needed for recursive stack
'''
self.index = 0
return self.bst_build(preorder, float('inf'))
def bst_build(self, preorder, limit):
# if we have run out of numbers in list
# or the curr val is larger than the limit
if self.index >= len(preorder) or preorder[self.index] > limit:
return None
root = TreeNode(preorder[self.index])
# inc to move with the list
self.index += 1
# must not be larger than the parent value
root.left = self.bst_build(preorder, root.val)
# must not be larger than the parents limit
root.right = self.bst_build(preorder, limit)
return root | class Solution:
def bst_from_preorder(self, preorder: List[int]) -> TreeNode:
"""
Time: O(N), Must iterate over every element of the list
Space: O(N), max space needed for recursive stack
"""
self.index = 0
return self.bst_build(preorder, float('inf'))
def bst_build(self, preorder, limit):
if self.index >= len(preorder) or preorder[self.index] > limit:
return None
root = tree_node(preorder[self.index])
self.index += 1
root.left = self.bst_build(preorder, root.val)
root.right = self.bst_build(preorder, limit)
return root |
def find_floor(brackets: str) -> int:
return sum(1 if c == '(' else -1 for c in brackets)
def find_basement_entry(brackets: str) -> int:
return [n + 1 for n in range(len(brackets)) if find_floor(brackets[:n + 1]) == -1][0]
if __name__ == '__main__':
with open('input') as f:
bracket_text = f.read()
print(f'Part 1: {find_floor(bracket_text)}')
print(f'Part 2: {find_basement_entry(bracket_text)}')
| def find_floor(brackets: str) -> int:
return sum((1 if c == '(' else -1 for c in brackets))
def find_basement_entry(brackets: str) -> int:
return [n + 1 for n in range(len(brackets)) if find_floor(brackets[:n + 1]) == -1][0]
if __name__ == '__main__':
with open('input') as f:
bracket_text = f.read()
print(f'Part 1: {find_floor(bracket_text)}')
print(f'Part 2: {find_basement_entry(bracket_text)}') |
result = [
None,
6,
['a', 'b', 'c', {'uu': 5.6, 'oo': [Ellipsis], 'ii': {Ellipsis}}],
{'uu': 5.6, 'oo': [Ellipsis], 'ii': {Ellipsis}},
{'uu': 5.6, 'oo': [Ellipsis], 'ii': {Ellipsis}},
['a', 'b', 'c', {'uu': 5.6, 'oo': [Ellipsis], 'ii': {Ellipsis}}],
None,
6
]
def is_equal(a, b, message):
comparable_a = [
a[0],
a[1],
[a[2][0], a[2][1], a[2][2], {'uu': a[2][3]['uu'],
'oo': [Ellipsis],
'ii': [Ellipsis]}],
{'uu': a[3]['uu'], 'oo': [Ellipsis], 'ii': [Ellipsis]},
{'uu': a[4]['uu'], 'oo': [Ellipsis], 'ii': [Ellipsis]},
[a[5][0], a[5][1], a[5][2], {'uu': a[5][3]['uu'],
'oo': [Ellipsis],
'ii': [Ellipsis]}],
a[6],
a[7]
]
comparable_b = [
b[0],
b[1],
[b[2][0], b[2][1], b[2][2], {'uu': b[2][3]['uu'],
'oo': [Ellipsis],
'ii': [Ellipsis]}],
{'uu': b[3]['uu'], 'oo': [Ellipsis], 'ii': [Ellipsis]},
{'uu': b[4]['uu'], 'oo': [Ellipsis], 'ii': [Ellipsis]},
[b[5][0], b[5][1], b[5][2], {'uu': b[5][3]['uu'],
'oo': [Ellipsis],
'ii': [Ellipsis]}],
b[6],
b[7]
]
if len(a) != len(b):
raise AssertionError(message + ': Array length differs')
non_recursive_a = [a[0], a[1], a[-2], a[-1]]
non_recursive_b = [b[0], b[1], b[-2], b[-1]]
if non_recursive_a != non_recursive_b:
raise AssertionError(message + ': non-recursive part differs')
if comparable_a != comparable_b:
raise AssertionError(message + ': recursive part differs')
| result = [None, 6, ['a', 'b', 'c', {'uu': 5.6, 'oo': [Ellipsis], 'ii': {Ellipsis}}], {'uu': 5.6, 'oo': [Ellipsis], 'ii': {Ellipsis}}, {'uu': 5.6, 'oo': [Ellipsis], 'ii': {Ellipsis}}, ['a', 'b', 'c', {'uu': 5.6, 'oo': [Ellipsis], 'ii': {Ellipsis}}], None, 6]
def is_equal(a, b, message):
comparable_a = [a[0], a[1], [a[2][0], a[2][1], a[2][2], {'uu': a[2][3]['uu'], 'oo': [Ellipsis], 'ii': [Ellipsis]}], {'uu': a[3]['uu'], 'oo': [Ellipsis], 'ii': [Ellipsis]}, {'uu': a[4]['uu'], 'oo': [Ellipsis], 'ii': [Ellipsis]}, [a[5][0], a[5][1], a[5][2], {'uu': a[5][3]['uu'], 'oo': [Ellipsis], 'ii': [Ellipsis]}], a[6], a[7]]
comparable_b = [b[0], b[1], [b[2][0], b[2][1], b[2][2], {'uu': b[2][3]['uu'], 'oo': [Ellipsis], 'ii': [Ellipsis]}], {'uu': b[3]['uu'], 'oo': [Ellipsis], 'ii': [Ellipsis]}, {'uu': b[4]['uu'], 'oo': [Ellipsis], 'ii': [Ellipsis]}, [b[5][0], b[5][1], b[5][2], {'uu': b[5][3]['uu'], 'oo': [Ellipsis], 'ii': [Ellipsis]}], b[6], b[7]]
if len(a) != len(b):
raise assertion_error(message + ': Array length differs')
non_recursive_a = [a[0], a[1], a[-2], a[-1]]
non_recursive_b = [b[0], b[1], b[-2], b[-1]]
if non_recursive_a != non_recursive_b:
raise assertion_error(message + ': non-recursive part differs')
if comparable_a != comparable_b:
raise assertion_error(message + ': recursive part differs') |
p1, p2 = map(int, input().split())
m = (p1 + p2) / 2
if m >= 7:
print(f'{m} - Aprovado', end='')
elif m < 5:
print(f'{m} - Reprovado', end='')
else:
print(f'{m} - De Recuperacao', end='')
| (p1, p2) = map(int, input().split())
m = (p1 + p2) / 2
if m >= 7:
print(f'{m} - Aprovado', end='')
elif m < 5:
print(f'{m} - Reprovado', end='')
else:
print(f'{m} - De Recuperacao', end='') |
#
# PySNMP MIB module RADIUS-ACCOUNTING-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/RADIUS-ACCOUNTING-MIB
# Produced by pysmi-0.3.4 at Wed May 1 14:44:47 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
Integer, ObjectIdentifier, OctetString = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueRangeConstraint, ConstraintsUnion, SingleValueConstraint, ValueSizeConstraint, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "ConstraintsUnion", "SingleValueConstraint", "ValueSizeConstraint", "ConstraintsIntersection")
dlink_common_mgmt, = mibBuilder.importSymbols("DLINK-ID-REC-MIB", "dlink-common-mgmt")
NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance")
IpAddress, Gauge32, Counter32, iso, ObjectIdentity, TimeTicks, MibScalar, MibTable, MibTableRow, MibTableColumn, MibIdentifier, Integer32, ModuleIdentity, Bits, NotificationType, Counter64, Unsigned32 = mibBuilder.importSymbols("SNMPv2-SMI", "IpAddress", "Gauge32", "Counter32", "iso", "ObjectIdentity", "TimeTicks", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "MibIdentifier", "Integer32", "ModuleIdentity", "Bits", "NotificationType", "Counter64", "Unsigned32")
DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention")
swRadiusAccountMGMTMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 171, 12, 55))
if mibBuilder.loadTexts: swRadiusAccountMGMTMIB.setLastUpdated('0712200000Z')
if mibBuilder.loadTexts: swRadiusAccountMGMTMIB.setOrganization('D-Link Corp.')
if mibBuilder.loadTexts: swRadiusAccountMGMTMIB.setContactInfo('http://support.dlink.com')
if mibBuilder.loadTexts: swRadiusAccountMGMTMIB.setDescription('The structure of RADIUS accounting for the proprietary enterprise.')
radiusAccountCtrl = MibIdentifier((1, 3, 6, 1, 4, 1, 171, 12, 55, 1))
accountingShellState = MibScalar((1, 3, 6, 1, 4, 1, 171, 12, 55, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2))).clone('disabled')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: accountingShellState.setStatus('current')
if mibBuilder.loadTexts: accountingShellState.setDescription('Specifies the status of the RADIUS accounting service for shell events.')
accountingSystemState = MibScalar((1, 3, 6, 1, 4, 1, 171, 12, 55, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2))).clone('disabled')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: accountingSystemState.setStatus('current')
if mibBuilder.loadTexts: accountingSystemState.setDescription('Specifies the status of the RADIUS accounting service for system events.')
accountingNetworkState = MibScalar((1, 3, 6, 1, 4, 1, 171, 12, 55, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2))).clone('disabled')).setMaxAccess("readwrite")
if mibBuilder.loadTexts: accountingNetworkState.setStatus('current')
if mibBuilder.loadTexts: accountingNetworkState.setDescription('Specifies the status of the RADIUS accounting service for 802.1x port access control.')
mibBuilder.exportSymbols("RADIUS-ACCOUNTING-MIB", accountingShellState=accountingShellState, accountingSystemState=accountingSystemState, PYSNMP_MODULE_ID=swRadiusAccountMGMTMIB, radiusAccountCtrl=radiusAccountCtrl, swRadiusAccountMGMTMIB=swRadiusAccountMGMTMIB, accountingNetworkState=accountingNetworkState)
| (integer, object_identifier, octet_string) = mibBuilder.importSymbols('ASN1', 'Integer', 'ObjectIdentifier', 'OctetString')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(value_range_constraint, constraints_union, single_value_constraint, value_size_constraint, constraints_intersection) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueRangeConstraint', 'ConstraintsUnion', 'SingleValueConstraint', 'ValueSizeConstraint', 'ConstraintsIntersection')
(dlink_common_mgmt,) = mibBuilder.importSymbols('DLINK-ID-REC-MIB', 'dlink-common-mgmt')
(notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance')
(ip_address, gauge32, counter32, iso, object_identity, time_ticks, mib_scalar, mib_table, mib_table_row, mib_table_column, mib_identifier, integer32, module_identity, bits, notification_type, counter64, unsigned32) = mibBuilder.importSymbols('SNMPv2-SMI', 'IpAddress', 'Gauge32', 'Counter32', 'iso', 'ObjectIdentity', 'TimeTicks', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'MibIdentifier', 'Integer32', 'ModuleIdentity', 'Bits', 'NotificationType', 'Counter64', 'Unsigned32')
(display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention')
sw_radius_account_mgmtmib = module_identity((1, 3, 6, 1, 4, 1, 171, 12, 55))
if mibBuilder.loadTexts:
swRadiusAccountMGMTMIB.setLastUpdated('0712200000Z')
if mibBuilder.loadTexts:
swRadiusAccountMGMTMIB.setOrganization('D-Link Corp.')
if mibBuilder.loadTexts:
swRadiusAccountMGMTMIB.setContactInfo('http://support.dlink.com')
if mibBuilder.loadTexts:
swRadiusAccountMGMTMIB.setDescription('The structure of RADIUS accounting for the proprietary enterprise.')
radius_account_ctrl = mib_identifier((1, 3, 6, 1, 4, 1, 171, 12, 55, 1))
accounting_shell_state = mib_scalar((1, 3, 6, 1, 4, 1, 171, 12, 55, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2))).clone('disabled')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
accountingShellState.setStatus('current')
if mibBuilder.loadTexts:
accountingShellState.setDescription('Specifies the status of the RADIUS accounting service for shell events.')
accounting_system_state = mib_scalar((1, 3, 6, 1, 4, 1, 171, 12, 55, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2))).clone('disabled')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
accountingSystemState.setStatus('current')
if mibBuilder.loadTexts:
accountingSystemState.setDescription('Specifies the status of the RADIUS accounting service for system events.')
accounting_network_state = mib_scalar((1, 3, 6, 1, 4, 1, 171, 12, 55, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enabled', 1), ('disabled', 2))).clone('disabled')).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
accountingNetworkState.setStatus('current')
if mibBuilder.loadTexts:
accountingNetworkState.setDescription('Specifies the status of the RADIUS accounting service for 802.1x port access control.')
mibBuilder.exportSymbols('RADIUS-ACCOUNTING-MIB', accountingShellState=accountingShellState, accountingSystemState=accountingSystemState, PYSNMP_MODULE_ID=swRadiusAccountMGMTMIB, radiusAccountCtrl=radiusAccountCtrl, swRadiusAccountMGMTMIB=swRadiusAccountMGMTMIB, accountingNetworkState=accountingNetworkState) |
#Prints the number in matrix form
def print_numbers(number):
for i in range(1,number+1):
for j in range(1, number+1):
print(i,end=" ")
print()
number=int(input("please enter a number: "))
if number%2==0:
print_numbers(number+1)
else:
print_numbers(number-1)
| def print_numbers(number):
for i in range(1, number + 1):
for j in range(1, number + 1):
print(i, end=' ')
print()
number = int(input('please enter a number: '))
if number % 2 == 0:
print_numbers(number + 1)
else:
print_numbers(number - 1) |
def bar_spec(data):
return {
"config": {
"view": {"continuousWidth": 400, "continuousHeight": 300},
"mark": {"opacity": 0.75}
},
"layer": [
{
"mark": {"type": "bar", "color": "red"},
"encoding": {
"x": {"type": "nominal", "field": "subject"},
"y": {
"type": "quantitative",
"field": "percentage of input passed filter"
}
}
},
{
"mark": {"type": "bar", "color": "yellow"},
"encoding": {
"x": {"type": "nominal", "field": "subject"},
"y": {
"type": "quantitative",
"field": "percentage of input non-chimeric"
}
}
}
],
"data": {
"values":
data
},
"height": 600,
"title": "% passed the filter and % non-chimeric for sample ID's",
"width": 800,
"$schema": "https://vega.github.io/schema/vega-lite/v4.8.1.json"
}
| def bar_spec(data):
return {'config': {'view': {'continuousWidth': 400, 'continuousHeight': 300}, 'mark': {'opacity': 0.75}}, 'layer': [{'mark': {'type': 'bar', 'color': 'red'}, 'encoding': {'x': {'type': 'nominal', 'field': 'subject'}, 'y': {'type': 'quantitative', 'field': 'percentage of input passed filter'}}}, {'mark': {'type': 'bar', 'color': 'yellow'}, 'encoding': {'x': {'type': 'nominal', 'field': 'subject'}, 'y': {'type': 'quantitative', 'field': 'percentage of input non-chimeric'}}}], 'data': {'values': data}, 'height': 600, 'title': "% passed the filter and % non-chimeric for sample ID's", 'width': 800, '$schema': 'https://vega.github.io/schema/vega-lite/v4.8.1.json'} |
#!/usr/bin/env python
#
# Copyright (C) 2017 ShadowMan
#
class FatalError(Exception):
pass
class FrameHeaderParseError(Exception):
pass
class ConnectClosed(Exception):
pass
class RequestError(Exception):
pass
class LoggerWarning(RuntimeWarning):
pass
class DeamonError(Exception):
pass
class SendDataPackError(Exception):
pass
class InvalidResponse(Exception):
pass
class ParameterError(Exception):
pass
def raise_parameter_error(name, except_type, got_val):
if not isinstance(got_val, except_type):
raise ParameterError(
'{name} except {except_type}, got {got_type}'.format(
name=name,
except_type=except_type.__name__,
got_type=type(got_val).__name__))
class ExitWrite(Exception):
pass
class BroadcastError(Exception):
pass
class HttpVerifierError(Exception):
pass
class FrameVerifierError(Exception):
pass
class WSSCertificateFileNotFound(Exception):
pass
| class Fatalerror(Exception):
pass
class Frameheaderparseerror(Exception):
pass
class Connectclosed(Exception):
pass
class Requesterror(Exception):
pass
class Loggerwarning(RuntimeWarning):
pass
class Deamonerror(Exception):
pass
class Senddatapackerror(Exception):
pass
class Invalidresponse(Exception):
pass
class Parametererror(Exception):
pass
def raise_parameter_error(name, except_type, got_val):
if not isinstance(got_val, except_type):
raise parameter_error('{name} except {except_type}, got {got_type}'.format(name=name, except_type=except_type.__name__, got_type=type(got_val).__name__))
class Exitwrite(Exception):
pass
class Broadcasterror(Exception):
pass
class Httpverifiererror(Exception):
pass
class Frameverifiererror(Exception):
pass
class Wsscertificatefilenotfound(Exception):
pass |
#!/usr/bin/env python
#coding: utf-8
# Definition for singly-linked list.
class ListNode:
def __init__(self, x):
self.val = x
self.next = None
class Solution:
# @return a ListNode
def addTwoNumbers(self, l1, l2):
h = ch = ListNode(-1)
n1, n2, c = l1, l2, 0
while n1 or n2:
a = n1.val if n1 else 0
b = n2.val if n2 else 0
s = a + b + c
ch.next = ListNode(s % 10)
c = s / 10
ch = ch.next
if n1: n1 = n1.next
if n2: n2 = n2.next
if c:
ch.next = ListNode(c)
return h.next
def printL(x):
for i in x:
print(i.val),
print('')
if __name__ == '__main__':
t0 = [ListNode(i) for i in (2,4,3)]
t0[0].next = t0[1]
t0[1].next == t0[2]
t1 = [ListNode(i) for i in (5,6,4)]
t1[0].next = t1[1]
t1[1].next == t1[2]
t2 = [ListNode(i) for i in (7,0,8)]
t2[0].next = t2[1]
t2[1].next == t2[2]
printL(t0), printL(t1), printL(t2)
s = Solution()
assert t2[0].val == s.addTwoNumbers(t0[0], t1[0]).val
| class Listnode:
def __init__(self, x):
self.val = x
self.next = None
class Solution:
def add_two_numbers(self, l1, l2):
h = ch = list_node(-1)
(n1, n2, c) = (l1, l2, 0)
while n1 or n2:
a = n1.val if n1 else 0
b = n2.val if n2 else 0
s = a + b + c
ch.next = list_node(s % 10)
c = s / 10
ch = ch.next
if n1:
n1 = n1.next
if n2:
n2 = n2.next
if c:
ch.next = list_node(c)
return h.next
def print_l(x):
for i in x:
(print(i.val),)
print('')
if __name__ == '__main__':
t0 = [list_node(i) for i in (2, 4, 3)]
t0[0].next = t0[1]
t0[1].next == t0[2]
t1 = [list_node(i) for i in (5, 6, 4)]
t1[0].next = t1[1]
t1[1].next == t1[2]
t2 = [list_node(i) for i in (7, 0, 8)]
t2[0].next = t2[1]
t2[1].next == t2[2]
(print_l(t0), print_l(t1), print_l(t2))
s = solution()
assert t2[0].val == s.addTwoNumbers(t0[0], t1[0]).val |
def is_uppercase(letter: str):
return True if 65 <= ord(letter) <= 90 else False
def is_lowercase(letter: str):
return True if 97 <= ord(letter) <= 122 else False
def check_same_case(first: str, second: str) -> bool:
if is_uppercase(first) and is_uppercase(second):
return True
if is_lowercase(first) and is_lowercase(second):
return True
return False
def main():
same_case = check_same_case('?', '?')
print(same_case)
if __name__ == '__main__':
main()
| def is_uppercase(letter: str):
return True if 65 <= ord(letter) <= 90 else False
def is_lowercase(letter: str):
return True if 97 <= ord(letter) <= 122 else False
def check_same_case(first: str, second: str) -> bool:
if is_uppercase(first) and is_uppercase(second):
return True
if is_lowercase(first) and is_lowercase(second):
return True
return False
def main():
same_case = check_same_case('?', '?')
print(same_case)
if __name__ == '__main__':
main() |
n=int(input("enter a number"))
m=int(input("enter a number"))
if n%m==0:
print(n,"is dividible by",m)
else:
print(n,"is not divisible by",m)
if n%2==0:
print(n,"is even")
else:
print(n,"is odd")
| n = int(input('enter a number'))
m = int(input('enter a number'))
if n % m == 0:
print(n, 'is dividible by', m)
else:
print(n, 'is not divisible by', m)
if n % 2 == 0:
print(n, 'is even')
else:
print(n, 'is odd') |
MAX = 'x'
MIN = 'o'
def get_player(s):
return MAX if len([1 for i in s if i == ' ']) % 2 == 1 else MIN
def next_player(p):
return MAX if p == MIN else MIN
def get_actions(s):
return [i for i in range(9) if s[i] == ' ']
def result(s, a):
player = get_player(s)
s2 = list(s)
s2[a] = player
return s2
def is_winning_state(s, player):
aux = [player] * 3
if s[0:3] == aux or \
s[3:6] == aux or \
s[6:9] == aux or \
s[0:9:3] == aux or \
s[1:9:3] == aux or \
s[2:9:3] == aux or \
s[2:8:2] == aux or \
s[0:9:4] == aux:
return True
else:
return False
def terminal(s):
if is_winning_state(s, MAX) or is_winning_state(s, MIN):
return True
if ' ' not in s:
return True
return False
def utility(s):
if is_winning_state(s, MAX):
return 1
if is_winning_state(s, MIN):
return -1
return 0
def maxval(s):
if terminal(s):
return None, utility(s)
best_utility = float("-Inf")
best_action = None
actions = get_actions(s)
for action in actions:
s2 = result(s, action)
_, current_utility = minval(s2)
if current_utility >= best_utility:
best_utility = current_utility
best_action = action
if best_utility == 1: # Maximum utility
break
return best_action, best_utility
def minval(s):
if terminal(s):
return None, utility(s)
best_utility = float("Inf")
best_action = None
actions = get_actions(s)
for action in actions:
s2 = result(s, action)
_, current_utility = maxval(s2)
if current_utility <= best_utility:
best_utility = current_utility
best_action = action
if best_utility == -1: # Minimum utility
break
return best_action, best_utility
def minmax(s):
p = get_player(s)
if p == MAX:
return maxval(s)
if p == MIN:
return minval(s)
def print_s(s):
print(" {} | {} | {} \n"
" 0 | 1 | 2 \n"
"-----------\n"
" {} | {} | {} \n"
" 3 | 4 | 5 \n"
"-----------\n"
" {} | {} | {} \n"
" 6 | 7 | 8 \n".format(*s))
def ai_play(s):
a, _ = minmax(s)
return a
def user_play(s):
a = int(input())
return a
if __name__ == "__main__":
s = [' ', ' ', ' ',
' ', ' ', ' ',
' ', ' ', ' ']
print_s(s)
players = [
("USER", user_play),
("AI", ai_play)
]
while not terminal(s):
for name, method in players:
print("{} -> ".format(name))
a = method(s)
s = result(s, a)
print_s(s)
if terminal(s):
break
if is_winning_state(s, MAX):
print("PLAYER '{}' WON!".format(MAX))
elif is_winning_state(s, MIN):
print("PLAYER '{}' WON!".format(MIN))
else:
print("TIE!") | max = 'x'
min = 'o'
def get_player(s):
return MAX if len([1 for i in s if i == ' ']) % 2 == 1 else MIN
def next_player(p):
return MAX if p == MIN else MIN
def get_actions(s):
return [i for i in range(9) if s[i] == ' ']
def result(s, a):
player = get_player(s)
s2 = list(s)
s2[a] = player
return s2
def is_winning_state(s, player):
aux = [player] * 3
if s[0:3] == aux or s[3:6] == aux or s[6:9] == aux or (s[0:9:3] == aux) or (s[1:9:3] == aux) or (s[2:9:3] == aux) or (s[2:8:2] == aux) or (s[0:9:4] == aux):
return True
else:
return False
def terminal(s):
if is_winning_state(s, MAX) or is_winning_state(s, MIN):
return True
if ' ' not in s:
return True
return False
def utility(s):
if is_winning_state(s, MAX):
return 1
if is_winning_state(s, MIN):
return -1
return 0
def maxval(s):
if terminal(s):
return (None, utility(s))
best_utility = float('-Inf')
best_action = None
actions = get_actions(s)
for action in actions:
s2 = result(s, action)
(_, current_utility) = minval(s2)
if current_utility >= best_utility:
best_utility = current_utility
best_action = action
if best_utility == 1:
break
return (best_action, best_utility)
def minval(s):
if terminal(s):
return (None, utility(s))
best_utility = float('Inf')
best_action = None
actions = get_actions(s)
for action in actions:
s2 = result(s, action)
(_, current_utility) = maxval(s2)
if current_utility <= best_utility:
best_utility = current_utility
best_action = action
if best_utility == -1:
break
return (best_action, best_utility)
def minmax(s):
p = get_player(s)
if p == MAX:
return maxval(s)
if p == MIN:
return minval(s)
def print_s(s):
print(' {} | {} | {} \n 0 | 1 | 2 \n-----------\n {} | {} | {} \n 3 | 4 | 5 \n-----------\n {} | {} | {} \n 6 | 7 | 8 \n'.format(*s))
def ai_play(s):
(a, _) = minmax(s)
return a
def user_play(s):
a = int(input())
return a
if __name__ == '__main__':
s = [' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ']
print_s(s)
players = [('USER', user_play), ('AI', ai_play)]
while not terminal(s):
for (name, method) in players:
print('{} -> '.format(name))
a = method(s)
s = result(s, a)
print_s(s)
if terminal(s):
break
if is_winning_state(s, MAX):
print("PLAYER '{}' WON!".format(MAX))
elif is_winning_state(s, MIN):
print("PLAYER '{}' WON!".format(MIN))
else:
print('TIE!') |
# What are the factors of 18?
# factor: an integer which when multiplied with another integer, results in the product 18.
# Hence when 18 is divided by this number, the dividend is an integer and there are no remainders.
num = 18
for i in range(1, num+1):
if num % i == 0:
print(i, end=' ')
| num = 18
for i in range(1, num + 1):
if num % i == 0:
print(i, end=' ') |
def main():
for _ in range(int(input())):
n = int(input())
arr = list(map(int, input().strip().split()))
if n == 1:
print(arr[0])
else:
n += 1
arr.append(1001)
left, right = 0, 1
res = ''
while left <= right and right < n and left < n:
#print(left,right)
if arr[right]-arr[left] == right-left:
right += 1
else:
if right-left >= 3:
res += str(arr[left])+'...'+str(arr[right-1])+','
else:
for i in range(left, right):
res += str(arr[i])+','
left = right
print(res.strip(','))
main()
| def main():
for _ in range(int(input())):
n = int(input())
arr = list(map(int, input().strip().split()))
if n == 1:
print(arr[0])
else:
n += 1
arr.append(1001)
(left, right) = (0, 1)
res = ''
while left <= right and right < n and (left < n):
if arr[right] - arr[left] == right - left:
right += 1
else:
if right - left >= 3:
res += str(arr[left]) + '...' + str(arr[right - 1]) + ','
else:
for i in range(left, right):
res += str(arr[i]) + ','
left = right
print(res.strip(','))
main() |
#########################################################################################
# IMPORTANT: This file should be copied to setting.py and then completed before use #
#########################################################################################
# Rocky Version
VERSION = '0.3.5'
# Path to json file containing hostnames, ip addresses and credentials for monitoring
HOSTS = 'file.json'
# Path to where ports files will be saved
PORTS_PATH = 'path/ports/'
# DNS Name Servers - List of stringed DNS IPs
ROUTER_NAME_SERVERS = ['8.8.8.8', '1.1.1.1']
# Public Keys
# These keys allow Rocky and Robot to log in to the SRX Router(s) to update the network configuration
# Rocky RSA
ROCKY_RSA = ''
# Robot RSA
ROBOT_RSA = ''
# Administrator encrypted password (sha256)
ADMINISTRATOR_ENCRYP_PASS = ''
# api-server user with limited access
API_USER_PASS = ''
# Radius server
RADIUS_SERVER_ADDRESS = ''
# hashed password
RADIUS_SERVER_SECRET = ''
# Network Device Repository Path
DEVICE_CONFIG_PATH = 'path/repo/'
# Managed Cloud Infrastructure
# One instance of Rocky can manage multiple clouds and each cloud will consist of one or more regions.
# This configuration describes the cloud infrastructure managed by this instance of Rocky.
# Monitoring and Provisioning servers needs access to the cloud infrastructure.
# Inbound Access list
# The management network of this SRXPod is firewalled to block all inbound traffic.
# Access is allowed to the management network from this list of external Public IPs.
MAP_ACCESS_LIST = [
{
'source_address': '', # 'any' for all ips
'destination_address': '', # 'any' for all ips
'port': '', # valid values 1 , 0-655
'protocol': '', # 'tcp'/'udp'/'any'
'description': '',
},
]
clouds = [
# First Cloud ...
{
'name': 'First Cloud',
'id': '',
# python-cloudcix api settings
'CLOUDCIX_API_URL': '',
'CLOUDCIX_API_USERNAME': '',
'CLOUDCIX_API_PASSWORD': '',
'CLOUDCIX_API_KEY': '',
'CLOUDCIX_API_VERSION': 2,
'CLOUDCIX_API_V2_URL': '',
# COP inbound access list
# The management network of this SRXPod is firewalled to block all inbound traffic.
# Access is allowed to the management network from this list of external Public IPs.
'COP_ACCESS_LIST': [
{
'source_address': '',
'destination_address': '',
'port': '',
'protocol': '',
'description': '',
},
],
# Pod settings
'pods': [
{
'name': 'name of the cop',
'id': '',
'type': 'cop',
# Network schema
'IPv4_link_subnet': [
# this is optional, you can leave them as it is.
{
'address_range': '',
'gateway': '',
},
],
'IPv4_pod_subnets': [
{
'address_range': '',
'gateway': '',
},
{
'address_range': '',
'gateway': '',
},
],
'IPv6_link_subnet': [
{
'address_range': '',
'gateway': '',
},
],
'IPv6_pod_subnets': [
{
'address_range': '',
},
],
'IPv4_RFC1918_subnets': [
{
'address_range': '',
'gateway': '',
},
],
# VPN Tunnel from Support Center to the SRXPOD for management.
'vpns': [],
},
# first region
{
'name': 'region name',
'id': '',
'type': 'region',
# Network schema
'IPv4_link_subnet': [
# this is optional, you can leave them as it is.
{
'address_range': '',
'gateway': '',
},
],
'IPv4_pod_subnets': [
{
'address_range': '',
'gateway': '',
},
{
'address_range': '',
'gateway': '',
},
],
'IPv6_link_subnet': [
{
'address_range': '',
'gateway': '',
},
],
'IPv6_pod_subnets': [
{
'address_range': '',
},
],
'IPv4_RFC1918_subnets': [
{
'address_range': '',
'gateway': '',
},
],
# VPN Tunnel from Support Center to the SRXPOD for management.
'vpns': [],
},
# Second region
{
'name': 'Second Region',
},
],
},
# second cloud
{},
]
| version = '0.3.5'
hosts = 'file.json'
ports_path = 'path/ports/'
router_name_servers = ['8.8.8.8', '1.1.1.1']
rocky_rsa = ''
robot_rsa = ''
administrator_encryp_pass = ''
api_user_pass = ''
radius_server_address = ''
radius_server_secret = ''
device_config_path = 'path/repo/'
map_access_list = [{'source_address': '', 'destination_address': '', 'port': '', 'protocol': '', 'description': ''}]
clouds = [{'name': 'First Cloud', 'id': '', 'CLOUDCIX_API_URL': '', 'CLOUDCIX_API_USERNAME': '', 'CLOUDCIX_API_PASSWORD': '', 'CLOUDCIX_API_KEY': '', 'CLOUDCIX_API_VERSION': 2, 'CLOUDCIX_API_V2_URL': '', 'COP_ACCESS_LIST': [{'source_address': '', 'destination_address': '', 'port': '', 'protocol': '', 'description': ''}], 'pods': [{'name': 'name of the cop', 'id': '', 'type': 'cop', 'IPv4_link_subnet': [{'address_range': '', 'gateway': ''}], 'IPv4_pod_subnets': [{'address_range': '', 'gateway': ''}, {'address_range': '', 'gateway': ''}], 'IPv6_link_subnet': [{'address_range': '', 'gateway': ''}], 'IPv6_pod_subnets': [{'address_range': ''}], 'IPv4_RFC1918_subnets': [{'address_range': '', 'gateway': ''}], 'vpns': []}, {'name': 'region name', 'id': '', 'type': 'region', 'IPv4_link_subnet': [{'address_range': '', 'gateway': ''}], 'IPv4_pod_subnets': [{'address_range': '', 'gateway': ''}, {'address_range': '', 'gateway': ''}], 'IPv6_link_subnet': [{'address_range': '', 'gateway': ''}], 'IPv6_pod_subnets': [{'address_range': ''}], 'IPv4_RFC1918_subnets': [{'address_range': '', 'gateway': ''}], 'vpns': []}, {'name': 'Second Region'}]}, {}] |
###########################################################
# #
# Solving factorial problem with recursive function #
# #
###########################################################
def factorial(n):
if n == 2:
return 2
return n * factorial(n - 1)
print(factorial(int(input()))) | def factorial(n):
if n == 2:
return 2
return n * factorial(n - 1)
print(factorial(int(input()))) |
#
# University of Luxembourg
# Laboratory of Algorithmics, Cryptology and Security (LACS)
#
# FigureOfMerit (FOM)
#
# Copyright (C) 2015 University of Luxembourg
#
# Written in 2015 by Daniel Dinu <dumitru-daniel.dinu@uni.lu>
#
# This file is part of FigureOfMerit.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
__author__ = 'daniel.dinu'
| __author__ = 'daniel.dinu' |
__all__ = (
'ESputnikException',
'InvalidAuthDataError',
'IncorrectDataError'
)
class ESputnikException(AttributeError):
pass
class InvalidAuthDataError(ESputnikException):
def __init__(self, code, message):
self.code = code
self.message = message
class IncorrectDataError(InvalidAuthDataError):
pass
| __all__ = ('ESputnikException', 'InvalidAuthDataError', 'IncorrectDataError')
class Esputnikexception(AttributeError):
pass
class Invalidauthdataerror(ESputnikException):
def __init__(self, code, message):
self.code = code
self.message = message
class Incorrectdataerror(InvalidAuthDataError):
pass |
class TextFieldFsm:
def __init__(self, title, position, need_hide=False, initial_text=""):
self.title = title
self.position = position
self.need_hide = need_hide
self.initial_text = initial_text
| class Textfieldfsm:
def __init__(self, title, position, need_hide=False, initial_text=''):
self.title = title
self.position = position
self.need_hide = need_hide
self.initial_text = initial_text |
BINDIR = '/usr/local/Cellar/python3/3.6.2_1/Frameworks/Python.framework/Versions/3.6/bin'
DATADIR = '/usr/local/Cellar/python3/3.6.2_1/Frameworks/Python.framework/Versions/3.6/share'
DATAROOTDIR = '/usr/local/Cellar/python3/3.6.2_1/Frameworks/Python.framework/Versions/3.6/share'
DESTDIR = '/'
DOCDIR = '/usr/local/Cellar/python3/3.6.2_1/Frameworks/Python.framework/Versions/3.6/share/doc/bento'
DVIDIR = '/usr/local/Cellar/python3/3.6.2_1/Frameworks/Python.framework/Versions/3.6/share/doc/bento'
EPREFIX = '/usr/local/Cellar/python3/3.6.2_1/Frameworks/Python.framework/Versions/3.6'
HTMLDIR = '/usr/local/Cellar/python3/3.6.2_1/Frameworks/Python.framework/Versions/3.6/share/doc/bento'
INCLUDEDIR = '/usr/local/Cellar/python3/3.6.2_1/Frameworks/Python.framework/Versions/3.6/include'
INFODIR = '/usr/local/Cellar/python3/3.6.2_1/Frameworks/Python.framework/Versions/3.6/share/info'
LIBDIR = '/usr/local/Cellar/python3/3.6.2_1/Frameworks/Python.framework/Versions/3.6/lib'
LIBEXECDIR = '/usr/local/Cellar/python3/3.6.2_1/Frameworks/Python.framework/Versions/3.6/libexec'
LOCALEDIR = '/usr/local/Cellar/python3/3.6.2_1/Frameworks/Python.framework/Versions/3.6/share/locale'
LOCALSTATEDIR = '/usr/local/Cellar/python3/3.6.2_1/Frameworks/Python.framework/Versions/3.6/var'
MANDIR = '/usr/local/Cellar/python3/3.6.2_1/Frameworks/Python.framework/Versions/3.6/share/man'
PDFDIR = '/usr/local/Cellar/python3/3.6.2_1/Frameworks/Python.framework/Versions/3.6/share/doc/bento'
PKGDATADIR = '/usr/local/Cellar/python3/3.6.2_1/Frameworks/Python.framework/Versions/3.6/share/bento'
PKGNAME = 'bento'
PREFIX = '/usr/local/Cellar/python3/3.6.2_1/Frameworks/Python.framework/Versions/3.6'
PSDIR = '/usr/local/Cellar/python3/3.6.2_1/Frameworks/Python.framework/Versions/3.6/share/doc/bento'
PY_VERSION_SHORT = '3.6'
SBINDIR = '/usr/local/Cellar/python3/3.6.2_1/Frameworks/Python.framework/Versions/3.6/sbin'
SHAREDSTATEDIR = '/usr/local/Cellar/python3/3.6.2_1/Frameworks/Python.framework/Versions/3.6/com'
SITEDIR = '/usr/local/Cellar/python3/3.6.2_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages'
SYSCONFDIR = '/usr/local/Cellar/python3/3.6.2_1/Frameworks/Python.framework/Versions/3.6/etc' | bindir = '/usr/local/Cellar/python3/3.6.2_1/Frameworks/Python.framework/Versions/3.6/bin'
datadir = '/usr/local/Cellar/python3/3.6.2_1/Frameworks/Python.framework/Versions/3.6/share'
datarootdir = '/usr/local/Cellar/python3/3.6.2_1/Frameworks/Python.framework/Versions/3.6/share'
destdir = '/'
docdir = '/usr/local/Cellar/python3/3.6.2_1/Frameworks/Python.framework/Versions/3.6/share/doc/bento'
dvidir = '/usr/local/Cellar/python3/3.6.2_1/Frameworks/Python.framework/Versions/3.6/share/doc/bento'
eprefix = '/usr/local/Cellar/python3/3.6.2_1/Frameworks/Python.framework/Versions/3.6'
htmldir = '/usr/local/Cellar/python3/3.6.2_1/Frameworks/Python.framework/Versions/3.6/share/doc/bento'
includedir = '/usr/local/Cellar/python3/3.6.2_1/Frameworks/Python.framework/Versions/3.6/include'
infodir = '/usr/local/Cellar/python3/3.6.2_1/Frameworks/Python.framework/Versions/3.6/share/info'
libdir = '/usr/local/Cellar/python3/3.6.2_1/Frameworks/Python.framework/Versions/3.6/lib'
libexecdir = '/usr/local/Cellar/python3/3.6.2_1/Frameworks/Python.framework/Versions/3.6/libexec'
localedir = '/usr/local/Cellar/python3/3.6.2_1/Frameworks/Python.framework/Versions/3.6/share/locale'
localstatedir = '/usr/local/Cellar/python3/3.6.2_1/Frameworks/Python.framework/Versions/3.6/var'
mandir = '/usr/local/Cellar/python3/3.6.2_1/Frameworks/Python.framework/Versions/3.6/share/man'
pdfdir = '/usr/local/Cellar/python3/3.6.2_1/Frameworks/Python.framework/Versions/3.6/share/doc/bento'
pkgdatadir = '/usr/local/Cellar/python3/3.6.2_1/Frameworks/Python.framework/Versions/3.6/share/bento'
pkgname = 'bento'
prefix = '/usr/local/Cellar/python3/3.6.2_1/Frameworks/Python.framework/Versions/3.6'
psdir = '/usr/local/Cellar/python3/3.6.2_1/Frameworks/Python.framework/Versions/3.6/share/doc/bento'
py_version_short = '3.6'
sbindir = '/usr/local/Cellar/python3/3.6.2_1/Frameworks/Python.framework/Versions/3.6/sbin'
sharedstatedir = '/usr/local/Cellar/python3/3.6.2_1/Frameworks/Python.framework/Versions/3.6/com'
sitedir = '/usr/local/Cellar/python3/3.6.2_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages'
sysconfdir = '/usr/local/Cellar/python3/3.6.2_1/Frameworks/Python.framework/Versions/3.6/etc' |
wanted_profit = float(input())
is_wanted_profit_gained = False
total_amount = 0
cocktail = input()
while cocktail != 'Party!':
number_of_cocktails = int(input())
cocktail_price = len(cocktail)
order_price = cocktail_price * number_of_cocktails
if order_price % 2 != 0:
order_price = order_price - order_price * 0.25
total_amount += order_price
if total_amount >= wanted_profit:
is_wanted_profit_gained = True
break
cocktail = input()
difference = abs(wanted_profit - total_amount)
if is_wanted_profit_gained:
print ('Target acquired.')
print (f'Club income - {total_amount:.2f} leva.')
else:
print (f'We need {difference:.2f} leva more.')
print (f'Club income - {total_amount:.2f} leva.') | wanted_profit = float(input())
is_wanted_profit_gained = False
total_amount = 0
cocktail = input()
while cocktail != 'Party!':
number_of_cocktails = int(input())
cocktail_price = len(cocktail)
order_price = cocktail_price * number_of_cocktails
if order_price % 2 != 0:
order_price = order_price - order_price * 0.25
total_amount += order_price
if total_amount >= wanted_profit:
is_wanted_profit_gained = True
break
cocktail = input()
difference = abs(wanted_profit - total_amount)
if is_wanted_profit_gained:
print('Target acquired.')
print(f'Club income - {total_amount:.2f} leva.')
else:
print(f'We need {difference:.2f} leva more.')
print(f'Club income - {total_amount:.2f} leva.') |
load("@io_bazel_rules_dotnet//dotnet:defs.bzl", "core_library", "core_nunit3_test", "core_resource")
COMMON_DEFINES = [
"NETSTANDARD2_0",
"NETCOREAPP2_0",
"SERIALIZATION",
"ASYNC",
#"PLATFORM_DETECTION",
"PARALLEL",
"TASK_PARALLEL_LIBRARY_API",
]
core_library(
name = "nunit.framework.dll",
srcs = glob([
"src/NUnitFramework/framework/**/*.cs",
]) + [
"src/NUnitFramework/FrameworkVersion.cs",
"src/CommonAssemblyInfo.cs",
],
data = glob(["src/NUnitFramework/framework/Schemas/*.xsd"]),
defines = COMMON_DEFINES,
keyfile = "src/nunit.snk",
visibility = ["//visibility:public"],
deps = [
"@core_sdk_stdlib//:libraryset",
],
)
core_library(
name = "nunitlite.dll",
srcs = glob(["src/NUnitFramework/nunitlite/**/*.cs"]) + ["src/CommonAssemblyInfo.cs"],
data = glob(["src/NUnitFramework/framework/Schemas/*.xsd"]) + glob(["src/NUnitFramework/nunitlite/Schemas/*.xsd"]),
defines = COMMON_DEFINES,
keyfile = "src/nunit.snk",
visibility = ["//visibility:public"],
deps = [
":nunit.framework.dll",
],
)
core_library(
name = "mock-assembly.dll",
srcs = glob(["src/NUnitFramework/mock-assembly/**/*.cs"]) + ["src/CommonAssemblyInfo.cs"],
defines = COMMON_DEFINES,
keyfile = "src/nunit.snk",
visibility = ["//visibility:public"],
deps = [
":nunitlite.dll",
],
)
core_library(
name = "nunit.testdata.dll",
srcs = glob(["src/NUnitFramework/testdata/**/*.cs"]) + ["src/CommonAssemblyInfo.cs"],
defines = COMMON_DEFINES,
keyfile = "src/nunit.snk",
visibility = ["//visibility:public"],
deps = [
":nunit.framework.dll",
],
)
core_library(
name = "slow-nunit-tests.dll",
srcs = glob(["src/NUnitFramework/slow-tests/**/*.cs"]) + ["src/CommonAssemblyInfo.cs"],
defines = COMMON_DEFINES,
keyfile = "src/nunit.snk",
visibility = ["//visibility:public"],
deps = [
":nunit.framework.dll",
],
)
filegroup(
name = "schemas",
srcs = glob(["src/NUnitFramework/framework/Schemas/*"]),
)
core_resource(
name = "resource1",
src = "src/NUnitFramework/tests/TestImage1.jpg",
identifier = "NUnit.Framework.TestImage1.jpg",
)
core_resource(
name = "resource2",
src = "src/NUnitFramework/tests/TestImage2.jpg",
identifier = "NUnit.Framework.TestImage2.jpg",
)
core_resource(
name = "resource3",
src = "src/NUnitFramework/tests/TestText1.txt",
identifier = "NUnit.Framework.TestText1.txt",
)
core_resource(
name = "resource4",
src = "src/NUnitFramework/tests/TestText2.txt",
identifier = "NUnit.Framework.TestText2.txt",
)
core_resource(
name = "resource5",
src = "src/NUnitFramework/tests/TestListFile.txt",
identifier = "NUnit.Framework.TestListFile.txt",
)
core_resource(
name = "resource6",
src = "src/NUnitFramework/tests/TestListFile2.txt",
identifier = "NUnit.Framework.TestListFile2.txt",
)
core_nunit3_test(
name = "nunit.framework.tests.dll",
srcs = glob(
[
"src/NUnitFramework/tests/**/*.cs",
"src/NUnitFramework/*.cs",
],
exclude = ["**/RuntimeFrameworkTests.cs"],
) + ["src/CommonAssemblyInfo.cs"],
data_with_dirs = {
"@vstest.16.5//:Microsoft.TestPlatform.TestHostRuntimeProvider.dll": "Extensions",
"@nunit3-vs-adapter.3.16.1//:NUnitTestAdapter.TestAdapter.dll": "Extensions",
":schemas": "Schemas",
"@junit.testlogger//:extension": "Extensions",
},
defines = COMMON_DEFINES,
keyfile = "src/nunit.snk",
resources = [
":resource1",
":resource2",
":resource3",
":resource4",
":resource5",
":resource6",
],
testlauncher = "@vstest.16.5//:vstest.console.exe",
visibility = ["//visibility:public"],
deps = [
":mock-assembly.dll",
":nunit.framework.dll",
":nunit.testdata.dll",
":slow-nunit-tests.dll",
"@nunit3-vs-adapter.3.16.1//:NUnitTestAdapter.TestAdapter.dll",
],
)
| load('@io_bazel_rules_dotnet//dotnet:defs.bzl', 'core_library', 'core_nunit3_test', 'core_resource')
common_defines = ['NETSTANDARD2_0', 'NETCOREAPP2_0', 'SERIALIZATION', 'ASYNC', 'PARALLEL', 'TASK_PARALLEL_LIBRARY_API']
core_library(name='nunit.framework.dll', srcs=glob(['src/NUnitFramework/framework/**/*.cs']) + ['src/NUnitFramework/FrameworkVersion.cs', 'src/CommonAssemblyInfo.cs'], data=glob(['src/NUnitFramework/framework/Schemas/*.xsd']), defines=COMMON_DEFINES, keyfile='src/nunit.snk', visibility=['//visibility:public'], deps=['@core_sdk_stdlib//:libraryset'])
core_library(name='nunitlite.dll', srcs=glob(['src/NUnitFramework/nunitlite/**/*.cs']) + ['src/CommonAssemblyInfo.cs'], data=glob(['src/NUnitFramework/framework/Schemas/*.xsd']) + glob(['src/NUnitFramework/nunitlite/Schemas/*.xsd']), defines=COMMON_DEFINES, keyfile='src/nunit.snk', visibility=['//visibility:public'], deps=[':nunit.framework.dll'])
core_library(name='mock-assembly.dll', srcs=glob(['src/NUnitFramework/mock-assembly/**/*.cs']) + ['src/CommonAssemblyInfo.cs'], defines=COMMON_DEFINES, keyfile='src/nunit.snk', visibility=['//visibility:public'], deps=[':nunitlite.dll'])
core_library(name='nunit.testdata.dll', srcs=glob(['src/NUnitFramework/testdata/**/*.cs']) + ['src/CommonAssemblyInfo.cs'], defines=COMMON_DEFINES, keyfile='src/nunit.snk', visibility=['//visibility:public'], deps=[':nunit.framework.dll'])
core_library(name='slow-nunit-tests.dll', srcs=glob(['src/NUnitFramework/slow-tests/**/*.cs']) + ['src/CommonAssemblyInfo.cs'], defines=COMMON_DEFINES, keyfile='src/nunit.snk', visibility=['//visibility:public'], deps=[':nunit.framework.dll'])
filegroup(name='schemas', srcs=glob(['src/NUnitFramework/framework/Schemas/*']))
core_resource(name='resource1', src='src/NUnitFramework/tests/TestImage1.jpg', identifier='NUnit.Framework.TestImage1.jpg')
core_resource(name='resource2', src='src/NUnitFramework/tests/TestImage2.jpg', identifier='NUnit.Framework.TestImage2.jpg')
core_resource(name='resource3', src='src/NUnitFramework/tests/TestText1.txt', identifier='NUnit.Framework.TestText1.txt')
core_resource(name='resource4', src='src/NUnitFramework/tests/TestText2.txt', identifier='NUnit.Framework.TestText2.txt')
core_resource(name='resource5', src='src/NUnitFramework/tests/TestListFile.txt', identifier='NUnit.Framework.TestListFile.txt')
core_resource(name='resource6', src='src/NUnitFramework/tests/TestListFile2.txt', identifier='NUnit.Framework.TestListFile2.txt')
core_nunit3_test(name='nunit.framework.tests.dll', srcs=glob(['src/NUnitFramework/tests/**/*.cs', 'src/NUnitFramework/*.cs'], exclude=['**/RuntimeFrameworkTests.cs']) + ['src/CommonAssemblyInfo.cs'], data_with_dirs={'@vstest.16.5//:Microsoft.TestPlatform.TestHostRuntimeProvider.dll': 'Extensions', '@nunit3-vs-adapter.3.16.1//:NUnitTestAdapter.TestAdapter.dll': 'Extensions', ':schemas': 'Schemas', '@junit.testlogger//:extension': 'Extensions'}, defines=COMMON_DEFINES, keyfile='src/nunit.snk', resources=[':resource1', ':resource2', ':resource3', ':resource4', ':resource5', ':resource6'], testlauncher='@vstest.16.5//:vstest.console.exe', visibility=['//visibility:public'], deps=[':mock-assembly.dll', ':nunit.framework.dll', ':nunit.testdata.dll', ':slow-nunit-tests.dll', '@nunit3-vs-adapter.3.16.1//:NUnitTestAdapter.TestAdapter.dll']) |
def solution(l):
parsed = [e.split(".") for e in l]
toSort = [map(int, e) for e in parsed]
sortedINTs = sorted(toSort)
sortedJoined = [('.'.join(str(ee) for ee in e)) for e in sortedINTs]
return sortedJoined | def solution(l):
parsed = [e.split('.') for e in l]
to_sort = [map(int, e) for e in parsed]
sorted_in_ts = sorted(toSort)
sorted_joined = ['.'.join((str(ee) for ee in e)) for e in sortedINTs]
return sortedJoined |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
if __name__ == '__main__':
print("************************************************************************")
print("* WELCOME TO ZEROMCMP (OpenSource MultiCloud Management Platform) *")
print("************************************************************************")
| if __name__ == '__main__':
print('************************************************************************')
print('* WELCOME TO ZEROMCMP (OpenSource MultiCloud Management Platform) *')
print('************************************************************************') |
class Settings:
def __init__(self):
self.screen_width = 900
self.screen_height = 700
self.bg_color = (230, 230, 230)
self.ship_speed_factor = 1
# bullet
self.bullet_speed_factor = 1
self.bullet_width = 4
self.bullet_height = 4
self.bullet_color = (60, 60, 60)
self.bullet_count = 4
# alien
self.alien_speed_factor = 1
self.fleet_drop_factor = 10
self.fleet_direction = 1
| class Settings:
def __init__(self):
self.screen_width = 900
self.screen_height = 700
self.bg_color = (230, 230, 230)
self.ship_speed_factor = 1
self.bullet_speed_factor = 1
self.bullet_width = 4
self.bullet_height = 4
self.bullet_color = (60, 60, 60)
self.bullet_count = 4
self.alien_speed_factor = 1
self.fleet_drop_factor = 10
self.fleet_direction = 1 |
def main() -> None:
S = input()
print("Yes" if "AC" in [S[i:i+2] for i in range(len(S)-1)] else "No")
if __name__ == '__main__':
main()
| def main() -> None:
s = input()
print('Yes' if 'AC' in [S[i:i + 2] for i in range(len(S) - 1)] else 'No')
if __name__ == '__main__':
main() |
i= 1
while i<=3:
print("Guess:", i)
i=i+1
print("sorry you failed") | i = 1
while i <= 3:
print('Guess:', i)
i = i + 1
print('sorry you failed') |
src = Split('''
aos/soc_impl.c
hal/uart.c
hal/flash.c
main.c
''')
deps = Split('''
kernel/rhino
platform/arch/arm/armv7m
platform/mcu/wm_w600/
kernel/vcall
kernel/init
''')
global_macro = Split('''
STDIO_UART=0
CONFIG_NO_TCPIP
RHINO_CONFIG_TICK_TASK=0
RHINO_CONFIG_WORKQUEUE=0
CONFIG_AOS_KV_MULTIPTN_MODE
CONFIG_AOS_KV_PTN=5
CONFIG_AOS_KV_SECOND_PTN=6
CONFIG_AOS_KV_PTN_SIZE=4096
CONFIG_AOS_KV_BUFFER_SIZE=8192
SYSINFO_PRODUCT_MODEL=\\"ALI_AOS_WM_W600\\"
SYSINFO_DEVICE_NAME=\\"WM_W600\\"
''')
global_cflags = Split('''
-mcpu=cortex-m3
-mthumb
-mfloat-abi=soft
-march=armv7-m
-mthumb -mthumb-interwork
-mlittle-endian
-w
''')
local_cflags = Split('''
-Wall
-Werror
-Wno-unused-variable
-Wno-unused-parameter
-Wno-implicit-function-declaration
-Wno-type-limits
-Wno-sign-compare
-Wno-pointer-sign
-Wno-uninitialized
-Wno-return-type
-Wno-unused-function
-Wno-unused-but-set-variable
-Wno-unused-value
-Wno-strict-aliasing
''')
global_includes = Split('''
../../arch/arm/armv7m/gcc/m3
''')
global_ldflags = Split('''
-mcpu=cortex-m3
-mthumb -mthumb-interwork
-mlittle-endian
-nostartfiles
--specs=nosys.specs
''')
prefix = ''
if aos_global_config.compiler == "gcc":
prefix = 'arm-none-eabi-'
component = aos_mcu_component('WM_W600', prefix, src)
component.set_global_arch('Cortex-M3')
component.add_comp_deps(*deps)
component.add_global_macros(*global_macro)
component.add_global_cflags(*global_cflags)
component.add_cflags(*local_cflags)
component.add_global_includes(*global_includes)
component.add_global_ldflags(*global_ldflags)
| src = split('\n aos/soc_impl.c\n hal/uart.c\n hal/flash.c \n\tmain.c\n')
deps = split('\n kernel/rhino\n platform/arch/arm/armv7m\n platform/mcu/wm_w600/\n kernel/vcall\n kernel/init\n')
global_macro = split('\n STDIO_UART=0 \n CONFIG_NO_TCPIP\n RHINO_CONFIG_TICK_TASK=0 \n RHINO_CONFIG_WORKQUEUE=0\n CONFIG_AOS_KV_MULTIPTN_MODE\n CONFIG_AOS_KV_PTN=5\n CONFIG_AOS_KV_SECOND_PTN=6\n CONFIG_AOS_KV_PTN_SIZE=4096\n CONFIG_AOS_KV_BUFFER_SIZE=8192\n SYSINFO_PRODUCT_MODEL=\\"ALI_AOS_WM_W600\\" \n SYSINFO_DEVICE_NAME=\\"WM_W600\\"\n')
global_cflags = split('\n -mcpu=cortex-m3\n -mthumb\n -mfloat-abi=soft\n -march=armv7-m\n -mthumb -mthumb-interwork\n -mlittle-endian\n -w\n ')
local_cflags = split('\n -Wall \n -Werror\n -Wno-unused-variable\n -Wno-unused-parameter\n -Wno-implicit-function-declaration\n -Wno-type-limits\n -Wno-sign-compare\n -Wno-pointer-sign\n -Wno-uninitialized\n -Wno-return-type\n -Wno-unused-function\n -Wno-unused-but-set-variable\n -Wno-unused-value\n -Wno-strict-aliasing\n')
global_includes = split('\n ../../arch/arm/armv7m/gcc/m3\n')
global_ldflags = split('\n -mcpu=cortex-m3 \n -mthumb -mthumb-interwork\n -mlittle-endian\n -nostartfiles\n --specs=nosys.specs\n')
prefix = ''
if aos_global_config.compiler == 'gcc':
prefix = 'arm-none-eabi-'
component = aos_mcu_component('WM_W600', prefix, src)
component.set_global_arch('Cortex-M3')
component.add_comp_deps(*deps)
component.add_global_macros(*global_macro)
component.add_global_cflags(*global_cflags)
component.add_cflags(*local_cflags)
component.add_global_includes(*global_includes)
component.add_global_ldflags(*global_ldflags) |
# Test helper functions and classes
class ParameterPassLevel:
FLAG = 0
INI_KEY = 1
MARKER = 2
def _assert_result_outcomes(
result, passed=0, skipped=0, failed=0, error=0, dynamic_rerun=0
):
outcomes = result.parseoutcomes()
_check_outcome_field(outcomes, "passed", passed)
_check_outcome_field(outcomes, "skipped", skipped)
_check_outcome_field(outcomes, "failed", failed)
_check_outcome_field(outcomes, "error", error)
_check_outcome_field(outcomes, "dynamicrerun", dynamic_rerun)
def _check_outcome_field(outcomes, field_name, expected_value):
field_value = outcomes.get(field_name, 0)
expected_value = int(expected_value)
assert (
field_value == expected_value
), "outcomes.{} has unexpected value. Expected '{}' but got '{}'".format(
field_name, expected_value, field_value
)
| class Parameterpasslevel:
flag = 0
ini_key = 1
marker = 2
def _assert_result_outcomes(result, passed=0, skipped=0, failed=0, error=0, dynamic_rerun=0):
outcomes = result.parseoutcomes()
_check_outcome_field(outcomes, 'passed', passed)
_check_outcome_field(outcomes, 'skipped', skipped)
_check_outcome_field(outcomes, 'failed', failed)
_check_outcome_field(outcomes, 'error', error)
_check_outcome_field(outcomes, 'dynamicrerun', dynamic_rerun)
def _check_outcome_field(outcomes, field_name, expected_value):
field_value = outcomes.get(field_name, 0)
expected_value = int(expected_value)
assert field_value == expected_value, "outcomes.{} has unexpected value. Expected '{}' but got '{}'".format(field_name, expected_value, field_value) |
# O(1) time | O(1) space
def validIPAddresses(string):
ipAddressesFound = []
for i in range(1, min(len(string), 4)): # from index 0 - 4
currentIPAddressParts = ["","","",""]
currentIPAddressParts[0] = string[:i] # before the first period
if not isValidPart(currentIPAddressParts[0]):
continue
for j in range(i + 1, i + min(len(string) - i, 4)): # i + 1 = for second period, placement of i at most in 3 positions past of i
currentIPAddressParts[1] = string[i : j] # start from index i where the first position started to j at placement
if not isValidPart(currentIPAddressParts[1]):
continue
for k in range(j + 1, j + min(len(string) - j, 4)): # j + 1 = for third period, placement of j at most in 3 positions past of j
currentIPAddressParts[2] = string[j:k] # 3rd section
currentIPAddressParts[3] = string[k:] # 4th section
if isValidPart(currentIPAddressParts[2]) and isValidPart(currentIPAddressParts[3]):
ipAddressesFound.append(".".join(currentIPAddressParts))
return ipAddressesFound
def isValidPart(string):
stringAsInt = int(string)
if stringAsInt > 255:
return False
return len(string) == len(str(stringAsInt)) # check for leading 0 # 00 converted to 0, 01 converted to 1 | def valid_ip_addresses(string):
ip_addresses_found = []
for i in range(1, min(len(string), 4)):
current_ip_address_parts = ['', '', '', '']
currentIPAddressParts[0] = string[:i]
if not is_valid_part(currentIPAddressParts[0]):
continue
for j in range(i + 1, i + min(len(string) - i, 4)):
currentIPAddressParts[1] = string[i:j]
if not is_valid_part(currentIPAddressParts[1]):
continue
for k in range(j + 1, j + min(len(string) - j, 4)):
currentIPAddressParts[2] = string[j:k]
currentIPAddressParts[3] = string[k:]
if is_valid_part(currentIPAddressParts[2]) and is_valid_part(currentIPAddressParts[3]):
ipAddressesFound.append('.'.join(currentIPAddressParts))
return ipAddressesFound
def is_valid_part(string):
string_as_int = int(string)
if stringAsInt > 255:
return False
return len(string) == len(str(stringAsInt)) |
REST_FRAMEWORK = {
"DEFAULT_AUTHENTICATION_CLASSES": (
"rest_framework_simplejwt.authentication.JWTAuthentication",
# TODO: 'oauth2_provider.contrib.rest_framework.OAuth2Authentication',
# django-oauth-toolkit >= 1.0.0
# 'rest_framework_social_oauth2.authentication.SocialAuthentication',
),
"DEFAULT_RENDERER_CLASSES": ("rest_framework.renderers.JSONRenderer",),
"DEFAULT_PARSER_CLASSES": (
"rest_framework.parsers.JSONParser",
"rest_framework.parsers.FormParser",
"rest_framework.parsers.MultiPartParser",
"rest_framework.parsers.FileUploadParser",
),
"DATETIME_FORMAT": "%d-%m-%Y %H:%M",
"PAGE_SIZE": 10,
"DEFAULT_PAGINATION_CLASS": "rest_framework.pagination.LimitOffsetPagination",
"DEFAULT_VERSIONING_CLASS": "rest_framework.versioning.URLPathVersioning",
}
| rest_framework = {'DEFAULT_AUTHENTICATION_CLASSES': ('rest_framework_simplejwt.authentication.JWTAuthentication',), 'DEFAULT_RENDERER_CLASSES': ('rest_framework.renderers.JSONRenderer',), 'DEFAULT_PARSER_CLASSES': ('rest_framework.parsers.JSONParser', 'rest_framework.parsers.FormParser', 'rest_framework.parsers.MultiPartParser', 'rest_framework.parsers.FileUploadParser'), 'DATETIME_FORMAT': '%d-%m-%Y %H:%M', 'PAGE_SIZE': 10, 'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.LimitOffsetPagination', 'DEFAULT_VERSIONING_CLASS': 'rest_framework.versioning.URLPathVersioning'} |
def is_merge(s, part1, part2):
all_chars = len(s) == len(part1) + len(part2)
if not all_chars:
return False
d = {}
for i, c in enumerate(s):
d[c] = i
indices1, indices2 = [d[c] for c in part1], [d[c] for c in part2]
part1_good = indices1 == sorted(indices1)
part2_good = indices2 == sorted(indices2)
return part1_good and part2_good
| def is_merge(s, part1, part2):
all_chars = len(s) == len(part1) + len(part2)
if not all_chars:
return False
d = {}
for (i, c) in enumerate(s):
d[c] = i
(indices1, indices2) = ([d[c] for c in part1], [d[c] for c in part2])
part1_good = indices1 == sorted(indices1)
part2_good = indices2 == sorted(indices2)
return part1_good and part2_good |
def Duplicate_Charaters(Test_String):
Duplicates = []
for char in Test_String:
if Test_String.count(char) > 1 and char not in Duplicates:
Duplicates.append(char)
return Duplicates
Test_String = input("Enter a String: ")
print(*(Duplicate_Charaters(Test_String)))
| def duplicate__charaters(Test_String):
duplicates = []
for char in Test_String:
if Test_String.count(char) > 1 and char not in Duplicates:
Duplicates.append(char)
return Duplicates
test__string = input('Enter a String: ')
print(*duplicate__charaters(Test_String)) |
#!python3
def main():
with open('21.txt', 'r') as f, open('21_out.txt', 'w') as f_out:
lines = f.readlines()
# Part 1
answer = 0
print(answer)
print(answer, file=f_out)
# Part 2
print(answer)
print(answer, file=f_out)
if __name__ == '__main__':
main()
| def main():
with open('21.txt', 'r') as f, open('21_out.txt', 'w') as f_out:
lines = f.readlines()
answer = 0
print(answer)
print(answer, file=f_out)
print(answer)
print(answer, file=f_out)
if __name__ == '__main__':
main() |
class HashState:
def __init__(self, player, cards, leading, upper, lower, tricks):
self.current_player = player
self.cards = cards
self.upper_bound = upper
self.lower_bound = lower
self.leading_suite = leading
self.tricks_left = tricks
def get_current_player(self):
return self.current_player
def set_current_player(self, player):
self.current_player = player
def get_cards(self):
return self.cards
def set_cards(self, cards):
self.cards = cards
def get_upper_bound(self):
return self.upper_bound
def set_upper_bound(self, upper):
self.upper_bound = upper
def get_lower_bound(self):
return self.lower_bound
def set_lower_bound(self, lower):
self.lower_bound = lower
def get_leading_suite(self):
return self.leading_suite
def set_leading_suite(self, leading):
self.leading_suite = leading
def get_tricks_left(self):
return self.tricks_left
def set_tricks_left(self, tricks):
self.tricks_left = tricks
| class Hashstate:
def __init__(self, player, cards, leading, upper, lower, tricks):
self.current_player = player
self.cards = cards
self.upper_bound = upper
self.lower_bound = lower
self.leading_suite = leading
self.tricks_left = tricks
def get_current_player(self):
return self.current_player
def set_current_player(self, player):
self.current_player = player
def get_cards(self):
return self.cards
def set_cards(self, cards):
self.cards = cards
def get_upper_bound(self):
return self.upper_bound
def set_upper_bound(self, upper):
self.upper_bound = upper
def get_lower_bound(self):
return self.lower_bound
def set_lower_bound(self, lower):
self.lower_bound = lower
def get_leading_suite(self):
return self.leading_suite
def set_leading_suite(self, leading):
self.leading_suite = leading
def get_tricks_left(self):
return self.tricks_left
def set_tricks_left(self, tricks):
self.tricks_left = tricks |
# -*- coding: utf-8 -*-
# License: See LICENSE file.
required_states = ['position']
required_matrices = ['cellular_binary_grass']
def run(name, world, matrices, states, extra_life=10):
y,x = states['position']
#if matrices['cellular_binary_grass'][int(y),int(x)]:
# Eat the cell under the agent's position
matrices['cellular_binary_grass'][int(y),int(x)] = False
#endif
| required_states = ['position']
required_matrices = ['cellular_binary_grass']
def run(name, world, matrices, states, extra_life=10):
(y, x) = states['position']
matrices['cellular_binary_grass'][int(y), int(x)] = False |
class Config:
def __init__(self, classified_types: [str]):
self.classified_types = classified_types
| class Config:
def __init__(self, classified_types: [str]):
self.classified_types = classified_types |
nterms = int(input("Stevilo cifr? "))
n1, n2 = 0, 1
count = 0
if nterms <= 0:
print("Vnesi pozitivno stevilo: ")
elif nterms == 1:
print("Sekvenca do ",nterms,": ")
print(n1)
else:
print("Sekvenca:")
while count < nterms:
print(n1)
nth = n1 + n2
n1 = n2
n2 = nth
count += 1 | nterms = int(input('Stevilo cifr? '))
(n1, n2) = (0, 1)
count = 0
if nterms <= 0:
print('Vnesi pozitivno stevilo: ')
elif nterms == 1:
print('Sekvenca do ', nterms, ': ')
print(n1)
else:
print('Sekvenca:')
while count < nterms:
print(n1)
nth = n1 + n2
n1 = n2
n2 = nth
count += 1 |
issues=[
dict(name='Habit',number=5,season='Winter 2012',
description='commit to a change, experience it, and record'),
dict(name='Interview', number=4, season='Autumn 2011',
description="this is your opportunity to inhabit another's mind"),
dict(name= 'Digital Presence', number= 3, season= 'Summer 2011',
description='what does your digital self look like?'),
dict(name= 'Adventure', number=2, season= 'Spring 2011',
description='take an adventure and write about it.'),
dict(name= 'Unplugging', number=1, season= 'Winter 2011',
description='what are you looking forward to leaving?')
]
siteroot='/Users/adam/open review quarterly/source/'
infodir='/Users/adam/open review quarterly/info'
skip_issues_before=5
illustration_tag='=== Illustration ==='
illustration_tag_sized="=== Illustration width: 50% ===" | issues = [dict(name='Habit', number=5, season='Winter 2012', description='commit to a change, experience it, and record'), dict(name='Interview', number=4, season='Autumn 2011', description="this is your opportunity to inhabit another's mind"), dict(name='Digital Presence', number=3, season='Summer 2011', description='what does your digital self look like?'), dict(name='Adventure', number=2, season='Spring 2011', description='take an adventure and write about it.'), dict(name='Unplugging', number=1, season='Winter 2011', description='what are you looking forward to leaving?')]
siteroot = '/Users/adam/open review quarterly/source/'
infodir = '/Users/adam/open review quarterly/info'
skip_issues_before = 5
illustration_tag = '=== Illustration ==='
illustration_tag_sized = '=== Illustration width: 50% ===' |
num = 1
factors = list()
while num <= 100:
if (num % 10) == 0:
factors.append(num)
num = num + 1
print("Factors :",factors)
| num = 1
factors = list()
while num <= 100:
if num % 10 == 0:
factors.append(num)
num = num + 1
print('Factors :', factors) |
dict(
source=["/home/yzhang3151/project/NMT/experiments/nmt/binarized_text.diag.shuf.h5"],
target=["/home/yzhang3151/project/NMT/experiments/nmt/binarized_text.drug.shuf.h5"],
indx_word="/home/yzhang3151/project/NMT/experiments/nmt/ivocab.diag.pkl",
indx_word_target="/home/yzhang3151/project/NMT/experiments/nmt/ivocab.drug.pkl",
word_indx="/home/yzhang3151/project/NMT/experiments/nmt/vocab.diag.pkl",
word_indx_trgt="/home/yzhang3151/project/NMT/experiments/nmt/vocab.drug.pkl",
null_sym_source=8360,
null_sym_target=1010,
n_sym_source=16001,
n_sym_target=16001,
loopIters=1000000,
seqlen=50,
bs=80,
dim=1000,
saveFreq=30,
last_forward = False,
forward = True,
backward = True,
last_backward = False,
use_context_gate=True,
##########
# for coverage
maintain_coverage=True,
# for linguistic coverage, the dim can only be 1
coverage_dim=10,
#-----------------------
use_linguistic_coverage=False,
# added by Zhaopeng Tu, 2015-12-16
use_fertility_model=True,
max_fertility=2,
coverage_accumulated_operation = "additive",
##########
use_recurrent_coverage=True,
use_recurrent_gating_coverage=True,
use_probability_for_recurrent_coverage=True,
use_input_annotations_for_recurrent_coverage=True,
use_decoding_state_for_recurrent_coverage=True,
)
| dict(source=['/home/yzhang3151/project/NMT/experiments/nmt/binarized_text.diag.shuf.h5'], target=['/home/yzhang3151/project/NMT/experiments/nmt/binarized_text.drug.shuf.h5'], indx_word='/home/yzhang3151/project/NMT/experiments/nmt/ivocab.diag.pkl', indx_word_target='/home/yzhang3151/project/NMT/experiments/nmt/ivocab.drug.pkl', word_indx='/home/yzhang3151/project/NMT/experiments/nmt/vocab.diag.pkl', word_indx_trgt='/home/yzhang3151/project/NMT/experiments/nmt/vocab.drug.pkl', null_sym_source=8360, null_sym_target=1010, n_sym_source=16001, n_sym_target=16001, loopIters=1000000, seqlen=50, bs=80, dim=1000, saveFreq=30, last_forward=False, forward=True, backward=True, last_backward=False, use_context_gate=True, maintain_coverage=True, coverage_dim=10, use_linguistic_coverage=False, use_fertility_model=True, max_fertility=2, coverage_accumulated_operation='additive', use_recurrent_coverage=True, use_recurrent_gating_coverage=True, use_probability_for_recurrent_coverage=True, use_input_annotations_for_recurrent_coverage=True, use_decoding_state_for_recurrent_coverage=True) |
#!/usr/bin/python -tt
# Copyright 2010 Google Inc.
# Licensed under the Apache License, Version 2.0
# http://www.apache.org/licenses/LICENSE-2.0
# Google's Python Class
# http://code.google.com/edu/languages/google-python-class/
# Basic list exercises
# Fill in the code for the functions below. main() is already set up
# to call the functions with a few different inputs,
# printing 'OK' when each function is correct.
# The starter code for each function includes a 'return'
# which is just a placeholder for your code.
# It's ok if you do not complete all the functions, and there
# are some additional functions to try in list2.py.
# A. match_ends
# Given a list of strings, return the count of the number of
# strings where the string length is 2 or more and the first
# and last chars of the string are the same.
# Note: python does not have a ++ operator, but += works.
def match_ends(words):
return len([word for word in words if len(word)>=2 and word[0]==word[-1]])
#print(match_ends(['aaa', 'be', 'abc', 'hello']))
# test(match_ends(['aba', 'xyz', 'aa', 'x', 'bbb']), 3)
# test(match_ends(['', 'x', 'xy', 'xyx', 'xx']), 2)
# test(match_ends(['aaa', 'be', 'abc', 'hello']), 1)
# B. front_x
# Given a list of strings, return a list with the strings
# in sorted order, except group all the strings that begin with 'x' first.
# e.g. ['mix', 'xyz', 'apple', 'xanadu', 'aardvark'] yields
# ['xanadu', 'xyz', 'aardvark', 'apple', 'mix']
# Hint: this can be done by making 2 lists and sorting each of them
# before combining them.
def front_x(words):
strings_with_x = sorted([word for word in words if word[0] == 'x'])
other_strings = sorted([word for word in words if word[0]!= 'x'])
return strings_with_x + other_strings
#print(front_x(['mix', 'xyz', 'apple', 'xanadu', 'aardvark']))
# test(front_x(['bbb', 'ccc', 'axx', 'xzz', 'xaa']),
# ['xaa', 'xzz', 'axx', 'bbb', 'ccc'])
# test(front_x(['ccc', 'bbb', 'aaa', 'xcc', 'xaa']),
# ['xaa', 'xcc', 'aaa', 'bbb', 'ccc'])
# test(front_x(['mix', 'xyz', 'apple', 'xanadu', 'aardvark']),
# ['xanadu', 'xyz', 'aardvark', 'apple', 'mix'])
# C. sort_last
# Given a list of non-empty tuples, return a list sorted in increasing
# order by the last element in each tuple.
# e.g. [(1, 7), (1, 3), (3, 4, 5), (2, 2)] yields
# [(2, 2), (1, 3), (3, 4, 5), (1, 7)]
# Hint: use a custom key= function to extract the last element form each tuple.
def sort_last(tuples):
def last_element(tuples):
return tuples[-1]
return sorted(tuples, key=last_element)
#print(sort_last([(1, 7), (1, 3), (3, 4, 5), (2, 2)]))
# test(sort_last([(1, 3), (3, 2), (2, 1)]),
# [(2, 1), (3, 2), (1, 3)])
# test(sort_last([(2, 3), (1, 2), (3, 1)]),
# [(3, 1), (1, 2), (2, 3)])
# test(sort_last([(1, 7), (1, 3), (3, 4, 5), (2, 2)]),
# [(2, 2), (1, 3), (3, 4, 5), (1, 7)])
#list2
# Additional basic list exercises
# D. Given a list of numbers, return a list where
# all adjacent == elements have been reduced to a single element,
# so [1, 2, 2, 3] returns [1, 2, 3]. You may create a new list or
# modify the passed in list.
def remove_adjacent(nums):
result = []
if len(nums) > 0:
for number in nums:
if len(result) == 0:
result.append(number)
if number != result[-1]:
result.append(number)
return result
print(remove_adjacent([2, 2, 3, 3, 3, 4, 3]))
# test(remove_adjacent([1, 2, 2, 3]), [1, 2, 3])
# test(remove_adjacent([2, 2, 3, 3, 3]), [2, 3])
# test(remove_adjacent([]), [])
# E. Given two lists sorted in increasing order, create and return a merged
# list of all the elements in sorted order. You may modify the passed in lists.
# Ideally, the solution should work in "linear" time, making a single
# pass of both lists.
def linear_merge(list1, list2):
return sorted((list1+list2))
print(linear_merge(['aa', 'aa'], ['aa', 'bb', 'bb']))
# test(linear_merge(['aa', 'xx', 'zz'], ['bb', 'cc']),
# ['aa', 'bb', 'cc', 'xx', 'zz'])
# test(linear_merge(['aa', 'xx'], ['bb', 'cc', 'zz']),
# ['aa', 'bb', 'cc', 'xx', 'zz'])
# test(linear_merge(['aa', 'aa'], ['aa', 'bb', 'bb']),
# ['aa', 'aa', 'aa', 'bb', 'bb'])
| def match_ends(words):
return len([word for word in words if len(word) >= 2 and word[0] == word[-1]])
def front_x(words):
strings_with_x = sorted([word for word in words if word[0] == 'x'])
other_strings = sorted([word for word in words if word[0] != 'x'])
return strings_with_x + other_strings
def sort_last(tuples):
def last_element(tuples):
return tuples[-1]
return sorted(tuples, key=last_element)
def remove_adjacent(nums):
result = []
if len(nums) > 0:
for number in nums:
if len(result) == 0:
result.append(number)
if number != result[-1]:
result.append(number)
return result
print(remove_adjacent([2, 2, 3, 3, 3, 4, 3]))
def linear_merge(list1, list2):
return sorted(list1 + list2)
print(linear_merge(['aa', 'aa'], ['aa', 'bb', 'bb'])) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.