content stringlengths 7 1.05M | fixed_cases stringlengths 1 1.28M |
|---|---|
'''
@Date: 2019-12-02 20:59:38
@Author: ywyz
@LastModifiedBy: ywyz
@Github: https://github.com/ywyz
@LastEditors: ywyz
@LastEditTime: 2019-12-02 21:34:50
'''
class Account:
def __init__(self, id=0, balance=100.0, annualInterestRate=0.0):
self.__id = id
self.__balance = balance
self.__annualInterestRate = annualInterestRate
def getId(self):
return self.__id
def setId(self, id):
self.__id = id
def getBalance(self):
return self.__balance
def setBalance(self, balance):
self.__balance = balance
def getAnnualInterestRate(self):
return self.__annualInterestRate
def setAnnualInterestRate(self, annualInterestRate):
self.__annualInterestRate = annualInterestRate / 100
def getMonthlyInterestRate(self):
self.monthlyInterestRate = self.__annualInterestRate / 12 / 100
return self.monthlyInterestRate
def getMonthlyInterest(self):
self.monthlyInterest = self.__balance * self.monthlyInterestRate
return self.monthlyInterest
def withDraw(self, money):
self.__balance -= money
def deposit(self, money):
self.__balance += money
def main():
account = Account(1122, 20000, 4.5)
account.withDraw(2500)
account.deposit(3000)
print("Id: ", account.getId())
print("Balance: ", account.getBalance())
print("MonthlyInterestRate:",
format(account.getMonthlyInterestRate(), ".1f"), "%")
print("MonthlyInterest: ", format(account.getMonthlyInterest(), ".2f"))
main()
| """
@Date: 2019-12-02 20:59:38
@Author: ywyz
@LastModifiedBy: ywyz
@Github: https://github.com/ywyz
@LastEditors: ywyz
@LastEditTime: 2019-12-02 21:34:50
"""
class Account:
def __init__(self, id=0, balance=100.0, annualInterestRate=0.0):
self.__id = id
self.__balance = balance
self.__annualInterestRate = annualInterestRate
def get_id(self):
return self.__id
def set_id(self, id):
self.__id = id
def get_balance(self):
return self.__balance
def set_balance(self, balance):
self.__balance = balance
def get_annual_interest_rate(self):
return self.__annualInterestRate
def set_annual_interest_rate(self, annualInterestRate):
self.__annualInterestRate = annualInterestRate / 100
def get_monthly_interest_rate(self):
self.monthlyInterestRate = self.__annualInterestRate / 12 / 100
return self.monthlyInterestRate
def get_monthly_interest(self):
self.monthlyInterest = self.__balance * self.monthlyInterestRate
return self.monthlyInterest
def with_draw(self, money):
self.__balance -= money
def deposit(self, money):
self.__balance += money
def main():
account = account(1122, 20000, 4.5)
account.withDraw(2500)
account.deposit(3000)
print('Id: ', account.getId())
print('Balance: ', account.getBalance())
print('MonthlyInterestRate:', format(account.getMonthlyInterestRate(), '.1f'), '%')
print('MonthlyInterest: ', format(account.getMonthlyInterest(), '.2f'))
main() |
class Solution:
def findBottomLeftValue(self, root: Optional[TreeNode]) -> int:
ans = 0
maxDepth = 0
def dfs(root: Optional[TreeNode], depth: int) -> None:
nonlocal ans
nonlocal maxDepth
if not root:
return
if depth > maxDepth:
maxDepth = depth
ans = root.val
dfs(root.left, depth + 1)
dfs(root.right, depth + 1)
dfs(root, 1)
return ans
| class Solution:
def find_bottom_left_value(self, root: Optional[TreeNode]) -> int:
ans = 0
max_depth = 0
def dfs(root: Optional[TreeNode], depth: int) -> None:
nonlocal ans
nonlocal maxDepth
if not root:
return
if depth > maxDepth:
max_depth = depth
ans = root.val
dfs(root.left, depth + 1)
dfs(root.right, depth + 1)
dfs(root, 1)
return ans |
MESSAGE_CONTENTS_FILENAME = "text_messages/message.txt"
ORDERS_FILENAME = "user_data/orders.csv"
API_KEY = ""
ORDER_NUMBER_ROW = "Order Number"
ORDER_STATUS_ROW = "Order Status"
FIRST_NAME_ROW = "First Name (Billing)"
ORDER_ITEM_ROW = "Item Name"
NUMBER_OF_ITEMS_ROW = "Quantity"
PHONE_NUMBER_ROW = "Phone (Billing)"
with open("secret/apikey", 'r') as f:
API_KEY = f.read() | message_contents_filename = 'text_messages/message.txt'
orders_filename = 'user_data/orders.csv'
api_key = ''
order_number_row = 'Order Number'
order_status_row = 'Order Status'
first_name_row = 'First Name (Billing)'
order_item_row = 'Item Name'
number_of_items_row = 'Quantity'
phone_number_row = 'Phone (Billing)'
with open('secret/apikey', 'r') as f:
api_key = f.read() |
@auth.requires_login()
@auth.requires_membership('Super-Administrator')
def audit_academic():
db.academic_log.id_period.readable = False
db.academic_log.id_academic.readable = False
query = ((db.academic_log))
grid = SQLFORM.grid(query, exportclasses = None, orderby=db.academic_log.date_log, deletable=False, editable=False, create=False, maxtextlength={'academic_log.description' : 256})
return dict(grid=grid )
@auth.requires_login()
@auth.requires_membership('Super-Administrator')
def audit_academic_assignation_areas():
areas = db(db.area_level).select()
role = request.vars['role']
response.view='audit/audit_academic_assignation_areas.html'
return dict(areas=areas, role=role)
@auth.requires_login()
@auth.requires_membership('Super-Administrator')
def audit_academic_assignation_courses_list():
#db.user_project.assigned_user == auth.user.id
#Obtain the current period of the system and all the register periods
period = cpfecys.current_year_period()
periods = db(db.period_year).select()
area = None
role = None
#Check if the period is change
#Obtain the select period
if request.vars['period'] != None:
period = request.vars['period']
area = request.vars['areas']
period = db(db.period_year.id==period).select().first()
if not period:
session.flash = T('Not valid Action.')
redirect(URL('default', 'index'))
if request.vars['area'] != None:
area = request.vars['area']
response.view = 'audit/audit_academic_assignation_courses_list.html'
projects = db(db.project.area_level==area).select()
return dict(projects=projects,area=area)
else:
session.flash = "Action not allowed"
redirect(URL('default','index'))
@auth.requires_login()
@auth.requires_membership('Super-Administrator')
def audit_academic_assignation():
#db.user_project.assigned_user == auth.user.id
#Obtain the current period of the system and all the register periods
period = cpfecys.current_year_period()
periods = db(db.period_year).select()
#Check if the period is change
#Obtain the select period
if request.vars['period'] != None:
period = request.vars['period']
project = request.vars['project']
period = db(db.period_year.id==period).select().first()
if not period:
session.flash = T('Not valid Action.')
redirect(URL('default', 'index'))
if request.vars['project'] == None:
if session.project_var == None:
session.flash = T('Not valid Action.')
redirect(URL('default', 'index'))
else:
project = session.project_var
else:
project = request.vars['project'];
session.project_var = project
if request.vars['area'] == None:
if session.area_var == None:
session.flash = T('Not valid Action.')
redirect(URL('default', 'index'))
else:
area = session.area_var
else:
area = request.vars['area'];
session.area_var = area
#Search name project
name_project = ''
project_result = db(db.project.id == project).select()
for a in project_result:
name_project = a.name
db.academic_course_assignation_log.before_course.readable = False
db.academic_course_assignation_log.after_course.readable = False
db.academic_course_assignation_log.before_year.readable = False
db.academic_course_assignation_log.after_year.readable = False
db.academic_course_assignation_log.before_semester.readable = False
db.academic_course_assignation_log.after_semester.readable = False
db.academic_course_assignation_log.id_period.readable = False
db.academic_course_assignation_log.id_academic_course_assignation.readable = False
query = ((db.academic_course_assignation_log.id_period==period) & ((db.academic_course_assignation_log.after_course ==name_project) | (db.academic_course_assignation_log.before_course ==name_project) ))
grid = SQLFORM.grid(query, deletable=False, editable=False, create=False, details=False, maxtextlength={'academic_course_assignation_log.description' : 256}, csv=False)
return dict(grid=grid , project=project, periods= periods, period=period, area=area)
@auth.requires_login()
@auth.requires_membership('Super-Administrator')
def audit_register_mail_notifications_detail():
if request.vars['notification'] ==None:
if session.notification_var == None:
session.flash = T('Not valid Action.')
redirect(URL('default', 'index'))
else:
notice = session.notification_var
else:
notice = request.vars['notification']
session.notification_var = notice
#show the page resiter_mail_notifications.html
response.view='audit/audit_register_mail_notifications_detail.html'
#obtain the projects where the student is register and is of the select semester
asunto = db(db.notification_general_log4.id==notice).select()
db.notification_log4.register.readable = False
db.notification_log4.id.readable = False
db.notification_general_log4.id.readable = False
db.notification_general_log4.subject.readable = False
db.notification_general_log4.sent_message.readable = False
db.notification_general_log4.emisor.readable = False
db.notification_general_log4.course.readable = False
db.notification_general_log4.yearp.readable = False
db.notification_general_log4.period.readable = False
query = ((db.notification_log4.register==notice)&(db.notification_general_log4.id==db.notification_log4.register))
grid = SQLFORM.grid(query, deletable=False, editable=False, create=False, paginate=10, details=False, maxtextlength={'notification_log4.result_log' : 256},csv=False)
return dict(subject=asunto, grid=grid, notice=notice)
@auth.requires_login()
@auth.requires_membership('Super-Administrator')
def audit_register_mail_notifications():
period = cpfecys.current_year_period()
if request.vars['period'] != None:
period = request.vars['period']
area = request.vars['area']
period = db(db.period_year.id==period).select().first()
if not period:
session.flash = T('Not valid Action.')
redirect(URL('default', 'index'))
user = request.vars['user']
if user == None:
session.flash = T('Not valid Action.')
redirect(URL('default', 'index'))
def obtain_nameProject(user):
student = db((db.user_project.id==user)).select()
project =''
for s in student:
project = s
return project
def obtain_period(periodo):
semester = db(db.period.id==periodo).select()
nameS = ''
for s in semester:
nameS=s.name
return nameS
#obtain all the registers of the send notices of the student
def obtain_notices(user):
#name project
n=obtain_nameProject(user)
return db((db.notification_general_log4.emisor==n.assigned_user.username) & (db.notification_general_log4.course==n.project.name)&(db.notification_general_log4.period==period.period.name)&(db.notification_general_log4.yearp==period.yearp)).select()
return dict(user=user, obtain_nameProject=obtain_nameProject, obtain_notices=obtain_notices)
@auth.requires_login()
@auth.requires_membership('Super-Administrator')
def audit_teacher_mail_notifications_courses_list():
#db.user_project.assigned_user == auth.user.id
#Obtain the current period of the system and all the register periods
period = cpfecys.current_year_period()
periods = db(db.period_year).select()
area = None
#Check if the period is change
#Obtain the select period
if request.vars['period'] != None:
period = request.vars['period']
area = request.vars['area']
period = db(db.period_year.id==period).select().first()
if not period:
session.flash = T('Not valid Action.')
redirect(URL('default', 'index'))
if request.vars['area'] != None:
area = request.vars['area']
response.view = 'audit/audit_teacher_mail_notifications_courses_list.html'
projects = db(db.project.area_level==area).select()
#Obtain all the teachers that has register in the system in the select period
def current_teacher(project):
students = db((db.user_project.project==project)&((db.user_project.period <= period) & ((db.user_project.period + db.user_project.periods) > period))&(db.auth_membership.user_id==db.user_project.assigned_user)&(db.auth_membership.group_id==3)).select()
return students
#Functions that ar use to obtain the notices
def total_notices(project):
return db((db.notification_general_log4.emisor==project.assigned_user.username) & (db.notification_general_log4.course==project.project.name)&(db.notification_general_log4.period==period.period.name)&(db.notification_general_log4.yearp==period.yearp)).count()
return dict(projects=projects, periods=periods, area=area, current_teacher=current_teacher, total_notices=total_notices, periodA=period)
else:
session.flash = "Action not allowed"
redirect(URL('default','index'))
@auth.requires_login()
@auth.requires_membership('Super-Administrator')
def audit_teacher_mail_notifications_areas():
areas = db(db.area_level).select()
response.view='audit/audit_teacher_mail_notifications_areas.html'
return dict(areas=areas)
@auth.requires_login()
@auth.requires_membership('Super-Administrator')
def audit_student_mail_notifications_courses_list():
#db.user_project.assigned_user == auth.user.id
#Obtain the current period of the system and all the register periods
period = cpfecys.current_year_period()
periods = db(db.period_year).select()
area = None
#Check if the period is change
#Obtain the select period
if request.vars['period'] != None:
period = request.vars['period']
area = request.vars['area']
period = db(db.period_year.id==period).select().first()
if not period:
session.flash = T('Not valid Action.')
redirect(URL('default', 'index'))
if request.vars['area'] != None:
area = request.vars['area']
response.view = 'audit/audit_student_mail_notifications_courses_list.html'
projects = db(db.project.area_level==area).select()
#Obtain all the practising that has register in the system in the select period
def current_practising(project):
students = db((db.user_project.project==project)&((db.user_project.period <= period) & ((db.user_project.period + db.user_project.periods) > period))&(db.auth_membership.user_id==db.user_project.assigned_user)&(db.auth_membership.group_id==2)).select()
return students
#Functions that ar use to obtain the notices
def total_notices(project):
return db((db.notification_general_log4.emisor==project.assigned_user.username) & (db.notification_general_log4.course==project.project.name)&(db.notification_general_log4.period==period.period.name)&(db.notification_general_log4.yearp==period.yearp)).count()
return dict(projects=projects, periods=periods, area=area, current_practising=current_practising, total_notices=total_notices, periodA=period)
else:
session.flash = "Action not allowed"
redirect(URL('default','index'))
@auth.requires_login()
@auth.requires_membership('Super-Administrator')
def audit_student_mail_notifications_areas():
areas = db(db.area_level).select()
response.view='audit/audit_student_mail_notifications_areas.html'
return dict(areas=areas) | @auth.requires_login()
@auth.requires_membership('Super-Administrator')
def audit_academic():
db.academic_log.id_period.readable = False
db.academic_log.id_academic.readable = False
query = db.academic_log
grid = SQLFORM.grid(query, exportclasses=None, orderby=db.academic_log.date_log, deletable=False, editable=False, create=False, maxtextlength={'academic_log.description': 256})
return dict(grid=grid)
@auth.requires_login()
@auth.requires_membership('Super-Administrator')
def audit_academic_assignation_areas():
areas = db(db.area_level).select()
role = request.vars['role']
response.view = 'audit/audit_academic_assignation_areas.html'
return dict(areas=areas, role=role)
@auth.requires_login()
@auth.requires_membership('Super-Administrator')
def audit_academic_assignation_courses_list():
period = cpfecys.current_year_period()
periods = db(db.period_year).select()
area = None
role = None
if request.vars['period'] != None:
period = request.vars['period']
area = request.vars['areas']
period = db(db.period_year.id == period).select().first()
if not period:
session.flash = t('Not valid Action.')
redirect(url('default', 'index'))
if request.vars['area'] != None:
area = request.vars['area']
response.view = 'audit/audit_academic_assignation_courses_list.html'
projects = db(db.project.area_level == area).select()
return dict(projects=projects, area=area)
else:
session.flash = 'Action not allowed'
redirect(url('default', 'index'))
@auth.requires_login()
@auth.requires_membership('Super-Administrator')
def audit_academic_assignation():
period = cpfecys.current_year_period()
periods = db(db.period_year).select()
if request.vars['period'] != None:
period = request.vars['period']
project = request.vars['project']
period = db(db.period_year.id == period).select().first()
if not period:
session.flash = t('Not valid Action.')
redirect(url('default', 'index'))
if request.vars['project'] == None:
if session.project_var == None:
session.flash = t('Not valid Action.')
redirect(url('default', 'index'))
else:
project = session.project_var
else:
project = request.vars['project']
session.project_var = project
if request.vars['area'] == None:
if session.area_var == None:
session.flash = t('Not valid Action.')
redirect(url('default', 'index'))
else:
area = session.area_var
else:
area = request.vars['area']
session.area_var = area
name_project = ''
project_result = db(db.project.id == project).select()
for a in project_result:
name_project = a.name
db.academic_course_assignation_log.before_course.readable = False
db.academic_course_assignation_log.after_course.readable = False
db.academic_course_assignation_log.before_year.readable = False
db.academic_course_assignation_log.after_year.readable = False
db.academic_course_assignation_log.before_semester.readable = False
db.academic_course_assignation_log.after_semester.readable = False
db.academic_course_assignation_log.id_period.readable = False
db.academic_course_assignation_log.id_academic_course_assignation.readable = False
query = (db.academic_course_assignation_log.id_period == period) & ((db.academic_course_assignation_log.after_course == name_project) | (db.academic_course_assignation_log.before_course == name_project))
grid = SQLFORM.grid(query, deletable=False, editable=False, create=False, details=False, maxtextlength={'academic_course_assignation_log.description': 256}, csv=False)
return dict(grid=grid, project=project, periods=periods, period=period, area=area)
@auth.requires_login()
@auth.requires_membership('Super-Administrator')
def audit_register_mail_notifications_detail():
if request.vars['notification'] == None:
if session.notification_var == None:
session.flash = t('Not valid Action.')
redirect(url('default', 'index'))
else:
notice = session.notification_var
else:
notice = request.vars['notification']
session.notification_var = notice
response.view = 'audit/audit_register_mail_notifications_detail.html'
asunto = db(db.notification_general_log4.id == notice).select()
db.notification_log4.register.readable = False
db.notification_log4.id.readable = False
db.notification_general_log4.id.readable = False
db.notification_general_log4.subject.readable = False
db.notification_general_log4.sent_message.readable = False
db.notification_general_log4.emisor.readable = False
db.notification_general_log4.course.readable = False
db.notification_general_log4.yearp.readable = False
db.notification_general_log4.period.readable = False
query = (db.notification_log4.register == notice) & (db.notification_general_log4.id == db.notification_log4.register)
grid = SQLFORM.grid(query, deletable=False, editable=False, create=False, paginate=10, details=False, maxtextlength={'notification_log4.result_log': 256}, csv=False)
return dict(subject=asunto, grid=grid, notice=notice)
@auth.requires_login()
@auth.requires_membership('Super-Administrator')
def audit_register_mail_notifications():
period = cpfecys.current_year_period()
if request.vars['period'] != None:
period = request.vars['period']
area = request.vars['area']
period = db(db.period_year.id == period).select().first()
if not period:
session.flash = t('Not valid Action.')
redirect(url('default', 'index'))
user = request.vars['user']
if user == None:
session.flash = t('Not valid Action.')
redirect(url('default', 'index'))
def obtain_name_project(user):
student = db(db.user_project.id == user).select()
project = ''
for s in student:
project = s
return project
def obtain_period(periodo):
semester = db(db.period.id == periodo).select()
name_s = ''
for s in semester:
name_s = s.name
return nameS
def obtain_notices(user):
n = obtain_name_project(user)
return db((db.notification_general_log4.emisor == n.assigned_user.username) & (db.notification_general_log4.course == n.project.name) & (db.notification_general_log4.period == period.period.name) & (db.notification_general_log4.yearp == period.yearp)).select()
return dict(user=user, obtain_nameProject=obtain_nameProject, obtain_notices=obtain_notices)
@auth.requires_login()
@auth.requires_membership('Super-Administrator')
def audit_teacher_mail_notifications_courses_list():
period = cpfecys.current_year_period()
periods = db(db.period_year).select()
area = None
if request.vars['period'] != None:
period = request.vars['period']
area = request.vars['area']
period = db(db.period_year.id == period).select().first()
if not period:
session.flash = t('Not valid Action.')
redirect(url('default', 'index'))
if request.vars['area'] != None:
area = request.vars['area']
response.view = 'audit/audit_teacher_mail_notifications_courses_list.html'
projects = db(db.project.area_level == area).select()
def current_teacher(project):
students = db((db.user_project.project == project) & ((db.user_project.period <= period) & (db.user_project.period + db.user_project.periods > period)) & (db.auth_membership.user_id == db.user_project.assigned_user) & (db.auth_membership.group_id == 3)).select()
return students
def total_notices(project):
return db((db.notification_general_log4.emisor == project.assigned_user.username) & (db.notification_general_log4.course == project.project.name) & (db.notification_general_log4.period == period.period.name) & (db.notification_general_log4.yearp == period.yearp)).count()
return dict(projects=projects, periods=periods, area=area, current_teacher=current_teacher, total_notices=total_notices, periodA=period)
else:
session.flash = 'Action not allowed'
redirect(url('default', 'index'))
@auth.requires_login()
@auth.requires_membership('Super-Administrator')
def audit_teacher_mail_notifications_areas():
areas = db(db.area_level).select()
response.view = 'audit/audit_teacher_mail_notifications_areas.html'
return dict(areas=areas)
@auth.requires_login()
@auth.requires_membership('Super-Administrator')
def audit_student_mail_notifications_courses_list():
period = cpfecys.current_year_period()
periods = db(db.period_year).select()
area = None
if request.vars['period'] != None:
period = request.vars['period']
area = request.vars['area']
period = db(db.period_year.id == period).select().first()
if not period:
session.flash = t('Not valid Action.')
redirect(url('default', 'index'))
if request.vars['area'] != None:
area = request.vars['area']
response.view = 'audit/audit_student_mail_notifications_courses_list.html'
projects = db(db.project.area_level == area).select()
def current_practising(project):
students = db((db.user_project.project == project) & ((db.user_project.period <= period) & (db.user_project.period + db.user_project.periods > period)) & (db.auth_membership.user_id == db.user_project.assigned_user) & (db.auth_membership.group_id == 2)).select()
return students
def total_notices(project):
return db((db.notification_general_log4.emisor == project.assigned_user.username) & (db.notification_general_log4.course == project.project.name) & (db.notification_general_log4.period == period.period.name) & (db.notification_general_log4.yearp == period.yearp)).count()
return dict(projects=projects, periods=periods, area=area, current_practising=current_practising, total_notices=total_notices, periodA=period)
else:
session.flash = 'Action not allowed'
redirect(url('default', 'index'))
@auth.requires_login()
@auth.requires_membership('Super-Administrator')
def audit_student_mail_notifications_areas():
areas = db(db.area_level).select()
response.view = 'audit/audit_student_mail_notifications_areas.html'
return dict(areas=areas) |
def replace_element(iterable_object: (list, dict),
old_value: (str, int, float, list, tuple, dict),
new_value: (str, int, float, list, tuple, dict)
) -> (list, dict):
'''
This function takes an iterable object and two values, and returns
the same object with the first value replaced by the first. It is
thought for nested iterable and mutable objects.
All arguments must be of equal length.
:param iterable_object: list or dict to change
:param old_value: element to be replaced
:param new_value: element that replaces old_value
:return: iterable_object with old_value replaced with new_value
'''
# Creation of a function that finds the element to change and replaces it with the new element.
# Note: if "old_value" is not in "nested_list", no change is made and no error is raised.
def change_element_in_pure_list(nested_list, old_value, new_value):
for index, element in enumerate(nested_list):
# check if old_value is an element of the primary list
if element == old_value:
nested_list[index] = new_value
# if not, then apply recursive search to look for old_value in secondary lists
elif isinstance(element, list):
change_element_in_pure_list(element, old_value, new_value)
return nested_list
# Creation of a function that finds the element to change and replaces it with the new element.
# Note: if "old_value" is not in "nested_dict", no change is made and no error is raised.
def change_element_in_dict(nested_dict, old_value, new_value):
for key, value in nested_dict.items():
# check if old_value is a value of the primary dictionary
if value == old_value:
nested_dict[key] = new_value
# if any value is a dictionary then apply recursive search to look for old_value in secondary dictionaries
elif isinstance(value, dict):
change_element_in_dict(value, old_value, new_value)
# if any value is a list then apply recursive search to look for old_value in its elements
elif isinstance(value, list):
for index, element in enumerate(value):
# check if old_value is an element of the list
if element == old_value:
nested_dict[key][index] = new_value
# if any element of the list is a dictionary, then apply recursive search by calling the function again
elif isinstance(element, dict):
change_element_in_dict(element, old_value, new_value)
# if any value of the list is a list, apply recursive search by calling the function change_element_in_pure_list
elif isinstance(element, list):
change_element_in_pure_list(element, old_value, new_value)
return nested_dict
# Creation of a function that finds the element to change and replaces it with the new element.
# Note: if "old_value" is not in "nested_list", no change is made and no error is raised.
def change_element_in_list(nested_list, old_value, new_value):
for index, element in enumerate(nested_list):
# check if old_value is an element of the primary list
if element == old_value:
nested_list[index] = new_value
# if not and it is a list, then apply recursive search to look for old_value in secondary lists
elif isinstance(element, list):
change_element_in_pure_list(element, old_value, new_value)
# if not and it is a dict, then apply recursive search to look for old_value in secondary dicts or lists
elif isinstance(element, dict):
change_element_in_dict(element, old_value, new_value)
return nested_list
if isinstance(iterable_object, list):
return change_element_in_list(iterable_object, old_value, new_value)
elif isinstance(iterable_object, dict):
return change_element_in_dict(iterable_object, old_value, new_value)
# else:
# raise TypeError('Input must be an iterable and mutable object: dictionary or list.') | def replace_element(iterable_object: (list, dict), old_value: (str, int, float, list, tuple, dict), new_value: (str, int, float, list, tuple, dict)) -> (list, dict):
"""
This function takes an iterable object and two values, and returns
the same object with the first value replaced by the first. It is
thought for nested iterable and mutable objects.
All arguments must be of equal length.
:param iterable_object: list or dict to change
:param old_value: element to be replaced
:param new_value: element that replaces old_value
:return: iterable_object with old_value replaced with new_value
"""
def change_element_in_pure_list(nested_list, old_value, new_value):
for (index, element) in enumerate(nested_list):
if element == old_value:
nested_list[index] = new_value
elif isinstance(element, list):
change_element_in_pure_list(element, old_value, new_value)
return nested_list
def change_element_in_dict(nested_dict, old_value, new_value):
for (key, value) in nested_dict.items():
if value == old_value:
nested_dict[key] = new_value
elif isinstance(value, dict):
change_element_in_dict(value, old_value, new_value)
elif isinstance(value, list):
for (index, element) in enumerate(value):
if element == old_value:
nested_dict[key][index] = new_value
elif isinstance(element, dict):
change_element_in_dict(element, old_value, new_value)
elif isinstance(element, list):
change_element_in_pure_list(element, old_value, new_value)
return nested_dict
def change_element_in_list(nested_list, old_value, new_value):
for (index, element) in enumerate(nested_list):
if element == old_value:
nested_list[index] = new_value
elif isinstance(element, list):
change_element_in_pure_list(element, old_value, new_value)
elif isinstance(element, dict):
change_element_in_dict(element, old_value, new_value)
return nested_list
if isinstance(iterable_object, list):
return change_element_in_list(iterable_object, old_value, new_value)
elif isinstance(iterable_object, dict):
return change_element_in_dict(iterable_object, old_value, new_value) |
n = int(input())
s = input()
t = list(s)
s1 = []
s2 = []
for i in range(n):
s1.append([])
s2.append([])
for i in range(n):
for j in range(n):
if j < i:
s1[i].append(t[j])
else:
s2[i].append(t[j])
count = 0
com = []
slv = []
for i in range(n):
for j in range(i):
if s1[i][j] in s2[i] and s1[i][j] not in com:
count += 1
com.append(s1[i][j])
slv.append(count)
count = 0
com = []
print(max(slv))
| n = int(input())
s = input()
t = list(s)
s1 = []
s2 = []
for i in range(n):
s1.append([])
s2.append([])
for i in range(n):
for j in range(n):
if j < i:
s1[i].append(t[j])
else:
s2[i].append(t[j])
count = 0
com = []
slv = []
for i in range(n):
for j in range(i):
if s1[i][j] in s2[i] and s1[i][j] not in com:
count += 1
com.append(s1[i][j])
slv.append(count)
count = 0
com = []
print(max(slv)) |
def selection_sort(arr, n):
for i in range(0, n - 1):
min_idx = i
for j in range(i, n):
if (arr[min_idx] > arr[j]):
min_idx = j
if min_idx != i:
arr[min_idx], arr[i] = arr[i], arr[min_idx]
def print_array(arr, n):
for i in range(0, n):
print(arr[i], end=' ')
print()
arr = list(map(int, input().split()))
size = len(arr)
print_array(arr, size)
selection_sort(arr, size)
print_array(arr, size)
'''
Input:
5 4 3 2 1
Output:
5 4 3 2 1
1 2 3 4 5
''' | def selection_sort(arr, n):
for i in range(0, n - 1):
min_idx = i
for j in range(i, n):
if arr[min_idx] > arr[j]:
min_idx = j
if min_idx != i:
(arr[min_idx], arr[i]) = (arr[i], arr[min_idx])
def print_array(arr, n):
for i in range(0, n):
print(arr[i], end=' ')
print()
arr = list(map(int, input().split()))
size = len(arr)
print_array(arr, size)
selection_sort(arr, size)
print_array(arr, size)
'\nInput:\n5 4 3 2 1\n\nOutput:\n5 4 3 2 1\n1 2 3 4 5\n' |
BEST_PARAMS = {
"boosting_type": "dart",
"learning_rate": 0.2,
"num_leaves": 64,
"min_child_samples": 5,
"n_estimators": 5000,
"drop_rate": 0.015,
"feature_fraction": 0.7,
"bagging_fraction": 0.8,
"n_jobs": -2,
}
| best_params = {'boosting_type': 'dart', 'learning_rate': 0.2, 'num_leaves': 64, 'min_child_samples': 5, 'n_estimators': 5000, 'drop_rate': 0.015, 'feature_fraction': 0.7, 'bagging_fraction': 0.8, 'n_jobs': -2} |
def pega_id(*args):
try:
telaAtualizarProdutos = args[0]
telaErro = args[1]
cursor = args[2]
id = telaAtualizarProdutos.cod_atualizar.text()
if telaAtualizarProdutos.broto_atualizar.isChecked():
cursor.execute("select * from broto where id = %s" % id)
pizza = cursor.fetchall()
telaAtualizarProdutos.produto_atualizar.setText(str(pizza[0][1]))
telaAtualizarProdutos.ingredientes_atualizar.setText(str(pizza[0][4]))
telaAtualizarProdutos.valor_atualizar.setText(str(pizza[0][3]))
if telaAtualizarProdutos.seis_atualizar.isChecked():
cursor.execute("select * from seisPedacos where id = %s" % id)
pizza = cursor.fetchall()
telaAtualizarProdutos.produto_atualizar.setText(str(pizza[0][1]))
telaAtualizarProdutos.ingredientes_atualizar.setText(str(pizza[0][4]))
telaAtualizarProdutos.valor_atualizar.setText(str(pizza[0][3]))
if telaAtualizarProdutos.oito_atualizar.isChecked():
cursor.execute("select * from oitoPedacos where id = %s" % id)
pizza = cursor.fetchall()
telaAtualizarProdutos.produto_atualizar.setText(str(pizza[0][1]))
telaAtualizarProdutos.ingredientes_atualizar.setText(str(pizza[0][4]))
telaAtualizarProdutos.valor_atualizar.setText(str(pizza[0][3]))
if telaAtualizarProdutos.dez_atualizar.isChecked():
cursor.execute("select * from dezPedacos where id = %s" % id)
pizza = cursor.fetchall()
telaAtualizarProdutos.produto_atualizar.setText(str(pizza[0][1]))
telaAtualizarProdutos.ingredientes_atualizar.setText(str(pizza[0][4]))
telaAtualizarProdutos.valor_atualizar.setText(str(pizza[0][3]))
if telaAtualizarProdutos.esfiha_atualizar.isChecked():
cursor.execute("select * from esfihas where id = %s" % id)
pizza = cursor.fetchall()
telaAtualizarProdutos.produto_atualizar.setText(str(pizza[0][1]))
telaAtualizarProdutos.ingredientes_atualizar.setText(str(pizza[0][4]))
telaAtualizarProdutos.valor_atualizar.setText(str(pizza[0][3]))
except:
telaErro.show()
telaErro.label.setText(' Erro, tente novamente!')
| def pega_id(*args):
try:
tela_atualizar_produtos = args[0]
tela_erro = args[1]
cursor = args[2]
id = telaAtualizarProdutos.cod_atualizar.text()
if telaAtualizarProdutos.broto_atualizar.isChecked():
cursor.execute('select * from broto where id = %s' % id)
pizza = cursor.fetchall()
telaAtualizarProdutos.produto_atualizar.setText(str(pizza[0][1]))
telaAtualizarProdutos.ingredientes_atualizar.setText(str(pizza[0][4]))
telaAtualizarProdutos.valor_atualizar.setText(str(pizza[0][3]))
if telaAtualizarProdutos.seis_atualizar.isChecked():
cursor.execute('select * from seisPedacos where id = %s' % id)
pizza = cursor.fetchall()
telaAtualizarProdutos.produto_atualizar.setText(str(pizza[0][1]))
telaAtualizarProdutos.ingredientes_atualizar.setText(str(pizza[0][4]))
telaAtualizarProdutos.valor_atualizar.setText(str(pizza[0][3]))
if telaAtualizarProdutos.oito_atualizar.isChecked():
cursor.execute('select * from oitoPedacos where id = %s' % id)
pizza = cursor.fetchall()
telaAtualizarProdutos.produto_atualizar.setText(str(pizza[0][1]))
telaAtualizarProdutos.ingredientes_atualizar.setText(str(pizza[0][4]))
telaAtualizarProdutos.valor_atualizar.setText(str(pizza[0][3]))
if telaAtualizarProdutos.dez_atualizar.isChecked():
cursor.execute('select * from dezPedacos where id = %s' % id)
pizza = cursor.fetchall()
telaAtualizarProdutos.produto_atualizar.setText(str(pizza[0][1]))
telaAtualizarProdutos.ingredientes_atualizar.setText(str(pizza[0][4]))
telaAtualizarProdutos.valor_atualizar.setText(str(pizza[0][3]))
if telaAtualizarProdutos.esfiha_atualizar.isChecked():
cursor.execute('select * from esfihas where id = %s' % id)
pizza = cursor.fetchall()
telaAtualizarProdutos.produto_atualizar.setText(str(pizza[0][1]))
telaAtualizarProdutos.ingredientes_atualizar.setText(str(pizza[0][4]))
telaAtualizarProdutos.valor_atualizar.setText(str(pizza[0][3]))
except:
telaErro.show()
telaErro.label.setText(' Erro, tente novamente!') |
class PetrolPump(object):
def __init__(self, petrol, distance):
self.petrol = petrol
self.distance = distance
self.nextPP = None
class CyclicLinkedList(object):
def __init__(self):
self.list = []
def add(self, petrol, distance):
newPP = PetrolPump(petrol, distance)
if self.list:
lastPP = self.list[-1]
lastPP.nextPP = newPP
self.list.append(newPP)
def cyclise(self):
lastPP = self.list[-1]
firstPP = self.list[0]
lastPP.nextPP = firstPP
n = int(input().strip())
C = CyclicLinkedList()
for i in range(n):
p, d = map(int, input().strip().split(' '))
C.add(p, d)
C.cyclise()
i = 0
while i<n:
PP = C.list[i]
petrol, distanceToCover = PP.petrol, PP.distance
nxPP = PP.nextPP
completed = False
x = i
while distanceToCover<=petrol:
petrol -= distanceToCover
if nxPP == PP:
completed = True
break
petrol += nxPP.petrol
distanceToCover = nxPP.distance
nxPP = nxPP.nextPP
x += 1
if not completed:#if start at any PPs b/w i to x+1 we wouldn't complete the circle
i = x+1
if completed:
break
print(i)
| class Petrolpump(object):
def __init__(self, petrol, distance):
self.petrol = petrol
self.distance = distance
self.nextPP = None
class Cycliclinkedlist(object):
def __init__(self):
self.list = []
def add(self, petrol, distance):
new_pp = petrol_pump(petrol, distance)
if self.list:
last_pp = self.list[-1]
lastPP.nextPP = newPP
self.list.append(newPP)
def cyclise(self):
last_pp = self.list[-1]
first_pp = self.list[0]
lastPP.nextPP = firstPP
n = int(input().strip())
c = cyclic_linked_list()
for i in range(n):
(p, d) = map(int, input().strip().split(' '))
C.add(p, d)
C.cyclise()
i = 0
while i < n:
pp = C.list[i]
(petrol, distance_to_cover) = (PP.petrol, PP.distance)
nx_pp = PP.nextPP
completed = False
x = i
while distanceToCover <= petrol:
petrol -= distanceToCover
if nxPP == PP:
completed = True
break
petrol += nxPP.petrol
distance_to_cover = nxPP.distance
nx_pp = nxPP.nextPP
x += 1
if not completed:
i = x + 1
if completed:
break
print(i) |
def greet(name):
print(f'Hello, {name}!')
def test_prints(capsys):
# call the function
greet('Escape School 2021')
# test that it wrote what we expect to stdout
captured = capsys.readouterr()
# .err would be the stderr output
assert captured.out == 'Hello, Escape School 2021!\n'
| def greet(name):
print(f'Hello, {name}!')
def test_prints(capsys):
greet('Escape School 2021')
captured = capsys.readouterr()
assert captured.out == 'Hello, Escape School 2021!\n' |
major = "0"
minor = "0"
patch = "0"
release = "dev0"
if release != "":
__version__ = f"{major}.{minor}.{patch}.{release}"
else:
__version__ = f"{major}.{minor}.{patch}"
| major = '0'
minor = '0'
patch = '0'
release = 'dev0'
if release != '':
__version__ = f'{major}.{minor}.{patch}.{release}'
else:
__version__ = f'{major}.{minor}.{patch}' |
def test_features(api, wiki):
assert len(api.features) == 9
assert len(api.features['GB021'].domain) == 2
f = api.features['GB021']
assert f.description
assert f.name
assert f.patrons
assert f.id
assert 'Documentation' in api.features['GB020'].description
def test_bib(api):
assert len(api.bib) == 6
def test_sheets(api):
assert len(list(api.iter_sheets())) == 2
| def test_features(api, wiki):
assert len(api.features) == 9
assert len(api.features['GB021'].domain) == 2
f = api.features['GB021']
assert f.description
assert f.name
assert f.patrons
assert f.id
assert 'Documentation' in api.features['GB020'].description
def test_bib(api):
assert len(api.bib) == 6
def test_sheets(api):
assert len(list(api.iter_sheets())) == 2 |
'''
Description:
Your task is to construct a building which will be a pile of n cubes.
The cube at the bottom will have a volume of n^3,
the cube above will have volume of (n-1)^3 and so on until the top which will have a volume of 1^3.
You are given the total volume m of the building.
Being given m can you find the number n of cubes you will have to build?
The parameter of the function findNb (find_nb, find-nb, findNb) will be an integer m
and you have to return the integer n such as n^3 + (n-1)^3 + ... + 1^3 = m if such a n exists
or -1 if there is no such n.
Examples:
findNb(1071225) --> 45
findNb(91716553919377) --> -1
mov rdi, 1071225
call find_nb ; rax <-- 45
mov rdi, 91716553919377
call find_nb ; rax <-- -1
''' | """
Description:
Your task is to construct a building which will be a pile of n cubes.
The cube at the bottom will have a volume of n^3,
the cube above will have volume of (n-1)^3 and so on until the top which will have a volume of 1^3.
You are given the total volume m of the building.
Being given m can you find the number n of cubes you will have to build?
The parameter of the function findNb (find_nb, find-nb, findNb) will be an integer m
and you have to return the integer n such as n^3 + (n-1)^3 + ... + 1^3 = m if such a n exists
or -1 if there is no such n.
Examples:
findNb(1071225) --> 45
findNb(91716553919377) --> -1
mov rdi, 1071225
call find_nb ; rax <-- 45
mov rdi, 91716553919377
call find_nb ; rax <-- -1
""" |
class TaskStates(object):
ENQUEUED = 'enqueued'
SUCCEEDED = 'succeeded'
FAILED = 'failed'
DELETED = 'deleted'
CHOICES = (
(ENQUEUED, 'Enqueued'),
(SUCCEEDED, 'Succeeded'),
(FAILED, 'Failed'),
(DELETED, 'Deleted'),
)
class QueueType(object):
SNS = 'sns'
CELERY = 'celery'
CHOICES = (
(SNS, 'SNS'),
(CELERY, 'Celery'),
)
MAX_ATTEMPTS_TO_PROCESS_TASKS = 3
DEFAULT_DAYS_TO_KEEP_OLD_TASKS = 30
| class Taskstates(object):
enqueued = 'enqueued'
succeeded = 'succeeded'
failed = 'failed'
deleted = 'deleted'
choices = ((ENQUEUED, 'Enqueued'), (SUCCEEDED, 'Succeeded'), (FAILED, 'Failed'), (DELETED, 'Deleted'))
class Queuetype(object):
sns = 'sns'
celery = 'celery'
choices = ((SNS, 'SNS'), (CELERY, 'Celery'))
max_attempts_to_process_tasks = 3
default_days_to_keep_old_tasks = 30 |
names = ['H','E','L','L','O']
message = f"hello {names[0]}"
print(message)
message = f"hello {names[1]}"
print(message)
message = f"hello {names[2]}"
print(message)
message = f"hello {names[3]}"
print(message)
message = f"hello {names[4]}"
print(message) | names = ['H', 'E', 'L', 'L', 'O']
message = f'hello {names[0]}'
print(message)
message = f'hello {names[1]}'
print(message)
message = f'hello {names[2]}'
print(message)
message = f'hello {names[3]}'
print(message)
message = f'hello {names[4]}'
print(message) |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
class State(object):
def __init__(self):
self.states = ['search_enemy_distance', 'get_time_left', 'get_enemy_pose','get_nearest_target',
'search_near_target','get_highest_target','go_to_target','escape']
self.transitions = [
{'trigger': 'enemy_far', 'source': 'search_enemy_distance', 'dest':'get_time_left'},
{'trigger': 'enemy_near', 'source': 'search_enemy_distance', 'dest':'get_enemy_pose'},
{'trigger': 'cannot_see_or_face', 'source': 'get_enemy_pose', 'dest':'get_time_left'},
{'trigger': 'can_see_and_face', 'source': 'get_enemy_pose', 'dest':'escape'},
{'trigger': 'time_over', 'source': 'get_time_left', 'dest':'get_nearest_target'},
{'trigger': 'in_time', 'source': 'get_time_left', 'dest':'search_near_target'},
{'trigger': 'near_target_exists', 'source': 'search_near_target', 'dest':'get_nearest_target'},
{'trigger': 'near_target_absent', 'source': 'search_near_target', 'dest':'get_highest_target'},
{'trigger': 'send_target', 'source': 'get_nearest_target', 'dest':'go_to_target'},
{'trigger': 'send_target', 'source': 'get_highest_target', 'dest':'go_to_target'},
{'trigger': 'cycle', 'source': 'go_to_target', 'dest':'search_enemy_distance'},
{'trigger': 'cycle', 'source': 'escape', 'dest':'search_enemy_distance'}
] | class State(object):
def __init__(self):
self.states = ['search_enemy_distance', 'get_time_left', 'get_enemy_pose', 'get_nearest_target', 'search_near_target', 'get_highest_target', 'go_to_target', 'escape']
self.transitions = [{'trigger': 'enemy_far', 'source': 'search_enemy_distance', 'dest': 'get_time_left'}, {'trigger': 'enemy_near', 'source': 'search_enemy_distance', 'dest': 'get_enemy_pose'}, {'trigger': 'cannot_see_or_face', 'source': 'get_enemy_pose', 'dest': 'get_time_left'}, {'trigger': 'can_see_and_face', 'source': 'get_enemy_pose', 'dest': 'escape'}, {'trigger': 'time_over', 'source': 'get_time_left', 'dest': 'get_nearest_target'}, {'trigger': 'in_time', 'source': 'get_time_left', 'dest': 'search_near_target'}, {'trigger': 'near_target_exists', 'source': 'search_near_target', 'dest': 'get_nearest_target'}, {'trigger': 'near_target_absent', 'source': 'search_near_target', 'dest': 'get_highest_target'}, {'trigger': 'send_target', 'source': 'get_nearest_target', 'dest': 'go_to_target'}, {'trigger': 'send_target', 'source': 'get_highest_target', 'dest': 'go_to_target'}, {'trigger': 'cycle', 'source': 'go_to_target', 'dest': 'search_enemy_distance'}, {'trigger': 'cycle', 'source': 'escape', 'dest': 'search_enemy_distance'}] |
class Solution:
# O(n) time | O(n) space
def floodFill(self, image: List[List[int]], sr: int, sc: int, newColor: int) -> List[List[int]]:
originalColor = image[sr][sc]
if originalColor == newColor:
return image
self.dfs(image, sr, sc, originalColor, newColor)
return image
def dfs(self, image, i, j, originalColor, newColor):
if image[i][j] != originalColor:
return
image[i][j] = newColor
for x, y in [(1, 0), (-1, 0), (0, 1), (0, -1)]:
row, col = i + x, j + y
if 0 <= row < len(image) and 0 <= col < len(image[0]):
self.dfs(image, row, col, originalColor, newColor) | class Solution:
def flood_fill(self, image: List[List[int]], sr: int, sc: int, newColor: int) -> List[List[int]]:
original_color = image[sr][sc]
if originalColor == newColor:
return image
self.dfs(image, sr, sc, originalColor, newColor)
return image
def dfs(self, image, i, j, originalColor, newColor):
if image[i][j] != originalColor:
return
image[i][j] = newColor
for (x, y) in [(1, 0), (-1, 0), (0, 1), (0, -1)]:
(row, col) = (i + x, j + y)
if 0 <= row < len(image) and 0 <= col < len(image[0]):
self.dfs(image, row, col, originalColor, newColor) |
ctx.addWire(name="BEL_A0", type="WIRE", x=0, y=0)
ctx.addWire(name="BEL_A1", type="WIRE", x=0, y=0)
ctx.addWire(name="BEL_Q", type="WIRE", x=0, y=0)
ctx.addPip(name="Q->A0", type="PIP", srcWire="BEL_Q", dstWire="BEL_A0", delay=ctx.getDelayFromNS(0.05), loc=Loc(0, 0, 0))
ctx.addPip(name="Q->A1", type="PIP", srcWire="BEL_Q", dstWire="BEL_A1", delay=ctx.getDelayFromNS(0.05), loc=Loc(0, 0, 0))
ctx.addBel(name="BEL", type="TEST_BEL", loc=Loc(0, 0, 0), gb=False, hidden=False)
ctx.addBelInput(bel="BEL", name="A0", wire="BEL_A0")
ctx.addBelInput(bel="BEL", name="A1", wire="BEL_A1")
ctx.addBelOutput(bel="BEL", name="Q", wire="BEL_Q")
ctx.clearCellBelPinMap(cell="cell_i", cell_pin="A")
ctx.addCellBelPinMapping(cell="cell_i", cell_pin="A", bel_pin="A0")
ctx.addCellBelPinMapping(cell="cell_i", cell_pin="A", bel_pin="A1")
| ctx.addWire(name='BEL_A0', type='WIRE', x=0, y=0)
ctx.addWire(name='BEL_A1', type='WIRE', x=0, y=0)
ctx.addWire(name='BEL_Q', type='WIRE', x=0, y=0)
ctx.addPip(name='Q->A0', type='PIP', srcWire='BEL_Q', dstWire='BEL_A0', delay=ctx.getDelayFromNS(0.05), loc=loc(0, 0, 0))
ctx.addPip(name='Q->A1', type='PIP', srcWire='BEL_Q', dstWire='BEL_A1', delay=ctx.getDelayFromNS(0.05), loc=loc(0, 0, 0))
ctx.addBel(name='BEL', type='TEST_BEL', loc=loc(0, 0, 0), gb=False, hidden=False)
ctx.addBelInput(bel='BEL', name='A0', wire='BEL_A0')
ctx.addBelInput(bel='BEL', name='A1', wire='BEL_A1')
ctx.addBelOutput(bel='BEL', name='Q', wire='BEL_Q')
ctx.clearCellBelPinMap(cell='cell_i', cell_pin='A')
ctx.addCellBelPinMapping(cell='cell_i', cell_pin='A', bel_pin='A0')
ctx.addCellBelPinMapping(cell='cell_i', cell_pin='A', bel_pin='A1') |
def main():
for x in range(4):
if x == 5:
break
else:
print("Well of course that didn't happen")
for x in range(7):
if x == 5:
break
else:
print("H-hey wait!")
i = 0
while i < 3:
print("Works with while too")
for x in range(3):
print("BTW don't worry about nested breaks")
break
if i == 10:
break
i += 1
else:
print("Yeah not likely")
print(i)
if __name__ == '__main__':
main()
| def main():
for x in range(4):
if x == 5:
break
else:
print("Well of course that didn't happen")
for x in range(7):
if x == 5:
break
else:
print('H-hey wait!')
i = 0
while i < 3:
print('Works with while too')
for x in range(3):
print("BTW don't worry about nested breaks")
break
if i == 10:
break
i += 1
else:
print('Yeah not likely')
print(i)
if __name__ == '__main__':
main() |
# -*- coding: utf-8 -*-
name = 'ic_shared'
version = '1.1.9'
description = 'Icarus Shared Libraries'
authors = ['mjbonnington']
requires = [
'python-2.7+',
'plyer',
]
build_requires = [
'rezlib',
]
build_command = 'python -m build {install}'
def commands():
env.PYTHONPATH.append('{root}')
| name = 'ic_shared'
version = '1.1.9'
description = 'Icarus Shared Libraries'
authors = ['mjbonnington']
requires = ['python-2.7+', 'plyer']
build_requires = ['rezlib']
build_command = 'python -m build {install}'
def commands():
env.PYTHONPATH.append('{root}') |
m=int(input())
ms=set(map(int,input().split()))
n=int(input())
ns=set(map(int,input().split()))
mns=sorted((ms.difference(ns)).union((ns.difference(ms))))
print(*mns,sep='\n') | m = int(input())
ms = set(map(int, input().split()))
n = int(input())
ns = set(map(int, input().split()))
mns = sorted(ms.difference(ns).union(ns.difference(ms)))
print(*mns, sep='\n') |
def save_queens(board, col, size):
if col >= size:
return True
for i in range(size):
if is_safe(board, i, col, size):
board[i][col] = 1
if save_queens(board, col+1,size):
return True
#backtrack
board[i][col] = 0
return False
def is_safe(board, row, col, size):
# No queen horizontally..row is same
for i in range(col):
if board[row][i] == 1:
return False
#upper half
for i, j in zip(range(row, -1, -1), range(col, -1, -1)):
if board[i][j] == 1:
return False
#lower half
for i, j in zip(range(row, size, 1), range(col, -1, -1)):
if board[i][j] == 1:
return False
return True
board = [[0, 0, 0, 0, 0],
[0, 0, 0, 0, 0],
[0, 0, 0, 0, 0],
[0, 0, 0, 0, 0],
[0, 0, 0, 0, 0]
]
| def save_queens(board, col, size):
if col >= size:
return True
for i in range(size):
if is_safe(board, i, col, size):
board[i][col] = 1
if save_queens(board, col + 1, size):
return True
board[i][col] = 0
return False
def is_safe(board, row, col, size):
for i in range(col):
if board[row][i] == 1:
return False
for (i, j) in zip(range(row, -1, -1), range(col, -1, -1)):
if board[i][j] == 1:
return False
for (i, j) in zip(range(row, size, 1), range(col, -1, -1)):
if board[i][j] == 1:
return False
return True
board = [[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]] |
class Solution:
def minPartitions(self, n: str) -> int:
'''
32 = 11
22 = 11
11 =
82734 = 11111
71623 = 11111
60512 = 10111
50401 = 10101
40300 = 10100
30200 = 10100
20100 = 10100
10000 = 10000
'''
# count = 0
# m = int(n)
# while int(n) > 0:
# b = ""
# for digit in n:
# if digit != "0":
# b += "1"
# else:
# b += "0"
# count += 1
# if count == 9:
# return count
# m -= int(b)
# n = str(m)
# return count
count = 0
for digit in n:
count = max(int(digit), count)
if count == 9:
return count
return count
| class Solution:
def min_partitions(self, n: str) -> int:
"""
32 = 11
22 = 11
11 =
82734 = 11111
71623 = 11111
60512 = 10111
50401 = 10101
40300 = 10100
30200 = 10100
20100 = 10100
10000 = 10000
"""
count = 0
for digit in n:
count = max(int(digit), count)
if count == 9:
return count
return count |
def BF_iszscored(x):
numericThreshold = 2.2204E-16
iszscored = ((np.absolute(np.mean(x)) < numericThreshold) & (np.absolute(np.std(x)-1) < numericThreshold))
return(iszscored)
| def bf_iszscored(x):
numeric_threshold = 2.2204e-16
iszscored = (np.absolute(np.mean(x)) < numericThreshold) & (np.absolute(np.std(x) - 1) < numericThreshold)
return iszscored |
# terrascript/resource/poseidon/ct.py
# Automatically generated by tools/makecode.py (24-Sep-2021 15:14:51 UTC)
__all__ = []
| __all__ = [] |
def getResNet50Init():
string = '\
layer {\n\
bottom: "image"\n\
top: "conv1"\n\
name: "conv1"\n\
type: "Convolution"\n\
convolution_param {\n\
num_output: 64\n\
kernel_size: 7\n\
pad: 3\n\
stride: 2\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "conv1"\n\
top: "conv1"\n\
name: "bn_conv1"\n\
type: "BatchNorm"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "conv1"\n\
top: "conv1"\n\
name: "scale_conv1"\n\
type: "Scale"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "conv1"\n\
top: "conv1"\n\
name: "conv1_relu"\n\
type: "ReLU"\n\
}\n\
\n\
layer {\n\
bottom: "conv1"\n\
top: "pool1"\n\
name: "pool1"\n\
type: "Pooling"\n\
pooling_param {\n\
kernel_size: 3\n\
stride: 2\n\
pool: MAX\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "pool1"\n\
top: "res2a_branch1"\n\
name: "res2a_branch1"\n\
type: "Convolution"\n\
convolution_param {\n\
num_output: 256\n\
kernel_size: 1\n\
pad: 0\n\
stride: 1\n\
bias_term: false\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res2a_branch1"\n\
top: "res2a_branch1"\n\
name: "bn2a_branch1"\n\
type: "BatchNorm"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res2a_branch1"\n\
top: "res2a_branch1"\n\
name: "scale2a_branch1"\n\
type: "Scale"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "pool1"\n\
top: "res2a_branch2a"\n\
name: "res2a_branch2a"\n\
type: "Convolution"\n\
convolution_param {\n\
num_output: 64\n\
kernel_size: 1\n\
pad: 0\n\
stride: 1\n\
bias_term: false\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res2a_branch2a"\n\
top: "res2a_branch2a"\n\
name: "bn2a_branch2a"\n\
type: "BatchNorm"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res2a_branch2a"\n\
top: "res2a_branch2a"\n\
name: "scale2a_branch2a"\n\
type: "Scale"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res2a_branch2a"\n\
top: "res2a_branch2a"\n\
name: "res2a_branch2a_relu"\n\
type: "ReLU"\n\
}\n\
\n\
layer {\n\
bottom: "res2a_branch2a"\n\
top: "res2a_branch2b"\n\
name: "res2a_branch2b"\n\
type: "Convolution"\n\
convolution_param {\n\
num_output: 64\n\
kernel_size: 3\n\
pad: 1\n\
stride: 1\n\
bias_term: false\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res2a_branch2b"\n\
top: "res2a_branch2b"\n\
name: "bn2a_branch2b"\n\
type: "BatchNorm"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res2a_branch2b"\n\
top: "res2a_branch2b"\n\
name: "scale2a_branch2b"\n\
type: "Scale"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res2a_branch2b"\n\
top: "res2a_branch2b"\n\
name: "res2a_branch2b_relu"\n\
type: "ReLU"\n\
}\n\
\n\
layer {\n\
bottom: "res2a_branch2b"\n\
top: "res2a_branch2c"\n\
name: "res2a_branch2c"\n\
type: "Convolution"\n\
convolution_param {\n\
num_output: 256\n\
kernel_size: 1\n\
pad: 0\n\
stride: 1\n\
bias_term: false\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res2a_branch2c"\n\
top: "res2a_branch2c"\n\
name: "bn2a_branch2c"\n\
type: "BatchNorm"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res2a_branch2c"\n\
top: "res2a_branch2c"\n\
name: "scale2a_branch2c"\n\
type: "Scale"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res2a_branch1"\n\
bottom: "res2a_branch2c"\n\
top: "res2a"\n\
name: "res2a"\n\
type: "Eltwise"\n\
}\n\
\n\
layer {\n\
bottom: "res2a"\n\
top: "res2a"\n\
name: "res2a_relu"\n\
type: "ReLU"\n\
}\n\
\n\
layer {\n\
bottom: "res2a"\n\
top: "res2b_branch2a"\n\
name: "res2b_branch2a"\n\
type: "Convolution"\n\
convolution_param {\n\
num_output: 64\n\
kernel_size: 1\n\
pad: 0\n\
stride: 1\n\
bias_term: false\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res2b_branch2a"\n\
top: "res2b_branch2a"\n\
name: "bn2b_branch2a"\n\
type: "BatchNorm"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res2b_branch2a"\n\
top: "res2b_branch2a"\n\
name: "scale2b_branch2a"\n\
type: "Scale"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res2b_branch2a"\n\
top: "res2b_branch2a"\n\
name: "res2b_branch2a_relu"\n\
type: "ReLU"\n\
}\n\
\n\
layer {\n\
bottom: "res2b_branch2a"\n\
top: "res2b_branch2b"\n\
name: "res2b_branch2b"\n\
type: "Convolution"\n\
convolution_param {\n\
num_output: 64\n\
kernel_size: 3\n\
pad: 1\n\
stride: 1\n\
bias_term: false\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res2b_branch2b"\n\
top: "res2b_branch2b"\n\
name: "bn2b_branch2b"\n\
type: "BatchNorm"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res2b_branch2b"\n\
top: "res2b_branch2b"\n\
name: "scale2b_branch2b"\n\
type: "Scale"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res2b_branch2b"\n\
top: "res2b_branch2b"\n\
name: "res2b_branch2b_relu"\n\
type: "ReLU"\n\
}\n\
\n\
layer {\n\
bottom: "res2b_branch2b"\n\
top: "res2b_branch2c"\n\
name: "res2b_branch2c"\n\
type: "Convolution"\n\
convolution_param {\n\
num_output: 256\n\
kernel_size: 1\n\
pad: 0\n\
stride: 1\n\
bias_term: false\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res2b_branch2c"\n\
top: "res2b_branch2c"\n\
name: "bn2b_branch2c"\n\
type: "BatchNorm"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res2b_branch2c"\n\
top: "res2b_branch2c"\n\
name: "scale2b_branch2c"\n\
type: "Scale"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res2a"\n\
bottom: "res2b_branch2c"\n\
top: "res2b"\n\
name: "res2b"\n\
type: "Eltwise"\n\
}\n\
\n\
layer {\n\
bottom: "res2b"\n\
top: "res2b"\n\
name: "res2b_relu"\n\
type: "ReLU"\n\
}\n\
\n\
layer {\n\
bottom: "res2b"\n\
top: "res2c_branch2a"\n\
name: "res2c_branch2a"\n\
type: "Convolution"\n\
convolution_param {\n\
num_output: 64\n\
kernel_size: 1\n\
pad: 0\n\
stride: 1\n\
bias_term: false\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res2c_branch2a"\n\
top: "res2c_branch2a"\n\
name: "bn2c_branch2a"\n\
type: "BatchNorm"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res2c_branch2a"\n\
top: "res2c_branch2a"\n\
name: "scale2c_branch2a"\n\
type: "Scale"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res2c_branch2a"\n\
top: "res2c_branch2a"\n\
name: "res2c_branch2a_relu"\n\
type: "ReLU"\n\
}\n\
\n\
layer {\n\
bottom: "res2c_branch2a"\n\
top: "res2c_branch2b"\n\
name: "res2c_branch2b"\n\
type: "Convolution"\n\
convolution_param {\n\
num_output: 64\n\
kernel_size: 3\n\
pad: 1\n\
stride: 1\n\
bias_term: false\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res2c_branch2b"\n\
top: "res2c_branch2b"\n\
name: "bn2c_branch2b"\n\
type: "BatchNorm"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res2c_branch2b"\n\
top: "res2c_branch2b"\n\
name: "scale2c_branch2b"\n\
type: "Scale"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res2c_branch2b"\n\
top: "res2c_branch2b"\n\
name: "res2c_branch2b_relu"\n\
type: "ReLU"\n\
}\n\
\n\
layer {\n\
bottom: "res2c_branch2b"\n\
top: "res2c_branch2c"\n\
name: "res2c_branch2c"\n\
type: "Convolution"\n\
convolution_param {\n\
num_output: 256\n\
kernel_size: 1\n\
pad: 0\n\
stride: 1\n\
bias_term: false\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res2c_branch2c"\n\
top: "res2c_branch2c"\n\
name: "bn2c_branch2c"\n\
type: "BatchNorm"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res2c_branch2c"\n\
top: "res2c_branch2c"\n\
name: "scale2c_branch2c"\n\
type: "Scale"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res2b"\n\
bottom: "res2c_branch2c"\n\
top: "res2c"\n\
name: "res2c"\n\
type: "Eltwise"\n\
}\n\
\n\
layer {\n\
bottom: "res2c"\n\
top: "res2c"\n\
name: "res2c_relu"\n\
type: "ReLU"\n\
}\n\
\n\
layer {\n\
bottom: "res2c"\n\
top: "res3a_branch1"\n\
name: "res3a_branch1"\n\
type: "Convolution"\n\
convolution_param {\n\
num_output: 512\n\
kernel_size: 1\n\
pad: 0\n\
stride: 2\n\
bias_term: false\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res3a_branch1"\n\
top: "res3a_branch1"\n\
name: "bn3a_branch1"\n\
type: "BatchNorm"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res3a_branch1"\n\
top: "res3a_branch1"\n\
name: "scale3a_branch1"\n\
type: "Scale"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res2c"\n\
top: "res3a_branch2a"\n\
name: "res3a_branch2a"\n\
type: "Convolution"\n\
convolution_param {\n\
num_output: 128\n\
kernel_size: 1\n\
pad: 0\n\
stride: 2\n\
bias_term: false\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res3a_branch2a"\n\
top: "res3a_branch2a"\n\
name: "bn3a_branch2a"\n\
type: "BatchNorm"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res3a_branch2a"\n\
top: "res3a_branch2a"\n\
name: "scale3a_branch2a"\n\
type: "Scale"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res3a_branch2a"\n\
top: "res3a_branch2a"\n\
name: "res3a_branch2a_relu"\n\
type: "ReLU"\n\
}\n\
\n\
layer {\n\
bottom: "res3a_branch2a"\n\
top: "res3a_branch2b"\n\
name: "res3a_branch2b"\n\
type: "Convolution"\n\
convolution_param {\n\
num_output: 128\n\
kernel_size: 3\n\
pad: 1\n\
stride: 1\n\
bias_term: false\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res3a_branch2b"\n\
top: "res3a_branch2b"\n\
name: "bn3a_branch2b"\n\
type: "BatchNorm"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res3a_branch2b"\n\
top: "res3a_branch2b"\n\
name: "scale3a_branch2b"\n\
type: "Scale"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res3a_branch2b"\n\
top: "res3a_branch2b"\n\
name: "res3a_branch2b_relu"\n\
type: "ReLU"\n\
}\n\
\n\
layer {\n\
bottom: "res3a_branch2b"\n\
top: "res3a_branch2c"\n\
name: "res3a_branch2c"\n\
type: "Convolution"\n\
convolution_param {\n\
num_output: 512\n\
kernel_size: 1\n\
pad: 0\n\
stride: 1\n\
bias_term: false\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res3a_branch2c"\n\
top: "res3a_branch2c"\n\
name: "bn3a_branch2c"\n\
type: "BatchNorm"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res3a_branch2c"\n\
top: "res3a_branch2c"\n\
name: "scale3a_branch2c"\n\
type: "Scale"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res3a_branch1"\n\
bottom: "res3a_branch2c"\n\
top: "res3a"\n\
name: "res3a"\n\
type: "Eltwise"\n\
}\n\
\n\
layer {\n\
bottom: "res3a"\n\
top: "res3a"\n\
name: "res3a_relu"\n\
type: "ReLU"\n\
}\n\
\n\
layer {\n\
bottom: "res3a"\n\
top: "res3b_branch2a"\n\
name: "res3b_branch2a"\n\
type: "Convolution"\n\
convolution_param {\n\
num_output: 128\n\
kernel_size: 1\n\
pad: 0\n\
stride: 1\n\
bias_term: false\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res3b_branch2a"\n\
top: "res3b_branch2a"\n\
name: "bn3b_branch2a"\n\
type: "BatchNorm"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res3b_branch2a"\n\
top: "res3b_branch2a"\n\
name: "scale3b_branch2a"\n\
type: "Scale"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res3b_branch2a"\n\
top: "res3b_branch2a"\n\
name: "res3b_branch2a_relu"\n\
type: "ReLU"\n\
}\n\
\n\
layer {\n\
bottom: "res3b_branch2a"\n\
top: "res3b_branch2b"\n\
name: "res3b_branch2b"\n\
type: "Convolution"\n\
convolution_param {\n\
num_output: 128\n\
kernel_size: 3\n\
pad: 1\n\
stride: 1\n\
bias_term: false\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res3b_branch2b"\n\
top: "res3b_branch2b"\n\
name: "bn3b_branch2b"\n\
type: "BatchNorm"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res3b_branch2b"\n\
top: "res3b_branch2b"\n\
name: "scale3b_branch2b"\n\
type: "Scale"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res3b_branch2b"\n\
top: "res3b_branch2b"\n\
name: "res3b_branch2b_relu"\n\
type: "ReLU"\n\
}\n\
\n\
layer {\n\
bottom: "res3b_branch2b"\n\
top: "res3b_branch2c"\n\
name: "res3b_branch2c"\n\
type: "Convolution"\n\
convolution_param {\n\
num_output: 512\n\
kernel_size: 1\n\
pad: 0\n\
stride: 1\n\
bias_term: false\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res3b_branch2c"\n\
top: "res3b_branch2c"\n\
name: "bn3b_branch2c"\n\
type: "BatchNorm"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res3b_branch2c"\n\
top: "res3b_branch2c"\n\
name: "scale3b_branch2c"\n\
type: "Scale"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res3a"\n\
bottom: "res3b_branch2c"\n\
top: "res3b"\n\
name: "res3b"\n\
type: "Eltwise"\n\
}\n\
\n\
layer {\n\
bottom: "res3b"\n\
top: "res3b"\n\
name: "res3b_relu"\n\
type: "ReLU"\n\
}\n\
\n\
layer {\n\
bottom: "res3b"\n\
top: "res3c_branch2a"\n\
name: "res3c_branch2a"\n\
type: "Convolution"\n\
convolution_param {\n\
num_output: 128\n\
kernel_size: 1\n\
pad: 0\n\
stride: 1\n\
bias_term: false\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res3c_branch2a"\n\
top: "res3c_branch2a"\n\
name: "bn3c_branch2a"\n\
type: "BatchNorm"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res3c_branch2a"\n\
top: "res3c_branch2a"\n\
name: "scale3c_branch2a"\n\
type: "Scale"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res3c_branch2a"\n\
top: "res3c_branch2a"\n\
name: "res3c_branch2a_relu"\n\
type: "ReLU"\n\
}\n\
\n\
layer {\n\
bottom: "res3c_branch2a"\n\
top: "res3c_branch2b"\n\
name: "res3c_branch2b"\n\
type: "Convolution"\n\
convolution_param {\n\
num_output: 128\n\
kernel_size: 3\n\
pad: 1\n\
stride: 1\n\
bias_term: false\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res3c_branch2b"\n\
top: "res3c_branch2b"\n\
name: "bn3c_branch2b"\n\
type: "BatchNorm"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res3c_branch2b"\n\
top: "res3c_branch2b"\n\
name: "scale3c_branch2b"\n\
type: "Scale"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res3c_branch2b"\n\
top: "res3c_branch2b"\n\
name: "res3c_branch2b_relu"\n\
type: "ReLU"\n\
}\n\
\n\
layer {\n\
bottom: "res3c_branch2b"\n\
top: "res3c_branch2c"\n\
name: "res3c_branch2c"\n\
type: "Convolution"\n\
convolution_param {\n\
num_output: 512\n\
kernel_size: 1\n\
pad: 0\n\
stride: 1\n\
bias_term: false\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res3c_branch2c"\n\
top: "res3c_branch2c"\n\
name: "bn3c_branch2c"\n\
type: "BatchNorm"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res3c_branch2c"\n\
top: "res3c_branch2c"\n\
name: "scale3c_branch2c"\n\
type: "Scale"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res3b"\n\
bottom: "res3c_branch2c"\n\
top: "res3c"\n\
name: "res3c"\n\
type: "Eltwise"\n\
}\n\
\n\
layer {\n\
bottom: "res3c"\n\
top: "res3c"\n\
name: "res3c_relu"\n\
type: "ReLU"\n\
}\n\
\n\
layer {\n\
bottom: "res3c"\n\
top: "res3d_branch2a"\n\
name: "res3d_branch2a"\n\
type: "Convolution"\n\
convolution_param {\n\
num_output: 128\n\
kernel_size: 1\n\
pad: 0\n\
stride: 1\n\
bias_term: false\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res3d_branch2a"\n\
top: "res3d_branch2a"\n\
name: "bn3d_branch2a"\n\
type: "BatchNorm"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res3d_branch2a"\n\
top: "res3d_branch2a"\n\
name: "scale3d_branch2a"\n\
type: "Scale"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res3d_branch2a"\n\
top: "res3d_branch2a"\n\
name: "res3d_branch2a_relu"\n\
type: "ReLU"\n\
}\n\
\n\
layer {\n\
bottom: "res3d_branch2a"\n\
top: "res3d_branch2b"\n\
name: "res3d_branch2b"\n\
type: "Convolution"\n\
convolution_param {\n\
num_output: 128\n\
kernel_size: 3\n\
pad: 1\n\
stride: 1\n\
bias_term: false\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res3d_branch2b"\n\
top: "res3d_branch2b"\n\
name: "bn3d_branch2b"\n\
type: "BatchNorm"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res3d_branch2b"\n\
top: "res3d_branch2b"\n\
name: "scale3d_branch2b"\n\
type: "Scale"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res3d_branch2b"\n\
top: "res3d_branch2b"\n\
name: "res3d_branch2b_relu"\n\
type: "ReLU"\n\
}\n\
\n\
layer {\n\
bottom: "res3d_branch2b"\n\
top: "res3d_branch2c"\n\
name: "res3d_branch2c"\n\
type: "Convolution"\n\
convolution_param {\n\
num_output: 512\n\
kernel_size: 1\n\
pad: 0\n\
stride: 1\n\
bias_term: false\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res3d_branch2c"\n\
top: "res3d_branch2c"\n\
name: "bn3d_branch2c"\n\
type: "BatchNorm"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res3d_branch2c"\n\
top: "res3d_branch2c"\n\
name: "scale3d_branch2c"\n\
type: "Scale"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
\n\
layer {\n\
bottom: "res3c"\n\
bottom: "res3d_branch2c"\n\
top: "res3d"\n\
name: "res3d"\n\
type: "Eltwise"\n\
}\n\
\n\
layer {\n\
bottom: "res3d"\n\
top: "res3d"\n\
name: "res3d_relu"\n\
type: "ReLU"\n\
}\n'
return string
def getResNet152Init():
string = '\
layer {\n\
bottom: "image"\n\
top: "conv1"\n\
name: "conv1"\n\
type: "Convolution"\n\
convolution_param {\n\
num_output: 64\n\
kernel_size: 7\n\
pad: 3\n\
stride: 2\n\
bias_term: false\n\
}\n\
}\n\
layer {\n\
bottom: "conv1"\n\
top: "conv1"\n\
name: "bn_conv1"\n\
type: "BatchNorm"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
bottom: "conv1"\n\
top: "conv1"\n\
name: "scale_conv1"\n\
type: "Scale"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
top: "conv1"\n\
bottom: "conv1"\n\
name: "conv1_relu"\n\
type: "ReLU"\n\
}\n\
layer {\n\
bottom: "conv1"\n\
top: "pool1"\n\
name: "pool1"\n\
type: "Pooling"\n\
pooling_param {\n\
kernel_size: 3\n\
stride: 2\n\
pool: MAX\n\
}\n\
}\n\
layer {\n\
bottom: "pool1"\n\
top: "res2a_branch1"\n\
name: "res2a_branch1"\n\
type: "Convolution"\n\
convolution_param {\n\
num_output: 256\n\
kernel_size: 1\n\
pad: 0\n\
stride: 1\n\
bias_term: false\n\
}\n\
}\n\
layer {\n\
bottom: "res2a_branch1"\n\
top: "res2a_branch1"\n\
name: "bn2a_branch1"\n\
type: "BatchNorm"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
bottom: "res2a_branch1"\n\
top: "res2a_branch1"\n\
name: "scale2a_branch1"\n\
type: "Scale"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
bottom: "pool1"\n\
top: "res2a_branch2a"\n\
name: "res2a_branch2a"\n\
type: "Convolution"\n\
convolution_param {\n\
num_output: 64\n\
kernel_size: 1\n\
pad: 0\n\
stride: 1\n\
bias_term: false\n\
}\n\
}\n\
layer {\n\
bottom: "res2a_branch2a"\n\
top: "res2a_branch2a"\n\
name: "bn2a_branch2a"\n\
type: "BatchNorm"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
bottom: "res2a_branch2a"\n\
top: "res2a_branch2a"\n\
name: "scale2a_branch2a"\n\
type: "Scale"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
top: "res2a_branch2a"\n\
bottom: "res2a_branch2a"\n\
name: "res2a_branch2a_relu"\n\
type: "ReLU"\n\
}\n\
layer {\n\
bottom: "res2a_branch2a"\n\
top: "res2a_branch2b"\n\
name: "res2a_branch2b"\n\
type: "Convolution"\n\
convolution_param {\n\
num_output: 64\n\
kernel_size: 3\n\
pad: 1\n\
stride: 1\n\
bias_term: false\n\
}\n\
}\n\
layer {\n\
bottom: "res2a_branch2b"\n\
top: "res2a_branch2b"\n\
name: "bn2a_branch2b"\n\
type: "BatchNorm"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
bottom: "res2a_branch2b"\n\
top: "res2a_branch2b"\n\
name: "scale2a_branch2b"\n\
type: "Scale"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
top: "res2a_branch2b"\n\
bottom: "res2a_branch2b"\n\
name: "res2a_branch2b_relu"\n\
type: "ReLU"\n\
}\n\
layer {\n\
bottom: "res2a_branch2b"\n\
top: "res2a_branch2c"\n\
name: "res2a_branch2c"\n\
type: "Convolution"\n\
convolution_param {\n\
num_output: 256\n\
kernel_size: 1\n\
pad: 0\n\
stride: 1\n\
bias_term: false\n\
}\n\
}\n\
layer {\n\
bottom: "res2a_branch2c"\n\
top: "res2a_branch2c"\n\
name: "bn2a_branch2c"\n\
type: "BatchNorm"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
bottom: "res2a_branch2c"\n\
top: "res2a_branch2c"\n\
name: "scale2a_branch2c"\n\
type: "Scale"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
bottom: "res2a_branch1"\n\
bottom: "res2a_branch2c"\n\
top: "res2a"\n\
name: "res2a"\n\
type: "Eltwise"\n\
}\n\
layer {\n\
bottom: "res2a"\n\
top: "res2a"\n\
name: "res2a_relu"\n\
type: "ReLU"\n\
}\n\
layer {\n\
bottom: "res2a"\n\
top: "res2b_branch2a"\n\
name: "res2b_branch2a"\n\
type: "Convolution"\n\
convolution_param {\n\
num_output: 64\n\
kernel_size: 1\n\
pad: 0\n\
stride: 1\n\
bias_term: false\n\
}\n\
}\n\
layer {\n\
bottom: "res2b_branch2a"\n\
top: "res2b_branch2a"\n\
name: "bn2b_branch2a"\n\
type: "BatchNorm"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
bottom: "res2b_branch2a"\n\
top: "res2b_branch2a"\n\
name: "scale2b_branch2a"\n\
type: "Scale"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
top: "res2b_branch2a"\n\
bottom: "res2b_branch2a"\n\
name: "res2b_branch2a_relu"\n\
type: "ReLU"\n\
}\n\
layer {\n\
bottom: "res2b_branch2a"\n\
top: "res2b_branch2b"\n\
name: "res2b_branch2b"\n\
type: "Convolution"\n\
convolution_param {\n\
num_output: 64\n\
kernel_size: 3\n\
pad: 1\n\
stride: 1\n\
bias_term: false\n\
}\n\
}\n\
layer {\n\
bottom: "res2b_branch2b"\n\
top: "res2b_branch2b"\n\
name: "bn2b_branch2b"\n\
type: "BatchNorm"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
bottom: "res2b_branch2b"\n\
top: "res2b_branch2b"\n\
name: "scale2b_branch2b"\n\
type: "Scale"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
top: "res2b_branch2b"\n\
bottom: "res2b_branch2b"\n\
name: "res2b_branch2b_relu"\n\
type: "ReLU"\n\
}\n\
layer {\n\
bottom: "res2b_branch2b"\n\
top: "res2b_branch2c"\n\
name: "res2b_branch2c"\n\
type: "Convolution"\n\
convolution_param {\n\
num_output: 256\n\
kernel_size: 1\n\
pad: 0\n\
stride: 1\n\
bias_term: false\n\
}\n\
}\n\
layer {\n\
bottom: "res2b_branch2c"\n\
top: "res2b_branch2c"\n\
name: "bn2b_branch2c"\n\
type: "BatchNorm"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
bottom: "res2b_branch2c"\n\
top: "res2b_branch2c"\n\
name: "scale2b_branch2c"\n\
type: "Scale"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
bottom: "res2a"\n\
bottom: "res2b_branch2c"\n\
top: "res2b"\n\
name: "res2b"\n\
type: "Eltwise"\n\
}\n\
layer {\n\
bottom: "res2b"\n\
top: "res2b"\n\
name: "res2b_relu"\n\
type: "ReLU"\n\
}\n\
layer {\n\
bottom: "res2b"\n\
top: "res2c_branch2a"\n\
name: "res2c_branch2a"\n\
type: "Convolution"\n\
convolution_param {\n\
num_output: 64\n\
kernel_size: 1\n\
pad: 0\n\
stride: 1\n\
bias_term: false\n\
}\n\
}\n\
layer {\n\
bottom: "res2c_branch2a"\n\
top: "res2c_branch2a"\n\
name: "bn2c_branch2a"\n\
type: "BatchNorm"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
bottom: "res2c_branch2a"\n\
top: "res2c_branch2a"\n\
name: "scale2c_branch2a"\n\
type: "Scale"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
top: "res2c_branch2a"\n\
bottom: "res2c_branch2a"\n\
name: "res2c_branch2a_relu"\n\
type: "ReLU"\n\
}\n\
layer {\n\
bottom: "res2c_branch2a"\n\
top: "res2c_branch2b"\n\
name: "res2c_branch2b"\n\
type: "Convolution"\n\
convolution_param {\n\
num_output: 64\n\
kernel_size: 3\n\
pad: 1\n\
stride: 1\n\
bias_term: false\n\
}\n\
}\n\
layer {\n\
bottom: "res2c_branch2b"\n\
top: "res2c_branch2b"\n\
name: "bn2c_branch2b"\n\
type: "BatchNorm"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
bottom: "res2c_branch2b"\n\
top: "res2c_branch2b"\n\
name: "scale2c_branch2b"\n\
type: "Scale"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
top: "res2c_branch2b"\n\
bottom: "res2c_branch2b"\n\
name: "res2c_branch2b_relu"\n\
type: "ReLU"\n\
}\n\
layer {\n\
bottom: "res2c_branch2b"\n\
top: "res2c_branch2c"\n\
name: "res2c_branch2c"\n\
type: "Convolution"\n\
convolution_param {\n\
num_output: 256\n\
kernel_size: 1\n\
pad: 0\n\
stride: 1\n\
bias_term: false\n\
}\n\
}\n\
layer {\n\
bottom: "res2c_branch2c"\n\
top: "res2c_branch2c"\n\
name: "bn2c_branch2c"\n\
type: "BatchNorm"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
bottom: "res2c_branch2c"\n\
top: "res2c_branch2c"\n\
name: "scale2c_branch2c"\n\
type: "Scale"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
bottom: "res2b"\n\
bottom: "res2c_branch2c"\n\
top: "res2c"\n\
name: "res2c"\n\
type: "Eltwise"\n\
}\n\
layer {\n\
bottom: "res2c"\n\
top: "res2c"\n\
name: "res2c_relu"\n\
type: "ReLU"\n\
}\n\
layer {\n\
bottom: "res2c"\n\
top: "res3a_branch1"\n\
name: "res3a_branch1"\n\
type: "Convolution"\n\
convolution_param {\n\
num_output: 512\n\
kernel_size: 1\n\
pad: 0\n\
stride: 2\n\
bias_term: false\n\
}\n\
}\n\
layer {\n\
bottom: "res3a_branch1"\n\
top: "res3a_branch1"\n\
name: "bn3a_branch1"\n\
type: "BatchNorm"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
bottom: "res3a_branch1"\n\
top: "res3a_branch1"\n\
name: "scale3a_branch1"\n\
type: "Scale"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
bottom: "res2c"\n\
top: "res3a_branch2a"\n\
name: "res3a_branch2a"\n\
type: "Convolution"\n\
convolution_param {\n\
num_output: 128\n\
kernel_size: 1\n\
pad: 0\n\
stride: 2\n\
bias_term: false\n\
}\n\
}\n\
layer {\n\
bottom: "res3a_branch2a"\n\
top: "res3a_branch2a"\n\
name: "bn3a_branch2a"\n\
type: "BatchNorm"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
bottom: "res3a_branch2a"\n\
top: "res3a_branch2a"\n\
name: "scale3a_branch2a"\n\
type: "Scale"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
top: "res3a_branch2a"\n\
bottom: "res3a_branch2a"\n\
name: "res3a_branch2a_relu"\n\
type: "ReLU"\n\
}\n\
layer {\n\
bottom: "res3a_branch2a"\n\
top: "res3a_branch2b"\n\
name: "res3a_branch2b"\n\
type: "Convolution"\n\
convolution_param {\n\
num_output: 128\n\
kernel_size: 3\n\
pad: 1\n\
stride: 1\n\
bias_term: false\n\
}\n\
}\n\
layer {\n\
bottom: "res3a_branch2b"\n\
top: "res3a_branch2b"\n\
name: "bn3a_branch2b"\n\
type: "BatchNorm"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
bottom: "res3a_branch2b"\n\
top: "res3a_branch2b"\n\
name: "scale3a_branch2b"\n\
type: "Scale"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
top: "res3a_branch2b"\n\
bottom: "res3a_branch2b"\n\
name: "res3a_branch2b_relu"\n\
type: "ReLU"\n\
}\n\
layer {\n\
bottom: "res3a_branch2b"\n\
top: "res3a_branch2c"\n\
name: "res3a_branch2c"\n\
type: "Convolution"\n\
convolution_param {\n\
num_output: 512\n\
kernel_size: 1\n\
pad: 0\n\
stride: 1\n\
bias_term: false\n\
}\n\
}\n\
layer {\n\
bottom: "res3a_branch2c"\n\
top: "res3a_branch2c"\n\
name: "bn3a_branch2c"\n\
type: "BatchNorm"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
bottom: "res3a_branch2c"\n\
top: "res3a_branch2c"\n\
name: "scale3a_branch2c"\n\
type: "Scale"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
bottom: "res3a_branch1"\n\
bottom: "res3a_branch2c"\n\
top: "res3a"\n\
name: "res3a"\n\
type: "Eltwise"\n\
}\n\
layer {\n\
bottom: "res3a"\n\
top: "res3a"\n\
name: "res3a_relu"\n\
type: "ReLU"\n\
}\n\
layer {\n\
bottom: "res3a"\n\
top: "res3b1_branch2a"\n\
name: "res3b1_branch2a"\n\
type: "Convolution"\n\
convolution_param {\n\
num_output: 128\n\
kernel_size: 1\n\
pad: 0\n\
stride: 1\n\
bias_term: false\n\
}\n\
}\n\
layer {\n\
bottom: "res3b1_branch2a"\n\
top: "res3b1_branch2a"\n\
name: "bn3b1_branch2a"\n\
type: "BatchNorm"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
bottom: "res3b1_branch2a"\n\
top: "res3b1_branch2a"\n\
name: "scale3b1_branch2a"\n\
type: "Scale"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
top: "res3b1_branch2a"\n\
bottom: "res3b1_branch2a"\n\
name: "res3b1_branch2a_relu"\n\
type: "ReLU"\n\
}\n\
layer {\n\
bottom: "res3b1_branch2a"\n\
top: "res3b1_branch2b"\n\
name: "res3b1_branch2b"\n\
type: "Convolution"\n\
convolution_param {\n\
num_output: 128\n\
kernel_size: 3\n\
pad: 1\n\
stride: 1\n\
bias_term: false\n\
}\n\
}\n\
layer {\n\
bottom: "res3b1_branch2b"\n\
top: "res3b1_branch2b"\n\
name: "bn3b1_branch2b"\n\
type: "BatchNorm"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
bottom: "res3b1_branch2b"\n\
top: "res3b1_branch2b"\n\
name: "scale3b1_branch2b"\n\
type: "Scale"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
top: "res3b1_branch2b"\n\
bottom: "res3b1_branch2b"\n\
name: "res3b1_branch2b_relu"\n\
type: "ReLU"\n\
}\n\
layer {\n\
bottom: "res3b1_branch2b"\n\
top: "res3b1_branch2c"\n\
name: "res3b1_branch2c"\n\
type: "Convolution"\n\
convolution_param {\n\
num_output: 512\n\
kernel_size: 1\n\
pad: 0\n\
stride: 1\n\
bias_term: false\n\
}\n\
}\n\
layer {\n\
bottom: "res3b1_branch2c"\n\
top: "res3b1_branch2c"\n\
name: "bn3b1_branch2c"\n\
type: "BatchNorm"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
bottom: "res3b1_branch2c"\n\
top: "res3b1_branch2c"\n\
name: "scale3b1_branch2c"\n\
type: "Scale"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
bottom: "res3a"\n\
bottom: "res3b1_branch2c"\n\
top: "res3b1"\n\
name: "res3b1"\n\
type: "Eltwise"\n\
}\n\
layer {\n\
bottom: "res3b1"\n\
top: "res3b1"\n\
name: "res3b1_relu"\n\
type: "ReLU"\n\
}\n\
layer {\n\
bottom: "res3b1"\n\
top: "res3b2_branch2a"\n\
name: "res3b2_branch2a"\n\
type: "Convolution"\n\
convolution_param {\n\
num_output: 128\n\
kernel_size: 1\n\
pad: 0\n\
stride: 1\n\
bias_term: false\n\
}\n\
}\n\
layer {\n\
bottom: "res3b2_branch2a"\n\
top: "res3b2_branch2a"\n\
name: "bn3b2_branch2a"\n\
type: "BatchNorm"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
bottom: "res3b2_branch2a"\n\
top: "res3b2_branch2a"\n\
name: "scale3b2_branch2a"\n\
type: "Scale"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
top: "res3b2_branch2a"\n\
bottom: "res3b2_branch2a"\n\
name: "res3b2_branch2a_relu"\n\
type: "ReLU"\n\
}\n\
layer {\n\
bottom: "res3b2_branch2a"\n\
top: "res3b2_branch2b"\n\
name: "res3b2_branch2b"\n\
type: "Convolution"\n\
convolution_param {\n\
num_output: 128\n\
kernel_size: 3\n\
pad: 1\n\
stride: 1\n\
bias_term: false\n\
}\n\
}\n\
layer {\n\
bottom: "res3b2_branch2b"\n\
top: "res3b2_branch2b"\n\
name: "bn3b2_branch2b"\n\
type: "BatchNorm"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
bottom: "res3b2_branch2b"\n\
top: "res3b2_branch2b"\n\
name: "scale3b2_branch2b"\n\
type: "Scale"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
top: "res3b2_branch2b"\n\
bottom: "res3b2_branch2b"\n\
name: "res3b2_branch2b_relu"\n\
type: "ReLU"\n\
}\n\
layer {\n\
bottom: "res3b2_branch2b"\n\
top: "res3b2_branch2c"\n\
name: "res3b2_branch2c"\n\
type: "Convolution"\n\
convolution_param {\n\
num_output: 512\n\
kernel_size: 1\n\
pad: 0\n\
stride: 1\n\
bias_term: false\n\
}\n\
}\n\
layer {\n\
bottom: "res3b2_branch2c"\n\
top: "res3b2_branch2c"\n\
name: "bn3b2_branch2c"\n\
type: "BatchNorm"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
bottom: "res3b2_branch2c"\n\
top: "res3b2_branch2c"\n\
name: "scale3b2_branch2c"\n\
type: "Scale"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
bottom: "res3b1"\n\
bottom: "res3b2_branch2c"\n\
top: "res3b2"\n\
name: "res3b2"\n\
type: "Eltwise"\n\
}\n\
layer {\n\
bottom: "res3b2"\n\
top: "res3b2"\n\
name: "res3b2_relu"\n\
type: "ReLU"\n\
}\n\
layer {\n\
bottom: "res3b2"\n\
top: "res3b3_branch2a"\n\
name: "res3b3_branch2a"\n\
type: "Convolution"\n\
convolution_param {\n\
num_output: 128\n\
kernel_size: 1\n\
pad: 0\n\
stride: 1\n\
bias_term: false\n\
}\n\
}\n\
layer {\n\
bottom: "res3b3_branch2a"\n\
top: "res3b3_branch2a"\n\
name: "bn3b3_branch2a"\n\
type: "BatchNorm"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
bottom: "res3b3_branch2a"\n\
top: "res3b3_branch2a"\n\
name: "scale3b3_branch2a"\n\
type: "Scale"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
top: "res3b3_branch2a"\n\
bottom: "res3b3_branch2a"\n\
name: "res3b3_branch2a_relu"\n\
type: "ReLU"\n\
}\n\
layer {\n\
bottom: "res3b3_branch2a"\n\
top: "res3b3_branch2b"\n\
name: "res3b3_branch2b"\n\
type: "Convolution"\n\
convolution_param {\n\
num_output: 128\n\
kernel_size: 3\n\
pad: 1\n\
stride: 1\n\
bias_term: false\n\
}\n\
}\n\
layer {\n\
bottom: "res3b3_branch2b"\n\
top: "res3b3_branch2b"\n\
name: "bn3b3_branch2b"\n\
type: "BatchNorm"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
bottom: "res3b3_branch2b"\n\
top: "res3b3_branch2b"\n\
name: "scale3b3_branch2b"\n\
type: "Scale"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
top: "res3b3_branch2b"\n\
bottom: "res3b3_branch2b"\n\
name: "res3b3_branch2b_relu"\n\
type: "ReLU"\n\
}\n\
layer {\n\
bottom: "res3b3_branch2b"\n\
top: "res3b3_branch2c"\n\
name: "res3b3_branch2c"\n\
type: "Convolution"\n\
convolution_param {\n\
num_output: 512\n\
kernel_size: 1\n\
pad: 0\n\
stride: 1\n\
bias_term: false\n\
}\n\
}\n\
layer {\n\
bottom: "res3b3_branch2c"\n\
top: "res3b3_branch2c"\n\
name: "bn3b3_branch2c"\n\
type: "BatchNorm"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
bottom: "res3b3_branch2c"\n\
top: "res3b3_branch2c"\n\
name: "scale3b3_branch2c"\n\
type: "Scale"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
bottom: "res3b2"\n\
bottom: "res3b3_branch2c"\n\
top: "res3b3"\n\
name: "res3b3"\n\
type: "Eltwise"\n\
}\n\
layer {\n\
bottom: "res3b3"\n\
top: "res3b3"\n\
name: "res3b3_relu"\n\
type: "ReLU"\n\
}\n\
layer {\n\
bottom: "res3b3"\n\
top: "res3b4_branch2a"\n\
name: "res3b4_branch2a"\n\
type: "Convolution"\n\
convolution_param {\n\
num_output: 128\n\
kernel_size: 1\n\
pad: 0\n\
stride: 1\n\
bias_term: false\n\
}\n\
}\n\
layer {\n\
bottom: "res3b4_branch2a"\n\
top: "res3b4_branch2a"\n\
name: "bn3b4_branch2a"\n\
type: "BatchNorm"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
bottom: "res3b4_branch2a"\n\
top: "res3b4_branch2a"\n\
name: "scale3b4_branch2a"\n\
type: "Scale"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
top: "res3b4_branch2a"\n\
bottom: "res3b4_branch2a"\n\
name: "res3b4_branch2a_relu"\n\
type: "ReLU"\n\
}\n\
layer {\n\
bottom: "res3b4_branch2a"\n\
top: "res3b4_branch2b"\n\
name: "res3b4_branch2b"\n\
type: "Convolution"\n\
convolution_param {\n\
num_output: 128\n\
kernel_size: 3\n\
pad: 1\n\
stride: 1\n\
bias_term: false\n\
}\n\
}\n\
layer {\n\
bottom: "res3b4_branch2b"\n\
top: "res3b4_branch2b"\n\
name: "bn3b4_branch2b"\n\
type: "BatchNorm"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
bottom: "res3b4_branch2b"\n\
top: "res3b4_branch2b"\n\
name: "scale3b4_branch2b"\n\
type: "Scale"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
top: "res3b4_branch2b"\n\
bottom: "res3b4_branch2b"\n\
name: "res3b4_branch2b_relu"\n\
type: "ReLU"\n\
}\n\
layer {\n\
bottom: "res3b4_branch2b"\n\
top: "res3b4_branch2c"\n\
name: "res3b4_branch2c"\n\
type: "Convolution"\n\
convolution_param {\n\
num_output: 512\n\
kernel_size: 1\n\
pad: 0\n\
stride: 1\n\
bias_term: false\n\
}\n\
}\n\
layer {\n\
bottom: "res3b4_branch2c"\n\
top: "res3b4_branch2c"\n\
name: "bn3b4_branch2c"\n\
type: "BatchNorm"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
bottom: "res3b4_branch2c"\n\
top: "res3b4_branch2c"\n\
name: "scale3b4_branch2c"\n\
type: "Scale"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
bottom: "res3b3"\n\
bottom: "res3b4_branch2c"\n\
top: "res3b4"\n\
name: "res3b4"\n\
type: "Eltwise"\n\
}\n\
layer {\n\
bottom: "res3b4"\n\
top: "res3b4"\n\
name: "res3b4_relu"\n\
type: "ReLU"\n\
}\n\
layer {\n\
bottom: "res3b4"\n\
top: "res3b5_branch2a"\n\
name: "res3b5_branch2a"\n\
type: "Convolution"\n\
convolution_param {\n\
num_output: 128\n\
kernel_size: 1\n\
pad: 0\n\
stride: 1\n\
bias_term: false\n\
}\n\
}\n\
layer {\n\
bottom: "res3b5_branch2a"\n\
top: "res3b5_branch2a"\n\
name: "bn3b5_branch2a"\n\
type: "BatchNorm"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
bottom: "res3b5_branch2a"\n\
top: "res3b5_branch2a"\n\
name: "scale3b5_branch2a"\n\
type: "Scale"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
top: "res3b5_branch2a"\n\
bottom: "res3b5_branch2a"\n\
name: "res3b5_branch2a_relu"\n\
type: "ReLU"\n\
}\n\
layer {\n\
bottom: "res3b5_branch2a"\n\
top: "res3b5_branch2b"\n\
name: "res3b5_branch2b"\n\
type: "Convolution"\n\
convolution_param {\n\
num_output: 128\n\
kernel_size: 3\n\
pad: 1\n\
stride: 1\n\
bias_term: false\n\
}\n\
}\n\
layer {\n\
bottom: "res3b5_branch2b"\n\
top: "res3b5_branch2b"\n\
name: "bn3b5_branch2b"\n\
type: "BatchNorm"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
bottom: "res3b5_branch2b"\n\
top: "res3b5_branch2b"\n\
name: "scale3b5_branch2b"\n\
type: "Scale"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
top: "res3b5_branch2b"\n\
bottom: "res3b5_branch2b"\n\
name: "res3b5_branch2b_relu"\n\
type: "ReLU"\n\
}\n\
layer {\n\
bottom: "res3b5_branch2b"\n\
top: "res3b5_branch2c"\n\
name: "res3b5_branch2c"\n\
type: "Convolution"\n\
convolution_param {\n\
num_output: 512\n\
kernel_size: 1\n\
pad: 0\n\
stride: 1\n\
bias_term: false\n\
}\n\
}\n\
layer {\n\
bottom: "res3b5_branch2c"\n\
top: "res3b5_branch2c"\n\
name: "bn3b5_branch2c"\n\
type: "BatchNorm"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
bottom: "res3b5_branch2c"\n\
top: "res3b5_branch2c"\n\
name: "scale3b5_branch2c"\n\
type: "Scale"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
bottom: "res3b4"\n\
bottom: "res3b5_branch2c"\n\
top: "res3b5"\n\
name: "res3b5"\n\
type: "Eltwise"\n\
}\n\
layer {\n\
bottom: "res3b5"\n\
top: "res3b5"\n\
name: "res3b5_relu"\n\
type: "ReLU"\n\
}\n\
layer {\n\
bottom: "res3b5"\n\
top: "res3b6_branch2a"\n\
name: "res3b6_branch2a"\n\
type: "Convolution"\n\
convolution_param {\n\
num_output: 128\n\
kernel_size: 1\n\
pad: 0\n\
stride: 1\n\
bias_term: false\n\
}\n\
}\n\
layer {\n\
bottom: "res3b6_branch2a"\n\
top: "res3b6_branch2a"\n\
name: "bn3b6_branch2a"\n\
type: "BatchNorm"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
bottom: "res3b6_branch2a"\n\
top: "res3b6_branch2a"\n\
name: "scale3b6_branch2a"\n\
type: "Scale"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
top: "res3b6_branch2a"\n\
bottom: "res3b6_branch2a"\n\
name: "res3b6_branch2a_relu"\n\
type: "ReLU"\n\
}\n\
layer {\n\
bottom: "res3b6_branch2a"\n\
top: "res3b6_branch2b"\n\
name: "res3b6_branch2b"\n\
type: "Convolution"\n\
convolution_param {\n\
num_output: 128\n\
kernel_size: 3\n\
pad: 1\n\
stride: 1\n\
bias_term: false\n\
}\n\
}\n\
layer {\n\
bottom: "res3b6_branch2b"\n\
top: "res3b6_branch2b"\n\
name: "bn3b6_branch2b"\n\
type: "BatchNorm"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
bottom: "res3b6_branch2b"\n\
top: "res3b6_branch2b"\n\
name: "scale3b6_branch2b"\n\
type: "Scale"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
top: "res3b6_branch2b"\n\
bottom: "res3b6_branch2b"\n\
name: "res3b6_branch2b_relu"\n\
type: "ReLU"\n\
}\n\
layer {\n\
bottom: "res3b6_branch2b"\n\
top: "res3b6_branch2c"\n\
name: "res3b6_branch2c"\n\
type: "Convolution"\n\
convolution_param {\n\
num_output: 512\n\
kernel_size: 1\n\
pad: 0\n\
stride: 1\n\
bias_term: false\n\
}\n\
}\n\
layer {\n\
bottom: "res3b6_branch2c"\n\
top: "res3b6_branch2c"\n\
name: "bn3b6_branch2c"\n\
type: "BatchNorm"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
bottom: "res3b6_branch2c"\n\
top: "res3b6_branch2c"\n\
name: "scale3b6_branch2c"\n\
type: "Scale"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
bottom: "res3b5"\n\
bottom: "res3b6_branch2c"\n\
top: "res3b6"\n\
name: "res3b6"\n\
type: "Eltwise"\n\
}\n\
layer {\n\
bottom: "res3b6"\n\
top: "res3b6"\n\
name: "res3b6_relu"\n\
type: "ReLU"\n\
}\n\
layer {\n\
bottom: "res3b6"\n\
top: "res3b7_branch2a"\n\
name: "res3b7_branch2a"\n\
type: "Convolution"\n\
convolution_param {\n\
num_output: 128\n\
kernel_size: 1\n\
pad: 0\n\
stride: 1\n\
bias_term: false\n\
}\n\
}\n\
layer {\n\
bottom: "res3b7_branch2a"\n\
top: "res3b7_branch2a"\n\
name: "bn3b7_branch2a"\n\
type: "BatchNorm"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
bottom: "res3b7_branch2a"\n\
top: "res3b7_branch2a"\n\
name: "scale3b7_branch2a"\n\
type: "Scale"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
top: "res3b7_branch2a"\n\
bottom: "res3b7_branch2a"\n\
name: "res3b7_branch2a_relu"\n\
type: "ReLU"\n\
}\n\
layer {\n\
bottom: "res3b7_branch2a"\n\
top: "res3b7_branch2b"\n\
name: "res3b7_branch2b"\n\
type: "Convolution"\n\
convolution_param {\n\
num_output: 128\n\
kernel_size: 3\n\
pad: 1\n\
stride: 1\n\
bias_term: false\n\
}\n\
}\n\
layer {\n\
bottom: "res3b7_branch2b"\n\
top: "res3b7_branch2b"\n\
name: "bn3b7_branch2b"\n\
type: "BatchNorm"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
bottom: "res3b7_branch2b"\n\
top: "res3b7_branch2b"\n\
name: "scale3b7_branch2b"\n\
type: "Scale"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
top: "res3b7_branch2b"\n\
bottom: "res3b7_branch2b"\n\
name: "res3b7_branch2b_relu"\n\
type: "ReLU"\n\
}\n\
layer {\n\
bottom: "res3b7_branch2b"\n\
top: "res3b7_branch2c"\n\
name: "res3b7_branch2c"\n\
type: "Convolution"\n\
convolution_param {\n\
num_output: 512\n\
kernel_size: 1\n\
pad: 0\n\
stride: 1\n\
bias_term: false\n\
}\n\
}\n\
layer {\n\
bottom: "res3b7_branch2c"\n\
top: "res3b7_branch2c"\n\
name: "bn3b7_branch2c"\n\
type: "BatchNorm"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
bottom: "res3b7_branch2c"\n\
top: "res3b7_branch2c"\n\
name: "scale3b7_branch2c"\n\
type: "Scale"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
bottom: "res3b6"\n\
bottom: "res3b7_branch2c"\n\
top: "res3b7"\n\
name: "res3b7"\n\
type: "Eltwise"\n\
}\n\
layer {\n\
bottom: "res3b7"\n\
top: "res3b7"\n\
name: "res3b7_relu"\n\
type: "ReLU"\n\
}\n'
return string
def getResNet101v2Init():
string = '\
layer {\n\
name: "conv1"\n\
type: "Convolution"\n\
bottom: "image"\n\
top: "conv1"\n\
convolution_param {\n\
bias_term: false\n\
num_output: 64\n\
pad: 3\n\
kernel_size: 7\n\
stride: 2\n\
}\n\
}\n\
layer {\n\
name: "conv1_bn"\n\
type: "BatchNorm"\n\
bottom: "conv1"\n\
top: "conv1"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
name: "conv1_scale"\n\
type: "Scale"\n\
bottom: "conv1"\n\
top: "conv1"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
name: "conv1_relu"\n\
type: "ReLU"\n\
bottom: "conv1"\n\
top: "conv1"\n\
}\n\
layer {\n\
name: "pool1"\n\
type: "Pooling"\n\
bottom: "conv1"\n\
top: "pool1"\n\
pooling_param {\n\
pool: MAX\n\
kernel_size: 3\n\
stride: 2\n\
}\n\
}\n\
layer {\n\
name: "res1_conv1"\n\
type: "Convolution"\n\
bottom: "pool1"\n\
top: "res1_conv1"\n\
convolution_param {\n\
bias_term: false\n\
num_output: 64\n\
pad: 0\n\
kernel_size: 1\n\
stride: 1\n\
}\n\
}\n\
layer {\n\
name: "res1_conv1_bn"\n\
type: "BatchNorm"\n\
bottom: "res1_conv1"\n\
top: "res1_conv1"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
name: "res1_conv1_scale"\n\
type: "Scale"\n\
bottom: "res1_conv1"\n\
top: "res1_conv1"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
name: "res1_conv1_relu"\n\
type: "ReLU"\n\
bottom: "res1_conv1"\n\
top: "res1_conv1"\n\
}\n\
layer {\n\
name: "res1_conv2"\n\
type: "Convolution"\n\
bottom: "res1_conv1"\n\
top: "res1_conv2"\n\
convolution_param {\n\
bias_term: false\n\
num_output: 64\n\
pad: 1\n\
kernel_size: 3\n\
stride: 1\n\
}\n\
}\n\
layer {\n\
name: "res1_conv2_bn"\n\
type: "BatchNorm"\n\
bottom: "res1_conv2"\n\
top: "res1_conv2"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
name: "res1_conv2_scale"\n\
type: "Scale"\n\
bottom: "res1_conv2"\n\
top: "res1_conv2"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
name: "res1_conv2_relu"\n\
type: "ReLU"\n\
bottom: "res1_conv2"\n\
top: "res1_conv2"\n\
}\n\
layer {\n\
name: "res1_conv3"\n\
type: "Convolution"\n\
bottom: "res1_conv2"\n\
top: "res1_conv3"\n\
convolution_param {\n\
bias_term: false\n\
num_output: 256\n\
pad: 0\n\
kernel_size: 1\n\
stride: 1\n\
}\n\
}\n\
layer {\n\
name: "res1_match_conv"\n\
type: "Convolution"\n\
bottom: "pool1"\n\
top: "res1_match_conv"\n\
convolution_param {\n\
bias_term: false\n\
num_output: 256\n\
pad: 0\n\
kernel_size: 1\n\
stride: 1\n\
}\n\
}\n\
layer {\n\
name: "res1_eletwise"\n\
type: "Eltwise"\n\
bottom: "res1_match_conv"\n\
bottom: "res1_conv3"\n\
top: "res1_eletwise"\n\
eltwise_param {\n\
operation: SUM\n\
}\n\
}\n\
layer {\n\
name: "res2_bn"\n\
type: "BatchNorm"\n\
bottom: "res1_eletwise"\n\
top: "res2_bn"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
name: "res2_scale"\n\
type: "Scale"\n\
bottom: "res2_bn"\n\
top: "res2_bn"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
name: "res2_relu"\n\
type: "ReLU"\n\
bottom: "res2_bn"\n\
top: "res2_bn"\n\
}\n\
layer {\n\
name: "res2_conv1"\n\
type: "Convolution"\n\
bottom: "res2_bn"\n\
top: "res2_conv1"\n\
convolution_param {\n\
bias_term: false\n\
num_output: 64\n\
pad: 0\n\
kernel_size: 1\n\
stride: 1\n\
}\n\
}\n\
layer {\n\
name: "res2_conv1_bn"\n\
type: "BatchNorm"\n\
bottom: "res2_conv1"\n\
top: "res2_conv1"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
name: "res2_conv1_scale"\n\
type: "Scale"\n\
bottom: "res2_conv1"\n\
top: "res2_conv1"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
name: "res2_conv1_relu"\n\
type: "ReLU"\n\
bottom: "res2_conv1"\n\
top: "res2_conv1"\n\
}\n\
layer {\n\
name: "res2_conv2"\n\
type: "Convolution"\n\
bottom: "res2_conv1"\n\
top: "res2_conv2"\n\
convolution_param {\n\
bias_term: false\n\
num_output: 64\n\
pad: 1\n\
kernel_size: 3\n\
stride: 1\n\
}\n\
}\n\
layer {\n\
name: "res2_conv2_bn"\n\
type: "BatchNorm"\n\
bottom: "res2_conv2"\n\
top: "res2_conv2"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
name: "res2_conv2_scale"\n\
type: "Scale"\n\
bottom: "res2_conv2"\n\
top: "res2_conv2"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
name: "res2_conv2_relu"\n\
type: "ReLU"\n\
bottom: "res2_conv2"\n\
top: "res2_conv2"\n\
}\n\
layer {\n\
name: "res2_conv3"\n\
type: "Convolution"\n\
bottom: "res2_conv2"\n\
top: "res2_conv3"\n\
convolution_param {\n\
bias_term: false\n\
num_output: 256\n\
pad: 0\n\
kernel_size: 1\n\
stride: 1\n\
}\n\
}\n\
layer {\n\
name: "res2_eletwise"\n\
type: "Eltwise"\n\
bottom: "res1_eletwise"\n\
bottom: "res2_conv3"\n\
top: "res2_eletwise"\n\
eltwise_param {\n\
operation: SUM\n\
}\n\
}\n\
layer {\n\
name: "res3_bn"\n\
type: "BatchNorm"\n\
bottom: "res2_eletwise"\n\
top: "res3_bn"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
name: "res3_scale"\n\
type: "Scale"\n\
bottom: "res3_bn"\n\
top: "res3_bn"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
name: "res3_relu"\n\
type: "ReLU"\n\
bottom: "res3_bn"\n\
top: "res3_bn"\n\
}\n\
layer {\n\
name: "res3_conv1"\n\
type: "Convolution"\n\
bottom: "res3_bn"\n\
top: "res3_conv1"\n\
convolution_param {\n\
bias_term: false\n\
num_output: 64\n\
pad: 0\n\
kernel_size: 1\n\
stride: 1\n\
}\n\
}\n\
layer {\n\
name: "res3_conv1_bn"\n\
type: "BatchNorm"\n\
bottom: "res3_conv1"\n\
top: "res3_conv1"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
name: "res3_conv1_scale"\n\
type: "Scale"\n\
bottom: "res3_conv1"\n\
top: "res3_conv1"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
name: "res3_conv1_relu"\n\
type: "ReLU"\n\
bottom: "res3_conv1"\n\
top: "res3_conv1"\n\
}\n\
layer {\n\
name: "res3_conv2"\n\
type: "Convolution"\n\
bottom: "res3_conv1"\n\
top: "res3_conv2"\n\
convolution_param {\n\
bias_term: false\n\
num_output: 64\n\
pad: 1\n\
kernel_size: 3\n\
stride: 1\n\
}\n\
}\n\
layer {\n\
name: "res3_conv2_bn"\n\
type: "BatchNorm"\n\
bottom: "res3_conv2"\n\
top: "res3_conv2"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
name: "res3_conv2_scale"\n\
type: "Scale"\n\
bottom: "res3_conv2"\n\
top: "res3_conv2"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
name: "res3_conv2_relu"\n\
type: "ReLU"\n\
bottom: "res3_conv2"\n\
top: "res3_conv2"\n\
}\n\
layer {\n\
name: "res3_conv3"\n\
type: "Convolution"\n\
bottom: "res3_conv2"\n\
top: "res3_conv3"\n\
convolution_param {\n\
bias_term: false\n\
num_output: 256\n\
pad: 0\n\
kernel_size: 1\n\
stride: 1\n\
}\n\
}\n\
layer {\n\
name: "res3_eletwise"\n\
type: "Eltwise"\n\
bottom: "res2_eletwise"\n\
bottom: "res3_conv3"\n\
top: "res3_eletwise"\n\
eltwise_param {\n\
operation: SUM\n\
}\n\
}\n\
layer {\n\
name: "res4_bn"\n\
type: "BatchNorm"\n\
bottom: "res3_eletwise"\n\
top: "res4_bn"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
name: "res4_scale"\n\
type: "Scale"\n\
bottom: "res4_bn"\n\
top: "res4_bn"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
name: "res4_relu"\n\
type: "ReLU"\n\
bottom: "res4_bn"\n\
top: "res4_bn"\n\
}\n\
layer {\n\
name: "res4_conv1"\n\
type: "Convolution"\n\
bottom: "res4_bn"\n\
top: "res4_conv1"\n\
convolution_param {\n\
bias_term: false\n\
num_output: 128\n\
pad: 0\n\
kernel_size: 1\n\
stride: 1\n\
}\n\
}\n\
layer {\n\
name: "res4_conv1_bn"\n\
type: "BatchNorm"\n\
bottom: "res4_conv1"\n\
top: "res4_conv1"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
name: "res4_conv1_scale"\n\
type: "Scale"\n\
bottom: "res4_conv1"\n\
top: "res4_conv1"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
name: "res4_conv1_relu"\n\
type: "ReLU"\n\
bottom: "res4_conv1"\n\
top: "res4_conv1"\n\
}\n\
layer {\n\
name: "res4_conv2"\n\
type: "Convolution"\n\
bottom: "res4_conv1"\n\
top: "res4_conv2"\n\
convolution_param {\n\
bias_term: false\n\
num_output: 128\n\
pad: 1\n\
kernel_size: 3\n\
stride: 2\n\
}\n\
}\n\
layer {\n\
name: "res4_conv2_bn"\n\
type: "BatchNorm"\n\
bottom: "res4_conv2"\n\
top: "res4_conv2"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
name: "res4_conv2_scale"\n\
type: "Scale"\n\
bottom: "res4_conv2"\n\
top: "res4_conv2"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
name: "res4_conv2_relu"\n\
type: "ReLU"\n\
bottom: "res4_conv2"\n\
top: "res4_conv2"\n\
}\n\
layer {\n\
name: "res4_conv3"\n\
type: "Convolution"\n\
bottom: "res4_conv2"\n\
top: "res4_conv3"\n\
convolution_param {\n\
bias_term: false\n\
num_output: 512\n\
pad: 0\n\
kernel_size: 1\n\
stride: 1\n\
}\n\
}\n\
layer {\n\
name: "res4_match_conv"\n\
type: "Convolution"\n\
bottom: "res4_bn"\n\
top: "res4_match_conv"\n\
convolution_param {\n\
bias_term: false\n\
num_output: 512\n\
pad: 0\n\
kernel_size: 1\n\
stride: 2\n\
}\n\
}\n\
layer {\n\
name: "res4_eletwise"\n\
type: "Eltwise"\n\
bottom: "res4_match_conv"\n\
bottom: "res4_conv3"\n\
top: "res4_eletwise"\n\
eltwise_param {\n\
operation: SUM\n\
}\n\
}\n\
layer {\n\
name: "res5_bn"\n\
type: "BatchNorm"\n\
bottom: "res4_eletwise"\n\
top: "res5_bn"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
name: "res5_scale"\n\
type: "Scale"\n\
bottom: "res5_bn"\n\
top: "res5_bn"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
name: "res5_relu"\n\
type: "ReLU"\n\
bottom: "res5_bn"\n\
top: "res5_bn"\n\
}\n\
layer {\n\
name: "res5_conv1"\n\
type: "Convolution"\n\
bottom: "res5_bn"\n\
top: "res5_conv1"\n\
convolution_param {\n\
bias_term: false\n\
num_output: 128\n\
pad: 0\n\
kernel_size: 1\n\
stride: 1\n\
}\n\
}\n\
layer {\n\
name: "res5_conv1_bn"\n\
type: "BatchNorm"\n\
bottom: "res5_conv1"\n\
top: "res5_conv1"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
name: "res5_conv1_scale"\n\
type: "Scale"\n\
bottom: "res5_conv1"\n\
top: "res5_conv1"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
name: "res5_conv1_relu"\n\
type: "ReLU"\n\
bottom: "res5_conv1"\n\
top: "res5_conv1"\n\
}\n\
layer {\n\
name: "res5_conv2"\n\
type: "Convolution"\n\
bottom: "res5_conv1"\n\
top: "res5_conv2"\n\
convolution_param {\n\
bias_term: false\n\
num_output: 128\n\
pad: 1\n\
kernel_size: 3\n\
stride: 1\n\
}\n\
}\n\
layer {\n\
name: "res5_conv2_bn"\n\
type: "BatchNorm"\n\
bottom: "res5_conv2"\n\
top: "res5_conv2"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
name: "res5_conv2_scale"\n\
type: "Scale"\n\
bottom: "res5_conv2"\n\
top: "res5_conv2"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
name: "res5_conv2_relu"\n\
type: "ReLU"\n\
bottom: "res5_conv2"\n\
top: "res5_conv2"\n\
}\n\
layer {\n\
name: "res5_conv3"\n\
type: "Convolution"\n\
bottom: "res5_conv2"\n\
top: "res5_conv3"\n\
convolution_param {\n\
bias_term: false\n\
num_output: 512\n\
pad: 0\n\
kernel_size: 1\n\
stride: 1\n\
}\n\
}\n\
layer {\n\
name: "res5_eletwise"\n\
type: "Eltwise"\n\
bottom: "res4_eletwise"\n\
bottom: "res5_conv3"\n\
top: "res5_eletwise"\n\
eltwise_param {\n\
operation: SUM\n\
}\n\
}\n\
layer {\n\
name: "res6_bn"\n\
type: "BatchNorm"\n\
bottom: "res5_eletwise"\n\
top: "res6_bn"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
name: "res6_scale"\n\
type: "Scale"\n\
bottom: "res6_bn"\n\
top: "res6_bn"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
name: "res6_relu"\n\
type: "ReLU"\n\
bottom: "res6_bn"\n\
top: "res6_bn"\n\
}\n\
layer {\n\
name: "res6_conv1"\n\
type: "Convolution"\n\
bottom: "res6_bn"\n\
top: "res6_conv1"\n\
convolution_param {\n\
bias_term: false\n\
num_output: 128\n\
pad: 0\n\
kernel_size: 1\n\
stride: 1\n\
}\n\
}\n\
layer {\n\
name: "res6_conv1_bn"\n\
type: "BatchNorm"\n\
bottom: "res6_conv1"\n\
top: "res6_conv1"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
name: "res6_conv1_scale"\n\
type: "Scale"\n\
bottom: "res6_conv1"\n\
top: "res6_conv1"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
name: "res6_conv1_relu"\n\
type: "ReLU"\n\
bottom: "res6_conv1"\n\
top: "res6_conv1"\n\
}\n\
layer {\n\
name: "res6_conv2"\n\
type: "Convolution"\n\
bottom: "res6_conv1"\n\
top: "res6_conv2"\n\
convolution_param {\n\
bias_term: false\n\
num_output: 128\n\
pad: 1\n\
kernel_size: 3\n\
stride: 1\n\
}\n\
}\n\
layer {\n\
name: "res6_conv2_bn"\n\
type: "BatchNorm"\n\
bottom: "res6_conv2"\n\
top: "res6_conv2"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
name: "res6_conv2_scale"\n\
type: "Scale"\n\
bottom: "res6_conv2"\n\
top: "res6_conv2"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
name: "res6_conv2_relu"\n\
type: "ReLU"\n\
bottom: "res6_conv2"\n\
top: "res6_conv2"\n\
}\n\
layer {\n\
name: "res6_conv3"\n\
type: "Convolution"\n\
bottom: "res6_conv2"\n\
top: "res6_conv3"\n\
convolution_param {\n\
bias_term: false\n\
num_output: 512\n\
pad: 0\n\
kernel_size: 1\n\
stride: 1\n\
}\n\
}\n\
layer {\n\
name: "res6_eletwise"\n\
type: "Eltwise"\n\
bottom: "res5_eletwise"\n\
bottom: "res6_conv3"\n\
top: "res6_eletwise"\n\
eltwise_param {\n\
operation: SUM\n\
}\n\
}\n\
layer {\n\
name: "res7_bn"\n\
type: "BatchNorm"\n\
bottom: "res6_eletwise"\n\
top: "res7_bn"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
name: "res7_scale"\n\
type: "Scale"\n\
bottom: "res7_bn"\n\
top: "res7_bn"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
name: "res7_relu"\n\
type: "ReLU"\n\
bottom: "res7_bn"\n\
top: "res7_bn"\n\
}\n\
layer {\n\
name: "res7_conv1"\n\
type: "Convolution"\n\
bottom: "res7_bn"\n\
top: "res7_conv1"\n\
convolution_param {\n\
bias_term: false\n\
num_output: 128\n\
pad: 0\n\
kernel_size: 1\n\
stride: 1\n\
}\n\
}\n\
layer {\n\
name: "res7_conv1_bn"\n\
type: "BatchNorm"\n\
bottom: "res7_conv1"\n\
top: "res7_conv1"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
name: "res7_conv1_scale"\n\
type: "Scale"\n\
bottom: "res7_conv1"\n\
top: "res7_conv1"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
name: "res7_conv1_relu"\n\
type: "ReLU"\n\
bottom: "res7_conv1"\n\
top: "res7_conv1"\n\
}\n\
layer {\n\
name: "res7_conv2"\n\
type: "Convolution"\n\
bottom: "res7_conv1"\n\
top: "res7_conv2"\n\
convolution_param {\n\
bias_term: false\n\
num_output: 128\n\
pad: 1\n\
kernel_size: 3\n\
stride: 1\n\
}\n\
}\n\
layer {\n\
name: "res7_conv2_bn"\n\
type: "BatchNorm"\n\
bottom: "res7_conv2"\n\
top: "res7_conv2"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
name: "res7_conv2_scale"\n\
type: "Scale"\n\
bottom: "res7_conv2"\n\
top: "res7_conv2"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
name: "res7_conv2_relu"\n\
type: "ReLU"\n\
bottom: "res7_conv2"\n\
top: "res7_conv2"\n\
}\n\
layer {\n\
name: "res7_conv3"\n\
type: "Convolution"\n\
bottom: "res7_conv2"\n\
top: "res7_conv3"\n\
convolution_param {\n\
bias_term: false\n\
num_output: 512\n\
pad: 0\n\
kernel_size: 1\n\
stride: 1\n\
}\n\
}\n\
layer {\n\
name: "res7_eletwise"\n\
type: "Eltwise"\n\
bottom: "res6_eletwise"\n\
bottom: "res7_conv3"\n\
top: "res7_eletwise"\n\
eltwise_param {\n\
operation: SUM\n\
}\n\
}\n\
layer {\n\
name: "res8_bn"\n\
type: "BatchNorm"\n\
bottom: "res7_eletwise"\n\
top: "res8_bn"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
name: "res8_scale"\n\
type: "Scale"\n\
bottom: "res8_bn"\n\
top: "res8_bn"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
name: "res8_relu"\n\
type: "ReLU"\n\
bottom: "res8_bn"\n\
top: "res8_bn"\n\
}\n\
layer {\n\
name: "res8_conv1"\n\
type: "Convolution"\n\
bottom: "res8_bn"\n\
top: "res8_conv1"\n\
convolution_param {\n\
bias_term: false\n\
num_output: 256\n\
pad: 0\n\
kernel_size: 1\n\
stride: 1\n\
}\n\
}\n\
layer {\n\
name: "res8_conv1_bn"\n\
type: "BatchNorm"\n\
bottom: "res8_conv1"\n\
top: "res8_conv1"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
name: "res8_conv1_scale"\n\
type: "Scale"\n\
bottom: "res8_conv1"\n\
top: "res8_conv1"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
name: "res8_conv1_relu"\n\
type: "ReLU"\n\
bottom: "res8_conv1"\n\
top: "res8_conv1"\n\
}\n'
return string
def getResNet152v2Init():
string = '\
layer {\n\
name: "conv1"\n\
type: "Convolution"\n\
bottom: "image"\n\
top: "conv1"\n\
convolution_param {\n\
bias_term: false\n\
num_output: 64\n\
pad: 3\n\
kernel_size: 7\n\
stride: 2\n\
}\n\
}\n\
layer {\n\
name: "conv1_bn"\n\
type: "BatchNorm"\n\
bottom: "conv1"\n\
top: "conv1"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
name: "conv1_scale"\n\
type: "Scale"\n\
bottom: "conv1"\n\
top: "conv1"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
name: "conv1_relu"\n\
type: "ReLU"\n\
bottom: "conv1"\n\
top: "conv1"\n\
}\n\
layer {\n\
name: "pool1"\n\
type: "Pooling"\n\
bottom: "conv1"\n\
top: "pool1"\n\
pooling_param {\n\
pool: MAX\n\
kernel_size: 3\n\
stride: 2\n\
}\n\
}\n\
layer {\n\
name: "res1_conv1"\n\
type: "Convolution"\n\
bottom: "pool1"\n\
top: "res1_conv1"\n\
convolution_param {\n\
bias_term: false\n\
num_output: 64\n\
pad: 0\n\
kernel_size: 1\n\
stride: 1\n\
}\n\
}\n\
layer {\n\
name: "res1_conv1_bn"\n\
type: "BatchNorm"\n\
bottom: "res1_conv1"\n\
top: "res1_conv1"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
name: "res1_conv1_scale"\n\
type: "Scale"\n\
bottom: "res1_conv1"\n\
top: "res1_conv1"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
name: "res1_conv1_relu"\n\
type: "ReLU"\n\
bottom: "res1_conv1"\n\
top: "res1_conv1"\n\
}\n\
layer {\n\
name: "res1_conv2"\n\
type: "Convolution"\n\
bottom: "res1_conv1"\n\
top: "res1_conv2"\n\
convolution_param {\n\
bias_term: false\n\
num_output: 64\n\
pad: 1\n\
kernel_size: 3\n\
stride: 1\n\
}\n\
}\n\
layer {\n\
name: "res1_conv2_bn"\n\
type: "BatchNorm"\n\
bottom: "res1_conv2"\n\
top: "res1_conv2"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
name: "res1_conv2_scale"\n\
type: "Scale"\n\
bottom: "res1_conv2"\n\
top: "res1_conv2"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
name: "res1_conv2_relu"\n\
type: "ReLU"\n\
bottom: "res1_conv2"\n\
top: "res1_conv2"\n\
}\n\
layer {\n\
name: "res1_conv3"\n\
type: "Convolution"\n\
bottom: "res1_conv2"\n\
top: "res1_conv3"\n\
convolution_param {\n\
bias_term: false\n\
num_output: 256\n\
pad: 0\n\
kernel_size: 1\n\
stride: 1\n\
}\n\
}\n\
layer {\n\
name: "res1_match_conv"\n\
type: "Convolution"\n\
bottom: "pool1"\n\
top: "res1_match_conv"\n\
convolution_param {\n\
bias_term: false\n\
num_output: 256\n\
pad: 0\n\
kernel_size: 1\n\
stride: 1\n\
bias_filler {\n\
type: "constant"\n\
value: 0.2\n\
}\n\
}\n\
}\n\
layer {\n\
name: "res1_eletwise"\n\
type: "Eltwise"\n\
bottom: "res1_match_conv"\n\
bottom: "res1_conv3"\n\
top: "res1_eletwise"\n\
eltwise_param {\n\
operation: SUM\n\
}\n\
}\n\
layer {\n\
name: "res2_bn"\n\
type: "BatchNorm"\n\
bottom: "res1_eletwise"\n\
top: "res2_bn"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
name: "res2_scale"\n\
type: "Scale"\n\
bottom: "res2_bn"\n\
top: "res2_bn"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
name: "res2_relu"\n\
type: "ReLU"\n\
bottom: "res2_bn"\n\
top: "res2_bn"\n\
}\n\
layer {\n\
name: "res2_conv1"\n\
type: "Convolution"\n\
bottom: "res2_bn"\n\
top: "res2_conv1"\n\
convolution_param {\n\
bias_term: false\n\
num_output: 64\n\
pad: 0\n\
kernel_size: 1\n\
stride: 1\n\
}\n\
}\n\
layer {\n\
name: "res2_conv1_bn"\n\
type: "BatchNorm"\n\
bottom: "res2_conv1"\n\
top: "res2_conv1"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
name: "res2_conv1_scale"\n\
type: "Scale"\n\
bottom: "res2_conv1"\n\
top: "res2_conv1"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
name: "res2_conv1_relu"\n\
type: "ReLU"\n\
bottom: "res2_conv1"\n\
top: "res2_conv1"\n\
}\n\
layer {\n\
name: "res2_conv2"\n\
type: "Convolution"\n\
bottom: "res2_conv1"\n\
top: "res2_conv2"\n\
convolution_param {\n\
bias_term: false\n\
num_output: 64\n\
pad: 1\n\
kernel_size: 3\n\
stride: 1\n\
}\n\
}\n\
layer {\n\
name: "res2_conv2_bn"\n\
type: "BatchNorm"\n\
bottom: "res2_conv2"\n\
top: "res2_conv2"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
name: "res2_conv2_scale"\n\
type: "Scale"\n\
bottom: "res2_conv2"\n\
top: "res2_conv2"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
name: "res2_conv2_relu"\n\
type: "ReLU"\n\
bottom: "res2_conv2"\n\
top: "res2_conv2"\n\
}\n\
layer {\n\
name: "res2_conv3"\n\
type: "Convolution"\n\
bottom: "res2_conv2"\n\
top: "res2_conv3"\n\
convolution_param {\n\
bias_term: false\n\
num_output: 256\n\
pad: 0\n\
kernel_size: 1\n\
stride: 1\n\
}\n\
}\n\
layer {\n\
name: "res2_eletwise"\n\
type: "Eltwise"\n\
bottom: "res1_eletwise"\n\
bottom: "res2_conv3"\n\
top: "res2_eletwise"\n\
eltwise_param {\n\
operation: SUM\n\
}\n\
}\n\
layer {\n\
name: "res3_bn"\n\
type: "BatchNorm"\n\
bottom: "res2_eletwise"\n\
top: "res3_bn"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
name: "res3_scale"\n\
type: "Scale"\n\
bottom: "res3_bn"\n\
top: "res3_bn"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
name: "res3_relu"\n\
type: "ReLU"\n\
bottom: "res3_bn"\n\
top: "res3_bn"\n\
}\n\
layer {\n\
name: "res3_conv1"\n\
type: "Convolution"\n\
bottom: "res3_bn"\n\
top: "res3_conv1"\n\
convolution_param {\n\
bias_term: false\n\
num_output: 64\n\
pad: 0\n\
kernel_size: 1\n\
stride: 1\n\
}\n\
}\n\
layer {\n\
name: "res3_conv1_bn"\n\
type: "BatchNorm"\n\
bottom: "res3_conv1"\n\
top: "res3_conv1"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
name: "res3_conv1_scale"\n\
type: "Scale"\n\
bottom: "res3_conv1"\n\
top: "res3_conv1"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
name: "res3_conv1_relu"\n\
type: "ReLU"\n\
bottom: "res3_conv1"\n\
top: "res3_conv1"\n\
}\n\
layer {\n\
name: "res3_conv2"\n\
type: "Convolution"\n\
bottom: "res3_conv1"\n\
top: "res3_conv2"\n\
convolution_param {\n\
bias_term: false\n\
num_output: 64\n\
pad: 1\n\
kernel_size: 3\n\
stride: 1\n\
}\n\
}\n\
layer {\n\
name: "res3_conv2_bn"\n\
type: "BatchNorm"\n\
bottom: "res3_conv2"\n\
top: "res3_conv2"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
name: "res3_conv2_scale"\n\
type: "Scale"\n\
bottom: "res3_conv2"\n\
top: "res3_conv2"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
name: "res3_conv2_relu"\n\
type: "ReLU"\n\
bottom: "res3_conv2"\n\
top: "res3_conv2"\n\
}\n\
layer {\n\
name: "res3_conv3"\n\
type: "Convolution"\n\
bottom: "res3_conv2"\n\
top: "res3_conv3"\n\
convolution_param {\n\
bias_term: false\n\
num_output: 256\n\
pad: 0\n\
kernel_size: 1\n\
stride: 1\n\
}\n\
}\n\
layer {\n\
name: "res3_eletwise"\n\
type: "Eltwise"\n\
bottom: "res2_eletwise"\n\
bottom: "res3_conv3"\n\
top: "res3_eletwise"\n\
eltwise_param {\n\
operation: SUM\n\
}\n\
}\n\
layer {\n\
name: "res4_bn"\n\
type: "BatchNorm"\n\
bottom: "res3_eletwise"\n\
top: "res4_bn"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
name: "res4_scale"\n\
type: "Scale"\n\
bottom: "res4_bn"\n\
top: "res4_bn"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
name: "res4_relu"\n\
type: "ReLU"\n\
bottom: "res4_bn"\n\
top: "res4_bn"\n\
}\n\
layer {\n\
name: "res4_conv1"\n\
type: "Convolution"\n\
bottom: "res4_bn"\n\
top: "res4_conv1"\n\
convolution_param {\n\
bias_term: false\n\
num_output: 128\n\
pad: 0\n\
kernel_size: 1\n\
stride: 1\n\
}\n\
}\n\
layer {\n\
name: "res4_conv1_bn"\n\
type: "BatchNorm"\n\
bottom: "res4_conv1"\n\
top: "res4_conv1"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
name: "res4_conv1_scale"\n\
type: "Scale"\n\
bottom: "res4_conv1"\n\
top: "res4_conv1"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
name: "res4_conv1_relu"\n\
type: "ReLU"\n\
bottom: "res4_conv1"\n\
top: "res4_conv1"\n\
}\n\
layer {\n\
name: "res4_conv2"\n\
type: "Convolution"\n\
bottom: "res4_conv1"\n\
top: "res4_conv2"\n\
convolution_param {\n\
bias_term: false\n\
num_output: 128\n\
pad: 1\n\
kernel_size: 3\n\
stride: 2\n\
}\n\
}\n\
layer {\n\
name: "res4_conv2_bn"\n\
type: "BatchNorm"\n\
bottom: "res4_conv2"\n\
top: "res4_conv2"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
name: "res4_conv2_scale"\n\
type: "Scale"\n\
bottom: "res4_conv2"\n\
top: "res4_conv2"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
name: "res4_conv2_relu"\n\
type: "ReLU"\n\
bottom: "res4_conv2"\n\
top: "res4_conv2"\n\
}\n\
layer {\n\
name: "res4_conv3"\n\
type: "Convolution"\n\
bottom: "res4_conv2"\n\
top: "res4_conv3"\n\
convolution_param {\n\
bias_term: false\n\
num_output: 512\n\
pad: 0\n\
kernel_size: 1\n\
stride: 1\n\
}\n\
}\n\
layer {\n\
name: "res4_match_conv"\n\
type: "Convolution"\n\
bottom: "res4_bn"\n\
top: "res4_match_conv"\n\
convolution_param {\n\
bias_term: false\n\
num_output: 512\n\
pad: 0\n\
kernel_size: 1\n\
stride: 2\n\
bias_filler {\n\
type: "constant"\n\
value: 0.2\n\
}\n\
}\n\
}\n\
layer {\n\
name: "res4_eletwise"\n\
type: "Eltwise"\n\
bottom: "res4_match_conv"\n\
bottom: "res4_conv3"\n\
top: "res4_eletwise"\n\
eltwise_param {\n\
operation: SUM\n\
}\n\
}\n\
layer {\n\
name: "res5_bn"\n\
type: "BatchNorm"\n\
bottom: "res4_eletwise"\n\
top: "res5_bn"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
name: "res5_scale"\n\
type: "Scale"\n\
bottom: "res5_bn"\n\
top: "res5_bn"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
name: "res5_relu"\n\
type: "ReLU"\n\
bottom: "res5_bn"\n\
top: "res5_bn"\n\
}\n\
layer {\n\
name: "res5_conv1"\n\
type: "Convolution"\n\
bottom: "res5_bn"\n\
top: "res5_conv1"\n\
convolution_param {\n\
bias_term: false\n\
num_output: 128\n\
pad: 0\n\
kernel_size: 1\n\
stride: 1\n\
}\n\
}\n\
layer {\n\
name: "res5_conv1_bn"\n\
type: "BatchNorm"\n\
bottom: "res5_conv1"\n\
top: "res5_conv1"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
name: "res5_conv1_scale"\n\
type: "Scale"\n\
bottom: "res5_conv1"\n\
top: "res5_conv1"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
name: "res5_conv1_relu"\n\
type: "ReLU"\n\
bottom: "res5_conv1"\n\
top: "res5_conv1"\n\
}\n\
layer {\n\
name: "res5_conv2"\n\
type: "Convolution"\n\
bottom: "res5_conv1"\n\
top: "res5_conv2"\n\
convolution_param {\n\
bias_term: false\n\
num_output: 128\n\
pad: 1\n\
kernel_size: 3\n\
stride: 1\n\
}\n\
}\n\
layer {\n\
name: "res5_conv2_bn"\n\
type: "BatchNorm"\n\
bottom: "res5_conv2"\n\
top: "res5_conv2"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
name: "res5_conv2_scale"\n\
type: "Scale"\n\
bottom: "res5_conv2"\n\
top: "res5_conv2"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
name: "res5_conv2_relu"\n\
type: "ReLU"\n\
bottom: "res5_conv2"\n\
top: "res5_conv2"\n\
}\n\
layer {\n\
name: "res5_conv3"\n\
type: "Convolution"\n\
bottom: "res5_conv2"\n\
top: "res5_conv3"\n\
convolution_param {\n\
bias_term: false\n\
num_output: 512\n\
pad: 0\n\
kernel_size: 1\n\
stride: 1\n\
}\n\
}\n\
layer {\n\
name: "res5_eletwise"\n\
type: "Eltwise"\n\
bottom: "res4_eletwise"\n\
bottom: "res5_conv3"\n\
top: "res5_eletwise"\n\
eltwise_param {\n\
operation: SUM\n\
}\n\
}\n\
layer {\n\
name: "res6_bn"\n\
type: "BatchNorm"\n\
bottom: "res5_eletwise"\n\
top: "res6_bn"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
name: "res6_scale"\n\
type: "Scale"\n\
bottom: "res6_bn"\n\
top: "res6_bn"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
name: "res6_relu"\n\
type: "ReLU"\n\
bottom: "res6_bn"\n\
top: "res6_bn"\n\
}\n\
layer {\n\
name: "res6_conv1"\n\
type: "Convolution"\n\
bottom: "res6_bn"\n\
top: "res6_conv1"\n\
convolution_param {\n\
bias_term: false\n\
num_output: 128\n\
pad: 0\n\
kernel_size: 1\n\
stride: 1\n\
}\n\
}\n\
layer {\n\
name: "res6_conv1_bn"\n\
type: "BatchNorm"\n\
bottom: "res6_conv1"\n\
top: "res6_conv1"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
name: "res6_conv1_scale"\n\
type: "Scale"\n\
bottom: "res6_conv1"\n\
top: "res6_conv1"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
name: "res6_conv1_relu"\n\
type: "ReLU"\n\
bottom: "res6_conv1"\n\
top: "res6_conv1"\n\
}\n\
layer {\n\
name: "res6_conv2"\n\
type: "Convolution"\n\
bottom: "res6_conv1"\n\
top: "res6_conv2"\n\
convolution_param {\n\
bias_term: false\n\
num_output: 128\n\
pad: 1\n\
kernel_size: 3\n\
stride: 1\n\
}\n\
}\n\
layer {\n\
name: "res6_conv2_bn"\n\
type: "BatchNorm"\n\
bottom: "res6_conv2"\n\
top: "res6_conv2"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
name: "res6_conv2_scale"\n\
type: "Scale"\n\
bottom: "res6_conv2"\n\
top: "res6_conv2"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
name: "res6_conv2_relu"\n\
type: "ReLU"\n\
bottom: "res6_conv2"\n\
top: "res6_conv2"\n\
}\n\
layer {\n\
name: "res6_conv3"\n\
type: "Convolution"\n\
bottom: "res6_conv2"\n\
top: "res6_conv3"\n\
convolution_param {\n\
bias_term: false\n\
num_output: 512\n\
pad: 0\n\
kernel_size: 1\n\
stride: 1\n\
}\n\
}\n\
layer {\n\
name: "res6_eletwise"\n\
type: "Eltwise"\n\
bottom: "res5_eletwise"\n\
bottom: "res6_conv3"\n\
top: "res6_eletwise"\n\
eltwise_param {\n\
operation: SUM\n\
}\n\
}\n\
layer {\n\
name: "res7_bn"\n\
type: "BatchNorm"\n\
bottom: "res6_eletwise"\n\
top: "res7_bn"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
name: "res7_scale"\n\
type: "Scale"\n\
bottom: "res7_bn"\n\
top: "res7_bn"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
name: "res7_relu"\n\
type: "ReLU"\n\
bottom: "res7_bn"\n\
top: "res7_bn"\n\
}\n\
layer {\n\
name: "res7_conv1"\n\
type: "Convolution"\n\
bottom: "res7_bn"\n\
top: "res7_conv1"\n\
convolution_param {\n\
bias_term: false\n\
num_output: 128\n\
pad: 0\n\
kernel_size: 1\n\
stride: 1\n\
}\n\
}\n\
layer {\n\
name: "res7_conv1_bn"\n\
type: "BatchNorm"\n\
bottom: "res7_conv1"\n\
top: "res7_conv1"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
name: "res7_conv1_scale"\n\
type: "Scale"\n\
bottom: "res7_conv1"\n\
top: "res7_conv1"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
name: "res7_conv1_relu"\n\
type: "ReLU"\n\
bottom: "res7_conv1"\n\
top: "res7_conv1"\n\
}\n\
layer {\n\
name: "res7_conv2"\n\
type: "Convolution"\n\
bottom: "res7_conv1"\n\
top: "res7_conv2"\n\
convolution_param {\n\
bias_term: false\n\
num_output: 128\n\
pad: 1\n\
kernel_size: 3\n\
stride: 1\n\
}\n\
}\n\
layer {\n\
name: "res7_conv2_bn"\n\
type: "BatchNorm"\n\
bottom: "res7_conv2"\n\
top: "res7_conv2"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
name: "res7_conv2_scale"\n\
type: "Scale"\n\
bottom: "res7_conv2"\n\
top: "res7_conv2"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
name: "res7_conv2_relu"\n\
type: "ReLU"\n\
bottom: "res7_conv2"\n\
top: "res7_conv2"\n\
}\n\
layer {\n\
name: "res7_conv3"\n\
type: "Convolution"\n\
bottom: "res7_conv2"\n\
top: "res7_conv3"\n\
convolution_param {\n\
bias_term: false\n\
num_output: 512\n\
pad: 0\n\
kernel_size: 1\n\
stride: 1\n\
}\n\
}\n\
layer {\n\
name: "res7_eletwise"\n\
type: "Eltwise"\n\
bottom: "res6_eletwise"\n\
bottom: "res7_conv3"\n\
top: "res7_eletwise"\n\
eltwise_param {\n\
operation: SUM\n\
}\n\
}\n\
layer {\n\
name: "res8_bn"\n\
type: "BatchNorm"\n\
bottom: "res7_eletwise"\n\
top: "res8_bn"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
name: "res8_scale"\n\
type: "Scale"\n\
bottom: "res8_bn"\n\
top: "res8_bn"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
name: "res8_relu"\n\
type: "ReLU"\n\
bottom: "res8_bn"\n\
top: "res8_bn"\n\
}\n\
layer {\n\
name: "res8_conv1"\n\
type: "Convolution"\n\
bottom: "res8_bn"\n\
top: "res8_conv1"\n\
convolution_param {\n\
bias_term: false\n\
num_output: 128\n\
pad: 0\n\
kernel_size: 1\n\
stride: 1\n\
}\n\
}\n\
layer {\n\
name: "res8_conv1_bn"\n\
type: "BatchNorm"\n\
bottom: "res8_conv1"\n\
top: "res8_conv1"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
name: "res8_conv1_scale"\n\
type: "Scale"\n\
bottom: "res8_conv1"\n\
top: "res8_conv1"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
name: "res8_conv1_relu"\n\
type: "ReLU"\n\
bottom: "res8_conv1"\n\
top: "res8_conv1"\n\
}\n\
layer {\n\
name: "res8_conv2"\n\
type: "Convolution"\n\
bottom: "res8_conv1"\n\
top: "res8_conv2"\n\
convolution_param {\n\
bias_term: false\n\
num_output: 128\n\
pad: 1\n\
kernel_size: 3\n\
stride: 1\n\
}\n\
}\n\
layer {\n\
name: "res8_conv2_bn"\n\
type: "BatchNorm"\n\
bottom: "res8_conv2"\n\
top: "res8_conv2"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
name: "res8_conv2_scale"\n\
type: "Scale"\n\
bottom: "res8_conv2"\n\
top: "res8_conv2"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
name: "res8_conv2_relu"\n\
type: "ReLU"\n\
bottom: "res8_conv2"\n\
top: "res8_conv2"\n\
}\n\
layer {\n\
name: "res8_conv3"\n\
type: "Convolution"\n\
bottom: "res8_conv2"\n\
top: "res8_conv3"\n\
convolution_param {\n\
bias_term: false\n\
num_output: 512\n\
pad: 0\n\
kernel_size: 1\n\
stride: 1\n\
}\n\
}\n\
layer {\n\
name: "res8_eletwise"\n\
type: "Eltwise"\n\
bottom: "res7_eletwise"\n\
bottom: "res8_conv3"\n\
top: "res8_eletwise"\n\
eltwise_param {\n\
operation: SUM\n\
}\n\
}\n\
layer {\n\
name: "res9_bn"\n\
type: "BatchNorm"\n\
bottom: "res8_eletwise"\n\
top: "res9_bn"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
name: "res9_scale"\n\
type: "Scale"\n\
bottom: "res9_bn"\n\
top: "res9_bn"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
name: "res9_relu"\n\
type: "ReLU"\n\
bottom: "res9_bn"\n\
top: "res9_bn"\n\
}\n\
layer {\n\
name: "res9_conv1"\n\
type: "Convolution"\n\
bottom: "res9_bn"\n\
top: "res9_conv1"\n\
convolution_param {\n\
bias_term: false\n\
num_output: 128\n\
pad: 0\n\
kernel_size: 1\n\
stride: 1\n\
}\n\
}\n\
layer {\n\
name: "res9_conv1_bn"\n\
type: "BatchNorm"\n\
bottom: "res9_conv1"\n\
top: "res9_conv1"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
name: "res9_conv1_scale"\n\
type: "Scale"\n\
bottom: "res9_conv1"\n\
top: "res9_conv1"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
name: "res9_conv1_relu"\n\
type: "ReLU"\n\
bottom: "res9_conv1"\n\
top: "res9_conv1"\n\
}\n\
layer {\n\
name: "res9_conv2"\n\
type: "Convolution"\n\
bottom: "res9_conv1"\n\
top: "res9_conv2"\n\
convolution_param {\n\
bias_term: false\n\
num_output: 128\n\
pad: 1\n\
kernel_size: 3\n\
stride: 1\n\
}\n\
}\n\
layer {\n\
name: "res9_conv2_bn"\n\
type: "BatchNorm"\n\
bottom: "res9_conv2"\n\
top: "res9_conv2"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
name: "res9_conv2_scale"\n\
type: "Scale"\n\
bottom: "res9_conv2"\n\
top: "res9_conv2"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
name: "res9_conv2_relu"\n\
type: "ReLU"\n\
bottom: "res9_conv2"\n\
top: "res9_conv2"\n\
}\n\
layer {\n\
name: "res9_conv3"\n\
type: "Convolution"\n\
bottom: "res9_conv2"\n\
top: "res9_conv3"\n\
convolution_param {\n\
bias_term: false\n\
num_output: 512\n\
pad: 0\n\
kernel_size: 1\n\
stride: 1\n\
}\n\
}\n\
layer {\n\
name: "res9_eletwise"\n\
type: "Eltwise"\n\
bottom: "res8_eletwise"\n\
bottom: "res9_conv3"\n\
top: "res9_eletwise"\n\
eltwise_param {\n\
operation: SUM\n\
}\n\
}\n\
layer {\n\
name: "res10_bn"\n\
type: "BatchNorm"\n\
bottom: "res9_eletwise"\n\
top: "res10_bn"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
name: "res10_scale"\n\
type: "Scale"\n\
bottom: "res10_bn"\n\
top: "res10_bn"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
name: "res10_relu"\n\
type: "ReLU"\n\
bottom: "res10_bn"\n\
top: "res10_bn"\n\
}\n\
layer {\n\
name: "res10_conv1"\n\
type: "Convolution"\n\
bottom: "res10_bn"\n\
top: "res10_conv1"\n\
convolution_param {\n\
bias_term: false\n\
num_output: 128\n\
pad: 0\n\
kernel_size: 1\n\
stride: 1\n\
}\n\
}\n\
layer {\n\
name: "res10_conv1_bn"\n\
type: "BatchNorm"\n\
bottom: "res10_conv1"\n\
top: "res10_conv1"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
name: "res10_conv1_scale"\n\
type: "Scale"\n\
bottom: "res10_conv1"\n\
top: "res10_conv1"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
name: "res10_conv1_relu"\n\
type: "ReLU"\n\
bottom: "res10_conv1"\n\
top: "res10_conv1"\n\
}\n\
layer {\n\
name: "res10_conv2"\n\
type: "Convolution"\n\
bottom: "res10_conv1"\n\
top: "res10_conv2"\n\
convolution_param {\n\
bias_term: false\n\
num_output: 128\n\
pad: 1\n\
kernel_size: 3\n\
stride: 1\n\
}\n\
}\n\
layer {\n\
name: "res10_conv2_bn"\n\
type: "BatchNorm"\n\
bottom: "res10_conv2"\n\
top: "res10_conv2"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
name: "res10_conv2_scale"\n\
type: "Scale"\n\
bottom: "res10_conv2"\n\
top: "res10_conv2"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
name: "res10_conv2_relu"\n\
type: "ReLU"\n\
bottom: "res10_conv2"\n\
top: "res10_conv2"\n\
}\n\
layer {\n\
name: "res10_conv3"\n\
type: "Convolution"\n\
bottom: "res10_conv2"\n\
top: "res10_conv3"\n\
convolution_param {\n\
bias_term: false\n\
num_output: 512\n\
pad: 0\n\
kernel_size: 1\n\
stride: 1\n\
}\n\
}\n\
layer {\n\
name: "res10_eletwise"\n\
type: "Eltwise"\n\
bottom: "res9_eletwise"\n\
bottom: "res10_conv3"\n\
top: "res10_eletwise"\n\
eltwise_param {\n\
operation: SUM\n\
}\n\
}\n\
layer {\n\
name: "res11_bn"\n\
type: "BatchNorm"\n\
bottom: "res10_eletwise"\n\
top: "res11_bn"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
name: "res11_scale"\n\
type: "Scale"\n\
bottom: "res11_bn"\n\
top: "res11_bn"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
name: "res11_relu"\n\
type: "ReLU"\n\
bottom: "res11_bn"\n\
top: "res11_bn"\n\
}\n\
layer {\n\
name: "res11_conv1"\n\
type: "Convolution"\n\
bottom: "res11_bn"\n\
top: "res11_conv1"\n\
convolution_param {\n\
bias_term: false\n\
num_output: 128\n\
pad: 0\n\
kernel_size: 1\n\
stride: 1\n\
}\n\
}\n\
layer {\n\
name: "res11_conv1_bn"\n\
type: "BatchNorm"\n\
bottom: "res11_conv1"\n\
top: "res11_conv1"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
name: "res11_conv1_scale"\n\
type: "Scale"\n\
bottom: "res11_conv1"\n\
top: "res11_conv1"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
name: "res11_conv1_relu"\n\
type: "ReLU"\n\
bottom: "res11_conv1"\n\
top: "res11_conv1"\n\
}\n\
layer {\n\
name: "res11_conv2"\n\
type: "Convolution"\n\
bottom: "res11_conv1"\n\
top: "res11_conv2"\n\
convolution_param {\n\
bias_term: false\n\
num_output: 128\n\
pad: 1\n\
kernel_size: 3\n\
stride: 1\n\
}\n\
}\n\
layer {\n\
name: "res11_conv2_bn"\n\
type: "BatchNorm"\n\
bottom: "res11_conv2"\n\
top: "res11_conv2"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
name: "res11_conv2_scale"\n\
type: "Scale"\n\
bottom: "res11_conv2"\n\
top: "res11_conv2"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
name: "res11_conv2_relu"\n\
type: "ReLU"\n\
bottom: "res11_conv2"\n\
top: "res11_conv2"\n\
}\n\
layer {\n\
name: "res11_conv3"\n\
type: "Convolution"\n\
bottom: "res11_conv2"\n\
top: "res11_conv3"\n\
convolution_param {\n\
bias_term: false\n\
num_output: 512\n\
pad: 0\n\
kernel_size: 1\n\
stride: 1\n\
}\n\
}\n\
layer {\n\
name: "res11_eletwise"\n\
type: "Eltwise"\n\
bottom: "res10_eletwise"\n\
bottom: "res11_conv3"\n\
top: "res11_eletwise"\n\
eltwise_param {\n\
operation: SUM\n\
}\n\
}\n\
layer {\n\
name: "res12_bn"\n\
type: "BatchNorm"\n\
bottom: "res11_eletwise"\n\
top: "res12_bn"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
name: "res12_scale"\n\
type: "Scale"\n\
bottom: "res12_bn"\n\
top: "res12_bn"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
name: "res12_relu"\n\
type: "ReLU"\n\
bottom: "res12_bn"\n\
top: "res12_bn"\n\
}\n\
layer {\n\
name: "res12_conv1"\n\
type: "Convolution"\n\
bottom: "res12_bn"\n\
top: "res12_conv1"\n\
convolution_param {\n\
bias_term: false\n\
num_output: 256\n\
pad: 0\n\
kernel_size: 1\n\
stride: 1\n\
}\n\
}\n\
layer {\n\
name: "res12_conv1_bn"\n\
type: "BatchNorm"\n\
bottom: "res12_conv1"\n\
top: "res12_conv1"\n\
batch_norm_param {\n\
use_global_stats: true\n\
}\n\
}\n\
layer {\n\
name: "res12_conv1_scale"\n\
type: "Scale"\n\
bottom: "res12_conv1"\n\
top: "res12_conv1"\n\
scale_param {\n\
bias_term: true\n\
}\n\
}\n\
layer {\n\
name: "res12_conv1_relu"\n\
type: "ReLU"\n\
bottom: "res12_conv1"\n\
top: "res12_conv1"\n\
}\n'
return string
| def get_res_net50_init():
string = 'layer {\n bottom: "image"\n top: "conv1"\n name: "conv1"\n type: "Convolution"\n convolution_param {\n num_output: 64\n kernel_size: 7\n pad: 3\n stride: 2\n }\n}\n\nlayer {\n bottom: "conv1"\n top: "conv1"\n name: "bn_conv1"\n type: "BatchNorm"\n batch_norm_param {\n use_global_stats: true\n }\n}\n\nlayer {\n bottom: "conv1"\n top: "conv1"\n name: "scale_conv1"\n type: "Scale"\n scale_param {\n bias_term: true\n }\n}\n\nlayer {\n bottom: "conv1"\n top: "conv1"\n name: "conv1_relu"\n type: "ReLU"\n}\n\nlayer {\n bottom: "conv1"\n top: "pool1"\n name: "pool1"\n type: "Pooling"\n pooling_param {\n kernel_size: 3\n stride: 2\n pool: MAX\n }\n}\n\nlayer {\n bottom: "pool1"\n top: "res2a_branch1"\n name: "res2a_branch1"\n type: "Convolution"\n convolution_param {\n num_output: 256\n kernel_size: 1\n pad: 0\n stride: 1\n bias_term: false\n }\n}\n\nlayer {\n bottom: "res2a_branch1"\n top: "res2a_branch1"\n name: "bn2a_branch1"\n type: "BatchNorm"\n batch_norm_param {\n use_global_stats: true\n }\n}\n\nlayer {\n bottom: "res2a_branch1"\n top: "res2a_branch1"\n name: "scale2a_branch1"\n type: "Scale"\n scale_param {\n bias_term: true\n }\n}\n\nlayer {\n bottom: "pool1"\n top: "res2a_branch2a"\n name: "res2a_branch2a"\n type: "Convolution"\n convolution_param {\n num_output: 64\n kernel_size: 1\n pad: 0\n stride: 1\n bias_term: false\n }\n}\n\nlayer {\n bottom: "res2a_branch2a"\n top: "res2a_branch2a"\n name: "bn2a_branch2a"\n type: "BatchNorm"\n batch_norm_param {\n use_global_stats: true\n }\n}\n\nlayer {\n bottom: "res2a_branch2a"\n top: "res2a_branch2a"\n name: "scale2a_branch2a"\n type: "Scale"\n scale_param {\n bias_term: true\n }\n}\n\nlayer {\n bottom: "res2a_branch2a"\n top: "res2a_branch2a"\n name: "res2a_branch2a_relu"\n type: "ReLU"\n}\n\nlayer {\n bottom: "res2a_branch2a"\n top: "res2a_branch2b"\n name: "res2a_branch2b"\n type: "Convolution"\n convolution_param {\n num_output: 64\n kernel_size: 3\n pad: 1\n stride: 1\n bias_term: false\n }\n}\n\nlayer {\n bottom: "res2a_branch2b"\n top: "res2a_branch2b"\n name: "bn2a_branch2b"\n type: "BatchNorm"\n batch_norm_param {\n use_global_stats: true\n }\n}\n\nlayer {\n bottom: "res2a_branch2b"\n top: "res2a_branch2b"\n name: "scale2a_branch2b"\n type: "Scale"\n scale_param {\n bias_term: true\n }\n}\n\nlayer {\n bottom: "res2a_branch2b"\n top: "res2a_branch2b"\n name: "res2a_branch2b_relu"\n type: "ReLU"\n}\n\nlayer {\n bottom: "res2a_branch2b"\n top: "res2a_branch2c"\n name: "res2a_branch2c"\n type: "Convolution"\n convolution_param {\n num_output: 256\n kernel_size: 1\n pad: 0\n stride: 1\n bias_term: false\n }\n}\n\nlayer {\n bottom: "res2a_branch2c"\n top: "res2a_branch2c"\n name: "bn2a_branch2c"\n type: "BatchNorm"\n batch_norm_param {\n use_global_stats: true\n }\n}\n\nlayer {\n bottom: "res2a_branch2c"\n top: "res2a_branch2c"\n name: "scale2a_branch2c"\n type: "Scale"\n scale_param {\n bias_term: true\n }\n}\n\nlayer {\n bottom: "res2a_branch1"\n bottom: "res2a_branch2c"\n top: "res2a"\n name: "res2a"\n type: "Eltwise"\n}\n\nlayer {\n bottom: "res2a"\n top: "res2a"\n name: "res2a_relu"\n type: "ReLU"\n}\n\nlayer {\n bottom: "res2a"\n top: "res2b_branch2a"\n name: "res2b_branch2a"\n type: "Convolution"\n convolution_param {\n num_output: 64\n kernel_size: 1\n pad: 0\n stride: 1\n bias_term: false\n }\n}\n\nlayer {\n bottom: "res2b_branch2a"\n top: "res2b_branch2a"\n name: "bn2b_branch2a"\n type: "BatchNorm"\n batch_norm_param {\n use_global_stats: true\n }\n}\n\nlayer {\n bottom: "res2b_branch2a"\n top: "res2b_branch2a"\n name: "scale2b_branch2a"\n type: "Scale"\n scale_param {\n bias_term: true\n }\n}\n\nlayer {\n bottom: "res2b_branch2a"\n top: "res2b_branch2a"\n name: "res2b_branch2a_relu"\n type: "ReLU"\n}\n\nlayer {\n bottom: "res2b_branch2a"\n top: "res2b_branch2b"\n name: "res2b_branch2b"\n type: "Convolution"\n convolution_param {\n num_output: 64\n kernel_size: 3\n pad: 1\n stride: 1\n bias_term: false\n }\n}\n\nlayer {\n bottom: "res2b_branch2b"\n top: "res2b_branch2b"\n name: "bn2b_branch2b"\n type: "BatchNorm"\n batch_norm_param {\n use_global_stats: true\n }\n}\n\nlayer {\n bottom: "res2b_branch2b"\n top: "res2b_branch2b"\n name: "scale2b_branch2b"\n type: "Scale"\n scale_param {\n bias_term: true\n }\n}\n\nlayer {\n bottom: "res2b_branch2b"\n top: "res2b_branch2b"\n name: "res2b_branch2b_relu"\n type: "ReLU"\n}\n\nlayer {\n bottom: "res2b_branch2b"\n top: "res2b_branch2c"\n name: "res2b_branch2c"\n type: "Convolution"\n convolution_param {\n num_output: 256\n kernel_size: 1\n pad: 0\n stride: 1\n bias_term: false\n }\n}\n\nlayer {\n bottom: "res2b_branch2c"\n top: "res2b_branch2c"\n name: "bn2b_branch2c"\n type: "BatchNorm"\n batch_norm_param {\n use_global_stats: true\n }\n}\n\nlayer {\n bottom: "res2b_branch2c"\n top: "res2b_branch2c"\n name: "scale2b_branch2c"\n type: "Scale"\n scale_param {\n bias_term: true\n }\n}\n\nlayer {\n bottom: "res2a"\n bottom: "res2b_branch2c"\n top: "res2b"\n name: "res2b"\n type: "Eltwise"\n}\n\nlayer {\n bottom: "res2b"\n top: "res2b"\n name: "res2b_relu"\n type: "ReLU"\n}\n\nlayer {\n bottom: "res2b"\n top: "res2c_branch2a"\n name: "res2c_branch2a"\n type: "Convolution"\n convolution_param {\n num_output: 64\n kernel_size: 1\n pad: 0\n stride: 1\n bias_term: false\n }\n}\n\nlayer {\n bottom: "res2c_branch2a"\n top: "res2c_branch2a"\n name: "bn2c_branch2a"\n type: "BatchNorm"\n batch_norm_param {\n use_global_stats: true\n }\n}\n\nlayer {\n bottom: "res2c_branch2a"\n top: "res2c_branch2a"\n name: "scale2c_branch2a"\n type: "Scale"\n scale_param {\n bias_term: true\n }\n}\n\nlayer {\n bottom: "res2c_branch2a"\n top: "res2c_branch2a"\n name: "res2c_branch2a_relu"\n type: "ReLU"\n}\n\nlayer {\n bottom: "res2c_branch2a"\n top: "res2c_branch2b"\n name: "res2c_branch2b"\n type: "Convolution"\n convolution_param {\n num_output: 64\n kernel_size: 3\n pad: 1\n stride: 1\n bias_term: false\n }\n}\n\nlayer {\n bottom: "res2c_branch2b"\n top: "res2c_branch2b"\n name: "bn2c_branch2b"\n type: "BatchNorm"\n batch_norm_param {\n use_global_stats: true\n }\n}\n\nlayer {\n bottom: "res2c_branch2b"\n top: "res2c_branch2b"\n name: "scale2c_branch2b"\n type: "Scale"\n scale_param {\n bias_term: true\n }\n}\n\nlayer {\n bottom: "res2c_branch2b"\n top: "res2c_branch2b"\n name: "res2c_branch2b_relu"\n type: "ReLU"\n}\n\nlayer {\n bottom: "res2c_branch2b"\n top: "res2c_branch2c"\n name: "res2c_branch2c"\n type: "Convolution"\n convolution_param {\n num_output: 256\n kernel_size: 1\n pad: 0\n stride: 1\n bias_term: false\n }\n}\n\nlayer {\n bottom: "res2c_branch2c"\n top: "res2c_branch2c"\n name: "bn2c_branch2c"\n type: "BatchNorm"\n batch_norm_param {\n use_global_stats: true\n }\n}\n\nlayer {\n bottom: "res2c_branch2c"\n top: "res2c_branch2c"\n name: "scale2c_branch2c"\n type: "Scale"\n scale_param {\n bias_term: true\n }\n}\n\nlayer {\n bottom: "res2b"\n bottom: "res2c_branch2c"\n top: "res2c"\n name: "res2c"\n type: "Eltwise"\n}\n\nlayer {\n bottom: "res2c"\n top: "res2c"\n name: "res2c_relu"\n type: "ReLU"\n}\n\nlayer {\n bottom: "res2c"\n top: "res3a_branch1"\n name: "res3a_branch1"\n type: "Convolution"\n convolution_param {\n num_output: 512\n kernel_size: 1\n pad: 0\n stride: 2\n bias_term: false\n }\n}\n\nlayer {\n bottom: "res3a_branch1"\n top: "res3a_branch1"\n name: "bn3a_branch1"\n type: "BatchNorm"\n batch_norm_param {\n use_global_stats: true\n }\n}\n\nlayer {\n bottom: "res3a_branch1"\n top: "res3a_branch1"\n name: "scale3a_branch1"\n type: "Scale"\n scale_param {\n bias_term: true\n }\n}\n\nlayer {\n bottom: "res2c"\n top: "res3a_branch2a"\n name: "res3a_branch2a"\n type: "Convolution"\n convolution_param {\n num_output: 128\n kernel_size: 1\n pad: 0\n stride: 2\n bias_term: false\n }\n}\n\nlayer {\n bottom: "res3a_branch2a"\n top: "res3a_branch2a"\n name: "bn3a_branch2a"\n type: "BatchNorm"\n batch_norm_param {\n use_global_stats: true\n }\n}\n\nlayer {\n bottom: "res3a_branch2a"\n top: "res3a_branch2a"\n name: "scale3a_branch2a"\n type: "Scale"\n scale_param {\n bias_term: true\n }\n}\n\nlayer {\n bottom: "res3a_branch2a"\n top: "res3a_branch2a"\n name: "res3a_branch2a_relu"\n type: "ReLU"\n}\n\nlayer {\n bottom: "res3a_branch2a"\n top: "res3a_branch2b"\n name: "res3a_branch2b"\n type: "Convolution"\n convolution_param {\n num_output: 128\n kernel_size: 3\n pad: 1\n stride: 1\n bias_term: false\n }\n}\n\nlayer {\n bottom: "res3a_branch2b"\n top: "res3a_branch2b"\n name: "bn3a_branch2b"\n type: "BatchNorm"\n batch_norm_param {\n use_global_stats: true\n }\n}\n\nlayer {\n bottom: "res3a_branch2b"\n top: "res3a_branch2b"\n name: "scale3a_branch2b"\n type: "Scale"\n scale_param {\n bias_term: true\n }\n}\n\nlayer {\n bottom: "res3a_branch2b"\n top: "res3a_branch2b"\n name: "res3a_branch2b_relu"\n type: "ReLU"\n}\n\nlayer {\n bottom: "res3a_branch2b"\n top: "res3a_branch2c"\n name: "res3a_branch2c"\n type: "Convolution"\n convolution_param {\n num_output: 512\n kernel_size: 1\n pad: 0\n stride: 1\n bias_term: false\n }\n}\n\nlayer {\n bottom: "res3a_branch2c"\n top: "res3a_branch2c"\n name: "bn3a_branch2c"\n type: "BatchNorm"\n batch_norm_param {\n use_global_stats: true\n }\n}\n\nlayer {\n bottom: "res3a_branch2c"\n top: "res3a_branch2c"\n name: "scale3a_branch2c"\n type: "Scale"\n scale_param {\n bias_term: true\n }\n}\n\nlayer {\n bottom: "res3a_branch1"\n bottom: "res3a_branch2c"\n top: "res3a"\n name: "res3a"\n type: "Eltwise"\n}\n\nlayer {\n bottom: "res3a"\n top: "res3a"\n name: "res3a_relu"\n type: "ReLU"\n}\n\nlayer {\n bottom: "res3a"\n top: "res3b_branch2a"\n name: "res3b_branch2a"\n type: "Convolution"\n convolution_param {\n num_output: 128\n kernel_size: 1\n pad: 0\n stride: 1\n bias_term: false\n }\n}\n\nlayer {\n bottom: "res3b_branch2a"\n top: "res3b_branch2a"\n name: "bn3b_branch2a"\n type: "BatchNorm"\n batch_norm_param {\n use_global_stats: true\n }\n}\n\nlayer {\n bottom: "res3b_branch2a"\n top: "res3b_branch2a"\n name: "scale3b_branch2a"\n type: "Scale"\n scale_param {\n bias_term: true\n }\n}\n\nlayer {\n bottom: "res3b_branch2a"\n top: "res3b_branch2a"\n name: "res3b_branch2a_relu"\n type: "ReLU"\n}\n\nlayer {\n bottom: "res3b_branch2a"\n top: "res3b_branch2b"\n name: "res3b_branch2b"\n type: "Convolution"\n convolution_param {\n num_output: 128\n kernel_size: 3\n pad: 1\n stride: 1\n bias_term: false\n }\n}\n\nlayer {\n bottom: "res3b_branch2b"\n top: "res3b_branch2b"\n name: "bn3b_branch2b"\n type: "BatchNorm"\n batch_norm_param {\n use_global_stats: true\n }\n}\n\nlayer {\n bottom: "res3b_branch2b"\n top: "res3b_branch2b"\n name: "scale3b_branch2b"\n type: "Scale"\n scale_param {\n bias_term: true\n }\n}\n\nlayer {\n bottom: "res3b_branch2b"\n top: "res3b_branch2b"\n name: "res3b_branch2b_relu"\n type: "ReLU"\n}\n\nlayer {\n bottom: "res3b_branch2b"\n top: "res3b_branch2c"\n name: "res3b_branch2c"\n type: "Convolution"\n convolution_param {\n num_output: 512\n kernel_size: 1\n pad: 0\n stride: 1\n bias_term: false\n }\n}\n\nlayer {\n bottom: "res3b_branch2c"\n top: "res3b_branch2c"\n name: "bn3b_branch2c"\n type: "BatchNorm"\n batch_norm_param {\n use_global_stats: true\n }\n}\n\nlayer {\n bottom: "res3b_branch2c"\n top: "res3b_branch2c"\n name: "scale3b_branch2c"\n type: "Scale"\n scale_param {\n bias_term: true\n }\n}\n\nlayer {\n bottom: "res3a"\n bottom: "res3b_branch2c"\n top: "res3b"\n name: "res3b"\n type: "Eltwise"\n}\n\nlayer {\n bottom: "res3b"\n top: "res3b"\n name: "res3b_relu"\n type: "ReLU"\n}\n\nlayer {\n bottom: "res3b"\n top: "res3c_branch2a"\n name: "res3c_branch2a"\n type: "Convolution"\n convolution_param {\n num_output: 128\n kernel_size: 1\n pad: 0\n stride: 1\n bias_term: false\n }\n}\n\nlayer {\n bottom: "res3c_branch2a"\n top: "res3c_branch2a"\n name: "bn3c_branch2a"\n type: "BatchNorm"\n batch_norm_param {\n use_global_stats: true\n }\n}\n\nlayer {\n bottom: "res3c_branch2a"\n top: "res3c_branch2a"\n name: "scale3c_branch2a"\n type: "Scale"\n scale_param {\n bias_term: true\n }\n}\n\nlayer {\n bottom: "res3c_branch2a"\n top: "res3c_branch2a"\n name: "res3c_branch2a_relu"\n type: "ReLU"\n}\n\nlayer {\n bottom: "res3c_branch2a"\n top: "res3c_branch2b"\n name: "res3c_branch2b"\n type: "Convolution"\n convolution_param {\n num_output: 128\n kernel_size: 3\n pad: 1\n stride: 1\n bias_term: false\n }\n}\n\nlayer {\n bottom: "res3c_branch2b"\n top: "res3c_branch2b"\n name: "bn3c_branch2b"\n type: "BatchNorm"\n batch_norm_param {\n use_global_stats: true\n }\n}\n\nlayer {\n bottom: "res3c_branch2b"\n top: "res3c_branch2b"\n name: "scale3c_branch2b"\n type: "Scale"\n scale_param {\n bias_term: true\n }\n}\n\nlayer {\n bottom: "res3c_branch2b"\n top: "res3c_branch2b"\n name: "res3c_branch2b_relu"\n type: "ReLU"\n}\n\nlayer {\n bottom: "res3c_branch2b"\n top: "res3c_branch2c"\n name: "res3c_branch2c"\n type: "Convolution"\n convolution_param {\n num_output: 512\n kernel_size: 1\n pad: 0\n stride: 1\n bias_term: false\n }\n}\n\nlayer {\n bottom: "res3c_branch2c"\n top: "res3c_branch2c"\n name: "bn3c_branch2c"\n type: "BatchNorm"\n batch_norm_param {\n use_global_stats: true\n }\n}\n\nlayer {\n bottom: "res3c_branch2c"\n top: "res3c_branch2c"\n name: "scale3c_branch2c"\n type: "Scale"\n scale_param {\n bias_term: true\n }\n}\n\nlayer {\n bottom: "res3b"\n bottom: "res3c_branch2c"\n top: "res3c"\n name: "res3c"\n type: "Eltwise"\n}\n\nlayer {\n bottom: "res3c"\n top: "res3c"\n name: "res3c_relu"\n type: "ReLU"\n}\n\nlayer {\n bottom: "res3c"\n top: "res3d_branch2a"\n name: "res3d_branch2a"\n type: "Convolution"\n convolution_param {\n num_output: 128\n kernel_size: 1\n pad: 0\n stride: 1\n bias_term: false\n }\n}\n\nlayer {\n bottom: "res3d_branch2a"\n top: "res3d_branch2a"\n name: "bn3d_branch2a"\n type: "BatchNorm"\n batch_norm_param {\n use_global_stats: true\n }\n}\n\nlayer {\n bottom: "res3d_branch2a"\n top: "res3d_branch2a"\n name: "scale3d_branch2a"\n type: "Scale"\n scale_param {\n bias_term: true\n }\n}\n\nlayer {\n bottom: "res3d_branch2a"\n top: "res3d_branch2a"\n name: "res3d_branch2a_relu"\n type: "ReLU"\n}\n\nlayer {\n bottom: "res3d_branch2a"\n top: "res3d_branch2b"\n name: "res3d_branch2b"\n type: "Convolution"\n convolution_param {\n num_output: 128\n kernel_size: 3\n pad: 1\n stride: 1\n bias_term: false\n }\n}\n\nlayer {\n bottom: "res3d_branch2b"\n top: "res3d_branch2b"\n name: "bn3d_branch2b"\n type: "BatchNorm"\n batch_norm_param {\n use_global_stats: true\n }\n}\n\nlayer {\n bottom: "res3d_branch2b"\n top: "res3d_branch2b"\n name: "scale3d_branch2b"\n type: "Scale"\n scale_param {\n bias_term: true\n }\n}\n\nlayer {\n bottom: "res3d_branch2b"\n top: "res3d_branch2b"\n name: "res3d_branch2b_relu"\n type: "ReLU"\n}\n\nlayer {\n bottom: "res3d_branch2b"\n top: "res3d_branch2c"\n name: "res3d_branch2c"\n type: "Convolution"\n convolution_param {\n num_output: 512\n kernel_size: 1\n pad: 0\n stride: 1\n bias_term: false\n }\n}\n\nlayer {\n bottom: "res3d_branch2c"\n top: "res3d_branch2c"\n name: "bn3d_branch2c"\n type: "BatchNorm"\n batch_norm_param {\n use_global_stats: true\n }\n}\n\nlayer {\n bottom: "res3d_branch2c"\n top: "res3d_branch2c"\n name: "scale3d_branch2c"\n type: "Scale"\n scale_param {\n bias_term: true\n }\n}\n\nlayer {\n bottom: "res3c"\n bottom: "res3d_branch2c"\n top: "res3d"\n name: "res3d"\n type: "Eltwise"\n}\n\nlayer {\n bottom: "res3d"\n top: "res3d"\n name: "res3d_relu"\n type: "ReLU"\n}\n'
return string
def get_res_net152_init():
string = 'layer {\n bottom: "image"\n top: "conv1"\n name: "conv1"\n type: "Convolution"\n convolution_param {\n num_output: 64\n kernel_size: 7\n pad: 3\n stride: 2\n bias_term: false\n }\n}\nlayer {\n bottom: "conv1"\n top: "conv1"\n name: "bn_conv1"\n type: "BatchNorm"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n bottom: "conv1"\n top: "conv1"\n name: "scale_conv1"\n type: "Scale"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n top: "conv1"\n bottom: "conv1"\n name: "conv1_relu"\n type: "ReLU"\n}\nlayer {\n bottom: "conv1"\n top: "pool1"\n name: "pool1"\n type: "Pooling"\n pooling_param {\n kernel_size: 3\n stride: 2\n pool: MAX\n }\n}\nlayer {\n bottom: "pool1"\n top: "res2a_branch1"\n name: "res2a_branch1"\n type: "Convolution"\n convolution_param {\n num_output: 256\n kernel_size: 1\n pad: 0\n stride: 1\n bias_term: false\n }\n}\nlayer {\n bottom: "res2a_branch1"\n top: "res2a_branch1"\n name: "bn2a_branch1"\n type: "BatchNorm"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n bottom: "res2a_branch1"\n top: "res2a_branch1"\n name: "scale2a_branch1"\n type: "Scale"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n bottom: "pool1"\n top: "res2a_branch2a"\n name: "res2a_branch2a"\n type: "Convolution"\n convolution_param {\n num_output: 64\n kernel_size: 1\n pad: 0\n stride: 1\n bias_term: false\n }\n}\nlayer {\n bottom: "res2a_branch2a"\n top: "res2a_branch2a"\n name: "bn2a_branch2a"\n type: "BatchNorm"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n bottom: "res2a_branch2a"\n top: "res2a_branch2a"\n name: "scale2a_branch2a"\n type: "Scale"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n top: "res2a_branch2a"\n bottom: "res2a_branch2a"\n name: "res2a_branch2a_relu"\n type: "ReLU"\n}\nlayer {\n bottom: "res2a_branch2a"\n top: "res2a_branch2b"\n name: "res2a_branch2b"\n type: "Convolution"\n convolution_param {\n num_output: 64\n kernel_size: 3\n pad: 1\n stride: 1\n bias_term: false\n }\n}\nlayer {\n bottom: "res2a_branch2b"\n top: "res2a_branch2b"\n name: "bn2a_branch2b"\n type: "BatchNorm"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n bottom: "res2a_branch2b"\n top: "res2a_branch2b"\n name: "scale2a_branch2b"\n type: "Scale"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n top: "res2a_branch2b"\n bottom: "res2a_branch2b"\n name: "res2a_branch2b_relu"\n type: "ReLU"\n}\nlayer {\n bottom: "res2a_branch2b"\n top: "res2a_branch2c"\n name: "res2a_branch2c"\n type: "Convolution"\n convolution_param {\n num_output: 256\n kernel_size: 1\n pad: 0\n stride: 1\n bias_term: false\n }\n}\nlayer {\n bottom: "res2a_branch2c"\n top: "res2a_branch2c"\n name: "bn2a_branch2c"\n type: "BatchNorm"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n bottom: "res2a_branch2c"\n top: "res2a_branch2c"\n name: "scale2a_branch2c"\n type: "Scale"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n bottom: "res2a_branch1"\n bottom: "res2a_branch2c"\n top: "res2a"\n name: "res2a"\n type: "Eltwise"\n}\nlayer {\n bottom: "res2a"\n top: "res2a"\n name: "res2a_relu"\n type: "ReLU"\n}\nlayer {\n bottom: "res2a"\n top: "res2b_branch2a"\n name: "res2b_branch2a"\n type: "Convolution"\n convolution_param {\n num_output: 64\n kernel_size: 1\n pad: 0\n stride: 1\n bias_term: false\n }\n}\nlayer {\n bottom: "res2b_branch2a"\n top: "res2b_branch2a"\n name: "bn2b_branch2a"\n type: "BatchNorm"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n bottom: "res2b_branch2a"\n top: "res2b_branch2a"\n name: "scale2b_branch2a"\n type: "Scale"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n top: "res2b_branch2a"\n bottom: "res2b_branch2a"\n name: "res2b_branch2a_relu"\n type: "ReLU"\n}\nlayer {\n bottom: "res2b_branch2a"\n top: "res2b_branch2b"\n name: "res2b_branch2b"\n type: "Convolution"\n convolution_param {\n num_output: 64\n kernel_size: 3\n pad: 1\n stride: 1\n bias_term: false\n }\n}\nlayer {\n bottom: "res2b_branch2b"\n top: "res2b_branch2b"\n name: "bn2b_branch2b"\n type: "BatchNorm"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n bottom: "res2b_branch2b"\n top: "res2b_branch2b"\n name: "scale2b_branch2b"\n type: "Scale"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n top: "res2b_branch2b"\n bottom: "res2b_branch2b"\n name: "res2b_branch2b_relu"\n type: "ReLU"\n}\nlayer {\n bottom: "res2b_branch2b"\n top: "res2b_branch2c"\n name: "res2b_branch2c"\n type: "Convolution"\n convolution_param {\n num_output: 256\n kernel_size: 1\n pad: 0\n stride: 1\n bias_term: false\n }\n}\nlayer {\n bottom: "res2b_branch2c"\n top: "res2b_branch2c"\n name: "bn2b_branch2c"\n type: "BatchNorm"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n bottom: "res2b_branch2c"\n top: "res2b_branch2c"\n name: "scale2b_branch2c"\n type: "Scale"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n bottom: "res2a"\n bottom: "res2b_branch2c"\n top: "res2b"\n name: "res2b"\n type: "Eltwise"\n}\nlayer {\n bottom: "res2b"\n top: "res2b"\n name: "res2b_relu"\n type: "ReLU"\n}\nlayer {\n bottom: "res2b"\n top: "res2c_branch2a"\n name: "res2c_branch2a"\n type: "Convolution"\n convolution_param {\n num_output: 64\n kernel_size: 1\n pad: 0\n stride: 1\n bias_term: false\n }\n}\nlayer {\n bottom: "res2c_branch2a"\n top: "res2c_branch2a"\n name: "bn2c_branch2a"\n type: "BatchNorm"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n bottom: "res2c_branch2a"\n top: "res2c_branch2a"\n name: "scale2c_branch2a"\n type: "Scale"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n top: "res2c_branch2a"\n bottom: "res2c_branch2a"\n name: "res2c_branch2a_relu"\n type: "ReLU"\n}\nlayer {\n bottom: "res2c_branch2a"\n top: "res2c_branch2b"\n name: "res2c_branch2b"\n type: "Convolution"\n convolution_param {\n num_output: 64\n kernel_size: 3\n pad: 1\n stride: 1\n bias_term: false\n }\n}\nlayer {\n bottom: "res2c_branch2b"\n top: "res2c_branch2b"\n name: "bn2c_branch2b"\n type: "BatchNorm"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n bottom: "res2c_branch2b"\n top: "res2c_branch2b"\n name: "scale2c_branch2b"\n type: "Scale"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n top: "res2c_branch2b"\n bottom: "res2c_branch2b"\n name: "res2c_branch2b_relu"\n type: "ReLU"\n}\nlayer {\n bottom: "res2c_branch2b"\n top: "res2c_branch2c"\n name: "res2c_branch2c"\n type: "Convolution"\n convolution_param {\n num_output: 256\n kernel_size: 1\n pad: 0\n stride: 1\n bias_term: false\n }\n}\nlayer {\n bottom: "res2c_branch2c"\n top: "res2c_branch2c"\n name: "bn2c_branch2c"\n type: "BatchNorm"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n bottom: "res2c_branch2c"\n top: "res2c_branch2c"\n name: "scale2c_branch2c"\n type: "Scale"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n bottom: "res2b"\n bottom: "res2c_branch2c"\n top: "res2c"\n name: "res2c"\n type: "Eltwise"\n}\nlayer {\n bottom: "res2c"\n top: "res2c"\n name: "res2c_relu"\n type: "ReLU"\n}\nlayer {\n bottom: "res2c"\n top: "res3a_branch1"\n name: "res3a_branch1"\n type: "Convolution"\n convolution_param {\n num_output: 512\n kernel_size: 1\n pad: 0\n stride: 2\n bias_term: false\n }\n}\nlayer {\n bottom: "res3a_branch1"\n top: "res3a_branch1"\n name: "bn3a_branch1"\n type: "BatchNorm"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n bottom: "res3a_branch1"\n top: "res3a_branch1"\n name: "scale3a_branch1"\n type: "Scale"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n bottom: "res2c"\n top: "res3a_branch2a"\n name: "res3a_branch2a"\n type: "Convolution"\n convolution_param {\n num_output: 128\n kernel_size: 1\n pad: 0\n stride: 2\n bias_term: false\n }\n}\nlayer {\n bottom: "res3a_branch2a"\n top: "res3a_branch2a"\n name: "bn3a_branch2a"\n type: "BatchNorm"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n bottom: "res3a_branch2a"\n top: "res3a_branch2a"\n name: "scale3a_branch2a"\n type: "Scale"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n top: "res3a_branch2a"\n bottom: "res3a_branch2a"\n name: "res3a_branch2a_relu"\n type: "ReLU"\n}\nlayer {\n bottom: "res3a_branch2a"\n top: "res3a_branch2b"\n name: "res3a_branch2b"\n type: "Convolution"\n convolution_param {\n num_output: 128\n kernel_size: 3\n pad: 1\n stride: 1\n bias_term: false\n }\n}\nlayer {\n bottom: "res3a_branch2b"\n top: "res3a_branch2b"\n name: "bn3a_branch2b"\n type: "BatchNorm"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n bottom: "res3a_branch2b"\n top: "res3a_branch2b"\n name: "scale3a_branch2b"\n type: "Scale"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n top: "res3a_branch2b"\n bottom: "res3a_branch2b"\n name: "res3a_branch2b_relu"\n type: "ReLU"\n}\nlayer {\n bottom: "res3a_branch2b"\n top: "res3a_branch2c"\n name: "res3a_branch2c"\n type: "Convolution"\n convolution_param {\n num_output: 512\n kernel_size: 1\n pad: 0\n stride: 1\n bias_term: false\n }\n}\nlayer {\n bottom: "res3a_branch2c"\n top: "res3a_branch2c"\n name: "bn3a_branch2c"\n type: "BatchNorm"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n bottom: "res3a_branch2c"\n top: "res3a_branch2c"\n name: "scale3a_branch2c"\n type: "Scale"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n bottom: "res3a_branch1"\n bottom: "res3a_branch2c"\n top: "res3a"\n name: "res3a"\n type: "Eltwise"\n}\nlayer {\n bottom: "res3a"\n top: "res3a"\n name: "res3a_relu"\n type: "ReLU"\n}\nlayer {\n bottom: "res3a"\n top: "res3b1_branch2a"\n name: "res3b1_branch2a"\n type: "Convolution"\n convolution_param {\n num_output: 128\n kernel_size: 1\n pad: 0\n stride: 1\n bias_term: false\n }\n}\nlayer {\n bottom: "res3b1_branch2a"\n top: "res3b1_branch2a"\n name: "bn3b1_branch2a"\n type: "BatchNorm"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n bottom: "res3b1_branch2a"\n top: "res3b1_branch2a"\n name: "scale3b1_branch2a"\n type: "Scale"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n top: "res3b1_branch2a"\n bottom: "res3b1_branch2a"\n name: "res3b1_branch2a_relu"\n type: "ReLU"\n}\nlayer {\n bottom: "res3b1_branch2a"\n top: "res3b1_branch2b"\n name: "res3b1_branch2b"\n type: "Convolution"\n convolution_param {\n num_output: 128\n kernel_size: 3\n pad: 1\n stride: 1\n bias_term: false\n }\n}\nlayer {\n bottom: "res3b1_branch2b"\n top: "res3b1_branch2b"\n name: "bn3b1_branch2b"\n type: "BatchNorm"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n bottom: "res3b1_branch2b"\n top: "res3b1_branch2b"\n name: "scale3b1_branch2b"\n type: "Scale"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n top: "res3b1_branch2b"\n bottom: "res3b1_branch2b"\n name: "res3b1_branch2b_relu"\n type: "ReLU"\n}\nlayer {\n bottom: "res3b1_branch2b"\n top: "res3b1_branch2c"\n name: "res3b1_branch2c"\n type: "Convolution"\n convolution_param {\n num_output: 512\n kernel_size: 1\n pad: 0\n stride: 1\n bias_term: false\n }\n}\nlayer {\n bottom: "res3b1_branch2c"\n top: "res3b1_branch2c"\n name: "bn3b1_branch2c"\n type: "BatchNorm"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n bottom: "res3b1_branch2c"\n top: "res3b1_branch2c"\n name: "scale3b1_branch2c"\n type: "Scale"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n bottom: "res3a"\n bottom: "res3b1_branch2c"\n top: "res3b1"\n name: "res3b1"\n type: "Eltwise"\n}\nlayer {\n bottom: "res3b1"\n top: "res3b1"\n name: "res3b1_relu"\n type: "ReLU"\n}\nlayer {\n bottom: "res3b1"\n top: "res3b2_branch2a"\n name: "res3b2_branch2a"\n type: "Convolution"\n convolution_param {\n num_output: 128\n kernel_size: 1\n pad: 0\n stride: 1\n bias_term: false\n }\n}\nlayer {\n bottom: "res3b2_branch2a"\n top: "res3b2_branch2a"\n name: "bn3b2_branch2a"\n type: "BatchNorm"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n bottom: "res3b2_branch2a"\n top: "res3b2_branch2a"\n name: "scale3b2_branch2a"\n type: "Scale"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n top: "res3b2_branch2a"\n bottom: "res3b2_branch2a"\n name: "res3b2_branch2a_relu"\n type: "ReLU"\n}\nlayer {\n bottom: "res3b2_branch2a"\n top: "res3b2_branch2b"\n name: "res3b2_branch2b"\n type: "Convolution"\n convolution_param {\n num_output: 128\n kernel_size: 3\n pad: 1\n stride: 1\n bias_term: false\n }\n}\nlayer {\n bottom: "res3b2_branch2b"\n top: "res3b2_branch2b"\n name: "bn3b2_branch2b"\n type: "BatchNorm"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n bottom: "res3b2_branch2b"\n top: "res3b2_branch2b"\n name: "scale3b2_branch2b"\n type: "Scale"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n top: "res3b2_branch2b"\n bottom: "res3b2_branch2b"\n name: "res3b2_branch2b_relu"\n type: "ReLU"\n}\nlayer {\n bottom: "res3b2_branch2b"\n top: "res3b2_branch2c"\n name: "res3b2_branch2c"\n type: "Convolution"\n convolution_param {\n num_output: 512\n kernel_size: 1\n pad: 0\n stride: 1\n bias_term: false\n }\n}\nlayer {\n bottom: "res3b2_branch2c"\n top: "res3b2_branch2c"\n name: "bn3b2_branch2c"\n type: "BatchNorm"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n bottom: "res3b2_branch2c"\n top: "res3b2_branch2c"\n name: "scale3b2_branch2c"\n type: "Scale"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n bottom: "res3b1"\n bottom: "res3b2_branch2c"\n top: "res3b2"\n name: "res3b2"\n type: "Eltwise"\n}\nlayer {\n bottom: "res3b2"\n top: "res3b2"\n name: "res3b2_relu"\n type: "ReLU"\n}\nlayer {\n bottom: "res3b2"\n top: "res3b3_branch2a"\n name: "res3b3_branch2a"\n type: "Convolution"\n convolution_param {\n num_output: 128\n kernel_size: 1\n pad: 0\n stride: 1\n bias_term: false\n }\n}\nlayer {\n bottom: "res3b3_branch2a"\n top: "res3b3_branch2a"\n name: "bn3b3_branch2a"\n type: "BatchNorm"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n bottom: "res3b3_branch2a"\n top: "res3b3_branch2a"\n name: "scale3b3_branch2a"\n type: "Scale"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n top: "res3b3_branch2a"\n bottom: "res3b3_branch2a"\n name: "res3b3_branch2a_relu"\n type: "ReLU"\n}\nlayer {\n bottom: "res3b3_branch2a"\n top: "res3b3_branch2b"\n name: "res3b3_branch2b"\n type: "Convolution"\n convolution_param {\n num_output: 128\n kernel_size: 3\n pad: 1\n stride: 1\n bias_term: false\n }\n}\nlayer {\n bottom: "res3b3_branch2b"\n top: "res3b3_branch2b"\n name: "bn3b3_branch2b"\n type: "BatchNorm"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n bottom: "res3b3_branch2b"\n top: "res3b3_branch2b"\n name: "scale3b3_branch2b"\n type: "Scale"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n top: "res3b3_branch2b"\n bottom: "res3b3_branch2b"\n name: "res3b3_branch2b_relu"\n type: "ReLU"\n}\nlayer {\n bottom: "res3b3_branch2b"\n top: "res3b3_branch2c"\n name: "res3b3_branch2c"\n type: "Convolution"\n convolution_param {\n num_output: 512\n kernel_size: 1\n pad: 0\n stride: 1\n bias_term: false\n }\n}\nlayer {\n bottom: "res3b3_branch2c"\n top: "res3b3_branch2c"\n name: "bn3b3_branch2c"\n type: "BatchNorm"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n bottom: "res3b3_branch2c"\n top: "res3b3_branch2c"\n name: "scale3b3_branch2c"\n type: "Scale"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n bottom: "res3b2"\n bottom: "res3b3_branch2c"\n top: "res3b3"\n name: "res3b3"\n type: "Eltwise"\n}\nlayer {\n bottom: "res3b3"\n top: "res3b3"\n name: "res3b3_relu"\n type: "ReLU"\n}\nlayer {\n bottom: "res3b3"\n top: "res3b4_branch2a"\n name: "res3b4_branch2a"\n type: "Convolution"\n convolution_param {\n num_output: 128\n kernel_size: 1\n pad: 0\n stride: 1\n bias_term: false\n }\n}\nlayer {\n bottom: "res3b4_branch2a"\n top: "res3b4_branch2a"\n name: "bn3b4_branch2a"\n type: "BatchNorm"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n bottom: "res3b4_branch2a"\n top: "res3b4_branch2a"\n name: "scale3b4_branch2a"\n type: "Scale"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n top: "res3b4_branch2a"\n bottom: "res3b4_branch2a"\n name: "res3b4_branch2a_relu"\n type: "ReLU"\n}\nlayer {\n bottom: "res3b4_branch2a"\n top: "res3b4_branch2b"\n name: "res3b4_branch2b"\n type: "Convolution"\n convolution_param {\n num_output: 128\n kernel_size: 3\n pad: 1\n stride: 1\n bias_term: false\n }\n}\nlayer {\n bottom: "res3b4_branch2b"\n top: "res3b4_branch2b"\n name: "bn3b4_branch2b"\n type: "BatchNorm"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n bottom: "res3b4_branch2b"\n top: "res3b4_branch2b"\n name: "scale3b4_branch2b"\n type: "Scale"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n top: "res3b4_branch2b"\n bottom: "res3b4_branch2b"\n name: "res3b4_branch2b_relu"\n type: "ReLU"\n}\nlayer {\n bottom: "res3b4_branch2b"\n top: "res3b4_branch2c"\n name: "res3b4_branch2c"\n type: "Convolution"\n convolution_param {\n num_output: 512\n kernel_size: 1\n pad: 0\n stride: 1\n bias_term: false\n }\n}\nlayer {\n bottom: "res3b4_branch2c"\n top: "res3b4_branch2c"\n name: "bn3b4_branch2c"\n type: "BatchNorm"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n bottom: "res3b4_branch2c"\n top: "res3b4_branch2c"\n name: "scale3b4_branch2c"\n type: "Scale"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n bottom: "res3b3"\n bottom: "res3b4_branch2c"\n top: "res3b4"\n name: "res3b4"\n type: "Eltwise"\n}\nlayer {\n bottom: "res3b4"\n top: "res3b4"\n name: "res3b4_relu"\n type: "ReLU"\n}\nlayer {\n bottom: "res3b4"\n top: "res3b5_branch2a"\n name: "res3b5_branch2a"\n type: "Convolution"\n convolution_param {\n num_output: 128\n kernel_size: 1\n pad: 0\n stride: 1\n bias_term: false\n }\n}\nlayer {\n bottom: "res3b5_branch2a"\n top: "res3b5_branch2a"\n name: "bn3b5_branch2a"\n type: "BatchNorm"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n bottom: "res3b5_branch2a"\n top: "res3b5_branch2a"\n name: "scale3b5_branch2a"\n type: "Scale"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n top: "res3b5_branch2a"\n bottom: "res3b5_branch2a"\n name: "res3b5_branch2a_relu"\n type: "ReLU"\n}\nlayer {\n bottom: "res3b5_branch2a"\n top: "res3b5_branch2b"\n name: "res3b5_branch2b"\n type: "Convolution"\n convolution_param {\n num_output: 128\n kernel_size: 3\n pad: 1\n stride: 1\n bias_term: false\n }\n}\nlayer {\n bottom: "res3b5_branch2b"\n top: "res3b5_branch2b"\n name: "bn3b5_branch2b"\n type: "BatchNorm"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n bottom: "res3b5_branch2b"\n top: "res3b5_branch2b"\n name: "scale3b5_branch2b"\n type: "Scale"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n top: "res3b5_branch2b"\n bottom: "res3b5_branch2b"\n name: "res3b5_branch2b_relu"\n type: "ReLU"\n}\nlayer {\n bottom: "res3b5_branch2b"\n top: "res3b5_branch2c"\n name: "res3b5_branch2c"\n type: "Convolution"\n convolution_param {\n num_output: 512\n kernel_size: 1\n pad: 0\n stride: 1\n bias_term: false\n }\n}\nlayer {\n bottom: "res3b5_branch2c"\n top: "res3b5_branch2c"\n name: "bn3b5_branch2c"\n type: "BatchNorm"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n bottom: "res3b5_branch2c"\n top: "res3b5_branch2c"\n name: "scale3b5_branch2c"\n type: "Scale"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n bottom: "res3b4"\n bottom: "res3b5_branch2c"\n top: "res3b5"\n name: "res3b5"\n type: "Eltwise"\n}\nlayer {\n bottom: "res3b5"\n top: "res3b5"\n name: "res3b5_relu"\n type: "ReLU"\n}\nlayer {\n bottom: "res3b5"\n top: "res3b6_branch2a"\n name: "res3b6_branch2a"\n type: "Convolution"\n convolution_param {\n num_output: 128\n kernel_size: 1\n pad: 0\n stride: 1\n bias_term: false\n }\n}\nlayer {\n bottom: "res3b6_branch2a"\n top: "res3b6_branch2a"\n name: "bn3b6_branch2a"\n type: "BatchNorm"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n bottom: "res3b6_branch2a"\n top: "res3b6_branch2a"\n name: "scale3b6_branch2a"\n type: "Scale"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n top: "res3b6_branch2a"\n bottom: "res3b6_branch2a"\n name: "res3b6_branch2a_relu"\n type: "ReLU"\n}\nlayer {\n bottom: "res3b6_branch2a"\n top: "res3b6_branch2b"\n name: "res3b6_branch2b"\n type: "Convolution"\n convolution_param {\n num_output: 128\n kernel_size: 3\n pad: 1\n stride: 1\n bias_term: false\n }\n}\nlayer {\n bottom: "res3b6_branch2b"\n top: "res3b6_branch2b"\n name: "bn3b6_branch2b"\n type: "BatchNorm"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n bottom: "res3b6_branch2b"\n top: "res3b6_branch2b"\n name: "scale3b6_branch2b"\n type: "Scale"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n top: "res3b6_branch2b"\n bottom: "res3b6_branch2b"\n name: "res3b6_branch2b_relu"\n type: "ReLU"\n}\nlayer {\n bottom: "res3b6_branch2b"\n top: "res3b6_branch2c"\n name: "res3b6_branch2c"\n type: "Convolution"\n convolution_param {\n num_output: 512\n kernel_size: 1\n pad: 0\n stride: 1\n bias_term: false\n }\n}\nlayer {\n bottom: "res3b6_branch2c"\n top: "res3b6_branch2c"\n name: "bn3b6_branch2c"\n type: "BatchNorm"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n bottom: "res3b6_branch2c"\n top: "res3b6_branch2c"\n name: "scale3b6_branch2c"\n type: "Scale"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n bottom: "res3b5"\n bottom: "res3b6_branch2c"\n top: "res3b6"\n name: "res3b6"\n type: "Eltwise"\n}\nlayer {\n bottom: "res3b6"\n top: "res3b6"\n name: "res3b6_relu"\n type: "ReLU"\n}\nlayer {\n bottom: "res3b6"\n top: "res3b7_branch2a"\n name: "res3b7_branch2a"\n type: "Convolution"\n convolution_param {\n num_output: 128\n kernel_size: 1\n pad: 0\n stride: 1\n bias_term: false\n }\n}\nlayer {\n bottom: "res3b7_branch2a"\n top: "res3b7_branch2a"\n name: "bn3b7_branch2a"\n type: "BatchNorm"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n bottom: "res3b7_branch2a"\n top: "res3b7_branch2a"\n name: "scale3b7_branch2a"\n type: "Scale"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n top: "res3b7_branch2a"\n bottom: "res3b7_branch2a"\n name: "res3b7_branch2a_relu"\n type: "ReLU"\n}\nlayer {\n bottom: "res3b7_branch2a"\n top: "res3b7_branch2b"\n name: "res3b7_branch2b"\n type: "Convolution"\n convolution_param {\n num_output: 128\n kernel_size: 3\n pad: 1\n stride: 1\n bias_term: false\n }\n}\nlayer {\n bottom: "res3b7_branch2b"\n top: "res3b7_branch2b"\n name: "bn3b7_branch2b"\n type: "BatchNorm"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n bottom: "res3b7_branch2b"\n top: "res3b7_branch2b"\n name: "scale3b7_branch2b"\n type: "Scale"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n top: "res3b7_branch2b"\n bottom: "res3b7_branch2b"\n name: "res3b7_branch2b_relu"\n type: "ReLU"\n}\nlayer {\n bottom: "res3b7_branch2b"\n top: "res3b7_branch2c"\n name: "res3b7_branch2c"\n type: "Convolution"\n convolution_param {\n num_output: 512\n kernel_size: 1\n pad: 0\n stride: 1\n bias_term: false\n }\n}\nlayer {\n bottom: "res3b7_branch2c"\n top: "res3b7_branch2c"\n name: "bn3b7_branch2c"\n type: "BatchNorm"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n bottom: "res3b7_branch2c"\n top: "res3b7_branch2c"\n name: "scale3b7_branch2c"\n type: "Scale"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n bottom: "res3b6"\n bottom: "res3b7_branch2c"\n top: "res3b7"\n name: "res3b7"\n type: "Eltwise"\n}\nlayer {\n bottom: "res3b7"\n top: "res3b7"\n name: "res3b7_relu"\n type: "ReLU"\n}\n'
return string
def get_res_net101v2_init():
string = 'layer {\n name: "conv1"\n type: "Convolution"\n bottom: "image"\n top: "conv1"\n convolution_param {\n bias_term: false\n num_output: 64\n pad: 3\n kernel_size: 7\n stride: 2\n }\n}\nlayer {\n name: "conv1_bn"\n type: "BatchNorm"\n bottom: "conv1"\n top: "conv1"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n name: "conv1_scale"\n type: "Scale"\n bottom: "conv1"\n top: "conv1"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n name: "conv1_relu"\n type: "ReLU"\n bottom: "conv1"\n top: "conv1"\n}\nlayer {\n name: "pool1"\n type: "Pooling"\n bottom: "conv1"\n top: "pool1"\n pooling_param {\n pool: MAX\n kernel_size: 3\n stride: 2\n }\n}\nlayer {\n name: "res1_conv1"\n type: "Convolution"\n bottom: "pool1"\n top: "res1_conv1"\n convolution_param {\n bias_term: false\n num_output: 64\n pad: 0\n kernel_size: 1\n stride: 1\n }\n}\nlayer {\n name: "res1_conv1_bn"\n type: "BatchNorm"\n bottom: "res1_conv1"\n top: "res1_conv1"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n name: "res1_conv1_scale"\n type: "Scale"\n bottom: "res1_conv1"\n top: "res1_conv1"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n name: "res1_conv1_relu"\n type: "ReLU"\n bottom: "res1_conv1"\n top: "res1_conv1"\n}\nlayer {\n name: "res1_conv2"\n type: "Convolution"\n bottom: "res1_conv1"\n top: "res1_conv2"\n convolution_param {\n bias_term: false\n num_output: 64\n pad: 1\n kernel_size: 3\n stride: 1\n }\n}\nlayer {\n name: "res1_conv2_bn"\n type: "BatchNorm"\n bottom: "res1_conv2"\n top: "res1_conv2"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n name: "res1_conv2_scale"\n type: "Scale"\n bottom: "res1_conv2"\n top: "res1_conv2"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n name: "res1_conv2_relu"\n type: "ReLU"\n bottom: "res1_conv2"\n top: "res1_conv2"\n}\nlayer {\n name: "res1_conv3"\n type: "Convolution"\n bottom: "res1_conv2"\n top: "res1_conv3"\n convolution_param {\n bias_term: false\n num_output: 256\n pad: 0\n kernel_size: 1\n stride: 1\n }\n}\nlayer {\n name: "res1_match_conv"\n type: "Convolution"\n bottom: "pool1"\n top: "res1_match_conv"\n convolution_param {\n bias_term: false\n num_output: 256\n pad: 0\n kernel_size: 1\n stride: 1\n }\n}\nlayer {\n name: "res1_eletwise"\n type: "Eltwise"\n bottom: "res1_match_conv"\n bottom: "res1_conv3"\n top: "res1_eletwise"\n eltwise_param {\n operation: SUM\n }\n}\nlayer {\n name: "res2_bn"\n type: "BatchNorm"\n bottom: "res1_eletwise"\n top: "res2_bn"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n name: "res2_scale"\n type: "Scale"\n bottom: "res2_bn"\n top: "res2_bn"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n name: "res2_relu"\n type: "ReLU"\n bottom: "res2_bn"\n top: "res2_bn"\n}\nlayer {\n name: "res2_conv1"\n type: "Convolution"\n bottom: "res2_bn"\n top: "res2_conv1"\n convolution_param {\n bias_term: false\n num_output: 64\n pad: 0\n kernel_size: 1\n stride: 1\n }\n}\nlayer {\n name: "res2_conv1_bn"\n type: "BatchNorm"\n bottom: "res2_conv1"\n top: "res2_conv1"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n name: "res2_conv1_scale"\n type: "Scale"\n bottom: "res2_conv1"\n top: "res2_conv1"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n name: "res2_conv1_relu"\n type: "ReLU"\n bottom: "res2_conv1"\n top: "res2_conv1"\n}\nlayer {\n name: "res2_conv2"\n type: "Convolution"\n bottom: "res2_conv1"\n top: "res2_conv2"\n convolution_param {\n bias_term: false\n num_output: 64\n pad: 1\n kernel_size: 3\n stride: 1\n }\n}\nlayer {\n name: "res2_conv2_bn"\n type: "BatchNorm"\n bottom: "res2_conv2"\n top: "res2_conv2"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n name: "res2_conv2_scale"\n type: "Scale"\n bottom: "res2_conv2"\n top: "res2_conv2"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n name: "res2_conv2_relu"\n type: "ReLU"\n bottom: "res2_conv2"\n top: "res2_conv2"\n}\nlayer {\n name: "res2_conv3"\n type: "Convolution"\n bottom: "res2_conv2"\n top: "res2_conv3"\n convolution_param {\n bias_term: false\n num_output: 256\n pad: 0\n kernel_size: 1\n stride: 1\n }\n}\nlayer {\n name: "res2_eletwise"\n type: "Eltwise"\n bottom: "res1_eletwise"\n bottom: "res2_conv3"\n top: "res2_eletwise"\n eltwise_param {\n operation: SUM\n }\n}\nlayer {\n name: "res3_bn"\n type: "BatchNorm"\n bottom: "res2_eletwise"\n top: "res3_bn"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n name: "res3_scale"\n type: "Scale"\n bottom: "res3_bn"\n top: "res3_bn"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n name: "res3_relu"\n type: "ReLU"\n bottom: "res3_bn"\n top: "res3_bn"\n}\nlayer {\n name: "res3_conv1"\n type: "Convolution"\n bottom: "res3_bn"\n top: "res3_conv1"\n convolution_param {\n bias_term: false\n num_output: 64\n pad: 0\n kernel_size: 1\n stride: 1\n }\n}\nlayer {\n name: "res3_conv1_bn"\n type: "BatchNorm"\n bottom: "res3_conv1"\n top: "res3_conv1"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n name: "res3_conv1_scale"\n type: "Scale"\n bottom: "res3_conv1"\n top: "res3_conv1"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n name: "res3_conv1_relu"\n type: "ReLU"\n bottom: "res3_conv1"\n top: "res3_conv1"\n}\nlayer {\n name: "res3_conv2"\n type: "Convolution"\n bottom: "res3_conv1"\n top: "res3_conv2"\n convolution_param {\n bias_term: false\n num_output: 64\n pad: 1\n kernel_size: 3\n stride: 1\n }\n}\nlayer {\n name: "res3_conv2_bn"\n type: "BatchNorm"\n bottom: "res3_conv2"\n top: "res3_conv2"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n name: "res3_conv2_scale"\n type: "Scale"\n bottom: "res3_conv2"\n top: "res3_conv2"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n name: "res3_conv2_relu"\n type: "ReLU"\n bottom: "res3_conv2"\n top: "res3_conv2"\n}\nlayer {\n name: "res3_conv3"\n type: "Convolution"\n bottom: "res3_conv2"\n top: "res3_conv3"\n convolution_param {\n bias_term: false\n num_output: 256\n pad: 0\n kernel_size: 1\n stride: 1\n }\n}\nlayer {\n name: "res3_eletwise"\n type: "Eltwise"\n bottom: "res2_eletwise"\n bottom: "res3_conv3"\n top: "res3_eletwise"\n eltwise_param {\n operation: SUM\n }\n}\nlayer {\n name: "res4_bn"\n type: "BatchNorm"\n bottom: "res3_eletwise"\n top: "res4_bn"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n name: "res4_scale"\n type: "Scale"\n bottom: "res4_bn"\n top: "res4_bn"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n name: "res4_relu"\n type: "ReLU"\n bottom: "res4_bn"\n top: "res4_bn"\n}\nlayer {\n name: "res4_conv1"\n type: "Convolution"\n bottom: "res4_bn"\n top: "res4_conv1"\n convolution_param {\n bias_term: false\n num_output: 128\n pad: 0\n kernel_size: 1\n stride: 1\n }\n}\nlayer {\n name: "res4_conv1_bn"\n type: "BatchNorm"\n bottom: "res4_conv1"\n top: "res4_conv1"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n name: "res4_conv1_scale"\n type: "Scale"\n bottom: "res4_conv1"\n top: "res4_conv1"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n name: "res4_conv1_relu"\n type: "ReLU"\n bottom: "res4_conv1"\n top: "res4_conv1"\n}\nlayer {\n name: "res4_conv2"\n type: "Convolution"\n bottom: "res4_conv1"\n top: "res4_conv2"\n convolution_param {\n bias_term: false\n num_output: 128\n pad: 1\n kernel_size: 3\n stride: 2\n }\n}\nlayer {\n name: "res4_conv2_bn"\n type: "BatchNorm"\n bottom: "res4_conv2"\n top: "res4_conv2"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n name: "res4_conv2_scale"\n type: "Scale"\n bottom: "res4_conv2"\n top: "res4_conv2"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n name: "res4_conv2_relu"\n type: "ReLU"\n bottom: "res4_conv2"\n top: "res4_conv2"\n}\nlayer {\n name: "res4_conv3"\n type: "Convolution"\n bottom: "res4_conv2"\n top: "res4_conv3"\n convolution_param {\n bias_term: false\n num_output: 512\n pad: 0\n kernel_size: 1\n stride: 1\n }\n}\nlayer {\n name: "res4_match_conv"\n type: "Convolution"\n bottom: "res4_bn"\n top: "res4_match_conv"\n convolution_param {\n bias_term: false\n num_output: 512\n pad: 0\n kernel_size: 1\n stride: 2\n }\n}\nlayer {\n name: "res4_eletwise"\n type: "Eltwise"\n bottom: "res4_match_conv"\n bottom: "res4_conv3"\n top: "res4_eletwise"\n eltwise_param {\n operation: SUM\n }\n}\nlayer {\n name: "res5_bn"\n type: "BatchNorm"\n bottom: "res4_eletwise"\n top: "res5_bn"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n name: "res5_scale"\n type: "Scale"\n bottom: "res5_bn"\n top: "res5_bn"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n name: "res5_relu"\n type: "ReLU"\n bottom: "res5_bn"\n top: "res5_bn"\n}\nlayer {\n name: "res5_conv1"\n type: "Convolution"\n bottom: "res5_bn"\n top: "res5_conv1"\n convolution_param {\n bias_term: false\n num_output: 128\n pad: 0\n kernel_size: 1\n stride: 1\n }\n}\nlayer {\n name: "res5_conv1_bn"\n type: "BatchNorm"\n bottom: "res5_conv1"\n top: "res5_conv1"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n name: "res5_conv1_scale"\n type: "Scale"\n bottom: "res5_conv1"\n top: "res5_conv1"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n name: "res5_conv1_relu"\n type: "ReLU"\n bottom: "res5_conv1"\n top: "res5_conv1"\n}\nlayer {\n name: "res5_conv2"\n type: "Convolution"\n bottom: "res5_conv1"\n top: "res5_conv2"\n convolution_param {\n bias_term: false\n num_output: 128\n pad: 1\n kernel_size: 3\n stride: 1\n }\n}\nlayer {\n name: "res5_conv2_bn"\n type: "BatchNorm"\n bottom: "res5_conv2"\n top: "res5_conv2"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n name: "res5_conv2_scale"\n type: "Scale"\n bottom: "res5_conv2"\n top: "res5_conv2"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n name: "res5_conv2_relu"\n type: "ReLU"\n bottom: "res5_conv2"\n top: "res5_conv2"\n}\nlayer {\n name: "res5_conv3"\n type: "Convolution"\n bottom: "res5_conv2"\n top: "res5_conv3"\n convolution_param {\n bias_term: false\n num_output: 512\n pad: 0\n kernel_size: 1\n stride: 1\n }\n}\nlayer {\n name: "res5_eletwise"\n type: "Eltwise"\n bottom: "res4_eletwise"\n bottom: "res5_conv3"\n top: "res5_eletwise"\n eltwise_param {\n operation: SUM\n }\n}\nlayer {\n name: "res6_bn"\n type: "BatchNorm"\n bottom: "res5_eletwise"\n top: "res6_bn"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n name: "res6_scale"\n type: "Scale"\n bottom: "res6_bn"\n top: "res6_bn"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n name: "res6_relu"\n type: "ReLU"\n bottom: "res6_bn"\n top: "res6_bn"\n}\nlayer {\n name: "res6_conv1"\n type: "Convolution"\n bottom: "res6_bn"\n top: "res6_conv1"\n convolution_param {\n bias_term: false\n num_output: 128\n pad: 0\n kernel_size: 1\n stride: 1\n }\n}\nlayer {\n name: "res6_conv1_bn"\n type: "BatchNorm"\n bottom: "res6_conv1"\n top: "res6_conv1"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n name: "res6_conv1_scale"\n type: "Scale"\n bottom: "res6_conv1"\n top: "res6_conv1"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n name: "res6_conv1_relu"\n type: "ReLU"\n bottom: "res6_conv1"\n top: "res6_conv1"\n}\nlayer {\n name: "res6_conv2"\n type: "Convolution"\n bottom: "res6_conv1"\n top: "res6_conv2"\n convolution_param {\n bias_term: false\n num_output: 128\n pad: 1\n kernel_size: 3\n stride: 1\n }\n}\nlayer {\n name: "res6_conv2_bn"\n type: "BatchNorm"\n bottom: "res6_conv2"\n top: "res6_conv2"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n name: "res6_conv2_scale"\n type: "Scale"\n bottom: "res6_conv2"\n top: "res6_conv2"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n name: "res6_conv2_relu"\n type: "ReLU"\n bottom: "res6_conv2"\n top: "res6_conv2"\n}\nlayer {\n name: "res6_conv3"\n type: "Convolution"\n bottom: "res6_conv2"\n top: "res6_conv3"\n convolution_param {\n bias_term: false\n num_output: 512\n pad: 0\n kernel_size: 1\n stride: 1\n }\n}\nlayer {\n name: "res6_eletwise"\n type: "Eltwise"\n bottom: "res5_eletwise"\n bottom: "res6_conv3"\n top: "res6_eletwise"\n eltwise_param {\n operation: SUM\n }\n}\nlayer {\n name: "res7_bn"\n type: "BatchNorm"\n bottom: "res6_eletwise"\n top: "res7_bn"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n name: "res7_scale"\n type: "Scale"\n bottom: "res7_bn"\n top: "res7_bn"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n name: "res7_relu"\n type: "ReLU"\n bottom: "res7_bn"\n top: "res7_bn"\n}\nlayer {\n name: "res7_conv1"\n type: "Convolution"\n bottom: "res7_bn"\n top: "res7_conv1"\n convolution_param {\n bias_term: false\n num_output: 128\n pad: 0\n kernel_size: 1\n stride: 1\n }\n}\nlayer {\n name: "res7_conv1_bn"\n type: "BatchNorm"\n bottom: "res7_conv1"\n top: "res7_conv1"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n name: "res7_conv1_scale"\n type: "Scale"\n bottom: "res7_conv1"\n top: "res7_conv1"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n name: "res7_conv1_relu"\n type: "ReLU"\n bottom: "res7_conv1"\n top: "res7_conv1"\n}\nlayer {\n name: "res7_conv2"\n type: "Convolution"\n bottom: "res7_conv1"\n top: "res7_conv2"\n convolution_param {\n bias_term: false\n num_output: 128\n pad: 1\n kernel_size: 3\n stride: 1\n }\n}\nlayer {\n name: "res7_conv2_bn"\n type: "BatchNorm"\n bottom: "res7_conv2"\n top: "res7_conv2"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n name: "res7_conv2_scale"\n type: "Scale"\n bottom: "res7_conv2"\n top: "res7_conv2"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n name: "res7_conv2_relu"\n type: "ReLU"\n bottom: "res7_conv2"\n top: "res7_conv2"\n}\nlayer {\n name: "res7_conv3"\n type: "Convolution"\n bottom: "res7_conv2"\n top: "res7_conv3"\n convolution_param {\n bias_term: false\n num_output: 512\n pad: 0\n kernel_size: 1\n stride: 1\n }\n}\nlayer {\n name: "res7_eletwise"\n type: "Eltwise"\n bottom: "res6_eletwise"\n bottom: "res7_conv3"\n top: "res7_eletwise"\n eltwise_param {\n operation: SUM\n }\n}\nlayer {\n name: "res8_bn"\n type: "BatchNorm"\n bottom: "res7_eletwise"\n top: "res8_bn"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n name: "res8_scale"\n type: "Scale"\n bottom: "res8_bn"\n top: "res8_bn"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n name: "res8_relu"\n type: "ReLU"\n bottom: "res8_bn"\n top: "res8_bn"\n}\nlayer {\n name: "res8_conv1"\n type: "Convolution"\n bottom: "res8_bn"\n top: "res8_conv1"\n convolution_param {\n bias_term: false\n num_output: 256\n pad: 0\n kernel_size: 1\n stride: 1\n }\n}\nlayer {\n name: "res8_conv1_bn"\n type: "BatchNorm"\n bottom: "res8_conv1"\n top: "res8_conv1"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n name: "res8_conv1_scale"\n type: "Scale"\n bottom: "res8_conv1"\n top: "res8_conv1"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n name: "res8_conv1_relu"\n type: "ReLU"\n bottom: "res8_conv1"\n top: "res8_conv1"\n}\n'
return string
def get_res_net152v2_init():
string = 'layer {\n name: "conv1"\n type: "Convolution"\n bottom: "image"\n top: "conv1"\n convolution_param {\n bias_term: false\n num_output: 64\n pad: 3\n kernel_size: 7\n stride: 2\n }\n}\nlayer {\n name: "conv1_bn"\n type: "BatchNorm"\n bottom: "conv1"\n top: "conv1"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n name: "conv1_scale"\n type: "Scale"\n bottom: "conv1"\n top: "conv1"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n name: "conv1_relu"\n type: "ReLU"\n bottom: "conv1"\n top: "conv1"\n}\nlayer {\n name: "pool1"\n type: "Pooling"\n bottom: "conv1"\n top: "pool1"\n pooling_param {\n pool: MAX\n kernel_size: 3\n stride: 2\n }\n}\nlayer {\n name: "res1_conv1"\n type: "Convolution"\n bottom: "pool1"\n top: "res1_conv1"\n convolution_param {\n bias_term: false\n num_output: 64\n pad: 0\n kernel_size: 1\n stride: 1\n }\n}\nlayer {\n name: "res1_conv1_bn"\n type: "BatchNorm"\n bottom: "res1_conv1"\n top: "res1_conv1"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n name: "res1_conv1_scale"\n type: "Scale"\n bottom: "res1_conv1"\n top: "res1_conv1"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n name: "res1_conv1_relu"\n type: "ReLU"\n bottom: "res1_conv1"\n top: "res1_conv1"\n}\nlayer {\n name: "res1_conv2"\n type: "Convolution"\n bottom: "res1_conv1"\n top: "res1_conv2"\n convolution_param {\n bias_term: false\n num_output: 64\n pad: 1\n kernel_size: 3\n stride: 1\n }\n}\nlayer {\n name: "res1_conv2_bn"\n type: "BatchNorm"\n bottom: "res1_conv2"\n top: "res1_conv2"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n name: "res1_conv2_scale"\n type: "Scale"\n bottom: "res1_conv2"\n top: "res1_conv2"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n name: "res1_conv2_relu"\n type: "ReLU"\n bottom: "res1_conv2"\n top: "res1_conv2"\n}\nlayer {\n name: "res1_conv3"\n type: "Convolution"\n bottom: "res1_conv2"\n top: "res1_conv3"\n convolution_param {\n bias_term: false\n num_output: 256\n pad: 0\n kernel_size: 1\n stride: 1\n }\n}\nlayer {\n name: "res1_match_conv"\n type: "Convolution"\n bottom: "pool1"\n top: "res1_match_conv"\n convolution_param {\n bias_term: false\n num_output: 256\n pad: 0\n kernel_size: 1\n stride: 1\n bias_filler {\n type: "constant"\n value: 0.2\n }\n }\n}\nlayer {\n name: "res1_eletwise"\n type: "Eltwise"\n bottom: "res1_match_conv"\n bottom: "res1_conv3"\n top: "res1_eletwise"\n eltwise_param {\n operation: SUM\n }\n}\nlayer {\n name: "res2_bn"\n type: "BatchNorm"\n bottom: "res1_eletwise"\n top: "res2_bn"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n name: "res2_scale"\n type: "Scale"\n bottom: "res2_bn"\n top: "res2_bn"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n name: "res2_relu"\n type: "ReLU"\n bottom: "res2_bn"\n top: "res2_bn"\n}\nlayer {\n name: "res2_conv1"\n type: "Convolution"\n bottom: "res2_bn"\n top: "res2_conv1"\n convolution_param {\n bias_term: false\n num_output: 64\n pad: 0\n kernel_size: 1\n stride: 1\n }\n}\nlayer {\n name: "res2_conv1_bn"\n type: "BatchNorm"\n bottom: "res2_conv1"\n top: "res2_conv1"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n name: "res2_conv1_scale"\n type: "Scale"\n bottom: "res2_conv1"\n top: "res2_conv1"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n name: "res2_conv1_relu"\n type: "ReLU"\n bottom: "res2_conv1"\n top: "res2_conv1"\n}\nlayer {\n name: "res2_conv2"\n type: "Convolution"\n bottom: "res2_conv1"\n top: "res2_conv2"\n convolution_param {\n bias_term: false\n num_output: 64\n pad: 1\n kernel_size: 3\n stride: 1\n }\n}\nlayer {\n name: "res2_conv2_bn"\n type: "BatchNorm"\n bottom: "res2_conv2"\n top: "res2_conv2"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n name: "res2_conv2_scale"\n type: "Scale"\n bottom: "res2_conv2"\n top: "res2_conv2"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n name: "res2_conv2_relu"\n type: "ReLU"\n bottom: "res2_conv2"\n top: "res2_conv2"\n}\nlayer {\n name: "res2_conv3"\n type: "Convolution"\n bottom: "res2_conv2"\n top: "res2_conv3"\n convolution_param {\n bias_term: false\n num_output: 256\n pad: 0\n kernel_size: 1\n stride: 1\n }\n}\nlayer {\n name: "res2_eletwise"\n type: "Eltwise"\n bottom: "res1_eletwise"\n bottom: "res2_conv3"\n top: "res2_eletwise"\n eltwise_param {\n operation: SUM\n }\n}\nlayer {\n name: "res3_bn"\n type: "BatchNorm"\n bottom: "res2_eletwise"\n top: "res3_bn"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n name: "res3_scale"\n type: "Scale"\n bottom: "res3_bn"\n top: "res3_bn"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n name: "res3_relu"\n type: "ReLU"\n bottom: "res3_bn"\n top: "res3_bn"\n}\nlayer {\n name: "res3_conv1"\n type: "Convolution"\n bottom: "res3_bn"\n top: "res3_conv1"\n convolution_param {\n bias_term: false\n num_output: 64\n pad: 0\n kernel_size: 1\n stride: 1\n }\n}\nlayer {\n name: "res3_conv1_bn"\n type: "BatchNorm"\n bottom: "res3_conv1"\n top: "res3_conv1"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n name: "res3_conv1_scale"\n type: "Scale"\n bottom: "res3_conv1"\n top: "res3_conv1"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n name: "res3_conv1_relu"\n type: "ReLU"\n bottom: "res3_conv1"\n top: "res3_conv1"\n}\nlayer {\n name: "res3_conv2"\n type: "Convolution"\n bottom: "res3_conv1"\n top: "res3_conv2"\n convolution_param {\n bias_term: false\n num_output: 64\n pad: 1\n kernel_size: 3\n stride: 1\n }\n}\nlayer {\n name: "res3_conv2_bn"\n type: "BatchNorm"\n bottom: "res3_conv2"\n top: "res3_conv2"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n name: "res3_conv2_scale"\n type: "Scale"\n bottom: "res3_conv2"\n top: "res3_conv2"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n name: "res3_conv2_relu"\n type: "ReLU"\n bottom: "res3_conv2"\n top: "res3_conv2"\n}\nlayer {\n name: "res3_conv3"\n type: "Convolution"\n bottom: "res3_conv2"\n top: "res3_conv3"\n convolution_param {\n bias_term: false\n num_output: 256\n pad: 0\n kernel_size: 1\n stride: 1\n }\n}\nlayer {\n name: "res3_eletwise"\n type: "Eltwise"\n bottom: "res2_eletwise"\n bottom: "res3_conv3"\n top: "res3_eletwise"\n eltwise_param {\n operation: SUM\n }\n}\nlayer {\n name: "res4_bn"\n type: "BatchNorm"\n bottom: "res3_eletwise"\n top: "res4_bn"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n name: "res4_scale"\n type: "Scale"\n bottom: "res4_bn"\n top: "res4_bn"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n name: "res4_relu"\n type: "ReLU"\n bottom: "res4_bn"\n top: "res4_bn"\n}\nlayer {\n name: "res4_conv1"\n type: "Convolution"\n bottom: "res4_bn"\n top: "res4_conv1"\n convolution_param {\n bias_term: false\n num_output: 128\n pad: 0\n kernel_size: 1\n stride: 1\n }\n}\nlayer {\n name: "res4_conv1_bn"\n type: "BatchNorm"\n bottom: "res4_conv1"\n top: "res4_conv1"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n name: "res4_conv1_scale"\n type: "Scale"\n bottom: "res4_conv1"\n top: "res4_conv1"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n name: "res4_conv1_relu"\n type: "ReLU"\n bottom: "res4_conv1"\n top: "res4_conv1"\n}\nlayer {\n name: "res4_conv2"\n type: "Convolution"\n bottom: "res4_conv1"\n top: "res4_conv2"\n convolution_param {\n bias_term: false\n num_output: 128\n pad: 1\n kernel_size: 3\n stride: 2\n }\n}\nlayer {\n name: "res4_conv2_bn"\n type: "BatchNorm"\n bottom: "res4_conv2"\n top: "res4_conv2"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n name: "res4_conv2_scale"\n type: "Scale"\n bottom: "res4_conv2"\n top: "res4_conv2"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n name: "res4_conv2_relu"\n type: "ReLU"\n bottom: "res4_conv2"\n top: "res4_conv2"\n}\nlayer {\n name: "res4_conv3"\n type: "Convolution"\n bottom: "res4_conv2"\n top: "res4_conv3"\n convolution_param {\n bias_term: false\n num_output: 512\n pad: 0\n kernel_size: 1\n stride: 1\n }\n}\nlayer {\n name: "res4_match_conv"\n type: "Convolution"\n bottom: "res4_bn"\n top: "res4_match_conv"\n convolution_param {\n bias_term: false\n num_output: 512\n pad: 0\n kernel_size: 1\n stride: 2\n bias_filler {\n type: "constant"\n value: 0.2\n }\n }\n}\nlayer {\n name: "res4_eletwise"\n type: "Eltwise"\n bottom: "res4_match_conv"\n bottom: "res4_conv3"\n top: "res4_eletwise"\n eltwise_param {\n operation: SUM\n }\n}\nlayer {\n name: "res5_bn"\n type: "BatchNorm"\n bottom: "res4_eletwise"\n top: "res5_bn"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n name: "res5_scale"\n type: "Scale"\n bottom: "res5_bn"\n top: "res5_bn"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n name: "res5_relu"\n type: "ReLU"\n bottom: "res5_bn"\n top: "res5_bn"\n}\nlayer {\n name: "res5_conv1"\n type: "Convolution"\n bottom: "res5_bn"\n top: "res5_conv1"\n convolution_param {\n bias_term: false\n num_output: 128\n pad: 0\n kernel_size: 1\n stride: 1\n }\n}\nlayer {\n name: "res5_conv1_bn"\n type: "BatchNorm"\n bottom: "res5_conv1"\n top: "res5_conv1"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n name: "res5_conv1_scale"\n type: "Scale"\n bottom: "res5_conv1"\n top: "res5_conv1"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n name: "res5_conv1_relu"\n type: "ReLU"\n bottom: "res5_conv1"\n top: "res5_conv1"\n}\nlayer {\n name: "res5_conv2"\n type: "Convolution"\n bottom: "res5_conv1"\n top: "res5_conv2"\n convolution_param {\n bias_term: false\n num_output: 128\n pad: 1\n kernel_size: 3\n stride: 1\n }\n}\nlayer {\n name: "res5_conv2_bn"\n type: "BatchNorm"\n bottom: "res5_conv2"\n top: "res5_conv2"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n name: "res5_conv2_scale"\n type: "Scale"\n bottom: "res5_conv2"\n top: "res5_conv2"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n name: "res5_conv2_relu"\n type: "ReLU"\n bottom: "res5_conv2"\n top: "res5_conv2"\n}\nlayer {\n name: "res5_conv3"\n type: "Convolution"\n bottom: "res5_conv2"\n top: "res5_conv3"\n convolution_param {\n bias_term: false\n num_output: 512\n pad: 0\n kernel_size: 1\n stride: 1\n }\n}\nlayer {\n name: "res5_eletwise"\n type: "Eltwise"\n bottom: "res4_eletwise"\n bottom: "res5_conv3"\n top: "res5_eletwise"\n eltwise_param {\n operation: SUM\n }\n}\nlayer {\n name: "res6_bn"\n type: "BatchNorm"\n bottom: "res5_eletwise"\n top: "res6_bn"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n name: "res6_scale"\n type: "Scale"\n bottom: "res6_bn"\n top: "res6_bn"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n name: "res6_relu"\n type: "ReLU"\n bottom: "res6_bn"\n top: "res6_bn"\n}\nlayer {\n name: "res6_conv1"\n type: "Convolution"\n bottom: "res6_bn"\n top: "res6_conv1"\n convolution_param {\n bias_term: false\n num_output: 128\n pad: 0\n kernel_size: 1\n stride: 1\n }\n}\nlayer {\n name: "res6_conv1_bn"\n type: "BatchNorm"\n bottom: "res6_conv1"\n top: "res6_conv1"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n name: "res6_conv1_scale"\n type: "Scale"\n bottom: "res6_conv1"\n top: "res6_conv1"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n name: "res6_conv1_relu"\n type: "ReLU"\n bottom: "res6_conv1"\n top: "res6_conv1"\n}\nlayer {\n name: "res6_conv2"\n type: "Convolution"\n bottom: "res6_conv1"\n top: "res6_conv2"\n convolution_param {\n bias_term: false\n num_output: 128\n pad: 1\n kernel_size: 3\n stride: 1\n }\n}\nlayer {\n name: "res6_conv2_bn"\n type: "BatchNorm"\n bottom: "res6_conv2"\n top: "res6_conv2"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n name: "res6_conv2_scale"\n type: "Scale"\n bottom: "res6_conv2"\n top: "res6_conv2"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n name: "res6_conv2_relu"\n type: "ReLU"\n bottom: "res6_conv2"\n top: "res6_conv2"\n}\nlayer {\n name: "res6_conv3"\n type: "Convolution"\n bottom: "res6_conv2"\n top: "res6_conv3"\n convolution_param {\n bias_term: false\n num_output: 512\n pad: 0\n kernel_size: 1\n stride: 1\n }\n}\nlayer {\n name: "res6_eletwise"\n type: "Eltwise"\n bottom: "res5_eletwise"\n bottom: "res6_conv3"\n top: "res6_eletwise"\n eltwise_param {\n operation: SUM\n }\n}\nlayer {\n name: "res7_bn"\n type: "BatchNorm"\n bottom: "res6_eletwise"\n top: "res7_bn"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n name: "res7_scale"\n type: "Scale"\n bottom: "res7_bn"\n top: "res7_bn"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n name: "res7_relu"\n type: "ReLU"\n bottom: "res7_bn"\n top: "res7_bn"\n}\nlayer {\n name: "res7_conv1"\n type: "Convolution"\n bottom: "res7_bn"\n top: "res7_conv1"\n convolution_param {\n bias_term: false\n num_output: 128\n pad: 0\n kernel_size: 1\n stride: 1\n }\n}\nlayer {\n name: "res7_conv1_bn"\n type: "BatchNorm"\n bottom: "res7_conv1"\n top: "res7_conv1"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n name: "res7_conv1_scale"\n type: "Scale"\n bottom: "res7_conv1"\n top: "res7_conv1"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n name: "res7_conv1_relu"\n type: "ReLU"\n bottom: "res7_conv1"\n top: "res7_conv1"\n}\nlayer {\n name: "res7_conv2"\n type: "Convolution"\n bottom: "res7_conv1"\n top: "res7_conv2"\n convolution_param {\n bias_term: false\n num_output: 128\n pad: 1\n kernel_size: 3\n stride: 1\n }\n}\nlayer {\n name: "res7_conv2_bn"\n type: "BatchNorm"\n bottom: "res7_conv2"\n top: "res7_conv2"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n name: "res7_conv2_scale"\n type: "Scale"\n bottom: "res7_conv2"\n top: "res7_conv2"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n name: "res7_conv2_relu"\n type: "ReLU"\n bottom: "res7_conv2"\n top: "res7_conv2"\n}\nlayer {\n name: "res7_conv3"\n type: "Convolution"\n bottom: "res7_conv2"\n top: "res7_conv3"\n convolution_param {\n bias_term: false\n num_output: 512\n pad: 0\n kernel_size: 1\n stride: 1\n }\n}\nlayer {\n name: "res7_eletwise"\n type: "Eltwise"\n bottom: "res6_eletwise"\n bottom: "res7_conv3"\n top: "res7_eletwise"\n eltwise_param {\n operation: SUM\n }\n}\nlayer {\n name: "res8_bn"\n type: "BatchNorm"\n bottom: "res7_eletwise"\n top: "res8_bn"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n name: "res8_scale"\n type: "Scale"\n bottom: "res8_bn"\n top: "res8_bn"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n name: "res8_relu"\n type: "ReLU"\n bottom: "res8_bn"\n top: "res8_bn"\n}\nlayer {\n name: "res8_conv1"\n type: "Convolution"\n bottom: "res8_bn"\n top: "res8_conv1"\n convolution_param {\n bias_term: false\n num_output: 128\n pad: 0\n kernel_size: 1\n stride: 1\n }\n}\nlayer {\n name: "res8_conv1_bn"\n type: "BatchNorm"\n bottom: "res8_conv1"\n top: "res8_conv1"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n name: "res8_conv1_scale"\n type: "Scale"\n bottom: "res8_conv1"\n top: "res8_conv1"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n name: "res8_conv1_relu"\n type: "ReLU"\n bottom: "res8_conv1"\n top: "res8_conv1"\n}\nlayer {\n name: "res8_conv2"\n type: "Convolution"\n bottom: "res8_conv1"\n top: "res8_conv2"\n convolution_param {\n bias_term: false\n num_output: 128\n pad: 1\n kernel_size: 3\n stride: 1\n }\n}\nlayer {\n name: "res8_conv2_bn"\n type: "BatchNorm"\n bottom: "res8_conv2"\n top: "res8_conv2"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n name: "res8_conv2_scale"\n type: "Scale"\n bottom: "res8_conv2"\n top: "res8_conv2"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n name: "res8_conv2_relu"\n type: "ReLU"\n bottom: "res8_conv2"\n top: "res8_conv2"\n}\nlayer {\n name: "res8_conv3"\n type: "Convolution"\n bottom: "res8_conv2"\n top: "res8_conv3"\n convolution_param {\n bias_term: false\n num_output: 512\n pad: 0\n kernel_size: 1\n stride: 1\n }\n}\nlayer {\n name: "res8_eletwise"\n type: "Eltwise"\n bottom: "res7_eletwise"\n bottom: "res8_conv3"\n top: "res8_eletwise"\n eltwise_param {\n operation: SUM\n }\n}\nlayer {\n name: "res9_bn"\n type: "BatchNorm"\n bottom: "res8_eletwise"\n top: "res9_bn"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n name: "res9_scale"\n type: "Scale"\n bottom: "res9_bn"\n top: "res9_bn"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n name: "res9_relu"\n type: "ReLU"\n bottom: "res9_bn"\n top: "res9_bn"\n}\nlayer {\n name: "res9_conv1"\n type: "Convolution"\n bottom: "res9_bn"\n top: "res9_conv1"\n convolution_param {\n bias_term: false\n num_output: 128\n pad: 0\n kernel_size: 1\n stride: 1\n }\n}\nlayer {\n name: "res9_conv1_bn"\n type: "BatchNorm"\n bottom: "res9_conv1"\n top: "res9_conv1"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n name: "res9_conv1_scale"\n type: "Scale"\n bottom: "res9_conv1"\n top: "res9_conv1"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n name: "res9_conv1_relu"\n type: "ReLU"\n bottom: "res9_conv1"\n top: "res9_conv1"\n}\nlayer {\n name: "res9_conv2"\n type: "Convolution"\n bottom: "res9_conv1"\n top: "res9_conv2"\n convolution_param {\n bias_term: false\n num_output: 128\n pad: 1\n kernel_size: 3\n stride: 1\n }\n}\nlayer {\n name: "res9_conv2_bn"\n type: "BatchNorm"\n bottom: "res9_conv2"\n top: "res9_conv2"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n name: "res9_conv2_scale"\n type: "Scale"\n bottom: "res9_conv2"\n top: "res9_conv2"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n name: "res9_conv2_relu"\n type: "ReLU"\n bottom: "res9_conv2"\n top: "res9_conv2"\n}\nlayer {\n name: "res9_conv3"\n type: "Convolution"\n bottom: "res9_conv2"\n top: "res9_conv3"\n convolution_param {\n bias_term: false\n num_output: 512\n pad: 0\n kernel_size: 1\n stride: 1\n }\n}\nlayer {\n name: "res9_eletwise"\n type: "Eltwise"\n bottom: "res8_eletwise"\n bottom: "res9_conv3"\n top: "res9_eletwise"\n eltwise_param {\n operation: SUM\n }\n}\nlayer {\n name: "res10_bn"\n type: "BatchNorm"\n bottom: "res9_eletwise"\n top: "res10_bn"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n name: "res10_scale"\n type: "Scale"\n bottom: "res10_bn"\n top: "res10_bn"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n name: "res10_relu"\n type: "ReLU"\n bottom: "res10_bn"\n top: "res10_bn"\n}\nlayer {\n name: "res10_conv1"\n type: "Convolution"\n bottom: "res10_bn"\n top: "res10_conv1"\n convolution_param {\n bias_term: false\n num_output: 128\n pad: 0\n kernel_size: 1\n stride: 1\n }\n}\nlayer {\n name: "res10_conv1_bn"\n type: "BatchNorm"\n bottom: "res10_conv1"\n top: "res10_conv1"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n name: "res10_conv1_scale"\n type: "Scale"\n bottom: "res10_conv1"\n top: "res10_conv1"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n name: "res10_conv1_relu"\n type: "ReLU"\n bottom: "res10_conv1"\n top: "res10_conv1"\n}\nlayer {\n name: "res10_conv2"\n type: "Convolution"\n bottom: "res10_conv1"\n top: "res10_conv2"\n convolution_param {\n bias_term: false\n num_output: 128\n pad: 1\n kernel_size: 3\n stride: 1\n }\n}\nlayer {\n name: "res10_conv2_bn"\n type: "BatchNorm"\n bottom: "res10_conv2"\n top: "res10_conv2"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n name: "res10_conv2_scale"\n type: "Scale"\n bottom: "res10_conv2"\n top: "res10_conv2"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n name: "res10_conv2_relu"\n type: "ReLU"\n bottom: "res10_conv2"\n top: "res10_conv2"\n}\nlayer {\n name: "res10_conv3"\n type: "Convolution"\n bottom: "res10_conv2"\n top: "res10_conv3"\n convolution_param {\n bias_term: false\n num_output: 512\n pad: 0\n kernel_size: 1\n stride: 1\n }\n}\nlayer {\n name: "res10_eletwise"\n type: "Eltwise"\n bottom: "res9_eletwise"\n bottom: "res10_conv3"\n top: "res10_eletwise"\n eltwise_param {\n operation: SUM\n }\n}\nlayer {\n name: "res11_bn"\n type: "BatchNorm"\n bottom: "res10_eletwise"\n top: "res11_bn"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n name: "res11_scale"\n type: "Scale"\n bottom: "res11_bn"\n top: "res11_bn"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n name: "res11_relu"\n type: "ReLU"\n bottom: "res11_bn"\n top: "res11_bn"\n}\nlayer {\n name: "res11_conv1"\n type: "Convolution"\n bottom: "res11_bn"\n top: "res11_conv1"\n convolution_param {\n bias_term: false\n num_output: 128\n pad: 0\n kernel_size: 1\n stride: 1\n }\n}\nlayer {\n name: "res11_conv1_bn"\n type: "BatchNorm"\n bottom: "res11_conv1"\n top: "res11_conv1"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n name: "res11_conv1_scale"\n type: "Scale"\n bottom: "res11_conv1"\n top: "res11_conv1"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n name: "res11_conv1_relu"\n type: "ReLU"\n bottom: "res11_conv1"\n top: "res11_conv1"\n}\nlayer {\n name: "res11_conv2"\n type: "Convolution"\n bottom: "res11_conv1"\n top: "res11_conv2"\n convolution_param {\n bias_term: false\n num_output: 128\n pad: 1\n kernel_size: 3\n stride: 1\n }\n}\nlayer {\n name: "res11_conv2_bn"\n type: "BatchNorm"\n bottom: "res11_conv2"\n top: "res11_conv2"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n name: "res11_conv2_scale"\n type: "Scale"\n bottom: "res11_conv2"\n top: "res11_conv2"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n name: "res11_conv2_relu"\n type: "ReLU"\n bottom: "res11_conv2"\n top: "res11_conv2"\n}\nlayer {\n name: "res11_conv3"\n type: "Convolution"\n bottom: "res11_conv2"\n top: "res11_conv3"\n convolution_param {\n bias_term: false\n num_output: 512\n pad: 0\n kernel_size: 1\n stride: 1\n }\n}\nlayer {\n name: "res11_eletwise"\n type: "Eltwise"\n bottom: "res10_eletwise"\n bottom: "res11_conv3"\n top: "res11_eletwise"\n eltwise_param {\n operation: SUM\n }\n}\nlayer {\n name: "res12_bn"\n type: "BatchNorm"\n bottom: "res11_eletwise"\n top: "res12_bn"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n name: "res12_scale"\n type: "Scale"\n bottom: "res12_bn"\n top: "res12_bn"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n name: "res12_relu"\n type: "ReLU"\n bottom: "res12_bn"\n top: "res12_bn"\n}\nlayer {\n name: "res12_conv1"\n type: "Convolution"\n bottom: "res12_bn"\n top: "res12_conv1"\n convolution_param {\n bias_term: false\n num_output: 256\n pad: 0\n kernel_size: 1\n stride: 1\n }\n}\nlayer {\n name: "res12_conv1_bn"\n type: "BatchNorm"\n bottom: "res12_conv1"\n top: "res12_conv1"\n batch_norm_param {\n use_global_stats: true\n }\n}\nlayer {\n name: "res12_conv1_scale"\n type: "Scale"\n bottom: "res12_conv1"\n top: "res12_conv1"\n scale_param {\n bias_term: true\n }\n}\nlayer {\n name: "res12_conv1_relu"\n type: "ReLU"\n bottom: "res12_conv1"\n top: "res12_conv1"\n}\n'
return string |
favorite_places = {
'znn': ['chengdu', 'shanghai', 'hangzhou'],
'yl': ['chengdu', 'huang montains'],
'other': ['xian', 'xinjiang', 'nanji']
}
for name, places in favorite_places.items():
print("\n" + name.title() + " likes the following places:")
for place in places:
print("- " + place.title()) | favorite_places = {'znn': ['chengdu', 'shanghai', 'hangzhou'], 'yl': ['chengdu', 'huang montains'], 'other': ['xian', 'xinjiang', 'nanji']}
for (name, places) in favorite_places.items():
print('\n' + name.title() + ' likes the following places:')
for place in places:
print('- ' + place.title()) |
#
# PySNMP MIB module CISCO-TAP2-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-TAP2-MIB
# Produced by pysmi-0.3.4 at Wed May 1 11:49:44 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
SingleValueConstraint, ConstraintsIntersection, ValueRangeConstraint, ValueSizeConstraint, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ConstraintsIntersection", "ValueRangeConstraint", "ValueSizeConstraint", "ConstraintsUnion")
ciscoMgmt, = mibBuilder.importSymbols("CISCO-SMI", "ciscoMgmt")
InterfaceIndexOrZero, = mibBuilder.importSymbols("IF-MIB", "InterfaceIndexOrZero")
InetAddressType, InetPortNumber, InetAddress = mibBuilder.importSymbols("INET-ADDRESS-MIB", "InetAddressType", "InetPortNumber", "InetAddress")
SnmpAdminString, = mibBuilder.importSymbols("SNMP-FRAMEWORK-MIB", "SnmpAdminString")
NotificationGroup, ObjectGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ObjectGroup", "ModuleCompliance")
Bits, iso, MibScalar, MibTable, MibTableRow, MibTableColumn, Gauge32, Unsigned32, ObjectIdentity, Counter32, MibIdentifier, IpAddress, TimeTicks, ModuleIdentity, Counter64, NotificationType, Integer32 = mibBuilder.importSymbols("SNMPv2-SMI", "Bits", "iso", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Gauge32", "Unsigned32", "ObjectIdentity", "Counter32", "MibIdentifier", "IpAddress", "TimeTicks", "ModuleIdentity", "Counter64", "NotificationType", "Integer32")
DisplayString, TruthValue, RowStatus, TextualConvention, StorageType, DateAndTime = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TruthValue", "RowStatus", "TextualConvention", "StorageType", "DateAndTime")
ciscoTap2MIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 9, 9, 399))
ciscoTap2MIB.setRevisions(('2008-09-10 00:00', '2007-12-21 00:00', '2006-11-27 00:00', '2004-03-11 00:00', '2004-01-27 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: ciscoTap2MIB.setRevisionsDescriptions(("Added the 'mobility' enum to cTap2StreamType as a specific filter defined by CISCO-MOBILITY-TAP-MIB.", "- Added support for cTap2DebugUserTable. - Added new enumeration rtp to 'cTap2MediationTransport' object. - Added new enumeration rtp to 'cTap2MediationCapabilities' object. - Added ciscoTap2MIBComplianceRev3 compliance which deprecates ciscoTap2MIBComplianceRev2. - Added ciscoTap2DebugComplianceGroupRev1 compliance Group which deprecates ciscoTap2DebugComplianceGroup.", '- Following objects are added in table cTap2StreamTable to support counter64 data cTap2StreamInterceptedHCPackets cTap2StreamInterceptHCDrops - Added ciscoTap2StreamHCStatsGroup OBJECT-GROUP - Added ciscoTap2MIBComplianceRev2 compliance which deprecates ciscoTap2MIBCompliance.', 'Added a new type to cTap2StreamType for intercepting sessions/flows of Mobile subscribers in wireless CDMA technology. Specific intercept filter is defined in CISCO-CDMA-PDSN-TAP-MIB.', 'Initial version of this MIB module.',))
if mibBuilder.loadTexts: ciscoTap2MIB.setLastUpdated('200809100000Z')
if mibBuilder.loadTexts: ciscoTap2MIB.setOrganization('Cisco Systems, Inc.')
if mibBuilder.loadTexts: ciscoTap2MIB.setContactInfo('Cisco Systems Customer Service Postal:170 W. Tasman Drive San Jose, CA 95134 USA Tel:+1 800 553-NETS E-mail:cs-li@cisco.com')
if mibBuilder.loadTexts: ciscoTap2MIB.setDescription("This module manages Cisco's intercept feature. This MIB replaces CISCO-TAP-MIB. This MIB defines a generic stream table that contains fields common to all intercept types. Specific intercept filters are defined in extension MIBs. They are CISCO-IP-TAP-MIB for IP intercepts, CISCO-802-TAP-MIB for IEEE 802 intercepts and CISCO-USER-CONNECTION-TAP-MIB for RADIUS-based user connection intercepts.")
ciscoTap2MIBNotifs = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 399, 0))
ciscoTap2MIBObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 399, 1))
ciscoTap2MIBConform = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 399, 2))
cTap2MediationGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 1))
cTap2StreamGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 2))
cTap2DebugGroup = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 3))
class Ctap2Dscp(TextualConvention, Integer32):
description = 'An integer that is in the range of the DiffServ codepoint values.'
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(0, 63)
cTap2MediationNewIndex = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cTap2MediationNewIndex.setStatus('current')
if mibBuilder.loadTexts: cTap2MediationNewIndex.setDescription('This object contains a value which may be used as an index value for a new cTap2MediationEntry. Whenever read, the agent will change the value to a new non-conflicting value. This is to reduce the probability of errors during creation of new cTap2MediationTable entries.')
cTap2MediationTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 1, 2), )
if mibBuilder.loadTexts: cTap2MediationTable.setStatus('current')
if mibBuilder.loadTexts: cTap2MediationTable.setDescription('This table lists the Mediation Devices with which the intercepting device communicates. These may be on the same or different Mediation Devices. This table is written by the Mediation Device, and is always volatile. This is because intercepts may disappear during a restart of the intercepting equipment. Entries are added to this table via cTap2MediationStatus in accordance with the RowStatus convention.')
cTap2MediationEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 1, 2, 1), ).setIndexNames((0, "CISCO-TAP2-MIB", "cTap2MediationContentId"))
if mibBuilder.loadTexts: cTap2MediationEntry.setStatus('current')
if mibBuilder.loadTexts: cTap2MediationEntry.setDescription('The entry describes a single session maintained with an application on a Mediation Device.')
cTap2MediationContentId = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 1, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647)))
if mibBuilder.loadTexts: cTap2MediationContentId.setStatus('current')
if mibBuilder.loadTexts: cTap2MediationContentId.setDescription("cTap2MediationContentId is a session identifier, from the intercept application's perspective, and a content identifier from the Mediation Device's perspective. The Mediation Device is responsible for making sure these are unique, although the SNMP RowStatus row creation process will help by not allowing it to create conflicting entries. Before creating a new entry, a value for this variable may be obtained by reading cTap2MediationNewIndex to reduce the probability of a value collision.")
cTap2MediationDestAddressType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 1, 2, 1, 2), InetAddressType()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cTap2MediationDestAddressType.setStatus('current')
if mibBuilder.loadTexts: cTap2MediationDestAddressType.setDescription('The type of cTap2MediationDestAddress.')
cTap2MediationDestAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 1, 2, 1, 3), InetAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cTap2MediationDestAddress.setStatus('current')
if mibBuilder.loadTexts: cTap2MediationDestAddress.setDescription("The IP Address of the Mediation Device's network interface to which to direct intercepted traffic.")
cTap2MediationDestPort = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 1, 2, 1, 4), InetPortNumber()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cTap2MediationDestPort.setStatus('current')
if mibBuilder.loadTexts: cTap2MediationDestPort.setDescription("The port number on the Mediation Device's network interface to which to direct intercepted traffic.")
cTap2MediationSrcInterface = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 1, 2, 1, 5), InterfaceIndexOrZero()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cTap2MediationSrcInterface.setStatus('current')
if mibBuilder.loadTexts: cTap2MediationSrcInterface.setDescription('The interface on the intercepting device from which to transmit intercepted data. If zero, any interface may be used according to normal IP practice.')
cTap2MediationRtcpPort = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 1, 2, 1, 6), InetPortNumber()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cTap2MediationRtcpPort.setStatus('current')
if mibBuilder.loadTexts: cTap2MediationRtcpPort.setDescription("The port number on the intercepting device to which the Mediation Devices directs RTCP Receiver Reports and Nacks. This object is only relevant when the value of cTap2MediationTransport is 'rtpNack'. This port is assigned by the intercepting device, rather than by the Mediation Device or manager application. The value of this MIB object has no effect before activating the cTap2MediationEntry.")
cTap2MediationDscp = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 1, 2, 1, 7), Ctap2Dscp().clone(34)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cTap2MediationDscp.setStatus('current')
if mibBuilder.loadTexts: cTap2MediationDscp.setDescription('The Differentiated Services Code Point the intercepting device applies to the IP packets encapsulating the intercepted traffic.')
cTap2MediationDataType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 1, 2, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 127))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cTap2MediationDataType.setStatus('current')
if mibBuilder.loadTexts: cTap2MediationDataType.setDescription("If RTP with Ack/Nack resilience is selected as a transport, the mediation process requires an RTP payload type for data transmissions, and a second RTP payload type for retransmissions. This is the RTP payload type for transmissions. This object is only effective when the value of cTap2MediationTransport is 'rtpNack'.")
cTap2MediationRetransmitType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 1, 2, 1, 9), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 127))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cTap2MediationRetransmitType.setStatus('current')
if mibBuilder.loadTexts: cTap2MediationRetransmitType.setDescription("If RTP with Ack/Nack resilience is selected as a transport, the mediation process requires an RTP payload type for data transmissions, and a second RTP payload type for retransmissions. This is the RTP payload type for retransmissions. This object is only effective when the value of cTap2MediationTransport is 'rtpNack'.")
cTap2MediationTimeout = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 1, 2, 1, 10), DateAndTime()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cTap2MediationTimeout.setStatus('current')
if mibBuilder.loadTexts: cTap2MediationTimeout.setDescription("The time at which this row and all related Stream Table rows should be automatically removed, and the intercept function cease. Since the initiating network manager may be the only device able to manage a specific intercept or know of its existence, this acts as a fail-safe for the failure or removal of the network manager. The object is only effective when the value of cTap2MediationStatus is 'active'.")
cTap2MediationTransport = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 1, 2, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("udp", 1), ("rtpNack", 2), ("tcp", 3), ("sctp", 4), ("rtp", 5)))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cTap2MediationTransport.setStatus('current')
if mibBuilder.loadTexts: cTap2MediationTransport.setDescription('The protocol used in transferring intercepted data to the Mediation Device. The following protocols may be supported: udp: PacketCable udp format rtpNack: RTP with Nack resilience tcp: TCP with head of line blocking sctp: SCTP with head of line blocking rtp: Realtime Transport Protocol(RTP) packet format')
cTap2MediationNotificationEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 1, 2, 1, 12), TruthValue().clone('true')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cTap2MediationNotificationEnable.setStatus('current')
if mibBuilder.loadTexts: cTap2MediationNotificationEnable.setDescription('This variable controls the generation of any notifications or informs by the MIB agent for this table entry.')
cTap2MediationStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 1, 2, 1, 13), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cTap2MediationStatus.setStatus('current')
if mibBuilder.loadTexts: cTap2MediationStatus.setDescription("The status of this conceptual row. This object is used to manage creation, modification and deletion of rows in this table. cTap2MediationTimeout may be modified at any time (even while the row is active). But when the row is active, the other writable objects may not be modified without setting its value to 'notInService'. The entry may not be deleted or deactivated by setting its value to 'destroy' or 'notInService' if there is any associated entry in cTap2StreamTable.")
cTap2MediationCapabilities = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 1, 3), Bits().clone(namedValues=NamedValues(("ipV4SrcInterface", 0), ("ipV6SrcInterface", 1), ("udp", 2), ("rtpNack", 3), ("tcp", 4), ("sctp", 5), ("rtp", 6)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cTap2MediationCapabilities.setStatus('current')
if mibBuilder.loadTexts: cTap2MediationCapabilities.setDescription('This object displays the device capabilities with respect to certain fields in Mediation Device table. This may be dependent on hardware capabilities, software capabilities. The following values may be supported: ipV4SrcInterface: SNMP ifIndex Value may be used to select the interface (denoted by cTap2MediationSrcInterface) on the intercepting device from which to transmit intercepted data to an IPv4 address Mediation Device. ipV6SrcInterface: SNMP ifIndex Value may be used to select the interface (denoted by cTap2MediationSrcInterface) on the intercepting device from which to transmit intercepted data to an IPv6 address Mediation Device. udp: UDP may be used as transport protocol (denoted by cTap2MediationTransport) in transferring intercepted data to the Mediation Device. rtcpNack: RTP with Nack resilience may be used as transport protocol (denoted by cTap2MediationTransport) in transferring intercepted data to the Mediation Device. tcp: TCP may be used as transport protocol (denoted by cTap2MediationTransport) in transferring intercepted data to the Mediation Device. sctp: SCTP may be used as transport protocol (denoted by cTap2MediationTransport) in transferring intercepted data to the Mediation Device. rtp: RTP may be used as transport protocol (denoted by cTap2MediationTransport) in transferring intercepted data to the Mediation Device.')
cTap2StreamTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 2, 1), )
if mibBuilder.loadTexts: cTap2StreamTable.setStatus('current')
if mibBuilder.loadTexts: cTap2StreamTable.setDescription('The Intercept Stream Table lists the traffic streams to be intercepted. The same data stream may be required by multiple taps, and one might assume that often the intercepted stream is a small subset of the traffic that could be intercepted. The Table consists of generic fields that are independent of the type of intercept. It contains type of the specific filter which is defined in an extension MIB and counters to account for packets intercepted or dropped by the attached filter specification. Note that the Mediation Device must make sure there is only one type of specific filter created with the same indices as that of a row in this table, otherwise the later creations will fail. For example, if there is a row in this table with index 1.2, there can be a corresponding row with the same index either in citapStreamTable, c8tapStreamTable or cuctTapStreamTable, but not all. The first index indicates which Mediation Device the intercepted traffic will be diverted to. The second index permits multiple classifiers to be used together. Entries are added to this table via cTap2StreamStatus in accordance with the RowStatus convention.')
cTap2StreamEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 2, 1, 1), ).setIndexNames((0, "CISCO-TAP2-MIB", "cTap2MediationContentId"), (0, "CISCO-TAP2-MIB", "cTap2StreamIndex"))
if mibBuilder.loadTexts: cTap2StreamEntry.setStatus('current')
if mibBuilder.loadTexts: cTap2StreamEntry.setDescription('A stream entry indicates a single data stream to be intercepted to a Mediation Device. Many selected data streams may go to the same application interface, and many application interfaces are supported.')
cTap2StreamIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 2, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647)))
if mibBuilder.loadTexts: cTap2StreamIndex.setStatus('current')
if mibBuilder.loadTexts: cTap2StreamIndex.setDescription('The index of the stream itself.')
cTap2StreamType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 2, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("ip", 1), ("mac", 2), ("userConnection", 3), ("msPdsn", 4), ("mobility", 5)))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cTap2StreamType.setStatus('current')
if mibBuilder.loadTexts: cTap2StreamType.setDescription('Identifies the type of intercept filter associated to this generic stream. The following types of streams are supported: ip: The specific filter is an IP filter with same indices as that of this table. The exact filter is a row in citapStreamTable of CISCO-IP-TAP-MIB. mac: The specific filter is a MAC filter with same indices as that of this table. The exact filter is a row in c8tapStreamTable of CISCO-802-TAP-MIB. userConnecton: The specific filter is a user connection filter with same indices as that of this table. The exact filter is a row in cuctTapStreamTable of CISCO-USER-CONNECTION-TAP-MIB. msPdsn: The specific filter is a Mobile Sub connection filter with same indices as that of this table. The exact filter is a row in ccptapStreamTable of CISCO-CDMA-PDSN-TAP-MIB. mobility: The specific filter is a Mobile Subscriber connection filter with same indices as that of this table. The exact filter is a row in cmtapStreamTable of CISCO-MOBILITY-TAP-MIB.')
cTap2StreamInterceptEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 2, 1, 1, 3), TruthValue().clone('false')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cTap2StreamInterceptEnable.setStatus('current')
if mibBuilder.loadTexts: cTap2StreamInterceptEnable.setDescription("If 'true', the tap should intercept matching traffic. The value for this object should be set to 'true' only after an additional filter specification has been attached to this stream.")
cTap2StreamInterceptedPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 2, 1, 1, 4), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cTap2StreamInterceptedPackets.setStatus('current')
if mibBuilder.loadTexts: cTap2StreamInterceptedPackets.setDescription('The number of packets matching this data stream specification that have been intercepted.')
cTap2StreamInterceptDrops = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 2, 1, 1, 5), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cTap2StreamInterceptDrops.setStatus('current')
if mibBuilder.loadTexts: cTap2StreamInterceptDrops.setDescription('The number of packets matching this data stream specification that, having been intercepted, were dropped in the lawful intercept process.')
cTap2StreamStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 2, 1, 1, 6), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cTap2StreamStatus.setStatus('current')
if mibBuilder.loadTexts: cTap2StreamStatus.setDescription("The status of this conceptual row. This object manages creation, modification, and deletion of rows in this table. cTap2StreamInterceptEnable may be modified any time even the value of this entry rowStatus object is 'active'. When other rows must be changed, cTap2StreamStatus must be first set to 'notInService'.")
cTap2StreamInterceptedHCPackets = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 2, 1, 1, 7), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cTap2StreamInterceptedHCPackets.setStatus('current')
if mibBuilder.loadTexts: cTap2StreamInterceptedHCPackets.setDescription('The number of packets matching this data stream specification that have been intercepted. This object is a 64-bit version of cTap2StreamInterceptedPackets.')
cTap2StreamInterceptHCDrops = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 2, 1, 1, 8), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cTap2StreamInterceptHCDrops.setStatus('current')
if mibBuilder.loadTexts: cTap2StreamInterceptHCDrops.setDescription('The number of packets matching this data stream specification that, having been intercepted, were dropped in the lawful intercept process. This object is a 64-bit version of cTap2StreamInterceptDrops.')
cTap2DebugAge = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 3, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cTap2DebugAge.setStatus('current')
if mibBuilder.loadTexts: cTap2DebugAge.setDescription('This object contains the duration in minutes for which an entry in cTap2DebugTable is maintained by the implementing device after which the entry is deleted. The management station also has the option of deleting the entry itself by setting cTap2DebugStatus.')
cTap2DebugMaxEntries = MibScalar((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 3, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647))).setMaxAccess("readonly")
if mibBuilder.loadTexts: cTap2DebugMaxEntries.setStatus('current')
if mibBuilder.loadTexts: cTap2DebugMaxEntries.setDescription('This object contains the maximum number of debug messages maintained by the implementing device at a time. If this limit is crossed, most recent message will replace the least recent message.')
cTap2DebugTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 3, 3), )
if mibBuilder.loadTexts: cTap2DebugTable.setStatus('current')
if mibBuilder.loadTexts: cTap2DebugTable.setDescription('A table that contains Lawful Intercept debug messages generated by the implementing device. This table is used by ciscoTap2MediationDebug and ciscoTap2StreamDebug notifications. An entry in this table contains a debug message which is regarding either a Mediation Device or a intercept stream created by a Mediation Device. The Mediation device is identified by cTap2DebugMediationId whose value is that of cTap2MediationContentId of cTapMediationEntry. The stream is identified by cTap2DebugMediationId and cTap2DebugStreamId whose values are that of cTap2MediationContentId and cTap2StreamIndex of the corresponding cTap2StreamEntry. Note that cTap2DebugStreamId may be zero for an entry, in which case the debug message is regarding a Medation Device. Entries are added to this table via cTap2DebugStatus in accordance with the RowStatus convention.')
cTap2DebugEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 3, 3, 1), ).setIndexNames((0, "CISCO-TAP2-MIB", "cTap2DebugIndex"))
if mibBuilder.loadTexts: cTap2DebugEntry.setStatus('current')
if mibBuilder.loadTexts: cTap2DebugEntry.setDescription('A list of the debug messages.')
cTap2DebugIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 3, 3, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 2147483647)))
if mibBuilder.loadTexts: cTap2DebugIndex.setStatus('current')
if mibBuilder.loadTexts: cTap2DebugIndex.setDescription('Index to the debug table.')
cTap2DebugMediationId = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 3, 3, 1, 2), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cTap2DebugMediationId.setStatus('current')
if mibBuilder.loadTexts: cTap2DebugMediationId.setDescription('The value of this object is that of cTap2MediationContentId identifying an entry in cTap2MediationTable. Note this object may contain a value for which an entry in cTap2MediationTable does not exist. This happens when creation of an entry in cTap2MediationTable fails and this debug message conveys more detailed information regarding the failure.')
cTap2DebugStreamId = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 3, 3, 1, 3), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cTap2DebugStreamId.setStatus('current')
if mibBuilder.loadTexts: cTap2DebugStreamId.setDescription('The value of this object is that of cTap2StreamIndex of an entry in cTap2StreamTable. This object along with cTap2DebugMediationId identifies an entry in cTap2StreamTable. The value of this object may be zero, in which this debug message is regarding a Mediation Device, but not a particular stream. Note this object may contain a value for which an entry in cTap2MediationTable does not exist. This happens when creation of an entry in cTap2StreamTable fails.')
cTap2DebugMessage = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 3, 3, 1, 4), SnmpAdminString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: cTap2DebugMessage.setStatus('current')
if mibBuilder.loadTexts: cTap2DebugMessage.setDescription('A text string contains the debug message.')
cTap2DebugStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 3, 3, 1, 5), RowStatus()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: cTap2DebugStatus.setStatus('current')
if mibBuilder.loadTexts: cTap2DebugStatus.setDescription("The status of this conceptual row. A row in this table is created by the implementing device. A management station cannot modify any of the objects in this row, except deleting the row by setting this object to 'destroy'.")
cTap2DebugUserTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 3, 4), )
if mibBuilder.loadTexts: cTap2DebugUserTable.setStatus('current')
if mibBuilder.loadTexts: cTap2DebugUserTable.setDescription("The User Table lists information of all the users configured in the system who are given permission by different Mediation Devices to access Lawful Intercept CLIs. This table will have dependancy on cTap2MediationTable. When entry in cTap2MediationTable is deleted or moved to 'notInService', entries corresponding cTap2MediationContentId in this table will be deleted.")
cTap2DebugUserEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 3, 4, 1), ).setIndexNames((0, "CISCO-TAP2-MIB", "cTap2MediationContentId"), (0, "CISCO-TAP2-MIB", "cTap2DebugUserName"))
if mibBuilder.loadTexts: cTap2DebugUserEntry.setStatus('current')
if mibBuilder.loadTexts: cTap2DebugUserEntry.setDescription('A conceptual row in the cTap2DebugUserTable. Each row represents name of user on the router to whom Mediation Device with CCCid represented by cTap2MediationContentId has given access to Lawful Intercept commands and cTap2DebugUserTimeout represents the time when the entry will expire.')
cTap2DebugUserName = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 3, 4, 1, 1), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(1, 255)))
if mibBuilder.loadTexts: cTap2DebugUserName.setStatus('current')
if mibBuilder.loadTexts: cTap2DebugUserName.setDescription('A human readable string representing the name of debug user who will have access to Lawful Intercept commands.')
cTap2DebugUserTimeout = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 3, 4, 1, 2), DateAndTime()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cTap2DebugUserTimeout.setStatus('current')
if mibBuilder.loadTexts: cTap2DebugUserTimeout.setDescription("This object specifies the time at which the row will be removed from the table by the system. The value of this object is only effective when the value of corresponding instance of cTap2DebugUserStatus is 'active'.")
cTap2DebugUserStorageType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 3, 4, 1, 3), StorageType().clone('volatile')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cTap2DebugUserStorageType.setStatus('current')
if mibBuilder.loadTexts: cTap2DebugUserStorageType.setDescription("This object specifies the storage type of this conceptual row. If it is set to 'nonVolatile', this entry can be saved into non-volatile memory.")
cTap2DebugUserStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 3, 4, 1, 4), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: cTap2DebugUserStatus.setStatus('current')
if mibBuilder.loadTexts: cTap2DebugUserStatus.setDescription("The status of this conceptual row. This object manages creation, modification, and deletion of rows in this table. cTap2DebugUserTimeout may be modified any time even when the value of this entry rowStatus object is 'active'.")
ciscoTap2MIBActive = NotificationType((1, 3, 6, 1, 4, 1, 9, 9, 399, 0, 1))
if mibBuilder.loadTexts: ciscoTap2MIBActive.setStatus('current')
if mibBuilder.loadTexts: ciscoTap2MIBActive.setDescription('This Notification is sent when an intercepting router or switch is first capable of intercepting a packet corresponding to a configured data stream. The value of the corresponding cTap2StreamType which identifies the actual intercept stream type is included in this notification. This notification may be generated in conjunction with the intercept application, which is designed to expect the notification to be sent as reliably as possible, e.g., through the use of a finite number of retransmissions until acknowledged, as and when such mechanisms are available; for example, with SNMPv3, this would be an InformRequest. Filter installation can take a long period of time, during which call progress may be delayed.')
ciscoTap2MediationTimedOut = NotificationType((1, 3, 6, 1, 4, 1, 9, 9, 399, 0, 2)).setObjects(("CISCO-TAP2-MIB", "cTap2MediationStatus"))
if mibBuilder.loadTexts: ciscoTap2MediationTimedOut.setStatus('current')
if mibBuilder.loadTexts: ciscoTap2MediationTimedOut.setDescription('When an intercept is autonomously removed by an intercepting device, such as due to the time specified in cTap2MediationTimeout arriving, the device notifies the manager of the action.')
ciscoTap2MediationDebug = NotificationType((1, 3, 6, 1, 4, 1, 9, 9, 399, 0, 3)).setObjects(("CISCO-TAP2-MIB", "cTap2DebugMediationId"), ("CISCO-TAP2-MIB", "cTap2DebugMessage"))
if mibBuilder.loadTexts: ciscoTap2MediationDebug.setStatus('current')
if mibBuilder.loadTexts: ciscoTap2MediationDebug.setDescription('When there is intervention needed due to some events related to entries configured in cTap2MediationTable, the device notifies the manager of the event. This notification may be generated in conjunction with the intercept application, which is designed to expect the notification to be sent as reliably as possible, e.g., through the use of a finite number of retransmissions until acknowledged, as and when such mechanisms are available; for example, with SNMPv3, this would be an InformRequest.')
ciscoTap2StreamDebug = NotificationType((1, 3, 6, 1, 4, 1, 9, 9, 399, 0, 4)).setObjects(("CISCO-TAP2-MIB", "cTap2DebugMediationId"), ("CISCO-TAP2-MIB", "cTap2DebugStreamId"), ("CISCO-TAP2-MIB", "cTap2DebugMessage"))
if mibBuilder.loadTexts: ciscoTap2StreamDebug.setStatus('current')
if mibBuilder.loadTexts: ciscoTap2StreamDebug.setDescription('When there is intervention needed due to some events related to entries configured in cTap2StreamTable, the device notifies the manager of the event. This notification may be generated in conjunction with the intercept application, which is designed to expect the notification to be sent as reliably as possible, e.g., through the use of a finite number of retransmissions until acknowledged, as and when such mechanisms are available; for example, with SNMPv3, this would be an InformRequest.')
ciscoTap2Switchover = NotificationType((1, 3, 6, 1, 4, 1, 9, 9, 399, 0, 5))
if mibBuilder.loadTexts: ciscoTap2Switchover.setStatus('current')
if mibBuilder.loadTexts: ciscoTap2Switchover.setDescription('This notification is sent when there is a redundant (standby) route processor available on the intercepting device and the current active processor is going down causing standby to takeover. Note that this notification may be sent by the intercepting device only when it had a chance to know before it goes down. Mediation device when received this notification should assume that configured intercepts on the intercepting device no longer exist, when the standby processor takes control. This means that the Mediation device should again configure the intercepts.')
ciscoTap2MIBCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 399, 2, 1))
ciscoTap2MIBGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 399, 2, 2))
ciscoTap2MIBCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 399, 2, 1, 1)).setObjects(("CISCO-TAP2-MIB", "ciscoTap2MediationComplianceGroup"), ("CISCO-TAP2-MIB", "ciscoTap2StreamComplianceGroup"), ("CISCO-TAP2-MIB", "ciscoTap2MediationCpbComplianceGroup"), ("CISCO-TAP2-MIB", "ciscoTap2NotificationGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ciscoTap2MIBCompliance = ciscoTap2MIBCompliance.setStatus('deprecated')
if mibBuilder.loadTexts: ciscoTap2MIBCompliance.setDescription('The compliance statement for entities which implement the Cisco Intercept MIB')
ciscoTap2MIBComplianceRev2 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 399, 2, 1, 2)).setObjects(("CISCO-TAP2-MIB", "ciscoTap2MediationComplianceGroup"), ("CISCO-TAP2-MIB", "ciscoTap2StreamComplianceGroup"), ("CISCO-TAP2-MIB", "ciscoTap2MediationCpbComplianceGroup"), ("CISCO-TAP2-MIB", "ciscoTap2NotificationGroup"), ("CISCO-TAP2-MIB", "ciscoTap2StreamHCStatsGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ciscoTap2MIBComplianceRev2 = ciscoTap2MIBComplianceRev2.setStatus('deprecated')
if mibBuilder.loadTexts: ciscoTap2MIBComplianceRev2.setDescription('The compliance statement for entities which implement the Cisco Intercept MIB. This compliance deprecates ciscoTap2MIBCompliance.')
ciscoTap2MIBComplianceRev3 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 399, 2, 1, 3)).setObjects(("CISCO-TAP2-MIB", "ciscoTap2MediationComplianceGroup"), ("CISCO-TAP2-MIB", "ciscoTap2StreamComplianceGroup"), ("CISCO-TAP2-MIB", "ciscoTap2MediationCpbComplianceGroup"), ("CISCO-TAP2-MIB", "ciscoTap2NotificationGroup"), ("CISCO-TAP2-MIB", "ciscoTap2StreamHCStatsGroup"), ("CISCO-TAP2-MIB", "ciscoTap2DebugComplianceGroupRev1"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ciscoTap2MIBComplianceRev3 = ciscoTap2MIBComplianceRev3.setStatus('current')
if mibBuilder.loadTexts: ciscoTap2MIBComplianceRev3.setDescription('The compliance statement for entities which implement the Cisco Intercept MIB. This compliance deprecates ciscoTap2MIBComplianceRev2.')
ciscoTap2MediationComplianceGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 399, 2, 2, 1)).setObjects(("CISCO-TAP2-MIB", "cTap2MediationNewIndex"), ("CISCO-TAP2-MIB", "cTap2MediationDestAddressType"), ("CISCO-TAP2-MIB", "cTap2MediationDestAddress"), ("CISCO-TAP2-MIB", "cTap2MediationDestPort"), ("CISCO-TAP2-MIB", "cTap2MediationSrcInterface"), ("CISCO-TAP2-MIB", "cTap2MediationRtcpPort"), ("CISCO-TAP2-MIB", "cTap2MediationDscp"), ("CISCO-TAP2-MIB", "cTap2MediationDataType"), ("CISCO-TAP2-MIB", "cTap2MediationRetransmitType"), ("CISCO-TAP2-MIB", "cTap2MediationTimeout"), ("CISCO-TAP2-MIB", "cTap2MediationTransport"), ("CISCO-TAP2-MIB", "cTap2MediationNotificationEnable"), ("CISCO-TAP2-MIB", "cTap2MediationStatus"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ciscoTap2MediationComplianceGroup = ciscoTap2MediationComplianceGroup.setStatus('current')
if mibBuilder.loadTexts: ciscoTap2MediationComplianceGroup.setDescription('These objects are necessary for description of the data streams directed to a Mediation Device.')
ciscoTap2StreamComplianceGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 399, 2, 2, 2)).setObjects(("CISCO-TAP2-MIB", "cTap2StreamType"), ("CISCO-TAP2-MIB", "cTap2StreamInterceptEnable"), ("CISCO-TAP2-MIB", "cTap2StreamInterceptedPackets"), ("CISCO-TAP2-MIB", "cTap2StreamInterceptDrops"), ("CISCO-TAP2-MIB", "cTap2StreamStatus"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ciscoTap2StreamComplianceGroup = ciscoTap2StreamComplianceGroup.setStatus('current')
if mibBuilder.loadTexts: ciscoTap2StreamComplianceGroup.setDescription('These objects are necessary for a description of the packets to select for interception.')
ciscoTap2NotificationGroup = NotificationGroup((1, 3, 6, 1, 4, 1, 9, 9, 399, 2, 2, 3)).setObjects(("CISCO-TAP2-MIB", "ciscoTap2MIBActive"), ("CISCO-TAP2-MIB", "ciscoTap2MediationTimedOut"), ("CISCO-TAP2-MIB", "ciscoTap2MediationDebug"), ("CISCO-TAP2-MIB", "ciscoTap2StreamDebug"), ("CISCO-TAP2-MIB", "ciscoTap2Switchover"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ciscoTap2NotificationGroup = ciscoTap2NotificationGroup.setStatus('current')
if mibBuilder.loadTexts: ciscoTap2NotificationGroup.setDescription('These notifications are used to present status from the intercepting device to the Mediation Device.')
ciscoTap2MediationCpbComplianceGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 399, 2, 2, 4)).setObjects(("CISCO-TAP2-MIB", "cTap2MediationCapabilities"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ciscoTap2MediationCpbComplianceGroup = ciscoTap2MediationCpbComplianceGroup.setStatus('current')
if mibBuilder.loadTexts: ciscoTap2MediationCpbComplianceGroup.setDescription('These objects are necessary for a description of the mediation device to select for Lawful Intercept.')
ciscoTap2DebugComplianceGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 399, 2, 2, 5)).setObjects(("CISCO-TAP2-MIB", "cTap2DebugAge"), ("CISCO-TAP2-MIB", "cTap2DebugMaxEntries"), ("CISCO-TAP2-MIB", "cTap2DebugMediationId"), ("CISCO-TAP2-MIB", "cTap2DebugStreamId"), ("CISCO-TAP2-MIB", "cTap2DebugMessage"), ("CISCO-TAP2-MIB", "cTap2DebugStatus"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ciscoTap2DebugComplianceGroup = ciscoTap2DebugComplianceGroup.setStatus('deprecated')
if mibBuilder.loadTexts: ciscoTap2DebugComplianceGroup.setDescription('These objects are necessary for debug information.')
ciscoTap2StreamHCStatsGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 399, 2, 2, 6)).setObjects(("CISCO-TAP2-MIB", "cTap2StreamInterceptedHCPackets"), ("CISCO-TAP2-MIB", "cTap2StreamInterceptHCDrops"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ciscoTap2StreamHCStatsGroup = ciscoTap2StreamHCStatsGroup.setStatus('current')
if mibBuilder.loadTexts: ciscoTap2StreamHCStatsGroup.setDescription('These objects are required for 64 bit version of cTap2StreamInterceptedPackets and cTap2StreamInterceptDrops')
ciscoTap2DebugComplianceGroupRev1 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 399, 2, 2, 7)).setObjects(("CISCO-TAP2-MIB", "cTap2DebugAge"), ("CISCO-TAP2-MIB", "cTap2DebugMaxEntries"), ("CISCO-TAP2-MIB", "cTap2DebugMediationId"), ("CISCO-TAP2-MIB", "cTap2DebugStreamId"), ("CISCO-TAP2-MIB", "cTap2DebugMessage"), ("CISCO-TAP2-MIB", "cTap2DebugStatus"), ("CISCO-TAP2-MIB", "cTap2DebugUserTimeout"), ("CISCO-TAP2-MIB", "cTap2DebugUserStorageType"), ("CISCO-TAP2-MIB", "cTap2DebugUserStatus"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
ciscoTap2DebugComplianceGroupRev1 = ciscoTap2DebugComplianceGroupRev1.setStatus('current')
if mibBuilder.loadTexts: ciscoTap2DebugComplianceGroupRev1.setDescription('These objects are necessary for debug information. This compliance group deprecates ciscoTap2DebugComplianceGroup.')
mibBuilder.exportSymbols("CISCO-TAP2-MIB", cTap2DebugStreamId=cTap2DebugStreamId, ciscoTap2DebugComplianceGroupRev1=ciscoTap2DebugComplianceGroupRev1, cTap2StreamInterceptedPackets=cTap2StreamInterceptedPackets, ciscoTap2MIBNotifs=ciscoTap2MIBNotifs, ciscoTap2StreamDebug=ciscoTap2StreamDebug, ciscoTap2MIBCompliance=ciscoTap2MIBCompliance, cTap2MediationRtcpPort=cTap2MediationRtcpPort, cTap2MediationDestPort=cTap2MediationDestPort, cTap2MediationTransport=cTap2MediationTransport, ciscoTap2NotificationGroup=ciscoTap2NotificationGroup, cTap2MediationDscp=cTap2MediationDscp, cTap2MediationStatus=cTap2MediationStatus, ciscoTap2MediationCpbComplianceGroup=ciscoTap2MediationCpbComplianceGroup, ciscoTap2MIBObjects=ciscoTap2MIBObjects, Ctap2Dscp=Ctap2Dscp, cTap2MediationRetransmitType=cTap2MediationRetransmitType, cTap2MediationTimeout=cTap2MediationTimeout, cTap2StreamIndex=cTap2StreamIndex, cTap2MediationDestAddress=cTap2MediationDestAddress, cTap2DebugAge=cTap2DebugAge, ciscoTap2MediationDebug=ciscoTap2MediationDebug, ciscoTap2MIBCompliances=ciscoTap2MIBCompliances, cTap2DebugUserStatus=cTap2DebugUserStatus, ciscoTap2MIBActive=ciscoTap2MIBActive, cTap2DebugUserName=cTap2DebugUserName, cTap2StreamInterceptedHCPackets=cTap2StreamInterceptedHCPackets, ciscoTap2StreamHCStatsGroup=ciscoTap2StreamHCStatsGroup, cTap2MediationGroup=cTap2MediationGroup, cTap2MediationEntry=cTap2MediationEntry, ciscoTap2MIBComplianceRev3=ciscoTap2MIBComplianceRev3, ciscoTap2StreamComplianceGroup=ciscoTap2StreamComplianceGroup, ciscoTap2MediationTimedOut=ciscoTap2MediationTimedOut, cTap2MediationTable=cTap2MediationTable, cTap2DebugUserEntry=cTap2DebugUserEntry, ciscoTap2Switchover=ciscoTap2Switchover, cTap2DebugIndex=cTap2DebugIndex, cTap2DebugStatus=cTap2DebugStatus, cTap2StreamInterceptHCDrops=cTap2StreamInterceptHCDrops, cTap2DebugUserStorageType=cTap2DebugUserStorageType, cTap2DebugTable=cTap2DebugTable, cTap2StreamInterceptEnable=cTap2StreamInterceptEnable, cTap2MediationDataType=cTap2MediationDataType, cTap2DebugMessage=cTap2DebugMessage, cTap2DebugUserTimeout=cTap2DebugUserTimeout, cTap2DebugMaxEntries=cTap2DebugMaxEntries, cTap2MediationSrcInterface=cTap2MediationSrcInterface, ciscoTap2MediationComplianceGroup=ciscoTap2MediationComplianceGroup, cTap2StreamTable=cTap2StreamTable, cTap2StreamStatus=cTap2StreamStatus, cTap2StreamGroup=cTap2StreamGroup, cTap2MediationContentId=cTap2MediationContentId, cTap2DebugGroup=cTap2DebugGroup, cTap2MediationNewIndex=cTap2MediationNewIndex, cTap2StreamType=cTap2StreamType, cTap2MediationNotificationEnable=cTap2MediationNotificationEnable, PYSNMP_MODULE_ID=ciscoTap2MIB, cTap2DebugEntry=cTap2DebugEntry, cTap2MediationCapabilities=cTap2MediationCapabilities, ciscoTap2MIBComplianceRev2=ciscoTap2MIBComplianceRev2, cTap2DebugMediationId=cTap2DebugMediationId, ciscoTap2MIBGroups=ciscoTap2MIBGroups, cTap2StreamInterceptDrops=cTap2StreamInterceptDrops, cTap2DebugUserTable=cTap2DebugUserTable, ciscoTap2DebugComplianceGroup=ciscoTap2DebugComplianceGroup, ciscoTap2MIB=ciscoTap2MIB, cTap2StreamEntry=cTap2StreamEntry, cTap2MediationDestAddressType=cTap2MediationDestAddressType, ciscoTap2MIBConform=ciscoTap2MIBConform)
| (octet_string, object_identifier, integer) = mibBuilder.importSymbols('ASN1', 'OctetString', 'ObjectIdentifier', 'Integer')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(single_value_constraint, constraints_intersection, value_range_constraint, value_size_constraint, constraints_union) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'SingleValueConstraint', 'ConstraintsIntersection', 'ValueRangeConstraint', 'ValueSizeConstraint', 'ConstraintsUnion')
(cisco_mgmt,) = mibBuilder.importSymbols('CISCO-SMI', 'ciscoMgmt')
(interface_index_or_zero,) = mibBuilder.importSymbols('IF-MIB', 'InterfaceIndexOrZero')
(inet_address_type, inet_port_number, inet_address) = mibBuilder.importSymbols('INET-ADDRESS-MIB', 'InetAddressType', 'InetPortNumber', 'InetAddress')
(snmp_admin_string,) = mibBuilder.importSymbols('SNMP-FRAMEWORK-MIB', 'SnmpAdminString')
(notification_group, object_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ObjectGroup', 'ModuleCompliance')
(bits, iso, mib_scalar, mib_table, mib_table_row, mib_table_column, gauge32, unsigned32, object_identity, counter32, mib_identifier, ip_address, time_ticks, module_identity, counter64, notification_type, integer32) = mibBuilder.importSymbols('SNMPv2-SMI', 'Bits', 'iso', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Gauge32', 'Unsigned32', 'ObjectIdentity', 'Counter32', 'MibIdentifier', 'IpAddress', 'TimeTicks', 'ModuleIdentity', 'Counter64', 'NotificationType', 'Integer32')
(display_string, truth_value, row_status, textual_convention, storage_type, date_and_time) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TruthValue', 'RowStatus', 'TextualConvention', 'StorageType', 'DateAndTime')
cisco_tap2_mib = module_identity((1, 3, 6, 1, 4, 1, 9, 9, 399))
ciscoTap2MIB.setRevisions(('2008-09-10 00:00', '2007-12-21 00:00', '2006-11-27 00:00', '2004-03-11 00:00', '2004-01-27 00:00'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts:
ciscoTap2MIB.setRevisionsDescriptions(("Added the 'mobility' enum to cTap2StreamType as a specific filter defined by CISCO-MOBILITY-TAP-MIB.", "- Added support for cTap2DebugUserTable. - Added new enumeration rtp to 'cTap2MediationTransport' object. - Added new enumeration rtp to 'cTap2MediationCapabilities' object. - Added ciscoTap2MIBComplianceRev3 compliance which deprecates ciscoTap2MIBComplianceRev2. - Added ciscoTap2DebugComplianceGroupRev1 compliance Group which deprecates ciscoTap2DebugComplianceGroup.", '- Following objects are added in table cTap2StreamTable to support counter64 data cTap2StreamInterceptedHCPackets cTap2StreamInterceptHCDrops - Added ciscoTap2StreamHCStatsGroup OBJECT-GROUP - Added ciscoTap2MIBComplianceRev2 compliance which deprecates ciscoTap2MIBCompliance.', 'Added a new type to cTap2StreamType for intercepting sessions/flows of Mobile subscribers in wireless CDMA technology. Specific intercept filter is defined in CISCO-CDMA-PDSN-TAP-MIB.', 'Initial version of this MIB module.'))
if mibBuilder.loadTexts:
ciscoTap2MIB.setLastUpdated('200809100000Z')
if mibBuilder.loadTexts:
ciscoTap2MIB.setOrganization('Cisco Systems, Inc.')
if mibBuilder.loadTexts:
ciscoTap2MIB.setContactInfo('Cisco Systems Customer Service Postal:170 W. Tasman Drive San Jose, CA 95134 USA Tel:+1 800 553-NETS E-mail:cs-li@cisco.com')
if mibBuilder.loadTexts:
ciscoTap2MIB.setDescription("This module manages Cisco's intercept feature. This MIB replaces CISCO-TAP-MIB. This MIB defines a generic stream table that contains fields common to all intercept types. Specific intercept filters are defined in extension MIBs. They are CISCO-IP-TAP-MIB for IP intercepts, CISCO-802-TAP-MIB for IEEE 802 intercepts and CISCO-USER-CONNECTION-TAP-MIB for RADIUS-based user connection intercepts.")
cisco_tap2_mib_notifs = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 399, 0))
cisco_tap2_mib_objects = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 399, 1))
cisco_tap2_mib_conform = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 399, 2))
c_tap2_mediation_group = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 1))
c_tap2_stream_group = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 2))
c_tap2_debug_group = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 3))
class Ctap2Dscp(TextualConvention, Integer32):
description = 'An integer that is in the range of the DiffServ codepoint values.'
status = 'current'
subtype_spec = Integer32.subtypeSpec + value_range_constraint(0, 63)
c_tap2_mediation_new_index = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cTap2MediationNewIndex.setStatus('current')
if mibBuilder.loadTexts:
cTap2MediationNewIndex.setDescription('This object contains a value which may be used as an index value for a new cTap2MediationEntry. Whenever read, the agent will change the value to a new non-conflicting value. This is to reduce the probability of errors during creation of new cTap2MediationTable entries.')
c_tap2_mediation_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 1, 2))
if mibBuilder.loadTexts:
cTap2MediationTable.setStatus('current')
if mibBuilder.loadTexts:
cTap2MediationTable.setDescription('This table lists the Mediation Devices with which the intercepting device communicates. These may be on the same or different Mediation Devices. This table is written by the Mediation Device, and is always volatile. This is because intercepts may disappear during a restart of the intercepting equipment. Entries are added to this table via cTap2MediationStatus in accordance with the RowStatus convention.')
c_tap2_mediation_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 1, 2, 1)).setIndexNames((0, 'CISCO-TAP2-MIB', 'cTap2MediationContentId'))
if mibBuilder.loadTexts:
cTap2MediationEntry.setStatus('current')
if mibBuilder.loadTexts:
cTap2MediationEntry.setDescription('The entry describes a single session maintained with an application on a Mediation Device.')
c_tap2_mediation_content_id = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 1, 2, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647)))
if mibBuilder.loadTexts:
cTap2MediationContentId.setStatus('current')
if mibBuilder.loadTexts:
cTap2MediationContentId.setDescription("cTap2MediationContentId is a session identifier, from the intercept application's perspective, and a content identifier from the Mediation Device's perspective. The Mediation Device is responsible for making sure these are unique, although the SNMP RowStatus row creation process will help by not allowing it to create conflicting entries. Before creating a new entry, a value for this variable may be obtained by reading cTap2MediationNewIndex to reduce the probability of a value collision.")
c_tap2_mediation_dest_address_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 1, 2, 1, 2), inet_address_type()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cTap2MediationDestAddressType.setStatus('current')
if mibBuilder.loadTexts:
cTap2MediationDestAddressType.setDescription('The type of cTap2MediationDestAddress.')
c_tap2_mediation_dest_address = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 1, 2, 1, 3), inet_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cTap2MediationDestAddress.setStatus('current')
if mibBuilder.loadTexts:
cTap2MediationDestAddress.setDescription("The IP Address of the Mediation Device's network interface to which to direct intercepted traffic.")
c_tap2_mediation_dest_port = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 1, 2, 1, 4), inet_port_number()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cTap2MediationDestPort.setStatus('current')
if mibBuilder.loadTexts:
cTap2MediationDestPort.setDescription("The port number on the Mediation Device's network interface to which to direct intercepted traffic.")
c_tap2_mediation_src_interface = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 1, 2, 1, 5), interface_index_or_zero()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cTap2MediationSrcInterface.setStatus('current')
if mibBuilder.loadTexts:
cTap2MediationSrcInterface.setDescription('The interface on the intercepting device from which to transmit intercepted data. If zero, any interface may be used according to normal IP practice.')
c_tap2_mediation_rtcp_port = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 1, 2, 1, 6), inet_port_number()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cTap2MediationRtcpPort.setStatus('current')
if mibBuilder.loadTexts:
cTap2MediationRtcpPort.setDescription("The port number on the intercepting device to which the Mediation Devices directs RTCP Receiver Reports and Nacks. This object is only relevant when the value of cTap2MediationTransport is 'rtpNack'. This port is assigned by the intercepting device, rather than by the Mediation Device or manager application. The value of this MIB object has no effect before activating the cTap2MediationEntry.")
c_tap2_mediation_dscp = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 1, 2, 1, 7), ctap2_dscp().clone(34)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cTap2MediationDscp.setStatus('current')
if mibBuilder.loadTexts:
cTap2MediationDscp.setDescription('The Differentiated Services Code Point the intercepting device applies to the IP packets encapsulating the intercepted traffic.')
c_tap2_mediation_data_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 1, 2, 1, 8), integer32().subtype(subtypeSpec=value_range_constraint(0, 127))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cTap2MediationDataType.setStatus('current')
if mibBuilder.loadTexts:
cTap2MediationDataType.setDescription("If RTP with Ack/Nack resilience is selected as a transport, the mediation process requires an RTP payload type for data transmissions, and a second RTP payload type for retransmissions. This is the RTP payload type for transmissions. This object is only effective when the value of cTap2MediationTransport is 'rtpNack'.")
c_tap2_mediation_retransmit_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 1, 2, 1, 9), integer32().subtype(subtypeSpec=value_range_constraint(0, 127))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cTap2MediationRetransmitType.setStatus('current')
if mibBuilder.loadTexts:
cTap2MediationRetransmitType.setDescription("If RTP with Ack/Nack resilience is selected as a transport, the mediation process requires an RTP payload type for data transmissions, and a second RTP payload type for retransmissions. This is the RTP payload type for retransmissions. This object is only effective when the value of cTap2MediationTransport is 'rtpNack'.")
c_tap2_mediation_timeout = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 1, 2, 1, 10), date_and_time()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cTap2MediationTimeout.setStatus('current')
if mibBuilder.loadTexts:
cTap2MediationTimeout.setDescription("The time at which this row and all related Stream Table rows should be automatically removed, and the intercept function cease. Since the initiating network manager may be the only device able to manage a specific intercept or know of its existence, this acts as a fail-safe for the failure or removal of the network manager. The object is only effective when the value of cTap2MediationStatus is 'active'.")
c_tap2_mediation_transport = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 1, 2, 1, 11), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('udp', 1), ('rtpNack', 2), ('tcp', 3), ('sctp', 4), ('rtp', 5)))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cTap2MediationTransport.setStatus('current')
if mibBuilder.loadTexts:
cTap2MediationTransport.setDescription('The protocol used in transferring intercepted data to the Mediation Device. The following protocols may be supported: udp: PacketCable udp format rtpNack: RTP with Nack resilience tcp: TCP with head of line blocking sctp: SCTP with head of line blocking rtp: Realtime Transport Protocol(RTP) packet format')
c_tap2_mediation_notification_enable = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 1, 2, 1, 12), truth_value().clone('true')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cTap2MediationNotificationEnable.setStatus('current')
if mibBuilder.loadTexts:
cTap2MediationNotificationEnable.setDescription('This variable controls the generation of any notifications or informs by the MIB agent for this table entry.')
c_tap2_mediation_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 1, 2, 1, 13), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cTap2MediationStatus.setStatus('current')
if mibBuilder.loadTexts:
cTap2MediationStatus.setDescription("The status of this conceptual row. This object is used to manage creation, modification and deletion of rows in this table. cTap2MediationTimeout may be modified at any time (even while the row is active). But when the row is active, the other writable objects may not be modified without setting its value to 'notInService'. The entry may not be deleted or deactivated by setting its value to 'destroy' or 'notInService' if there is any associated entry in cTap2StreamTable.")
c_tap2_mediation_capabilities = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 1, 3), bits().clone(namedValues=named_values(('ipV4SrcInterface', 0), ('ipV6SrcInterface', 1), ('udp', 2), ('rtpNack', 3), ('tcp', 4), ('sctp', 5), ('rtp', 6)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cTap2MediationCapabilities.setStatus('current')
if mibBuilder.loadTexts:
cTap2MediationCapabilities.setDescription('This object displays the device capabilities with respect to certain fields in Mediation Device table. This may be dependent on hardware capabilities, software capabilities. The following values may be supported: ipV4SrcInterface: SNMP ifIndex Value may be used to select the interface (denoted by cTap2MediationSrcInterface) on the intercepting device from which to transmit intercepted data to an IPv4 address Mediation Device. ipV6SrcInterface: SNMP ifIndex Value may be used to select the interface (denoted by cTap2MediationSrcInterface) on the intercepting device from which to transmit intercepted data to an IPv6 address Mediation Device. udp: UDP may be used as transport protocol (denoted by cTap2MediationTransport) in transferring intercepted data to the Mediation Device. rtcpNack: RTP with Nack resilience may be used as transport protocol (denoted by cTap2MediationTransport) in transferring intercepted data to the Mediation Device. tcp: TCP may be used as transport protocol (denoted by cTap2MediationTransport) in transferring intercepted data to the Mediation Device. sctp: SCTP may be used as transport protocol (denoted by cTap2MediationTransport) in transferring intercepted data to the Mediation Device. rtp: RTP may be used as transport protocol (denoted by cTap2MediationTransport) in transferring intercepted data to the Mediation Device.')
c_tap2_stream_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 2, 1))
if mibBuilder.loadTexts:
cTap2StreamTable.setStatus('current')
if mibBuilder.loadTexts:
cTap2StreamTable.setDescription('The Intercept Stream Table lists the traffic streams to be intercepted. The same data stream may be required by multiple taps, and one might assume that often the intercepted stream is a small subset of the traffic that could be intercepted. The Table consists of generic fields that are independent of the type of intercept. It contains type of the specific filter which is defined in an extension MIB and counters to account for packets intercepted or dropped by the attached filter specification. Note that the Mediation Device must make sure there is only one type of specific filter created with the same indices as that of a row in this table, otherwise the later creations will fail. For example, if there is a row in this table with index 1.2, there can be a corresponding row with the same index either in citapStreamTable, c8tapStreamTable or cuctTapStreamTable, but not all. The first index indicates which Mediation Device the intercepted traffic will be diverted to. The second index permits multiple classifiers to be used together. Entries are added to this table via cTap2StreamStatus in accordance with the RowStatus convention.')
c_tap2_stream_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 2, 1, 1)).setIndexNames((0, 'CISCO-TAP2-MIB', 'cTap2MediationContentId'), (0, 'CISCO-TAP2-MIB', 'cTap2StreamIndex'))
if mibBuilder.loadTexts:
cTap2StreamEntry.setStatus('current')
if mibBuilder.loadTexts:
cTap2StreamEntry.setDescription('A stream entry indicates a single data stream to be intercepted to a Mediation Device. Many selected data streams may go to the same application interface, and many application interfaces are supported.')
c_tap2_stream_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 2, 1, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647)))
if mibBuilder.loadTexts:
cTap2StreamIndex.setStatus('current')
if mibBuilder.loadTexts:
cTap2StreamIndex.setDescription('The index of the stream itself.')
c_tap2_stream_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 2, 1, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('ip', 1), ('mac', 2), ('userConnection', 3), ('msPdsn', 4), ('mobility', 5)))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cTap2StreamType.setStatus('current')
if mibBuilder.loadTexts:
cTap2StreamType.setDescription('Identifies the type of intercept filter associated to this generic stream. The following types of streams are supported: ip: The specific filter is an IP filter with same indices as that of this table. The exact filter is a row in citapStreamTable of CISCO-IP-TAP-MIB. mac: The specific filter is a MAC filter with same indices as that of this table. The exact filter is a row in c8tapStreamTable of CISCO-802-TAP-MIB. userConnecton: The specific filter is a user connection filter with same indices as that of this table. The exact filter is a row in cuctTapStreamTable of CISCO-USER-CONNECTION-TAP-MIB. msPdsn: The specific filter is a Mobile Sub connection filter with same indices as that of this table. The exact filter is a row in ccptapStreamTable of CISCO-CDMA-PDSN-TAP-MIB. mobility: The specific filter is a Mobile Subscriber connection filter with same indices as that of this table. The exact filter is a row in cmtapStreamTable of CISCO-MOBILITY-TAP-MIB.')
c_tap2_stream_intercept_enable = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 2, 1, 1, 3), truth_value().clone('false')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cTap2StreamInterceptEnable.setStatus('current')
if mibBuilder.loadTexts:
cTap2StreamInterceptEnable.setDescription("If 'true', the tap should intercept matching traffic. The value for this object should be set to 'true' only after an additional filter specification has been attached to this stream.")
c_tap2_stream_intercepted_packets = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 2, 1, 1, 4), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cTap2StreamInterceptedPackets.setStatus('current')
if mibBuilder.loadTexts:
cTap2StreamInterceptedPackets.setDescription('The number of packets matching this data stream specification that have been intercepted.')
c_tap2_stream_intercept_drops = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 2, 1, 1, 5), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cTap2StreamInterceptDrops.setStatus('current')
if mibBuilder.loadTexts:
cTap2StreamInterceptDrops.setDescription('The number of packets matching this data stream specification that, having been intercepted, were dropped in the lawful intercept process.')
c_tap2_stream_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 2, 1, 1, 6), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cTap2StreamStatus.setStatus('current')
if mibBuilder.loadTexts:
cTap2StreamStatus.setDescription("The status of this conceptual row. This object manages creation, modification, and deletion of rows in this table. cTap2StreamInterceptEnable may be modified any time even the value of this entry rowStatus object is 'active'. When other rows must be changed, cTap2StreamStatus must be first set to 'notInService'.")
c_tap2_stream_intercepted_hc_packets = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 2, 1, 1, 7), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cTap2StreamInterceptedHCPackets.setStatus('current')
if mibBuilder.loadTexts:
cTap2StreamInterceptedHCPackets.setDescription('The number of packets matching this data stream specification that have been intercepted. This object is a 64-bit version of cTap2StreamInterceptedPackets.')
c_tap2_stream_intercept_hc_drops = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 2, 1, 1, 8), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cTap2StreamInterceptHCDrops.setStatus('current')
if mibBuilder.loadTexts:
cTap2StreamInterceptHCDrops.setDescription('The number of packets matching this data stream specification that, having been intercepted, were dropped in the lawful intercept process. This object is a 64-bit version of cTap2StreamInterceptDrops.')
c_tap2_debug_age = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 3, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cTap2DebugAge.setStatus('current')
if mibBuilder.loadTexts:
cTap2DebugAge.setDescription('This object contains the duration in minutes for which an entry in cTap2DebugTable is maintained by the implementing device after which the entry is deleted. The management station also has the option of deleting the entry itself by setting cTap2DebugStatus.')
c_tap2_debug_max_entries = mib_scalar((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 3, 2), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cTap2DebugMaxEntries.setStatus('current')
if mibBuilder.loadTexts:
cTap2DebugMaxEntries.setDescription('This object contains the maximum number of debug messages maintained by the implementing device at a time. If this limit is crossed, most recent message will replace the least recent message.')
c_tap2_debug_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 3, 3))
if mibBuilder.loadTexts:
cTap2DebugTable.setStatus('current')
if mibBuilder.loadTexts:
cTap2DebugTable.setDescription('A table that contains Lawful Intercept debug messages generated by the implementing device. This table is used by ciscoTap2MediationDebug and ciscoTap2StreamDebug notifications. An entry in this table contains a debug message which is regarding either a Mediation Device or a intercept stream created by a Mediation Device. The Mediation device is identified by cTap2DebugMediationId whose value is that of cTap2MediationContentId of cTapMediationEntry. The stream is identified by cTap2DebugMediationId and cTap2DebugStreamId whose values are that of cTap2MediationContentId and cTap2StreamIndex of the corresponding cTap2StreamEntry. Note that cTap2DebugStreamId may be zero for an entry, in which case the debug message is regarding a Medation Device. Entries are added to this table via cTap2DebugStatus in accordance with the RowStatus convention.')
c_tap2_debug_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 3, 3, 1)).setIndexNames((0, 'CISCO-TAP2-MIB', 'cTap2DebugIndex'))
if mibBuilder.loadTexts:
cTap2DebugEntry.setStatus('current')
if mibBuilder.loadTexts:
cTap2DebugEntry.setDescription('A list of the debug messages.')
c_tap2_debug_index = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 3, 3, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 2147483647)))
if mibBuilder.loadTexts:
cTap2DebugIndex.setStatus('current')
if mibBuilder.loadTexts:
cTap2DebugIndex.setDescription('Index to the debug table.')
c_tap2_debug_mediation_id = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 3, 3, 1, 2), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cTap2DebugMediationId.setStatus('current')
if mibBuilder.loadTexts:
cTap2DebugMediationId.setDescription('The value of this object is that of cTap2MediationContentId identifying an entry in cTap2MediationTable. Note this object may contain a value for which an entry in cTap2MediationTable does not exist. This happens when creation of an entry in cTap2MediationTable fails and this debug message conveys more detailed information regarding the failure.')
c_tap2_debug_stream_id = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 3, 3, 1, 3), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cTap2DebugStreamId.setStatus('current')
if mibBuilder.loadTexts:
cTap2DebugStreamId.setDescription('The value of this object is that of cTap2StreamIndex of an entry in cTap2StreamTable. This object along with cTap2DebugMediationId identifies an entry in cTap2StreamTable. The value of this object may be zero, in which this debug message is regarding a Mediation Device, but not a particular stream. Note this object may contain a value for which an entry in cTap2MediationTable does not exist. This happens when creation of an entry in cTap2StreamTable fails.')
c_tap2_debug_message = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 3, 3, 1, 4), snmp_admin_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
cTap2DebugMessage.setStatus('current')
if mibBuilder.loadTexts:
cTap2DebugMessage.setDescription('A text string contains the debug message.')
c_tap2_debug_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 3, 3, 1, 5), row_status()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
cTap2DebugStatus.setStatus('current')
if mibBuilder.loadTexts:
cTap2DebugStatus.setDescription("The status of this conceptual row. A row in this table is created by the implementing device. A management station cannot modify any of the objects in this row, except deleting the row by setting this object to 'destroy'.")
c_tap2_debug_user_table = mib_table((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 3, 4))
if mibBuilder.loadTexts:
cTap2DebugUserTable.setStatus('current')
if mibBuilder.loadTexts:
cTap2DebugUserTable.setDescription("The User Table lists information of all the users configured in the system who are given permission by different Mediation Devices to access Lawful Intercept CLIs. This table will have dependancy on cTap2MediationTable. When entry in cTap2MediationTable is deleted or moved to 'notInService', entries corresponding cTap2MediationContentId in this table will be deleted.")
c_tap2_debug_user_entry = mib_table_row((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 3, 4, 1)).setIndexNames((0, 'CISCO-TAP2-MIB', 'cTap2MediationContentId'), (0, 'CISCO-TAP2-MIB', 'cTap2DebugUserName'))
if mibBuilder.loadTexts:
cTap2DebugUserEntry.setStatus('current')
if mibBuilder.loadTexts:
cTap2DebugUserEntry.setDescription('A conceptual row in the cTap2DebugUserTable. Each row represents name of user on the router to whom Mediation Device with CCCid represented by cTap2MediationContentId has given access to Lawful Intercept commands and cTap2DebugUserTimeout represents the time when the entry will expire.')
c_tap2_debug_user_name = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 3, 4, 1, 1), snmp_admin_string().subtype(subtypeSpec=value_size_constraint(1, 255)))
if mibBuilder.loadTexts:
cTap2DebugUserName.setStatus('current')
if mibBuilder.loadTexts:
cTap2DebugUserName.setDescription('A human readable string representing the name of debug user who will have access to Lawful Intercept commands.')
c_tap2_debug_user_timeout = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 3, 4, 1, 2), date_and_time()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cTap2DebugUserTimeout.setStatus('current')
if mibBuilder.loadTexts:
cTap2DebugUserTimeout.setDescription("This object specifies the time at which the row will be removed from the table by the system. The value of this object is only effective when the value of corresponding instance of cTap2DebugUserStatus is 'active'.")
c_tap2_debug_user_storage_type = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 3, 4, 1, 3), storage_type().clone('volatile')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cTap2DebugUserStorageType.setStatus('current')
if mibBuilder.loadTexts:
cTap2DebugUserStorageType.setDescription("This object specifies the storage type of this conceptual row. If it is set to 'nonVolatile', this entry can be saved into non-volatile memory.")
c_tap2_debug_user_status = mib_table_column((1, 3, 6, 1, 4, 1, 9, 9, 399, 1, 3, 4, 1, 4), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
cTap2DebugUserStatus.setStatus('current')
if mibBuilder.loadTexts:
cTap2DebugUserStatus.setDescription("The status of this conceptual row. This object manages creation, modification, and deletion of rows in this table. cTap2DebugUserTimeout may be modified any time even when the value of this entry rowStatus object is 'active'.")
cisco_tap2_mib_active = notification_type((1, 3, 6, 1, 4, 1, 9, 9, 399, 0, 1))
if mibBuilder.loadTexts:
ciscoTap2MIBActive.setStatus('current')
if mibBuilder.loadTexts:
ciscoTap2MIBActive.setDescription('This Notification is sent when an intercepting router or switch is first capable of intercepting a packet corresponding to a configured data stream. The value of the corresponding cTap2StreamType which identifies the actual intercept stream type is included in this notification. This notification may be generated in conjunction with the intercept application, which is designed to expect the notification to be sent as reliably as possible, e.g., through the use of a finite number of retransmissions until acknowledged, as and when such mechanisms are available; for example, with SNMPv3, this would be an InformRequest. Filter installation can take a long period of time, during which call progress may be delayed.')
cisco_tap2_mediation_timed_out = notification_type((1, 3, 6, 1, 4, 1, 9, 9, 399, 0, 2)).setObjects(('CISCO-TAP2-MIB', 'cTap2MediationStatus'))
if mibBuilder.loadTexts:
ciscoTap2MediationTimedOut.setStatus('current')
if mibBuilder.loadTexts:
ciscoTap2MediationTimedOut.setDescription('When an intercept is autonomously removed by an intercepting device, such as due to the time specified in cTap2MediationTimeout arriving, the device notifies the manager of the action.')
cisco_tap2_mediation_debug = notification_type((1, 3, 6, 1, 4, 1, 9, 9, 399, 0, 3)).setObjects(('CISCO-TAP2-MIB', 'cTap2DebugMediationId'), ('CISCO-TAP2-MIB', 'cTap2DebugMessage'))
if mibBuilder.loadTexts:
ciscoTap2MediationDebug.setStatus('current')
if mibBuilder.loadTexts:
ciscoTap2MediationDebug.setDescription('When there is intervention needed due to some events related to entries configured in cTap2MediationTable, the device notifies the manager of the event. This notification may be generated in conjunction with the intercept application, which is designed to expect the notification to be sent as reliably as possible, e.g., through the use of a finite number of retransmissions until acknowledged, as and when such mechanisms are available; for example, with SNMPv3, this would be an InformRequest.')
cisco_tap2_stream_debug = notification_type((1, 3, 6, 1, 4, 1, 9, 9, 399, 0, 4)).setObjects(('CISCO-TAP2-MIB', 'cTap2DebugMediationId'), ('CISCO-TAP2-MIB', 'cTap2DebugStreamId'), ('CISCO-TAP2-MIB', 'cTap2DebugMessage'))
if mibBuilder.loadTexts:
ciscoTap2StreamDebug.setStatus('current')
if mibBuilder.loadTexts:
ciscoTap2StreamDebug.setDescription('When there is intervention needed due to some events related to entries configured in cTap2StreamTable, the device notifies the manager of the event. This notification may be generated in conjunction with the intercept application, which is designed to expect the notification to be sent as reliably as possible, e.g., through the use of a finite number of retransmissions until acknowledged, as and when such mechanisms are available; for example, with SNMPv3, this would be an InformRequest.')
cisco_tap2_switchover = notification_type((1, 3, 6, 1, 4, 1, 9, 9, 399, 0, 5))
if mibBuilder.loadTexts:
ciscoTap2Switchover.setStatus('current')
if mibBuilder.loadTexts:
ciscoTap2Switchover.setDescription('This notification is sent when there is a redundant (standby) route processor available on the intercepting device and the current active processor is going down causing standby to takeover. Note that this notification may be sent by the intercepting device only when it had a chance to know before it goes down. Mediation device when received this notification should assume that configured intercepts on the intercepting device no longer exist, when the standby processor takes control. This means that the Mediation device should again configure the intercepts.')
cisco_tap2_mib_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 399, 2, 1))
cisco_tap2_mib_groups = mib_identifier((1, 3, 6, 1, 4, 1, 9, 9, 399, 2, 2))
cisco_tap2_mib_compliance = module_compliance((1, 3, 6, 1, 4, 1, 9, 9, 399, 2, 1, 1)).setObjects(('CISCO-TAP2-MIB', 'ciscoTap2MediationComplianceGroup'), ('CISCO-TAP2-MIB', 'ciscoTap2StreamComplianceGroup'), ('CISCO-TAP2-MIB', 'ciscoTap2MediationCpbComplianceGroup'), ('CISCO-TAP2-MIB', 'ciscoTap2NotificationGroup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cisco_tap2_mib_compliance = ciscoTap2MIBCompliance.setStatus('deprecated')
if mibBuilder.loadTexts:
ciscoTap2MIBCompliance.setDescription('The compliance statement for entities which implement the Cisco Intercept MIB')
cisco_tap2_mib_compliance_rev2 = module_compliance((1, 3, 6, 1, 4, 1, 9, 9, 399, 2, 1, 2)).setObjects(('CISCO-TAP2-MIB', 'ciscoTap2MediationComplianceGroup'), ('CISCO-TAP2-MIB', 'ciscoTap2StreamComplianceGroup'), ('CISCO-TAP2-MIB', 'ciscoTap2MediationCpbComplianceGroup'), ('CISCO-TAP2-MIB', 'ciscoTap2NotificationGroup'), ('CISCO-TAP2-MIB', 'ciscoTap2StreamHCStatsGroup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cisco_tap2_mib_compliance_rev2 = ciscoTap2MIBComplianceRev2.setStatus('deprecated')
if mibBuilder.loadTexts:
ciscoTap2MIBComplianceRev2.setDescription('The compliance statement for entities which implement the Cisco Intercept MIB. This compliance deprecates ciscoTap2MIBCompliance.')
cisco_tap2_mib_compliance_rev3 = module_compliance((1, 3, 6, 1, 4, 1, 9, 9, 399, 2, 1, 3)).setObjects(('CISCO-TAP2-MIB', 'ciscoTap2MediationComplianceGroup'), ('CISCO-TAP2-MIB', 'ciscoTap2StreamComplianceGroup'), ('CISCO-TAP2-MIB', 'ciscoTap2MediationCpbComplianceGroup'), ('CISCO-TAP2-MIB', 'ciscoTap2NotificationGroup'), ('CISCO-TAP2-MIB', 'ciscoTap2StreamHCStatsGroup'), ('CISCO-TAP2-MIB', 'ciscoTap2DebugComplianceGroupRev1'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cisco_tap2_mib_compliance_rev3 = ciscoTap2MIBComplianceRev3.setStatus('current')
if mibBuilder.loadTexts:
ciscoTap2MIBComplianceRev3.setDescription('The compliance statement for entities which implement the Cisco Intercept MIB. This compliance deprecates ciscoTap2MIBComplianceRev2.')
cisco_tap2_mediation_compliance_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 399, 2, 2, 1)).setObjects(('CISCO-TAP2-MIB', 'cTap2MediationNewIndex'), ('CISCO-TAP2-MIB', 'cTap2MediationDestAddressType'), ('CISCO-TAP2-MIB', 'cTap2MediationDestAddress'), ('CISCO-TAP2-MIB', 'cTap2MediationDestPort'), ('CISCO-TAP2-MIB', 'cTap2MediationSrcInterface'), ('CISCO-TAP2-MIB', 'cTap2MediationRtcpPort'), ('CISCO-TAP2-MIB', 'cTap2MediationDscp'), ('CISCO-TAP2-MIB', 'cTap2MediationDataType'), ('CISCO-TAP2-MIB', 'cTap2MediationRetransmitType'), ('CISCO-TAP2-MIB', 'cTap2MediationTimeout'), ('CISCO-TAP2-MIB', 'cTap2MediationTransport'), ('CISCO-TAP2-MIB', 'cTap2MediationNotificationEnable'), ('CISCO-TAP2-MIB', 'cTap2MediationStatus'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cisco_tap2_mediation_compliance_group = ciscoTap2MediationComplianceGroup.setStatus('current')
if mibBuilder.loadTexts:
ciscoTap2MediationComplianceGroup.setDescription('These objects are necessary for description of the data streams directed to a Mediation Device.')
cisco_tap2_stream_compliance_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 399, 2, 2, 2)).setObjects(('CISCO-TAP2-MIB', 'cTap2StreamType'), ('CISCO-TAP2-MIB', 'cTap2StreamInterceptEnable'), ('CISCO-TAP2-MIB', 'cTap2StreamInterceptedPackets'), ('CISCO-TAP2-MIB', 'cTap2StreamInterceptDrops'), ('CISCO-TAP2-MIB', 'cTap2StreamStatus'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cisco_tap2_stream_compliance_group = ciscoTap2StreamComplianceGroup.setStatus('current')
if mibBuilder.loadTexts:
ciscoTap2StreamComplianceGroup.setDescription('These objects are necessary for a description of the packets to select for interception.')
cisco_tap2_notification_group = notification_group((1, 3, 6, 1, 4, 1, 9, 9, 399, 2, 2, 3)).setObjects(('CISCO-TAP2-MIB', 'ciscoTap2MIBActive'), ('CISCO-TAP2-MIB', 'ciscoTap2MediationTimedOut'), ('CISCO-TAP2-MIB', 'ciscoTap2MediationDebug'), ('CISCO-TAP2-MIB', 'ciscoTap2StreamDebug'), ('CISCO-TAP2-MIB', 'ciscoTap2Switchover'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cisco_tap2_notification_group = ciscoTap2NotificationGroup.setStatus('current')
if mibBuilder.loadTexts:
ciscoTap2NotificationGroup.setDescription('These notifications are used to present status from the intercepting device to the Mediation Device.')
cisco_tap2_mediation_cpb_compliance_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 399, 2, 2, 4)).setObjects(('CISCO-TAP2-MIB', 'cTap2MediationCapabilities'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cisco_tap2_mediation_cpb_compliance_group = ciscoTap2MediationCpbComplianceGroup.setStatus('current')
if mibBuilder.loadTexts:
ciscoTap2MediationCpbComplianceGroup.setDescription('These objects are necessary for a description of the mediation device to select for Lawful Intercept.')
cisco_tap2_debug_compliance_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 399, 2, 2, 5)).setObjects(('CISCO-TAP2-MIB', 'cTap2DebugAge'), ('CISCO-TAP2-MIB', 'cTap2DebugMaxEntries'), ('CISCO-TAP2-MIB', 'cTap2DebugMediationId'), ('CISCO-TAP2-MIB', 'cTap2DebugStreamId'), ('CISCO-TAP2-MIB', 'cTap2DebugMessage'), ('CISCO-TAP2-MIB', 'cTap2DebugStatus'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cisco_tap2_debug_compliance_group = ciscoTap2DebugComplianceGroup.setStatus('deprecated')
if mibBuilder.loadTexts:
ciscoTap2DebugComplianceGroup.setDescription('These objects are necessary for debug information.')
cisco_tap2_stream_hc_stats_group = object_group((1, 3, 6, 1, 4, 1, 9, 9, 399, 2, 2, 6)).setObjects(('CISCO-TAP2-MIB', 'cTap2StreamInterceptedHCPackets'), ('CISCO-TAP2-MIB', 'cTap2StreamInterceptHCDrops'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cisco_tap2_stream_hc_stats_group = ciscoTap2StreamHCStatsGroup.setStatus('current')
if mibBuilder.loadTexts:
ciscoTap2StreamHCStatsGroup.setDescription('These objects are required for 64 bit version of cTap2StreamInterceptedPackets and cTap2StreamInterceptDrops')
cisco_tap2_debug_compliance_group_rev1 = object_group((1, 3, 6, 1, 4, 1, 9, 9, 399, 2, 2, 7)).setObjects(('CISCO-TAP2-MIB', 'cTap2DebugAge'), ('CISCO-TAP2-MIB', 'cTap2DebugMaxEntries'), ('CISCO-TAP2-MIB', 'cTap2DebugMediationId'), ('CISCO-TAP2-MIB', 'cTap2DebugStreamId'), ('CISCO-TAP2-MIB', 'cTap2DebugMessage'), ('CISCO-TAP2-MIB', 'cTap2DebugStatus'), ('CISCO-TAP2-MIB', 'cTap2DebugUserTimeout'), ('CISCO-TAP2-MIB', 'cTap2DebugUserStorageType'), ('CISCO-TAP2-MIB', 'cTap2DebugUserStatus'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
cisco_tap2_debug_compliance_group_rev1 = ciscoTap2DebugComplianceGroupRev1.setStatus('current')
if mibBuilder.loadTexts:
ciscoTap2DebugComplianceGroupRev1.setDescription('These objects are necessary for debug information. This compliance group deprecates ciscoTap2DebugComplianceGroup.')
mibBuilder.exportSymbols('CISCO-TAP2-MIB', cTap2DebugStreamId=cTap2DebugStreamId, ciscoTap2DebugComplianceGroupRev1=ciscoTap2DebugComplianceGroupRev1, cTap2StreamInterceptedPackets=cTap2StreamInterceptedPackets, ciscoTap2MIBNotifs=ciscoTap2MIBNotifs, ciscoTap2StreamDebug=ciscoTap2StreamDebug, ciscoTap2MIBCompliance=ciscoTap2MIBCompliance, cTap2MediationRtcpPort=cTap2MediationRtcpPort, cTap2MediationDestPort=cTap2MediationDestPort, cTap2MediationTransport=cTap2MediationTransport, ciscoTap2NotificationGroup=ciscoTap2NotificationGroup, cTap2MediationDscp=cTap2MediationDscp, cTap2MediationStatus=cTap2MediationStatus, ciscoTap2MediationCpbComplianceGroup=ciscoTap2MediationCpbComplianceGroup, ciscoTap2MIBObjects=ciscoTap2MIBObjects, Ctap2Dscp=Ctap2Dscp, cTap2MediationRetransmitType=cTap2MediationRetransmitType, cTap2MediationTimeout=cTap2MediationTimeout, cTap2StreamIndex=cTap2StreamIndex, cTap2MediationDestAddress=cTap2MediationDestAddress, cTap2DebugAge=cTap2DebugAge, ciscoTap2MediationDebug=ciscoTap2MediationDebug, ciscoTap2MIBCompliances=ciscoTap2MIBCompliances, cTap2DebugUserStatus=cTap2DebugUserStatus, ciscoTap2MIBActive=ciscoTap2MIBActive, cTap2DebugUserName=cTap2DebugUserName, cTap2StreamInterceptedHCPackets=cTap2StreamInterceptedHCPackets, ciscoTap2StreamHCStatsGroup=ciscoTap2StreamHCStatsGroup, cTap2MediationGroup=cTap2MediationGroup, cTap2MediationEntry=cTap2MediationEntry, ciscoTap2MIBComplianceRev3=ciscoTap2MIBComplianceRev3, ciscoTap2StreamComplianceGroup=ciscoTap2StreamComplianceGroup, ciscoTap2MediationTimedOut=ciscoTap2MediationTimedOut, cTap2MediationTable=cTap2MediationTable, cTap2DebugUserEntry=cTap2DebugUserEntry, ciscoTap2Switchover=ciscoTap2Switchover, cTap2DebugIndex=cTap2DebugIndex, cTap2DebugStatus=cTap2DebugStatus, cTap2StreamInterceptHCDrops=cTap2StreamInterceptHCDrops, cTap2DebugUserStorageType=cTap2DebugUserStorageType, cTap2DebugTable=cTap2DebugTable, cTap2StreamInterceptEnable=cTap2StreamInterceptEnable, cTap2MediationDataType=cTap2MediationDataType, cTap2DebugMessage=cTap2DebugMessage, cTap2DebugUserTimeout=cTap2DebugUserTimeout, cTap2DebugMaxEntries=cTap2DebugMaxEntries, cTap2MediationSrcInterface=cTap2MediationSrcInterface, ciscoTap2MediationComplianceGroup=ciscoTap2MediationComplianceGroup, cTap2StreamTable=cTap2StreamTable, cTap2StreamStatus=cTap2StreamStatus, cTap2StreamGroup=cTap2StreamGroup, cTap2MediationContentId=cTap2MediationContentId, cTap2DebugGroup=cTap2DebugGroup, cTap2MediationNewIndex=cTap2MediationNewIndex, cTap2StreamType=cTap2StreamType, cTap2MediationNotificationEnable=cTap2MediationNotificationEnable, PYSNMP_MODULE_ID=ciscoTap2MIB, cTap2DebugEntry=cTap2DebugEntry, cTap2MediationCapabilities=cTap2MediationCapabilities, ciscoTap2MIBComplianceRev2=ciscoTap2MIBComplianceRev2, cTap2DebugMediationId=cTap2DebugMediationId, ciscoTap2MIBGroups=ciscoTap2MIBGroups, cTap2StreamInterceptDrops=cTap2StreamInterceptDrops, cTap2DebugUserTable=cTap2DebugUserTable, ciscoTap2DebugComplianceGroup=ciscoTap2DebugComplianceGroup, ciscoTap2MIB=ciscoTap2MIB, cTap2StreamEntry=cTap2StreamEntry, cTap2MediationDestAddressType=cTap2MediationDestAddressType, ciscoTap2MIBConform=ciscoTap2MIBConform) |
fibo = [1, 1]
indices = range(2,10,1)
print("indices elements manquants", list(indices))
for indice in indices:
element = fibo[indice - 1] + fibo[indice - 2]
fibo.append(element)
print("suite fibonacci : " , fibo)
#affichage
indice = 0
for elem in fibo:
print("U" + str(indice), "=", elem)
indice += 1 | fibo = [1, 1]
indices = range(2, 10, 1)
print('indices elements manquants', list(indices))
for indice in indices:
element = fibo[indice - 1] + fibo[indice - 2]
fibo.append(element)
print('suite fibonacci : ', fibo)
indice = 0
for elem in fibo:
print('U' + str(indice), '=', elem)
indice += 1 |
# @desc Evaluate the overengineered XOR gate. By Benji '24
def XOR(bool1, bool2):
value1 = bool1 or bool2
value2 = not (bool1 and bool2)
return value1 and value2
def main():
print(XOR(False, False))
print(XOR(False, True))
print(XOR(True, False))
print(XOR(True, True))
if __name__ == '__main__':
main()
| def xor(bool1, bool2):
value1 = bool1 or bool2
value2 = not (bool1 and bool2)
return value1 and value2
def main():
print(xor(False, False))
print(xor(False, True))
print(xor(True, False))
print(xor(True, True))
if __name__ == '__main__':
main() |
# list in python
item1 = "python"
item2 = "go"
item3 = "kotlin"
item4 = "java"
myList = [item1, item2, item3, item4]
print(myList[2])
print(len(myList))
print(len(myList) -1)
isKotlinInList = "kotlin" in myList
print(isKotlinInList)
print("---------------")
myRange = range(30)
print(list(myRange)) | item1 = 'python'
item2 = 'go'
item3 = 'kotlin'
item4 = 'java'
my_list = [item1, item2, item3, item4]
print(myList[2])
print(len(myList))
print(len(myList) - 1)
is_kotlin_in_list = 'kotlin' in myList
print(isKotlinInList)
print('---------------')
my_range = range(30)
print(list(myRange)) |
pkgname = "rhash"
pkgver = "1.4.2"
pkgrel = 0
build_style = "configure"
configure_args = [
"--prefix=/usr", "--sysconfdir=/etc",
"--enable-openssl", "--disable-openssl-runtime",
"--enable-lib-static", "--enable-lib-shared",
]
make_build_target = "all"
make_build_args = ["lib-shared"]
make_install_target = "install"
make_install_args = ["install-lib-shared"]
makedepends = ["openssl-devel"]
pkgdesc = "Utility for computing hash sums and creating magnet links"
maintainer = "q66 <q66@chimera-linux.org>"
license = "0BSD"
url = "https://github.com/rhash/RHash"
source = f"{url}/archive/v{pkgver}.tar.gz"
sha256 = "600d00f5f91ef04194d50903d3c79412099328c42f28ff43a0bdb777b00bec62"
def init_configure(self):
self.configure_args += [
"--cc=" + self.get_tool("CC"),
"--ar=" + self.get_tool("AR")
]
def post_install(self):
self.make.invoke(None, [
"-C", "librhash", "install-lib-headers", "PREFIX=/usr",
"DESTDIR=" + str(self.chroot_destdir)
])
self.install_link("librhash.so.0", "usr/lib/librhash.so")
self.install_license("COPYING")
@subpackage("rhash-devel")
def _devel(self):
return self.default_devel()
| pkgname = 'rhash'
pkgver = '1.4.2'
pkgrel = 0
build_style = 'configure'
configure_args = ['--prefix=/usr', '--sysconfdir=/etc', '--enable-openssl', '--disable-openssl-runtime', '--enable-lib-static', '--enable-lib-shared']
make_build_target = 'all'
make_build_args = ['lib-shared']
make_install_target = 'install'
make_install_args = ['install-lib-shared']
makedepends = ['openssl-devel']
pkgdesc = 'Utility for computing hash sums and creating magnet links'
maintainer = 'q66 <q66@chimera-linux.org>'
license = '0BSD'
url = 'https://github.com/rhash/RHash'
source = f'{url}/archive/v{pkgver}.tar.gz'
sha256 = '600d00f5f91ef04194d50903d3c79412099328c42f28ff43a0bdb777b00bec62'
def init_configure(self):
self.configure_args += ['--cc=' + self.get_tool('CC'), '--ar=' + self.get_tool('AR')]
def post_install(self):
self.make.invoke(None, ['-C', 'librhash', 'install-lib-headers', 'PREFIX=/usr', 'DESTDIR=' + str(self.chroot_destdir)])
self.install_link('librhash.so.0', 'usr/lib/librhash.so')
self.install_license('COPYING')
@subpackage('rhash-devel')
def _devel(self):
return self.default_devel() |
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
collect_ignore = ['setup.py']
| collect_ignore = ['setup.py'] |
## Configuration data
config = {
"cvs_sites": [ 'ABINGTON',
'ACTON',
'AGAWAM',
'ALLSTON',
'AMHERST',
'ARLINGTON',
'ASHLAND',
'ATHOL',
'ATTLEBORO',
'BEDFORD',
'BELCHERTOWN',
'BELLINGHAM',
'BELMONT',
'BEVERLY',
'BILLERICA',
'BOSTON',
'BOURNE',
'BRAINTREE',
'BRIGHTON',
'BROCKTON',
'BROOKLINE',
'BURLINGTON',
'CAMBRIDGE',
'CANTON',
'CARVER',
'CHATHAM',
'CHELSEA',
'CHESTNUT HILL',
'CHICOPEE',
'COHASSET',
'CONCORD',
'DANVERS',
'DEDHAM',
'DORCHESTER',
'DRACUT',
'EAST BOSTON',
'EAST BRIDGEWATER',
'EAST FALMOUTH',
'EVERETT',
'FALL RIVER',
'FALMOUTH',
'FITCHBURG',
'FOXBOROUGH',
'FRAMINGHAM',
'GEORGETOWN',
'GLOUCESTER',
'GRANBY',
'GREAT BARRINGTON',
'GREENFIELD',
'HADLEY',
'HANOVER',
'HANSON',
'HARWICH',
'HARWICHPORT',
'HAVERHILL',
'HINGHAM',
'HOLBROOK',
'HOLLISTON',
'HOLYOKE',
'HOPKINTON',
'HUDSON',
'HYANNIS',
'HYDE PARK',
'IPSWICH',
'KINGSTON',
'LANESBOROUGH',
'LAWRENCE',
'LEOMINSTER',
'LEXINGTON',
'LONGMEADOW',
'LOWELL',
'LUNENBURG',
'LYNN',
'MALDEN',
'MARBLEHEAD',
'MARLBOROUGH',
'MASHPEE',
'MATTAPAN',
'MAYNARD',
'MEDFIELD',
'MEDFORD',
'METHUEN',
'MIDDLEBOROUGH',
'MIDDLETON',
'MILFORD',
'MILLBURY',
'MILLIS',
'NATICK',
'NEEDHAM',
'NEW BEDFORD',
'NEWBURYPORT',
'NEWTON',
'NORTH ANDOVER',
'NORTH ATTLEBOROUGH',
'NORTH BILLERICA',
'NORTH DARTMOUTH',
'NORTH EASTON',
'NORTH GRAFTON',
'NORTHAMPTON',
'NORWELL',
'ORLEANS',
'OXFORD',
'PALMER',
'PEABODY',
'PLAINVILLE',
'PLYMOUTH',
'PROVINCETOWN',
'QUINCY',
'RANDOLPH',
'READING',
'REVERE',
'ROSLINDALE',
'ROWLEY',
'SALEM',
'SALISBURY',
'SANDWICH',
'SAUGUS',
'SEEKONK',
'SHARON',
'SOMERVILLE',
'SOUTH EASTON',
'SOUTH HAMILTON',
'SOUTH WEYMOUTH',
'SOUTH YARMOUTH',
'SOUTHBRIDGE',
'SOUTHWICK',
'SPRINGFIELD',
'STONEHAM',
'STOUGHTON',
'STURBRIDGE',
'SWANSEA',
'TAUNTON',
'WALTHAM',
'WAREHAM',
'WATERTOWN',
'WAYLAND',
'WEBSTER',
'WELLESLEY',
'WEST BRIDGEWATER',
'WEST NEWTON',
'WEST SPRINGFIELD',
'WESTBOROUGH',
'WESTFIELD',
'WESTFORD',
'WESTPORT',
'WESTWOOD',
'WEYMOUTH',
'WILBRAHAM',
'WILMINGTON',
'WINCHENDON',
'WINCHESTER',
'WINTHROP',
'WOBURN',
'WOLLASTON',
'WORCESTER',
'WRENTHAM'
]
}
| config = {'cvs_sites': ['ABINGTON', 'ACTON', 'AGAWAM', 'ALLSTON', 'AMHERST', 'ARLINGTON', 'ASHLAND', 'ATHOL', 'ATTLEBORO', 'BEDFORD', 'BELCHERTOWN', 'BELLINGHAM', 'BELMONT', 'BEVERLY', 'BILLERICA', 'BOSTON', 'BOURNE', 'BRAINTREE', 'BRIGHTON', 'BROCKTON', 'BROOKLINE', 'BURLINGTON', 'CAMBRIDGE', 'CANTON', 'CARVER', 'CHATHAM', 'CHELSEA', 'CHESTNUT HILL', 'CHICOPEE', 'COHASSET', 'CONCORD', 'DANVERS', 'DEDHAM', 'DORCHESTER', 'DRACUT', 'EAST BOSTON', 'EAST BRIDGEWATER', 'EAST FALMOUTH', 'EVERETT', 'FALL RIVER', 'FALMOUTH', 'FITCHBURG', 'FOXBOROUGH', 'FRAMINGHAM', 'GEORGETOWN', 'GLOUCESTER', 'GRANBY', 'GREAT BARRINGTON', 'GREENFIELD', 'HADLEY', 'HANOVER', 'HANSON', 'HARWICH', 'HARWICHPORT', 'HAVERHILL', 'HINGHAM', 'HOLBROOK', 'HOLLISTON', 'HOLYOKE', 'HOPKINTON', 'HUDSON', 'HYANNIS', 'HYDE PARK', 'IPSWICH', 'KINGSTON', 'LANESBOROUGH', 'LAWRENCE', 'LEOMINSTER', 'LEXINGTON', 'LONGMEADOW', 'LOWELL', 'LUNENBURG', 'LYNN', 'MALDEN', 'MARBLEHEAD', 'MARLBOROUGH', 'MASHPEE', 'MATTAPAN', 'MAYNARD', 'MEDFIELD', 'MEDFORD', 'METHUEN', 'MIDDLEBOROUGH', 'MIDDLETON', 'MILFORD', 'MILLBURY', 'MILLIS', 'NATICK', 'NEEDHAM', 'NEW BEDFORD', 'NEWBURYPORT', 'NEWTON', 'NORTH ANDOVER', 'NORTH ATTLEBOROUGH', 'NORTH BILLERICA', 'NORTH DARTMOUTH', 'NORTH EASTON', 'NORTH GRAFTON', 'NORTHAMPTON', 'NORWELL', 'ORLEANS', 'OXFORD', 'PALMER', 'PEABODY', 'PLAINVILLE', 'PLYMOUTH', 'PROVINCETOWN', 'QUINCY', 'RANDOLPH', 'READING', 'REVERE', 'ROSLINDALE', 'ROWLEY', 'SALEM', 'SALISBURY', 'SANDWICH', 'SAUGUS', 'SEEKONK', 'SHARON', 'SOMERVILLE', 'SOUTH EASTON', 'SOUTH HAMILTON', 'SOUTH WEYMOUTH', 'SOUTH YARMOUTH', 'SOUTHBRIDGE', 'SOUTHWICK', 'SPRINGFIELD', 'STONEHAM', 'STOUGHTON', 'STURBRIDGE', 'SWANSEA', 'TAUNTON', 'WALTHAM', 'WAREHAM', 'WATERTOWN', 'WAYLAND', 'WEBSTER', 'WELLESLEY', 'WEST BRIDGEWATER', 'WEST NEWTON', 'WEST SPRINGFIELD', 'WESTBOROUGH', 'WESTFIELD', 'WESTFORD', 'WESTPORT', 'WESTWOOD', 'WEYMOUTH', 'WILBRAHAM', 'WILMINGTON', 'WINCHENDON', 'WINCHESTER', 'WINTHROP', 'WOBURN', 'WOLLASTON', 'WORCESTER', 'WRENTHAM']} |
#
# PySNMP MIB module INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB
# Produced by pysmi-0.3.4 at Wed May 1 13:54:53 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
Integer, OctetString, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "Integer", "OctetString", "ObjectIdentifier")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueSizeConstraint, ValueRangeConstraint, ConstraintsUnion, SingleValueConstraint, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "ValueRangeConstraint", "ConstraintsUnion", "SingleValueConstraint", "ConstraintsIntersection")
chassis, = mibBuilder.importSymbols("INTELCORPORATION-MULTI-FLEX-SERVER-MIB", "chassis")
groups, regModule = mibBuilder.importSymbols("INTELCORPORATION-MULTI-FLEX-SERVER-REG", "groups", "regModule")
Index, Power, Presence, FaultLedStates, INT32withException, PresenceLedStates, PowerLedStates, IdromBinary16 = mibBuilder.importSymbols("INTELCORPORATION-MULTI-FLEX-SERVER-TC", "Index", "Power", "Presence", "FaultLedStates", "INT32withException", "PresenceLedStates", "PowerLedStates", "IdromBinary16")
NotificationGroup, ObjectGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ObjectGroup", "ModuleCompliance")
Counter32, Integer32, MibIdentifier, Counter64, MibScalar, MibTable, MibTableRow, MibTableColumn, iso, ObjectIdentity, Gauge32, Unsigned32, NotificationType, IpAddress, TimeTicks, ModuleIdentity, Bits = mibBuilder.importSymbols("SNMPv2-SMI", "Counter32", "Integer32", "MibIdentifier", "Counter64", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "iso", "ObjectIdentity", "Gauge32", "Unsigned32", "NotificationType", "IpAddress", "TimeTicks", "ModuleIdentity", "Bits")
MacAddress, TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "MacAddress", "TextualConvention", "DisplayString")
multiFlexServerBladesMibModule = ModuleIdentity((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 1, 1, 12))
multiFlexServerBladesMibModule.setRevisions(('2008-05-19 20:28', '2008-05-07 02:40', '2007-09-19 15:40', '2007-08-31 09:30', '2007-08-29 19:30', '2007-08-29 14:30', '2007-08-27 16:00', '2007-08-22 15:45', '2007-08-20 15:30', '2007-08-16 13:30', '2007-07-27 15:30', '2007-07-09 12:30', '2007-07-05 16:00', '2007-05-21 14:00', '2007-05-21 14:00', '2007-04-09 10:30', '2007-03-14 11:00', '2007-03-13 18:00', '2007-03-06 10:30', '2007-02-22 17:00', '2006-11-07 07:01', '2006-10-01 18:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: multiFlexServerBladesMibModule.setRevisionsDescriptions(('Added bladeBootCount column to bladeTable', "Added additional documentation to blade's power led; also made settable to overload it as a means of controlling the blade's power", 'Renamed smbiosHandle to just handle to remove confusion', 'Added bladeMemoryTable', 'Reworked CPU table so that the SMBIOS handle is now the key, rather than the name of the CPU slot. This same handle will be used for other SMBIOS related tables later (e.g., DIMMs).', 'Added bladeNicTable Moved bladeProcessorTable & bladeMemorySummaryTable.', 'Added more information about the individual blades bladeTable: bladeConsoleRedirection bladeLegacyOsRedirection ', 'Added more information about the individual blades: to bladeMSNumFailed account for failed DIMMs rather than failed memory size', 'Added bladeMemorySummaryTable', 'Reordered Revision to reverse chronological as some browsers choke, cleaned up some other simple nit-picky errors', 'Added Processor table providing information as described by the SMBIOS from the blades', 'Dropped Most of the SMBIOS data for feature complete. Will be added back in as time allots Dropped fruIndex and replaced it with fruType as they are identical, moved fruPresence to second column to be consistent with other tables Dropped bladeFruFirmwareVersion', 'Dropped DAS support (on board drives) Dropped S-State information. Dropped Information about the SAS Controller/option ROM', 'Changed out the INTEGERs to INT32withException in static tables to be able to display enumerations when exceptions occur. Moved the Presence to the first column passed the index to be consistent with the other tables', 'Added enumerations to bladeTable numerics to flag unknown and notApplicable states to differentiate from actual values Also Added a blade presence column to bladeTable. Originally, this was to be included solely within the bladeFruTable, but it just rubbed wrong.', 'Renamed bladeBmcVersion to bladeBmcFirmwareVersion to be consistent in naming with other subsystems', 'Dropped bmcMacTable', 'Moved FirmwareBundleId from chassis to CMM Tree. cmmTable data now complies with IDROM (DID/DSD) information. Added cmmPowerLedStates, cmmFaultLedStates, & cmmPresenceLedStates to cmmTable. Renamed fruTable to bladeFruTable (to avoid conflicts in other MIBs) Added ebfFirmwareVersion. Added cmmFirmwareVersion. Added maxLocalDrives, numOfLocalDrives, & bladeLocalDrivePresenceMask to the bladeFruTable Moved cpuSState to the bladeTable (as sState) Added mState (albiet as a token for the moment) to the bladeTable Renumbered / reorganized accordingly', "Changed Mask representations from an Opaque to a DisplayString at the request of the architects such that it now is an ASCII representation of bit string reflecting the presence with the left most 'bit' being bit 1 and max* bits being represented. Due to the new nomenclature, new columns were added to match the masks changed within the FRU table Removed the sasIdTable Everything has been renumbered and resequenced", 'Renamed MIB file and updated internal relevance to formal product name Multi-Flex Server', "Consolidated use of Presence datatype and changed 'theChassis' to 'chassis'", "Partitioned off and created as it's own module",))
if mibBuilder.loadTexts: multiFlexServerBladesMibModule.setLastUpdated('200805192028Z')
if mibBuilder.loadTexts: multiFlexServerBladesMibModule.setOrganization('Intel Corporation')
if mibBuilder.loadTexts: multiFlexServerBladesMibModule.setContactInfo('Brian Kurle Intel Corporation JF5-2-C3 Tel: 503-712-5032 E-Mail: brianx.j.kurle@intel.com')
if mibBuilder.loadTexts: multiFlexServerBladesMibModule.setDescription('Blade Module of the Multi-Flex Server')
maxBlades = MibScalar((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 12), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: maxBlades.setStatus('current')
if mibBuilder.loadTexts: maxBlades.setDescription('Maximum number of Blades possible in this chassis.')
numOfBlades = MibScalar((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 22), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: numOfBlades.setStatus('current')
if mibBuilder.loadTexts: numOfBlades.setDescription('The number of Blades in the system.')
bladePresenceMask = MibScalar((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 32), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladePresenceMask.setStatus('current')
if mibBuilder.loadTexts: bladePresenceMask.setDescription("ASCII representation of bit string reflecting the presence of the blades with the left most 'bit' being bit 1 and maxBlades bits being represented. Thus, '010011' would express that blades 2, 5, & 6 (of six blades) are present")
blades = ObjectIdentity((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202))
if mibBuilder.loadTexts: blades.setStatus('current')
if mibBuilder.loadTexts: blades.setDescription('Container for Blade specific information as well as all components logically contained within.')
bladeTable = MibTable((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 1), )
if mibBuilder.loadTexts: bladeTable.setStatus('current')
if mibBuilder.loadTexts: bladeTable.setDescription('Each row describes a Blade in the chassis. Note, all blade rows possible for a chassis are present so that the presence field is accessible even when the blade is not.')
bladeEntry = MibTableRow((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 1, 1), ).setIndexNames((0, "INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeSlotId"))
if mibBuilder.loadTexts: bladeEntry.setStatus('current')
if mibBuilder.loadTexts: bladeEntry.setDescription('Individual blade entry')
bladeSlotId = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 1, 1, 1), Index()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladeSlotId.setStatus('current')
if mibBuilder.loadTexts: bladeSlotId.setDescription('Slot number which the blade current occupies (or would occupy).')
bladePresence = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 1, 1, 2), Presence()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladePresence.setStatus('current')
if mibBuilder.loadTexts: bladePresence.setDescription('column used to flag the existence of a particular FRU')
maxFrus = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 1, 1, 3), INT32withException()).setMaxAccess("readonly")
if mibBuilder.loadTexts: maxFrus.setStatus('current')
if mibBuilder.loadTexts: maxFrus.setDescription('Given a board, the Maximum number of FRUs for this board. This parameter is related to the bladeFruPresenceMask as it defines the number of FRUs to be represented (whether they are present or not)')
numOfFrus = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 1, 1, 4), INT32withException()).setMaxAccess("readonly")
if mibBuilder.loadTexts: numOfFrus.setStatus('current')
if mibBuilder.loadTexts: numOfFrus.setDescription('The number FRUs present on the board')
bladeFruPresenceMask = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 1, 1, 5), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladeFruPresenceMask.setStatus('current')
if mibBuilder.loadTexts: bladeFruPresenceMask.setDescription("ASCII representation of bit string reflecting the presence of the FRUs with the left most 'bit' being bit 1 and maxFrus bits being represented. bit 1 - blade, itself bit 2 - mez card Thus, '10' would express that the blade is present, but does not have a Mez card When indeterminate, the string will be empty")
bladePowerLed = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 1, 1, 6), PowerLedStates()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: bladePowerLed.setStatus('current')
if mibBuilder.loadTexts: bladePowerLed.setDescription('State of the Power LED on the Blade (and optionally power control blade)')
bladeFaultLed = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 1, 1, 7), FaultLedStates()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladeFaultLed.setStatus('current')
if mibBuilder.loadTexts: bladeFaultLed.setDescription('State of the Fault LED on the Blade')
bladePresenceLed = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 1, 1, 8), PresenceLedStates()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: bladePresenceLed.setStatus('current')
if mibBuilder.loadTexts: bladePresenceLed.setDescription('State of the Presence LED on the Blade (and optionally intiate identification)')
bladeBmcFirmwareVersion = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 1, 1, 9), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladeBmcFirmwareVersion.setStatus('current')
if mibBuilder.loadTexts: bladeBmcFirmwareVersion.setDescription('Textual BMC Version of this blade.')
bladeBootBlockVersion = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 1, 1, 10), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladeBootBlockVersion.setStatus('current')
if mibBuilder.loadTexts: bladeBootBlockVersion.setDescription('Textual Boot Block Version of this blade.')
bladeBiosVersion = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 1, 1, 11), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladeBiosVersion.setStatus('current')
if mibBuilder.loadTexts: bladeBiosVersion.setDescription('Textual BIOS Version of this blade.')
bladeConsoleRedirection = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 1, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(-32, -16, 0, 1))).clone(namedValues=NamedValues(("notApplicable", -32), ("unknown", -16), ("disabled", 0), ("networkSerialPort", 1)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladeConsoleRedirection.setStatus('current')
if mibBuilder.loadTexts: bladeConsoleRedirection.setDescription('Console redirection configuration within BIOS')
bladeLegacyOsRedirection = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 1, 1, 13), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(-32, -16, 0, 1))).clone(namedValues=NamedValues(("notApplicable", -32), ("unknown", -16), ("noLegacyOsRedirection", 0), ("legacyOsRedirection", 1)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladeLegacyOsRedirection.setStatus('current')
if mibBuilder.loadTexts: bladeLegacyOsRedirection.setDescription('Legacy OS Redirection configuration within BIOS')
bladeBootCount = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 1, 1, 14), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladeBootCount.setStatus('current')
if mibBuilder.loadTexts: bladeBootCount.setDescription("Number of times the blade has booted (since manufactured or NVRAM cleared) Will be 0 if unknown (e.g., blade hasn't been powered on at least once since insertion, blade not present, etc.).")
bladeFruTable = MibTable((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 2), )
if mibBuilder.loadTexts: bladeFruTable.setStatus('current')
if mibBuilder.loadTexts: bladeFruTable.setDescription('Each row describes a FRU associated with (and including) a Blade in the chassis There will always be 2 FRU entries for every blade (with the presence field marking whether marking whether the rest of the row is relevant). Thus, the presence can be queried of all FRUs regardless of their being present.')
bladeFruEntry = MibTableRow((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 2, 1), ).setIndexNames((0, "INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeSlotId"), (0, "INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeFruType"))
if mibBuilder.loadTexts: bladeFruEntry.setStatus('current')
if mibBuilder.loadTexts: bladeFruEntry.setDescription('blade & SubFRU common information.')
bladeFruType = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 2, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("blade", 1), ("mezzanine", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladeFruType.setStatus('current')
if mibBuilder.loadTexts: bladeFruType.setDescription('column used to identify a particular FRU. FRU 1 is the blade, itself, FRU 2 is the mezzanine card')
bladeFruPresence = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 2, 1, 2), Presence()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladeFruPresence.setStatus('current')
if mibBuilder.loadTexts: bladeFruPresence.setDescription('column used to flag the existence of a particular FRU')
bladeFruVendor = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 2, 1, 3), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladeFruVendor.setStatus('current')
if mibBuilder.loadTexts: bladeFruVendor.setDescription('Device manufacturer')
bladeFruMfgDate = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 2, 1, 4), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladeFruMfgDate.setStatus('current')
if mibBuilder.loadTexts: bladeFruMfgDate.setDescription('Manufacture date/time')
bladeFruDeviceName = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 2, 1, 5), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladeFruDeviceName.setStatus('current')
if mibBuilder.loadTexts: bladeFruDeviceName.setDescription('Device Name')
bladeFruPart = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 2, 1, 6), IdromBinary16()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladeFruPart.setStatus('current')
if mibBuilder.loadTexts: bladeFruPart.setDescription('Device Part Number')
bladeFruSerialNo = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 2, 1, 7), IdromBinary16()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladeFruSerialNo.setStatus('current')
if mibBuilder.loadTexts: bladeFruSerialNo.setDescription('Device Serial Number')
bladeFruMaximumPower = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 2, 1, 8), Power()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladeFruMaximumPower.setStatus('current')
if mibBuilder.loadTexts: bladeFruMaximumPower.setDescription('Static maximum power generation / consumption (in watts): <0 - Negative numbers indicate device consumes power (in watts) >0 - Positive numbers indicate device generates power (in watts) 0 - Device is passive (does not not consume or generate power) 0xffff - Maximum power generation/consumption not known or specified')
bladeFruNominalPower = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 2, 1, 9), Power()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladeFruNominalPower.setStatus('current')
if mibBuilder.loadTexts: bladeFruNominalPower.setDescription('Static Nominal power generation / consumption (in watts): <0 - Negative numbers indicate device consumes power (in watts) >0 - Positive numbers indicate device generates power (in watts) 0 - Device is passive (does not not consume or generate power) 0xffff - Nominal power generation/consumption not known or specified')
bladeFruAssetTag = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 2, 1, 10), IdromBinary16()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladeFruAssetTag.setStatus('current')
if mibBuilder.loadTexts: bladeFruAssetTag.setDescription('Asset Tag # of device')
bladeNicTable = MibTable((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 3), )
if mibBuilder.loadTexts: bladeNicTable.setStatus('current')
if mibBuilder.loadTexts: bladeNicTable.setDescription('Each row describes a NIC associated with a blade from the system memory as described by the blades SMBIOS entries. For future compatibility, this table is sparsely populate based on the presence of the blade, and the availability of the SMBIOS from the blade (e.g., a blade may be present, but if it never has powered on, or there is a communications error to the BMC, it may not be displayed)')
bladeNicEntry = MibTableRow((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 3, 1), ).setIndexNames((0, "INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeSlotId"), (0, "INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeNic"))
if mibBuilder.loadTexts: bladeNicEntry.setStatus('current')
if mibBuilder.loadTexts: bladeNicEntry.setDescription('Overall NIC information per blade information')
bladeNic = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 3, 1, 1), MacAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladeNic.setStatus('current')
if mibBuilder.loadTexts: bladeNic.setDescription('NIC associated with blade (both onboard and optional Mezzanine card) as found within the SMBIOS data for the blade')
bladeProcessorTable = MibTable((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 4), )
if mibBuilder.loadTexts: bladeProcessorTable.setStatus('current')
if mibBuilder.loadTexts: bladeProcessorTable.setDescription("Each row describes a Processor associated with a Blade in the chassis as described by the blades SMBIOS entries. As there are multiple Processors available per blade, there are two indices associated with this table. One for the blade, the other for the Processor in question. Although the blade is associated by slot within the chassis and is easily made a numeric value, the processor is less reliable. Although initial boards return via the BIOS the form 'CPU#', this is not required by the SMBIOS specification (it could be J2341). Thus, the SMBIOS handle associated with the processor is used so that cross referencing is more straight forward (e.g., when listing L caches associated with processors). For future compatibility, this table is sparsely populate based on the presence of the blade, and the availability of the SMBIOS from the blade (e.g., a blade may be present, but if it never has powered on, or there is a communications error to the BMC, it may not be displayed)")
bladeProcessorEntry = MibTableRow((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 4, 1), ).setIndexNames((0, "INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeSlotId"), (0, "INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "handle"))
if mibBuilder.loadTexts: bladeProcessorEntry.setStatus('current')
if mibBuilder.loadTexts: bladeProcessorEntry.setDescription('Processor(s) per blade information')
handle = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 4, 1, 1), Index())
if mibBuilder.loadTexts: handle.setStatus('current')
if mibBuilder.loadTexts: handle.setDescription('Unique handle within the SMBIOS table for a specific blade which lays out the assorted record types.')
bladeProcessorSocket = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 4, 1, 2), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladeProcessorSocket.setStatus('current')
if mibBuilder.loadTexts: bladeProcessorSocket.setDescription("String returned by SMBIOS designating the socket location of the CPU for the indexed blade. The string is returned by the BIOS and is arbitrary as determined by the vendor. Thus it could be J202, or CPU2. Regardless, it will be unqiue in it's designation for a blade.")
bladeProcessorPresence = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 4, 1, 3), Presence()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladeProcessorPresence.setStatus('current')
if mibBuilder.loadTexts: bladeProcessorPresence.setDescription('column used to flag the existence of a particular CPU')
bladeProcessorType = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 4, 1, 4), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladeProcessorType.setStatus('current')
if mibBuilder.loadTexts: bladeProcessorType.setDescription('SMBIOS string representing type of Processor in this slot')
bladeProcessorFamily = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 4, 1, 5), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladeProcessorFamily.setStatus('current')
if mibBuilder.loadTexts: bladeProcessorFamily.setDescription('String representing SMBIOS data for the processor family type')
bladeProcessorManufacturer = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 4, 1, 6), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladeProcessorManufacturer.setStatus('current')
if mibBuilder.loadTexts: bladeProcessorManufacturer.setDescription('String representing SMBIOS data for the Manufacturer of the Processor')
bladeProcessorID = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 4, 1, 7), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladeProcessorID.setStatus('current')
if mibBuilder.loadTexts: bladeProcessorID.setDescription("SMBIOS string containing the Processor ID field which contains processor-specific information that describes the processor's features.")
bladeProcessorVersion = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 4, 1, 8), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladeProcessorVersion.setStatus('current')
if mibBuilder.loadTexts: bladeProcessorVersion.setDescription('String representing SMBIOS data describing the Processor')
bladeProcessorVoltage = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 4, 1, 9), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladeProcessorVoltage.setStatus('current')
if mibBuilder.loadTexts: bladeProcessorVoltage.setDescription('SMBIOS string representing the voltage(s) the processor is capable of')
bladeProcessorExtClock = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 4, 1, 10), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladeProcessorExtClock.setStatus('current')
if mibBuilder.loadTexts: bladeProcessorExtClock.setDescription('SMBIOS value of the External Clock Frequency, in MHZ. If the value is unknown, the field is set to 0')
bladeProcessorMaxSpeed = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 4, 1, 11), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladeProcessorMaxSpeed.setStatus('current')
if mibBuilder.loadTexts: bladeProcessorMaxSpeed.setDescription('SMBIOS value of the Maximum processor speed (in MHz) supported by the system for this processor socket. If the value is unknown, the field is set to 0. Note: This field identifies a capability for the system, not the processor itself.')
bladeProcessorStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 4, 1, 12), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladeProcessorStatus.setStatus('current')
if mibBuilder.loadTexts: bladeProcessorStatus.setDescription('String representing SMBIOS data describing CPU status information')
bladeProcessorUpgrade = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 4, 1, 13), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladeProcessorUpgrade.setStatus('current')
if mibBuilder.loadTexts: bladeProcessorUpgrade.setDescription("String representing SMBIOS data describing the CPU 'Upgrade' or how the processor is located on the blade")
bladeProcessorSerialNo = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 4, 1, 14), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladeProcessorSerialNo.setStatus('current')
if mibBuilder.loadTexts: bladeProcessorSerialNo.setDescription('SMBIOS string of the serial number of this processor. This value is set by the manufactureer and normally not changeable.')
bladeProcessorAssetTag = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 4, 1, 15), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladeProcessorAssetTag.setStatus('current')
if mibBuilder.loadTexts: bladeProcessorAssetTag.setDescription('SMBIOS string of the asset tag of this processor.')
bladeProcessorPartNo = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 4, 1, 16), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladeProcessorPartNo.setStatus('current')
if mibBuilder.loadTexts: bladeProcessorPartNo.setDescription('SMBIOS string of the part number of this processor. This value is set by the manufactureer and normally not changeable.')
bladeMemorySummaryTable = MibTable((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 5), )
if mibBuilder.loadTexts: bladeMemorySummaryTable.setStatus('current')
if mibBuilder.loadTexts: bladeMemorySummaryTable.setDescription('Each row describes the overall summary of the memory configuration for a given blade in the chassis as described by the blades SMBIOS entries. For future compatibility, this table is sparsely populate based on the presence of the blade, and the availability of the SMBIOS from the blade (e.g., a blade may be present, but if it never has powered on, or there is a communications error to the BMC, it may not be displayed)')
bladeMemorySummaryEntry = MibTableRow((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 5, 1), )
bladeEntry.registerAugmentions(("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeMemorySummaryEntry"))
bladeMemorySummaryEntry.setIndexNames(*bladeEntry.getIndexNames())
if mibBuilder.loadTexts: bladeMemorySummaryEntry.setStatus('current')
if mibBuilder.loadTexts: bladeMemorySummaryEntry.setDescription('Overall memory configuration summary per blade information')
bladeMSMaxDevices = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 5, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladeMSMaxDevices.setStatus('current')
if mibBuilder.loadTexts: bladeMSMaxDevices.setDescription('The number of slots or sockets available for Memory Devices on the board.')
bladeMSNumOfDevices = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 5, 1, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladeMSNumOfDevices.setStatus('current')
if mibBuilder.loadTexts: bladeMSNumOfDevices.setDescription('The number of slots or sockets populated with Memory Devices on the board.')
bladeMSCapacity = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 5, 1, 3), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladeMSCapacity.setStatus('current')
if mibBuilder.loadTexts: bladeMSCapacity.setDescription('The maximum memory capacity in MB for this array.')
bladeMSTotalSize = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 5, 1, 4), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladeMSTotalSize.setStatus('current')
if mibBuilder.loadTexts: bladeMSTotalSize.setDescription('Total size in MB of all memory physically installed')
bladeMSEffectiveSize = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 5, 1, 5), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladeMSEffectiveSize.setStatus('current')
if mibBuilder.loadTexts: bladeMSEffectiveSize.setDescription('Memory available after deducting for failed and redundant memory units')
bladeMSNumFailed = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 5, 1, 6), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladeMSNumFailed.setStatus('current')
if mibBuilder.loadTexts: bladeMSNumFailed.setDescription('Total Number of failed memory devices')
bladeMSDisabledSize = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 5, 1, 7), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladeMSDisabledSize.setStatus('current')
if mibBuilder.loadTexts: bladeMSDisabledSize.setDescription('Total size in MB of all disabled memory')
bladeMSSpareSize = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 5, 1, 8), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladeMSSpareSize.setStatus('current')
if mibBuilder.loadTexts: bladeMSSpareSize.setDescription('Total size in MB of all spare memory (see bladeMSRasPossible & bladeMSRasConfiguration columns)')
bladeMSRasPossible = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 5, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3))).clone(namedValues=NamedValues(("notSupported", 0), ("supportsMirroring", 1), ("supportsSparing", 2), ("supportsBoth", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladeMSRasPossible.setStatus('current')
if mibBuilder.loadTexts: bladeMSRasPossible.setDescription('RAS Configuration Possible')
bladeMSRasConfiguration = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 5, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 1, 2))).clone(namedValues=NamedValues(("none", 0), ("mirroring", 1), ("sparing", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladeMSRasConfiguration.setStatus('current')
if mibBuilder.loadTexts: bladeMSRasConfiguration.setDescription('RAS Configuration Possible')
bladeMSErrorCorrection = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 5, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("other", 1), ("unknown", 2), ("none", 3), ("parity", 4), ("singleBitEcc", 5), ("multiBitEcc", 6), ("crc", 7)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladeMSErrorCorrection.setStatus('current')
if mibBuilder.loadTexts: bladeMSErrorCorrection.setDescription('The primary hardware error correction or detection method supported')
bladeMemoryTable = MibTable((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 6), )
if mibBuilder.loadTexts: bladeMemoryTable.setStatus('current')
if mibBuilder.loadTexts: bladeMemoryTable.setDescription('Each row describes an individual memory device for system memory given a specific blade in the chassis as described by the blades SMBIOS entries. For future compatibility, this table is sparsely populate based on the presence of the blade, and the availability of the SMBIOS from the blade (e.g., a blade may be present, but if it never has powered on, or there is a communications error to the BMC, it may not be displayed)')
bladeMemoryEntry = MibTableRow((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 6, 1), ).setIndexNames((0, "INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeSlotId"), (0, "INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "handle"))
if mibBuilder.loadTexts: bladeMemoryEntry.setStatus('current')
if mibBuilder.loadTexts: bladeMemoryEntry.setDescription('Overall memory device per blade information')
bladeMemTotalWidth = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 6, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(-1))).clone(namedValues=NamedValues(("unknown", -1)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladeMemTotalWidth.setStatus('current')
if mibBuilder.loadTexts: bladeMemTotalWidth.setDescription('The total width, in bits, of this memory device, including any check or error-correction bits. If there are no error-correction bits, this value should be equal to bladeMemDataWidth. If the width is unknown, the field is set to -1.')
bladeMemDataWidth = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 6, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(-1))).clone(namedValues=NamedValues(("unknown", -1)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladeMemDataWidth.setStatus('current')
if mibBuilder.loadTexts: bladeMemDataWidth.setDescription('The data width, in bits, of this memory device. If 0 and bladeMemTotalWidth is 8 indicates that the device is being used solely to provide 8 error-correction bits. If the width is unknown, the field is set to -1.')
bladeMemSize = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 6, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(-1, 0))).clone(namedValues=NamedValues(("unknown", -1), ("notInstalled", 0)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladeMemSize.setStatus('current')
if mibBuilder.loadTexts: bladeMemSize.setDescription("The size of the memory device. If the value is 0, no memory device is installed in the socket (shouldn't occur as the table is sparsely populated); if the size is unknown, the field value is -1.")
bladeMemGranularity = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 6, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(-1, 0, 1))).clone(namedValues=NamedValues(("unknown", -1), ("megabytes", 0), ("kilobytes", 1)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladeMemGranularity.setStatus('current')
if mibBuilder.loadTexts: bladeMemGranularity.setDescription('The granularity of the bladeMemSize')
bladeMemFormFactor = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 6, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15))).clone(namedValues=NamedValues(("other", 1), ("unknown", 2), ("simm", 3), ("sip", 4), ("chip", 5), ("dip", 6), ("zip", 7), ("proprietaryCard", 8), ("dimm", 9), ("tsop", 10), ("rowOfChips", 11), ("rimm", 12), ("sodimm", 13), ("srimm", 14), ("fbdimm", 15)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladeMemFormFactor.setStatus('current')
if mibBuilder.loadTexts: bladeMemFormFactor.setDescription('The implementation form factor for this memory device.')
bladeMemDeviceSet = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 6, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(-1, 0))).clone(namedValues=NamedValues(("unknown", -1), ("noSet", 0)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladeMemDeviceSet.setStatus('current')
if mibBuilder.loadTexts: bladeMemDeviceSet.setDescription('Identifies when the Memory Device is one of a set of Memory Devices that must be populated with all devices of the same type and size and the set to which this device belongs. A value of 0 indicates that the device is not part of a set; a value of -1 indicates that the attribute is unknown.')
bladeMemLocation = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 6, 1, 7), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladeMemLocation.setStatus('current')
if mibBuilder.loadTexts: bladeMemLocation.setDescription('String that identifies the physically labeled socket or board position where the memory device is located')
bladeMemBank = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 6, 1, 8), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladeMemBank.setStatus('current')
if mibBuilder.loadTexts: bladeMemBank.setDescription('String that identifies the physically labeled bank where where the memory device is located')
bladeMemType = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 6, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20))).clone(namedValues=NamedValues(("other", 1), ("unknown", 2), ("dram", 3), ("edram", 4), ("vram", 5), ("sram", 6), ("ram", 7), ("rom", 8), ("flash", 9), ("eeprom", 10), ("feprom", 11), ("eprom", 12), ("cdram", 13), ("dram3", 14), ("sdram", 15), ("sgram", 16), ("rdram", 17), ("ddr", 18), ("ddr2", 19), ("ddr2fbdimm", 20)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladeMemType.setStatus('current')
if mibBuilder.loadTexts: bladeMemType.setDescription('The type of memory used in this device')
bladeMemTypeDetail = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 6, 1, 10), Bits().clone(namedValues=NamedValues(("reserved", 0), ("other", 1), ("unknown", 2), ("fastPaged", 3), ("staticColumn", 4), ("pseudoStatic", 5), ("rambus", 6), ("synchronous", 7), ("cmos", 8), ("edo", 9), ("windowDram", 10), ("cacheDram", 11), ("nonVolatile", 12)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladeMemTypeDetail.setStatus('current')
if mibBuilder.loadTexts: bladeMemTypeDetail.setDescription('The type of memory used in this device')
bladeMemSpeed = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 6, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0))).clone(namedValues=NamedValues(("unknown", 0)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladeMemSpeed.setStatus('current')
if mibBuilder.loadTexts: bladeMemSpeed.setDescription('Identifies the speed of the device in megahertz (MHz).')
bladeMemManufacturer = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 6, 1, 12), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladeMemManufacturer.setStatus('current')
if mibBuilder.loadTexts: bladeMemManufacturer.setDescription('Manufacturer of this memory device')
bladeMemSerialNo = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 6, 1, 13), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladeMemSerialNo.setStatus('current')
if mibBuilder.loadTexts: bladeMemSerialNo.setDescription('Serial Number of this memory device')
bladeMemAssetTag = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 6, 1, 14), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladeMemAssetTag.setStatus('current')
if mibBuilder.loadTexts: bladeMemAssetTag.setDescription('Asset Tag of this memory device')
bladeMemPart = MibTableColumn((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 6, 1, 15), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: bladeMemPart.setStatus('current')
if mibBuilder.loadTexts: bladeMemPart.setDescription('Part Number of this memory device')
bladeGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 2, 2, 12)).setObjects(("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "maxBlades"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "numOfBlades"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladePresenceMask"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeSlotId"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "maxFrus"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "numOfFrus"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladePresence"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladePowerLed"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeFaultLed"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladePresenceLed"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeFruPresenceMask"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeBmcFirmwareVersion"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeBootBlockVersion"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeBiosVersion"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeConsoleRedirection"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeLegacyOsRedirection"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeBootCount"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeFruType"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeFruPresence"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeFruVendor"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeFruMfgDate"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeFruDeviceName"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeFruPart"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeFruSerialNo"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeFruMaximumPower"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeFruNominalPower"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeFruAssetTag"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeNic"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeProcessorSocket"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeProcessorPresence"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeProcessorType"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeProcessorFamily"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeProcessorManufacturer"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeProcessorID"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeProcessorVersion"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeProcessorVoltage"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeProcessorExtClock"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeProcessorMaxSpeed"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeProcessorStatus"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeProcessorUpgrade"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeProcessorSerialNo"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeProcessorAssetTag"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeProcessorPartNo"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeMSMaxDevices"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeMSNumOfDevices"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeMSCapacity"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeMSErrorCorrection"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeMSTotalSize"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeMSNumFailed"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeMSDisabledSize"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeMSSpareSize"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeMSEffectiveSize"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeMSRasPossible"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeMSRasConfiguration"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeMemTotalWidth"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeMemDataWidth"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeMemSize"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeMemGranularity"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeMemFormFactor"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeMemDeviceSet"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeMemLocation"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeMemBank"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeMemType"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeMemTypeDetail"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeMemSpeed"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeMemManufacturer"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeMemSerialNo"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeMemAssetTag"), ("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", "bladeMemPart"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
bladeGroup = bladeGroup.setStatus('current')
if mibBuilder.loadTexts: bladeGroup.setDescription('Description.')
mibBuilder.exportSymbols("INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB", bladeFruType=bladeFruType, bladeBootBlockVersion=bladeBootBlockVersion, bladeMSCapacity=bladeMSCapacity, bladeLegacyOsRedirection=bladeLegacyOsRedirection, bladeMemoryEntry=bladeMemoryEntry, bladeMemTypeDetail=bladeMemTypeDetail, bladeSlotId=bladeSlotId, bladeProcessorSocket=bladeProcessorSocket, bladeMSMaxDevices=bladeMSMaxDevices, bladeTable=bladeTable, bladeFruSerialNo=bladeFruSerialNo, bladeGroup=bladeGroup, bladeMSErrorCorrection=bladeMSErrorCorrection, blades=blades, bladeBiosVersion=bladeBiosVersion, bladeFruNominalPower=bladeFruNominalPower, bladeProcessorStatus=bladeProcessorStatus, bladeFruPresence=bladeFruPresence, maxBlades=maxBlades, bladeProcessorTable=bladeProcessorTable, bladeProcessorID=bladeProcessorID, maxFrus=maxFrus, bladeMemDeviceSet=bladeMemDeviceSet, numOfFrus=numOfFrus, bladeFruMaximumPower=bladeFruMaximumPower, PYSNMP_MODULE_ID=multiFlexServerBladesMibModule, bladeMSSpareSize=bladeMSSpareSize, bladeFruTable=bladeFruTable, bladePresenceMask=bladePresenceMask, bladeProcessorVoltage=bladeProcessorVoltage, bladeMSNumOfDevices=bladeMSNumOfDevices, bladeFruAssetTag=bladeFruAssetTag, bladeMemSerialNo=bladeMemSerialNo, bladeProcessorManufacturer=bladeProcessorManufacturer, bladeMemorySummaryEntry=bladeMemorySummaryEntry, bladeNicTable=bladeNicTable, bladeMemoryTable=bladeMemoryTable, bladeMSDisabledSize=bladeMSDisabledSize, bladeProcessorEntry=bladeProcessorEntry, bladeProcessorExtClock=bladeProcessorExtClock, bladeMemBank=bladeMemBank, bladeBootCount=bladeBootCount, bladeMemManufacturer=bladeMemManufacturer, bladeProcessorFamily=bladeProcessorFamily, bladeProcessorUpgrade=bladeProcessorUpgrade, bladeNic=bladeNic, handle=handle, bladePowerLed=bladePowerLed, bladeFruMfgDate=bladeFruMfgDate, bladeMSRasPossible=bladeMSRasPossible, bladeMemGranularity=bladeMemGranularity, bladeMemSize=bladeMemSize, bladeConsoleRedirection=bladeConsoleRedirection, bladeFruEntry=bladeFruEntry, bladeMemDataWidth=bladeMemDataWidth, numOfBlades=numOfBlades, bladeNicEntry=bladeNicEntry, bladeMemAssetTag=bladeMemAssetTag, bladeProcessorType=bladeProcessorType, bladeProcessorAssetTag=bladeProcessorAssetTag, multiFlexServerBladesMibModule=multiFlexServerBladesMibModule, bladeMemFormFactor=bladeMemFormFactor, bladeBmcFirmwareVersion=bladeBmcFirmwareVersion, bladeFruPresenceMask=bladeFruPresenceMask, bladeProcessorPartNo=bladeProcessorPartNo, bladeProcessorMaxSpeed=bladeProcessorMaxSpeed, bladePresenceLed=bladePresenceLed, bladeMSEffectiveSize=bladeMSEffectiveSize, bladeMemTotalWidth=bladeMemTotalWidth, bladeProcessorVersion=bladeProcessorVersion, bladeEntry=bladeEntry, bladeMemLocation=bladeMemLocation, bladeMemPart=bladeMemPart, bladeProcessorPresence=bladeProcessorPresence, bladeMSTotalSize=bladeMSTotalSize, bladeMemType=bladeMemType, bladeFruVendor=bladeFruVendor, bladeFruDeviceName=bladeFruDeviceName, bladeMemorySummaryTable=bladeMemorySummaryTable, bladeProcessorSerialNo=bladeProcessorSerialNo, bladeMemSpeed=bladeMemSpeed, bladePresence=bladePresence, bladeFaultLed=bladeFaultLed, bladeFruPart=bladeFruPart, bladeMSNumFailed=bladeMSNumFailed, bladeMSRasConfiguration=bladeMSRasConfiguration)
| (integer, octet_string, object_identifier) = mibBuilder.importSymbols('ASN1', 'Integer', 'OctetString', 'ObjectIdentifier')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(value_size_constraint, value_range_constraint, constraints_union, single_value_constraint, constraints_intersection) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueSizeConstraint', 'ValueRangeConstraint', 'ConstraintsUnion', 'SingleValueConstraint', 'ConstraintsIntersection')
(chassis,) = mibBuilder.importSymbols('INTELCORPORATION-MULTI-FLEX-SERVER-MIB', 'chassis')
(groups, reg_module) = mibBuilder.importSymbols('INTELCORPORATION-MULTI-FLEX-SERVER-REG', 'groups', 'regModule')
(index, power, presence, fault_led_states, int32with_exception, presence_led_states, power_led_states, idrom_binary16) = mibBuilder.importSymbols('INTELCORPORATION-MULTI-FLEX-SERVER-TC', 'Index', 'Power', 'Presence', 'FaultLedStates', 'INT32withException', 'PresenceLedStates', 'PowerLedStates', 'IdromBinary16')
(notification_group, object_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ObjectGroup', 'ModuleCompliance')
(counter32, integer32, mib_identifier, counter64, mib_scalar, mib_table, mib_table_row, mib_table_column, iso, object_identity, gauge32, unsigned32, notification_type, ip_address, time_ticks, module_identity, bits) = mibBuilder.importSymbols('SNMPv2-SMI', 'Counter32', 'Integer32', 'MibIdentifier', 'Counter64', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'iso', 'ObjectIdentity', 'Gauge32', 'Unsigned32', 'NotificationType', 'IpAddress', 'TimeTicks', 'ModuleIdentity', 'Bits')
(mac_address, textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'MacAddress', 'TextualConvention', 'DisplayString')
multi_flex_server_blades_mib_module = module_identity((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 1, 1, 12))
multiFlexServerBladesMibModule.setRevisions(('2008-05-19 20:28', '2008-05-07 02:40', '2007-09-19 15:40', '2007-08-31 09:30', '2007-08-29 19:30', '2007-08-29 14:30', '2007-08-27 16:00', '2007-08-22 15:45', '2007-08-20 15:30', '2007-08-16 13:30', '2007-07-27 15:30', '2007-07-09 12:30', '2007-07-05 16:00', '2007-05-21 14:00', '2007-05-21 14:00', '2007-04-09 10:30', '2007-03-14 11:00', '2007-03-13 18:00', '2007-03-06 10:30', '2007-02-22 17:00', '2006-11-07 07:01', '2006-10-01 18:00'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts:
multiFlexServerBladesMibModule.setRevisionsDescriptions(('Added bladeBootCount column to bladeTable', "Added additional documentation to blade's power led; also made settable to overload it as a means of controlling the blade's power", 'Renamed smbiosHandle to just handle to remove confusion', 'Added bladeMemoryTable', 'Reworked CPU table so that the SMBIOS handle is now the key, rather than the name of the CPU slot. This same handle will be used for other SMBIOS related tables later (e.g., DIMMs).', 'Added bladeNicTable Moved bladeProcessorTable & bladeMemorySummaryTable.', 'Added more information about the individual blades bladeTable: bladeConsoleRedirection bladeLegacyOsRedirection ', 'Added more information about the individual blades: to bladeMSNumFailed account for failed DIMMs rather than failed memory size', 'Added bladeMemorySummaryTable', 'Reordered Revision to reverse chronological as some browsers choke, cleaned up some other simple nit-picky errors', 'Added Processor table providing information as described by the SMBIOS from the blades', 'Dropped Most of the SMBIOS data for feature complete. Will be added back in as time allots Dropped fruIndex and replaced it with fruType as they are identical, moved fruPresence to second column to be consistent with other tables Dropped bladeFruFirmwareVersion', 'Dropped DAS support (on board drives) Dropped S-State information. Dropped Information about the SAS Controller/option ROM', 'Changed out the INTEGERs to INT32withException in static tables to be able to display enumerations when exceptions occur. Moved the Presence to the first column passed the index to be consistent with the other tables', 'Added enumerations to bladeTable numerics to flag unknown and notApplicable states to differentiate from actual values Also Added a blade presence column to bladeTable. Originally, this was to be included solely within the bladeFruTable, but it just rubbed wrong.', 'Renamed bladeBmcVersion to bladeBmcFirmwareVersion to be consistent in naming with other subsystems', 'Dropped bmcMacTable', 'Moved FirmwareBundleId from chassis to CMM Tree. cmmTable data now complies with IDROM (DID/DSD) information. Added cmmPowerLedStates, cmmFaultLedStates, & cmmPresenceLedStates to cmmTable. Renamed fruTable to bladeFruTable (to avoid conflicts in other MIBs) Added ebfFirmwareVersion. Added cmmFirmwareVersion. Added maxLocalDrives, numOfLocalDrives, & bladeLocalDrivePresenceMask to the bladeFruTable Moved cpuSState to the bladeTable (as sState) Added mState (albiet as a token for the moment) to the bladeTable Renumbered / reorganized accordingly', "Changed Mask representations from an Opaque to a DisplayString at the request of the architects such that it now is an ASCII representation of bit string reflecting the presence with the left most 'bit' being bit 1 and max* bits being represented. Due to the new nomenclature, new columns were added to match the masks changed within the FRU table Removed the sasIdTable Everything has been renumbered and resequenced", 'Renamed MIB file and updated internal relevance to formal product name Multi-Flex Server', "Consolidated use of Presence datatype and changed 'theChassis' to 'chassis'", "Partitioned off and created as it's own module"))
if mibBuilder.loadTexts:
multiFlexServerBladesMibModule.setLastUpdated('200805192028Z')
if mibBuilder.loadTexts:
multiFlexServerBladesMibModule.setOrganization('Intel Corporation')
if mibBuilder.loadTexts:
multiFlexServerBladesMibModule.setContactInfo('Brian Kurle Intel Corporation JF5-2-C3 Tel: 503-712-5032 E-Mail: brianx.j.kurle@intel.com')
if mibBuilder.loadTexts:
multiFlexServerBladesMibModule.setDescription('Blade Module of the Multi-Flex Server')
max_blades = mib_scalar((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 12), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
maxBlades.setStatus('current')
if mibBuilder.loadTexts:
maxBlades.setDescription('Maximum number of Blades possible in this chassis.')
num_of_blades = mib_scalar((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 22), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
numOfBlades.setStatus('current')
if mibBuilder.loadTexts:
numOfBlades.setDescription('The number of Blades in the system.')
blade_presence_mask = mib_scalar((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 32), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladePresenceMask.setStatus('current')
if mibBuilder.loadTexts:
bladePresenceMask.setDescription("ASCII representation of bit string reflecting the presence of the blades with the left most 'bit' being bit 1 and maxBlades bits being represented. Thus, '010011' would express that blades 2, 5, & 6 (of six blades) are present")
blades = object_identity((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202))
if mibBuilder.loadTexts:
blades.setStatus('current')
if mibBuilder.loadTexts:
blades.setDescription('Container for Blade specific information as well as all components logically contained within.')
blade_table = mib_table((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 1))
if mibBuilder.loadTexts:
bladeTable.setStatus('current')
if mibBuilder.loadTexts:
bladeTable.setDescription('Each row describes a Blade in the chassis. Note, all blade rows possible for a chassis are present so that the presence field is accessible even when the blade is not.')
blade_entry = mib_table_row((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 1, 1)).setIndexNames((0, 'INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeSlotId'))
if mibBuilder.loadTexts:
bladeEntry.setStatus('current')
if mibBuilder.loadTexts:
bladeEntry.setDescription('Individual blade entry')
blade_slot_id = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 1, 1, 1), index()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladeSlotId.setStatus('current')
if mibBuilder.loadTexts:
bladeSlotId.setDescription('Slot number which the blade current occupies (or would occupy).')
blade_presence = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 1, 1, 2), presence()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladePresence.setStatus('current')
if mibBuilder.loadTexts:
bladePresence.setDescription('column used to flag the existence of a particular FRU')
max_frus = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 1, 1, 3), int32with_exception()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
maxFrus.setStatus('current')
if mibBuilder.loadTexts:
maxFrus.setDescription('Given a board, the Maximum number of FRUs for this board. This parameter is related to the bladeFruPresenceMask as it defines the number of FRUs to be represented (whether they are present or not)')
num_of_frus = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 1, 1, 4), int32with_exception()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
numOfFrus.setStatus('current')
if mibBuilder.loadTexts:
numOfFrus.setDescription('The number FRUs present on the board')
blade_fru_presence_mask = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 1, 1, 5), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladeFruPresenceMask.setStatus('current')
if mibBuilder.loadTexts:
bladeFruPresenceMask.setDescription("ASCII representation of bit string reflecting the presence of the FRUs with the left most 'bit' being bit 1 and maxFrus bits being represented. bit 1 - blade, itself bit 2 - mez card Thus, '10' would express that the blade is present, but does not have a Mez card When indeterminate, the string will be empty")
blade_power_led = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 1, 1, 6), power_led_states()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
bladePowerLed.setStatus('current')
if mibBuilder.loadTexts:
bladePowerLed.setDescription('State of the Power LED on the Blade (and optionally power control blade)')
blade_fault_led = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 1, 1, 7), fault_led_states()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladeFaultLed.setStatus('current')
if mibBuilder.loadTexts:
bladeFaultLed.setDescription('State of the Fault LED on the Blade')
blade_presence_led = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 1, 1, 8), presence_led_states()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
bladePresenceLed.setStatus('current')
if mibBuilder.loadTexts:
bladePresenceLed.setDescription('State of the Presence LED on the Blade (and optionally intiate identification)')
blade_bmc_firmware_version = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 1, 1, 9), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladeBmcFirmwareVersion.setStatus('current')
if mibBuilder.loadTexts:
bladeBmcFirmwareVersion.setDescription('Textual BMC Version of this blade.')
blade_boot_block_version = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 1, 1, 10), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladeBootBlockVersion.setStatus('current')
if mibBuilder.loadTexts:
bladeBootBlockVersion.setDescription('Textual Boot Block Version of this blade.')
blade_bios_version = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 1, 1, 11), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladeBiosVersion.setStatus('current')
if mibBuilder.loadTexts:
bladeBiosVersion.setDescription('Textual BIOS Version of this blade.')
blade_console_redirection = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 1, 1, 12), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(-32, -16, 0, 1))).clone(namedValues=named_values(('notApplicable', -32), ('unknown', -16), ('disabled', 0), ('networkSerialPort', 1)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladeConsoleRedirection.setStatus('current')
if mibBuilder.loadTexts:
bladeConsoleRedirection.setDescription('Console redirection configuration within BIOS')
blade_legacy_os_redirection = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 1, 1, 13), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(-32, -16, 0, 1))).clone(namedValues=named_values(('notApplicable', -32), ('unknown', -16), ('noLegacyOsRedirection', 0), ('legacyOsRedirection', 1)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladeLegacyOsRedirection.setStatus('current')
if mibBuilder.loadTexts:
bladeLegacyOsRedirection.setDescription('Legacy OS Redirection configuration within BIOS')
blade_boot_count = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 1, 1, 14), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladeBootCount.setStatus('current')
if mibBuilder.loadTexts:
bladeBootCount.setDescription("Number of times the blade has booted (since manufactured or NVRAM cleared) Will be 0 if unknown (e.g., blade hasn't been powered on at least once since insertion, blade not present, etc.).")
blade_fru_table = mib_table((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 2))
if mibBuilder.loadTexts:
bladeFruTable.setStatus('current')
if mibBuilder.loadTexts:
bladeFruTable.setDescription('Each row describes a FRU associated with (and including) a Blade in the chassis There will always be 2 FRU entries for every blade (with the presence field marking whether marking whether the rest of the row is relevant). Thus, the presence can be queried of all FRUs regardless of their being present.')
blade_fru_entry = mib_table_row((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 2, 1)).setIndexNames((0, 'INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeSlotId'), (0, 'INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeFruType'))
if mibBuilder.loadTexts:
bladeFruEntry.setStatus('current')
if mibBuilder.loadTexts:
bladeFruEntry.setDescription('blade & SubFRU common information.')
blade_fru_type = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 2, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('blade', 1), ('mezzanine', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladeFruType.setStatus('current')
if mibBuilder.loadTexts:
bladeFruType.setDescription('column used to identify a particular FRU. FRU 1 is the blade, itself, FRU 2 is the mezzanine card')
blade_fru_presence = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 2, 1, 2), presence()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladeFruPresence.setStatus('current')
if mibBuilder.loadTexts:
bladeFruPresence.setDescription('column used to flag the existence of a particular FRU')
blade_fru_vendor = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 2, 1, 3), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladeFruVendor.setStatus('current')
if mibBuilder.loadTexts:
bladeFruVendor.setDescription('Device manufacturer')
blade_fru_mfg_date = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 2, 1, 4), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladeFruMfgDate.setStatus('current')
if mibBuilder.loadTexts:
bladeFruMfgDate.setDescription('Manufacture date/time')
blade_fru_device_name = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 2, 1, 5), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladeFruDeviceName.setStatus('current')
if mibBuilder.loadTexts:
bladeFruDeviceName.setDescription('Device Name')
blade_fru_part = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 2, 1, 6), idrom_binary16()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladeFruPart.setStatus('current')
if mibBuilder.loadTexts:
bladeFruPart.setDescription('Device Part Number')
blade_fru_serial_no = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 2, 1, 7), idrom_binary16()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladeFruSerialNo.setStatus('current')
if mibBuilder.loadTexts:
bladeFruSerialNo.setDescription('Device Serial Number')
blade_fru_maximum_power = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 2, 1, 8), power()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladeFruMaximumPower.setStatus('current')
if mibBuilder.loadTexts:
bladeFruMaximumPower.setDescription('Static maximum power generation / consumption (in watts): <0 - Negative numbers indicate device consumes power (in watts) >0 - Positive numbers indicate device generates power (in watts) 0 - Device is passive (does not not consume or generate power) 0xffff - Maximum power generation/consumption not known or specified')
blade_fru_nominal_power = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 2, 1, 9), power()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladeFruNominalPower.setStatus('current')
if mibBuilder.loadTexts:
bladeFruNominalPower.setDescription('Static Nominal power generation / consumption (in watts): <0 - Negative numbers indicate device consumes power (in watts) >0 - Positive numbers indicate device generates power (in watts) 0 - Device is passive (does not not consume or generate power) 0xffff - Nominal power generation/consumption not known or specified')
blade_fru_asset_tag = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 2, 1, 10), idrom_binary16()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladeFruAssetTag.setStatus('current')
if mibBuilder.loadTexts:
bladeFruAssetTag.setDescription('Asset Tag # of device')
blade_nic_table = mib_table((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 3))
if mibBuilder.loadTexts:
bladeNicTable.setStatus('current')
if mibBuilder.loadTexts:
bladeNicTable.setDescription('Each row describes a NIC associated with a blade from the system memory as described by the blades SMBIOS entries. For future compatibility, this table is sparsely populate based on the presence of the blade, and the availability of the SMBIOS from the blade (e.g., a blade may be present, but if it never has powered on, or there is a communications error to the BMC, it may not be displayed)')
blade_nic_entry = mib_table_row((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 3, 1)).setIndexNames((0, 'INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeSlotId'), (0, 'INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeNic'))
if mibBuilder.loadTexts:
bladeNicEntry.setStatus('current')
if mibBuilder.loadTexts:
bladeNicEntry.setDescription('Overall NIC information per blade information')
blade_nic = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 3, 1, 1), mac_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladeNic.setStatus('current')
if mibBuilder.loadTexts:
bladeNic.setDescription('NIC associated with blade (both onboard and optional Mezzanine card) as found within the SMBIOS data for the blade')
blade_processor_table = mib_table((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 4))
if mibBuilder.loadTexts:
bladeProcessorTable.setStatus('current')
if mibBuilder.loadTexts:
bladeProcessorTable.setDescription("Each row describes a Processor associated with a Blade in the chassis as described by the blades SMBIOS entries. As there are multiple Processors available per blade, there are two indices associated with this table. One for the blade, the other for the Processor in question. Although the blade is associated by slot within the chassis and is easily made a numeric value, the processor is less reliable. Although initial boards return via the BIOS the form 'CPU#', this is not required by the SMBIOS specification (it could be J2341). Thus, the SMBIOS handle associated with the processor is used so that cross referencing is more straight forward (e.g., when listing L caches associated with processors). For future compatibility, this table is sparsely populate based on the presence of the blade, and the availability of the SMBIOS from the blade (e.g., a blade may be present, but if it never has powered on, or there is a communications error to the BMC, it may not be displayed)")
blade_processor_entry = mib_table_row((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 4, 1)).setIndexNames((0, 'INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeSlotId'), (0, 'INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'handle'))
if mibBuilder.loadTexts:
bladeProcessorEntry.setStatus('current')
if mibBuilder.loadTexts:
bladeProcessorEntry.setDescription('Processor(s) per blade information')
handle = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 4, 1, 1), index())
if mibBuilder.loadTexts:
handle.setStatus('current')
if mibBuilder.loadTexts:
handle.setDescription('Unique handle within the SMBIOS table for a specific blade which lays out the assorted record types.')
blade_processor_socket = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 4, 1, 2), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladeProcessorSocket.setStatus('current')
if mibBuilder.loadTexts:
bladeProcessorSocket.setDescription("String returned by SMBIOS designating the socket location of the CPU for the indexed blade. The string is returned by the BIOS and is arbitrary as determined by the vendor. Thus it could be J202, or CPU2. Regardless, it will be unqiue in it's designation for a blade.")
blade_processor_presence = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 4, 1, 3), presence()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladeProcessorPresence.setStatus('current')
if mibBuilder.loadTexts:
bladeProcessorPresence.setDescription('column used to flag the existence of a particular CPU')
blade_processor_type = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 4, 1, 4), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladeProcessorType.setStatus('current')
if mibBuilder.loadTexts:
bladeProcessorType.setDescription('SMBIOS string representing type of Processor in this slot')
blade_processor_family = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 4, 1, 5), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladeProcessorFamily.setStatus('current')
if mibBuilder.loadTexts:
bladeProcessorFamily.setDescription('String representing SMBIOS data for the processor family type')
blade_processor_manufacturer = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 4, 1, 6), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladeProcessorManufacturer.setStatus('current')
if mibBuilder.loadTexts:
bladeProcessorManufacturer.setDescription('String representing SMBIOS data for the Manufacturer of the Processor')
blade_processor_id = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 4, 1, 7), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladeProcessorID.setStatus('current')
if mibBuilder.loadTexts:
bladeProcessorID.setDescription("SMBIOS string containing the Processor ID field which contains processor-specific information that describes the processor's features.")
blade_processor_version = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 4, 1, 8), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladeProcessorVersion.setStatus('current')
if mibBuilder.loadTexts:
bladeProcessorVersion.setDescription('String representing SMBIOS data describing the Processor')
blade_processor_voltage = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 4, 1, 9), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladeProcessorVoltage.setStatus('current')
if mibBuilder.loadTexts:
bladeProcessorVoltage.setDescription('SMBIOS string representing the voltage(s) the processor is capable of')
blade_processor_ext_clock = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 4, 1, 10), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladeProcessorExtClock.setStatus('current')
if mibBuilder.loadTexts:
bladeProcessorExtClock.setDescription('SMBIOS value of the External Clock Frequency, in MHZ. If the value is unknown, the field is set to 0')
blade_processor_max_speed = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 4, 1, 11), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladeProcessorMaxSpeed.setStatus('current')
if mibBuilder.loadTexts:
bladeProcessorMaxSpeed.setDescription('SMBIOS value of the Maximum processor speed (in MHz) supported by the system for this processor socket. If the value is unknown, the field is set to 0. Note: This field identifies a capability for the system, not the processor itself.')
blade_processor_status = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 4, 1, 12), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladeProcessorStatus.setStatus('current')
if mibBuilder.loadTexts:
bladeProcessorStatus.setDescription('String representing SMBIOS data describing CPU status information')
blade_processor_upgrade = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 4, 1, 13), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladeProcessorUpgrade.setStatus('current')
if mibBuilder.loadTexts:
bladeProcessorUpgrade.setDescription("String representing SMBIOS data describing the CPU 'Upgrade' or how the processor is located on the blade")
blade_processor_serial_no = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 4, 1, 14), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladeProcessorSerialNo.setStatus('current')
if mibBuilder.loadTexts:
bladeProcessorSerialNo.setDescription('SMBIOS string of the serial number of this processor. This value is set by the manufactureer and normally not changeable.')
blade_processor_asset_tag = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 4, 1, 15), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladeProcessorAssetTag.setStatus('current')
if mibBuilder.loadTexts:
bladeProcessorAssetTag.setDescription('SMBIOS string of the asset tag of this processor.')
blade_processor_part_no = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 4, 1, 16), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladeProcessorPartNo.setStatus('current')
if mibBuilder.loadTexts:
bladeProcessorPartNo.setDescription('SMBIOS string of the part number of this processor. This value is set by the manufactureer and normally not changeable.')
blade_memory_summary_table = mib_table((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 5))
if mibBuilder.loadTexts:
bladeMemorySummaryTable.setStatus('current')
if mibBuilder.loadTexts:
bladeMemorySummaryTable.setDescription('Each row describes the overall summary of the memory configuration for a given blade in the chassis as described by the blades SMBIOS entries. For future compatibility, this table is sparsely populate based on the presence of the blade, and the availability of the SMBIOS from the blade (e.g., a blade may be present, but if it never has powered on, or there is a communications error to the BMC, it may not be displayed)')
blade_memory_summary_entry = mib_table_row((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 5, 1))
bladeEntry.registerAugmentions(('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeMemorySummaryEntry'))
bladeMemorySummaryEntry.setIndexNames(*bladeEntry.getIndexNames())
if mibBuilder.loadTexts:
bladeMemorySummaryEntry.setStatus('current')
if mibBuilder.loadTexts:
bladeMemorySummaryEntry.setDescription('Overall memory configuration summary per blade information')
blade_ms_max_devices = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 5, 1, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladeMSMaxDevices.setStatus('current')
if mibBuilder.loadTexts:
bladeMSMaxDevices.setDescription('The number of slots or sockets available for Memory Devices on the board.')
blade_ms_num_of_devices = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 5, 1, 2), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladeMSNumOfDevices.setStatus('current')
if mibBuilder.loadTexts:
bladeMSNumOfDevices.setDescription('The number of slots or sockets populated with Memory Devices on the board.')
blade_ms_capacity = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 5, 1, 3), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladeMSCapacity.setStatus('current')
if mibBuilder.loadTexts:
bladeMSCapacity.setDescription('The maximum memory capacity in MB for this array.')
blade_ms_total_size = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 5, 1, 4), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladeMSTotalSize.setStatus('current')
if mibBuilder.loadTexts:
bladeMSTotalSize.setDescription('Total size in MB of all memory physically installed')
blade_ms_effective_size = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 5, 1, 5), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladeMSEffectiveSize.setStatus('current')
if mibBuilder.loadTexts:
bladeMSEffectiveSize.setDescription('Memory available after deducting for failed and redundant memory units')
blade_ms_num_failed = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 5, 1, 6), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladeMSNumFailed.setStatus('current')
if mibBuilder.loadTexts:
bladeMSNumFailed.setDescription('Total Number of failed memory devices')
blade_ms_disabled_size = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 5, 1, 7), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladeMSDisabledSize.setStatus('current')
if mibBuilder.loadTexts:
bladeMSDisabledSize.setDescription('Total size in MB of all disabled memory')
blade_ms_spare_size = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 5, 1, 8), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladeMSSpareSize.setStatus('current')
if mibBuilder.loadTexts:
bladeMSSpareSize.setDescription('Total size in MB of all spare memory (see bladeMSRasPossible & bladeMSRasConfiguration columns)')
blade_ms_ras_possible = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 5, 1, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2, 3))).clone(namedValues=named_values(('notSupported', 0), ('supportsMirroring', 1), ('supportsSparing', 2), ('supportsBoth', 3)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladeMSRasPossible.setStatus('current')
if mibBuilder.loadTexts:
bladeMSRasPossible.setDescription('RAS Configuration Possible')
blade_ms_ras_configuration = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 5, 1, 10), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 1, 2))).clone(namedValues=named_values(('none', 0), ('mirroring', 1), ('sparing', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladeMSRasConfiguration.setStatus('current')
if mibBuilder.loadTexts:
bladeMSRasConfiguration.setDescription('RAS Configuration Possible')
blade_ms_error_correction = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 5, 1, 11), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=named_values(('other', 1), ('unknown', 2), ('none', 3), ('parity', 4), ('singleBitEcc', 5), ('multiBitEcc', 6), ('crc', 7)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladeMSErrorCorrection.setStatus('current')
if mibBuilder.loadTexts:
bladeMSErrorCorrection.setDescription('The primary hardware error correction or detection method supported')
blade_memory_table = mib_table((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 6))
if mibBuilder.loadTexts:
bladeMemoryTable.setStatus('current')
if mibBuilder.loadTexts:
bladeMemoryTable.setDescription('Each row describes an individual memory device for system memory given a specific blade in the chassis as described by the blades SMBIOS entries. For future compatibility, this table is sparsely populate based on the presence of the blade, and the availability of the SMBIOS from the blade (e.g., a blade may be present, but if it never has powered on, or there is a communications error to the BMC, it may not be displayed)')
blade_memory_entry = mib_table_row((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 6, 1)).setIndexNames((0, 'INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeSlotId'), (0, 'INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'handle'))
if mibBuilder.loadTexts:
bladeMemoryEntry.setStatus('current')
if mibBuilder.loadTexts:
bladeMemoryEntry.setDescription('Overall memory device per blade information')
blade_mem_total_width = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 6, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(-1))).clone(namedValues=named_values(('unknown', -1)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladeMemTotalWidth.setStatus('current')
if mibBuilder.loadTexts:
bladeMemTotalWidth.setDescription('The total width, in bits, of this memory device, including any check or error-correction bits. If there are no error-correction bits, this value should be equal to bladeMemDataWidth. If the width is unknown, the field is set to -1.')
blade_mem_data_width = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 6, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(-1))).clone(namedValues=named_values(('unknown', -1)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladeMemDataWidth.setStatus('current')
if mibBuilder.loadTexts:
bladeMemDataWidth.setDescription('The data width, in bits, of this memory device. If 0 and bladeMemTotalWidth is 8 indicates that the device is being used solely to provide 8 error-correction bits. If the width is unknown, the field is set to -1.')
blade_mem_size = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 6, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(-1, 0))).clone(namedValues=named_values(('unknown', -1), ('notInstalled', 0)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladeMemSize.setStatus('current')
if mibBuilder.loadTexts:
bladeMemSize.setDescription("The size of the memory device. If the value is 0, no memory device is installed in the socket (shouldn't occur as the table is sparsely populated); if the size is unknown, the field value is -1.")
blade_mem_granularity = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 6, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(-1, 0, 1))).clone(namedValues=named_values(('unknown', -1), ('megabytes', 0), ('kilobytes', 1)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladeMemGranularity.setStatus('current')
if mibBuilder.loadTexts:
bladeMemGranularity.setDescription('The granularity of the bladeMemSize')
blade_mem_form_factor = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 6, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15))).clone(namedValues=named_values(('other', 1), ('unknown', 2), ('simm', 3), ('sip', 4), ('chip', 5), ('dip', 6), ('zip', 7), ('proprietaryCard', 8), ('dimm', 9), ('tsop', 10), ('rowOfChips', 11), ('rimm', 12), ('sodimm', 13), ('srimm', 14), ('fbdimm', 15)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladeMemFormFactor.setStatus('current')
if mibBuilder.loadTexts:
bladeMemFormFactor.setDescription('The implementation form factor for this memory device.')
blade_mem_device_set = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 6, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(-1, 0))).clone(namedValues=named_values(('unknown', -1), ('noSet', 0)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladeMemDeviceSet.setStatus('current')
if mibBuilder.loadTexts:
bladeMemDeviceSet.setDescription('Identifies when the Memory Device is one of a set of Memory Devices that must be populated with all devices of the same type and size and the set to which this device belongs. A value of 0 indicates that the device is not part of a set; a value of -1 indicates that the attribute is unknown.')
blade_mem_location = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 6, 1, 7), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladeMemLocation.setStatus('current')
if mibBuilder.loadTexts:
bladeMemLocation.setDescription('String that identifies the physically labeled socket or board position where the memory device is located')
blade_mem_bank = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 6, 1, 8), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladeMemBank.setStatus('current')
if mibBuilder.loadTexts:
bladeMemBank.setDescription('String that identifies the physically labeled bank where where the memory device is located')
blade_mem_type = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 6, 1, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20))).clone(namedValues=named_values(('other', 1), ('unknown', 2), ('dram', 3), ('edram', 4), ('vram', 5), ('sram', 6), ('ram', 7), ('rom', 8), ('flash', 9), ('eeprom', 10), ('feprom', 11), ('eprom', 12), ('cdram', 13), ('dram3', 14), ('sdram', 15), ('sgram', 16), ('rdram', 17), ('ddr', 18), ('ddr2', 19), ('ddr2fbdimm', 20)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladeMemType.setStatus('current')
if mibBuilder.loadTexts:
bladeMemType.setDescription('The type of memory used in this device')
blade_mem_type_detail = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 6, 1, 10), bits().clone(namedValues=named_values(('reserved', 0), ('other', 1), ('unknown', 2), ('fastPaged', 3), ('staticColumn', 4), ('pseudoStatic', 5), ('rambus', 6), ('synchronous', 7), ('cmos', 8), ('edo', 9), ('windowDram', 10), ('cacheDram', 11), ('nonVolatile', 12)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladeMemTypeDetail.setStatus('current')
if mibBuilder.loadTexts:
bladeMemTypeDetail.setDescription('The type of memory used in this device')
blade_mem_speed = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 6, 1, 11), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0))).clone(namedValues=named_values(('unknown', 0)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladeMemSpeed.setStatus('current')
if mibBuilder.loadTexts:
bladeMemSpeed.setDescription('Identifies the speed of the device in megahertz (MHz).')
blade_mem_manufacturer = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 6, 1, 12), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladeMemManufacturer.setStatus('current')
if mibBuilder.loadTexts:
bladeMemManufacturer.setDescription('Manufacturer of this memory device')
blade_mem_serial_no = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 6, 1, 13), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladeMemSerialNo.setStatus('current')
if mibBuilder.loadTexts:
bladeMemSerialNo.setDescription('Serial Number of this memory device')
blade_mem_asset_tag = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 6, 1, 14), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladeMemAssetTag.setStatus('current')
if mibBuilder.loadTexts:
bladeMemAssetTag.setDescription('Asset Tag of this memory device')
blade_mem_part = mib_table_column((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 10, 202, 6, 1, 15), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
bladeMemPart.setStatus('current')
if mibBuilder.loadTexts:
bladeMemPart.setDescription('Part Number of this memory device')
blade_group = object_group((1, 3, 6, 1, 4, 1, 343, 2, 19, 1, 2, 2, 2, 12)).setObjects(('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'maxBlades'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'numOfBlades'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladePresenceMask'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeSlotId'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'maxFrus'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'numOfFrus'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladePresence'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladePowerLed'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeFaultLed'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladePresenceLed'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeFruPresenceMask'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeBmcFirmwareVersion'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeBootBlockVersion'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeBiosVersion'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeConsoleRedirection'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeLegacyOsRedirection'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeBootCount'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeFruType'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeFruPresence'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeFruVendor'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeFruMfgDate'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeFruDeviceName'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeFruPart'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeFruSerialNo'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeFruMaximumPower'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeFruNominalPower'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeFruAssetTag'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeNic'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeProcessorSocket'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeProcessorPresence'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeProcessorType'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeProcessorFamily'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeProcessorManufacturer'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeProcessorID'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeProcessorVersion'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeProcessorVoltage'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeProcessorExtClock'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeProcessorMaxSpeed'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeProcessorStatus'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeProcessorUpgrade'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeProcessorSerialNo'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeProcessorAssetTag'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeProcessorPartNo'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeMSMaxDevices'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeMSNumOfDevices'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeMSCapacity'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeMSErrorCorrection'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeMSTotalSize'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeMSNumFailed'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeMSDisabledSize'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeMSSpareSize'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeMSEffectiveSize'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeMSRasPossible'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeMSRasConfiguration'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeMemTotalWidth'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeMemDataWidth'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeMemSize'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeMemGranularity'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeMemFormFactor'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeMemDeviceSet'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeMemLocation'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeMemBank'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeMemType'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeMemTypeDetail'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeMemSpeed'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeMemManufacturer'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeMemSerialNo'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeMemAssetTag'), ('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', 'bladeMemPart'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
blade_group = bladeGroup.setStatus('current')
if mibBuilder.loadTexts:
bladeGroup.setDescription('Description.')
mibBuilder.exportSymbols('INTELCORPORATION-MULTI-FLEX-SERVER-BLADES-MIB', bladeFruType=bladeFruType, bladeBootBlockVersion=bladeBootBlockVersion, bladeMSCapacity=bladeMSCapacity, bladeLegacyOsRedirection=bladeLegacyOsRedirection, bladeMemoryEntry=bladeMemoryEntry, bladeMemTypeDetail=bladeMemTypeDetail, bladeSlotId=bladeSlotId, bladeProcessorSocket=bladeProcessorSocket, bladeMSMaxDevices=bladeMSMaxDevices, bladeTable=bladeTable, bladeFruSerialNo=bladeFruSerialNo, bladeGroup=bladeGroup, bladeMSErrorCorrection=bladeMSErrorCorrection, blades=blades, bladeBiosVersion=bladeBiosVersion, bladeFruNominalPower=bladeFruNominalPower, bladeProcessorStatus=bladeProcessorStatus, bladeFruPresence=bladeFruPresence, maxBlades=maxBlades, bladeProcessorTable=bladeProcessorTable, bladeProcessorID=bladeProcessorID, maxFrus=maxFrus, bladeMemDeviceSet=bladeMemDeviceSet, numOfFrus=numOfFrus, bladeFruMaximumPower=bladeFruMaximumPower, PYSNMP_MODULE_ID=multiFlexServerBladesMibModule, bladeMSSpareSize=bladeMSSpareSize, bladeFruTable=bladeFruTable, bladePresenceMask=bladePresenceMask, bladeProcessorVoltage=bladeProcessorVoltage, bladeMSNumOfDevices=bladeMSNumOfDevices, bladeFruAssetTag=bladeFruAssetTag, bladeMemSerialNo=bladeMemSerialNo, bladeProcessorManufacturer=bladeProcessorManufacturer, bladeMemorySummaryEntry=bladeMemorySummaryEntry, bladeNicTable=bladeNicTable, bladeMemoryTable=bladeMemoryTable, bladeMSDisabledSize=bladeMSDisabledSize, bladeProcessorEntry=bladeProcessorEntry, bladeProcessorExtClock=bladeProcessorExtClock, bladeMemBank=bladeMemBank, bladeBootCount=bladeBootCount, bladeMemManufacturer=bladeMemManufacturer, bladeProcessorFamily=bladeProcessorFamily, bladeProcessorUpgrade=bladeProcessorUpgrade, bladeNic=bladeNic, handle=handle, bladePowerLed=bladePowerLed, bladeFruMfgDate=bladeFruMfgDate, bladeMSRasPossible=bladeMSRasPossible, bladeMemGranularity=bladeMemGranularity, bladeMemSize=bladeMemSize, bladeConsoleRedirection=bladeConsoleRedirection, bladeFruEntry=bladeFruEntry, bladeMemDataWidth=bladeMemDataWidth, numOfBlades=numOfBlades, bladeNicEntry=bladeNicEntry, bladeMemAssetTag=bladeMemAssetTag, bladeProcessorType=bladeProcessorType, bladeProcessorAssetTag=bladeProcessorAssetTag, multiFlexServerBladesMibModule=multiFlexServerBladesMibModule, bladeMemFormFactor=bladeMemFormFactor, bladeBmcFirmwareVersion=bladeBmcFirmwareVersion, bladeFruPresenceMask=bladeFruPresenceMask, bladeProcessorPartNo=bladeProcessorPartNo, bladeProcessorMaxSpeed=bladeProcessorMaxSpeed, bladePresenceLed=bladePresenceLed, bladeMSEffectiveSize=bladeMSEffectiveSize, bladeMemTotalWidth=bladeMemTotalWidth, bladeProcessorVersion=bladeProcessorVersion, bladeEntry=bladeEntry, bladeMemLocation=bladeMemLocation, bladeMemPart=bladeMemPart, bladeProcessorPresence=bladeProcessorPresence, bladeMSTotalSize=bladeMSTotalSize, bladeMemType=bladeMemType, bladeFruVendor=bladeFruVendor, bladeFruDeviceName=bladeFruDeviceName, bladeMemorySummaryTable=bladeMemorySummaryTable, bladeProcessorSerialNo=bladeProcessorSerialNo, bladeMemSpeed=bladeMemSpeed, bladePresence=bladePresence, bladeFaultLed=bladeFaultLed, bladeFruPart=bladeFruPart, bladeMSNumFailed=bladeMSNumFailed, bladeMSRasConfiguration=bladeMSRasConfiguration) |
irint("Hello NYC")
print("Hello NYC")
print("Hello NYC")
print("Hello NYC")
print("Ola Mira")
print("Ola Mira")
print("Ola Mira")
print("Ola Mira")
print("Ola Mira")
print("Ola Mira")
print("Ola Mira")
print("Ola Mira")
| irint('Hello NYC')
print('Hello NYC')
print('Hello NYC')
print('Hello NYC')
print('Ola Mira')
print('Ola Mira')
print('Ola Mira')
print('Ola Mira')
print('Ola Mira')
print('Ola Mira')
print('Ola Mira')
print('Ola Mira') |
# for optimization
def binarySearch(arr, l, r, x):
while l <= r:
mid = l + (r - l)//2
if arr[mid] == x:
return mid
elif arr[mid] < x and arr[mid + 1] > x:
return mid
elif arr[mid] > x and arr[mid + 1] <= x:
return mid + 1
elif arr[mid] > x:
l = mid + 1
elif arr[mid] < x:
r = mid - 1
return -1
# Complete the climbingLeaderboard function below
def climbingLeaderboard(scores, alice):
tempScore = list(dict.fromkeys(scores))
output = []
length = len(tempScore)
for i in alice:
if(i >= tempScore[0]):
output.append(1)
elif(i < tempScore[length-1]):
output.append(length+1)
elif(i == tempScore[length-1]):
output.append(length)
else:
output.append(binarySearch(tempScore, 0, length-1, i) + 1)
return output
if __name__ == '__main__':
scores_count = int(input())
scores = list(map(int, input().rstrip().split()))
alice_count = int(input())
alice = list(map(int, input().rstrip().split()))
result = climbingLeaderboard(scores, alice)
print('\n'.join(map(str, result)))
| def binary_search(arr, l, r, x):
while l <= r:
mid = l + (r - l) // 2
if arr[mid] == x:
return mid
elif arr[mid] < x and arr[mid + 1] > x:
return mid
elif arr[mid] > x and arr[mid + 1] <= x:
return mid + 1
elif arr[mid] > x:
l = mid + 1
elif arr[mid] < x:
r = mid - 1
return -1
def climbing_leaderboard(scores, alice):
temp_score = list(dict.fromkeys(scores))
output = []
length = len(tempScore)
for i in alice:
if i >= tempScore[0]:
output.append(1)
elif i < tempScore[length - 1]:
output.append(length + 1)
elif i == tempScore[length - 1]:
output.append(length)
else:
output.append(binary_search(tempScore, 0, length - 1, i) + 1)
return output
if __name__ == '__main__':
scores_count = int(input())
scores = list(map(int, input().rstrip().split()))
alice_count = int(input())
alice = list(map(int, input().rstrip().split()))
result = climbing_leaderboard(scores, alice)
print('\n'.join(map(str, result))) |
def likes(names):
# your code here
textToReturn = ""
if (len(names) == 0):
textToReturn = "no one likes this"
elif (len(names) == 1):
textToReturn = str(names[0]) + " likes this"
elif (len(names) > 1 and len(names) < 4):
for name in range(0, len(names) - 1):
textToReturn = textToReturn + names[name] + ", "
textToReturn = textToReturn[:-2]
textToReturn = textToReturn + " and " + str(names[len(names) - 1]) + " like this"
else:
for name in range(0, 2):
textToReturn = textToReturn + names[name] + ", "
textToReturn = textToReturn[:-2]
textToReturn = textToReturn + " and " + str(len(names)-2) + " others like this"
return textToReturn
| def likes(names):
text_to_return = ''
if len(names) == 0:
text_to_return = 'no one likes this'
elif len(names) == 1:
text_to_return = str(names[0]) + ' likes this'
elif len(names) > 1 and len(names) < 4:
for name in range(0, len(names) - 1):
text_to_return = textToReturn + names[name] + ', '
text_to_return = textToReturn[:-2]
text_to_return = textToReturn + ' and ' + str(names[len(names) - 1]) + ' like this'
else:
for name in range(0, 2):
text_to_return = textToReturn + names[name] + ', '
text_to_return = textToReturn[:-2]
text_to_return = textToReturn + ' and ' + str(len(names) - 2) + ' others like this'
return textToReturn |
# Databricks notebook source
# MAGIC %run ./_utility-methods $lesson="6.3L"
# COMMAND ----------
DA.cleanup()
DA.init()
DA.paths.checkpoints = f"{DA.paths.working_dir}/_checkpoints"
DA.conclude_setup()
sqlContext.setConf("spark.sql.shuffle.partitions", spark.sparkContext.defaultParallelism)
| DA.cleanup()
DA.init()
DA.paths.checkpoints = f'{DA.paths.working_dir}/_checkpoints'
DA.conclude_setup()
sqlContext.setConf('spark.sql.shuffle.partitions', spark.sparkContext.defaultParallelism) |
class BaseData(object):
def __init__(self, unit):
self.unit = unit
def change_units(self, new_units):
self.unit = new_units | class Basedata(object):
def __init__(self, unit):
self.unit = unit
def change_units(self, new_units):
self.unit = new_units |
# User values
mock_user_id = 'u1'
mock_manager_id = 'ma1'
mock_member_id = 'me1'
# Project Values
mock_project_title = 'test project'
mock_project_description = 'this is a test project'
mock_project_tags = ['test', 'project']
# Bug Values
mock_bug_title = 'test bug'
mock_bug_description = 'this is a test bug'
mock_bug_tags = ['test', 'bug']
| mock_user_id = 'u1'
mock_manager_id = 'ma1'
mock_member_id = 'me1'
mock_project_title = 'test project'
mock_project_description = 'this is a test project'
mock_project_tags = ['test', 'project']
mock_bug_title = 'test bug'
mock_bug_description = 'this is a test bug'
mock_bug_tags = ['test', 'bug'] |
# ------------------------------------------------------------------
#
# Module for testing household structure
#
# ------------------------------------------------------------------
def print_houses_and_age(fname, agents):
''' Outputs house ID | age of every agent that lives there '''
# Dict with house ID vs. a list of agent ages
houses = {}
retirement_homes = {}
for agent in agents:
if agent['RetirementHome'] == True:
if str(agent['houseID']) in retirement_homes:
retirement_homes[str(agent['houseID'])].append(agent['yrs'])
else:
retirement_homes[str(agent['houseID'])] = []
retirement_homes[str(agent['houseID'])].append(agent['yrs'])
continue
if str(agent['houseID']) in houses:
houses[str(agent['houseID'])].append(agent['yrs'])
else:
houses[str(agent['houseID'])] = []
houses[str(agent['houseID'])].append(agent['yrs'])
# Save to file
with open(fname, 'w') as fout:
for key, value in retirement_homes.items():
fout.write(key + ' ' + (' ').join([str(x) for x in value]) + '\n')
for key, value in houses.items():
fout.write(key + ' ' + (' ').join([str(x) for x in value]) + '\n')
def print_houses_and_work_status(fname, fname_fam, agents):
''' Outputs house ID | and work flag of every
agent that lives there; includes the hospitals '''
# fname_fam is for separate file with families
# Dict with house ID vs. a list of agent ages
houses = {}
families = {}
retirement_homes = {}
for agent in agents:
works = agent['works'] or agent['worksHospital']
if agent['RetirementHome'] == True:
if str(agent['houseID']) in retirement_homes:
retirement_homes[str(agent['houseID'])].append(works)
else:
retirement_homes[str(agent['houseID'])] = []
retirement_homes[str(agent['houseID'])].append(works)
continue
if str(agent['houseID']) in houses:
houses[str(agent['houseID'])].append(works)
else:
houses[str(agent['houseID'])] = []
houses[str(agent['houseID'])].append(works)
if agent['isFamily'] == True:
if str(agent['houseID']) in families:
families[str(agent['houseID'])].append(works)
else:
families[str(agent['houseID'])] = []
families[str(agent['houseID'])].append(works)
# Save to file
with open(fname, 'w') as fout:
for key, value in retirement_homes.items():
fout.write(key + ' ' + (' ').join([str(x) for x in value]) + '\n')
for key, value in houses.items():
fout.write(key + ' ' + (' ').join([str(x) for x in value]) + '\n')
with open(fname_fam, 'w') as fout:
for key, value in families.items():
fout.write(key + ' ' + (' ').join([str(x) for x in value]) + '\n')
def print_houses_and_work_ID(fname, agents):
''' Outputs house ID | and work ID of every
agent that lives there; no work is marked as 0;
hospitals are marked by a negative value '''
# Dict with house ID vs. a list of agent ages
houses = {}
for agent in agents:
if agent['works']:
ID = agent['workID']
elif agent['worksHospital']:
ID = -1*agent['hospitalID']
else:
ID = 0
if str(agent['houseID']) in houses:
houses[str(agent['houseID'])].append(ID)
else:
houses[str(agent['houseID'])] = []
houses[str(agent['houseID'])].append(ID)
# Save to file
with open(fname, 'w') as fout:
for key, value in houses.items():
fout.write(key + ' ' + (' ').join([str(x) for x in value]) + '\n')
def print_houses_and_student_status(fname, agents):
''' Outputs house ID | and student flag of every
agent that lives there; includes the hospital '''
# Dict with house ID vs. a list of agent ages
houses = {}
retirement_homes = {}
for agent in agents:
if agent['RetirementHome'] == True:
if str(agent['houseID']) in retirement_homes:
retirement_homes[str(agent['houseID'])].append(agent['student'])
else:
retirement_homes[str(agent['houseID'])] = []
retirement_homes[str(agent['houseID'])].append(agent['student'])
continue
if str(agent['houseID']) in houses:
houses[str(agent['houseID'])].append(agent['student'])
else:
houses[str(agent['houseID'])] = []
houses[str(agent['houseID'])].append(agent['student'])
# Save to file
with open(fname, 'w') as fout:
for key, value in retirement_homes.items():
fout.write(key + ' ' + (' ').join([str(x) for x in value]) + '\n')
for key, value in houses.items():
fout.write(key + ' ' + (' ').join([str(x) for x in value]) + '\n')
| def print_houses_and_age(fname, agents):
""" Outputs house ID | age of every agent that lives there """
houses = {}
retirement_homes = {}
for agent in agents:
if agent['RetirementHome'] == True:
if str(agent['houseID']) in retirement_homes:
retirement_homes[str(agent['houseID'])].append(agent['yrs'])
else:
retirement_homes[str(agent['houseID'])] = []
retirement_homes[str(agent['houseID'])].append(agent['yrs'])
continue
if str(agent['houseID']) in houses:
houses[str(agent['houseID'])].append(agent['yrs'])
else:
houses[str(agent['houseID'])] = []
houses[str(agent['houseID'])].append(agent['yrs'])
with open(fname, 'w') as fout:
for (key, value) in retirement_homes.items():
fout.write(key + ' ' + ' '.join([str(x) for x in value]) + '\n')
for (key, value) in houses.items():
fout.write(key + ' ' + ' '.join([str(x) for x in value]) + '\n')
def print_houses_and_work_status(fname, fname_fam, agents):
""" Outputs house ID | and work flag of every
agent that lives there; includes the hospitals """
houses = {}
families = {}
retirement_homes = {}
for agent in agents:
works = agent['works'] or agent['worksHospital']
if agent['RetirementHome'] == True:
if str(agent['houseID']) in retirement_homes:
retirement_homes[str(agent['houseID'])].append(works)
else:
retirement_homes[str(agent['houseID'])] = []
retirement_homes[str(agent['houseID'])].append(works)
continue
if str(agent['houseID']) in houses:
houses[str(agent['houseID'])].append(works)
else:
houses[str(agent['houseID'])] = []
houses[str(agent['houseID'])].append(works)
if agent['isFamily'] == True:
if str(agent['houseID']) in families:
families[str(agent['houseID'])].append(works)
else:
families[str(agent['houseID'])] = []
families[str(agent['houseID'])].append(works)
with open(fname, 'w') as fout:
for (key, value) in retirement_homes.items():
fout.write(key + ' ' + ' '.join([str(x) for x in value]) + '\n')
for (key, value) in houses.items():
fout.write(key + ' ' + ' '.join([str(x) for x in value]) + '\n')
with open(fname_fam, 'w') as fout:
for (key, value) in families.items():
fout.write(key + ' ' + ' '.join([str(x) for x in value]) + '\n')
def print_houses_and_work_id(fname, agents):
""" Outputs house ID | and work ID of every
agent that lives there; no work is marked as 0;
hospitals are marked by a negative value """
houses = {}
for agent in agents:
if agent['works']:
id = agent['workID']
elif agent['worksHospital']:
id = -1 * agent['hospitalID']
else:
id = 0
if str(agent['houseID']) in houses:
houses[str(agent['houseID'])].append(ID)
else:
houses[str(agent['houseID'])] = []
houses[str(agent['houseID'])].append(ID)
with open(fname, 'w') as fout:
for (key, value) in houses.items():
fout.write(key + ' ' + ' '.join([str(x) for x in value]) + '\n')
def print_houses_and_student_status(fname, agents):
""" Outputs house ID | and student flag of every
agent that lives there; includes the hospital """
houses = {}
retirement_homes = {}
for agent in agents:
if agent['RetirementHome'] == True:
if str(agent['houseID']) in retirement_homes:
retirement_homes[str(agent['houseID'])].append(agent['student'])
else:
retirement_homes[str(agent['houseID'])] = []
retirement_homes[str(agent['houseID'])].append(agent['student'])
continue
if str(agent['houseID']) in houses:
houses[str(agent['houseID'])].append(agent['student'])
else:
houses[str(agent['houseID'])] = []
houses[str(agent['houseID'])].append(agent['student'])
with open(fname, 'w') as fout:
for (key, value) in retirement_homes.items():
fout.write(key + ' ' + ' '.join([str(x) for x in value]) + '\n')
for (key, value) in houses.items():
fout.write(key + ' ' + ' '.join([str(x) for x in value]) + '\n') |
text_file = open("test.txt", "w")
text_file.write("Monday\nTuesday\nWednesday\nThursday\nFriday\nSaturday\n")
text_file.close()
| text_file = open('test.txt', 'w')
text_file.write('Monday\nTuesday\nWednesday\nThursday\nFriday\nSaturday\n')
text_file.close() |
# Class ccontaining parsed input for a command
class CmdInfo:
def __init__(self, name, args, instream, outstream, background):
self.name = name
self. args = args
self.instream = instream
self.outstream = outstream
self.background = background
| class Cmdinfo:
def __init__(self, name, args, instream, outstream, background):
self.name = name
self.args = args
self.instream = instream
self.outstream = outstream
self.background = background |
class Config(object):
DEBUG = True
# Define the database
SQLALCHEMY_DATABASE_URI = '{}://{}:{}@{}'.format('mysql+pymysql', 'root', '1234',
'192.168.10.22:3306/boilerplate')
DATABASE_CONNECT_OPTIONS = {}
SQLALCHEMY_TRACK_MODIFICATIONS = False
SQLALCHEMY_ECHO = True
| class Config(object):
debug = True
sqlalchemy_database_uri = '{}://{}:{}@{}'.format('mysql+pymysql', 'root', '1234', '192.168.10.22:3306/boilerplate')
database_connect_options = {}
sqlalchemy_track_modifications = False
sqlalchemy_echo = True |
# You're on your way to the market when you hear beautiful music coming from a nearby street performer. The notes come together like you wouln't believe as the musician puts together patterns of tunes. As you wonder what kind of algorithm you could use to shift octaves by 8 pitches or something silly like that, it dawns on you that you have been watching the musician for some 10 odd minutes. You ask, "How much do people normally tip for something like this?" The artist looks up. "Its always gonna be about tree fiddy."
# It was then that you realize the musician was a 400 foot tall beast from the paleolithic era. The Loch Ness Monster almost tricked you!
# There are only 2 guaranteed ways to tell if you are speaking to The Loch Ness Monster: A.) It is a 400 foot tall beast from the paleolithic era B.) It will ask you for tree fiddy
# Since Nessie is a master of disguise, the only way accurately tell is to look for the phrase "tree fiddy". Since you are tired of being grifted by this monster, the time has come to code a solution for finding The Loch Ness Monster. Note: It can also be written as 3.50 or three fifty.
def is_lock_ness_monster(string):
if "tree fiddy" in string:
return True
if "three fifty" in string:
return True
if "3.50" in string:
return True
return False
# return any(phrase in string for phrase in ('tree fiddy', 'three fifty,
# 3.50'))
| def is_lock_ness_monster(string):
if 'tree fiddy' in string:
return True
if 'three fifty' in string:
return True
if '3.50' in string:
return True
return False |
# Automatically generated by pb2py
# fmt: off
UnexpectedMessage = 1
ButtonExpected = 2
DataError = 3
ActionCancelled = 4
PinExpected = 5
PinCancelled = 6
PinInvalid = 7
InvalidSignature = 8
ProcessError = 9
NotEnoughFunds = 10
NotInitialized = 11
PinMismatch = 12
FirmwareError = 99
| unexpected_message = 1
button_expected = 2
data_error = 3
action_cancelled = 4
pin_expected = 5
pin_cancelled = 6
pin_invalid = 7
invalid_signature = 8
process_error = 9
not_enough_funds = 10
not_initialized = 11
pin_mismatch = 12
firmware_error = 99 |
def compoundInterest(principle, time, rate):
print("Principle is : ",principle)
print("Time is : ",time)
print("Rate is : ",rate)
A=principle*pow((1+rate/100),time)
CI=A-principle
print("compound Interest is : ",CI)
compoundInterest(1200,2,5.4)
| def compound_interest(principle, time, rate):
print('Principle is : ', principle)
print('Time is : ', time)
print('Rate is : ', rate)
a = principle * pow(1 + rate / 100, time)
ci = A - principle
print('compound Interest is : ', CI)
compound_interest(1200, 2, 5.4) |
def slowest(orders):
brokers_second = []
for i in range(len(orders)):
b_second = [orders[i][0]]
if i == 0:
time = orders[i][1]
b_second.append(time)
else:
time = orders[i][1] - orders[i-1][1]
b_second.append(time)
brokers_second.append(b_second)
for j in range(len(brokers_second)-1):
for k in range(len(brokers_second)-j-1):
if brokers_second[k][1] > brokers_second[k+1][1]:
a = brokers_second[k]
brokers_second[k] = brokers_second[k + 1]
brokers_second[k + 1] = a
return brokers_second[-1][0]
slowest([[1, 2], [2, 5], [5, 10], [1, 17]]) | def slowest(orders):
brokers_second = []
for i in range(len(orders)):
b_second = [orders[i][0]]
if i == 0:
time = orders[i][1]
b_second.append(time)
else:
time = orders[i][1] - orders[i - 1][1]
b_second.append(time)
brokers_second.append(b_second)
for j in range(len(brokers_second) - 1):
for k in range(len(brokers_second) - j - 1):
if brokers_second[k][1] > brokers_second[k + 1][1]:
a = brokers_second[k]
brokers_second[k] = brokers_second[k + 1]
brokers_second[k + 1] = a
return brokers_second[-1][0]
slowest([[1, 2], [2, 5], [5, 10], [1, 17]]) |
class Solution:
def frogPosition(self, n: int, edges: List[List[int]], t: int, target: int) -> float:
d = {}
for i in edges:
head, tail = min(i[0],i[1]), max(i[0],i[1])
if head not in d:
d[head] = deque()
d[head].append(tail)
print(d)
return self.recur(target, 1, 1, d, t)[1]
def recur(self, target, current, probability, paths, t):
# print(current, t, probability)
if t<0:
return False, 0
if current==target:
if t==0: return True, probability
elif current in paths: return False, 0
else:
return True, probability
if current not in paths:
return False, 0
x = probability * (1/len(paths[current]))
for i in paths[current]:
check, prob = self.recur(target, i, x, paths, t-1)
# print(check, prob)
if check==True:
return True, prob
if current==target:
return True, x
return False, 0 | class Solution:
def frog_position(self, n: int, edges: List[List[int]], t: int, target: int) -> float:
d = {}
for i in edges:
(head, tail) = (min(i[0], i[1]), max(i[0], i[1]))
if head not in d:
d[head] = deque()
d[head].append(tail)
print(d)
return self.recur(target, 1, 1, d, t)[1]
def recur(self, target, current, probability, paths, t):
if t < 0:
return (False, 0)
if current == target:
if t == 0:
return (True, probability)
elif current in paths:
return (False, 0)
else:
return (True, probability)
if current not in paths:
return (False, 0)
x = probability * (1 / len(paths[current]))
for i in paths[current]:
(check, prob) = self.recur(target, i, x, paths, t - 1)
if check == True:
return (True, prob)
if current == target:
return (True, x)
return (False, 0) |
width = int(input())
while width % 2 == 0:
text = input()
totalDots = chr(46) * (width - len(text))
halfDots = int(width / 2)
halfLen = len(text) / 2
firstDots = chr(46) * (halfDots - int(halfLen))
secondDots = chr(46) * (halfDots - int(halfLen))
if text == "END":
break
elif len(text) % 2 != 0:
secondDots = chr(46) * (halfDots - int(halfLen) - 1)
print(firstDots+text+secondDots)
elif len(text) % 2 == 0:
print(firstDots+text+secondDots)
while width % 2 != 0:
text = input()
totalDots = chr(46) * (width - len(text))
halfDots = int(width / 2)
halfLen = len(text) / 2
firstDots = chr(46) * (halfDots - int(halfLen))
secondDots = chr(46) * (halfDots - int(halfLen))
if text == "END":
break
elif len(text) % 2 != 0:
print(firstDots+text+secondDots)
elif len(text) % 2 == 0:
firstDots = chr(46) * (halfDots - int(halfLen) + 1)
print(firstDots+text+secondDots)
| width = int(input())
while width % 2 == 0:
text = input()
total_dots = chr(46) * (width - len(text))
half_dots = int(width / 2)
half_len = len(text) / 2
first_dots = chr(46) * (halfDots - int(halfLen))
second_dots = chr(46) * (halfDots - int(halfLen))
if text == 'END':
break
elif len(text) % 2 != 0:
second_dots = chr(46) * (halfDots - int(halfLen) - 1)
print(firstDots + text + secondDots)
elif len(text) % 2 == 0:
print(firstDots + text + secondDots)
while width % 2 != 0:
text = input()
total_dots = chr(46) * (width - len(text))
half_dots = int(width / 2)
half_len = len(text) / 2
first_dots = chr(46) * (halfDots - int(halfLen))
second_dots = chr(46) * (halfDots - int(halfLen))
if text == 'END':
break
elif len(text) % 2 != 0:
print(firstDots + text + secondDots)
elif len(text) % 2 == 0:
first_dots = chr(46) * (halfDots - int(halfLen) + 1)
print(firstDots + text + secondDots) |
# By Kamran Bigdely Nov. 2020
# Move Field (attribute)
# Refactored.
class Gun:
def __init__(self, name):
self.name = name
self.num_cathridge_bullet = 0
def shoot(self):
if self.num_cathridge_bullet <= 0:
return False
print('shoot')
self.num_cathridge_bullet -= 1
return True
def reload(self):
print('reload')
def setCathridgeBullets(self, nBullets):
self.num_cathridge_bullet = nBullets
class Player:
def __init__(self, guns):
self.guns = guns
for i in range(len(guns)):
# initialize with 10 bullets in each gun's cathridge.
self.guns[i].setCathridgeBullets(10)
def fire_once(self):
for gun in self.guns:
if gun.shoot():
break
def game_loop():
while (True):
player.fire_once()
# other logic here.
break
guns = [Gun('pistol'), Gun('rifle')]
player = Player(guns)
game_loop()
| class Gun:
def __init__(self, name):
self.name = name
self.num_cathridge_bullet = 0
def shoot(self):
if self.num_cathridge_bullet <= 0:
return False
print('shoot')
self.num_cathridge_bullet -= 1
return True
def reload(self):
print('reload')
def set_cathridge_bullets(self, nBullets):
self.num_cathridge_bullet = nBullets
class Player:
def __init__(self, guns):
self.guns = guns
for i in range(len(guns)):
self.guns[i].setCathridgeBullets(10)
def fire_once(self):
for gun in self.guns:
if gun.shoot():
break
def game_loop():
while True:
player.fire_once()
break
guns = [gun('pistol'), gun('rifle')]
player = player(guns)
game_loop() |
class Solution:
def numDecodings(self, s: str) -> int:
values = dict()
def decode(s,values):
if s in values:
return values[s]
n = len(s)
if n==0:
ans = 1
values[s] = ans
return ans
x = int(s[0])
if n==1:
if x > 0:
ans = 1
else:
ans = 0
values[s] = ans
return ans
y = int(s[1])
if x == 1:
if y > 0:
ans = decode(s[1:],values) + decode(s[2:],values)
else:
ans = decode(s[2:],values)
elif x == 2:
if y==0:
ans = decode(s[2:],values)
if y<7:
ans = decode(s[1:],values) + decode(s[2:],values)
else:
ans = decode(s[1:],values)
elif x == 0:
ans = 0
else:
ans = decode(s[1:],values)
values[s] = ans
return ans
return decode(s,values)
| class Solution:
def num_decodings(self, s: str) -> int:
values = dict()
def decode(s, values):
if s in values:
return values[s]
n = len(s)
if n == 0:
ans = 1
values[s] = ans
return ans
x = int(s[0])
if n == 1:
if x > 0:
ans = 1
else:
ans = 0
values[s] = ans
return ans
y = int(s[1])
if x == 1:
if y > 0:
ans = decode(s[1:], values) + decode(s[2:], values)
else:
ans = decode(s[2:], values)
elif x == 2:
if y == 0:
ans = decode(s[2:], values)
if y < 7:
ans = decode(s[1:], values) + decode(s[2:], values)
else:
ans = decode(s[1:], values)
elif x == 0:
ans = 0
else:
ans = decode(s[1:], values)
values[s] = ans
return ans
return decode(s, values) |
_temperament_names = {
'SP': ['Artisan', 'Creator'],
'SJ': ['Guardian', 'Protector'],
'NF': ['Idealist', 'Visionary'],
'NT': ['Rational', 'Intellectual']
}
_personality_type_names = {
'SP': {
'ESFP': ['Performer', 'Entertainer', 'Performer'],
'ESTP': ['Promoter', 'Persuader', 'Doer'],
'ISFP': ['Composer', 'Artist', 'Artist'],
'ISTP': ['Crafter', 'Craftsman', 'Mechanic']
},
'SJ': {
'ESFJ': ['Provider', 'Supporter', 'Caregiver'],
'ESTJ': ['Supervisor', 'Overseer', 'Guardian'],
'ISFJ': ['Protector', 'Defender', 'Nurturer'],
'ISTJ': ['Inspector', 'Examiner', 'Duty Fulfiller']
},
'NF': {
'ENFP': ['Champion', 'Advocate', 'Inspirer'],
'ENFJ': ['Teacher', 'Mentor', 'Giver'],
'INFP': ['Healer', 'Dreamer', 'Idealist'],
'INFJ': ['Counselor', 'Confidant', 'Protector']
},
'NT': {
'ENTP': ['Inventor', 'Originator', 'Visionary'],
'ENTJ': ['Fieldmarshal', 'Chief', 'Executive'],
'INTP': ['Architect', 'Engineer', 'Thinker'],
'INTJ': ['Mastermind', 'Strategist', 'Scientist']
}
}
_preference_names = {
'E': ['Extraversion', 'Extravert', 'Extraverted'],
'I': ['Introversion', 'Introvert', 'Introverted'],
'S': ['Sensing', 'Sensor'],
'N': ['iNtuition', 'iNtuitor', 'iNtuitive'],
'F': ['Feeling', 'Feeler'],
'T': ['Thinking', 'Thinker'],
'P': ['Perceiving', 'Perceiver'],
'J': ['Judging', 'Judger']
}
_cognitive_function_names = {
'Se': 'Extraverted Sensing',
'Si': 'Introverted Sensing',
'Ne': 'Extraverted iNtuition',
'Ni': 'Introverted iNtuition',
'Fe': 'Extraverted Feeling',
'Fi': 'Introverted Feeling',
'Te': 'Extraverted Thinking',
'Ti': 'Introverted Thinking'
}
| _temperament_names = {'SP': ['Artisan', 'Creator'], 'SJ': ['Guardian', 'Protector'], 'NF': ['Idealist', 'Visionary'], 'NT': ['Rational', 'Intellectual']}
_personality_type_names = {'SP': {'ESFP': ['Performer', 'Entertainer', 'Performer'], 'ESTP': ['Promoter', 'Persuader', 'Doer'], 'ISFP': ['Composer', 'Artist', 'Artist'], 'ISTP': ['Crafter', 'Craftsman', 'Mechanic']}, 'SJ': {'ESFJ': ['Provider', 'Supporter', 'Caregiver'], 'ESTJ': ['Supervisor', 'Overseer', 'Guardian'], 'ISFJ': ['Protector', 'Defender', 'Nurturer'], 'ISTJ': ['Inspector', 'Examiner', 'Duty Fulfiller']}, 'NF': {'ENFP': ['Champion', 'Advocate', 'Inspirer'], 'ENFJ': ['Teacher', 'Mentor', 'Giver'], 'INFP': ['Healer', 'Dreamer', 'Idealist'], 'INFJ': ['Counselor', 'Confidant', 'Protector']}, 'NT': {'ENTP': ['Inventor', 'Originator', 'Visionary'], 'ENTJ': ['Fieldmarshal', 'Chief', 'Executive'], 'INTP': ['Architect', 'Engineer', 'Thinker'], 'INTJ': ['Mastermind', 'Strategist', 'Scientist']}}
_preference_names = {'E': ['Extraversion', 'Extravert', 'Extraverted'], 'I': ['Introversion', 'Introvert', 'Introverted'], 'S': ['Sensing', 'Sensor'], 'N': ['iNtuition', 'iNtuitor', 'iNtuitive'], 'F': ['Feeling', 'Feeler'], 'T': ['Thinking', 'Thinker'], 'P': ['Perceiving', 'Perceiver'], 'J': ['Judging', 'Judger']}
_cognitive_function_names = {'Se': 'Extraverted Sensing', 'Si': 'Introverted Sensing', 'Ne': 'Extraverted iNtuition', 'Ni': 'Introverted iNtuition', 'Fe': 'Extraverted Feeling', 'Fi': 'Introverted Feeling', 'Te': 'Extraverted Thinking', 'Ti': 'Introverted Thinking'} |
df = WyomingUpperAir.request_data(datetime(2017, 9, 10, 0), 'KEY')
p = df['pressure'].values * units(df.units['pressure'])
T = df['temperature'].values * units(df.units['temperature'])
Td = df['dewpoint'].values * units(df.units['dewpoint'])
u = df['u_wind'].values * units(df.units['u_wind'])
v = df['v_wind'].values * units(df.units['v_wind']) | df = WyomingUpperAir.request_data(datetime(2017, 9, 10, 0), 'KEY')
p = df['pressure'].values * units(df.units['pressure'])
t = df['temperature'].values * units(df.units['temperature'])
td = df['dewpoint'].values * units(df.units['dewpoint'])
u = df['u_wind'].values * units(df.units['u_wind'])
v = df['v_wind'].values * units(df.units['v_wind']) |
# -*-coding:utf-8 -*-
#
# Copyright (C) 2012-2015 Lianbi TECH Co., Ltd. All rights reserved.
# Created on 2015-03-09, by $USER
#
#
__author__ = 'Danny'
| __author__ = 'Danny' |
#!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
class McrouterGlobals:
@staticmethod
def binPath(name):
bins = {
'mcrouter': './mcrouter/mcrouter',
'mcpiper': './mcrouter/tools/mcpiper/mcpiper',
'mockmc': './mcrouter/lib/network/test/mock_mc_server',
'prodmc': './mcrouter/lib/network/test/mock_mc_server',
}
return bins[name]
@staticmethod
def preprocessArgs(args):
return args
| class Mcrouterglobals:
@staticmethod
def bin_path(name):
bins = {'mcrouter': './mcrouter/mcrouter', 'mcpiper': './mcrouter/tools/mcpiper/mcpiper', 'mockmc': './mcrouter/lib/network/test/mock_mc_server', 'prodmc': './mcrouter/lib/network/test/mock_mc_server'}
return bins[name]
@staticmethod
def preprocess_args(args):
return args |
n=str(input('Digite um nome: '))
if (n.upper().find('SILVA') != (-1)):
print('True')
else:
print('False') | n = str(input('Digite um nome: '))
if n.upper().find('SILVA') != -1:
print('True')
else:
print('False') |
exam_st_date = (11, 12, 2014)
day = exam_st_date[0]
month = exam_st_date[1]
year = exam_st_date[2]
print("The examination will start from:",day, "/",month,"/",year) | exam_st_date = (11, 12, 2014)
day = exam_st_date[0]
month = exam_st_date[1]
year = exam_st_date[2]
print('The examination will start from:', day, '/', month, '/', year) |
class A:
def a(self):
return 'b'
try:
object
except NameError:
pass
else:
class B(A, object):
def b(self):
return 'c'
class Inherit(A):
def a(self):
return 'd'
| class A:
def a(self):
return 'b'
try:
object
except NameError:
pass
else:
class B(A, object):
def b(self):
return 'c'
class Inherit(A):
def a(self):
return 'd' |
num_1 = 10
num_2 = 10
test1= "mauricio"
test2="maurici"
mayor = num_1 > num_2
menor = num_1 < num_2
mayor_igual = num_1 >= num_2
menor_igual = num_1 <= num_2
igual = num_1 == num_2
# para validar que dos valores son iguales puedes utiliza == o is -> funciona con strings? si
igual_is = test1 is test2
diferente = num_1 != num_2
print(mayor)
print(menor)
print(mayor_igual)
print(menor_igual)
print(igual)
print(igual_is)
print(diferente)
# Todas las condiciones se deben cumplir
resultado = True and True and diferente
print("////////////////////")
print(resultado)
print("////////////////////")
# Al menos una condicion se debe cumplir
resultado2 = True or True or igual
print(resultado2)
print("////////////////////")
# Not para negar la condicion o valor. not False = True --- not True = False
resultado3 = not False
print (resultado3) | num_1 = 10
num_2 = 10
test1 = 'mauricio'
test2 = 'maurici'
mayor = num_1 > num_2
menor = num_1 < num_2
mayor_igual = num_1 >= num_2
menor_igual = num_1 <= num_2
igual = num_1 == num_2
igual_is = test1 is test2
diferente = num_1 != num_2
print(mayor)
print(menor)
print(mayor_igual)
print(menor_igual)
print(igual)
print(igual_is)
print(diferente)
resultado = True and True and diferente
print('////////////////////')
print(resultado)
print('////////////////////')
resultado2 = True or True or igual
print(resultado2)
print('////////////////////')
resultado3 = not False
print(resultado3) |
#sd.baseline = [ring_curr, gcpress,
#epu1.gap, epu1.phase,
#feslt.hc, feslt.vc, feslt.hg, feslt.vg,
#m1.x, m1.pit, m1.rol,
#pgm.cff, pgm.en, pgm.grx, pgm.m2pit, pgm.grpit, pgm.grlines,
#m3slt.hs, m3slt.ha, m3slt.vs, m3slt.va,
#m3diag,
#m3.x, m3.y, m3.z, m3.yaw, m3.pit, m3.rol,
#extslt.hg, extslt.vg, extslt.hc,
#gcdiag,
#m4_diag1,
#m4slt.inb, m4slt.out, m4slt.bot, m4slt.top,
#m4.x, m4.y, m4.z, m4.yaw, m4.pit, m4.rol,
#cryo.x, cryo.y, cryo.z, cryo.t,
#ow,
#m5.x, m5.y, m5.z, m5.yaw, m5.pit, m5.rol,
#m5mask, m6_msk,
#m6.pit, m6.z,
#espgm.cff, espgm.en, espgm.m7pit, espgm.grpit, espgm.grxrb, espgmmask, #espgm.grx,
#oc.y, oc.z, oc.roll, oc.twoth,
#dcslt.inb,dcslt.out,dcslt.bot,dcslt.top,
#dc.z, dc.twoth]
sd.baseline = [ring_curr, gcpress, # voltage_dc, current_rbk,
epu1,
feslt,
m1,
pgm,
m3slt,
m3diag,
m3,
extslt,
gcdiag,
m4_diag1,
m4slt,
m4,
cryo,
stemp, #this just puts in the setpoint readback
ow,
m5,
m5mask, m6_msk,
m6,
espgm.m7pit, espgm.grpit, espgm.grxrb, espgmmask, #espgm.grx, espgm.cff, espgm.en
oc,
dcslt,
dc]
# To avoid baseline are printed on screen:
# bec.disable_baseline()%
| sd.baseline = [ring_curr, gcpress, epu1, feslt, m1, pgm, m3slt, m3diag, m3, extslt, gcdiag, m4_diag1, m4slt, m4, cryo, stemp, ow, m5, m5mask, m6_msk, m6, espgm.m7pit, espgm.grpit, espgm.grxrb, espgmmask, oc, dcslt, dc] |
def play():
print("****************************")
print("Welcome to the Hangaman Game")
print("****************************")
secret_word = "vitor"
hanged = False
hit = False
while (not hanged and not hit):
attempt = input("What's the letter? ")
attempt = attempt.strip()
word_index = 0
for word in secret_word:
if(attempt.upper() == word.upper()):
print("You found the letter(s) {} in the position {}".format(word, word_index))
word_index = word_index + 1
print("Game Over")
if (__name__ == "__main__"):
play() | def play():
print('****************************')
print('Welcome to the Hangaman Game')
print('****************************')
secret_word = 'vitor'
hanged = False
hit = False
while not hanged and (not hit):
attempt = input("What's the letter? ")
attempt = attempt.strip()
word_index = 0
for word in secret_word:
if attempt.upper() == word.upper():
print('You found the letter(s) {} in the position {}'.format(word, word_index))
word_index = word_index + 1
print('Game Over')
if __name__ == '__main__':
play() |
def some_other_function():
assert scope.get('foo') == 'bar'
# we can access the "current scope"
current_scope = scope.get_current_scope()
# and use it like a dict
assert current_scope['foo'] == 'bar'
def main():
# the my_scope variable is now defined
# inside a function scope, so it is not
# accessable outside of it, like in
# some other function
my_scope = scope.Scope()
my_scope['foo'] = 'bar'
with my_scope():
some_other_function()
main()
| def some_other_function():
assert scope.get('foo') == 'bar'
current_scope = scope.get_current_scope()
assert current_scope['foo'] == 'bar'
def main():
my_scope = scope.Scope()
my_scope['foo'] = 'bar'
with my_scope():
some_other_function()
main() |
n = int(input())
for i in range(n):
num = float(input())
contDias = 0
while(num / 2 > 1):
contDias = contDias + 1
num = num / 2
print("{} dias".format(contDias + 1)) | n = int(input())
for i in range(n):
num = float(input())
cont_dias = 0
while num / 2 > 1:
cont_dias = contDias + 1
num = num / 2
print('{} dias'.format(contDias + 1)) |
class Vrchol:
def __init__(self, px, py, psize, pid, pinfo = ''):
self.size = psize
self.x = px
self.y = py
self.info = pinfo
self.sus = []
self.farba = "#FFFFFF"
self.rozliaty = False
self.id = pid
def vykresli(self,cnv):
for i in range(len(self.sus)):
pos = self.sus[i].zisti_pos()
cnv.create_line(self.x,self.y,pos[0],pos[1])
cnv.create_oval(self.x - self.size, self.y - self.size, self.x + self.size, self.y + self.size, fill=self.farba)
cnv.create_text(self.x, self.y, text=self.info)
def pristahovat(self, psused):
self.sus.append(psused)
def odstahovat(self, psused):
index = -1
for i in range(len(self.sus)):
if self.sus[i] == psused:
index = i
if index == -1:
return false
else:
self.sus.pop(index)
return true
def zapis_info(self,pinfo):
self.info = pinfo
def zisti_info(self):
return self.info
def zisti_pos(self):
return [self.x,self.y]
def zisti_farbu(self):
return self.farba
def zapis_farbu(self,pfarba):
self.farba = pfarba
def zisti_susedov(self):
return self.sus
def zisti_id(self):
return self.id
def zafarbi(self,farba):
if not self.rozliaty:
self.rozliaty = True
self.farba = farba
#susedov zafarbi na rovnaku farbu
for i in range(len(self.sus)):
self.sus[i].zafarbi(farba)
def odrozliat(self):
self.rozliaty = False
| class Vrchol:
def __init__(self, px, py, psize, pid, pinfo=''):
self.size = psize
self.x = px
self.y = py
self.info = pinfo
self.sus = []
self.farba = '#FFFFFF'
self.rozliaty = False
self.id = pid
def vykresli(self, cnv):
for i in range(len(self.sus)):
pos = self.sus[i].zisti_pos()
cnv.create_line(self.x, self.y, pos[0], pos[1])
cnv.create_oval(self.x - self.size, self.y - self.size, self.x + self.size, self.y + self.size, fill=self.farba)
cnv.create_text(self.x, self.y, text=self.info)
def pristahovat(self, psused):
self.sus.append(psused)
def odstahovat(self, psused):
index = -1
for i in range(len(self.sus)):
if self.sus[i] == psused:
index = i
if index == -1:
return false
else:
self.sus.pop(index)
return true
def zapis_info(self, pinfo):
self.info = pinfo
def zisti_info(self):
return self.info
def zisti_pos(self):
return [self.x, self.y]
def zisti_farbu(self):
return self.farba
def zapis_farbu(self, pfarba):
self.farba = pfarba
def zisti_susedov(self):
return self.sus
def zisti_id(self):
return self.id
def zafarbi(self, farba):
if not self.rozliaty:
self.rozliaty = True
self.farba = farba
for i in range(len(self.sus)):
self.sus[i].zafarbi(farba)
def odrozliat(self):
self.rozliaty = False |
my_dict = {'a':[0, 1, 2, 3], 'b':[0, 1, 2, 3], 'c':[0, 1, 2, 3], 'd':[0, 1, 2, 3]}
i = 0
output = []
for key in my_dict:
output.append(my_dict[key][i])
i += 1
print(output) | my_dict = {'a': [0, 1, 2, 3], 'b': [0, 1, 2, 3], 'c': [0, 1, 2, 3], 'd': [0, 1, 2, 3]}
i = 0
output = []
for key in my_dict:
output.append(my_dict[key][i])
i += 1
print(output) |
while(True):
s0,s1, r0,r1 = map(int,input().split())
if not(s0):
exit()
S0,S1=min(s0,s1),max(s0,s1)
R0,R1=min(r0,r1),max(r0,r1)
if S0+S1==3 and R0+R1==3:
print("Tie.")
elif S0+S1==3:
print("Player 1 wins.")
elif R0+R1==3:
print("Player 2 wins.")
elif S0==S1 and R0==R1:
if S0>R0:
print("Player 1 wins.")
elif R0>S0:
print("Player 2 wins.")
else:
print("Tie.")
elif S0==S1:
print("Player 1 wins.")
elif R0==R1:
print("Player 2 wins.")
elif S1>R1:
print("Player 1 wins.")
elif S1<R1:
print("Player 2 wins.")
elif S1==R1:
if S0>R0:
print("Player 1 wins.")
elif S0<R0:
print("Player 2 wins.")
else:
print("Tie.") | while True:
(s0, s1, r0, r1) = map(int, input().split())
if not s0:
exit()
(s0, s1) = (min(s0, s1), max(s0, s1))
(r0, r1) = (min(r0, r1), max(r0, r1))
if S0 + S1 == 3 and R0 + R1 == 3:
print('Tie.')
elif S0 + S1 == 3:
print('Player 1 wins.')
elif R0 + R1 == 3:
print('Player 2 wins.')
elif S0 == S1 and R0 == R1:
if S0 > R0:
print('Player 1 wins.')
elif R0 > S0:
print('Player 2 wins.')
else:
print('Tie.')
elif S0 == S1:
print('Player 1 wins.')
elif R0 == R1:
print('Player 2 wins.')
elif S1 > R1:
print('Player 1 wins.')
elif S1 < R1:
print('Player 2 wins.')
elif S1 == R1:
if S0 > R0:
print('Player 1 wins.')
elif S0 < R0:
print('Player 2 wins.')
else:
print('Tie.') |
'''
Let's do some simple tasks for your homework. This week, we'll do some practice using what we learned about functions
and conditional blocks to make some useful, reusable code! First, let's start by writing a function called plus_five
which takes a number and prints out that number plus five.
'''
def plus_five(x):
return x + 5
'''
Once you've done that, call your function a few times and check your work. Calling plus_five with an argument of 5,
for example, should print the number 10.
'''
'''
Now let's try something a little more complicated. Using what you learned about conditional statements, write a function
that takes two numbers and prints the larger number. We'll call this function "max". This should be a little bit harder.
Try using a conditional statement to decide which number to pick. You can compare the two numbers using ordinary mathematical
operators such as < (less than), > (greater than), == (equal) , >= (greater than or equal), <= (less than or equal), etc.
'''
def max(x, y):
if x < y:
return y
else:
return x
p = plus_five(3)
print(p)
v = max(3, 11)
print(v)
l = [1,2,3,4,5]
for x in l:
print(x)
d = {"movies": ["Avengers", "Harry Potter"], "books": ["Harry Potter", "Charlotte's Web"],
"sports": ["basketball", "tennis", "swimming"]}
for k, v in d.items():
print("My favorite {}: {}".format(k, v))
i = 0
while i < 10:
print(plus_five(i))
i = i + 1
| """
Let's do some simple tasks for your homework. This week, we'll do some practice using what we learned about functions
and conditional blocks to make some useful, reusable code! First, let's start by writing a function called plus_five
which takes a number and prints out that number plus five.
"""
def plus_five(x):
return x + 5
"\nOnce you've done that, call your function a few times and check your work. Calling plus_five with an argument of 5,\nfor example, should print the number 10.\n"
'\nNow let\'s try something a little more complicated. Using what you learned about conditional statements, write a function\nthat takes two numbers and prints the larger number. We\'ll call this function "max". This should be a little bit harder.\nTry using a conditional statement to decide which number to pick. You can compare the two numbers using ordinary mathematical\noperators such as < (less than), > (greater than), == (equal) , >= (greater than or equal), <= (less than or equal), etc.\n'
def max(x, y):
if x < y:
return y
else:
return x
p = plus_five(3)
print(p)
v = max(3, 11)
print(v)
l = [1, 2, 3, 4, 5]
for x in l:
print(x)
d = {'movies': ['Avengers', 'Harry Potter'], 'books': ['Harry Potter', "Charlotte's Web"], 'sports': ['basketball', 'tennis', 'swimming']}
for (k, v) in d.items():
print('My favorite {}: {}'.format(k, v))
i = 0
while i < 10:
print(plus_five(i))
i = i + 1 |
# pylint: skip-file
# flake8: noqa
class Repoquery(RepoqueryCLI):
''' Class to wrap the repoquery
'''
# pylint: disable=too-many-arguments
def __init__(self, name, query_type, show_duplicates,
match_version, verbose):
''' Constructor for YumList '''
super(Repoquery, self).__init__(None)
self.name = name
self.query_type = query_type
self.show_duplicates = show_duplicates
self.match_version = match_version
self.verbose = verbose
if self.match_version:
self.show_duplicates = True
self.query_format = "%{version}|%{release}|%{arch}|%{repo}|%{version}-%{release}"
def build_cmd(self):
''' build the repoquery cmd options '''
repo_cmd = []
repo_cmd.append("--pkgnarrow=" + self.query_type)
repo_cmd.append("--queryformat=" + self.query_format)
if self.show_duplicates:
repo_cmd.append('--show-duplicates')
repo_cmd.append(self.name)
return repo_cmd
@staticmethod
def process_versions(query_output):
''' format the package data into something that can be presented '''
version_dict = defaultdict(dict)
for version in query_output.split('\n'):
pkg_info = version.split("|")
pkg_version = {}
pkg_version['version'] = pkg_info[0]
pkg_version['release'] = pkg_info[1]
pkg_version['arch'] = pkg_info[2]
pkg_version['repo'] = pkg_info[3]
pkg_version['version_release'] = pkg_info[4]
version_dict[pkg_info[4]] = pkg_version
return version_dict
def format_versions(self, formatted_versions):
''' Gather and present the versions of each package '''
versions_dict = {}
versions_dict['available_versions_full'] = list(formatted_versions.keys())
# set the match version, if called
if self.match_version:
versions_dict['matched_versions_full'] = []
versions_dict['requested_match_version'] = self.match_version
versions_dict['matched_versions'] = []
# get the "full version (version - release)
versions_dict['available_versions_full'].sort(key=LooseVersion)
versions_dict['latest_full'] = versions_dict['available_versions_full'][-1]
# get the "short version (version)
versions_dict['available_versions'] = []
for version in versions_dict['available_versions_full']:
versions_dict['available_versions'].append(formatted_versions[version]['version'])
if self.match_version:
if version.startswith(self.match_version):
versions_dict['matched_versions_full'].append(version)
versions_dict['matched_versions'].append(formatted_versions[version]['version'])
versions_dict['available_versions'].sort(key=LooseVersion)
versions_dict['latest'] = versions_dict['available_versions'][-1]
# finish up the matched version
if self.match_version:
if versions_dict['matched_versions_full']:
versions_dict['matched_version_found'] = True
versions_dict['matched_versions'].sort(key=LooseVersion)
versions_dict['matched_version_latest'] = versions_dict['matched_versions'][-1]
versions_dict['matched_version_full_latest'] = versions_dict['matched_versions_full'][-1]
else:
versions_dict['matched_version_found'] = False
versions_dict['matched_versions'] = []
versions_dict['matched_version_latest'] = ""
versions_dict['matched_version_full_latest'] = ""
return versions_dict
def repoquery(self):
'''perform a repoquery '''
repoquery_cmd = self.build_cmd()
rval = self._repoquery_cmd(repoquery_cmd, True, 'raw')
# check to see if there are actual results
if rval['results']:
processed_versions = Repoquery.process_versions(rval['results'].strip())
formatted_versions = self.format_versions(processed_versions)
rval['package_found'] = True
rval['versions'] = formatted_versions
rval['package_name'] = self.name
if self.verbose:
rval['raw_versions'] = processed_versions
else:
del rval['results']
# No packages found
else:
rval['package_found'] = False
return rval
@staticmethod
def run_ansible(params, check_mode):
'''run the ansible idempotent code'''
repoquery = Repoquery(
params['name'],
params['query_type'],
params['show_duplicates'],
params['match_version'],
params['verbose'],
)
state = params['state']
if state == 'list':
results = repoquery.repoquery()
if results['returncode'] != 0:
return {'failed': True,
'msg': results}
return {'changed': False, 'results': results, 'state': 'list', 'check_mode': check_mode}
return {'failed': True,
'changed': False,
'msg': 'Unknown state passed. %s' % state,
'state': 'unknown'}
| class Repoquery(RepoqueryCLI):
""" Class to wrap the repoquery
"""
def __init__(self, name, query_type, show_duplicates, match_version, verbose):
""" Constructor for YumList """
super(Repoquery, self).__init__(None)
self.name = name
self.query_type = query_type
self.show_duplicates = show_duplicates
self.match_version = match_version
self.verbose = verbose
if self.match_version:
self.show_duplicates = True
self.query_format = '%{version}|%{release}|%{arch}|%{repo}|%{version}-%{release}'
def build_cmd(self):
""" build the repoquery cmd options """
repo_cmd = []
repo_cmd.append('--pkgnarrow=' + self.query_type)
repo_cmd.append('--queryformat=' + self.query_format)
if self.show_duplicates:
repo_cmd.append('--show-duplicates')
repo_cmd.append(self.name)
return repo_cmd
@staticmethod
def process_versions(query_output):
""" format the package data into something that can be presented """
version_dict = defaultdict(dict)
for version in query_output.split('\n'):
pkg_info = version.split('|')
pkg_version = {}
pkg_version['version'] = pkg_info[0]
pkg_version['release'] = pkg_info[1]
pkg_version['arch'] = pkg_info[2]
pkg_version['repo'] = pkg_info[3]
pkg_version['version_release'] = pkg_info[4]
version_dict[pkg_info[4]] = pkg_version
return version_dict
def format_versions(self, formatted_versions):
""" Gather and present the versions of each package """
versions_dict = {}
versions_dict['available_versions_full'] = list(formatted_versions.keys())
if self.match_version:
versions_dict['matched_versions_full'] = []
versions_dict['requested_match_version'] = self.match_version
versions_dict['matched_versions'] = []
versions_dict['available_versions_full'].sort(key=LooseVersion)
versions_dict['latest_full'] = versions_dict['available_versions_full'][-1]
versions_dict['available_versions'] = []
for version in versions_dict['available_versions_full']:
versions_dict['available_versions'].append(formatted_versions[version]['version'])
if self.match_version:
if version.startswith(self.match_version):
versions_dict['matched_versions_full'].append(version)
versions_dict['matched_versions'].append(formatted_versions[version]['version'])
versions_dict['available_versions'].sort(key=LooseVersion)
versions_dict['latest'] = versions_dict['available_versions'][-1]
if self.match_version:
if versions_dict['matched_versions_full']:
versions_dict['matched_version_found'] = True
versions_dict['matched_versions'].sort(key=LooseVersion)
versions_dict['matched_version_latest'] = versions_dict['matched_versions'][-1]
versions_dict['matched_version_full_latest'] = versions_dict['matched_versions_full'][-1]
else:
versions_dict['matched_version_found'] = False
versions_dict['matched_versions'] = []
versions_dict['matched_version_latest'] = ''
versions_dict['matched_version_full_latest'] = ''
return versions_dict
def repoquery(self):
"""perform a repoquery """
repoquery_cmd = self.build_cmd()
rval = self._repoquery_cmd(repoquery_cmd, True, 'raw')
if rval['results']:
processed_versions = Repoquery.process_versions(rval['results'].strip())
formatted_versions = self.format_versions(processed_versions)
rval['package_found'] = True
rval['versions'] = formatted_versions
rval['package_name'] = self.name
if self.verbose:
rval['raw_versions'] = processed_versions
else:
del rval['results']
else:
rval['package_found'] = False
return rval
@staticmethod
def run_ansible(params, check_mode):
"""run the ansible idempotent code"""
repoquery = repoquery(params['name'], params['query_type'], params['show_duplicates'], params['match_version'], params['verbose'])
state = params['state']
if state == 'list':
results = repoquery.repoquery()
if results['returncode'] != 0:
return {'failed': True, 'msg': results}
return {'changed': False, 'results': results, 'state': 'list', 'check_mode': check_mode}
return {'failed': True, 'changed': False, 'msg': 'Unknown state passed. %s' % state, 'state': 'unknown'} |
maximum = 20
count = maximum
found = False
while(not found):
for x in range(1,maximum+1):
if(count % x != 0):
break
if(x == maximum):
found = True
if(not found):
count += maximum
print(count)
| maximum = 20
count = maximum
found = False
while not found:
for x in range(1, maximum + 1):
if count % x != 0:
break
if x == maximum:
found = True
if not found:
count += maximum
print(count) |
load("//dependencies/navx/4_0_425:deps.bzl", "setup_navx_4_0_425_dependencies")
load("//dependencies/navx/4_0_435:deps.bzl", "setup_navx_4_0_435_dependencies")
load("//dependencies/navx/4_0_442:deps.bzl", "setup_navx_4_0_442_dependencies")
def setup_navx_dependencies(version):
if version == "4.0.425":
setup_navx_4_0_425_dependencies()
elif version == "4.0.435":
setup_navx_4_0_435_dependencies()
elif version == "4.0.442":
setup_navx_4_0_442_dependencies()
else:
fail("Unsupported version '{}'".format(version))
| load('//dependencies/navx/4_0_425:deps.bzl', 'setup_navx_4_0_425_dependencies')
load('//dependencies/navx/4_0_435:deps.bzl', 'setup_navx_4_0_435_dependencies')
load('//dependencies/navx/4_0_442:deps.bzl', 'setup_navx_4_0_442_dependencies')
def setup_navx_dependencies(version):
if version == '4.0.425':
setup_navx_4_0_425_dependencies()
elif version == '4.0.435':
setup_navx_4_0_435_dependencies()
elif version == '4.0.442':
setup_navx_4_0_442_dependencies()
else:
fail("Unsupported version '{}'".format(version)) |
class Solution:
def predictPartyVictory(self, senate: str) -> str:
qr = collections.deque()
qd = collections.deque()
for i, ch in enumerate(senate):
if ch == 'R':
qr.append(i)
else:
qd.append(i)
n = len(senate)
while qr and qd:
ri, di = qr.popleft(), qd.popleft()
if ri < di:
qr.append(ri + n)
else:
qd.append(di + n)
return "Radiant" if qr else "Dire"
| class Solution:
def predict_party_victory(self, senate: str) -> str:
qr = collections.deque()
qd = collections.deque()
for (i, ch) in enumerate(senate):
if ch == 'R':
qr.append(i)
else:
qd.append(i)
n = len(senate)
while qr and qd:
(ri, di) = (qr.popleft(), qd.popleft())
if ri < di:
qr.append(ri + n)
else:
qd.append(di + n)
return 'Radiant' if qr else 'Dire' |
meal_cost = float(input())
tip_percent = int(input())
tax_percent = int(input())
tip = meal_cost * tip_percent / 100
tax = meal_cost * tax_percent / 100
total = meal_cost + tip + tax
print(int(round(total)))
| meal_cost = float(input())
tip_percent = int(input())
tax_percent = int(input())
tip = meal_cost * tip_percent / 100
tax = meal_cost * tax_percent / 100
total = meal_cost + tip + tax
print(int(round(total))) |
{
"targets": [
{
"target_name": "wtf8",
"sources": [ "wtf8.cc" ],
"include_dirs" : [
"<!(node -e \"require('nan')\")"
]
}
]
} | {'targets': [{'target_name': 'wtf8', 'sources': ['wtf8.cc'], 'include_dirs': ['<!(node -e "require(\'nan\')")']}]} |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = 'Ian'
__create_date__ = '2015/1/8'
## opensubtitles
LANGUAGE_MATRIX = []
f = open('MainMenu.strings', 'r')
f.readline()
for l in f:
str = l.decode('utf-8').strip()
if not str.startswith("/*"):
LANGUAGE_MATRIX.append(str)
f.close()
fw = open('MainMenu_opt.strings', 'wb')
for str in LANGUAGE_MATRIX:
if str != '':
fw.write(str.encode("utf-8"))
else:
fw.write("\n")
fw.close() | __author__ = 'Ian'
__create_date__ = '2015/1/8'
language_matrix = []
f = open('MainMenu.strings', 'r')
f.readline()
for l in f:
str = l.decode('utf-8').strip()
if not str.startswith('/*'):
LANGUAGE_MATRIX.append(str)
f.close()
fw = open('MainMenu_opt.strings', 'wb')
for str in LANGUAGE_MATRIX:
if str != '':
fw.write(str.encode('utf-8'))
else:
fw.write('\n')
fw.close() |
line = input()
line_pal = line[::-1]
if line_pal == line:
print("Yes")
else:
print("No")
| line = input()
line_pal = line[::-1]
if line_pal == line:
print('Yes')
else:
print('No') |
class EndPoint:
def __init__(self, end_point_json):
self.id = end_point_json["_postman_id"]
self.name = end_point_json["name"]
self.authentication = end_point_json["request"].get("auth")
self.method = end_point_json["request"]["method"]
self.header = end_point_json["request"].get("header")
self.url = end_point_json["request"]["url"]["raw"]
self.query_parameters = end_point_json["request"]["url"].get("query")
def get_id(self):
return self.id
def get_name(self):
return self.name
def get_authentication(self):
return self.authentication
def get_method(self):
return self.method
def get_header(self):
return self.header
def get_url(self):
return self.url
def get_query_parameters(self):
return self.query_parameters
| class Endpoint:
def __init__(self, end_point_json):
self.id = end_point_json['_postman_id']
self.name = end_point_json['name']
self.authentication = end_point_json['request'].get('auth')
self.method = end_point_json['request']['method']
self.header = end_point_json['request'].get('header')
self.url = end_point_json['request']['url']['raw']
self.query_parameters = end_point_json['request']['url'].get('query')
def get_id(self):
return self.id
def get_name(self):
return self.name
def get_authentication(self):
return self.authentication
def get_method(self):
return self.method
def get_header(self):
return self.header
def get_url(self):
return self.url
def get_query_parameters(self):
return self.query_parameters |
#!/usr/bin/env qork
FONT = "./data/PressStart2P-Regular.ttf:64"
canvas.font(FONT)
def script(ctx):
canvas.text("Health: |||||", anchor="", align="l")
player = add("spirit.cson", scale=1 / 16)
player.state["stance"] = "walk"
player.rotate(0.125, X)
player.z = 1 / 16
camera.fov = 0.09
player.y = 2.5 / 16
camera.mode = "3D"
camera.y = -0.5
camera.z = 1
scale = 5
rocks = add("rocks.png", scale=scale)
rocks.fork(geometry=True)
rocks.material.filter(False)
rocks.material.repeat(True)
rocks.resources[0].scale_texture(8 * scale)
camera.rotate(0.1, X)
def make_cube(pos):
cube = add(Mesh.cube("box.png"))
cube.material.filter(False)
cube.scale(0.1)
cube.pos = vec3(pos[0], pos[1], 0.5 * 0.1)
return cube
for i in range(-10, 10):
for j in range(-10, 10):
if random.random() < 0.1:
make_cube((i / 10, j / 10))
for i in range(5):
for j in range(5):
tile = Canvas(res=(1, 1))
tile.clear("white")
player.dir = vec3(1, 0, 0)
def update(dt):
speed = 0.5
v = vec3(key(KEY.RIGHT) - key(KEY.LEFT), key(KEY.UP) - key(KEY.DOWN), 0)
v = glm.normalize(v)
if v.x > EPSILON:
player.state["direction"] = "right"
elif v.x < -EPSILON:
player.state["direction"] = "left"
player.state["stance"] = "walk" if glm.length(v) > EPSILON else "stand"
if key_pressed(KEY.SPACE):
bullet = add("spirit.png", pos=player.pos, scale=0.02, lifetime=1)
bullet.material.filter(False)
bullet.vel = copy(player.dir) * 2
if glm.length(player.vel) > EPSILON:
player.dir = glm.normalize(player.vel)
camera.vel = player.vel = v
# player.vel = v
# infinite rocks xy
rocks.xy = (player.pos.xy // 1).xy
# @overlap(player, 'box.png')
# def player_cube(player, cube, dt):
# pass
| font = './data/PressStart2P-Regular.ttf:64'
canvas.font(FONT)
def script(ctx):
canvas.text('Health: |||||', anchor='', align='l')
player = add('spirit.cson', scale=1 / 16)
player.state['stance'] = 'walk'
player.rotate(0.125, X)
player.z = 1 / 16
camera.fov = 0.09
player.y = 2.5 / 16
camera.mode = '3D'
camera.y = -0.5
camera.z = 1
scale = 5
rocks = add('rocks.png', scale=scale)
rocks.fork(geometry=True)
rocks.material.filter(False)
rocks.material.repeat(True)
rocks.resources[0].scale_texture(8 * scale)
camera.rotate(0.1, X)
def make_cube(pos):
cube = add(Mesh.cube('box.png'))
cube.material.filter(False)
cube.scale(0.1)
cube.pos = vec3(pos[0], pos[1], 0.5 * 0.1)
return cube
for i in range(-10, 10):
for j in range(-10, 10):
if random.random() < 0.1:
make_cube((i / 10, j / 10))
for i in range(5):
for j in range(5):
tile = canvas(res=(1, 1))
tile.clear('white')
player.dir = vec3(1, 0, 0)
def update(dt):
speed = 0.5
v = vec3(key(KEY.RIGHT) - key(KEY.LEFT), key(KEY.UP) - key(KEY.DOWN), 0)
v = glm.normalize(v)
if v.x > EPSILON:
player.state['direction'] = 'right'
elif v.x < -EPSILON:
player.state['direction'] = 'left'
player.state['stance'] = 'walk' if glm.length(v) > EPSILON else 'stand'
if key_pressed(KEY.SPACE):
bullet = add('spirit.png', pos=player.pos, scale=0.02, lifetime=1)
bullet.material.filter(False)
bullet.vel = copy(player.dir) * 2
if glm.length(player.vel) > EPSILON:
player.dir = glm.normalize(player.vel)
camera.vel = player.vel = v
rocks.xy = (player.pos.xy // 1).xy |
class Solution:
def check(self, i, haystack, needle):
for j in range(len(needle)):
if haystack[i] != needle[j]:
return False
i += 1
return True
def strStr(self, haystack: str, needle: str) -> int:
len_haystack = len(haystack)
len_needle = len(needle)
if len_needle == 0 or haystack == needle:
return 0
if len_haystack == 0 or len_haystack < len_needle:
return -1
target = -1
for i in range(len_haystack):
if haystack[i] == needle[0] and len_haystack - i >= len_needle:
if self.check(i, haystack, needle):
target = i;
break;
return target
| class Solution:
def check(self, i, haystack, needle):
for j in range(len(needle)):
if haystack[i] != needle[j]:
return False
i += 1
return True
def str_str(self, haystack: str, needle: str) -> int:
len_haystack = len(haystack)
len_needle = len(needle)
if len_needle == 0 or haystack == needle:
return 0
if len_haystack == 0 or len_haystack < len_needle:
return -1
target = -1
for i in range(len_haystack):
if haystack[i] == needle[0] and len_haystack - i >= len_needle:
if self.check(i, haystack, needle):
target = i
break
return target |
#42 Frequency to note
#Asking for frequency of note
x = float(input("Enter the frequency of note = "))
if x == 261.63:
print("The note of frequency is C4.")
elif x == 293.66:
print("The note of frequency is D4.")
elif x == 329.63:
print("the note of frequency is E4.")
elif x == 349.23:
print("The note of frequency is F4.")
elif x == 392.00:
print("The note of frequency is G4.")
elif x == 440.00:
print("The note of frequency is A4.")
elif x == 493.88:
print("The note of frequency is B4.")
| x = float(input('Enter the frequency of note = '))
if x == 261.63:
print('The note of frequency is C4.')
elif x == 293.66:
print('The note of frequency is D4.')
elif x == 329.63:
print('the note of frequency is E4.')
elif x == 349.23:
print('The note of frequency is F4.')
elif x == 392.0:
print('The note of frequency is G4.')
elif x == 440.0:
print('The note of frequency is A4.')
elif x == 493.88:
print('The note of frequency is B4.') |
print('curl localhost:10101/index/test/query -X POST -d \'')
for i in range(1,51):
for j in range(0,100):
print('Count(Row(c'+str(i)+'=a'+str(j)+'))')
print('\'')
| print("curl localhost:10101/index/test/query -X POST -d '")
for i in range(1, 51):
for j in range(0, 100):
print('Count(Row(c' + str(i) + '=a' + str(j) + '))')
print("'") |
def registerPredefined(modules_avail):
for m in ["modules", "events", "info", "settings"]:
module_name_id = 'miniflask.' + m
importname = 'miniflask.modules.' + m
modules_avail[module_name_id] = {
'id': module_name_id,
'importpath': "system",
'importname': importname,
'lowpriority': False
}
| def register_predefined(modules_avail):
for m in ['modules', 'events', 'info', 'settings']:
module_name_id = 'miniflask.' + m
importname = 'miniflask.modules.' + m
modules_avail[module_name_id] = {'id': module_name_id, 'importpath': 'system', 'importname': importname, 'lowpriority': False} |
h, w = [int(x) for x in input().split(' ')]
c = int(input())
h += (w + c) // 60
w = (w + c) % 60
h %= 24
print(h, w) | (h, w) = [int(x) for x in input().split(' ')]
c = int(input())
h += (w + c) // 60
w = (w + c) % 60
h %= 24
print(h, w) |
class Solution:
def maxProfit(self, prices):
if not prices:
return 0
ascents = []
lower = prices[0]
upper = prices[0]
res = 0
for i in prices:
if i > upper:
upper = i
elif i < upper:
ascents.append(upper-lower)
res += upper-lower
lower = i
upper = i
ascents.append(upper-lower)
res += upper-lower
# print("ascents", ascents)
return res
a = Solution()
print(a.maxProfit([7,6,4,3,1]))
| class Solution:
def max_profit(self, prices):
if not prices:
return 0
ascents = []
lower = prices[0]
upper = prices[0]
res = 0
for i in prices:
if i > upper:
upper = i
elif i < upper:
ascents.append(upper - lower)
res += upper - lower
lower = i
upper = i
ascents.append(upper - lower)
res += upper - lower
return res
a = solution()
print(a.maxProfit([7, 6, 4, 3, 1])) |
# Title : Count the number of element list of a list
# Author : Kiran raj R.
# Date : 25:10:2020
list1 = [[1, 2], 3, 4, [5, 6], 7, [8, 9, 10]]
list2 = [('a', 'b'), 'c', 'd', 'e', ['f', 'g', 'h']]
print(f"Number of elements in list1 {len(list1)}")
print(f"Number of elements in list2 {len(list2)}")
def list_in_list(list_name):
return(sum(type(elem) == type([]) for elem in list_name))
print(f"Number of list inside list1 {list_in_list(list1)}")
print(f"Number of list inside list2 {list_in_list(list2)}")
| list1 = [[1, 2], 3, 4, [5, 6], 7, [8, 9, 10]]
list2 = [('a', 'b'), 'c', 'd', 'e', ['f', 'g', 'h']]
print(f'Number of elements in list1 {len(list1)}')
print(f'Number of elements in list2 {len(list2)}')
def list_in_list(list_name):
return sum((type(elem) == type([]) for elem in list_name))
print(f'Number of list inside list1 {list_in_list(list1)}')
print(f'Number of list inside list2 {list_in_list(list2)}') |
# String replacement / substitution
welcome_message = 'Hello World!'
print(welcome_message.replace("Hello", "Goodbye"))
# Generating multiple strings
print('*' * 10)
print('Hi' * 10)
# Testing strings containing another string
print('Edward Alan Rawlings'.find('Alan'))
print('Edward John Rawlings'.find('Alan'))
print('James' == 'James') # prints True
print('James' == 'John') # prints False
print('James' != 'John') # prints True
print('James' == 'james') # prints False
# Various different string operations
some_string = 'Hello World'
print('Testing a String')
print('-' * 20)
print('some_string', some_string)
print("some_string.startswith('H')", some_string.startswith('H'))
print("some_string.startswith('h')", some_string.startswith('h'))
print("some_string.endswith('d')", some_string.endswith('d'))
print('some_string.istitle()', some_string.istitle())
print('some_string.isupper()', some_string.isupper())
print('some_string.islower()', some_string.islower())
print('some_string.isalpha()', some_string.isalpha())
# String conversions
print('String conversions')
print('-' * 20)
print('some_string.upper()', some_string.upper())
print('some_string.lower()', some_string.lower())
print('some_string.title()', some_string.title())
print('some_string.swapcase()', some_string.swapcase())
print('String leading, trailing spaces', " xyz ".strip())
# Adding a number to a string - need to use the str() function
msg = 'Hello Lloyd you are ' + str(21)
print(msg)
| welcome_message = 'Hello World!'
print(welcome_message.replace('Hello', 'Goodbye'))
print('*' * 10)
print('Hi' * 10)
print('Edward Alan Rawlings'.find('Alan'))
print('Edward John Rawlings'.find('Alan'))
print('James' == 'James')
print('James' == 'John')
print('James' != 'John')
print('James' == 'james')
some_string = 'Hello World'
print('Testing a String')
print('-' * 20)
print('some_string', some_string)
print("some_string.startswith('H')", some_string.startswith('H'))
print("some_string.startswith('h')", some_string.startswith('h'))
print("some_string.endswith('d')", some_string.endswith('d'))
print('some_string.istitle()', some_string.istitle())
print('some_string.isupper()', some_string.isupper())
print('some_string.islower()', some_string.islower())
print('some_string.isalpha()', some_string.isalpha())
print('String conversions')
print('-' * 20)
print('some_string.upper()', some_string.upper())
print('some_string.lower()', some_string.lower())
print('some_string.title()', some_string.title())
print('some_string.swapcase()', some_string.swapcase())
print('String leading, trailing spaces', ' xyz '.strip())
msg = 'Hello Lloyd you are ' + str(21)
print(msg) |
total = 0
for i in range(1,1000):
if i % 3 ==0 or i %5 ==0:
total += i
print(total)
| total = 0
for i in range(1, 1000):
if i % 3 == 0 or i % 5 == 0:
total += i
print(total) |
__version__ = "2.1.5"
default_app_config = "channels.apps.ChannelsConfig"
DEFAULT_CHANNEL_LAYER = "default"
| __version__ = '2.1.5'
default_app_config = 'channels.apps.ChannelsConfig'
default_channel_layer = 'default' |
#!/usr/bin/python
# -*- coding: utf-8 -*-
'''
@AUTHOR:Joselyn Zhao
@CONTACT:zhaojing17@foxmail.com
@HOME_PAGE:joselynzhao.top
@SOFTWERE:PyCharm
@FILE:lianbiao.py
@TIME:2020/5/12 20:53
@DES:
'''
class Node:
def __init__(self,data,pnext=None):
self.data = data
self._next=pnext
def __repr__(self):
return str(self.data)
| """
@AUTHOR:Joselyn Zhao
@CONTACT:zhaojing17@foxmail.com
@HOME_PAGE:joselynzhao.top
@SOFTWERE:PyCharm
@FILE:lianbiao.py
@TIME:2020/5/12 20:53
@DES:
"""
class Node:
def __init__(self, data, pnext=None):
self.data = data
self._next = pnext
def __repr__(self):
return str(self.data) |
# AUTOGENERATED BY NBDEV! DO NOT EDIT!
__all__ = ["index", "modules", "custom_doc_links", "git_url"]
index = {"names": "10_pref.ipynb",
"short_names": "10_pref.ipynb",
"df": "10_pref.ipynb",
"__code2name": "10_pref.ipynb",
"__name2code": "10_pref.ipynb",
"name2code": "10_pref.ipynb",
"code2name": "10_pref.ipynb"}
modules = ["prefecture.py"]
doc_url = "https://vochicong.github.io/jp_pref/"
git_url = "https://github.com/vochicong/jp_pref/tree/master/"
def custom_doc_links(name):
return None
| __all__ = ['index', 'modules', 'custom_doc_links', 'git_url']
index = {'names': '10_pref.ipynb', 'short_names': '10_pref.ipynb', 'df': '10_pref.ipynb', '__code2name': '10_pref.ipynb', '__name2code': '10_pref.ipynb', 'name2code': '10_pref.ipynb', 'code2name': '10_pref.ipynb'}
modules = ['prefecture.py']
doc_url = 'https://vochicong.github.io/jp_pref/'
git_url = 'https://github.com/vochicong/jp_pref/tree/master/'
def custom_doc_links(name):
return None |
# coding: utf-8
["DEFAULT"]
max_tempfile_number = 100
max_thread_num = 8
["account"]
username = ""
password = ""
["proxies"]
proxies_enable = False
socks = ""
["path"]
local_save_root = "./default_save/"
temp_save_root = "./temp_save/"
["data"]
garage_file = "./garage.txt"
cookies_file = "./cookies.txt"
["classification"]
pic_per_page_tag=40
pic_per_page_illustrator=48
pic_per_page_bookmark=20
pic_per_page_rank_global=100
pic_per_page_rank_daily=50
pic_per_page_rank_weekly=50
pic_per_page_rank_original=50
pic_per_page_rank_daily_r18=50
pic_per_page_rank_male_r18=50
pic_per_page_rank_weekly_r18=50
# normalRank = True
# r18Rank = False
# bookmark = False
# tag = False
# illustrator = False
# [("tag",page number), ...]
tag_list = []
# [("illustrator name", "illustrator id", page number), ...]
# "illustrator name" as "?" means find it on the website.
# page number as -1 means all pages of the illustrator
# "illustrator id" is essential
illustrator_list = []
# a page normally contains 20 pictures
bookmark_list = 0
pixiv_root="https://www.pixiv.net/"
# url_tag_template=pixiv_root+"search.php?word=%s&order=date_d&p=%d"
url_tag_template=pixiv_root+"tags/%s/artworks?p=%d"
url_artist_template=pixiv_root+"member_illust.php?id=%s&type=all&p=%d"
url_artist_all_template=pixiv_root+"ajax/user/%s/profile/all"
url_bookmark_template=pixiv_root+"bookmark_new_illust.php?p=%d"
# rank_global_list=1
url_rank_global_template=pixiv_root+"ranking_area.php?type=detail&no=6"
# rank_daily_list= page_number
url_rank_daily_template=pixiv_root+"ranking.php?mode=daily&p=%d"
url_rank_weekly_template=pixiv_root+"ranking.php?mode=weekly&p=%d"
url_rank_original_template=pixiv_root+"ranking.php?mode=original&p=%d"
url_rank_daily_r18_template=pixiv_root+"ranking.php?mode=daily_r18&p=%d"
url_rank_male_r18_template=pixiv_root+"ranking.php?mode=male_r18&p=%d"
url_rank_weekly_r18_template=pixiv_root+"ranking.php?mode=weekly_r18&p=%d"
["syn"]
syn_enable = False
RSAKey_file = ""
sftp_host = ""
sftp_port = 22
sftp_username = ""
sftp_remotedir = ""
["browser"]
phantomjs = ""
firefox=""
chrome=""
| ['DEFAULT']
max_tempfile_number = 100
max_thread_num = 8
['account']
username = ''
password = ''
['proxies']
proxies_enable = False
socks = ''
['path']
local_save_root = './default_save/'
temp_save_root = './temp_save/'
['data']
garage_file = './garage.txt'
cookies_file = './cookies.txt'
['classification']
pic_per_page_tag = 40
pic_per_page_illustrator = 48
pic_per_page_bookmark = 20
pic_per_page_rank_global = 100
pic_per_page_rank_daily = 50
pic_per_page_rank_weekly = 50
pic_per_page_rank_original = 50
pic_per_page_rank_daily_r18 = 50
pic_per_page_rank_male_r18 = 50
pic_per_page_rank_weekly_r18 = 50
tag_list = []
illustrator_list = []
bookmark_list = 0
pixiv_root = 'https://www.pixiv.net/'
url_tag_template = pixiv_root + 'tags/%s/artworks?p=%d'
url_artist_template = pixiv_root + 'member_illust.php?id=%s&type=all&p=%d'
url_artist_all_template = pixiv_root + 'ajax/user/%s/profile/all'
url_bookmark_template = pixiv_root + 'bookmark_new_illust.php?p=%d'
url_rank_global_template = pixiv_root + 'ranking_area.php?type=detail&no=6'
url_rank_daily_template = pixiv_root + 'ranking.php?mode=daily&p=%d'
url_rank_weekly_template = pixiv_root + 'ranking.php?mode=weekly&p=%d'
url_rank_original_template = pixiv_root + 'ranking.php?mode=original&p=%d'
url_rank_daily_r18_template = pixiv_root + 'ranking.php?mode=daily_r18&p=%d'
url_rank_male_r18_template = pixiv_root + 'ranking.php?mode=male_r18&p=%d'
url_rank_weekly_r18_template = pixiv_root + 'ranking.php?mode=weekly_r18&p=%d'
['syn']
syn_enable = False
rsa_key_file = ''
sftp_host = ''
sftp_port = 22
sftp_username = ''
sftp_remotedir = ''
['browser']
phantomjs = ''
firefox = ''
chrome = '' |
# encoding: utf-8
class Style(object):
def __init__(self, newline, indent):
self.newline = str(newline)
self.indent = str(indent)
class Pretty(Style):
def __init__(self):
super(Pretty, self).__init__("\n", ' ')
class Sparse(Style):
def __init__(self):
super(Sparse, self).__init__('', '')
| class Style(object):
def __init__(self, newline, indent):
self.newline = str(newline)
self.indent = str(indent)
class Pretty(Style):
def __init__(self):
super(Pretty, self).__init__('\n', ' ')
class Sparse(Style):
def __init__(self):
super(Sparse, self).__init__('', '') |
def test_enter(player, limo):
player.perform("enter limo")
assert player.saw("You enter a fancy limo")
assert player.saw("electric")
def test_enter_and_exit(player, limo):
player.perform("enter limo")
player.forget()
player.perform("go out")
assert player.saw("Antechamber")
| def test_enter(player, limo):
player.perform('enter limo')
assert player.saw('You enter a fancy limo')
assert player.saw('electric')
def test_enter_and_exit(player, limo):
player.perform('enter limo')
player.forget()
player.perform('go out')
assert player.saw('Antechamber') |
#!/bin/python3
'''
String concatenation
f string - This is prefferable because its straight forward and simple
+
.format
'''
# answ = input("enter the name of your best friend: ")
# digit = " Dude"
# # Example of f string
# def stringJoiner(data):
# con_cat = f"{data} is the real {digit}!"
# return con_cat
# print(stringJoiner(answ))
'''
Steps
1. define an input variable to allow users to add their friend's name
2. Write a function that accept the users's input and add it to predefined strings
3. print the result
'''
# 1
user_name = input("Please, enter your friend's name here: ")
#2, use f string
def joinName( data ):
join_names = f"Your friend, {user_name} is lucky to have you. {user_name} is a nice buddy!"
return join_names
print(joinName(user_name)) | """
String concatenation
f string - This is prefferable because its straight forward and simple
+
.format
"""
"\nSteps\n1. define an input variable to allow users to add their friend's name\n\n2. Write a function that accept the users's input and add it to predefined strings\n\n3. print the result\n"
user_name = input("Please, enter your friend's name here: ")
def join_name(data):
join_names = f'Your friend, {user_name} is lucky to have you. {user_name} is a nice buddy!'
return join_names
print(join_name(user_name)) |
'''
Demo_2 is a simple implementation of factorial calculation
'''
n = int(input('please enter a number: '))
fac = 1
for n in range(n):
fac = fac * (n + 1)
print('the answer is: ', fac) | """
Demo_2 is a simple implementation of factorial calculation
"""
n = int(input('please enter a number: '))
fac = 1
for n in range(n):
fac = fac * (n + 1)
print('the answer is: ', fac) |
sum_sq = 0
sq_sum = 0
for i in range(1, 101):
sum_sq += i**2
sq_sum += i
diff = sum_sq - sq_sum**2
print(diff) | sum_sq = 0
sq_sum = 0
for i in range(1, 101):
sum_sq += i ** 2
sq_sum += i
diff = sum_sq - sq_sum ** 2
print(diff) |
# Refresh SENSU
# salt-run cache.clear_grains tgt="*" ; salt '*' state.sls sensu.client; salt '*' service.restart salt-minion; salt '*' mine.flush; salt '*' mine.update ; salt 'mon01*' state.sls sensu
@roles('ntw')
def clean_contrail():
sudo(uptime)
sudo(hostname)
| @roles('ntw')
def clean_contrail():
sudo(uptime)
sudo(hostname) |
# https://leetcode.com/problems/merge-intervals/
class Solution:
def merge(self, intervals: List[List[int]]) -> List[List[int]]:
intervals = sorted(intervals, key=lambda x: x[0])
i = 0
while i < len(intervals) - 1:
if intervals[i][1] >= intervals[i+1][0]:
intervals[i][1] = max(intervals[i][1], intervals[i+1][1])
intervals.pop(i+1)
continue
i += 1
return intervals
| class Solution:
def merge(self, intervals: List[List[int]]) -> List[List[int]]:
intervals = sorted(intervals, key=lambda x: x[0])
i = 0
while i < len(intervals) - 1:
if intervals[i][1] >= intervals[i + 1][0]:
intervals[i][1] = max(intervals[i][1], intervals[i + 1][1])
intervals.pop(i + 1)
continue
i += 1
return intervals |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.